CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
Lattice Enumerators

Detailed Description

Enumerates Lattice.

Namespaces

 CASM::HermiteCounter_impl
 

Classes

class  CASM::LatticeEnumEquivalents
 Enumerate equivalent Lattics, given a SymGroup. More...
 
class  CASM::ScelEnumProps
 Data structure for holding supercell enumeration properties. More...
 
class  CASM::HermiteCounter
 
class  CASM::SupercellEnumerator< UnitType >
 A fake container of supercell matrices. More...
 
class  CASM::SupercellIterator< UnitType >
 Iterators used with SupercellEnumerator. More...
 

Functions

Eigen::Matrix3i CASM::make_unit_cell (PrimClex &primclex, const jsonParser &json)
 Read unit cell transformation matrix from JSON input. More...
 
ScelEnumProps CASM::make_scel_enum_props (PrimClex &primclex, const jsonParser &input)
 Make a ScelEnumProps object from JSON input. More...
 
template<typename UnitType >
Eigen::Matrix3i CASM::enforce_min_volume (const UnitType &unit, const Eigen::Matrix3i &T, const SymGroup &point_grp, Index volume, bool fix_shape=false)
 Return a transformation matrix that ensures a supercell of at least some volume. More...
 
template<>
Eigen::Matrix3i CASM::enforce_min_volume< Lattice > (const Lattice &unit, const Eigen::Matrix3i &T, const SymGroup &point_grp, Index volume, bool fix_shape)
 
Eigen::Matrix3i CASM::canonical_hnf (const Eigen::Matrix3i &T, const SymGroup &effective_pg, const Lattice &ref_lattice)
 Return canonical hermite normal form of the supercell matrix, and op used to find it. More...
 
 CASM::SupercellIterator< UnitType >::SupercellIterator (const SupercellEnumerator< UnitType > &enumerator, int volume, int dims)
 
SupercellIterator< UnitType > & CASM::SupercellIterator< UnitType >::operator= (const SupercellIterator< UnitType > &B)
 
bool CASM::SupercellIterator< UnitType >::operator== (const SupercellIterator< UnitType > &B) const
 Iterator comparison. More...
 
bool CASM::SupercellIterator< UnitType >::operator!= (const SupercellIterator< UnitType > &B) const
 Iterator comparison. More...
 
reference CASM::SupercellIterator< UnitType >::operator* () const
 Access the supercell. More...
 
pointer CASM::SupercellIterator< UnitType >::operator-> () const
 Access the supercell. More...
 
HermiteCounter::value_type CASM::SupercellIterator< UnitType >::volume () const
 current volume More...
 
Eigen::Matrix3i CASM::SupercellIterator< UnitType >::matrix () const
 constructed supercell matrix More...
 
const SupercellEnumerator
< UnitType > & 
CASM::SupercellIterator< UnitType >::enumerator () const
 const reference to the SupercellEnumerator this is iterating with More...
 
SupercellIterator< UnitType > & CASM::SupercellIterator< UnitType >::operator++ ()
 Prefix increment operator. Increment to next unique supercell. More...
 
void CASM::SupercellIterator< UnitType >::_increment ()
 Postfix increment operator. Increment to next unique supercell. More...
 
const UnitType & CASM::SupercellEnumerator< UnitType >::unit () const
 Access the unit the is being made into supercells. More...
 
const Lattice & CASM::SupercellEnumerator< UnitType >::lattice () const
 Access the unit lattice. More...
 
const SymGroup & CASM::SupercellEnumerator< UnitType >::point_group () const
 Access the unit point group. More...
 
const Eigen::Matrix3i & CASM::SupercellEnumerator< UnitType >::gen_mat () const
 Get the transformation matrix that's being applied to the unit vectors. More...
 
int CASM::SupercellEnumerator< UnitType >::dimension () const
 Get the dimensions of the enumerator (1D, 2D or 3D) More...
 
size_type CASM::SupercellEnumerator< UnitType >::begin_volume () const
 Get the beginning volume. More...
 
size_type CASM::SupercellEnumerator< UnitType >::end_volume () const
 Get the end volume. More...
 
const_iterator CASM::SupercellEnumerator< UnitType >::begin () const
 A const iterator to the beginning volume, specify here how the iterator should jump through the enumeration. More...
 
const_iterator CASM::SupercellEnumerator< UnitType >::end () const
 A const iterator to the past-the-last volume. More...
 
const_iterator CASM::SupercellEnumerator< UnitType >::cbegin () const
 A const iterator to the beginning volume. More...
 
const_iterator CASM::SupercellEnumerator< UnitType >::cend () const
 A const iterator to the past-the-last volume. More...
 
