| 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_TRRFORMAT_H |
| 7 |
#define AVOGADRO_IO_TRRFORMAT_H |
| 8 |
|
| 9 |
#include "fileformat.h" |
| 10 |
|
| 11 |
namespace Avogadro::Io { |
| 12 |
|
| 13 |
/** |
| 14 |
* @class TrrFormat trrformat.h <avogadro/io/trrformat.h> |
| 15 |
* @brief Implementation of the generic trr trajectory format. |
| 16 |
* @author Adarsh B |
| 17 |
*/ |
| 18 |
|
| 19 |
class AVOGADROIO_EXPORT TrrFormat : public FileFormat |
| 20 |
{ |
| 21 |
public: |
| 22 |
TrrFormat() = default; |
| 23 |
~TrrFormat() 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 TrrFormat; } |
| 31 |
std::string identifier() const override { return "Avogadro: GROMACS TRR"; } |
| 32 |
std::string name() const override { return "TRR"; } |
| 33 |
std::string description() const override |
| 34 |
{ |
| 35 |
return "Generic TRR Trajectory format."; |
| 36 |
} |
| 37 |
|
| 38 |
std::string specificationUrl() const override |
| 39 |
{ |
| 40 |
return "https://manual.gromacs.org/current/reference-manual/" |
| 41 |
"file-formats.html#trr"; |
| 42 |
} |
| 43 |
|
| 44 |
std::vector<std::string> fileExtensions() const override; |
| 45 |
std::vector<std::string> mimeTypes() const override; |
| 46 |
|
| 47 |
[[nodiscard]] bool read(std::istream& inStream, |
| 48 |
Core::Molecule& molecule) override; |
| 49 |
|
| 50 |
// uninplemented |
| 51 |
[[nodiscard]] bool write(std::ostream& outStream, |
| 52 |
const Core::Molecule& molecule) override; |
| 53 |
}; |
| 54 |
|
| 55 |
} // namespace Avogadro::Io |
| 56 |
|
| 57 |
#endif // AVOGADRO_IO_TRRFORMAT_H |