15 class SimpleStructure;
19 using xtal::BasicStructure;
20 using xtal::SimpleStructure;
22 using xtal::UnitCellCoord;
27 class PrimNeighborList;
28 struct BasisFunctionSpecs;
33 class ParsingDictionary;
39 struct ParamAllocation;
61 static std::string
class_desc() {
return "DoFType::Traits"; }
82 virtual std::pair<Eigen::MatrixXd, std::set<std::string> >
find_values(
83 std::map<std::string, Eigen::MatrixXd>
const &values)
const;
113 std::string
const &nlist_specifier =
"%n")
const;
115 virtual std::vector<std::unique_ptr<FunctionVisitor> >
119 Index site_ix)
const;
122 Structure const &_prim, std::vector<BasisSet>
const &_bases)
const;
125 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
126 std::string
const &indent)
const;
130 std::map<
UnitCellCoord, std::set<UnitCellCoord> >
const &_nhood,
132 std::string
const &indent)
const;
136 std::map<
UnitCellCoord, std::set<UnitCellCoord> >
const &_nhood,
138 std::string
const &indent)
const;
141 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
142 std::string
const &indent)
const;
145 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
146 std::string
const &indent)
const;
149 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
150 std::string
const &indent)
const;
153 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
154 std::string
const &indent)
const;
157 Structure const &_prim, std::vector<BasisSet>
const &site_bases,
158 std::string
const &indent)
const;
188 std::unique_ptr<Traits>
clone()
const {
189 return std::unique_ptr<Traits>(
_clone());
202 Index _num_param,
bool _independent)
Specifies traits of (possibly) anisotropic crystal properties.
std::string const & name() const
Const access of name.
Collection of all the traits specific to a DoF type.
virtual void parse_dof_specs(InputParser< BasisFunctionSpecs > &parser, Structure const &prim) const
AnisoValTraits const & val_traits() const
virtual std::string clexulator_private_method_definitions_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const
virtual jsonParser dof_to_json(ConfigDoF const &_dof, BasicStructure const &_reference) const
Serialize type-specific DoF values from ConfigDoF.
virtual 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
virtual std::string clexulator_public_method_declarations_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const
virtual Traits * _clone() const =0
virtual void apply_dof(ConfigDoF const &_dof, BasicStructure const &_reference, SimpleStructure &_struc) const
Transforms SimpleSructure.
virtual std::pair< Eigen::MatrixXd, std::set< std::string > > find_values(std::map< std::string, Eigen::MatrixXd > const &values) const
Retrieve the standard values for a DoF from dictionary of properties from properties....
virtual std::vector< BasisSet > construct_site_bases(Structure const &_prim, std::vector< Orbit< PrimPeriodicSymCompare< IntegralCluster > > > &_asym_unit, BasisFunctionSpecs const &_basis_function_specs) const =0
Construct the site basis (if DOF_MODE is LOCAL) for a DoF, given its site.
virtual void from_json(DoFSet &_in, jsonParser const &_json) const
Populate.
virtual std::string clexulator_private_method_declarations_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const
virtual std::string clexulator_member_declarations_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const
virtual 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
virtual std::string site_basis_description(BasisSet site_bset, Site site, Index site_ix) const
virtual ~Traits()
Allow destruction through base pointer.
virtual std::string clexulator_public_method_definitions_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const
bool requires_site_basis() const
static std::string class_desc()
virtual std::vector< ParamAllocation > param_pack_allocation(Structure const &_prim, std::vector< BasisSet > const &_bases) const
Traits(AnisoValTraits const &_val_traits, bool _requires_site_basis=false)
virtual void to_json(DoFSet const &_out, jsonParser &_json) const
Output.
virtual void dof_specs_to_json(BasisFunctionSpecs const &basis_function_specs, jsonParser &json, Structure const &prim) const
Output DoF-specific basis function specs to json. Default does nothing.
virtual std::vector< std::unique_ptr< FunctionVisitor > > clust_function_visitors() const
bool m_requires_site_basis
virtual std::vector< std::unique_ptr< FunctionVisitor > > site_function_visitors(std::string const &nlist_specifier="%n") const
std::string site_basis_name() const
virtual std::string clexulator_constructor_string(Structure const &_prim, std::vector< BasisSet > const &site_bases, std::string const &indent) const
AnisoValTraits m_val_traits
std::unique_ptr< Traits > clone() const
non-virtual method to obtain copy through Traits pointer
std::string const & name() const
Parsing dictionary for obtaining the correct MoleculeAttribute given a name.
The PrimNeighborList gives the coordinates of UnitCell that are neighbors of the origin UnitCell.
Structure specifies the lattice and atomic basis of a crystal.
BasicStructure specifies the lattice and atomic basis of a crystal.
Representation of a crystal of molecular and/or atomic occupants, and any additional properties....
void register_traits(Traits const &_traits)
Insert new DoFType::Traits into the global dictionary.
TraitsDictionary & traits_dict()
Traits const & traits(std::string const &dof_key)
Lookup DoFType::Traits in the global dictionary.
DoF::BasicTraits const & basic_traits(std::string const &dof_key)
Access DoF::BasicTraits for a given DoF type.
INDEX_TYPE Index
For long integer indexing:
Specify how to construct basis functions.
const std::string param_name
ParamAllocation(std::string const &_param_name, Index _param_dim, Index _num_param, bool _independent)