CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::ConfigMapper Class Reference

#include <ConfigMapping.hh>

Detailed Description

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 PrimClexprimclex () 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 PrimClexm_pclex
 
StrucMapper m_struc_mapper
 Maps the supercell volume to a vector of Lattices with that volume. More...
 
ConfigMapping::Settings m_settings
 

Member Typedef Documentation

◆ HintStatus

Constructor & Destructor Documentation

◆ ConfigMapper()

CASM::ConfigMapper::ConfigMapper ( PrimClex const &  _pclex,
ConfigMapping::Settings const &  _settings,
double  _tol = -1. 
)

Construct and initialize a ConfigMapper.

Parameters
_pclexthe PrimClex that describes the crystal template
_strain_weightfree 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)
Parameters
_max_volume_changeconstrains the search space by assuming a limit on allowed volume change only taken into account when non-interstitial vacancies are allowed
Parameters
_optionsspecify 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
Parameters
_toltolerance 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.

Member Function Documentation

◆ add_allowed_lattices()

void CASM::ConfigMapper::add_allowed_lattices ( std::vector< std::string > const &  _lattice_names)

Definition at line 312 of file ConfigMapping.cc.

◆ clear_allowed_lattices()

void CASM::ConfigMapper::clear_allowed_lattices ( )

Definition at line 326 of file ConfigMapping.cc.

◆ import_structure() [1/2]

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()

Parameters
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.

◆ import_structure() [2/2]

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.

◆ primclex()

const PrimClex& CASM::ConfigMapper::primclex ( ) const
inline

Definition at line 291 of file ConfigMapping.hh.

◆ set_primclex()

void CASM::ConfigMapper::set_primclex ( const PrimClex _pclex)
inline

Definition at line 295 of file ConfigMapping.hh.

◆ settings()

ConfigMapping::Settings const& CASM::ConfigMapper::settings ( ) const
inline

Definition at line 293 of file ConfigMapping.hh.

◆ struc_mapper()

StrucMapper const& CASM::ConfigMapper::struc_mapper ( ) const
inline

Definition at line 297 of file ConfigMapping.hh.

Member Data Documentation

◆ m_pclex

const PrimClex* CASM::ConfigMapper::m_pclex
private

Definition at line 337 of file ConfigMapping.hh.

◆ m_settings

ConfigMapping::Settings CASM::ConfigMapper::m_settings
private

Definition at line 341 of file ConfigMapping.hh.

◆ m_struc_mapper

StrucMapper CASM::ConfigMapper::m_struc_mapper
private

Maps the supercell volume to a vector of Lattices with that volume.

Definition at line 339 of file ConfigMapping.hh.


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