CASM
AClustersApproachtoStatisticalMechanics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
CASM::Supercell Class Reference

#include <Supercell.hh>

+ Inheritance diagram for CASM::Supercell:

Detailed Description

Represents a supercell of the primitive parent crystal structure.

Definition at line 37 of file Supercell.hh.

Public Types

typedef
boost::container::stable_vector
< Configuration
ConfigList
 
typedef ConfigIterator
< Configuration, PrimClex
config_iterator
 
typedef ConfigIterator< const
Configuration, const PrimClex
config_const_iterator
 
typedef PermuteIterator permute_const_iterator
 

Public Member Functions

 Supercell (const Supercell &RHS)
 
 Supercell (PrimClex *_prim, const Lattice &superlattice)
 
 Supercell (PrimClex *_prim, const Eigen::Ref< const Eigen::Matrix3i > &superlattice_matrix)
 
Index get_linear_index (const Site &site, double tol=TOL) const
 
Index get_linear_index (const Coordinate &coord, double tol=TOL) const
 
Index find (const UnitCellCoord &bijk) const
 
Coordinate coord (const UnitCellCoord &bijk) const
 
Coordinate coord (Index linear_ind) const
 
ReturnArray< int > max_allowed_occupation () const
 
Configuration configuration (const BasicStructure< Site > &structure_to_config, double tol=TOL)
 
Structure superstructure () const
 
Structure superstructure (const Configuration &config) const
 
Structure superstructure (Index config_index) const
 Returns a structure corresponding to the specified configuration. More...
 
Eigen::MatrixXd real_coordinates () const
 
Eigen::MatrixXd recip_coordinates () const
 
PrimClexget_primclex () const
 
const PrimGridprim_grid () const
 
const Structureget_prim () const
 
Index volume () const
 Return number of primitive cells that fit inside of *this. More...
 
Index basis_size () const
 
Index num_sites () const
 
UnitCellCoord uccoord (Index i) const
 
const Eigen::MatrixXcd & fourier_matrix () const
 
const Eigen::MatrixXcd & phase_factor () const
 
const Eigen::MatrixXd & k_mesh () const
 
SymGroupRepID permutation_symrep_ID () const
 
SymGroupRep const & permutation_symrep () const
 
Index get_b (Index i) const
 
const Eigen::Matrix3i & get_transf_mat () const
 
const Latticeget_real_super_lattice () const
 
const Latticeget_recip_prim_lattice () const
 
const SuperNeighborListnlist () const
 Returns the SuperNeighborList. More...
 
ConfigListget_config_list ()
 
const ConfigListget_config_list () const
 
const Configurationget_config (Index i) const
 
Configurationget_config (Index i)
 
config_iterator config_begin ()
 
config_iterator config_end ()
 
config_const_iterator config_cbegin () const
 
config_const_iterator config_cend () const
 
Index get_id () const
 
std::string get_name () const
 Return supercell name. More...
 
const SymGroupfactor_group () const
 
const Permutationfactor_group_permute (Index i) const
 
const Permutationtranslation_permute (Index i) const
 
const Array< Permutation > & translation_permute () const
 
permute_const_iterator translate_begin () const
 Begin iterator over pure translational permutations. More...
 
permute_const_iterator translate_end () const
 End iterator over pure translational permutations. More...
 
permute_const_iterator permute_begin () const
 
permute_const_iterator permute_end () const
 
permute_const_iterator permute_it (Index fg_index, Index trans_index) const
 
fs::path get_path () const
 Return path to supercell directory. More...
 
Index amount_selected () const
 Count how many configs are selected in *this. More...
 
bool is_canonical () const
 
SymOp to_canonical () const
 
SymOp from_canonical () const
 
Supercellcanonical_form () const
 
bool is_equivalent (const Supercell &B) const
 
bool operator< (const Supercell &B) const
 
void set_id (Index id)
 
void generate_factor_group () const
 
void generate_permutations () const
 
void generate_reference_config_props (Index config_index)
 Calculate reference properties for a configuration (must have reference states in appropriate directories) More...
 
void generate_all_reference_config_props ()
 Calculate reference properties for each configuration in *this (see above) More...
 
