CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <NeighborList.hh>
The PrimNeighborList gives the coordinates of UnitCell that are neighbors of the origin UnitCell.
Definition at line 39 of file NeighborList.hh.
Public Types | |
typedef Eigen::Matrix3l | Matrix3Type |
typedef Eigen::Matrix< long, Eigen::Dynamic, 1 > | VectorXType |
typedef std::set< UnitCell, std::function< bool(UnitCell, UnitCell)> > | NeighborSet |
typedef NeighborSet::size_type | size_type |
typedef NeighborSet::const_iterator | const_iterator |
typedef std::set< int > | SublatIndices |
Public Member Functions | |
Matrix3Type | weight_matrix () const |
Return the weighting matrix W used to define the canonical order. More... | |
void | expand (UnitCell const &uc) |
Expand the neighbor list to include the given UnitCellCoord. More... | |
void | expand (UnitCellCoord const &uccoord) |
Expand the neighbor list to include the given UnitCellCoord. More... | |
size_type | size () const |
size of the neighborhood of unit cells More... | |
const_iterator | begin () const |
const_iterator over the neighborhood of unit cells More... | |
const_iterator | end () const |
const_iterator over the neighborhood of unit cells More... | |
const_iterator | cbegin () const |
const_iterator over the neighborhood of unit cells More... | |
const_iterator | cend () const |
const_iterator over the neighborhood of unit cells More... | |
const SublatIndices & | sublat_indices () const |
pair of const_iterators over a range of indices of sublattices to include More... | |
Scalar | neighbor_index (UnitCellCoord const &_ucc) |
Get neighborlist index of UnitCellCoord. More... | |
std::unique_ptr< PrimNeighborList > | clone () const |
Clone. More... | |
template<typename SublatIterator > | |
PrimNeighborList (const Matrix3Type &W, SublatIterator begin, SublatIterator end) | |
Constructor, specifying the weighting matrix to use and the indices of sublattices to include. More... | |
template<typename UnitCellCoordIterator > | |
void | expand (UnitCellCoordIterator begin, UnitCellCoordIterator end) |
Expand the neighbor list to include the given range of UnitCellCoord. More... | |
template<typename UnitCellCoordIterator > | |
std::vector< Scalar > | neighbor_indices (UnitCellCoordIterator _begin, UnitCellCoordIterator _end) |
Get neighborlist indices of a collection of UnitCells, stored in. More... | |
Static Public Member Functions | |
static Matrix3Type | make_weight_matrix (const Eigen::Matrix3d lat_column_mat, Index max_element_value, double tol) |
Returns a NeighborList weighting matrix appropriate for a particular lattice. More... | |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Index | Scalar |
Private Member Functions | |
Scalar | _neighbor_index (UnitCellCoord const &_ucc) const |
Get neighborlist index of UnitCellCoord. More... | |
bool | _expand (UnitCell const &uc) |
Expand the neighbor list to include the given UnitCell, but do not do additional updates returns true if added UnitCell is new. More... | |
bool | _expand (UnitCellCoord const &uccoord) |
Expand the neighbor list to include the given UnitCellCoord, but do not do additional updates returns true if added UnitCellCoord is new. More... | |
void | _expand (Scalar prev_range) |
Ensure that all intermediate UnitCell are included in our neighborhood. More... | |
Scalar | _dist (const UnitCell &A) const |
Calculate A.transpose()*M*A. More... | |
VectorXType | _add_dist (const UnitCell &A) const |
Return [r, i, j, k], where r = _dist(A) More... | |
bool | _compare_unitcell (const UnitCell &A, const UnitCell &B) const |
Convert [i,j,k] -> [r,i,j,k] and then lexicographically compare. More... | |
Static Private Member Functions | |
static bool | _compare_vec (const VectorXType &A, const VectorXType &B) |
Lexicographical comparison. More... | |
Private Attributes | |
Matrix3Type | m_W |
Weighting matrix. More... | |
Eigen::MatrixXd | m_Uinv |
Cholesky decomposition: W = U.transpose()*U, useful for getting bounding box. More... | |
NeighborSet | m_neighborhood |
the neighborhood of [i, j, k] More... | |
Scalar | m_range |
the neighborhood, m_neighborhood, contains all UnitCell with r <= m_range More... | |
SublatIndices | m_sublat_indices |
the indices of sublattices that should be included More... | |
typedef NeighborSet::const_iterator CASM::PrimNeighborList::const_iterator |
Definition at line 49 of file NeighborList.hh.
Definition at line 44 of file NeighborList.hh.
typedef std::set<UnitCell, std::function<bool(UnitCell, UnitCell)> > CASM::PrimNeighborList::NeighborSet |
Definition at line 47 of file NeighborList.hh.
typedef NeighborSet::size_type CASM::PrimNeighborList::size_type |
Definition at line 48 of file NeighborList.hh.
typedef std::set<int> CASM::PrimNeighborList::SublatIndices |
Definition at line 50 of file NeighborList.hh.
typedef Eigen::Matrix<long, Eigen::Dynamic, 1> CASM::PrimNeighborList::VectorXType |
Definition at line 45 of file NeighborList.hh.
CASM::PrimNeighborList::PrimNeighborList | ( | const Matrix3Type & | W, |
SublatIterator | begin, | ||
SublatIterator | end | ||
) |
Constructor, specifying the weighting matrix to use and the indices of sublattices to include.
Constructor.
W | A positive-definite weighting matrix for calculating the weighted squared L2 norm of the unitcell indices. |
Definition at line 244 of file NeighborList.hh.
|
private |
Return [r, i, j, k], where r = _dist(A)
Definition at line 146 of file NeighborList.cc.
|
private |
Convert [i,j,k] -> [r,i,j,k] and then lexicographically compare.
Definition at line 155 of file NeighborList.cc.
|
staticprivate |
Lexicographical comparison.
Definition at line 161 of file NeighborList.cc.
|
private |
Calculate A.transpose()*M*A.
Definition at line 141 of file NeighborList.cc.
|
private |
Ensure that all intermediate UnitCell are included in our neighborhood.
Definition at line 48 of file NeighborList.cc.
|
private |
Expand the neighbor list to include the given UnitCell, but do not do additional updates returns true if added UnitCell is new.
Expand the neighbor list to include the given UnitCellCoord.
Definition at line 42 of file NeighborList.cc.
|
private |
Expand the neighbor list to include the given UnitCellCoord, but do not do additional updates returns true if added UnitCellCoord is new.
Expand the neighbor list to include the given UnitCellCoord.
Definition at line 37 of file NeighborList.cc.
|
private |
Get neighborlist index of UnitCellCoord.
_ucc,without | expanding neighborhood |
Definition at line 132 of file NeighborList.cc.
PrimNeighborList::const_iterator CASM::PrimNeighborList::begin | ( | ) | const |
const_iterator over the neighborhood of unit cells
Definition at line 97 of file NeighborList.cc.
PrimNeighborList::const_iterator CASM::PrimNeighborList::cbegin | ( | ) | const |
const_iterator over the neighborhood of unit cells
Definition at line 107 of file NeighborList.cc.
PrimNeighborList::const_iterator CASM::PrimNeighborList::cend | ( | ) | const |
const_iterator over the neighborhood of unit cells
Definition at line 112 of file NeighborList.cc.
std::unique_ptr< PrimNeighborList > CASM::PrimNeighborList::clone | ( | ) | const |
Clone.
Definition at line 212 of file NeighborList.cc.
PrimNeighborList::const_iterator CASM::PrimNeighborList::end | ( | ) | const |
const_iterator over the neighborhood of unit cells
Definition at line 102 of file NeighborList.cc.
void CASM::PrimNeighborList::expand | ( | UnitCell const & | uc | ) |
Expand the neighbor list to include the given UnitCellCoord.
Definition at line 23 of file NeighborList.cc.
void CASM::PrimNeighborList::expand | ( | UnitCellCoord const & | uccoord | ) |
Expand the neighbor list to include the given UnitCellCoord.
Definition at line 18 of file NeighborList.cc.
void CASM::PrimNeighborList::expand | ( | UnitCellCoordIterator | begin, |
UnitCellCoordIterator | end | ||
) |
Expand the neighbor list to include the given range of UnitCellCoord.
Definition at line 284 of file NeighborList.hh.
|
static |
Returns a NeighborList weighting matrix appropriate for a particular lattice.
Returns the integer weight matrix, M, closest to lat.transpose()*lat with all elements less than max_element_value.
Definition at line 183 of file NeighborList.cc.
PrimNeighborList::Scalar CASM::PrimNeighborList::neighbor_index | ( | UnitCellCoord const & | _ucc | ) |
Get neighborlist index of UnitCellCoord.
_ucc,expanding | neighborhood if necessary |
Definition at line 124 of file NeighborList.cc.
std::vector< PrimNeighborList::Scalar > CASM::PrimNeighborList::neighbor_indices | ( | UnitCellCoordIterator | _begin, |
UnitCellCoordIterator | _end | ||
) |
Get neighborlist indices of a collection of UnitCells, stored in.
Get neighborlist indices of a of UnitCells, passed by begin and end iterator.
_uc_container |
Definition at line 305 of file NeighborList.hh.
PrimNeighborList::size_type CASM::PrimNeighborList::size | ( | ) | const |
size of the neighborhood of unit cells
Definition at line 92 of file NeighborList.cc.
const PrimNeighborList::SublatIndices & CASM::PrimNeighborList::sublat_indices | ( | ) | const |
pair of const_iterators over a range of indices of sublattices to include
const_iterator over the neighborhood of unit cells
Definition at line 117 of file NeighborList.cc.
PrimNeighborList::Matrix3Type CASM::PrimNeighborList::weight_matrix | ( | ) | const |
Return the weighting matrix W used to define the canonical order.
Return the weighting matrix used to define the canonical order.
Definition at line 13 of file NeighborList.cc.
|
private |
the neighborhood of [i, j, k]
Definition at line 151 of file NeighborList.hh.
|
private |
the neighborhood, m_neighborhood, contains all UnitCell with r <= m_range
Definition at line 155 of file NeighborList.hh.
|
private |
the indices of sublattices that should be included
Definition at line 158 of file NeighborList.hh.
|
private |
Cholesky decomposition: W = U.transpose()*U, useful for getting bounding box.
Definition at line 148 of file NeighborList.hh.
|
private |
Weighting matrix.
Definition at line 144 of file NeighborList.hh.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef Index CASM::PrimNeighborList::Scalar |
Definition at line 43 of file NeighborList.hh.