Class Avogadro::Io::PoscarFormat#

class Avogadro::Io::PoscarFormat : public FileFormat#

Implementation of the generic POSCAR format.


Patrick S. Avery

Public Functions

~PoscarFormat() override#
inline virtual Operations supportedOperations() const override#

Operation flags defining the capabilities of this format.

inline virtual FileFormat *newInstance() const override#

Create a new instance of the file format class. Ownership passes to the caller.

inline virtual std::string identifier() const override#

A unique identifier, used to retrieve formats programatically. CML, XYZ, PDB etc. A runtime warning will be generated if the identifier is not unique.

inline virtual std::string name() const override#

The name of the format, should be short such as Chemical Markup Language, XYZ format, Protein Databank etc.

inline virtual std::string description() const override#

A description of the format, along with any relevant help text for users.

inline virtual std::string specificationUrl() const override#

The URL of the format specification if available (relevant web page/wiki otherwise).

virtual std::vector<std::string> fileExtensions() const override#

Get the file name extension(s) that the format supports reading.


A vector containing a list of extensions (in lower case).

virtual std::vector<std::string> mimeTypes() const override#

Get the MIME type(s) that the format supports reading.


A vector containing a list of MIME type(s) (in lower case).

virtual bool read(std::istream &inStream, Core::Molecule &mol) override#

Read the given in stream and load it into molecule.

  • in – The input file stream.

  • molecule – The molecule the data will be read into.


True on success, false on failure.

virtual bool write(std::ostream &outStream, const Core::Molecule &mol) override#

Write to the given out stream the contents of molecule.

  • out – The output stream to write the data to.

  • molecule – The contents of this molecule will be written to output.


True on success, false on failure.