void generate_delta_config_props (Index config_index)
 Calculate delta properties for a configuration (must have read in calculated and reference properties) More...
 
void generate_all_delta_config_props ()
 Calculate delta properties for each configuration in *this (see above) More...
 
void generate_fourier_matrix ()
 Structure Factor. More...
 
void generate_fourier_matrix (const Eigen::MatrixXd &real_coordinates, const Eigen::MatrixXd &recip_coordinates)
 
Array< bool > is_commensurate_kpoint (const Eigen::MatrixXd &recip_coordinates, double tol=TOL)
 
void populate_structure_factor ()
 
void populate_structure_factor (const Index &config_index)
 
void enumerate_perturb_configurations (const std::string &background, fs::path CSPECS, double tol=TOL, bool verbose=false, bool print=false)
 
void enumerate_perturb_configurations (Configuration background_config, fs::path CSPECS, double tol=TOL, bool verbose=false, bool print=false)
 
void enumerate_perturb_configurations (const Structure &background, fs::path CSPECS, double tol=TOL, bool verbose=false, bool print=false)
 
void enumerate_perturb_configurations (Configuration background_config, const SiteOrbitree &background_tree, Array< Array< Array< Index > > > &config_index, Array< Array< Array< permute_const_iterator > > > &config_symop_index, jsonParser &jsonsrc, double tol=TOL)
 
bool contains_config (const Configuration &config) const
 
bool contains_config (const Configuration &config, Index &index) const
 
bool add_config (const Configuration &config)
 
bool add_config (const Configuration &config, Index &index, Supercell::permute_const_iterator &permute_it)
 
bool add_canon_config (const Configuration &config, Index &index)
 
std::pair
< config_const_iterator, bool > 
insert_config (const Configuration &config)
 Insert a configuration that may be non-canonical. More...
 
std::pair
< config_const_iterator, bool > 
insert_canon_config (const Configuration &config)
 Insert a configuration that is known to be canonical. More...
 
config_const_iterator find (const Configuration &config) const
 
void read_config_list (const jsonParser &json)
 
template<typename ConfigIterType >
void add_unique_canon_configs (ConfigIterType it_begin, ConfigIterType it_end)
 
template<typename ConfigIterType >
void add_configs (ConfigIterType it_begin, ConfigIterType it_end)
 
void read_relaxed_structure (Index configNum, const Lattice &home_lattice)
 
void read_relaxed_structure (Index configNum)
 
void read_clex_relaxations (const Lattice &home_lattice)
 
bool is_supercell_of (const Structure &structure) const
 
bool is_supercell_of (const Structure &structure, Eigen::Matrix3d &multimat) const
 
ReturnArray< int > vacant () const
 
void print_bijk (std::ostream &stream)
 
void print_sublat_to_comp (std::ostream &stream)
 Old CASM style corr.in output for all the configurations in *this supercell. More...
 
void print_PERTURB_json (std::ofstream &file, const Configuration &background_config, const Array< Array< Array< Index > > > &perturb_config_index, const Array< Array< Array< permute_const_iterator > > > &perturb_config_symop_index, bool print_config_name) const
 
jsonParserwrite_config_list (jsonParser &json)
 Call Configuration::write out every configuration in supercell. More...
 
void printUCC (std::ostream &stream, COORD_TYPE mode, UnitCellCoord ucc, char term=0, int prec=7, int pad=5) const
 
bool operator> (const Supercell &B) const
 
bool operator<= (const Supercell &B) const
 
bool operator>= (const Supercell &B) const
 
bool operator== (const Supercell &B) const
 
bool operator!= (const Supercell &B) const
 

Protected Member Functions

const Supercellderived () const
 
bool _ne (const Supercell &B) const
 

Private Member Functions

void generate_fourier_matrix (const Eigen::MatrixXd &real_coordinates, const Eigen::MatrixXd &recip_coordinates, const bool &override)
 
void generate_phase_factor (const Eigen::MatrixXd &shift_vectors, const Array< bool > &is_commensurate, const bool &override)
 
bool _eq (const Supercell &B) const
 
