Debian Codegraph @

avogadro/io/mmtfformat.h

raw
1 /******************************************************************************
2 This source file is part of the Avogadro project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #ifndef AVOGADRO_IO_MMTFFORMAT_H
7 #define AVOGADRO_IO_MMTFFORMAT_H
8
9 #include "fileformat.h"
10
11 namespace Avogadro {
12 namespace Core {
13 class GaussianSet;
14 }
15 namespace Io {
16
17 /**
18 * @class MMTFFormat mmtfformat.h <avogadro/io/mmtfformat.h>
19 * @brief Implementation of the MMTF format.
20 */
21
22 class AVOGADROIO_EXPORT MMTFFormat : public FileFormat
23 {
24 public:
25 MMTFFormat() = default;
26 ~MMTFFormat() override = default;
27
28 Operations supportedOperations() const override
29 {
30 return Read | File | Stream | String;
31 }
32
33 FileFormat* newInstance() const override { return new MMTFFormat; }
34 std::string identifier() const override { return "Avogadro: MMTF"; }
35 std::string name() const override
36 {
37 return "MacroMolecular Transmission Format";
38 }
39 std::string description() const override
40 {
41 return "MMTF is a format used to express MacroMolecular data in a "
42 "compressed binary format.";
43 }
44
45 std::string specificationUrl() const override
46 {
47 return "https://github.com/rcsb/mmtf-cpp";
48 }
49
50 std::vector<std::string> fileExtensions() const override;
51 std::vector<std::string> mimeTypes() const override;
52
53 [[nodiscard]] bool read(std::istream& in, Core::Molecule& molecule) override;
54
55 // unimplemented
56 [[nodiscard]] bool write(std::ostream& out,
57 const Core::Molecule& molecule) override;
58 };
59
60 } // namespace Io
61 } // namespace Avogadro
62
63 #endif // AVOGADRO_IO_MMTFFORMAT_H