Debian Codegraph @

avogadro/io/dcdformat.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_DCDFORMAT_H
7 #define AVOGADRO_IO_DCDFORMAT_H
8
9 #include "fileformat.h"
10
11 namespace Avogadro::Io {
12
13 /**
14 * @class DcdFormat dcdformat.h <avogadro/io/dcdformat.h>
15 * @brief Implementation of the generic dcd trajectory format.
16 * @author Adarsh B
17 */
18
19 class AVOGADROIO_EXPORT DcdFormat : public FileFormat
20 {
21 public:
22 DcdFormat() = default;
23 ~DcdFormat() override = default;
24
25 Operations supportedOperations() const override
26 {
27 return Read | MultiMolecule | File | Stream | String;
28 }
29
30 FileFormat* newInstance() const override { return new DcdFormat; }
31 std::string identifier() const override { return "Avogadro: DCD"; }
32 std::string name() const override { return "DCD"; }
33 std::string description() const override
34 {
35 return "CHARMM/NAMD/LAMMPS DCD Trajectory format.";
36 }
37
38 std::string specificationUrl() const override { return ""; }
39
40 std::vector<std::string> fileExtensions() const override;
41 std::vector<std::string> mimeTypes() const override;
42
43 [[nodiscard]] bool read(std::istream& inStream,
44 Core::Molecule& molecule) override;
45 [[nodiscard]] bool write(std::ostream& outStream,
46 const Core::Molecule& molecule) override;
47 };
48
49 } // namespace Avogadro::Io
50
51 #endif // AVOGADRO_IO_DCDFORMAT_H