void _add_canon_config (const Configuration &config)
 
void _generate_name () const
 

Private Attributes

PrimClexprimclex
 
Lattice real_super_lattice
 
Lattice recip_prim_lattice
 
PrimGrid m_prim_grid
 
PrimGrid recip_grid
 
SymGroupRepID m_perm_symrep_ID
 
SymGroup m_factor_group
 
std::string m_name
 unique name of the supercell based on hermite normal form (see _generate_name() ) More...
 
Eigen::MatrixXcd m_fourier_matrix
 
Eigen::MatrixXcd m_phase_factor
 
Eigen::MatrixXd m_k_mesh
 
notstd::cloneable_ptr
< SuperNeighborList
m_nlist
 
More...
 
Index m_nlist_size_at_construction
 
Supercellm_canonical
 Store a pointer to the canonical equivalent Supercell. More...
 
ConfigList config_list
 
std::map< const Configuration
*, Index, ConfigMapCompare
m_config_map
 
Eigen::Matrix3i transf_mat
 
double scaling
 
Index m_id
 index into PrimClex::supercell_list More...
 
friend Comparisons< Supercell >
 

Member Typedef Documentation

typedef boost::container::stable_vector<Configuration> CASM::Supercell::ConfigList

Definition at line 41 of file Supercell.hh.

Constructor & Destructor Documentation

CASM::Supercell::Supercell ( const Supercell RHS)

Definition at line 694 of file Supercell.cc.

CASM::Supercell::Supercell ( PrimClex _prim,
const Lattice superlattice 
)

Definition at line 725 of file Supercell.cc.

CASM::Supercell::Supercell ( PrimClex _prim,
const Eigen::Ref< const Eigen::Matrix3i > &  superlattice_matrix 
)

Definition at line 711 of file Supercell.cc.

Member Function Documentation

void CASM::Supercell::_add_canon_config ( const Configuration canon_config)
private

Adds to config_list, assuming 'canon_config' is in canonical form and not already there

Definition at line 638 of file Supercell.cc.

bool CASM::Supercell::_eq ( const Supercell B) const
private

Definition at line 1258 of file Supercell.cc.

void CASM::Supercell::_generate_name ( ) const
private

Definition at line 858 of file Supercell.cc.

bool CASM::Comparisons< Supercell >::_ne ( const Supercell B) const
inlineprotectedinherited

Definition at line 56 of file Comparisons.hh.

bool CASM::Supercell::add_canon_config ( const Configuration canon_config,
Index index 
)

Assumes 'canon_config' is in canonical form, adds to config_list if not already there. Location in config_list is stored in 'index'.

Definition at line 590 of file Supercell.cc.

bool CASM::Supercell::add_config ( const Configuration config)

Converts 'config' to canonical form, then adds to config_list if not already present. Location in config_list is stored in 'index'. Permutation that resulted in canonical form is stored in 'permute_it'. Return 'true' if new config, 'false' otherwise.

Might want to rewrite without using new canon_config for memory/speed issues.

Definition at line 568 of file Supercell.cc.

bool CASM::Supercell::add_config ( const Configuration config,
Index index,
Supercell::permute_const_iterator permute_it 
)

Definition at line 574 of file Supercell.cc.

Index CASM::Supercell::amount_selected ( ) const

Count how many configs are selected in *this.

Definition at line 874 of file Supercell.cc.

Index CASM::Supercell::basis_size ( ) const
inline

Definition at line 216 of file Supercell.hh.

Supercell & CASM::Supercell::canonical_form ( ) const

Definition at line 910 of file Supercell.cc.

Supercell::config_iterator CASM::Supercell::config_begin ( )

Definition at line 100 of file Supercell.cc.

Supercell::config_const_iterator CASM::Supercell::config_cbegin ( ) const

Definition at line 109 of file Supercell.cc.

Supercell::config_const_iterator CASM::Supercell::config_cend ( ) const

Definition at line 113 of file Supercell.cc.

Supercell::config_iterator CASM::Supercell::config_end ( )

Definition at line 104 of file Supercell.cc.

