CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::VaspIO::PrintPOSCAR Class Reference

#include <VaspIO.hh>

Detailed Description

Print POSCAR with formating options.

Example:

std::ostream file("POSCAR");
Configuration config;
printer.title("My system");
printer.set_cart();
printer.sort();
printer.print(file);
file.close();
PrintPOSCAR(xtal::SimpleStructure _struc, std::string _title="", SpeciesMode _mode=SpeciesMode::ATOM)
Construct PrintPOSCAR object.
Definition: VaspIO.cc:32
ConfigIO::GenericConfigFormatter< jsonParser > config()
Definition: ConfigIO.cc:777

Definition at line 40 of file VaspIO.hh.

Public Types

using AtomName = std::string
 
using SpeciesMode = xtal::SimpleStructure::SpeciesMode
 

Public Member Functions

 PrintPOSCAR (xtal::SimpleStructure _struc, std::string _title="", SpeciesMode _mode=SpeciesMode::ATOM)
 Construct PrintPOSCAR object. More...
 
void set_title (std::string title)
 Set title. More...
 
void set_scale (double s)
 Set scaling factor. More...
 
void set_direct ()
 Set coordinate mode to Direct (fractional) More...
 
void set_frac ()
 Set coordinate mode to fractional (Direct) More...
 
void set_cart ()
 Set coordinate mode to Cartesian. More...
 
void set_coord_mode (COORD_TYPE mode)
 Set coordinate mode. More...
 
void set_selective_dynamics_off ()
 Set selective dynamics off. More...
 
void set_selective_dynamics_on ()
 Set selective dynamics on. More...
 
void set_atom_names_off ()
 Do not print atom names line. More...
 
void set_atom_names_on ()
 Print atom names line. More...
 
void set_append_atom_names_off ()
 Do not append atom name to end of each coordinate line. More...
 
void set_append_atom_names_on ()
 Append atom name to end of each coordinate line. More...
 
std::set< std::string > & ignore ()
 Access set of atom names which should not be printed, such as for vacancies. More...
 
const std::set< std::string > & ignore () const
 const Access set of atom names which should not be printed, such as for vacancies More...
 
void sort ()
 Default sort is by atom name. More...
 
void print (std::ostream &sout) const
 Print POSCAR to stream. More...
 
void print (Log &sout) const
 Print POSCAR to log (enables indentation) More...
 

Private Attributes

std::string m_title
 
SpeciesMode m_species_mode
 
xtal::SimpleStructure m_struc
 
std::vector< Indexm_permute
 
double m_scale
 
COORD_TYPE m_coord_mode
 
bool m_atom_names
 
bool m_sel_dynamics
 
bool m_append_atom_names
 
std::set< std::string > m_ignore
 List of atom names which should not be printed (primarily for vacancies) More...
 

Member Typedef Documentation

◆ AtomName

Definition at line 42 of file VaspIO.hh.

◆ SpeciesMode

Constructor & Destructor Documentation

◆ PrintPOSCAR()

CASM::VaspIO::PrintPOSCAR::PrintPOSCAR ( xtal::SimpleStructure  _struc,
std::string  _title = "",
PrintPOSCAR::SpeciesMode  _mode = SpeciesMode::ATOM 
)

Construct PrintPOSCAR object.

By default:

  • title = ""
  • scale = 1.0
  • coordinate mode = frac (Direct)
  • atom names line is printed
  • No selective dynamics
  • atom names appended to each coordinate line
  • {"Va", "va", "VA"} atoms ignored

By default:

  • title = config.name()
  • scale = 1.0
  • coordinate mode = frac (Direct)
  • atom names line is printed
  • Atoms printed in order appearing in the Configuration. (No sorting by atom types)
  • No selective dynamics
  • {"Va", "va", "VA"} atoms not printed
  • also adds displacements and deformation if they are present as DoF

Currently:

  • assumes molecules should be printed as their individual atoms.

Definition at line 32 of file VaspIO.cc.

Member Function Documentation

◆ ignore() [1/2]

std::set<std::string>& CASM::VaspIO::PrintPOSCAR::ignore ( )
inline

Access set of atom names which should not be printed, such as for vacancies.

Definition at line 98 of file VaspIO.hh.

◆ ignore() [2/2]

const std::set<std::string>& CASM::VaspIO::PrintPOSCAR::ignore ( ) const
inline

const Access set of atom names which should not be printed, such as for vacancies

Definition at line 102 of file VaspIO.hh.

◆ print() [1/2]

void CASM::VaspIO::PrintPOSCAR::print ( Log sout) const

Print POSCAR to log (enables indentation)

Print POSCAR, providing a range of std::tuple<AtomName, Coordinate, SelectiveDynamics>

