1 #ifndef CASM_ConfigMapping
2 #define CASM_ConfigMapping
17 class SimpleStructure;
18 class SimpleStrucMapCalculator;
21 using xtal::BasicStructure;
23 using xtal::MappingNode;
24 using xtal::SimpleStrucMapCalculator;
25 using xtal::SimpleStructure;
27 using xtal::StrucMapper;
30 class PermuteIterator;
34 class SupercellSymInfo;
36 namespace ConfigMapping {
43 Settings(
double _lattice_weight = 0.5,
bool _ideal =
false,
44 bool _strict =
false,
bool _robust =
false,
45 bool _primitive_only =
false,
bool _fix_volume =
false,
46 bool _fix_lattice =
false,
Index _k_best = 1,
47 std::vector<std::string> _forced_lattices = {},
48 std::string _filter =
"",
double _cost_tol =
CASM::TOL,
49 double _min_va_frac = 0.,
double _max_va_frac = 0.5,
50 double _max_vol_change = 0.3)
138 bool transform_cost_mat =
true);
145 std::pair<ConfigDoF, std::set<std::string> >
to_configdof(
151 std::vector<xtal::SymOp>
const &symgroup = {},
153 SimpleStructure::SpeciesMode::ATOM);
187 std::set<std::string> _dof_managed_properties,
233 std::map<MappingNode, Individual>
maps;
328 std::vector<DoFKey>
const &_hint_dofs = {
332 Configuration
const *hint_ptr =
nullptr,
333 std::vector<DoFKey>
const &_hint_dofs = {
ConfigMapper(PrimClex const &_pclex, ConfigMapping::Settings const &_settings, double _tol=-1.)
Construct and initialize a ConfigMapper.
StrucMapper const & struc_mapper() const
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()
ConfigMapping::Settings m_settings
const PrimClex & primclex() const
void clear_allowed_lattices()
void set_primclex(const PrimClex &_pclex)
ConfigMapping::Settings const & settings() const
StrucMapper m_struc_mapper
Maps the supercell volume to a vector of Lattices with that volume.
void add_allowed_lattices(std::vector< std::string > const &_lattice_names)
PrimClex is the top-level data structure for a CASM project.
PrimStrucMapCalculator(BasicStructure const &_prim, std::vector< xtal::SymOp > const &symgroup={}, SimpleStructure::SpeciesMode _species_mode=SimpleStructure::SpeciesMode::ATOM)
StrucMapCalculatorInterface * _clone() const override
Make an exact copy of the calculator (including any initialized members)
Represents a supercell of the primitive parent crystal structure.
BasicStructure specifies the lattice and atomic basis of a crystal.
Representation of a crystal of molecular and/or atomic occupants, and any additional properties....
StrucMapCalculatorInterface(SimpleStructure _parent, SymOpVector const &_factor_group={SymOp::identity()}, SimpleStructure::SpeciesMode _species_mode=SimpleStructure::SpeciesMode::ATOM, StrucMapping::AllowedSpecies allowed_species={})
double big_inf()
Very large value used to denote invalid or impossible mapping.
MappingNode copy_apply(PermuteIterator const &_it, MappingNode const &_node, bool transform_cost_mat=true)
Reorders the permutation and compounds the spatial isometry (rotation.
std::pair< ConfigDoF, std::set< std::string > > to_configdof(SimpleStructure const &_child_struc, Supercell const &_scel)
Initializes configdof of Supercell '_scel' corresponding to an idealized child structure (encoded by ...
INDEX_TYPE Index
For long integer indexing:
Individual(Configuration _config, SimpleStructure _resolved_struc, std::set< std::string > _dof_managed_properties, HintStatus _hint_status=HintStatus::None, double _hint_cost=xtal::StrucMapping::big_inf())
std::set< std::string > dof_managed_properties
SimpleStructure resolved_struc
Data structure holding results of ConfigMapper algorithm.
std::string fail_msg
Failure message if could not map to prim.
std::map< MappingNode, Individual > maps
The configurations that the input structure mapped onto.
SimpleStructure structure
Index n_optimal(double tol=TOL) const
Struct with optional parameters for Config Mapping Specifies default parameters for all values,...
Settings(double _lattice_weight=0.5, bool _ideal=false, bool _strict=false, bool _robust=false, bool _primitive_only=false, bool _fix_volume=false, bool _fix_lattice=false, Index _k_best=1, std::vector< std::string > _forced_lattices={}, std::string _filter="", double _cost_tol=CASM::TOL, double _min_va_frac=0., double _max_va_frac=0.5, double _max_vol_change=0.3)
double cost_tol
Tolerance used to determine if two mappings have identical cost.
std::vector< std::string > forced_lattices