Configuration CASM::Supercell::configuration ( const BasicStructure< Site > &  structure_to_config,
double  tol = TOL 
)

Generate a Configuration from a Structure

  • Generally expected the user will first call Supercell::is_supercell_of(const Structure &structure, Matrix3<double> multimat)
  • tested OK for perfect prim coordinates, not yet tested with relaxed coordinates using 'tol'

Definition at line 955 of file Supercell.cc.

bool CASM::Supercell::contains_config ( const Configuration config) const

Checks if the Configuration 'config' is contained in Supercell::config_list. Only checks Configuration::occupation for equivalence. Does not check for symmetrically equivalent Configurations, so put your 'config' in canonical form first.

Definition at line 522 of file Supercell.cc.

bool CASM::Supercell::contains_config ( const Configuration config,
Index index 
) const

Checks if the Configuration 'config' is contained in Supercell::config_list. Only checks Configuration::configdof for equivalence. Does not check for symmetrically equivalent Configurations, so put your 'config' in canonical form first.

If equivalent found, 'index' contains it's index into config_list, else 'index' = config_list.size().

Definition at line 538 of file Supercell.cc.

Coordinate CASM::Supercell::coord ( const UnitCellCoord bijk) const

Definition at line 45 of file Supercell.cc.

Coordinate CASM::Supercell::coord ( Index  linear_ind) const

Definition at line 53 of file Supercell.cc.

const Supercell & CASM::Comparisons< Supercell >::derived ( ) const
inlineprotectedinherited

Definition at line 48 of file Comparisons.hh.

void CASM::Supercell::enumerate_perturb_configurations ( const std::string &  background,
fs::path  CSPECS,
double  tol = TOL,
bool  verbose = false,
bool  print = false 
)

enumerate_perturb_configurations, using filename of 'background' structure

Definition at line 211 of file Supercell.cc.

void CASM::Supercell::enumerate_perturb_configurations ( Configuration  background_config,
fs::path  CSPECS,
double  tol = TOL,
bool  verbose = false,
bool  print = false 
)

enumerate_perturb_configurations, using 'config' Configuration and 'CSPECS' to generate the 'background_config' and 'background_tree'. The factor group of the decorated config is used to generate the orbitree

Definition at line 225 of file Supercell.cc.

void CASM::Supercell::enumerate_perturb_configurations ( const Structure background,
fs::path  CSPECS,
double  tol = TOL,
bool  verbose = false,
bool  print = false 
)

enumerate_perturb_configurations, using 'background' Structure and 'CSPECS' to generate the 'background_config' and 'background_tree'.

Definition at line 383 of file Supercell.cc.

void CASM::Supercell::enumerate_perturb_configurations ( Configuration  background_config,
const SiteOrbitree background_tree,
Array< Array< Array< Index > > > &  config_index,
Array< Array< Array< permute_const_iterator > > > &  config_symop_index,
jsonParser jsonsrc,
double  tol = TOL 
)

Enumerate configurations that are perturbations of a 'background_config'. The 'perturbed' configurations differ from the 'background' structure by clusters in the 'background_tree'. 'tol' provides a tolerance for mapping the clusters to Configuration sites.

Enumerated configurations are added to 'Supercell::config_list' if they do not already exist there, using the 'permute_group' to check for equivalents.

Array< Array< Array<int> > > config_indices contains the mapping of [branch][orbit][decor] to config_list index Array< Array< Array<int> > > config_symop contains the index of the symop which mapped the config to canonical form

jsonsrc is a jsonParser (object type) describing the source of the enumerate configurations

Definition at line 407 of file Supercell.cc.

const SymGroup & CASM::Supercell::factor_group ( ) const

Definition at line 132 of file Supercell.cc.

const Permutation & CASM::Supercell::factor_group_permute ( Index  i) const

Definition at line 141 of file Supercell.cc.

Index CASM::Supercell::find ( const UnitCellCoord bijk) const

Definition at line 39 of file Supercell.cc.

Supercell::config_const_iterator CASM::Supercell::find ( const Configuration config) const

Definition at line 549 of file Supercell.cc.

const Eigen::MatrixXcd& CASM::Supercell::fourier_matrix ( ) const
inline

