Debian Codegraph @

avogadro/quantumio/qcschema.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_QUANTUMIO_QCSCHEMA_H
7 #define AVOGADRO_QUANTUMIO_QCSCHEMA_H
8
9 #include "avogadroquantumioexport.h"
10 #include <avogadro/io/fileformat.h>
11
12 namespace Avogadro {
13 namespace QuantumIO {
14
15 /**
16 * @class QCSchema qcschema.h <avogadro/quantumio/qcschema.h>
17 * @brief Implementation of the MolSSI QCSchema format and WebMO variant
18 * @author Geoffrey R. Hutchison
19 */
20
21 class AVOGADROQUANTUMIO_EXPORT QCSchema : public Io::FileFormat
22 {
23 public:
24 QCSchema();
25 ~QCSchema() override;
26
27 Operations supportedOperations() const override
28 {
29 return Read | File | Stream | String;
30 }
31
32 FileFormat* newInstance() const override { return new QCSchema; }
33 std::string identifier() const override { return "Avogadro: QCSchema"; }
34 std::string name() const override { return "QCSchema JSON"; }
35 std::string description() const override
36 {
37 return "MolSSI QCSchema JSON format.";
38 }
39
40 std::string specificationUrl() const override { return ""; }
41
42 std::vector<std::string> fileExtensions() const override;
43 std::vector<std::string> mimeTypes() const override;
44
45 [[nodiscard]] bool read(std::istream& in, Core::Molecule& molecule) override;
46 [[nodiscard]] bool write(std::ostream& out,
47 const Core::Molecule& molecule) override
48 {
49 // Empty, as we do not currently write QC_SCHEMA files.
50 return false;
51 }
52 };
53
54 } // namespace QuantumIO
55 } // namespace Avogadro
56
57 #endif // AVOGADRO_IO_NWCHEMJSON_H