CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
clex.hh
Go to the documentation of this file.
1 #ifndef CASM_jsonIO_clex
2 #define CASM_jsonIO_clex
3 
6 
8 
9 namespace CASM {
10 
11  class Structure;
12 
19  // --- ChemicalReferenceState -------------------
20 
22  jsonParser &to_json(const ChemicalReferenceState &ref_state, jsonParser &json);
23 
25  template<>
26  ChemicalReferenceState from_json<ChemicalReferenceState>(const jsonParser &json);
27 
29  void from_json(ChemicalReferenceState &ref_state, const jsonParser &json);
30 
31 
32  // --- HyperPlaneReference -------------------
33 
34  jsonParser &to_json(const HyperPlaneReference &ref, jsonParser &json);
35 
36  template<>
38 
39  static HyperPlaneReference from_json(const jsonParser &json,
41  };
42 
44  const jsonParser &json,
46 
47 
48  // --- ChemicalReference -------------------
49 
52 
54  std::pair<Eigen::VectorXd, std::vector<ChemicalReferenceState> >
56  const jsonParser &json);
57 
59  template<>
61 
62  static ChemicalReference from_json(const jsonParser &json,
63  const Structure &prim,
64  double tol = 1e-14);
65  };
66 
69  const jsonParser &json,
70  const Structure &prim,
71  double tol = 1e-14);
72 
75 }
76 
77 #endif
std::function< Eigen::VectorXd(const Configuration &)> InputFunction
Definition: Reference.hh:79
void from_json(ClexDescription &desc, const jsonParser &json)
Structure specifies the lattice and atomic basis of a crystal.
Definition: Structure.hh:29
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
Main CASM namespace.
Definition: complete.cpp:8
pair_type ref
Definition: settings.cc:110
double tol
std::pair< Eigen::VectorXd, std::vector< ChemicalReferenceState > > one_chemical_reference_from_json(const Structure &prim, const jsonParser &json)
Read chemical reference from one of 3 alternative forms.
Definition: clex.cc:180
static ReturnType from_json(const jsonParser &json)
Default from_json is equivalent to.
Definition: jsonParser.hh:489
Helper struct for constructing objects that need additional data.
Definition: jsonParser.hh:486
ChemicalReferenceState from_json< ChemicalReferenceState >(const jsonParser &json)
Read ChemicalReferenceState from: '{"A" : X, "B" : X, ..., "energy_per_species" : X }'...
Maps a Configuration to a scalar value via a hyperplane.
Definition: Reference.hh:216