Definition at line 229 of file Supercell.hh.

SymOp CASM::Supercell::from_canonical ( ) const

Definition at line 902 of file Supercell.cc.

void CASM::Supercell::generate_all_delta_config_props ( )

Calculate delta properties for each configuration in *this (see above)

void CASM::Supercell::generate_all_reference_config_props ( )

Calculate reference properties for each configuration in *this (see above)

void CASM::Supercell::generate_delta_config_props ( Index  config_index)

Calculate delta properties for a configuration (must have read in calculated and reference properties)

void CASM::Supercell::generate_factor_group ( ) const

Definition at line 821 of file Supercell.cc.

void CASM::Supercell::generate_fourier_matrix ( const Eigen::MatrixXd &  real_coordinates,
const Eigen::MatrixXd &  recip_coordinates,
const bool &  override 
)
private

Structure factor calculation routines -> Use only the public versions of these functions The calculations, and math is explained as comments above m_fourier_matrix and m_phase_factor

Definition at line 1176 of file Supercell.cc.

void CASM::Supercell::generate_fourier_matrix ( )

Structure Factor.

Definition at line 1168 of file Supercell.cc.

void CASM::Supercell::generate_fourier_matrix ( const Eigen::MatrixXd &  real_coordinates,
const Eigen::MatrixXd &  recip_coordinates 
)

Definition at line 1172 of file Supercell.cc.

void CASM::Supercell::generate_permutations ( ) const

Definition at line 829 of file Supercell.cc.

void CASM::Supercell::generate_phase_factor ( const Eigen::MatrixXd &  shift_vectors,
const Array< bool > &  is_commensurate,
const bool &  override 
)
private

Definition at line 1210 of file Supercell.cc.

void CASM::Supercell::generate_reference_config_props ( Index  config_index)

Calculate reference properties for a configuration (must have reference states in appropriate directories)

Index CASM::Supercell::get_b ( Index  i) const
inline

Definition at line 259 of file Supercell.hh.

const Configuration& CASM::Supercell::get_config ( Index  i) const
inline

Definition at line 287 of file Supercell.hh.

Configuration& CASM::Supercell::get_config ( Index  i)
inline

Definition at line 291 of file Supercell.hh.

ConfigList& CASM::Supercell::get_config_list ( )
inline

Definition at line 279 of file Supercell.hh.

const ConfigList& CASM::Supercell::get_config_list ( ) const
inline

Definition at line 283 of file Supercell.hh.

Index CASM::Supercell::get_id ( ) const
inline

Definition at line 303 of file Supercell.hh.

Index CASM::Supercell::get_linear_index ( const Site site,
double  tol = TOL 
) const

Definition at line 18 of file Supercell.cc.

Index CASM::Supercell::get_linear_index ( const Coordinate coord,
double  tol = TOL 
) const

Definition at line 30 of file Supercell.cc.

std::string CASM::Supercell::get_name ( ) const

Return supercell name.

  • If lattice is the canonical equivalent, then return 'SCELV_A_B_C_D_E_F'
  • Else, return 'SCELV_A_B_C_D_E_F.$FG_INDEX', where $FG_INDEX is the index of the first symmetry operation in the primitive structure's factor group such that the lattice is equivalent to apply(fg_op, canonical equivalent)

Definition at line 123 of file Supercell.cc.

fs::path CASM::Supercell::get_path ( ) const

Return path to supercell directory.

Definition at line 865 of file Supercell.cc.

const Structure & CASM::Supercell::get_prim ( ) const

Definition at line 74 of file Supercell.cc.

PrimClex& CASM::Supercell::get_primclex ( ) const
inline

Definition at line 201 of file Supercell.hh.

const Lattice& CASM::Supercell::get_real_super_lattice ( ) const
inline

Definition at line 267 of file Supercell.hh.

const Lattice& CASM::Supercell::get_recip_prim_lattice ( ) const
inline

Definition at line 271 of file Supercell.hh.

const Eigen::Matrix3i& CASM::Supercell::get_transf_mat ( ) const
inline

Definition at line 263 of file Supercell.hh.

std::pair< Supercell::config_const_iterator, bool > CASM::Supercell::insert_canon_config ( const Configuration config)

Insert a configuration that is known to be canonical.

Definition at line 619 of file Supercell.cc.

std::pair< Supercell::config_const_iterator, bool > CASM::Supercell::insert_config ( const Configuration config)

Insert a configuration that may be non-canonical.

Definition at line 611 of file Supercell.cc.

bool CASM::Supercell::is_canonical ( ) const

Definition at line 886 of file Supercell.cc.

Array< bool > CASM::Supercell::is_commensurate_kpoint ( const Eigen::MatrixXd &  recip_coordinates,
double  tol = TOL 
)

Definition at line 1153 of file Supercell.cc.

bool CASM::Supercell::is_equivalent ( const Supercell B) const
bool CASM::Supercell::is_supercell_of ( const Structure structure) const

Check if a Structure fits in this Supercell

  • Checks that 'structure'.lattice is supercell of 'real_super_lattice'
  • Does NOT check basis sites

Definition at line 924 of file Supercell.cc.

bool CASM::Supercell::is_supercell_of ( const Structure structure,
Eigen::Matrix3d &  mat 
) const

Check if a Structure fits in this Supercell

  • Checks that 'structure'.lattice is supercell of 'real_super_lattice'
  • Does NOT check basis sites

Definition at line 935 of file Supercell.cc.

const Eigen::MatrixXd& CASM::Supercell::k_mesh ( ) const
inline

Definition at line 237 of file Supercell.hh.

ReturnArray< int > CASM::Supercell::max_allowed_occupation ( ) const

Definition at line 61 of file Supercell.cc.

const SuperNeighborList & CASM::Supercell::nlist ( ) const

Returns the SuperNeighborList.

Definition at line 79 of file Supercell.cc.

Index CASM::Supercell::num_sites ( ) const
inline

Definition at line 220 of file Supercell.hh.

bool CASM::Comparisons< Supercell >::operator!= ( const Supercell B) const
inlineinherited

Definition at line 41 of file Comparisons.hh.

bool CASM::Supercell::operator< ( const Supercell B) const

Definition at line 1246 of file Supercell.cc.

bool CASM::Comparisons< Supercell >::operator<= ( const Supercell B) const
inlineinherited

Definition at line 29 of file Comparisons.hh.

bool CASM::Comparisons< Supercell >::operator== ( const Supercell B) const
inlineinherited

Definition at line 37 of file Comparisons.hh.

bool CASM::Comparisons< Supercell >::operator> ( const Supercell B) const
inlineinherited

Definition at line 25 of file Comparisons.hh.

bool CASM::Comparisons< Supercell >::operator>= ( const Supercell B) const
inlineinherited

Definition at line 33 of file Comparisons.hh.

SymGroupRep const& CASM::Supercell::permutation_symrep ( ) const
inline

Definition at line 255 of file Supercell.hh.

SymGroupRepID CASM::Supercell::permutation_symrep_ID ( ) const
inline

Definition at line 249 of file Supercell.hh.

Supercell::permute_const_iterator CASM::Supercell::permute_begin ( ) const

Definition at line 179 of file Supercell.cc.

Supercell::permute_const_iterator CASM::Supercell::permute_end ( ) const

Definition at line 185 of file Supercell.cc.

Supercell::permute_const_iterator CASM::Supercell::permute_it ( Index  fg_index,
Index  trans_index 
) const

Definition at line 191 of file Supercell.cc.

const Eigen::MatrixXcd& CASM::Supercell::phase_factor ( ) const
inline

Definition at line 233 of file Supercell.hh.

void CASM::Supercell::populate_structure_factor ( )

Definition at line 1228 of file Supercell.cc.

void CASM::Supercell::populate_structure_factor ( const Index config_index)

Definition at line 1238 of file Supercell.cc.

const PrimGrid& CASM::Supercell::prim_grid ( ) const
inline

Definition at line 205 of file Supercell.hh.

void CASM::Supercell::print_bijk ( std::ostream &  stream)

Definition at line 200 of file Supercell.cc.