const_iterator CASM::SupercellEnumerator< UnitType >::citerator (size_type volume) const
 A const iterator to a specified volume. More...
 

Function Documentation

template<typename UnitType >
void CASM::SupercellIterator< UnitType >::_increment ( )
private

Postfix increment operator. Increment to next unique supercell.

Uses _try_increment until the next unique supercell is found.

Definition at line 571 of file SupercellEnumerator.hh.

template<typename UnitType >
SupercellEnumerator< UnitType >::const_iterator CASM::SupercellEnumerator< UnitType >::begin ( ) const

A const iterator to the beginning volume, specify here how the iterator should jump through the enumeration.

Definition at line 641 of file SupercellEnumerator.hh.

template<typename UnitType >
SupercellEnumerator< UnitType >::size_type CASM::SupercellEnumerator< UnitType >::begin_volume ( ) const

Get the beginning volume.

Definition at line 623 of file SupercellEnumerator.hh.

Eigen::Matrix3i canonical_hnf ( const Eigen::Matrix3i &  T,
const SymGroup &  effective_pg,
const Lattice &  ref_lattice 
)

Return canonical hermite normal form of the supercell matrix, and op used to find it.

Return canonical hermite normal form of the supercell matrix.

Returns
Eigen::Matrix3i of H in canonical form
Parameters
TA supercell matrix (Eigen::Matrix3i), such that S = U*T, where S is the superlattice and U the unit lattice, as column vector matrices
ref_latticeThe lattice the transformation matrix T is meant to be acting on
effective_pgGroup of symmetry operations to use for determining whether a canonical HNF matrix has been found. This is probably the point group of a structure or configuration Canonical form is such that T is in Hermite normal form (as from CASM::hermite_normal_form), and the unrolled coefficients
[a f e]
[0 b d] -> abcdef
[0 0 c]
form the highest lexicographic order when considering equivalent superlattices by point group operations.
  • Equivalent superlattices can be obtained using point group operations: S' = op*S = U*H*V, where V is integer and has determinant +/- 1
  • Substituting S = U*T, we have op*U*T = U*H*V.
  • Or H*V = U.inverse*op*U*T, which is the hermite normal form of U.inverse*op*U*T
  • So T is canonical if it is in hermite normal form and for all point group operations it has a higher lexicographic order than the resulting H

Definition at line 653 of file SupercellEnumerator.cc.

template<typename UnitType >
SupercellEnumerator< UnitType >::const_iterator CASM::SupercellEnumerator< UnitType >::cbegin ( ) const

A const iterator to the beginning volume.

Definition at line 651 of file SupercellEnumerator.hh.

template<typename UnitType >
SupercellEnumerator< UnitType >::const_iterator CASM::SupercellEnumerator< UnitType >::cend ( ) const

A const iterator to the past-the-last volume.

Definition at line 656 of file SupercellEnumerator.hh.

template<typename UnitType >
SupercellEnumerator< UnitType >::const_iterator CASM::SupercellEnumerator< UnitType >::citerator ( size_type  volume) const

A const iterator to a specified volume.

Definition at line 661 of file SupercellEnumerator.hh.

template<typename UnitType >
int CASM::SupercellEnumerator< UnitType >::dimension ( ) const

Get the dimensions of the enumerator (1D, 2D or 3D)

Definition at line 610 of file SupercellEnumerator.hh.

template<typename UnitType >
SupercellEnumerator< UnitType >::const_iterator CASM::SupercellEnumerator< UnitType >::end ( ) const

A const iterator to the past-the-last volume.

Definition at line 646 of file SupercellEnumerator.hh.

template<typename UnitType >
SupercellEnumerator< UnitType >::size_type CASM::SupercellEnumerator< UnitType >::end_volume ( ) const

Get the end volume.

Definition at line 636 of file SupercellEnumerator.hh.

template<typename UnitType >
Eigen::Matrix3i CASM::enforce_min_volume ( const UnitType &  unit,
const Eigen::Matrix3i &  T,
const SymGroup &  point_grp,
Index  volume,
bool  fix_shape = false 
)

Return a transformation matrix that ensures a supercell of at least some volume.

Parameters
unitThe thing that is tiled to form supercells. May not be the primitive cell.
TThe transformation matrix of the unit, relative the prim. The volume of the unit is determined from T.determinant().
point_grpPoint group operations to use for checking supercell uniqueness.
volumeThe beginning volume to enumerate
end_volumeThe past-the-last volume to enumerate
fix_shapeIf true, enforce that S = T*m*I, where m is a scalar and I is the identity matrix.
Returns
M, a transformation matrix, S = T*M, where M is an integer matrix and S.determinant() >= volume
template<>
Eigen::Matrix3i CASM::enforce_min_volume< Lattice > ( const Lattice &  unit,
const Eigen::Matrix3i &  T,
const SymGroup &  point_grp,
Index  volume,
bool  fix_shape 
)

