|
CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <Site.hh>
Inheritance diagram for CASM::xtal::Site:Public Types | |
| typedef Eigen::Vector3d | vector_type |
| typedef vector_type::Index | size_type |
Public Member Functions | |
| Site (const Lattice &init_home) | |
| Site (const Coordinate &init_pos, const std::string &occ_name) | |
| Site (const Coordinate &init_pos, const std::vector< Molecule > &site_occ) | |
| Construct site with initial position, allowed molecules (occupants) More... | |
| Site (const Coordinate &init_pos, const std::vector< Molecule > &site_occ, const std::map< std::string, SiteDoFSet > &site_dof) | |
| Construct site with initial position, allowed molecules (occupants), and local degrees of freedom. More... | |
| Site (const Coordinate &init_pos, const std::vector< Molecule > &site_occ, const std::vector< SiteDoFSet > &site_dof) | |
| Construct site with initial position, allowed molecules (occupants), and local degrees of freedom. More... | |
| ~Site () | |
| const std::vector< Molecule > & | occupant_dof () const |
| SiteDoFSet const & | dof (std::string const &_dof_type) const |
| Index | dof_size () const |
| bool | has_dof (std::string const &_dof_type) const |
| std::vector< std::string > | dof_types () const |
| bool | time_reversal_active () const |
| Index | label () const |
| access m_label; More... | |
| bool | compare (const Coordinate &test_coord) const |
| bool | compare (const Site &test_site) const |
| bool | compare_type (const Site &test_site) const |
| bool | operator== (const Site &test_site) const |
| bool | almost_equal (const Site &test_site) const |
| bool | contains (const std::string &name) const |
| bool | contains (const std::string &name, int &index) const |
| void | set_allowed_occupants (const std::vector< Molecule > &new_occ_domain) |
| void | set_dofs (std::map< std::string, SiteDoFSet > _dofs) |
| std::map< std::string, SiteDoFSet > const & | dofs () const |
| std::vector< std::string > | allowed_occupants () const |
| void | set_label (Index _new_label) |
| void | read (std::istream &stream, bool SD_is_on=false) |
| void | read (std::istream &stream, std::string &elem, bool SD_is_on) |
| void | print (std::ostream &stream, Eigen::IOFormat format=Eigen::IOFormat(7, 12)) const |
| Site & | operator+= (const Coordinate &translation) |
| Site & | operator-= (const Coordinate &translation) |
| Coordinate_impl::FracCoordinate | frac () |
| Set the fractional coordinate vector. More... | |
| const vector_type & | frac () const |
| const Access the fractional coordinate vector More... | |
| Coordinate_impl::FracCoordinateComponent | frac (size_type index) |
| Set a component of the fractional coordinate vector. More... | |
| const double & | frac (size_type index) const |
| const Access a component of the fractional coordinate vector More... | |
| const vector_type & | const_frac () const |
| user override to force const Access the fractional coordinate vector More... | |
| const double & | const_frac (size_type index) const |
| user override to force const Access the fractional coordinate vector More... | |
| Coordinate_impl::CartCoordinate | cart () |
| Set Cartesian coordinate vector and update fractional coordinate vector. More... | |
| const vector_type & | cart () const |
| const Access the Cartesian coordinate vector More... | |
| Coordinate_impl::CartCoordinateComponent | cart (size_type index) |
| Set a component of the Cartesian coordinate vector. More... | |
| const double & | cart (size_type index) const |
| const Access a component of the Cartesian coordinate vector More... | |
| const vector_type & | const_cart () const |
| user override to force const Access the Cartesian coordinate vector More... | |
| const double & | const_cart (size_type index) const |
| const Access a component of the Cartesian coordinate vector More... | |
| vector_type | as_vec (COORD_TYPE _mode) const |
| Coordinate | operator- () const |
| unary minus of this coordinate More... | |
| bool | operator== (const Coordinate &RHS) const |
| bool | operator!= (const Coordinate &RHS) const |
| bool | almost_equal (const Coordinate &RHS) const |
| bool | compare (const Coordinate &RHS, Coordinate &translation) const |
| bool | compare_type (const Coordinate &RHS) const |
| Return true – Exists to allow duck-typing with Site. More... | |
| bool | within () |
| bool | within (Coordinate &translation) |
| bool | is_within () const |
| Checks to see if coordinate is in the unit cell, but does not translate it. More... | |
| int | voronoi_number () const |
| int | voronoi_number (const Lattice &cell) const |
| bool | voronoi_within () |
| Map coordinate into the voronoi cell using a lattice translation. More... | |
| bool | voronoi_within (Coordinate &translation) |
| bool | is_lattice_shift (double tol=TOL) const |
| void | set_lattice (const Lattice &new_lat, COORD_TYPE mode) |
| Change the home lattice of the coordinate, selecting one representation (either CART or FRAC) that remains invariant. More... | |
| const Lattice & | home () const |
| Access the home lattice of the coordinate. More... | |
| const Lattice & | lattice () const |
| Access the home lattice of the coordinate. More... | |
| void | read (std::istream &stream, COORD_TYPE mode) |
| void | print (std::ostream &stream, COORD_TYPE mode, char term=0, Eigen::IOFormat format=Eigen::IOFormat(7, 12)) const |
| void | print (std::ostream &stream, char term=0, Eigen::IOFormat format=Eigen::IOFormat(7, 12)) const |
| void | print_axis (std::ostream &stream, COORD_TYPE mode, char term=0, Eigen::IOFormat format=Eigen::IOFormat(7, 12)) const |
| Print normalized vector. More... | |
| double | dist (const Coordinate &neighbor) const |
| distance (in Angstr) of neighbor from *this More... | |
| double | min_dist (const Coordinate &neighbor) const |
| Returns distance (in Angstr) to nearest periodic image of neighbor. More... | |
| Coordinate | min_translation (const Coordinate &neighbor) const |
| Returns translation coordinate (in Angstr) to nearest periodic image of neighbor. More... | |
| double | robust_min_dist (const Coordinate &neighbor) const |
| Returns distance (in Angstr) to nearest periodic image of neighbor. More... | |
| double | min_dist2 (const Coordinate &neighbor, const Eigen::Ref< const Eigen::Matrix3d > &metric) const |
Static Public Member Functions | |
| static void | print_occupant_dof (const std::vector< Molecule > &allowed_occupants, std::ostream &out_stream) |
| static Coordinate | origin (const Lattice &_home) |
| construct a coordinate describing origin of _home lattice More... | |
Private Member Functions | |
| bool | _compare_type_no_ID (const Site &test_site) const |
| Index | _type_ID () const |
| void | _update_cart () |
| void | _update_frac () |
| void | _set_frac (const Eigen::Ref< const vector_type > &f) |
| void | _set_frac (size_type ind, double val) |
| void | _set_cart (const Eigen::Ref< const vector_type > &c) |
| void | _set_cart (size_type ind, double val) |
Static Private Member Functions | |
| static std::vector< Site > & | _type_prototypes () |
Private Attributes | |
| Index | m_label |
| Integer label used to differentiate sites of otherwise identical type. More... | |
| Index | m_type_ID |
| std::vector< Molecule > | m_occupant_dof |
| std::map< std::string, SiteDoFSet > | m_dof_map |
| additional continuous degrees of freedom More... | |
| Lattice const * | m_home |
| vector_type | m_frac_coord |
| vector_type | m_cart_coord |
|
inherited |
Definition at line 37 of file Coordinate.hh.
|
inherited |
Definition at line 36 of file Coordinate.hh.
| CASM::xtal::Site::Site | ( | const Coordinate & | init_pos, |
| const std::string & | occ_name | ||
| ) |
| CASM::xtal::Site::Site | ( | const Coordinate & | init_pos, |
| const std::vector< Molecule > & | site_occ | ||
| ) |
| CASM::xtal::Site::Site | ( | const Coordinate & | init_pos, |
| const std::vector< Molecule > & | site_occ, | ||
| const std::map< std::string, SiteDoFSet > & | site_dof | ||
| ) |
| CASM::xtal::Site::Site | ( | const Coordinate & | init_pos, |
| const std::vector< Molecule > & | site_occ, | ||
| const std::vector< SiteDoFSet > & | site_dof | ||
| ) |
|
private |
|
inlineprivateinherited |
Definition at line 264 of file Coordinate.hh.
|
inlineprivateinherited |
Definition at line 269 of file Coordinate.hh.
|
inlineprivateinherited |
Definition at line 254 of file Coordinate.hh.
|
inlineprivateinherited |
Definition at line 259 of file Coordinate.hh.
|
inlinestaticprivate |
|
inlineprivateinherited |
Definition at line 247 of file Coordinate.hh.
|
inlineprivateinherited |
Definition at line 249 of file Coordinate.hh.
| std::vector< std::string > CASM::xtal::Site::allowed_occupants | ( | ) | const |
|
inherited |
Definition at line 66 of file Coordinate.cc.
| bool CASM::xtal::Site::almost_equal | ( | const Site & | test_site | ) | const |
|
inlineinherited |
Definition at line 103 of file Coordinate.hh.
|
inlineinherited |
Set Cartesian coordinate vector and update fractional coordinate vector.
Definition at line 562 of file Coordinate.hh.
|
inlineinherited |
const Access the Cartesian coordinate vector
Definition at line 87 of file Coordinate.hh.
|
inlineinherited |
Set a component of the Cartesian coordinate vector.
Definition at line 567 of file Coordinate.hh.
|
inlineinherited |
const Access a component of the Cartesian coordinate vector
Definition at line 96 of file Coordinate.hh.
|
inherited |
Returns true if this->min_dist(RHS)<this->lattice().tol() if true, calculates
| translation | such that *this = (RHS+translation) |
Definition at line 78 of file Coordinate.cc.
| bool CASM::xtal::Site::compare | ( | const Coordinate & | test_coord | ) | const |
| bool CASM::xtal::Site::compare | ( | const Site & | test_site | ) | const |
|
inherited |
Return true – Exists to allow duck-typing with Site.
Definition at line 84 of file Coordinate.cc.
| bool CASM::xtal::Site::compare_type | ( | const Site & | test_site | ) | const |
|
inlineinherited |
user override to force const Access the Cartesian coordinate vector
Definition at line 90 of file Coordinate.hh.
|
inlineinherited |
const Access a component of the Cartesian coordinate vector
Definition at line 99 of file Coordinate.hh.
|
inlineinherited |
user override to force const Access the fractional coordinate vector
Definition at line 68 of file Coordinate.hh.
|
inlineinherited |
user override to force const Access the fractional coordinate vector
Definition at line 78 of file Coordinate.hh.
| bool CASM::xtal::Site::contains | ( | const std::string & | name | ) | const |
| bool CASM::xtal::Site::contains | ( | const std::string & | name, |
| int & | index | ||
| ) | const |
|
inherited |
distance (in Angstr) of neighbor from *this
Definition at line 148 of file Coordinate.cc.
| SiteDoFSet const & CASM::xtal::Site::dof | ( | std::string const & | _dof_type | ) | const |
| std::vector< std::string > CASM::xtal::Site::dof_types | ( | ) | const |
|
inline |
|
inlineinherited |
Set the fractional coordinate vector.
Definition at line 550 of file Coordinate.hh.
|
inlineinherited |
const Access the fractional coordinate vector
Definition at line 64 of file Coordinate.hh.
|
inlineinherited |
Set a component of the fractional coordinate vector.
Definition at line 555 of file Coordinate.hh.
|
inlineinherited |
const Access a component of the fractional coordinate vector
Definition at line 74 of file Coordinate.hh.
| bool CASM::xtal::Site::has_dof | ( | std::string const & | _dof_type | ) | const |
|
inlineinherited |
Access the home lattice of the coordinate.
Definition at line 200 of file Coordinate.hh.
|
inherited |
Checks to see if coordinate is at a lattice translation with respect to the origin
Definition at line 311 of file Coordinate.cc.
|
inherited |
Checks to see if coordinate is in the unit cell, but does not translate it.
Definition at line 244 of file Coordinate.cc.
|
inlineinherited |
Access the home lattice of the coordinate.
Definition at line 206 of file Coordinate.hh.
|
inherited |
Returns distance (in Angstr) to nearest periodic image of neighbor.
Is unsafe if min_dist is comparable to half a lattice vector in length
Definition at line 152 of file Coordinate.cc.
|
inherited |
Finds same shift as min_dist but returns shift(CART).transpose()*metric*shift(CART)
Definition at line 178 of file Coordinate.cc.
|
inherited |
Returns translation coordinate (in Angstr) to nearest periodic image of neighbor.
This version calculates the translation such that (neighbor+translation) is the nearest periodic image of neighbor
Definition at line 156 of file Coordinate.cc.
| const std::vector< Molecule > & CASM::xtal::Site::occupant_dof | ( | ) | const |
|
inlineinherited |
Definition at line 125 of file Coordinate.hh.
| Site & CASM::xtal::Site::operator+= | ( | const Coordinate & | translation | ) |
|
inherited |
unary minus of this coordinate
Definition at line 54 of file Coordinate.cc.
| Site & CASM::xtal::Site::operator-= | ( | const Coordinate & | translation | ) |
|
inherited |
Definition at line 60 of file Coordinate.cc.
| bool CASM::xtal::Site::operator== | ( | const Site & | test_site | ) | const |
|
inherited |
Definition at line 102 of file Coordinate.cc.
|
inherited |
Definition at line 121 of file Coordinate.cc.
| void CASM::xtal::Site::print | ( | std::ostream & | stream, |
| Eigen::IOFormat | format = Eigen::IOFormat(7, 12) |
||
| ) | const |
|
inherited |
Print normalized vector.
Definition at line 135 of file Coordinate.cc.
|
static |
| void CASM::xtal::Site::read | ( | std::istream & | stream, |
| bool | SD_is_on = false |
||
| ) |
|
inherited |
Definition at line 88 of file Coordinate.cc.
| void CASM::xtal::Site::read | ( | std::istream & | stream, |
| std::string & | elem, | ||
| bool | SD_is_on | ||
| ) |
|
inherited |
Returns distance (in Angstr) to nearest periodic image of neighbor.
It is safe in all cases, because it uses the lattice Wigner-Seitz cell to determine the nearest image, but this makes it slower than min_dist
Definition at line 168 of file Coordinate.cc.
| void CASM::xtal::Site::set_allowed_occupants | ( | const std::vector< Molecule > & | new_occ_domain | ) |
| void CASM::xtal::Site::set_dofs | ( | std::map< std::string, SiteDoFSet > | _dofs | ) |
| void CASM::xtal::Site::set_label | ( | Index | _new_label | ) |
|
inherited |
Change the home lattice of the coordinate, selecting one representation (either CART or FRAC) that remains invariant.
| invariant_mode | invariant_mode == CART: Cartesian coordinates stay the same, and fractional coordinates are updated Ex: (my_coord.set_lattice(superlattice, CART); // this is how superlattices get filled. invariant_mode == FRAC: Fractional coordinates stay the same, and Cartesian coordinates are updated Ex: you can apply a strain by changing the lattice and keepin FRAC invariant (my_coord.set_lattice(strained_lattice, FRAC); Ex: you can apply a rotation by changing the lattice and keeping FRAC invariant (my_coord.set_lattice(rotated_lattice, FRAC); |
Definition at line 190 of file Coordinate.cc.
|
inherited |
Number of periodic images of this coordinate that are on voronoi cell boundary of its home lattice
Definition at line 259 of file Coordinate.cc.
|
inherited |
Number of periodic images of this coordinate that are on voronoi cell boundary of 'cell'
Definition at line 265 of file Coordinate.cc.
|
inherited |
Map coordinate into the voronoi cell using a lattice translation.
Definition at line 274 of file Coordinate.cc.
|
inherited |
Same as voronoi_within(), but lattice translation is stored in Coordinate translation such that coord_after = coord_before + translation returns true if *this was already within the voronoi cell
Definition at line 290 of file Coordinate.cc.
|
inherited |
Map coordinate into the unit cell using a lattice translation returns true if *this was already within the unit cell
Definition at line 205 of file Coordinate.cc.
|
inherited |
Same as within(), but lattice translation is stored in Coordinate translation, such that coord_after = coord_before + translation returns true if *this was already within the unit cell
Definition at line 223 of file Coordinate.cc.
|
privateinherited |
Definition at line 281 of file Coordinate.hh.
|
private |
|
privateinherited |
Definition at line 281 of file Coordinate.hh.
|
privateinherited |
Definition at line 279 of file Coordinate.hh.
|
private |
|
private |