CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CanonicalSettings.hh
Go to the documentation of this file.
1 #ifndef CASM_CanonicalSettings
2 #define CASM_CanonicalSettings
3 
5 
6 namespace CASM {
7 namespace Monte {
8 
9 class CanonicalConditions;
10 
12  public:
15 
17  CanonicalSettings(const PrimClex &primclex, const fs::path &read_path);
18 
19  // --- CanonicalConditions settings ---------------------
20 
23 
26 
29 
31  std::vector<CanonicalConditions> custom_conditions() const;
32 
33  // --- Project settings ---------------------
34 
37 
38  // --- Sampler settings ---------------------
39 
41  template <typename SamplerInsertIterator>
42  SamplerInsertIterator samplers(const PrimClex &primclex,
43  SamplerInsertIterator result) const;
44 
46  bool all_correlations() const;
47 
48  private:
50 
51  CanonicalConditions _conditions(std::string name) const;
52  CanonicalConditions _conditions(const jsonParser &json) const;
53 
54  template <typename jsonParserIteratorType>
55  std::tuple<bool, double> _get_precision(jsonParserIteratorType it) const;
56 
57  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
58  SamplerInsertIterator _make_all_correlations_samplers(
59  const PrimClex &primclex, jsonParserIteratorType it,
60  SamplerInsertIterator result) const;
61 
62  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
63  SamplerInsertIterator _make_non_zero_eci_correlations_samplers(
64  const PrimClex &primclex, jsonParserIteratorType it,
65  SamplerInsertIterator result) const;
66 
67  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
68  SamplerInsertIterator _make_query_samplers(
69  const PrimClex &primclex, jsonParserIteratorType it,
70  SamplerInsertIterator result) const;
71 };
72 
73 } // namespace Monte
74 } // namespace CASM
75 
76 #endif
Convert between number of species per unit cell and parametric composition.
CanonicalSettings()
Default constructor.
CanonicalConditions final_conditions() const
Expects final_conditions.
SamplerInsertIterator _make_non_zero_eci_correlations_samplers(const PrimClex &primclex, jsonParserIteratorType it, SamplerInsertIterator result) const
ClexDescription formation_energy(const PrimClex &primclex) const
Get formation energy cluster expansion.
std::tuple< bool, double > _get_precision(jsonParserIteratorType it) const
SamplerInsertIterator samplers(const PrimClex &primclex, SamplerInsertIterator result) const
Construct MonteSamplers as specified in the MonteSettings.
CompositionConverter m_comp_converter
std::vector< CanonicalConditions > custom_conditions() const
Expects custom_conditions.
SamplerInsertIterator _make_query_samplers(const PrimClex &primclex, jsonParserIteratorType it, SamplerInsertIterator result) const
SamplerInsertIterator _make_all_correlations_samplers(const PrimClex &primclex, jsonParserIteratorType it, SamplerInsertIterator result) const
CanonicalConditions incremental_conditions() const
Expects incremental_conditions.
CanonicalConditions _conditions(std::string name) const
CanonicalConditions initial_conditions() const
Expects initial_conditions.
bool all_correlations() const
Return true if all correlations should be sampled.
const PrimClex & primclex() const
PrimClex is the top-level data structure for a CASM project.
Definition: PrimClex.hh:55
Main CASM namespace.
Definition: APICommand.hh:8
GenericDatumFormatter< std::string, DataObject > name()
Specifies a particular cluster expansion.