CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::VaspIO::PrintPOSCAR Class Reference

#include <VaspIO.hh>

+ Inheritance diagram for CASM::VaspIO::PrintPOSCAR:

Detailed Description

Print POSCAR with formating options.

Example:

std::ostream file("POSCAR");
Configuration config;
PrintPOSCAR printer(config);
printer.title("My system");
printer.set_cart();
printer.sort();
printer.print(file);
file.close();

Definition at line 232 of file VaspIO.hh.

Public Types

typedef std::string AtomName
 
typedef std::tuple< AtomName,
Coordinate, SelectiveDynamics
tuple_type
 Atom name, Coordinate, SelectiveDynamics. More...
 
typedef std::vector
< tuple_type >::iterator 
iterator
 
typedef std::vector
< tuple_type >::const_iterator 
const_iterator
 

Public Member Functions

 PrintPOSCAR (const BasicStructure< Site > &struc)
 Construct PrintPOSCAR object. More...
 
 PrintPOSCAR (const Configuration &config)
 Construct PrintPOSCAR object. More...
 
 PrintPOSCAR (const Supercell &scel, const ConfigDoF &configdof)
 Construct PrintPOSCAR object. More...
 
iterator begin ()
 Iterate over tuples of (AtomName, Coordinate, SelectiveDynamics) More...
 
iterator end ()
 Iterate over tuples of (AtomName, Coordinate, SelectiveDynamics) More...
 
const_iterator cbegin () const
 Iterate over tuples of (AtomName, Coordinate, SelectiveDynamics) More...
 
const_iterator cend () const
 Iterate over tuples of (AtomName, Coordinate, SelectiveDynamics) More...
 
void sort ()
 Default sort is by atom name. More...
 
void print (std::ostream &sout)
 Print POSCAR to stream. 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::vector< std::string > & ignore ()
 Access vector of atom names which should not be printed, such as for vacancies. More...
 
const std::vector< std::string > & ignore () const
 const Access vector of atom names which should not be printed, such as for vacancies More...
 

Protected Member Functions

template<typename TupleIterator >
void _print (std::ostream &sout, TupleIterator begin, TupleIterator end)
 Print POSCAR, provide a range of std::tuple<Atom name, Coordinate, SelectiveDynamics> More...
 

Private Attributes

std::vector< tuple_typem_atom_order
 (AtomName, Coordinate, SelectiveDynamics) More...
 

Member Typedef Documentation

Definition at line 236 of file VaspIO.hh.

Definition at line 243 of file VaspIO.hh.

Definition at line 241 of file VaspIO.hh.

Constructor & Destructor Documentation

CASM::VaspIO::PrintPOSCAR::PrintPOSCAR ( const BasicStructure< Site > &  struc)
inline

Construct PrintPOSCAR object.

By default:

  • title = struc.title
  • scale = 1.0
  • coordinate mode = frac (Direct)
  • atom names line is printed
  • Atoms printed in order appearing in the Structure. (No sorting by atom types)
  • No selective dynamics
  • {"Va", "va", "VA"} atoms not printed
  • not sorted

Currently:

  • no displacement
  • assumes all species are atomic

Definition at line 410 of file VaspIO.hh.

CASM::VaspIO::PrintPOSCAR::PrintPOSCAR ( const Configuration config)
inline

Construct PrintPOSCAR object.

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

Currently:

  • no displacement
  • assumes all species are atomic

Definition at line 442 of file VaspIO.hh.

CASM::VaspIO::PrintPOSCAR::PrintPOSCAR ( const Supercell scel,
const ConfigDoF configdof 
)
inline

Construct PrintPOSCAR object.

By default:

  • title = ""
  • scale = 1.0
  • coordinate mode = frac (Direct)
  • atom names line is printed
  • Atoms printed in order appearing in the ConfigDoF. (No sorting by atom types)
  • No selective dynamics
  • {"Va", "va", "VA"} atoms not printed

Currently:

  • no displacement
  • assumes all species are atomic

Definition at line 477 of file VaspIO.hh.

Member Function Documentation

template<typename TupleIterator >
void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::_print ( std::ostream &  sout,
TupleIterator  begin,
TupleIterator  end 
)
protectedinherited

Print POSCAR, provide a range of std::tuple<Atom name, Coordinate, SelectiveDynamics>

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

Definition at line 296 of file VaspIO.hh.

iterator CASM::VaspIO::PrintPOSCAR::begin ( )
inline

Iterate over tuples of (AtomName, Coordinate, SelectiveDynamics)

Definition at line 256 of file VaspIO.hh.

const_iterator CASM::VaspIO::PrintPOSCAR::cbegin ( ) const
inline

Iterate over tuples of (AtomName, Coordinate, SelectiveDynamics)

Definition at line 266 of file VaspIO.hh.

const_iterator CASM::VaspIO::PrintPOSCAR::cend ( ) const
inline

Iterate over tuples of (AtomName, Coordinate, SelectiveDynamics)

Definition at line 271 of file VaspIO.hh.

iterator CASM::VaspIO::PrintPOSCAR::end ( )
inline

Iterate over tuples of (AtomName, Coordinate, SelectiveDynamics)

Definition at line 261 of file VaspIO.hh.

std::vector<std::string>& CASM::VaspIO::vaspio_impl::PrintPOSCARBase::ignore ( )
inlineinherited

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

Definition at line 183 of file VaspIO.hh.

const std::vector<std::string>& CASM::VaspIO::vaspio_impl::PrintPOSCARBase::ignore ( ) const
inlineinherited

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

Definition at line 188 of file VaspIO.hh.

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

Print POSCAR to stream.

Definition at line 509 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_append_atom_names_off ( )
inlineinherited

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

Definition at line 173 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_append_atom_names_on ( )
inlineinherited

Append atom name to end of each coordinate line.

Definition at line 178 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_atom_names_off ( )
inlineinherited

Do not print atom names line.

Definition at line 163 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_atom_names_on ( )
inlineinherited

Print atom names line.

Definition at line 168 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_cart ( )
inlineinherited

Set coordinate mode to Cartesian.

Definition at line 143 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_coord_mode ( COORD_TYPE  mode)
inlineinherited

Set coordinate mode.

Definition at line 148 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_direct ( )
inlineinherited

Set coordinate mode to Direct (fractional)

Definition at line 134 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_frac ( )
inlineinherited

Set coordinate mode to fractional (Direct)

Definition at line 138 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_scale ( double  s)
inlineinherited

Set scaling factor.

Definition at line 129 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_selective_dynamics_off ( )
inlineinherited

Set selective dynamics off.

Definition at line 153 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_selective_dynamics_on ( )
inlineinherited

Set selective dynamics on.

Definition at line 158 of file VaspIO.hh.

void CASM::VaspIO::vaspio_impl::PrintPOSCARBase::set_title ( std::string  title)
inlineinherited

Set title.

Definition at line 124 of file VaspIO.hh.

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

Default sort is by atom name.

Default sort is by species name.

Definition at line 500 of file VaspIO.hh.

Member Data Documentation

std::vector<tuple_type> CASM::VaspIO::PrintPOSCAR::m_atom_order
private

(AtomName, Coordinate, SelectiveDynamics)

Definition at line 285 of file VaspIO.hh.


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