CASM
AClustersApproachtoStatisticalMechanics
|
#include <Molecule.hh>
Definition at line 56 of file Molecule.hh.
Public Types | |
typedef std::array< bool, 3 > | sd_type |
typedef Eigen::Vector3d | vector_type |
typedef vector_type::Index | size_type |
Public Member Functions | |
AtomPosition (const Lattice &init_lattice) | |
AtomPosition (double elem1, double elem2, double elem3, std::string sp_name, const Lattice &init_lattice, COORD_TYPE mode, sd_type _SD_flag=sd_type{{false, false, false}}) | |
bool | operator== (const AtomPosition &RHS) const |
void | print (std::ostream &stream, const Coordinate &trans, int spaces, bool SD_is_on=false) const |
AtomPosition & | apply_sym (const SymOp &op) |
AtomPosition & | apply_sym_no_trans (const SymOp &op) |
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... | |
Coordinate & | operator+= (const Coordinate &RHS) |
Positive translation of this coordinate by RHS.cart() More... | |
Coordinate & | operator-= (const Coordinate &RHS) |
Negative translation of this coordinate by RHS.cart() More... | |
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, double tol) const |
bool | compare (const Coordinate &RHS, double tol=TOL) const |
Returns true if this->min_dist(RHS)<tol. More... | |
bool | compare (const Coordinate &RHS, Coordinate &translation, double tol=TOL) 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 |
Checks to see if coordinate is at a lattice translation with respect to the origin. More... | |
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... | |
void | set_basis_ind (Index _basis_ind) |
Set basis Index. More... | |
Index | basis_ind () const |
Access basis Index. More... | |
const Lattice & | home () 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, int prec=7, int pad=5) const |
void | print (std::ostream &stream, char term=0, int prec=7, int pad=5) const |
void | print_axis (std::ostream &stream, COORD_TYPE mode, char term=0, int prec=7, int pad=5) 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... | |
double | min_dist (const Coordinate &neighbor, Coordinate &translation) const |
Returns distance (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 | robust_min_dist (const Coordinate &neighbor, Coordinate &translation) 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 |
Finds same shift as min_dist but returns shift(CART).transpose()*metric*shift(CART) More... | |
jsonParser & | to_json (jsonParser &json) const |
void | from_json (const jsonParser &json) |
Static Public Member Functions | |
static Coordinate | origin (const Lattice &_home) |
construct a coordinate describing origin of _home lattice More... | |
Public Attributes | |
Specie | specie |
sd_type | SD_flag |
|
inherited |
Definition at line 37 of file Coordinate.hh.
|
inherited |
Definition at line 36 of file Coordinate.hh.
|
inherited |
Definition at line 66 of file Coordinate.cc.
|
inlineinherited |
Access basis Index.
Definition at line 190 of file Coordinate.hh.
|
inlineinherited |
Set Cartesian coordinate vector and update fractional coordinate vector.
Definition at line 593 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 599 of file Coordinate.hh.
|
inlineinherited |
const Access a component of the Cartesian coordinate vector
Definition at line 100 of file Coordinate.hh.
|
inherited |
Returns true if this->min_dist(RHS)<tol.
Definition at line 73 of file Coordinate.cc.
|
inherited |
Returns true if this->min_dist(RHS)<tol if true, calculates
translation | such that *this = (RHS+translation) |
Definition at line 80 of file Coordinate.cc.
|
inherited |
Return true – Exists to allow duck-typing with Site.
Definition at line 86 of file Coordinate.cc.
|
inlineinherited |
user override to force const Access the Cartesian coordinate vector
Definition at line 92 of file Coordinate.hh.
|
inlineinherited |
const Access a component of the Cartesian coordinate vector
Definition at line 105 of file Coordinate.hh.
|
inlineinherited |
user override to force const Access the fractional coordinate vector
Definition at line 66 of file Coordinate.hh.
|
inlineinherited |
user override to force const Access the fractional coordinate vector
Definition at line 79 of file Coordinate.hh.
|
inherited |
distance (in Angstr) of neighbor from *this
Definition at line 146 of file Coordinate.cc.
|
inlineinherited |
Set the fractional coordinate vector.
Definition at line 581 of file Coordinate.hh.
|
inlineinherited |
const Access the fractional coordinate vector
Definition at line 61 of file Coordinate.hh.
|
inlineinherited |
Set a component of the fractional coordinate vector.
Definition at line 587 of file Coordinate.hh.
|
inlineinherited |
const Access a component of the fractional coordinate vector
Definition at line 74 of file Coordinate.hh.
|
inherited |
Definition at line 398 of file Coordinate.cc.
|
inlineinherited |
Access the home lattice of the coordinate.
Definition at line 195 of file Coordinate.hh.
|
inherited |
Checks to see if coordinate is at a lattice translation with respect to the origin.
Definition at line 367 of file Coordinate.cc.
|
inherited |
Checks to see if coordinate is in the unit cell, but does not translate it.
Definition at line 301 of file Coordinate.cc.
|
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 155 of file Coordinate.cc.
|
inherited |
Returns distance (in Angstr) to nearest periodic image of neighbor.
This version calculates the translation such that (neighbor+translation) is the periodic nearest period image of neighbor
Definition at line 169 of file Coordinate.cc.
|
inherited |
Finds same shift as min_dist but returns shift(CART).transpose()*metric*shift(CART)
Definition at line 205 of file Coordinate.cc.
|
inlineinherited |
Definition at line 120 of file Coordinate.hh.
|
inherited |
Positive translation of this coordinate by RHS.cart()
Definition at line 38 of file Coordinate.cc.
|
inherited |
unary minus of this coordinate
Definition at line 53 of file Coordinate.cc.
|
inherited |
Negative translation of this coordinate by RHS.cart()
Definition at line 45 of file Coordinate.cc.
|
inherited |
Definition at line 59 of file Coordinate.cc.
|
inherited |
Definition at line 112 of file Coordinate.cc.
|
inherited |
Definition at line 107 of file Coordinate.cc.
|
inherited |
Print normalized vector.
Definition at line 129 of file Coordinate.cc.
|
inherited |
Definition at line 92 of file Coordinate.cc.
|
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 179 of file Coordinate.cc.
|
inherited |
Returns distance (in Angstr) to nearest periodic image of neighbor.
This version calculates the translation such that (neighbor+translation) is the periodic nearest period 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 190 of file Coordinate.cc.
|
inlineinherited |
Set basis Index.
Definition at line 185 of file Coordinate.hh.
|
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 245 of file Coordinate.cc.
|
inherited |
Definition at line 383 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 317 of file Coordinate.cc.
|
inherited |
Number of periodic images of this coordinate that are on voronoi cell boundary of 'cell'
Definition at line 325 of file Coordinate.cc.
|
inherited |
Map coordinate into the voronoi cell using a lattice translation.
Definition at line 333 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 348 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 261 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 280 of file Coordinate.cc.