void CASM::Supercell::print_PERTURB_json ( std::ofstream &  file,
const Configuration background_config,
const Array< Array< Array< Index > > > &  perturb_config_index,
const Array< Array< Array< permute_const_iterator > > > &  perturb_config_symop_index,
bool  print_config_name 
) const

Print the PERTURB file for perturbations enumerated around a Configuration

If 'print_config_name' == true, print config using Configuration::name() If 'print_config_name' == false, print config using config_index

Definition at line 775 of file Supercell.cc.

void CASM::Supercell::print_sublat_to_comp ( std::ostream &  stream)

Old CASM style corr.in output for all the configurations in *this supercell.

void CASM::Supercell::printUCC ( std::ostream &  stream,
COORD_TYPE  mode,
UnitCellCoord  ucc,
char  term = 0,
int  prec = 7,
int  pad = 5 
) const
void CASM::Supercell::read_clex_relaxations ( const Lattice home_lattice)
void CASM::Supercell::read_config_list ( const jsonParser json)

Definition at line 654 of file Supercell.cc.

void CASM::Supercell::read_relaxed_structure ( Index  configNum,
const Lattice home_lattice 
)
void CASM::Supercell::read_relaxed_structure ( Index  configNum)
Eigen::MatrixXd CASM::Supercell::real_coordinates ( ) const

Initialize a nx3 vector of real space coords, corresponding to the real space grid points

Definition at line 1122 of file Supercell.cc.

Eigen::MatrixXd CASM::Supercell::recip_coordinates ( ) const

Initialize a nx3 vector of kpoints that we are interested in by using kpoints that are listed in recip_grid. We will only generate k-points in the IBZ, so always call voronoi_within on the coordinate

Definition at line 1139 of file Supercell.cc.

void CASM::Supercell::set_id ( Index  id)
inline

Definition at line 355 of file Supercell.hh.

Structure CASM::Supercell::superstructure ( ) const

Returns a Structure equivalent to the Supercell

  • basis sites are ordered to agree with Supercell::config_index_to_bijk
  • occupation set to prim default, not curr_state

Definition at line 1037 of file Supercell.cc.

Structure CASM::Supercell::superstructure ( const Configuration config) const

Returns a Structure equivalent to the Supercell

  • basis sites are ordered to agree with Supercell::config_index_to_bijk
  • occupation set to config
  • prim set to (*primclex).prim

Definition at line 1068 of file Supercell.cc.

Structure CASM::Supercell::superstructure ( Index  config_index) const

Returns a structure corresponding to the specified configuration.

This is a safer version that takes an Index instead of an actual Configuration. It might be better to have the version that takes a Configuration private, that way you can't pass it anything that's incompatible.

Definition at line 1090 of file Supercell.cc.

SymOp CASM::Supercell::to_canonical ( ) const

Definition at line 894 of file Supercell.cc.

Supercell::permute_const_iterator CASM::Supercell::translate_begin ( ) const

Begin iterator over pure translational permutations.

Begin iterator over translation permutations.

Definition at line 161 of file Supercell.cc.

Supercell::permute_const_iterator CASM::Supercell::translate_end ( ) const

End iterator over pure translational permutations.

End iterator over translation permutations.

Definition at line 168 of file Supercell.cc.

const Permutation & CASM::Supercell::translation_permute ( Index  i) const

Definition at line 147 of file Supercell.cc.

const Array< Permutation > & CASM::Supercell::translation_permute ( ) const

Definition at line 154 of file Supercell.cc.

UnitCellCoord CASM::Supercell::uccoord ( Index  i) const
inline

Definition at line 224 of file Supercell.hh.

ReturnArray< int > CASM::Supercell::vacant ( ) const

Returns an Array<int> consistent with Configuration::occupation that is all vacancies. A site which can not contain a vacancy is set to -1.

Definition at line 1105 of file Supercell.cc.

Index CASM::Supercell::volume ( ) const
inline

Return number of primitive cells that fit inside of *this.

Definition at line 212 of file Supercell.hh.

jsonParser & CASM::Supercell::write_config_list ( jsonParser json)

Call Configuration::write out every configuration in supercell.

