CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::xtal::MappingNode Struct Reference

#include <StrucMapping.hh>

Detailed Description

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, Indexvol_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< Indexatom_permutation
 
MoleculeMap mol_map
 
std::vector< MoleculeLabelmol_labels
 list of assigned molecule names More...
 

Member Typedef Documentation

◆ AtomIndexSet

◆ ConstDisplacement

using CASM::xtal::MappingNode::ConstDisplacement = DisplacementMatrix::ConstColXpr

Definition at line 262 of file StrucMapping.hh.

◆ Displacement

using CASM::xtal::MappingNode::Displacement = DisplacementMatrix::ColXpr

Definition at line 261 of file StrucMapping.hh.

◆ DisplacementMatrix

Definition at line 258 of file StrucMapping.hh.

◆ MoleculeLabel

using CASM::xtal::MappingNode::MoleculeLabel = std::pair<std::string, Index>

Definition at line 265 of file StrucMapping.hh.

◆ MoleculeMap

Definition at line 269 of file StrucMapping.hh.

Constructor & Destructor Documentation

◆ MappingNode()

CASM::xtal::MappingNode::MappingNode ( LatticeNode  _lattice_node,
double  _lattice_weight 
)
inline

construct with lattice node and lattice_weight. Cost is initialized assuming zero atomic_node cost

Definition at line 318 of file StrucMapping.hh.

Member Function Documentation

◆ calc()

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.

◆ clear()

void CASM::xtal::MappingNode::clear ( )
inline

Definition at line 349 of file StrucMapping.hh.

◆ cost_tol()

double CASM::xtal::MappingNode::cost_tol ( ) const
inline

Definition at line 327 of file StrucMapping.hh.

◆ disp() [1/2]

Displacement CASM::xtal::MappingNode::disp ( Index  i)
inline

non-const access of i'th atomic displacement of mapped structure

Definition at line 366 of file StrucMapping.hh.

◆ disp() [2/2]

ConstDisplacement CASM::xtal::MappingNode::disp ( Index  i) const
inline

const access i'th atomic displacement of mapped structure

Definition at line 369 of file StrucMapping.hh.

◆ invalid()

MappingNode CASM::xtal::MappingNode::invalid ( )
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.

◆ isometry()

Eigen::Matrix3d const& CASM::xtal::MappingNode::isometry ( ) const
inline

convenience method to access MappingNode::lattice_node.isometry

Definition at line 354 of file StrucMapping.hh.

◆ operator<()

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.

◆ set_lattice_weight()

void CASM::xtal::MappingNode::set_lattice_weight ( double  _lw)
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.

◆ stretch()

Eigen::Matrix3d const& CASM::xtal::MappingNode::stretch ( ) const
inline

convenience method to access MappingNode::lattice_node.stretch

Definition at line 357 of file StrucMapping.hh.

◆ time_reversal()

bool CASM::xtal::MappingNode::time_reversal ( ) const
inline

convenience method to access MappingNode::atomic_node.time_reveral

Definition at line 363 of file StrucMapping.hh.

◆ translation()

Eigen::Vector3d const& CASM::xtal::MappingNode::translation ( ) const
inline

convenience method to access MappingNode::atomic_node.translation

Definition at line 360 of file StrucMapping.hh.

◆ vol_pair()

std::pair<Index, Index> CASM::xtal::MappingNode::vol_pair ( ) const
inline

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.

Member Data Documentation

◆ atom_displacement

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.

◆ atom_permutation

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.

◆ atomic_node

AssignmentNode CASM::xtal::MappingNode::atomic_node

Definition at line 272 of file StrucMapping.hh.

◆ atomic_weight

double CASM::xtal::MappingNode::atomic_weight

Definition at line 274 of file StrucMapping.hh.

◆ cost

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.

◆ is_partitioned

bool CASM::xtal::MappingNode::is_partitioned
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.

◆ is_valid

bool CASM::xtal::MappingNode::is_valid
mutable

true if assignment has been checked for physical validity and passes – default false

Definition at line 282 of file StrucMapping.hh.

◆ is_viable

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.

◆ lattice_node

LatticeNode CASM::xtal::MappingNode::lattice_node

Definition at line 271 of file StrucMapping.hh.

◆ lattice_weight

double CASM::xtal::MappingNode::lattice_weight

Definition at line 273 of file StrucMapping.hh.

◆ mol_labels

std::vector<MoleculeLabel> CASM::xtal::MappingNode::mol_labels

list of assigned molecule names

Definition at line 310 of file StrucMapping.hh.

◆ mol_map

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.


The documentation for this struct was generated from the following files: