1 #ifndef CONFIGMAPPING_HH
2 #define CONFIGMAPPING_HH
64 double _lattice_weight,
65 double _max_volume_change = 0.5,
117 std::string &imported_name,
119 std::vector<Index> &best_assignment,
126 std::string &imported_name,
128 std::vector<Index> &best_assignment,
130 bool update_struc =
false)
const;
144 std::string &imported_name,
146 std::vector<Index> &best_assignment,
148 bool update_struc =
false)
const;
181 std::string &imported_name,
183 std::vector<Index> &best_assignment,
189 std::string &imported_name,
191 std::vector<Index> &best_assignment,
213 std::vector<Index> &best_assignment,
215 double best_cost = 1e20)
const;
229 std::vector<Index> &best_assignment,
245 std::vector<Index> &best_assignment,
247 double best_cost = 1e20)
const;
264 std::vector<Index> &best_assignment,
280 namespace ConfigMap_impl {
314 std::vector<Index> &best_assignment,
315 const bool translate_flag,
323 std::vector<Index> &best_assignment,
324 const bool translate_flag,
330 std::vector<Index> &best_assignment,
331 const bool translate_flag,
339 std::vector<Index> &best_assignment,
340 const bool translate_flag,
346 namespace ConfigMapping {
372 const std::vector<Lattice> &from_range,
bool deformed_struc_to_configdof_of_lattice(const BasicStructure< Site > &struc, const Lattice &imposed_lat, double &best_cost, ConfigDoF &mapped_configdof, Lattice &mapped_lat, std::vector< Index > &best_assignment, Eigen::Matrix3d &cart_op) const
Low-level routine to map a structure onto a ConfigDof assuming a specific Lattice, without assuming structure is ideal Will only identify mappings better than best_cost, and best_cost is updated to reflect cost of best mapping identified.
ConfigMapper(NullInitializer)
Default construction not allowed – this constructor provides an override.
bool struc_to_configdof(const BasicStructure< Site > &_struc, ConfigDoF &mapped_configdof, Lattice &mapped_lat) const
Low-level routine to map a structure onto a ConfigDof.
double max_va_frac() const
const std::vector< Lattice > & _lattices_of_vol(Index prim_vol) const
bool import_structure(const fs::path &pos_path, std::string &imported_name, jsonParser &relaxation_properties, std::vector< Index > &best_assignment, Eigen::Matrix3d &cart_op) const
imports structure specified by 'pos_path' into primclex() by finding optimal mapping unlike import_st...
bool preconditioned_struc_to_configdof(const Configuration &config, const BasicStructure< Site > &rstruc, const Eigen::Matrix3d &deformation, ConfigDoF &config_dof, std::vector< Index > &best_assignment, const bool translate_flag, const double _tol)
Same as struc_to_configdof, except 'rstruc' is de-rotated and de-strained. Any deformation is instead...
bool deformed_struc_to_configdof(const BasicStructure< Site > &_struc, ConfigDoF &mapped_config_dof, Lattice &mapped_lat, std::vector< Index > &best_assignment, Eigen::Matrix3d &cart_op, double best_cost=1e20) const
Low-level routine to map a structure onto a ConfigDof. Does not assume structure is ideal...
Represents a supercell of the primitive parent crystal structure.
bool ideal_struc_to_configdof(const BasicStructure< Site > &struc, ConfigDoF &mapped_config_dof, Lattice &mapped_lat, std::vector< Index > &best_assignment, Eigen::Matrix3d &cart_op) const
Low-level routine to map a structure onto a ConfigDof if it is known to be ideal. ...
PrimClex & primclex() const
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
Represents cartesian and fractional coordinates.
bool calc_cost_matrix(const Configuration &config, const BasicStructure< Site > &rstruc, const Coordinate &trans, const Eigen::Matrix3d &metric, Eigen::MatrixXd &cost_matrix)
void set_min_va_frac(double _min_va)
EigenIndex Index
For long integer indexing:
std::map< Index, std::vector< Lattice > > m_superlat_map
A container class for the different degrees of freedom a Configuration might have.
double lattice_weight() const
PrimClex is the top-level data structure for a CASM project.
Lattice find_nearest_super_lattice(const Lattice &prim_lat, const Lattice &relaxed_lat, const SymGroup &sym_group, Eigen::Matrix3d &trans_mat, Eigen::Matrix3d &deformation, double &best_cost, const std::vector< Lattice > &from_range, double _tol)
T max(const T &A, const T &B)
T min(const T &A, const T &B)
void set_max_va_frac(double _max_va)
double basis_cost(const ConfigDoF &_dof, Index Nsites)
Calculate the basis cost function of a ConfigDoF as the mean-square displacement of its atoms...
double min_va_frac() const
void set_lattice_weight(double _lw)
std::vector< std::pair< std::string, Index > > m_fixed_components
double m_max_volume_change
void set_primclex(PrimClex &_pclex)
A Configuration represents the values of all degrees of freedom in a Supercell.
bool import_structure_occupation(const fs::path &pos_path, std::string &imported_name, jsonParser &relaxation_properties, std::vector< Index > &best_assignment, Eigen::Matrix3d &cart_op) const
imports structure specified by 'pos_path' into primclex() by finding optimal mapping and then setting...
double strain_cost(const Lattice &relaxed_lat, const ConfigDoF &_dof, Index Nsites)
Calculate the strain cost function of a ConfigDoF using LatticeMap::calc_strain_cost() ...