CASM  1.1.0
A Clusters Approach to Statistical Mechanics

Detailed Description

Relates to Molecule.

Classes

class  CASM::xtal::AtomPosition
 An atomic species associated with a position in space. More...
 
class  CASM::xtal::Molecule
 Class representing a Molecule. More...
 

Functions

 CASM::xtal::AtomPosition::AtomPosition (double _pos1, double _pos2, double _pos3, std::string const &_species)
 Construct with x,y,z position coordinates and atom name. More...
 
 CASM::xtal::AtomPosition::AtomPosition (Eigen::Ref< const Eigen::Vector3d > const &_pos, std::string const &_species)
 Construct with vector position and atom name. More...
 
std::string const & CASM::xtal::AtomPosition::name () const
 Const access of species name. More...
 
Eigen::Vector3d const & CASM::xtal::AtomPosition::cart () const
 Const access of Cartesian position of atom. More...
 
bool CASM::xtal::AtomPosition::time_reversal_active () const
 
std::map< std::string, SpeciesAttribute > const & CASM::xtal::AtomPosition::attributes () const
 
void CASM::xtal::AtomPosition::set_attributes (std::map< std::string, SpeciesAttribute > _attr)
 
bool CASM::xtal::AtomPosition::identical (AtomPosition const &RHS, double _tol) const
 Comparison with tolerance (max allowed distance between LHS and RHS, in Angstr.) More...
 
bool CASM::xtal::compare_type (AtomPosition const &A, AtomPosition const &B, double tol)
 
static Molecule CASM::xtal::Molecule::make_atom (std::string const &atom_name)
 Return an atomic Molecule with specified name. More...
 
static Molecule CASM::xtal::Molecule::make_unknown ()
 Return an atomic Molecule with specified name. More...
 
static Molecule CASM::xtal::Molecule::make_vacancy ()
 Return a vacancy Molecule. More...
 
 CASM::xtal::Molecule::Molecule (std::string const &_name, std::vector< AtomPosition > _atoms={}, bool _divisible=false)
 Construct with designated name, a list of atoms, and whether molecule is chemically divisible. More...
 
Index CASM::xtal::Molecule::size () const
 Number of atoms contained Molecule. More...
 
std::string const & CASM::xtal::Molecule::name () const
 Designated name of Molecule (may be unrelated to constituent species) More...
 
std::vector< AtomPosition > const & CASM::xtal::Molecule::atoms () const
 Const access of all contained AtomPositions. More...
 
AtomPosition const & CASM::xtal::Molecule::atom (Index i) const
 returns i'th atom position More...
 
bool CASM::xtal::Molecule::is_atomic () const
 True if Molecule is atom with no other attributes. More...
 
bool CASM::xtal::Molecule::is_vacancy () const
 True if Molecule represents vacancy. More...
 
bool CASM::xtal::Molecule::time_reversal_active () const
 True if Molecule contains attributes that are affected by time reversal. More...
 
std::map< std::string, SpeciesAttribute > const & CASM::xtal::Molecule::attributes () const
 Returns dictionary of all constituent attributes of the Molecule Does not include attributes associated with individual atoms. More...
 
void CASM::xtal::Molecule::set_attributes (std::map< std::string, SpeciesAttribute > _attr)
 Set all constitutent attributes of Molecule overwrites any existing attributes. More...
 
void CASM::xtal::Molecule::set_atoms (std::vector< AtomPosition > _atoms)
 set all constituent atoms of Molecule overwrites any existing atoms More...
 
bool CASM::xtal::Molecule::identical (Molecule const &RHS, double _tol) const
 Check equality of two molecules, within specified tolerance. Compares atoms, irrespective of order, and attributes (name is not checked) More...
 
bool CASM::xtal::Molecule::contains (std::string const &atom_name) const
 Returns true of molecule contains atom of specified name. More...
 
bool CASM::xtal::Molecule::is_divisible () const
 
bool CASM::xtal::Molecule::is_indivisible () const
 
bool CASM::xtal::operator== (Molecule const &A, Molecule const &B)
 
bool CASM::xtal::is_vacancy (const std::string &name)
 A vacancy is any Specie/Molecule with (name == "VA" || name == "va" || name == "Va") More...
 
bool CASM::xtal::is_molecule_name (const Molecule &mol, std::string name)
 Return true if Molecule name matches 'name', including Va checks. More...
 
xtal::AtomPositionCASM::sym::apply (const xtal::SymOp &op, xtal::AtomPosition &mutating_atom_pos)
 
xtal::AtomPosition CASM::sym::copy_apply (const xtal::SymOp &op, xtal::AtomPosition atom_pos)
 
template<typename ExternSymOp >
xtal::AtomPosition CASM::sym::copy_apply (const ExternSymOp &op, xtal::AtomPosition atom_pos)
 
xtal::MoleculeCASM::sym::apply (const xtal::SymOp &op, xtal::Molecule &mutating_mol)
 
