CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
SymMatrixXd.cc
Go to the documentation of this file.
3 
4 namespace CASM {
5 
6 
8  json.put_obj();
9 
10  // Members not included:
11  //
12  // From SymOpRepresentation:
13  // MasterSymGroup const *head_group;
14 
15  json["SymOpRep_type"] = "SymMatrixXd";
16 
17  json["op_index"] = index();
18  json["rep_ID"] = rep_ID();
19 
20  json["mat"] = mat;
21  return json;
22  }
23 
24  //*******************************************************************************************
25 
26  void SymMatrixXd::from_json(const jsonParser &json) {
27  try {
28  CASM::from_json(m_op_index, json["op_index"]);
29  CASM::from_json(m_rep_ID, json["rep_ID"]);
30 
31  CASM::from_json(mat, json["mat"]);
32  }
33  catch(...) {
35  throw;
36  }
37  }
38 
39  //*******************************************************************************************
40 
41  jsonParser &to_json(const SymMatrixXd &sym, jsonParser &json) {
42  return sym.to_json(json);
43  }
44 
45  //*******************************************************************************************
46 
47  void from_json(SymMatrixXd &sym, const jsonParser &json) {
48  try {
49  sym.from_json(json);
50  }
51  catch(...) {
53  throw;
54  }
55  }
56 
57 }
void from_json(ClexDescription &desc, const jsonParser &json)
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
Index index() const
Index of this operation within the master_group.
Eigen::MatrixXd mat
Definition: SymMatrixXd.hh:24
Main CASM namespace.
Definition: complete.cpp:8
SymGroupRepID m_rep_ID
ID of this representation within the master_group. Default is uninitialized.
Index m_op_index
Index into MasterSymGroup that specifies the operation.
jsonParser & to_json(jsonParser &json) const override
Definition: SymMatrixXd.cc:7
Generalized symmetry matrix representation for arbitrary dimension Can be used to describe applicatio...
Definition: SymMatrixXd.hh:22
SymGroupRepID rep_ID() const
ID of representation that this operation belongs to within the master_group.
jsonParser & put_obj()
Puts new empty JSON object.
Definition: jsonParser.hh:276
void from_json(const jsonParser &json) override
Definition: SymMatrixXd.cc:26