CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::xtal::Molecule Class Reference

#include <Molecule.hh>

Detailed Description

Class representing a Molecule.

  • A Molecule is a vector of AtomPosition, with a name
  • Vacancies are represented as a single atom Molecule, with molecule name == atom name == "Va"
  • "make_atom" makes a Molecule with a single atom, with molecule name same as atom name
  • "make_vacancy" makes a Molecule with a single atom, with molecule name == atom name == "Va"

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< AtomPositionm_atoms
 
bool m_divisible
 
std::map< std::string, SpeciesAttributem_attribute_map
 

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