1 #ifndef SIMPLESTRUCTURE_HH
2 #define SIMPLESTRUCTURE_HH
9 #include "casm/external/Eigen/Dense"
19 namespace SimpleStructureTools {
47 using Coord = Eigen::MatrixXd::ColXpr;
76 names.resize(N,
"Va");
78 for (
auto &el :
properties) el.second.setZero(Eigen::NoChange, N);
104 void deform_coords(Eigen::Ref<const Eigen::Matrix3d>
const &_F);
108 void rotate_coords(Eigen::Ref<const Eigen::Matrix3d>
const &_R);
Representation of a crystal of molecular and/or atomic occupants, and any additional properties....
void deform_coords(Eigen::Ref< const Eigen::Matrix3d > const &_F)
Apply homogeneous deformation gradient tensor _F to lat_column_mat, mol_info, and atom_info.
Info const & info(SpeciesMode _mode) const
Const info of specified context (atomic/molecular)
std::map< std::string, Eigen::MatrixXd > properties
void within(double tol=TOL)
Map all coordinates within the unit cell.
void rotate_coords(Eigen::Ref< const Eigen::Matrix3d > const &_R)
Apply homogeneous rotation matrix _R to lat_column_mat, mol_info, and atom_info.
Info & info(SpeciesMode _mode)
Info of specified context (atomic/molecular)
Eigen::Matrix3d lat_column_mat
INDEX_TYPE Index
For long integer indexing:
Struct to encode all information about the crystal basis Info may describe the basis in a atomic cont...
Eigen::MatrixXd coords
(3 x names.size()) matrix of coordinates. coords.col(i) is Cartesian coordinate of site 'i'
Eigen::MatrixXd::ColXpr Coord
ConstCoord cart_coord(Index i) const
const access for coordinate of site 'i'
std::vector< std::string > names
names[i] is name of species that occupies sites 'i'
Coord cart_coord(Index i)
Access coordinate of site 'i'.
Index size() const
Number of sites is defined as names.size()
std::map< std::string, Eigen::MatrixXd > properties
map of [property name, (m x names.size()) matrix] for all numerical site properties properties are as...
std::vector< Index > sort_by_name()
permutation that results in sites sorted alphabetically by species Guaranteed stable: will not change...
void resize(Index N)
Resize to hold N sites. All coordinates set to zero, all occupants set to "Va".
Eigen::MatrixXd::ConstColXpr ConstCoord