CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <Molecule.hh>
Class representing a Molecule.
Definition at line 93 of file Molecule.hh.
Public Member Functions | |
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 | size () const |
Number of atoms contained Molecule. More... | |
std::string const & | name () const |
Designated name of Molecule (may be unrelated to constituent species) More... | |
std::vector< AtomPosition > const & | atoms () const |
Const access of all contained AtomPositions. More... | |
AtomPosition const & | atom (Index i) const |
returns i'th atom position More... | |
bool | is_atomic () const |
True if Molecule is atom with no other attributes. More... | |
bool | is_vacancy () const |
True if Molecule represents vacancy. More... | |
bool | time_reversal_active () const |
True if Molecule contains attributes that are affected by time reversal. More... | |
std::map< std::string, SpeciesAttribute > const & | attributes () const |
Returns dictionary of all constituent attributes of the Molecule Does not include attributes associated with individual atoms. More... | |
void | set_attributes (std::map< std::string, SpeciesAttribute > _attr) |
Set all constitutent attributes of Molecule overwrites any existing attributes. More... | |
void | set_atoms (std::vector< AtomPosition > _atoms) |
set all constituent atoms of Molecule overwrites any existing atoms More... | |
bool | 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 | contains (std::string const &atom_name) const |
Returns true of molecule contains atom of specified name. More... | |
bool | is_divisible () const |
bool | is_indivisible () const |
Static Public Member Functions | |
static Molecule | make_atom (std::string const &atom_name) |
Return an atomic Molecule with specified name. More... | |
static Molecule | make_unknown () |
Return an atomic Molecule with specified name. More... | |
static Molecule | make_vacancy () |
Return a vacancy Molecule. More... | |
Private Attributes | |
std::string | m_name |
std::vector< AtomPosition > | m_atoms |
bool | m_divisible |
std::map< std::string, SpeciesAttribute > | m_attribute_map |