CASM  1.1.0
A Clusters Approach to Statistical Mechanics
ChemicalReference_json_io.hh
Go to the documentation of this file.
1 #ifndef CASM_clex_io_json_ChemicalReference
2 #define CASM_clex_io_json_ChemicalReference
3 
7 
8 namespace CASM {
9 namespace xtal {
10 class BasicStructure;
11 class Site;
12 } // namespace xtal
13 
20 // --- ChemicalReferenceState -------------------
21 
24 jsonParser &to_json(const ChemicalReferenceState &ref_state, jsonParser &json);
25 
28 template <>
30  const jsonParser &json);
31 
34 void from_json(ChemicalReferenceState &ref_state, const jsonParser &json);
35 
36 // --- HyperPlaneReference -------------------
37 
39 
40 template <>
42  static HyperPlaneReference from_json(const jsonParser &json,
44 };
45 
46 void from_json(HyperPlaneReference &ref, const jsonParser &json,
48 
49 // --- ChemicalReference -------------------
50 
53 
55 std::pair<Eigen::VectorXd, std::vector<ChemicalReferenceState> >
57  jsonParser const &json);
58 
60 template <>
62  static ChemicalReference from_json(jsonParser const &json,
63  xtal::BasicStructure const &prim,
64  double tol = 1e-14);
65 };
66 
68 void from_json(ChemicalReference &ref, jsonParser const &json,
69  xtal::BasicStructure const &prim, double tol = 1e-14);
70 
73 } // namespace CASM
74 
75 #endif
std::function< Eigen::VectorXd(const Configuration &)> InputFunction
Definition: Reference.hh:71
Maps a Configuration to a scalar value via a hyperplane.
Definition: Reference.hh:198
BasicStructure specifies the lattice and atomic basis of a crystal.
Main CASM namespace.
Definition: APICommand.hh:8
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
std::pair< Eigen::VectorXd, std::vector< ChemicalReferenceState > > one_chemical_reference_from_json(xtal::BasicStructure const &prim, jsonParser const &json)
Read chemical reference from one of 3 alternative forms.
void from_json(ClexDescription &desc, const jsonParser &json)
ChemicalReferenceState from_json< ChemicalReferenceState >(const jsonParser &json)
Read ChemicalReferenceState from: '{"A" : X, "B" : X, ..., "energy_per_species" : X }'.
pair_type ref
Definition: settings.cc:144
Stores the composition and energy in a single reference state.
Helper struct for constructing objects that need additional data.
Definition: jsonParser.hh:548
static ReturnType from_json(const jsonParser &json)
Default from_json is equivalent to.
Definition: jsonParser.hh:551