CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <ConfigMapping.hh>
A class for mapping an arbitrary crystal structure as a configuration of a crystal template as described by a PrimClex. ConfigMapper manages options for the mapping algorithm and mapping cost function It also caches some information about supercell lattices so that batch imports are more efficient
Definition at line 246 of file ConfigMapping.hh.
Public Types | |
using | HintStatus = ConfigMapperResult::HintStatus |
Public Member Functions | |
ConfigMapper (PrimClex const &_pclex, ConfigMapping::Settings const &_settings, double _tol=-1.) | |
Construct and initialize a ConfigMapper. More... | |
const PrimClex & | primclex () const |
ConfigMapping::Settings const & | settings () const |
void | set_primclex (const PrimClex &_pclex) |
StrucMapper const & | struc_mapper () const |
void | add_allowed_lattices (std::vector< std::string > const &_lattice_names) |
void | clear_allowed_lattices () |
ConfigMapperResult | import_structure (SimpleStructure const &_struc, Configuration const *hint_ptr=nullptr, std::vector< DoFKey > const &_hint_dofs={ "occ"}) const |
imports structure specified by '_struc' into primclex() More... | |
ConfigMapperResult | import_structure (SimpleStructure const &_struc, Index k, Configuration const *hint_ptr=nullptr, std::vector< DoFKey > const &_hint_dofs={ "occ"}) const |
Private Attributes | |
const PrimClex * | m_pclex |
StrucMapper | m_struc_mapper |
Maps the supercell volume to a vector of Lattices with that volume. More... | |
ConfigMapping::Settings | m_settings |
Definition at line 248 of file ConfigMapping.hh.
CASM::ConfigMapper::ConfigMapper | ( | PrimClex const & | _pclex, |
ConfigMapping::Settings const & | _settings, | ||
double | _tol = -1. |
||
) |
Construct and initialize a ConfigMapper.
_pclex | the PrimClex that describes the crystal template |
_strain_weight | free parameter 'w' in the cost function: total_cost = w*lattice_deformation+(1-w)*atomic_deformation can vary between 0 (completely basis-focused) and 1 (completely lattice-focused) |
_max_volume_change | constrains the search space by assuming a limit on allowed volume change only taken into account when non-interstitial vacancies are allowed |
_options | specify a combination of ConfigMapper::Options using bitwise OR: Ex. _options=ConfigMapper::rotate|ConfigMapper::strict Options are: 'rotate': removes rigid rotation of the imported crystal, in a least-squares sense (i.e., yields a symmetric deformation tensor) 'robust': does not assume the imported structure might be ideal ('robust' is much slower for importing ideal structures, but if 'robust' is not set and a non-ideal structure is passed, this will be almost always be detected and robust methods will be used instead. Thus, 'robust' is slightly faster if imported Structures are not ideal) 'strict': prevents transformation into canonical form. Tries to preserve original orientation of imported structure if possible |
_tol | tolerance for mapping comparisons (default is _pclex.crystallography_tol()) |
If a filter string is specified, construct the Supercell query filter for restricting potential supercells for mapping
Definition at line 332 of file ConfigMapping.cc.
void CASM::ConfigMapper::add_allowed_lattices | ( | std::vector< std::string > const & | _lattice_names | ) |
Definition at line 312 of file ConfigMapping.cc.
void CASM::ConfigMapper::clear_allowed_lattices | ( | ) |
Definition at line 326 of file ConfigMapping.cc.
ConfigMapperResult CASM::ConfigMapper::import_structure | ( | SimpleStructure const & | _struc, |
Configuration const * | hint_ptr = nullptr , |
||
std::vector< DoFKey > const & | _hint_dofs = { "occ"} |
||
) | const |
imports structure specified by '_struc' into primclex()
hint_ptr[in] | provides a suggestion for which Configuration _struc should map onto The hint is used to reduce search times, but may be used in the future in combination with Option 'strict' to force mapping onto a particular configuration or be used to provide user reports of the form "Suggested mapping: 0.372; Optimal mapping: 0.002" |
Definition at line 370 of file ConfigMapping.cc.
ConfigMapperResult CASM::ConfigMapper::import_structure | ( | SimpleStructure const & | _struc, |
Index | k, | ||
Configuration const * | hint_ptr = nullptr , |
||
std::vector< DoFKey > const & | _hint_dofs = { "occ"} |
||
) | const |
Definition at line 379 of file ConfigMapping.cc.
|
inline |
Definition at line 291 of file ConfigMapping.hh.
|
inline |
Definition at line 295 of file ConfigMapping.hh.
|
inline |
Definition at line 293 of file ConfigMapping.hh.
|
inline |
Definition at line 297 of file ConfigMapping.hh.
|
private |
Definition at line 337 of file ConfigMapping.hh.
|
private |
Definition at line 341 of file ConfigMapping.hh.
|
private |
Maps the supercell volume to a vector of Lattices with that volume.
Definition at line 339 of file ConfigMapping.hh.