31 std::string
const &_species)
36 std::string
const &_species)
47 if (_attr.second.traits().time_reversal_active())
return true;
52 std::map<std::string, SpeciesAttribute>
const &
attributes()
const {
106 Molecule(std::string
const &_name, std::vector<AtomPosition> _atoms = {},
107 bool _divisible =
false)
134 for (
auto const &_atom :
atoms()) {
135 if (_atom.time_reversal_active())
return true;
138 if (_attr.second.traits().time_reversal_active())
return true;
145 std::map<std::string, SpeciesAttribute>
const &
attributes()
const {
167 bool contains(std::string
const &atom_name)
const;
202 xtal::AtomPosition &
apply(
const xtal::SymOp &op,
203 xtal::AtomPosition &mutating_atom_pos);
204 xtal::AtomPosition
copy_apply(
const xtal::SymOp &op,
205 xtal::AtomPosition atom_pos);
207 template <
typename ExternSymOp>
217 template <
typename ExternSymOp>
An atomic species associated with a position in space.
Class representing a Molecule.
void set_attributes(std::map< std::string, SpeciesAttribute > _attr)
Set all constitutent attributes of Molecule overwrites any existing attributes.
bool is_indivisible() const
bool identical(Molecule const &RHS, double _tol) const
Check equality of two molecules, within specified tolerance. Compares atoms, irrespective of order,...
AtomPosition(Eigen::Ref< const Eigen::Vector3d > const &_pos, std::string const &_species)
Construct with vector position and atom name.
std::vector< AtomPosition > const & atoms() const
Const access of all contained AtomPositions.
bool compare_type(AtomPosition const &A, AtomPosition const &B, double tol)
static Molecule make_atom(std::string const &atom_name)
Return an atomic Molecule with specified name.
std::vector< AtomPosition > m_atoms
std::map< std::string, SpeciesAttribute > m_attribute_map
bool is_molecule_name(const Molecule &mol, std::string name)
Return true if Molecule name matches 'name', including Va checks.
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.
Eigen::Vector3d const & cart() const
Const access of Cartesian position of atom.
bool is_vacancy(const std::string &name)
A vacancy is any Specie/Molecule with (name == "VA" || name == "va" || name == "Va")
AtomPosition(double _pos1, double _pos2, double _pos3, std::string const &_species)
Construct with x,y,z position coordinates and atom name.
bool is_vacancy() const
True if Molecule represents vacancy.
static Molecule make_unknown()
Return an atomic Molecule with specified name.
void set_atoms(std::vector< AtomPosition > _atoms)
set all constituent atoms of Molecule overwrites any existing atoms
bool time_reversal_active() const
True if Molecule contains attributes that are affected by time reversal.
bool time_reversal_active() const
Eigen::Vector3d m_position
Cartesian position; origin is centered at site.
void set_attributes(std::map< std::string, SpeciesAttribute > _attr)
bool is_atomic() const
True if Molecule is atom with no other attributes.
AtomPosition const & atom(Index i) const
returns i'th atom position
std::string const & name() const
Designated name of Molecule (may be unrelated to constituent species)
static Molecule make_vacancy()
Return a vacancy Molecule.
bool identical(AtomPosition const &RHS, double _tol) const
Comparison with tolerance (max allowed distance between LHS and RHS, in Angstr.)
bool operator==(Molecule const &A, Molecule const &B)
Index size() const
Number of atoms contained Molecule.
bool contains(std::string const &atom_name) const
Returns true of molecule contains atom of specified name.
bool is_divisible() const
std::string const & name() const
Const access of species name.
std::map< std::string, SpeciesAttribute > const & attributes() const
std::string m_species
Atomic species.
std::map< std::string, SpeciesAttribute > m_attribute_map
std::map< std::string, SpeciesAttribute > const & attributes() const
Returns dictionary of all constituent attributes of the Molecule Does not include attributes associat...
xtal::Coordinate copy_apply(const xtal::SymOp &op, xtal::Coordinate coord)
Copy and apply SymOp to a Coordinate.
xtal::Coordinate & apply(const xtal::SymOp &op, xtal::Coordinate &coord)
apply SymOp to a Coordinate
GenericDatumFormatter< std::string, DataObject > name()
INDEX_TYPE Index
For long integer indexing: