1 #ifndef BASICSTRUCTURE_HH
2 #define BASICSTRUCTURE_HH
19 template<
typename ClustType>
class GenericOrbitree;
28 template<
typename CoordType>
30 class BasicStructure {
66 template<
typename CoordType2>
71 template<
typename CoordType2>
80 template<
typename CoordType2>
101 virtual void reset();
126 void fg_converge(
double small_tol,
double large_tol,
double increment);
127 void fg_converge(
SymGroup &factor_group,
double small_tol,
double large_tol,
double increment);
183 virtual void read(std::istream &stream);
186 void print_xyz(std::ostream &stream)
const;
187 void print_cif(std::ostream &stream)
const;
195 template<
typename CoordType>
196 BasicStructure<CoordType>
operator*(
const SymOp &LHS,
const BasicStructure<CoordType> &RHS);
198 template<
typename CoordType>
199 BasicStructure<CoordType>
operator*(
const Lattice &LHS,
const BasicStructure<CoordType> &RHS);
202 template<
typename CoordType>
203 BasicStructure<CoordType>
operator+(
const Coordinate &LHS,
const BasicStructure<CoordType> &RHS);
205 template<
typename CoordType>
206 BasicStructure<CoordType>
operator+(
const BasicStructure<CoordType> &LHS,
const Coordinate &RHS);
208 template<
typename CoordType>
209 jsonParser &
to_json(
const BasicStructure<CoordType> &basic, jsonParser &json);
213 template<
typename CoordType>
214 void from_json(BasicStructure<CoordType> &basic,
const jsonParser &json);
void from_json(const jsonParser &json)
void print_cif(std::ostream &stream) const
void set_site_internals()
Associate each site with its basis index by setting its internal flags (asym_ind -> -1) ...
void map_superstruc_to_prim(BasicStructure &prim, const SymGroup &point_group)
Figures out which prim basis each superstructure basis corresponds to.
jsonParser & to_json(jsonParser &json) const
void fill_supercell(const BasicStructure &prim, double map_tol=TOL)
fill an empty structure with the basis of its corresponding primitive cell
void from_json(ClexDescription &desc, const jsonParser &json)
Type-safe ID object for communicating and accessing Symmetry representation info. ...
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
void add_vacuum(BasicStructure &new_surface_struc, double vacuum_thickness) const
Adds vacuum layer on top of ab plane.
bool is_primitive(double prim_tol=TOL) const
BasicStructure specifies the lattice and atomic basis of a crystal.
BasicStructure create_superstruc(const Lattice &scel_lat, double map_tol=TOL) const
Shortcut routine to create a supercell structure and fill it with sites.
BasicStructure & operator+=(const Coordinate &shift)
Translates all atoms in cell.
void merge_sites(double maxdist)
If atoms are too close together, average their distance and make them one.
void generate_factor_group_slow(SymGroup &factor_group, double map_tol) const
void generate_flowertrees(const SiteOrbitree &in_tree, Array< SiteOrbitree > &out_trees)
const Lattice & lattice() const
void main_print(std::ostream &stream, COORD_TYPE mode, bool version5, int option) const
void symmetrize(const SymGroup &relaxed_factors)
void set_lattice(const Lattice &lattice, COORD_TYPE mode)
const Lattice & get_lattice() const
Return a reference to the lattice.
void generate_factor_group(SymGroup &factor_group, double map_tol) const
apply a symmetry operation to the current structure (may change lattice vectors and order of basis at...
GenericCluster< CoordType > operator+(const GenericCluster< CoordType > &LHS, const Coordinate &RHS)
create translated cluster
Index find(const CoordType2 &test_site, double tol=TOL) const
SymGroup is a collection of symmetry operations that satisfy the group property The symmetry operatio...
BasicStructure(const Lattice &init_lat)
GenericOrbitree< SiteCluster > SiteOrbitree
void print_xyz(std::ostream &stream) const
Output other formats.
BasisSet operator*(const SymOp &LHS, const BasisSet &RHS)
Represents cartesian and fractional coordinates.
bool SD_flag
Specifies whether selectice dynamics is on or of for DFT calculations.
EigenIndex Index
For long integer indexing:
void add_vacuum_shift(BasicStructure &new_surface_struc, double vacuum_thickness, Eigen::Vector3d shift, COORD_TYPE mode) const
Add vacuum and shift c vector. The vacuum is always added parallel to c, and the shift vector should ...
void set_basis(Array< CoordType > basis_in)
Manually set the basis sites.
Array< CoordType > basis
Lattice vectors that specifies periodicity of the crystal.
Index max_possible_vacancies() const
Counts sites that allow vacancies.
void fg_converge(double small_tol, double large_tol, double increment)
std::string title
User-specified name of this Structure.
void generate_flowertrees_safe(const SiteOrbitree &in_tree, Array< SiteOrbitree > &out_trees)
Gets clusters of every size radiating from one site and saves them to a flowertree. A garland for each site is constructed.
BasicStructure & operator-=(const Coordinate &shift)
virtual void read(std::istream &stream)
Print intpolated images in seperate directries.
void copy_attributes_from(const BasicStructure &RHS)
CoordType get_site(const UnitCellCoord &ucc) const
UnitCellCoord get_unit_cell_coord(const CoordType2 &test_site, double tol=TOL) const
virtual ~BasicStructure()
SymGroupRepID generate_basis_permutation_representation(const MasterSymGroup &factor_group, bool verbose) const
void within()
Translate all basis sites so that they are inside the unit cell.
virtual BasicStructure & operator=(const BasicStructure &RHS)