14 template<
typename CoordType,
typename CoordType2>
19 double min_dist, dist;
24 lat_point(
FRAC) = grid_count();
27 CoordType tatom(basis[i] + lat_point);
32 dist = tatom.dist(basis[j]);
36 if(min_dist < min_radius) {
39 if(min_dist < max_radius) {
55 template<
typename LatIterator,
typename SymOpIterator>
58 SymOpIterator op_begin,
59 SymOpIterator op_end) {
62 for(
auto it = ++begin; it != end; ++it) {
64 for(
auto op_it = op_begin; op_it != op_end; ++op_it) {
66 if(std::abs(
volume(test)) < std::abs(
volume(tmp_best))) {
76 template<
typename SymOpIterator,
typename SymOpOutputIterator>
80 SymOpOutputIterator result,
81 double pg_tol)
const {
84 return std::copy_if(begin, end, result, is_equiv);
92 template<
typename Object,
typename OpIterator>
100 std::pair<bool, Eigen::MatrixXi> res;
101 for(
auto it = begin; it != end; ++it) {
104 return std::make_pair(it, res.second);
107 return std::make_pair(end, res.second);
Lattice superdupercell(const Lattice &lat1, const Lattice &lat2)
returns Lattice that is smallest possible supercell of both input Lattice
A Counter allows looping over many incrementing variables in one loop.
void push_back(const T &toPush)
Object copy_apply(const Transform &f, Object obj, Args &&...args)
Putting all the Lattice comparisons in one place.
Array< CoordType > gridstruc_build(double max_radius, double min_radius, Array< CoordType > basis, CoordType2 lat_point)
Make a grid of lattice sites such that min_radius <= distance <= max_radius from. ...
EigenIndex Index
For long integer indexing:
SymOpOutputIterator find_invariant_subgroup(SymOpIterator begin, SymOpIterator end, SymOpOutputIterator result, double pg_tol=TOL) const
Output the SymOp that leave this lattice invariant.
Eigen::Vector3i enclose_sphere(double radius) const
std::pair< bool, Eigen::MatrixXi > is_supercell(const Lattice &scel, const Lattice &unit, double tol)
Check if scel is a supercell of unitcell unit and some integer transformation matrix T...
double volume(const Lattice &lat)
Returns the volume of a Lattice.