Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::writers::structure::CellWriter Class Reference

Writer for CASTEP .cell structure files. More...

#include <CellWriter.hpp>

Inheritance diagram for correlation::writers::structure::CellWriter:
Collaboration diagram for correlation::writers::structure::CellWriter:

Public Member Functions

std::string getName () const override
 Returns the display name of the structure format.
std::vector< std::string > getExtensions () const override
 Returns a list of supported file extensions.
void write (const std::string &filepath, const correlation::core::Cell &cell, const StructureWriterOptions &options={}) const override
 Writes a simulation cell to a target file path.
Public Member Functions inherited from correlation::writers::structure::BaseStructureWriter
 BaseStructureWriter ()=default
virtual ~BaseStructureWriter ()=default
 BaseStructureWriter (const BaseStructureWriter &)=delete
BaseStructureWriter & operator= (const BaseStructureWriter &)=delete
 BaseStructureWriter (BaseStructureWriter &&)=delete
BaseStructureWriter & operator= (BaseStructureWriter &&)=delete

Detailed Description

Writer for CASTEP .cell structure files.

Emits BLOCK LATTICE_CART for lattice vectors and either BLOCK POSITIONS_FRAC or BLOCK POSITIONS_ABS for coordinates.

Member Function Documentation

◆ getExtensions()

std::vector< std::string > correlation::writers::structure::CellWriter::getExtensions ( ) const
inlinenodiscardoverridevirtual

Returns a list of supported file extensions.

Returns
Vector of extensions including or excluding leading dot (e.g. {"vasp", "poscar"}).

Implements correlation::writers::structure::BaseStructureWriter.

◆ getName()

std::string correlation::writers::structure::CellWriter::getName ( ) const
inlinenodiscardoverridevirtual

Returns the display name of the structure format.

Returns
A human-readable name (e.g. "VASP POSCAR", "CASTEP Cell").

Implements correlation::writers::structure::BaseStructureWriter.

◆ write()

void correlation::writers::structure::CellWriter::write ( const std::string & filepath,
const correlation::core::Cell & cell,
const StructureWriterOptions & options = {} ) const
overridevirtual

Writes a simulation cell to a target file path.

Parameters
[in]filepathThe destination path for the output file.
[in]cellThe atomic simulation cell to serialize.
[in]optionsOptions governing coordinate conventions and element ordering.
Exceptions
std::runtime_errorIf file cannot be written or cell data is invalid.

Implements correlation::writers::structure::BaseStructureWriter.


The documentation for this class was generated from the following files: