1 #ifndef CASM_xtal_BasicStructure_io
2 #define CASM_xtal_BasicStructure_io
4 #include <boost/filesystem/path.hpp>
15 class SpeciesAttribute;
26 class ParsingDictionary;
28 struct jsonConstructor;
35 jsonParser
const &
from_json(xtal::SpeciesAttribute &_attr,
36 jsonParser
const &json);
39 jsonParser &
to_json(xtal::SpeciesAttribute
const &_attr, jsonParser &json);
43 jsonParser &
to_json(
const xtal::AtomPosition &apos, jsonParser &json,
44 Eigen::Ref<const Eigen::Matrix3d>
const &
cart2frac);
48 void from_json(xtal::AtomPosition &apos,
const jsonParser &json,
49 Eigen::Ref<const Eigen::Matrix3d>
const &
frac2cart,
50 ParsingDictionary<AnisoValTraits>
const &_aniso_val_dict);
61 Eigen::Ref<const Eigen::Matrix3d>
const &c2f_mat);
64 Eigen::Ref<const Eigen::Matrix3d>
const &f2c_mat,
70 const jsonParser &json, Eigen::Ref<const Eigen::Matrix3d>
const &f2c_mat,
78 std::map<std::string, xtal::Molecule>
const &mol_map,
87 std::map<std::string, xtal::Molecule>
const &mol_map,
91 fs::path filename,
double xtal_tol,
Parsing dictionary for obtaining the correct MoleculeAttribute given a name.
An atomic species associated with a position in space.
BasicStructure specifies the lattice and atomic basis of a crystal.
Class representing a Molecule.
Eigen::Matrix3d frac2cart(const Eigen::Ref< const Eigen::Matrix3d > &frac_mat, const Lattice &lat)
Returns 'cart_mat' which is transformation of 'frac_mat' if cart_vec_after = cart_mat*cart_vec then f...
Eigen::Matrix3d cart2frac(const Eigen::Ref< const Eigen::Matrix3d > &cart_mat, const Lattice &lat)
Returns 'frac_mat' which is transformation of 'cart_mat' if cart_vec_after = cart_mat*cart_vec then f...
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
void write_prim(const xtal::BasicStructure &prim, fs::path filename, COORD_TYPE mode, bool include_va=false)
Write prim.json to file.
xtal::BasicStructure read_prim(fs::path filename, double xtal_tol, ParsingDictionary< AnisoValTraits > const *_aniso_val_dict=nullptr)
void from_json(ClexDescription &desc, const jsonParser &json)
Helper struct for constructing objects that need additional data.
static ReturnType from_json(const jsonParser &json)
Default from_json is equivalent to.