Definition at line 582 of file SupercellEnumerator.cc.

template<typename UnitType >
const SupercellEnumerator< UnitType > & CASM::SupercellIterator< UnitType >::enumerator ( ) const

const reference to the SupercellEnumerator this is iterating with

Definition at line 547 of file SupercellEnumerator.hh.

template<typename UnitType >
const Eigen::Matrix3i & CASM::SupercellEnumerator< UnitType >::gen_mat ( ) const

Get the transformation matrix that's being applied to the unit vectors.

Definition at line 605 of file SupercellEnumerator.hh.

template<typename UnitType >
const Lattice & CASM::SupercellEnumerator< UnitType >::lattice ( ) const

Access the unit lattice.

Definition at line 595 of file SupercellEnumerator.hh.

ScelEnumProps CASM::make_scel_enum_props ( PrimClex &  primclex,
const jsonParser &  input 
)

Make a ScelEnumProps object from JSON input.

  • min: int (default=1)
  • max: int (default=max existing supercell size)
  • dirs: string, (default="abc")
  • unit_cell: 3x3 matrix of int, or string (default=identity matrix)
    {
    "min" : 1,
    "max" : 5,
    "dirs" : "abc",
    "unit_cell" : [
    [0, 0, 0],
    [0, 0, 0],
    [0, 0, 0]
    ],
    "unit_cell" : "SCEL...",
    }

Definition at line 68 of file SupercellEnumerator.cc.

Eigen::Matrix3i CASM::make_unit_cell ( PrimClex &  primclex,
const jsonParser &  input 
)

Read unit cell transformation matrix from JSON input.

Input json with one of the following forms:

  • {
    "unit_cell" : [
    [X, X, X],
    [X, X, X],
    [X, X, X]
    ]
    }
  • { "unit_cell" : "SCEL..."}
  • If input is null or does not contain "unit_cell", returns identity matrix.

Definition at line 28 of file SupercellEnumerator.cc.

template<typename UnitType >
Eigen::Matrix3i CASM::SupercellIterator< UnitType >::matrix ( ) const

constructed supercell matrix

Definition at line 541 of file SupercellEnumerator.hh.

template<typename UnitType>
bool CASM::SupercellIterator< UnitType >::operator!= ( const SupercellIterator< UnitType > &  B) const

Iterator comparison.

Definition at line 513 of file SupercellEnumerator.hh.

template<typename UnitType >
SupercellIterator< UnitType >::reference CASM::SupercellIterator< UnitType >::operator* ( ) const

Access the supercell.

Definition at line 518 of file SupercellEnumerator.hh.

template<typename UnitType >
SupercellIterator< UnitType > & CASM::SupercellIterator< UnitType >::operator++ ( )

Prefix increment operator. Increment to next unique supercell.

Definition at line 553 of file SupercellEnumerator.hh.

template<typename UnitType >
SupercellIterator< UnitType >::pointer CASM::SupercellIterator< UnitType >::operator-> ( ) const

Access the supercell.

Definition at line 527 of file SupercellEnumerator.hh.

template<typename UnitType>
SupercellIterator< UnitType > & CASM::SupercellIterator< UnitType >::operator= ( const SupercellIterator< UnitType > &  B)

Definition at line 498 of file SupercellEnumerator.hh.

template<typename UnitType>
bool CASM::SupercellIterator< UnitType >::operator== ( const SupercellIterator< UnitType > &  B) const

Iterator comparison.

Definition at line 508 of file SupercellEnumerator.hh.

template<typename UnitType >
const SymGroup & CASM::SupercellEnumerator< UnitType >::point_group ( ) const

Access the unit point group.

Definition at line 600 of file SupercellEnumerator.hh.

template<typename UnitType>
CASM::SupercellIterator< UnitType >::SupercellIterator ( const SupercellEnumerator< UnitType > &  enumerator,
int  volume,
int  dims 
)

Definition at line 474 of file SupercellEnumerator.hh.

template<typename UnitType >
const UnitType & CASM::SupercellEnumerator< UnitType >::unit ( ) const

Access the unit the is being made into supercells.

Definition at line 590 of file SupercellEnumerator.hh.

template<typename UnitType >
HermiteCounter::value_type CASM::SupercellIterator< UnitType >::volume ( ) const

current volume

Definition at line 536 of file SupercellEnumerator.hh.