Definition at line 66 of file VaspIO.cc.

◆ print() [2/2]

void CASM::VaspIO::PrintPOSCAR::print ( std::ostream &  sout) const

Print POSCAR to stream.

Print POSCAR, providing a range of std::tuple<AtomName, Coordinate, SelectiveDynamics>

Definition at line 56 of file VaspIO.cc.

◆ set_append_atom_names_off()

void CASM::VaspIO::PrintPOSCAR::set_append_atom_names_off ( )
inline

Do not append atom name to end of each coordinate line.

Definition at line 91 of file VaspIO.hh.

◆ set_append_atom_names_on()

void CASM::VaspIO::PrintPOSCAR::set_append_atom_names_on ( )
inline

Append atom name to end of each coordinate line.

Definition at line 94 of file VaspIO.hh.

◆ set_atom_names_off()

void CASM::VaspIO::PrintPOSCAR::set_atom_names_off ( )
inline

Do not print atom names line.

Definition at line 85 of file VaspIO.hh.

◆ set_atom_names_on()

void CASM::VaspIO::PrintPOSCAR::set_atom_names_on ( )
inline

Print atom names line.

Definition at line 88 of file VaspIO.hh.

◆ set_cart()

void CASM::VaspIO::PrintPOSCAR::set_cart ( )
inline

Set coordinate mode to Cartesian.

Definition at line 73 of file VaspIO.hh.

◆ set_coord_mode()

void CASM::VaspIO::PrintPOSCAR::set_coord_mode ( COORD_TYPE  mode)
inline

Set coordinate mode.

Definition at line 76 of file VaspIO.hh.

◆ set_direct()

void CASM::VaspIO::PrintPOSCAR::set_direct ( )
inline

Set coordinate mode to Direct (fractional)

Definition at line 67 of file VaspIO.hh.

◆ set_frac()

void CASM::VaspIO::PrintPOSCAR::set_frac ( )
inline

Set coordinate mode to fractional (Direct)

Definition at line 70 of file VaspIO.hh.

◆ set_scale()

void CASM::VaspIO::PrintPOSCAR::set_scale ( double  s)
inline

Set scaling factor.

Definition at line 64 of file VaspIO.hh.

◆ set_selective_dynamics_off()

void CASM::VaspIO::PrintPOSCAR::set_selective_dynamics_off ( )
inline

Set selective dynamics off.

Definition at line 79 of file VaspIO.hh.

◆ set_selective_dynamics_on()

void CASM::VaspIO::PrintPOSCAR::set_selective_dynamics_on ( )
inline

Set selective dynamics on.

Definition at line 82 of file VaspIO.hh.

◆ set_title()

void CASM::VaspIO::PrintPOSCAR::set_title ( std::string  title)
inline

Set title.

Definition at line 61 of file VaspIO.hh.

◆ sort()

void CASM::VaspIO::PrintPOSCAR::sort ( )

Default sort is by atom name.

Default sort is by species name.

Definition at line 50 of file VaspIO.cc.

Member Data Documentation

◆ m_append_atom_names

bool CASM::VaspIO::PrintPOSCAR::m_append_atom_names
private

Definition at line 124 of file VaspIO.hh.

◆ m_atom_names

bool CASM::VaspIO::PrintPOSCAR::m_atom_names
private

Definition at line 122 of file VaspIO.hh.

◆ m_coord_mode

COORD_TYPE CASM::VaspIO::PrintPOSCAR::m_coord_mode
private

Definition at line 121 of file VaspIO.hh.

◆ m_ignore

std::set<std::string> CASM::VaspIO::PrintPOSCAR::m_ignore
private

List of atom names which should not be printed (primarily for vacancies)

Definition at line 128 of file VaspIO.hh.

◆ m_permute

std::vector<Index> CASM::VaspIO::PrintPOSCAR::m_permute
private

Definition at line 118 of file VaspIO.hh.

◆ m_scale

double CASM::VaspIO::PrintPOSCAR::m_scale
private

Definition at line 120 of file VaspIO.hh.

◆ m_sel_dynamics

bool CASM::VaspIO::PrintPOSCAR::m_sel_dynamics
private

Definition at line 123 of file VaspIO.hh.

◆ m_species_mode

SpeciesMode CASM::VaspIO::PrintPOSCAR::m_species_mode
private

Definition at line 115 of file VaspIO.hh.

◆ m_struc

xtal::SimpleStructure CASM::VaspIO::PrintPOSCAR::m_struc
private

Definition at line 117 of file VaspIO.hh.

◆ m_title

std::string CASM::VaspIO::PrintPOSCAR::m_title
private

Definition at line 114 of file VaspIO.hh.


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