xtal::Molecule CASM::sym::copy_apply (const xtal::SymOp &op, xtal::Molecule mol)
 
template<typename ExternSymOp >
xtal::Molecule CASM::sym::copy_apply (const ExternSymOp &op, xtal::Molecule mol)
 

Variables

std::string CASM::xtal::AtomPosition::m_species
 Atomic species. More...
 
Eigen::Vector3d CASM::xtal::AtomPosition::m_position
 Cartesian position; origin is centered at site. More...
 
std::map< std::string, SpeciesAttributeCASM::xtal::AtomPosition::m_attribute_map
 
std::string CASM::xtal::Molecule::m_name
 
std::vector< AtomPositionCASM::xtal::Molecule::m_atoms
 
bool CASM::xtal::Molecule::m_divisible
 
std::map< std::string, SpeciesAttributeCASM::xtal::Molecule::m_attribute_map
 

Function Documentation

◆ apply() [1/2]

xtal::AtomPosition & CASM::sym::apply ( const xtal::SymOp op,
xtal::AtomPosition mutating_atom_pos 
)

Definition at line 100 of file Molecule.cc.

◆ apply() [2/2]

xtal::Molecule & CASM::sym::apply ( const xtal::SymOp op,
xtal::Molecule mutating_mol 
)

Definition at line 122 of file Molecule.cc.

◆ atom()

AtomPosition const& CASM::xtal::Molecule::atom ( Index  i) const
inline

returns i'th atom position

Definition at line 123 of file Molecule.hh.

◆ AtomPosition() [1/2]

CASM::xtal::AtomPosition::AtomPosition ( double  _pos1,
double  _pos2,
double  _pos3,
std::string const &  _species 
)
inline

Construct with x,y,z position coordinates and atom name.

Definition at line 30 of file Molecule.hh.

◆ AtomPosition() [2/2]

CASM::xtal::AtomPosition::AtomPosition ( Eigen::Ref< const Eigen::Vector3d > const &  _pos,
std::string const &  _species 
)
inline

Construct with vector position and atom name.

Definition at line 35 of file Molecule.hh.

◆ atoms()

std::vector<AtomPosition> const& CASM::xtal::Molecule::atoms ( ) const
inline

Const access of all contained AtomPositions.

Definition at line 120 of file Molecule.hh.

◆ attributes() [1/2]

std::map<std::string, SpeciesAttribute> const& CASM::xtal::AtomPosition::attributes ( ) const
inline

Definition at line 52 of file Molecule.hh.

◆ attributes() [2/2]

std::map<std::string, SpeciesAttribute> const& CASM::xtal::Molecule::attributes ( ) const
inline

Returns dictionary of all constituent attributes of the Molecule Does not include attributes associated with individual atoms.

Definition at line 145 of file Molecule.hh.

◆ cart()

Eigen::Vector3d const& CASM::xtal::AtomPosition::cart ( ) const
inline

Const access of Cartesian position of atom.

Definition at line 43 of file Molecule.hh.

◆ compare_type()

bool CASM::xtal::compare_type ( AtomPosition const &  A,
AtomPosition const &  B,
double  tol 
)

Definition at line 19 of file Molecule.cc.

◆ contains()

bool CASM::xtal::Molecule::contains ( std::string const &  atom_name) const

Returns true of molecule contains atom of specified name.

Definition at line 80 of file Molecule.cc.

◆ copy_apply() [1/4]

template<typename ExternSymOp >
xtal::AtomPosition CASM::sym::copy_apply ( const ExternSymOp &  op,
xtal::AtomPosition  atom_pos 
)

Definition at line 208 of file Molecule.hh.

◆ copy_apply() [2/4]

template<typename ExternSymOp >
xtal::Molecule CASM::sym::copy_apply ( const ExternSymOp &  op,
xtal::Molecule  mol 
)

Definition at line 218 of file Molecule.hh.

◆ copy_apply() [3/4]

xtal::AtomPosition CASM::sym::copy_apply ( const xtal::SymOp op,
xtal::AtomPosition  atom_pos 
)

Definition at line 107 of file Molecule.cc.

◆ copy_apply() [4/4]

xtal::Molecule CASM::sym::copy_apply ( const xtal::SymOp op,
xtal::Molecule  mol 
)

Definition at line 139 of file Molecule.cc.

◆ identical() [1/2]

bool CASM::xtal::AtomPosition::identical ( AtomPosition const &  RHS,
double  _tol 
) const

Comparison with tolerance (max allowed distance between LHS and RHS, in Angstr.)

Definition at line 12 of file Molecule.cc.

◆ identical() [2/2]

bool CASM::xtal::Molecule::identical ( Molecule const &  RHS,
double  _tol 
) const

Check equality of two molecules, within specified tolerance. Compares atoms, irrespective of order, and attributes (name is not checked)

Definition at line 52 of file Molecule.cc.

◆ is_atomic()

bool CASM::xtal::Molecule::is_atomic ( ) const

