5 m_L1(
Eigen::
Matrix3d(_ideal.get_reduced_cell().lat_column_mat())), m_L2(
Eigen::
Matrix3d(_strained.get_reduced_cell().lat_column_mat())),
6 m_scale(pow(
std::abs(m_L2.determinant() / m_L1.determinant()), 1.0 / 3.0)), m_atomic_vol(
std::abs(m_L2.determinant() / (double)num_atoms)), m_tol(_tol), m_cost(1e20),
51 m_N = DMatType::Identity(3, 3);
81 double tcost = max_cost;
89 if(tcost < max_cost) {
101 if(!(tcost < max_cost)) {
120 Eigen::Matrix3d cache = 0.5 * (F.transpose() * F / pow(std::abs(F.determinant()), 2.0 / 3.0) - Eigen::Matrix3d::Identity(3, 3));
123 return std::pow(std::abs(relaxed_atomic_vol), 2.0 / 3.0) * cache.squaredNorm() / 7.795554179;
Eigen::Matrix< int, 3, 3, Eigen::DontAlign > IMatType
double _calc_strain_cost() const
const Eigen::Matrix3d & lat_column_mat() const
3x3 matrix with lattice vectors as its columne
LatticeMap(const Lattice &_ideal, const Lattice &_strained, Index _num_atoms, double _tol, int _range)
const Eigen::Matrix3d & inv_lat_column_mat() const
Inverse of Lattice::lat_column_mat() It is the transformation matrix 'C2F', such that f = C2F * c whe...
double strain_cost() const
const LatticeMap & best_strain_mapping() const
EigenIndex Index
For long integer indexing:
Eigen::Matrix< typename Derived::Scalar, Derived::RowsAtCompileTime, Derived::ColsAtCompileTime > inverse(const Eigen::MatrixBase< Derived > &M)
Return the integer inverse matrix of an invertible integer matrix.
const LatticeMap & _next_mapping_better_than(double max_cost) const
static double calc_strain_cost(const Eigen::Matrix3d &F, double relaxed_atomic_vol)
Eigen::Matrix< double, 3, 3, Eigen::DontAlign > DMatType
const LatticeMap & next_mapping_better_than(double max_cost) const
EigenCounter< IMatType > m_inv_count
bool almost_equal(const GenericCluster< CoordType > &LHS, const GenericCluster< CoordType > &RHS, double tol)