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

Writer for VASP POSCAR and CONTCAR files. More...

#include <PoscarWriter.hpp>

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

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 VASP POSCAR and CONTCAR files.

Implements VASP 5+ format with explicit species symbols, contiguous species grouping, and support for Direct (fractional) or Cartesian coordinates.

Member Function Documentation

◆ getExtensions()

std::vector< std::string > correlation::writers::structure::PoscarWriter::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::PoscarWriter::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::PoscarWriter::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: