12 json[
"name"] = specie.
name;
13 json[
"mass"] = specie.
mass;
14 json[
"magmom"] = specie.
magmom;
55 for(
int i = 0; i < spaces; i++) {
62 for(
int i = 0; i < 3; i++) {
99 json[
"specie"] = apos.
specie;
100 json[
"SD_flag"] = apos.
SD_flag;
108 from_json(coord_ref, json[
"coordinate"]);
189 for(i = 0; i < RHS.
size(); i++) {
191 for(j = 0; j <
size(); j++) {
192 if(RHS.
at(i) ==
at(j))
222 at(i).
print(stream, trans, spaces, SD_is_on);
237 json[
"atomposition"] = apos_array_ref;
257 for(
int i = 0; i < json[
"atomposition"].
size(); i++) {
264 for(
int i = 0; i < json[
"point_group"].
size(); i++) {
281 atom.
name = atom_name;
size_type size() const
Returns array size if *this is a JSON array, object size if *this is a JSON object, 1 otherwise.
Molecule & apply_sym(const SymOp &op)
void from_json(ClexDescription &desc, const jsonParser &json)
Molecule & apply_sym_no_trans(const SymOp &op)
AtomPosition & apply_sym_no_trans(const SymOp &op)
bool is_vacancy(const std::string &name)
A vacancy is any Specie/Molecule with (name == "VA" || name == "va" || name == "Va") ...
bool operator==(const AtomPosition &RHS) const
void push_back(const AtomPosition &toPush)
void set_lattice(const Lattice &new_lat, COORD_TYPE invariant_mode)
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
Array< SymOp > point_group
bool is_molecule_name(const Molecule &mol, std::string name)
Return true if Molecule name matches 'name', including Va checks.
Coordinate & apply_sym(const SymOp &op)
Transform coordinate by symmetry operation (including translation)
void print(std::ostream &stream, const Coordinate &trans, int spaces, char delim, bool SD_is_on=false) const
Molecule make_atom(std::string atom_name, const Lattice &lat)
Return an atomic Molecule with specified name and Lattice.
bool contains(const std::string &name) const
void print(std::ostream &stream, const Coordinate &trans, int spaces, bool SD_is_on=false) const
jsonParser & to_json(jsonParser &json) const
bool operator==(const Coordinate &RHS) const
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
Represents cartesian and fractional coordinates.
Coordinate & apply_sym_no_trans(const SymOp &op)
Transform coordinate by symmetry operation (without translation)
EigenIndex Index
For long integer indexing:
void set_lattice(const Lattice &new_lat, COORD_TYPE mode)
Change the home lattice of the coordinate, selecting one representation (either CART or FRAC) that re...
AtomPosition & at(Index ind)
Lattice const * home() const
jsonParser & put_obj()
Puts new empty JSON object.
jsonParser & put(const T &value)
Puts data of any type T for which 'jsonParser& to_json( const T &value, jsonParser &json)' is defined (same as 'o...
bool contains(const std::string &name) const
Return true if JSON object contains 'name'.
bool operator==(const Molecule &RHS) const
Molecule make_vacancy(const Lattice &lat)
Return an vacancy Molecule with specified Lattice.
void from_json(const jsonParser &json)
Coordinate(const Lattice &_home)
Minimal constructor only takes a lattice.
AtomPosition & apply_sym(const SymOp &op)