1 #ifndef CASM_OccupationDoFTraits
2 #define CASM_OccupationDoFTraits
26 std::initializer_list<std::pair<std::string, double>> _values)
27 :
indices(_indices),
values(_values.begin(), _values.end()) {}
29 SublatComp(std::set<Index> _indices, std::map<std::string, double> _values)
33 std::map<std::string, double>
values;
77 std::string
_name()
const override;
95 const std::vector<std::string> &allowed_occupants);
115 Index site_ix)
const override;
118 std::string
const &nlist_specifier)
const override;
125 std::vector<BasisSet>
const &_bases)
const override;
128 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
129 std::string
const &indent)
const override;
133 std::map<
UnitCellCoord, std::set<UnitCellCoord>>
const &_nhood,
135 std::string
const &indent)
const override;
139 std::map<
UnitCellCoord, std::set<UnitCellCoord>>
const &_nhood,
141 std::string
const &indent)
const override;
144 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
145 std::string
const &indent)
const override;
148 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
149 std::string
const &indent)
const override;
152 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
153 std::string
const &indent)
const override {
155 return std::string();
159 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
160 std::string
const &indent)
const override {
162 return std::string();
166 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
167 std::string
const &indent)
const override {
169 return std::string();
231 std::vector<DoF_impl::SublatComp> sublat_composition);
#define ENUM_TRAITS(ENUM)
#define ENUM_JSON_IO_DECL(ENUM)
#define ENUM_IO_DECL(ENUM)
Specifies traits of (possibly) anisotropic crystal properties.
std::string clexulator_private_method_definitions_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const override
std::string clexulator_point_prepare_string(Structure const &_prim, std::map< UnitCellCoord, std::set< UnitCellCoord >> const &_nhood, PrimNeighborList &_nlist, std::vector< BasisSet > const &site_bases, std::string const &indent) const override
void parse_dof_specs(InputParser< BasisFunctionSpecs > &parser, Structure const &prim) const override
Parse DoF-specific basis function specs & validate.
std::string clexulator_public_method_declarations_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const override
void dof_specs_to_json(BasisFunctionSpecs const &basis_function_specs, jsonParser &json, Structure const &prim) const override
Output DoF-specific basis function specs to json.
DoFType::Traits * _clone() const override
std::string site_basis_description(BasisSet site_bset, Site site, Index site_ix) const override
std::string clexulator_member_declarations_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const override
std::vector< std::unique_ptr< FunctionVisitor > > site_function_visitors(std::string const &nlist_specifier) const override
std::vector< DoFType::ParamAllocation > param_pack_allocation(Structure const &_prim, std::vector< BasisSet > const &_bases) const override
std::string clexulator_private_method_declarations_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const override
std::string clexulator_constructor_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const override
std::string clexulator_global_prepare_string(Structure const &_prim, std::map< UnitCellCoord, std::set< UnitCellCoord >> const &_nhood, PrimNeighborList &_nlist, std::vector< BasisSet > const &site_bases, std::string const &indent) const override
std::vector< BasisSet > construct_site_bases(Structure const &_prim, std::vector< Orbit< PrimPeriodicSymCompare< IntegralCluster >>> &_asym_unit, BasisFunctionSpecs const &_basis_function_specs) const override
Construct the site basis (if DOF_MODE is LOCAL) for a DoF, given its site.
std::vector< std::unique_ptr< FunctionVisitor > > clust_function_visitors() const override
std::string clexulator_public_method_definitions_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const override
Collection of all the traits specific to a DoF type.
Traits(AnisoValTraits const &_val_traits, bool _requires_site_basis=false)
The PrimNeighborList gives the coordinates of UnitCell that are neighbors of the origin UnitCell.
Structure specifies the lattice and atomic basis of a crystal.
Validator validate(OccupationDoFSpecs const &occ_specs, const Structure &prim)
std::vector< double > chebychev_sublat_prob_vec(Index occupant_dof_size)
std::vector< double > composition_sublat_prob_vec(const OccupationDoFSpecs &occ_specs, Index sublat_index, const std::vector< std::string > &allowed_occupants)
std::vector< double > occupation_sublat_prob_vec(Index occupant_dof_size)
AnisoValTraits BasicTraits
std::unique_ptr< DoFSpecs > occupation_basis_function_specs()
std::unique_ptr< DoFSpecs > chebychev_basis_function_specs()
DoF_impl::OccupationDoFTraits occupation()
std::unique_ptr< DoFSpecs > composition_basis_function_specs(std::vector< DoF_impl::SublatComp > sublat_composition)
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
INDEX_TYPE Index
For long integer indexing:
void parse(InputParser< ConfigEnumOptions > &parser, std::string method_name, PrimClex const &primclex, DataFormatterDictionary< Configuration > const &dict)
Specify how to construct basis functions.
std::string _name() const override
SITE_BASIS_FUNCTION_TYPE site_basis_function_type
OccupationDoFSpecs(std::vector< SublatComp > _sublat_composition)
Specialized constructor for SITE_BASIS_FUNCTION_TYPE::COMPOSITION.
OccupationDoFSpecs(SITE_BASIS_FUNCTION_TYPE _site_basis_function_type)
Constructor for any SITE_BASIS_FUNCTION_TYPE.
std::vector< SublatComp > sublat_composition
std::set< Index > indices
std::map< std::string, double > values
SublatComp(std::initializer_list< Index > _indices, std::initializer_list< std::pair< std::string, double >> _values)
SublatComp(std::set< Index > _indices, std::map< std::string, double > _values)
Data structure to hold error and warning messages.