CASM  1.1.0
A Clusters Approach to Statistical Mechanics
DoFSpace.hh
Go to the documentation of this file.
1 #ifndef CASM_enumerator_io_json_DoFSpace
2 #define CASM_enumerator_io_json_DoFSpace
3 
4 #include <string>
5 
8 #include "casm/global/eigen.hh"
11 
12 namespace CASM {
13 
14 class DoFSpace;
15 template <typename T>
16 class InputParser;
17 class Structure;
18 template <typename T>
19 struct jsonConstructor;
20 template <typename T>
21 struct jsonMake;
22 class jsonParser;
23 
24 // jsonParser &to_json(DoFSpace const &dofspace, jsonParser &json);
25 
26 void from_json(DoFSpace &dofspace, jsonParser const &json,
27  std::shared_ptr<Structure const> const &shared_prim);
28 
29 jsonParser &to_json(
30  DoFSpace const &dofspace, jsonParser &json,
31  std::optional<std::string> const &identifier = std::nullopt,
32  std::optional<ConfigEnumInput> const &input_state = std::nullopt,
33  std::optional<VectorSpaceSymReport> const &sym_report = std::nullopt);
34 
35 jsonParser &to_json(
36  DoFSpace const &dofspace, jsonParser &json,
37  std::optional<std::string> const &identifier,
38  std::optional<ConfigEnumInput> const &input_state,
39  std::optional<SymRepTools_v2::VectorSpaceSymReport> const &sym_report);
40 
41 template <>
43  static DoFSpace from_json(
44  jsonParser const &json,
45  std::shared_ptr<Structure const> const &shared_prim);
46 };
47 
48 template <>
49 struct jsonMake<DoFSpace> {
50  static std::unique_ptr<DoFSpace> make_from_json(
51  jsonParser const &json,
52  std::shared_ptr<Structure const> const &shared_prim);
53 };
54 
57  // DoFSpace axes (column vector matrix, may be a subspace)
58 
60 
61  // Counter min, max, and increment values (size must match axes.cols())
62 
66 
67  // If scalar_input==true, Counter min, max, increment should be set with
68  // constant vectors sized as necessary to match axes
70 
71  double min_scalar;
72  double max_scalar;
73  double inc_scalar;
74 };
75 
78 void parse(InputParser<AxesCounterParams> &parser, Index dof_space_dimension);
79 
80 } // namespace CASM
81 
82 #endif
std::shared_ptr< Structure const > shared_prim
Main CASM namespace.
Definition: APICommand.hh:8
Eigen::MatrixXd MatrixXd
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
void from_json(ClexDescription &desc, const jsonParser &json)
INDEX_TYPE Index
For long integer indexing:
Definition: definitions.hh:39
void parse(InputParser< ConfigEnumOptions > &parser, std::string method_name, PrimClex const &primclex, DataFormatterDictionary< Configuration > const &dict)
Eigen::VectorXd VectorXd
Data structure used for continuous DoF enumeration IO.
Definition: DoFSpace.hh:56
Eigen::MatrixXd axes
Definition: DoFSpace.hh:59
Eigen::VectorXd inc_vector
Definition: DoFSpace.hh:65
Eigen::VectorXd min_vector
Definition: DoFSpace.hh:63
Eigen::VectorXd max_vector
Definition: DoFSpace.hh:64
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
Helper struct for constructing objects that need additional data.
Definition: jsonParser.hh:564
static std::unique_ptr< ValueType > make_from_json(const jsonParser &json)
Default make_from_json is equivalent to.
Definition: jsonParser.hh:567