True if Molecule is atom with no other attributes.

Definition at line 36 of file Molecule.cc.

◆ is_divisible()

bool CASM::xtal::Molecule::is_divisible ( ) const
inline

Definition at line 169 of file Molecule.hh.

◆ is_indivisible()

bool CASM::xtal::Molecule::is_indivisible ( ) const
inline

Definition at line 171 of file Molecule.hh.

◆ is_molecule_name()

bool CASM::xtal::is_molecule_name ( const Molecule mol,
std::string  name 
)
inline

Return true if Molecule name matches 'name', including Va checks.

Definition at line 192 of file Molecule.hh.

◆ is_vacancy() [1/2]

bool CASM::xtal::Molecule::is_vacancy ( ) const

True if Molecule represents vacancy.

Definition at line 47 of file Molecule.cc.

◆ is_vacancy() [2/2]

bool CASM::xtal::is_vacancy ( const std::string &  name)
inline

A vacancy is any Specie/Molecule with (name == "VA" || name == "va" || name == "Va")

Definition at line 187 of file Molecule.hh.

◆ make_atom()

Molecule CASM::xtal::Molecule::make_atom ( std::string const &  atom_name)
static

Return an atomic Molecule with specified name.

Definition at line 86 of file Molecule.cc.

◆ make_unknown()

static Molecule CASM::xtal::Molecule::make_unknown ( )
inlinestatic

Return an atomic Molecule with specified name.

Definition at line 99 of file Molecule.hh.

◆ make_vacancy()

Molecule CASM::xtal::Molecule::make_vacancy ( )
static

Return a vacancy Molecule.

Definition at line 90 of file Molecule.cc.

◆ Molecule()

CASM::xtal::Molecule::Molecule ( std::string const &  _name,
std::vector< AtomPosition _atoms = {},
bool  _divisible = false 
)
inline

Construct with designated name, a list of atoms, and whether molecule is chemically divisible.

Definition at line 106 of file Molecule.hh.

◆ name() [1/2]

std::string const& CASM::xtal::AtomPosition::name ( ) const
inline

Const access of species name.

Definition at line 40 of file Molecule.hh.

◆ name() [2/2]

std::string const& CASM::xtal::Molecule::name ( ) const
inline

Designated name of Molecule (may be unrelated to constituent species)

Definition at line 117 of file Molecule.hh.

◆ operator==()

bool CASM::xtal::operator== ( Molecule const &  A,
Molecule const &  B 
)
inline

Definition at line 181 of file Molecule.hh.

◆ set_atoms()

void CASM::xtal::Molecule::set_atoms ( std::vector< AtomPosition _atoms)
inline

set all constituent atoms of Molecule overwrites any existing atoms

Definition at line 157 of file Molecule.hh.

◆ set_attributes() [1/2]

void CASM::xtal::AtomPosition::set_attributes ( std::map< std::string, SpeciesAttribute _attr)
inline

Definition at line 56 of file Molecule.hh.

◆ set_attributes() [2/2]

void CASM::xtal::Molecule::set_attributes ( std::map< std::string, SpeciesAttribute _attr)
inline

Set all constitutent attributes of Molecule overwrites any existing attributes.

Definition at line 151 of file Molecule.hh.

◆ size()

Index CASM::xtal::Molecule::size ( ) const
inline

Number of atoms contained Molecule.

Definition at line 113 of file Molecule.hh.

◆ time_reversal_active() [1/2]

bool CASM::xtal::AtomPosition::time_reversal_active ( ) const
inline

Definition at line 45 of file Molecule.hh.

◆ time_reversal_active() [2/2]

bool CASM::xtal::Molecule::time_reversal_active ( ) const
inline

True if Molecule contains attributes that are affected by time reversal.

Definition at line 133 of file Molecule.hh.

Variable Documentation

◆ m_atoms

std::vector<AtomPosition> CASM::xtal::Molecule::m_atoms
private

Definition at line 175 of file Molecule.hh.

◆ m_attribute_map [1/2]

std::map<std::string, SpeciesAttribute> CASM::xtal::AtomPosition::m_attribute_map
private

Definition at line 71 of file Molecule.hh.

◆ m_attribute_map [2/2]

std::map<std::string, SpeciesAttribute> CASM::xtal::Molecule::m_attribute_map
private

Definition at line 178 of file Molecule.hh.

◆ m_divisible

bool CASM::xtal::Molecule::m_divisible
private

Definition at line 176 of file Molecule.hh.

◆ m_name

std::string CASM::xtal::Molecule::m_name
private

Definition at line 174 of file Molecule.hh.

◆ m_position

Eigen::Vector3d CASM::xtal::AtomPosition::m_position
private

Cartesian position; origin is centered at site.

Definition at line 69 of file Molecule.hh.

◆ m_species

std::string CASM::xtal::AtomPosition::m_species
private

Atomic species.

Definition at line 66 of file Molecule.hh.