| 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_GROMACSFORMAT_H |
| 7 |
#define AVOGADRO_IO_GROMACSFORMAT_H |
| 8 |
|
| 9 |
#include "avogadroioexport.h" |
| 10 |
#include "fileformat.h" |
| 11 |
|
| 12 |
#include <avogadro/core/avogadrocore.h> |
| 13 |
|
| 14 |
namespace Avogadro::Io { |
| 15 |
|
| 16 |
/** |
| 17 |
* @class GromacsFormat gromacsformat.h <avogadro/io/gromacsformat.h> |
| 18 |
* @brief Simple GROMACS .gro file reader. |
| 19 |
*/ |
| 20 |
class AVOGADROIO_EXPORT GromacsFormat : public FileFormat |
| 21 |
{ |
| 22 |
public: |
| 23 |
GromacsFormat() = default; |
| 24 |
~GromacsFormat() override = default; |
| 25 |
|
| 26 |
Operations supportedOperations() const override |
| 27 |
{ |
| 28 |
return Read | File | Stream | String; |
| 29 |
} |
| 30 |
|
| 31 |
FileFormat* newInstance() const override { return new GromacsFormat; } |
| 32 |
std::string identifier() const override { return "Avogadro: GROMACS"; } |
| 33 |
std::string name() const override { return "GROMACS"; } |
| 34 |
std::string description() const override |
| 35 |
{ |
| 36 |
return "Read GROMACS .gro files."; |
| 37 |
} |
| 38 |
|
| 39 |
std::string specificationUrl() const override |
| 40 |
{ |
| 41 |
return "https://manual.gromacs.org/current/reference-manual/" |
| 42 |
"file-formats.html#gro"; |
| 43 |
} |
| 44 |
|
| 45 |
std::vector<std::string> fileExtensions() const override; |
| 46 |
std::vector<std::string> mimeTypes() const override; |
| 47 |
|
| 48 |
[[nodiscard]] bool read(std::istream& in, Core::Molecule& molecule) override; |
| 49 |
|
| 50 |
// Unimplemented |
| 51 |
[[nodiscard]] bool write(std::ostream& out, |
| 52 |
const Core::Molecule& molecule) override; |
| 53 |
}; |
| 54 |
|
| 55 |
} // namespace Avogadro::Io |
| 56 |
|
| 57 |
#endif // AVOGADRO_IO_GROMACSFORMAT_H |