CASM  1.1.0
A Clusters Approach to Statistical Mechanics
GrandCanonicalSettings.hh
Go to the documentation of this file.
1 #ifndef CASM_GrandCanonicalSettings
2 #define CASM_GrandCanonicalSettings
3 
5 
6 namespace CASM {
7 namespace Monte {
8 
9 class GrandCanonicalConditions;
10 
12  public:
15 
17  GrandCanonicalSettings(const PrimClex &primclex, const fs::path &read_path);
18 
19  // --- GrandCanonicalConditions settings ---------------------
20 
23 
26 
29 
31  std::vector<GrandCanonicalConditions> 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:
49  GrandCanonicalConditions _conditions(std::string name) const;
51 
52  template <typename jsonParserIteratorType>
53  std::tuple<bool, double> _get_precision(jsonParserIteratorType it) const;
54 
55  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
56  SamplerInsertIterator _make_comp_samplers(const PrimClex &primclex,
57  jsonParserIteratorType it,
58  SamplerInsertIterator result) const;
59 
60  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
61  SamplerInsertIterator _make_comp_n_samplers(
62  const PrimClex &primclex, jsonParserIteratorType it,
63  SamplerInsertIterator result) const;
64 
65  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
66  SamplerInsertIterator _make_site_frac_samplers(
67  const PrimClex &primclex, jsonParserIteratorType it,
68  SamplerInsertIterator result) const;
69 
70  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
71  SamplerInsertIterator _make_atom_frac_samplers(
72  const PrimClex &primclex, jsonParserIteratorType it,
73  SamplerInsertIterator result) const;
74 
75  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
76  SamplerInsertIterator _make_all_correlations_samplers(
77  const PrimClex &primclex, jsonParserIteratorType it,
78  SamplerInsertIterator result) const;
79 
80  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
81  SamplerInsertIterator _make_non_zero_eci_correlations_samplers(
82  const PrimClex &primclex, jsonParserIteratorType it,
83  SamplerInsertIterator result) const;
84 
85  template <typename jsonParserIteratorType, typename SamplerInsertIterator>
86  SamplerInsertIterator _make_query_samplers(
87  const PrimClex &primclex, jsonParserIteratorType it,
88  SamplerInsertIterator result) const;
89 };
90 
91 } // namespace Monte
92 } // namespace CASM
93 
94 #endif
SamplerInsertIterator _make_atom_frac_samplers(const PrimClex &primclex, jsonParserIteratorType it, SamplerInsertIterator result) const
SamplerInsertIterator _make_query_samplers(const PrimClex &primclex, jsonParserIteratorType it, SamplerInsertIterator result) const
bool all_correlations() const
Return true if all correlations should be sampled.
std::vector< GrandCanonicalConditions > custom_conditions() const
Expects custom_conditions.
SamplerInsertIterator _make_all_correlations_samplers(const PrimClex &primclex, jsonParserIteratorType it, SamplerInsertIterator result) const
SamplerInsertIterator _make_site_frac_samplers(const PrimClex &primclex, jsonParserIteratorType it, SamplerInsertIterator result) const
GrandCanonicalConditions initial_conditions() const
Expects initial_conditions.
SamplerInsertIterator _make_comp_samplers(const PrimClex &primclex, jsonParserIteratorType it, SamplerInsertIterator result) const
GrandCanonicalConditions final_conditions() const
Expects final_conditions.
SamplerInsertIterator samplers(const PrimClex &primclex, SamplerInsertIterator result) const
Construct Samplers as specified in the Settings.
std::tuple< bool, double > _get_precision(jsonParserIteratorType it) const
SamplerInsertIterator _make_comp_n_samplers(const PrimClex &primclex, jsonParserIteratorType it, SamplerInsertIterator result) const
GrandCanonicalConditions incremental_conditions() const
Expects incremental_conditions.
GrandCanonicalConditions _conditions(std::string name) const
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.
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.