Run through every selected Configuration in *this and call write() on it. This will update all the JSON files and also rewrite POS, DoF etc. Meant for when you calculated some properties (e.g. formation energies or correlations) and want it outputted, but didn't generate any new configurations.

Definition at line 758 of file Supercell.cc.

Member Data Documentation

friend CASM::Supercell::Comparisons< Supercell >
private

Definition at line 447 of file Supercell.hh.

ConfigList CASM::Supercell::config_list
private

Definition at line 146 of file Supercell.hh.

Supercell* CASM::Supercell::m_canonical
mutableprivate

Store a pointer to the canonical equivalent Supercell.

Definition at line 143 of file Supercell.hh.

std::map<const Configuration *, Index, ConfigMapCompare> CASM::Supercell::m_config_map
private

Definition at line 149 of file Supercell.hh.

SymGroup CASM::Supercell::m_factor_group
mutableprivate

Definition at line 85 of file Supercell.hh.

Eigen::MatrixXcd CASM::Supercell::m_fourier_matrix
private

Definition at line 100 of file Supercell.hh.

Index CASM::Supercell::m_id
private

index into PrimClex::supercell_list

Definition at line 156 of file Supercell.hh.

Eigen::MatrixXd CASM::Supercell::m_k_mesh
private

Calculating the structure factor: vectors you need : Eigen::VectorXd intensities //this needs to be as long //as the number of sites in the supercell Calculations (these are done in Configuration): intensities.segment<volume()>(i*volume()) * fourier_matrix = Q.column(i) Q is arranged as: [Q1(k1) Q2(k1) ... Qn(k1)] [Q1(k2) Q2(k2) ... Qn(k2)] ... [Q1(kn) Q2(kn) ... Qn(kn)] Structure factors are then calculated as S: S = Q * m_phase_factor S is arranged as: [S(k1) S(k2) ... S(kn)] In the code: Q is called sublat_sf k-point mesh for the Fourier Transform An Eigen::MatrixXd that should be nx3 each row is a coordinate in reciprocal space

Definition at line 127 of file Supercell.hh.

std::string CASM::Supercell::m_name
mutableprivate

unique name of the supercell based on hermite normal form (see _generate_name() )

Definition at line 88 of file Supercell.hh.

notstd::cloneable_ptr<SuperNeighborList> CASM::Supercell::m_nlist
mutableprivate


SuperNeighborList, mutable for lazy construction

Definition at line 136 of file Supercell.hh.

Index CASM::Supercell::m_nlist_size_at_construction
mutableprivate

Store size of PrimNeighborList at time of construction of SuperNeighborList to enable checking if SuperNeighborList should be re-constructed

Definition at line 140 of file Supercell.hh.

SymGroupRepID CASM::Supercell::m_perm_symrep_ID
mutableprivate

Definition at line 72 of file Supercell.hh.

Eigen::MatrixXcd CASM::Supercell::m_phase_factor
private

The phase factor matrix is arranged as: [exp(-i k1 tau1) exp(-i k2 tau1) ... exp(-i kn tau1)] [exp(-i k1 tau2) exp(-i k2 tau2) ... exp(-i kn tau2)] ... [exp(-i k1 taun) exp(-i k2 taun) ... exp(-i kn taun)] tau_{i} is the shift vector for the ith basis atom

Definition at line 108 of file Supercell.hh.

PrimGrid CASM::Supercell::m_prim_grid
private

Definition at line 60 of file Supercell.hh.

PrimClex* CASM::Supercell::primclex
private

Definition at line 52 of file Supercell.hh.

Lattice CASM::Supercell::real_super_lattice
private

Definition at line 55 of file Supercell.hh.

PrimGrid CASM::Supercell::recip_grid
private

Definition at line 63 of file Supercell.hh.

Lattice CASM::Supercell::recip_prim_lattice
private

Definition at line 58 of file Supercell.hh.

double CASM::Supercell::scaling
private

Definition at line 153 of file Supercell.hh.

Eigen::Matrix3i CASM::Supercell::transf_mat
private

Definition at line 151 of file Supercell.hh.


The documentation for this class was generated from the following files: