CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <StrucMapping.hh>
Data structure holding a potential mapping, which consists of deformation, occupation array, and displacement field
Definition at line 255 of file StrucMapping.hh.
Public Types | |
typedef Eigen::MatrixXd | DisplacementMatrix |
using | Displacement = DisplacementMatrix::ColXpr |
using | ConstDisplacement = DisplacementMatrix::ConstColXpr |
using | MoleculeLabel = std::pair< std::string, Index > |
using | AtomIndexSet = std::set< Index > |
using | MoleculeMap = std::vector< AtomIndexSet > |
Public Member Functions | |
MappingNode (LatticeNode _lattice_node, double _lattice_weight) | |
construct with lattice node and lattice_weight. Cost is initialized assuming zero atomic_node cost More... | |
double | cost_tol () const |
void | set_lattice_weight (double _lw) |
set the lattice_weight. Cost is calculated as cost = lattice_weight*lattice_node.cost + atomic_weight*atomic_node.cost lattice_weight must be on interval (0.,1.]; atomic_weight is 1.-lattice_weight More... | |
std::pair< Index, Index > | vol_pair () const |
Return pair of integer volumes {Vp, Vc}, where Vp is parent supercell volume and Vc is child supercell volume. More... | |
void | calc () |
non-const calc method solves the assignment problem via hungarian_method sets is_viable -> false if no solution More... | |
void | clear () |
Eigen::Matrix3d const & | isometry () const |
convenience method to access MappingNode::lattice_node.isometry More... | |
Eigen::Matrix3d const & | stretch () const |
convenience method to access MappingNode::lattice_node.stretch More... | |
Eigen::Vector3d const & | translation () const |
convenience method to access MappingNode::atomic_node.translation More... | |
bool | time_reversal () const |
convenience method to access MappingNode::atomic_node.time_reveral More... | |
Displacement | disp (Index i) |
non-const access of i'th atomic displacement of mapped structure More... | |
ConstDisplacement | disp (Index i) const |
const access i'th atomic displacement of mapped structure More... | |
bool | operator< (MappingNode const &other) const |
Static Public Member Functions | |
static MappingNode | invalid () |
Static constructor to build an invalid MappingNode, can be used as return value when no valid mapping exists. More... | |
Public Attributes | |
LatticeNode | lattice_node |
AssignmentNode | atomic_node |
double | lattice_weight |
double | atomic_weight |
bool | is_viable |
true if assignment problem is not yet known to be insoluable – default true More... | |
bool | is_valid |
true if assignment has been checked for physical validity and passes – default false More... | |
bool | is_partitioned |
true if node has been partitioned into sub-nodes for generalized k-best assignment problem – default false More... | |
double | cost |
total, finalized cost, populated by a StrucMapCalculator. Not guaranteed to be a linear function of lattice_node.cost and atomic_node.cost More... | |
Eigen::MatrixXd | atom_displacement |
3xN matrix of displacements for all sites in parent supercell (Va are included, but set to Zero) More... | |
std::vector< Index > | atom_permutation |
MoleculeMap | mol_map |
std::vector< MoleculeLabel > | mol_labels |
list of assigned molecule names More... | |
Definition at line 267 of file StrucMapping.hh.
using CASM::xtal::MappingNode::ConstDisplacement = DisplacementMatrix::ConstColXpr |
Definition at line 262 of file StrucMapping.hh.
using CASM::xtal::MappingNode::Displacement = DisplacementMatrix::ColXpr |
Definition at line 261 of file StrucMapping.hh.
typedef Eigen::MatrixXd CASM::xtal::MappingNode::DisplacementMatrix |
Definition at line 258 of file StrucMapping.hh.
using CASM::xtal::MappingNode::MoleculeLabel = std::pair<std::string, Index> |
Definition at line 265 of file StrucMapping.hh.
using CASM::xtal::MappingNode::MoleculeMap = std::vector<AtomIndexSet> |
Definition at line 269 of file StrucMapping.hh.
|
inline |
construct with lattice node and lattice_weight. Cost is initialized assuming zero atomic_node cost
Definition at line 318 of file StrucMapping.hh.
void CASM::xtal::MappingNode::calc | ( | ) |
non-const calc method solves the assignment problem via hungarian_method sets is_viable -> false if no solution
Definition at line 353 of file StrucMapping.cc.
|
inline |
Definition at line 349 of file StrucMapping.hh.
|
inline |
Definition at line 327 of file StrucMapping.hh.
|
inline |
non-const access of i'th atomic displacement of mapped structure
Definition at line 366 of file StrucMapping.hh.
|
inline |
const access i'th atomic displacement of mapped structure
Definition at line 369 of file StrucMapping.hh.
|
static |
Static constructor to build an invalid MappingNode, can be used as return value when no valid mapping exists.
Definition at line 341 of file StrucMapping.cc.
|
inline |
convenience method to access MappingNode::lattice_node.isometry
Definition at line 354 of file StrucMapping.hh.
bool CASM::xtal::MappingNode::operator< | ( | MappingNode const & | other | ) | const |
Compares cost, lattice_node, atomic_node, and permutation if costs are tied, compares lattice_node.cost if tied, uninitialized atomic_node comes before initialized atomic_node if tied, compares lattice_node, using defined comparator if tied, compares atomic_node, using defined comparator if tied, does lexicographic comparison of permutation This order is essential for proper behavior of mapping algorithm
Definition at line 372 of file StrucMapping.cc.
|
inline |
set the lattice_weight. Cost is calculated as cost = lattice_weight*lattice_node.cost + atomic_weight*atomic_node.cost lattice_weight must be on interval (0.,1.]; atomic_weight is 1.-lattice_weight
Definition at line 333 of file StrucMapping.hh.
|
inline |
convenience method to access MappingNode::lattice_node.stretch
Definition at line 357 of file StrucMapping.hh.
|
inline |
convenience method to access MappingNode::atomic_node.time_reveral
Definition at line 363 of file StrucMapping.hh.
|
inline |
convenience method to access MappingNode::atomic_node.translation
Definition at line 360 of file StrucMapping.hh.
Return pair of integer volumes {Vp, Vc}, where Vp is parent supercell volume and Vc is child supercell volume.
Definition at line 340 of file StrucMapping.hh.
Eigen::MatrixXd CASM::xtal::MappingNode::atom_displacement |
3xN matrix of displacements for all sites in parent supercell (Va are included, but set to Zero)
Definition at line 295 of file StrucMapping.hh.
std::vector<Index> CASM::xtal::MappingNode::atom_permutation |
permutation lists indices of sites in input structure, as-read, so that they constitute particular mapping onto parent structure. If we define index j = atom_permutation[i], this indicates that atom 'j' of the child superstructure maps onto site 'i' of parent superstructure If parent has N sites and child has M<N atoms, vacancies are designated by values j>=M
Definition at line 303 of file StrucMapping.hh.
AssignmentNode CASM::xtal::MappingNode::atomic_node |
Definition at line 272 of file StrucMapping.hh.
double CASM::xtal::MappingNode::atomic_weight |
Definition at line 274 of file StrucMapping.hh.
double CASM::xtal::MappingNode::cost |
total, finalized cost, populated by a StrucMapCalculator. Not guaranteed to be a linear function of lattice_node.cost and atomic_node.cost
Definition at line 291 of file StrucMapping.hh.
|
mutable |
true if node has been partitioned into sub-nodes for generalized k-best assignment problem – default false
Definition at line 286 of file StrucMapping.hh.
|
mutable |
true if assignment has been checked for physical validity and passes – default false
Definition at line 282 of file StrucMapping.hh.
bool CASM::xtal::MappingNode::is_viable |
true if assignment problem is not yet known to be insoluable – default true
Definition at line 278 of file StrucMapping.hh.
LatticeNode CASM::xtal::MappingNode::lattice_node |
Definition at line 271 of file StrucMapping.hh.
double CASM::xtal::MappingNode::lattice_weight |
Definition at line 273 of file StrucMapping.hh.
std::vector<MoleculeLabel> CASM::xtal::MappingNode::mol_labels |
list of assigned molecule names
Definition at line 310 of file StrucMapping.hh.
MoleculeMap CASM::xtal::MappingNode::mol_map |
mol_map[j] lists atom indices of parent superstructure that comprise the molecule at its j'th molecular site
Definition at line 307 of file StrucMapping.hh.