CASM  1.1.0
A Clusters Approach to Statistical Mechanics
HamiltonianModules.cc
Go to the documentation of this file.
4 namespace CASM {
5 
6 template <>
14  return dict;
15 }
16 
18  : m_dof_dict(make_parsing_dictionary<DoFDictionary::value_type>().clone()),
19  m_aniso_val_dict(
21  m_symrep_builder_dict(
23  .clone()) {
24  // std::cout << "Inside HamiltonianModules Constructor\n";
25  // add DoF plugins
26  if (_set) {
27  load_dof_plugins(*_set, std::inserter(*m_dof_dict, m_dof_dict->end()),
28  std::inserter(m_dof_lib, m_dof_lib.end()));
29 
30  // add attribute plugins
32  *_set,
33  std::inserter(*m_symrep_builder_dict, m_symrep_builder_dict->end()),
34  std::inserter(m_symrep_builder_lib, m_symrep_builder_lib.end()));
35  }
36 }
37 
38 HamiltonianModules::~HamiltonianModules() {
39  m_aniso_val_dict->clear();
40 
41  // order of deletion matters
42  m_dof_dict->clear();
43  m_dof_lib.clear();
44 
45  // order of deletion matters
46  m_symrep_builder_dict->clear();
47  m_symrep_builder_lib.clear();
48 }
49 
50 // std::unique_ptr<HamiltonianModules > HamiltonianModules::clone() const {
51 // return std::unique_ptr<HamiltonianModules >(new HamiltonianModules(*this));
52 //}
53 
55  return *m_dof_dict;
56 }
57 
59  return *m_dof_dict;
60 }
61 
63  return *m_aniso_val_dict;
64 }
65 
68  return *m_aniso_val_dict;
69 }
70 
73  return *m_symrep_builder_dict;
74 }
75 
78  return *m_symrep_builder_dict;
79 }
80 
81 } // namespace CASM
notstd::cloneable_ptr< AnisoValDictionary > m_aniso_val_dict
HamiltonianModules(ProjectSettings const *set=nullptr)
notstd::cloneable_ptr< SymRepBuilderDictionary > m_symrep_builder_dict
notstd::cloneable_ptr< DoFDictionary > m_dof_dict
SymRepBuilderDictionary & symrep_builder_dict()
AnisoValDictionary & aniso_val_dict()
std::map< std::string, std::shared_ptr< RuntimeLibrary > > m_dof_lib
std::map< std::string, std::shared_ptr< RuntimeLibrary > > m_symrep_builder_lib
Parsing dictionary for obtaining the correct MoleculeAttribute given a name.
std::pair< iterator, bool > insert(const value_type &value)
Insert single value.
Definition: unique_map.hh:149
TimeReversalSymRepBuilder TimeReversal()
AngularMomentumSymRepBuilder AngularMomentum()
dOrbitalOccupationSymRepBuilder dOrbitalOccupation()
IdentitySymRepBuilder Identity()
dOrbitalOccupationSpinPolarizedSymRepBuilder dOrbitalOccupationSpinPolarized()
Rank2TensorSymRepBuilder Rank2Tensor()
CartesianSymRepBuilder Cartesian()
Main CASM namespace.
Definition: APICommand.hh:8
std::pair< SymRepBuilderDictInserter, RuntimeLibInserter > load_symrep_builder_plugins(const ProjectSettings &set, SymRepBuilderDictInserter dict_it, RuntimeLibInserter lib_it)
Load SymRepBuilder plugins from a CASM project.
ParsingDictionary< T > make_parsing_dictionary()
std::pair< DoFDictInserter, RuntimeLibInserter > load_dof_plugins(const ProjectSettings &set, DoFDictInserter dict_it, RuntimeLibInserter lib_it)
Load DoF plugins from a CASM project.
HamiltonianModules::SymRepBuilderDictionary make_parsing_dictionary< SymRepBuilderInterface >()
std::unique_ptr< T > clone(const T &obj)