23 return f.find_symop(sub_configuration_lattice) !=
nullptr;
35 std::shared_ptr<Supercell const>
const &shared_supercell) {
61 std::shared_ptr<Supercell const>
const &shared_supercell) {
63 return f(symop, motif);
75 return f(symop, motif);
84 std::shared_ptr<Supercell const>
const &_shared_supercell)
85 : m_shared_supercell(_shared_supercell),
86 m_supercell_ptr(m_shared_supercell.
get()),
88 m_motif_supercell(nullptr) {}
96 : m_supercell_ptr(&_supercell),
98 m_motif_supercell(nullptr) {}
117 throw std::runtime_error(
118 "Error in 'FillSupercell: super lattice != sym::copy_apply(symop, "
126 std::unique_ptr<Configuration> result;
146 result->configdof().
set_global_dof(dof.first, dof.second.values());
153 result->configdof().occ(scel_s) = trans_motif.
occ(
s);
158 for (
auto const &dof : trans_motif.
local_dofs()) {
160 result->configdof().local_dof(dof.first));
164 res_ref.
site_value(scel_s) = dof.second.site_value(
s);
178 begin, end, motif_lattice.
tol());
179 if (res.first == end) {
182 return &(*res.first);
207 for (
const UnitCell &oriented_motif_uc : oriended_motif_lattice_points) {
208 UnitCell oriented_motif_uc_relative_to_prim =
212 Index prim_motif_tile_ind =
214 oriented_motif_uc_relative_to_prim);
219 prim_motif_tile_ind) +
std::set< std::string > & s
std::map< DoFKey, LocalContinuousConfigDoFValues > const & local_dofs() const
void set_global_dof(DoFKey const &_key, Eigen::Ref< const Eigen::VectorXd > const &_val)
Set global continuous DoF values.
std::map< DoFKey, GlobalContinuousConfigDoFValues > const & global_dofs() const
bool has_occupation() const
ConfigDoF & apply_sym_no_permute(SymOp const &_op)
int & occ(Index i)
Reference occupation value on site i.
const ConfigDoF & configdof() const
const Access the DoF
const Supercell & supercell() const
Get the Supercell for this Configuration.
Supercell const * m_motif_supercell
const SymOp & symop() const
Returns the SymOp used by operator()
FillSupercell(std::shared_ptr< Supercell const > const &_shared_supercell)
Constructor.
SymOp const * m_symop_ptr
void _init(Supercell const &_motif_scel) const
Configuration operator()(Configuration const &motif) const
const SymOp * find_symop(xtal::Lattice const &_motif_lattice) const
Find first SymOp in the prim factor group such that apply(op, motif) can be used to fill the Supercel...
std::vector< std::vector< Index > > m_index_table
Supercell const * m_supercell_ptr
std::shared_ptr< Supercell const > m_shared_supercell
SiteReference site_value(Index l)
Access site DoF value vector.
Structure specifies the lattice and atomic basis of a crystal.
const Lattice & lattice() const
const MasterSymGroup & factor_group() const
SymGroupRepID basis_permutation_symrep_ID() const
Represents a supercell of the primitive parent crystal structure.
Index linear_index(const Coordinate &coord, double tol=TOL) const
Given a Coordinate and tolerance, return linear index into Configuration.
UnitCellCoord uccoord(Index linear_index) const
Return the integral coordinates corresponding to a linear index.
const Lattice & lattice() const
The super lattice.
const Structure & prim() const
const SupercellSymInfo & sym_info() const
const xtal::UnitCellIndexConverter & unitcell_index_converter() const
UnitCellIndexConverter for this superlattice/primlattice pair Used to convert from lattice translatio...
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
const UnitCell & unitcell() const
UnitCell reset_tiling_unit(const Lattice ¤t_tiling_unit, const Lattice &new_tiling_unit) const
Finds a new UnitCell with values relative to the given tiling unit.
std::pair< bool, Eigen::Matrix3d > is_superlattice(const Lattice &scel, const Lattice &unit, double tol)
Check if scel is a superlattice of unitcell unit and some integer transformation matrix T.
xtal::Coordinate copy_apply(const xtal::SymOp &op, xtal::Coordinate coord)
Copy and apply SymOp to a Coordinate.
std::vector< UnitCell > make_lattice_points(const Eigen::Matrix3l &transformation_matrix)
std::pair< OpIterator, Eigen::Matrix3d > is_equivalent_superlattice(const Object &scel, const Object &unit, OpIterator begin, OpIterator end, double tol)
Configuration fill_supercell(Configuration const &motif, std::shared_ptr< Supercell const > const &shared_supercell)
DoFSpecsType const & get(DoFKey const &key, BasisFunctionSpecs const &basis_function_specs)
bool is_valid_sub_configuration(xtal::Lattice const &sub_configuration_lattice, Supercell const &supercell)
INDEX_TYPE Index
For long integer indexing: