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

#include <Configuration.hh>

+ Inheritance diagram for CASM::Configuration:

Detailed Description

A Configuration represents the values of all degrees of freedom in a Supercell.

Definition at line 81 of file Configuration.hh.

Public Types

typedef
ConfigDoF::displacement_matrix_t 
displacement_matrix_t
 
typedef ConfigDoF::displacement_t displacement_t
 
typedef
ConfigDoF::const_displacement_t 
const_displacement_t
 

Public Member Functions

 Configuration (Supercell &_supercell, const jsonParser &source=jsonParser(), const ConfigDoF &_dof=ConfigDoF())
 Construct a default Configuration. More...
 
 Configuration (const jsonParser &json, Supercell &_supercell, Index _id)
 Construct by reading from main data file (json) More...
 
void set_multiplicity (int m)
 Construct a Configuration with occupation specified by string 'con_name'. More...
 
void set_id (Index _id)
 
void set_source (const jsonParser &source)
 
void push_back_source (const jsonParser &source)
 
void clear ()
 Clear all DoF. More...
 
void init_occupation ()
 Set occupant variables to background structure. More...
 
void set_occupation (const Array< int > &newoccupation)
 Set occupant variables. More...
 
void set_occ (Index site_l, int val)
 Set occupant variable on site l. More...
 
void clear_occupation ()
 Clear occupation. More...
 
void init_displacement ()
 Set all occupant displacements to (0.,0.,0.) More...
 
void set_displacement (const displacement_matrix_t &_disp)
 Set occupant displacements. More...
 
void set_disp (Index site_l, const Eigen::VectorXd &_disp)
 Set occupant displacements. More...
 
void clear_displacement ()
 Clear displacement. More...
 
void init_deformation ()
 Set applied strain to Eigen::Matrix3d::Zero() More...
 
void set_deformation (const Eigen::Matrix3d &_deformation)
 Set applied strain. More...
 
void clear_deformation ()
 Clear applied strain. More...
 
bool is_primitive () const
 Check if this is a primitive Configuration. More...
 
PermuteIterator find_translation () const
 Returns a PermuteIterator corresponding to the first non-zero pure translation that maps the Configuration onto itself. More...
 
Configuration primitive () const
 Return the primitive Configuration. More...
 
bool is_canonical () const
 Check if Configuration is in the canonical form. More...
 
PermuteIterator to_canonical () const
 Returns the operation that applied to *this returns the canonical form. More...
 
PermuteIterator from_canonical () const
 Returns the operation that applied to the the canonical form returns *this. More...
 
Configuration canonical_form () const
 Returns the canonical form Configuration in the same Supercell. More...
 
Configuration in_canonical_supercell () const
 Returns the canonical form Configuration in the canonical Supercell. More...
 
ConfigInsertResult insert (bool primitive_only) const
 Insert this in the canonical Supercell. More...
 
std::vector< PermuteIteratorfactor_group () const
 Returns the subgroup of the Supercell factor group that leaves the Configuration unchanged. More...
 
SymGroup point_group () const
 Returns the point group that leaves the Configuration unchanged. More...
 
Configuration fill_supercell (Supercell &scel, const SymOp &op) const
 Fills supercell 'scel' with reoriented configuration, as if by apply(op,*this) More...
 
Configuration fill_supercell (Supercell &scel, const SymGroup &g) const
 Fills supercell 'scel' with reoriented configuration, as if by apply(op,*this) More...
 
void set_calc_properties (const jsonParser &json)
 Read calculation results into the configuration. More...
 
bool read_calc_properties (jsonParser &parsed_props) const
 
void set_selected (bool _selected)
 
const Latticeideal_lattice () const
 
std::string get_id () const
 
int get_multiplicity () const
 Get symmetric multiplicity (i.e., size of configuration's factor_group) More...
 
std::string name () const
 SCELV_A_B_C_D_E_F/i. More...
 
std::string calc_status () const
 
std::string failure_type () const
 
const jsonParsersource () const
 
fs::path get_path () const
 
Index size () const
 Returns number of sites, NOT the number of primitives that fit in here. More...
 
const Structureget_prim () const
 Get the primitive Structure for this Configuration. More...
 
bool selected () const
 True if this Configuration is currently selected in the MASTER config list. More...
 
PrimClexget_primclex () const
 Get the PrimClex for this Configuration. More...
 
Supercellget_supercell () const
 Get the Supercell for this Configuration. More...
 
double crystallography_tol () const
 Get the PrimClex crystallography_tol. More...
 
UnitCellCoord get_uccoord (Index site_l) const
 Get the UnitCellCoord for a given linear site index. More...
 
int get_b (Index site_l) const
 Get the basis site index for a given linear linear site index. More...
 
const ConfigDoFconfigdof () const
 const Access the DoF More...
 
ConfigDoFconfigdof ()
 Access the DoF. More...
 
bool has_occupation () const
 True if Configuration has occupation DoF. More...
 
const Array< int > & occupation () const
 Occupant variables. More...
 
const int & occ (Index site_l) const
 Occupant variable on site l. More...
 
const Moleculeget_mol (Index site_l) const
 Molecule on site l. More...
 
bool has_displacement () const
 True if Configuration has displacement DoF. More...
 
const displacement_matrix_tdisplacement () const
 Occupant displacements. More...
 
const_displacement_t disp (Index site_l) const
 Occupant displacement. More...
 
const Eigen::Matrix3d & deformation () const
 Applied strain. More...
 
bool has_deformation () const
 True if Configuration has strain DoF. More...
 
const Propertiescalc_properties () const
 
const Propertiesgenerated_properties () const
 
ReturnArray< Array< double > > get_sublattice_composition () const
 
ReturnArray< Array< int > > get_sublat_num_each_molecule () const
 
ReturnArray< double > get_composition () const
 
ReturnArray< double > get_true_composition () const
 
ReturnArray< int > get_num_each_molecule () const
 Returns num_each_molecule[ molecule_type], where 'molecule_type' is ordered as Structure::get_struc_molecule() More...
 
Eigen::VectorXd get_param_composition () const
 Returns parametric composition, as calculated using PrimClex::param_comp. More...
 
Eigen::VectorXd get_num_each_component () const
 
Eigen::VectorXd get_struct_fact_intensities () const
 
Eigen::VectorXd get_struct_fact_intensities (const Eigen::VectorXd &component_intensities) const
 
void calc_sublat_struct_fact ()
 
void calc_struct_fact ()
 
void calc_sublat_struct_fact (const Eigen::VectorXd &intensities)
 
void calc_struct_fact (const Eigen::VectorXd &intensities)
 
Eigen::MatrixXcd sublat_struct_fact ()
 
Eigen::MatrixXd struct_fact ()
 
jsonParserwrite (jsonParser &json) const
 
void write_pos () const
 Write the POS file to get_pos_path. More...
 
void print (std::ostream &stream, COORD_TYPE mode, int Va_mode=0, char term= '\n', int prec=10, int pad=5) const
 
void print_occupation (std::ostream &stream) const
 
void print_config_list (std::ostream &stream, int composition_flag) const
 
void print_composition (std::ostream &stream) const
 
void print_true_composition (std::ostream &stream) const
 
void print_sublattice_composition (std::ostream &stream) const
 
fs::path calc_dir () const
 
fs::path calc_properties_path () const
 
fs::path calc_status_path () const
 
fs::path get_pos_path () const
 Path to various files. More...
 
bool is_equivalent (const Configuration &B) const
 Check if Configuration are equivalent wrt the prim's factor group. More...
 
bool operator< (const Configuration &B) const
 Compare Configuration, via ConfigCompare. More...
 
bool operator> (const Configuration &B) const
 
bool operator<= (const Configuration &B) const
 
bool operator>= (const Configuration &B) const
 
bool operator== (const Configuration &B) const
 
bool operator!= (const Configuration &B) const
 

Static Public Member Functions

static std::pair< std::string,
Index
split_name (std::string configname)
 Split configuration name string into scelname and config index. More...
 

Protected Member Functions

const Configurationderived () const
 
bool _ne (const Configuration &B) const
 

Private Member Functions

int & _occ (Index site_l)
 Convenience accessors: More...
 
displacement_t _disp (Index site_l)
 
void _invalidate_id ()
 
void _generate_name () const
 
bool _eq (const Configuration &B) const
 Equality comparison of Configuration, via ConfigEqual. More...
 
void read (const jsonParser &json)
 Private members: More...
 
void read_dof (const jsonParser &json)
 Functions used to perform read() More...
 
void read_properties (const jsonParser &json)
 
jsonParserwrite_dof (jsonParser &json) const
 Functions used to perform write to config_list.json: More...
 
jsonParserwrite_source (jsonParser &json) const
 
jsonParserwrite_pos (jsonParser &json) const
 
jsonParserwrite_param_composition (jsonParser &json) const
 
jsonParserwrite_properties (jsonParser &json) const
 

Private Attributes

std::string id
 Identification. More...
 
Supercellsupercell
 const pointer to the (non-const) Supercell for this Configuration More...
 
std::shared_ptr< Supercellm_supercell_ptr
 
jsonParser m_source
 a jsonParser object indicating where this Configuration came from More...
 
bool source_updated
 
int multiplicity
 
ConfigDoF m_configdof
 Degrees of Freedom. More...
 
bool prop_updated
 
Properties calculated
 
Properties generated
 
bool m_selected
 
notstd::cloneable_ptr
< FillSupercell
m_fill_canonical
 Remember how to copy into the canonical Supercell. More...
 
std::string m_name
 Remember name. More...
 
friend Comparisons< Configuration >
 

Member Typedef Documentation

Constructor & Destructor Documentation

CASM::Configuration::Configuration ( Supercell _supercell,
const jsonParser source = jsonParser(),
const ConfigDoF _dof = ConfigDoF() 
)

Construct a default Configuration.

Definition at line 36 of file Configuration.cc.

CASM::Configuration::Configuration ( const jsonParser json,
Supercell _supercell,
Index  _id 
)

Construct by reading from main data file (json)

Definition at line 44 of file Configuration.cc.

Member Function Documentation

displacement_t CASM::Configuration::_disp ( Index  site_l)
inlineprivate

Definition at line 617 of file Configuration.hh.

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

Equality comparison of Configuration, via ConfigEqual.

Definition at line 1375 of file Configuration.cc.

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

Definition at line 593 of file Configuration.cc.

void CASM::Configuration::_invalidate_id ( )
inlineprivate

Definition at line 621 of file Configuration.hh.

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

Definition at line 56 of file Comparisons.hh.

int& CASM::Configuration::_occ ( Index  site_l)
inlineprivate

Convenience accessors:

Definition at line 613 of file Configuration.hh.

fs::path CASM::Configuration::calc_dir ( ) const

Definition at line 1109 of file Configuration.cc.

const Properties & CASM::Configuration::calc_properties ( ) const

Definition at line 674 of file Configuration.cc.

fs::path CASM::Configuration::calc_properties_path ( ) const

Definition at line 1114 of file Configuration.cc.

std::string CASM::Configuration::calc_status ( ) const

Definition at line 598 of file Configuration.cc.

fs::path CASM::Configuration::calc_status_path ( ) const

Definition at line 1119 of file Configuration.cc.

void CASM::Configuration::calc_struct_fact ( )

Definition at line 1322 of file Configuration.cc.

void CASM::Configuration::calc_struct_fact ( const Eigen::VectorXd &  intensities)

Structure factors are then calculated as S: S = (Q * m_phase_factor).diagonal().absolute_value() S is arranged as: [S(k1) S(k2) ... S(kn)] In the code: Q is called sublat_sf However, it would be useful to have a matrix that contained the coordinates of the k-points along with the intensities at those points. The matrix that is stored in generated is thus formatted as: [k_x k_y k_z S(k)]

Definition at line 1301 of file Configuration.cc.

void CASM::Configuration::calc_sublat_struct_fact ( )

Definition at line 1326 of file Configuration.cc.

void CASM::Configuration::calc_sublat_struct_fact ( const Eigen::VectorXd &  intensities)

Calculates the sublattice structure factors as: 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)] Q is called sublat_sf in the code

Definition at line 1269 of file Configuration.cc.

Configuration CASM::Configuration::canonical_form ( ) const

Returns the canonical form Configuration in the same Supercell.

Definition at line 311 of file Configuration.cc.

void CASM::Configuration::clear ( )

Clear all DoF.

Definition at line 125 of file Configuration.cc.

void CASM::Configuration::clear_deformation ( )

Clear applied strain.

Definition at line 202 of file Configuration.cc.

void CASM::Configuration::clear_displacement ( )

Clear displacement.

Definition at line 183 of file Configuration.cc.

void CASM::Configuration::clear_occupation ( )

Clear occupation.

Definition at line 155 of file Configuration.cc.

const ConfigDoF& CASM::Configuration::configdof ( ) const
inline

const Access the DoF

Definition at line 402 of file Configuration.hh.

ConfigDoF& CASM::Configuration::configdof ( )
inline

Access the DoF.

Definition at line 409 of file Configuration.hh.

double CASM::Configuration::crystallography_tol ( ) const

Get the PrimClex crystallography_tol.

Definition at line 654 of file Configuration.cc.

const Eigen::Matrix3d& CASM::Configuration::deformation ( ) const
inline

Applied strain.

Describes possible strains that may have been applied to the Configuration. This is the matrix that relates the reference lattice vectors to the deformed lattice vectors via

L_deformed = m_deformation * L_reference

where L is a 3x3 matrix whose columns are the lattice vectors.

  • Strain is applied after displacement.

Definition at line 496 of file Configuration.hh.

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

Definition at line 48 of file Comparisons.hh.

const_displacement_t CASM::Configuration::disp ( Index  site_l) const
inline

Occupant displacement.

  • A displacement_t vector describes displacement of the occupant on site l.
  • Displacements are applied before strain.

Definition at line 480 of file Configuration.hh.

const displacement_matrix_t& CASM::Configuration::displacement ( ) const
inline

Occupant displacements.

A displacement_t vector for each site in the Configuration to describe displacements condensed in matrix form. This a 3xN matrix whose columns are the displacement of each of the N sites of the configuration.

  • Displacements are applied before strain.

Definition at line 471 of file Configuration.hh.

std::vector< PermuteIterator > CASM::Configuration::factor_group ( ) const

Returns the subgroup of the Supercell factor group that leaves the Configuration unchanged.

Definition at line 391 of file Configuration.cc.

std::string CASM::Configuration::failure_type ( ) const

Definition at line 608 of file Configuration.cc.

Configuration CASM::Configuration::fill_supercell ( Supercell scel,
const SymOp op 
) const

Fills supercell 'scel' with reoriented configuration, as if by apply(op,*this)

Fills supercell 'scel' with reoriented configuration, op*(*this)

Definition at line 423 of file Configuration.cc.

Configuration CASM::Configuration::fill_supercell ( Supercell scel,
const SymGroup g 
) const

Fills supercell 'scel' with reoriented configuration, as if by apply(op,*this)

Fills supercell 'scel' with reoriented configuration, op*(*this)

  • Uses the first symop in g that such that scel is a supercell of op*(*this)

Definition at line 436 of file Configuration.cc.

PermuteIterator CASM::Configuration::find_translation ( ) const

Returns a PermuteIterator corresponding to the first non-zero pure translation that maps the Configuration onto itself.

Definition at line 220 of file Configuration.cc.

PermuteIterator CASM::Configuration::from_canonical ( ) const

Returns the operation that applied to the the canonical form returns *this.

Returns the operation that applied to the canonical form returns *this.

Definition at line 304 of file Configuration.cc.

const Properties & CASM::Configuration::generated_properties ( ) const

Definition at line 686 of file Configuration.cc.

int CASM::Configuration::get_b ( Index  site_l) const

Get the basis site index for a given linear linear site index.

Definition at line 664 of file Configuration.cc.

ReturnArray< double > CASM::Configuration::get_composition ( ) const

Returns composition, not counting vacancies composition[ molecule_type ]: molecule_type ordered as prim structure's get_struc_molecule(), with [Va]=0.0

get the total number of non-vacancy atoms

Definition at line 745 of file Configuration.cc.

std::string CASM::Configuration::get_id ( ) const

Definition at line 564 of file Configuration.cc.

const Molecule & CASM::Configuration::get_mol ( Index  site_l) const

Molecule on site l.

Equivalent to:

config.get_prim().basis[ config.get_b(l) ].site_occupant[ config.occupation()[l]];

Definition at line 669 of file Configuration.cc.

int CASM::Configuration::get_multiplicity ( ) const
inline

Get symmetric multiplicity (i.e., size of configuration's factor_group)

Definition at line 360 of file Configuration.hh.

Eigen::VectorXd CASM::Configuration::get_num_each_component ( ) const

Returns num_each_component[ component_type] per prim cell, where 'component_type' is ordered as ParamComposition::get_components

Definition at line 810 of file Configuration.cc.

ReturnArray< int > CASM::Configuration::get_num_each_molecule ( ) const

Returns num_each_molecule[ molecule_type], where 'molecule_type' is ordered as Structure::get_struc_molecule()

Definition at line 791 of file Configuration.cc.

Eigen::VectorXd CASM::Configuration::get_param_composition ( ) const

Returns parametric composition, as calculated using PrimClex::param_comp.

Definition at line 797 of file Configuration.cc.

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

Definition at line 623 of file Configuration.cc.

fs::path CASM::Configuration::get_pos_path ( ) const

Path to various files.

Definition at line 1104 of file Configuration.cc.

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

Get the primitive Structure for this Configuration.

Definition at line 634 of file Configuration.cc.

PrimClex & CASM::Configuration::get_primclex ( ) const

Get the PrimClex for this Configuration.

Definition at line 644 of file Configuration.cc.

Eigen::VectorXd CASM::Configuration::get_struct_fact_intensities ( ) const

Definition at line 1246 of file Configuration.cc.

Eigen::VectorXd CASM::Configuration::get_struct_fact_intensities ( const Eigen::VectorXd &  component_intensities) const

Definition at line 1253 of file Configuration.cc.

ReturnArray< Array< int > > CASM::Configuration::get_sublat_num_each_molecule ( ) const

Returns number of each molecule by sublattice: sublat_num_each_molecule[ prim basis site / sublattice ][ molecule_type] molucule_type is ordered as in the Prim structure's site_occupant list for that basis site

Definition at line 721 of file Configuration.cc.

ReturnArray< Array< double > > CASM::Configuration::get_sublattice_composition ( ) const

Returns composition on each sublattice: sublat_comp[ prim basis site / sublattice][ molecule_type] molucule_type is ordered as in the Prim structure's site_occupant list for that basis site (includes vacancies)

Definition at line 700 of file Configuration.cc.

Supercell & CASM::Configuration::get_supercell ( ) const

Get the Supercell for this Configuration.

Definition at line 649 of file Configuration.cc.

ReturnArray< double > CASM::Configuration::get_true_composition ( ) const

Returns composition, including vacancies composition[ molecule_type ]: molecule_type ordered as prim structure's get_struc_molecule()

Definition at line 777 of file Configuration.cc.

UnitCellCoord CASM::Configuration::get_uccoord ( Index  site_l) const

Get the UnitCellCoord for a given linear site index.

Definition at line 659 of file Configuration.cc.

bool CASM::Configuration::has_deformation ( ) const
inline

True if Configuration has strain DoF.

Definition at line 501 of file Configuration.hh.

bool CASM::Configuration::has_displacement ( ) const
inline

True if Configuration has displacement DoF.

Definition at line 460 of file Configuration.hh.

bool CASM::Configuration::has_occupation ( ) const
inline

True if Configuration has occupation DoF.

Definition at line 415 of file Configuration.hh.

const Lattice & CASM::Configuration::ideal_lattice ( ) const

Definition at line 558 of file Configuration.cc.

Configuration CASM::Configuration::in_canonical_supercell ( ) const

Returns the canonical form Configuration in the canonical Supercell.

Definition at line 320 of file Configuration.cc.

void CASM::Configuration::init_deformation ( )

Set applied strain to Eigen::Matrix3d::Zero()

Definition at line 189 of file Configuration.cc.

void CASM::Configuration::init_displacement ( )

Set all occupant displacements to (0.,0.,0.)

Definition at line 160 of file Configuration.cc.

void CASM::Configuration::init_occupation ( )

Set occupant variables to background structure.

Definition at line 131 of file Configuration.cc.

ConfigInsertResult CASM::Configuration::insert ( bool  primitive_only) const

Insert this in the canonical Supercell.

Insert this configuration (in canonical form) in the canonical Supercell config list.

Parameters
primitive_onlyIf true, only the primitive Configuration is inserted.
  • By convention, the primitive canonical form of a configuration must always be saved in the config list.
  • By default, both the primitive canonical Configuration and the equivalent non-primitive Configuration in the canonical Supercell are saved
  • Optionally, this can insert just the primitive Configuration

Definition at line 346 of file Configuration.cc.

bool CASM::Configuration::is_canonical ( ) const

Check if Configuration is in the canonical form.

Definition at line 281 of file Configuration.cc.

bool CASM::Configuration::is_equivalent ( const Configuration B) const

Check if Configuration are equivalent wrt the prim's factor group.

Equivalent to:

this->primitive() == B.primitive()

Definition at line 1342 of file Configuration.cc.

bool CASM::Configuration::is_primitive ( ) const

Check if this is a primitive Configuration.

Definition at line 210 of file Configuration.cc.

std::string CASM::Configuration::name ( ) const

SCELV_A_B_C_D_E_F/i.

Returns a Configuration name.

One of the following formats:

  • $CANON_SCELNAME/$CANON_INDEX
    • For canonical forms in canonical supercells, whether primitive or not
    • CANON_INDEX will be "none" if not in config list
  • $PRIM_SCELNAME/$PRIM_CANON_INDEX.equiv.$FG_PERM.$TRANS_PERM
    • For primitive, but non-canonical configurations in a canonical supercell
    • Primitive canonical form must exist already in config list or PRIM_CANON_INDEX will be "none"
    • Applies PermuteIterator(FG_PERM, TRANS_PERM) to primitive canonical configuration
  • $CANON_SCELNAME.$PRIM_FG_OP1/super.$PRIM_FG_OP2.$PRIM_SCELNAME/$PRIM_CANON_INDEX.equiv.$FG_PERM.$TRANS_PERM
    • If the supercell is non-canonical, or the configuration is non-primitive and non-canonical
    • Primitive canonical form must exist already in config list or PRIM_CANON_INDEX will be "none"
    • Applies PermuteIterator(FG_PERM, TRANS_PERM) to primitive canonical configuration
    • Then applies prim Structure factor group op with index PRIM_FG_OP and fills the supercell $CANON_SCELNAME.$PRIM_FG_OP1

Definition at line 586 of file Configuration.cc.

const int& CASM::Configuration::occ ( Index  site_l) const
inline

Occupant variable on site l.

The occupant on site l can be obtained from the occupation variable using:

Molecule on_site_l = config.get_prim().basis[ config.get_b(l) ].site_occupant[config.occ(l)];
  • For a CASM project, the occupation variables will be ordered according to the occupant DoF in a "prim.json" file. This means that for the background structure, 'occupation' is all 0

Definition at line 445 of file Configuration.hh.

const Array<int>& CASM::Configuration::occupation ( ) const
inline

Occupant variables.

With one value for each site in the Configuration, this Array describes which occupant is at each of the 'N' sites of the configuration. The occupant on site l can be obtained from the occupation variable using:

Molecule on_site_l = config.get_prim().basis[ config.get_b(l) ].site_occupant[ config.occupation()[l]];
  • For a CASM project, the occupation variables will be ordered according to the occupant DoF in a "prim.json" file. This means that for the background structure, 'occupation' is all 0

Definition at line 431 of file Configuration.hh.

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

Definition at line 41 of file Comparisons.hh.

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

Compare Configuration, via ConfigCompare.

Definition at line 1346 of file Configuration.cc.

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

Definition at line 29 of file Comparisons.hh.

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

Definition at line 37 of file Comparisons.hh.

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

Definition at line 25 of file Comparisons.hh.

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

Definition at line 33 of file Comparisons.hh.

SymGroup CASM::Configuration::point_group ( ) const

Returns the point group that leaves the Configuration unchanged.

Definition at line 402 of file Configuration.cc.

Configuration CASM::Configuration::primitive ( ) const

Return the primitive Configuration.

Return a primitive Configuration.

Definition at line 237 of file Configuration.cc.

void CASM::Configuration::print ( std::ostream &  stream,
COORD_TYPE  mode,
int  Va_mode = 0,
char  term = '\n',
int  prec = 10,
int  pad = 5 
) const
void CASM::Configuration::print_composition ( std::ostream &  stream) const

Definition at line 948 of file Configuration.cc.

void CASM::Configuration::print_config_list ( std::ostream &  stream,
int  composition_flag 
) const

Definition at line 919 of file Configuration.cc.

void CASM::Configuration::print_occupation ( std::ostream &  stream) const

Definition at line 912 of file Configuration.cc.

void CASM::Configuration::print_sublattice_composition ( std::ostream &  stream) const

Definition at line 980 of file Configuration.cc.

void CASM::Configuration::print_true_composition ( std::ostream &  stream) const

Definition at line 966 of file Configuration.cc.

void CASM::Configuration::push_back_source ( const jsonParser source)

Definition at line 81 of file Configuration.cc.

void CASM::Configuration::read ( const jsonParser json)
private

Private members:

Reads the Configuration from the expected casm directory Uses PrimClex's current settings to read in the appropriate Properties, DeltaProperties and Correlations files if they exist

This is private, because it is only called from the constructor: Configuration(const Supercell &_supercell, Index _id) It's called from the constructor because of the Supercell pointer

Reads the Configuration from the config list Uses PrimClex's current default settings to read in the appropriate properties

This is private, because it is only called from the constructor: Configuration(const Supercell &_supercell, Index _id) It's called from the constructor because of the Supercell pointer

read dof, source, selected: (absolute path in config_list) json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["dof"] json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["source"] json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["selected"]

read properties: (absolute path in config_list) json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["CURR_CALCTYPE"]["CURR_REF"]["properties"]["calc"] json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["CURR_CALCTYPE"]["CURR_REF"]["properties"]["generated"]

Definition at line 1015 of file Configuration.cc.

bool CASM::Configuration::read_calc_properties ( jsonParser parsed_props) const

properties.calc.json: contains calculated properties For default clex calctype only

Definition at line 471 of file Configuration.cc.

void CASM::Configuration::read_dof ( const jsonParser json)
private

Functions used to perform read()

Read degree of freedom, source, and selected info

read dof, source, selected: (absolute path in config_list) json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["dof"] json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["source"] json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["selected"]

Tries to read dof from json["dof"] Tries to read source from json["source"] Tries to read selected from json["selected"]

json["dof"]: contains degree of freedom information

Definition at line 1066 of file Configuration.cc.

void CASM::Configuration::read_properties ( const jsonParser json)
private

Read configuration properties

  • this does not automatically read new externally calculated properties

    read properties: (absolute path in config_list) json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["CURR_CALCTYPE"]["CURR_REF"]["properties"]["calc"] json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["CURR_CALCTYPE"]["CURR_REF"]["properties"]["generated"]

Tries to read calculated from json["calc"] Tries to read generated from json["gen"]

Definition at line 1093 of file Configuration.cc.

bool CASM::Configuration::selected ( ) const
inline

True if this Configuration is currently selected in the MASTER config list.

Definition at line 382 of file Configuration.hh.

void CASM::Configuration::set_calc_properties ( const jsonParser json)

Read calculation results into the configuration.

Definition at line 464 of file Configuration.cc.

void CASM::Configuration::set_deformation ( const Eigen::Matrix3d &  _deformation)

Set applied strain.

Set strain applied applied to the Configuration. This is the matrix that relates the reference lattice vectors to the deformed lattice vectors via

L_deformed = m_deformation * L_reference

where L is a 3x3 matrix whose columns are the lattice vectors.

  • Strain is applied after displacement.
  • This will invalidate the Configuration's id

Definition at line 195 of file Configuration.cc.

void CASM::Configuration::set_disp ( Index  site_l,
const Eigen::VectorXd &  _disp 
)

Set occupant displacements.

  • A displacement_t vector to describe displacement of the occupant on site l.
  • Displacements are applied before strain.
  • This will invalidate the Configuration's id

Definition at line 177 of file Configuration.cc.

void CASM::Configuration::set_displacement ( const displacement_matrix_t _disp)

Set occupant displacements.

A displacement_t vector for each site in the Configuration to describe displacements condensed in matrix form. This a 3xN matrix whose columns are the displacement of each of the N sites of the configuration.

  • Displacements are applied before strain.
  • This will invalidate the Configuration's id
Exceptions
Ifcode _disp.cols() != this->size()

Definition at line 165 of file Configuration.cc.

void CASM::Configuration::set_id ( Index  _id)

Definition at line 57 of file Configuration.cc.

void CASM::Configuration::set_multiplicity ( int  m)
inline

Construct a Configuration with occupation specified by string 'con_name'.

set symmetric multiplicity (i.e., size of configuration's factor_group)

Definition at line 173 of file Configuration.hh.

void CASM::Configuration::set_occ ( Index  site_l,
int  val 
)

Set occupant variable on site l.

The occupant on site l can be obtained from the occupation variable using:

Molecule on_site_l = config.get_prim().basis[ config.get_b(l) ].site_occupant[config.occ(l)];
  • For a CASM project, the occupation variables will be ordered according to the occupant DoF in a "prim.json" file. This means that for the background structure, 'occupation' is all 0
  • No check is performed as to whether val is in the correct range
  • This will invalidate the Configuration's id

Definition at line 149 of file Configuration.cc.

void CASM::Configuration::set_occupation ( const Array< int > &  newoccupation)

Set occupant variables.

With one value for each site in the Configuration, this Array describes which occupant is at each of the 'N' sites of the configuration. The occupant on site l can be obtained from the occupation variable using:

Molecule on_site_l = config.get_prim().basis[ config.get_b(l) ].site_occupant[ config.occupation()[l]];
  • For a CASM project, the occupation variables will be ordered according to the occupant DoF in a "prim.json" file. This means that for the background structure, 'occupation' is all 0
  • This will invalidate the Configuration's id
Exceptions
Ifcode newoccupation.size() != this->size()

Definition at line 136 of file Configuration.cc.

void CASM::Configuration::set_selected ( bool  _selected)
inline

Definition at line 346 of file Configuration.hh.

void CASM::Configuration::set_source ( const jsonParser source)

Definition at line 66 of file Configuration.cc.

Index CASM::Configuration::size ( ) const

Returns number of sites, NOT the number of primitives that fit in here.

Definition at line 629 of file Configuration.cc.

const jsonParser & CASM::Configuration::source ( ) const

Definition at line 618 of file Configuration.cc.

std::pair< std::string, Index > CASM::Configuration::split_name ( std::string  configname)
static

Split configuration name string into scelname and config index.

Definition at line 1354 of file Configuration.cc.

Eigen::MatrixXd CASM::Configuration::struct_fact ( )

Definition at line 1330 of file Configuration.cc.

Eigen::MatrixXcd CASM::Configuration::sublat_struct_fact ( )

Definition at line 1336 of file Configuration.cc.

PermuteIterator CASM::Configuration::to_canonical ( ) const

Returns the operation that applied to *this returns the canonical form.

Definition at line 295 of file Configuration.cc.

jsonParser & CASM::Configuration::write ( jsonParser json) const

Writes the Configuration to the correct casm directory Uses PrimClex's current settings to write the appropriate Properties, DeltaProperties and Correlations files

Writes the Configuration to a json object (the config list) Uses PrimClex's current default settings to write the appropriate properties

'json' is a jsonParser JSON object (or will be set to a JSON object)

write_dof, source, selected: (absolute path in config_list) json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["dof"] json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["source"] json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["selected"]

write_properties: (absolute path in config_list) json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["CURR_CALCTYPE"]["CURR_REF"]["properties"]["calc"] json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["CURR_CALCTYPE"]["CURR_REF"]["properties"]["generated"]

write json object hierarchy if not existing

Definition at line 858 of file Configuration.cc.

jsonParser & CASM::Configuration::write_dof ( jsonParser json) const
private

Functions used to perform write to config_list.json:

Write config.json file containing degree of freedom info

writes dof: (absolute path in config_list) json["supercells"]["SCEL_NAME"]["CONFIG_ID"]["dof"]

adds: json["dof"]

Definition at line 1131 of file Configuration.cc.

jsonParser & CASM::Configuration::write_param_composition ( jsonParser json) const
private

Write param_composition.json file containing correlations location: json = supercells/SCEL_NAME/CONFIG_ID/CURR_CLEX/CURR_REF, adds: param_composition

Definition at line 1204 of file Configuration.cc.

void CASM::Configuration::write_pos ( ) const

Write the POS file to get_pos_path.

Definition at line 893 of file Configuration.cc.

jsonParser & CASM::Configuration::write_pos ( jsonParser json) const
private

Write POS file containing Structure location: json = supercells/SCEL_NAME/CONFIG_ID, adds: pos If the configuration is completely vacant, json["pos"] = null

Definition at line 1181 of file Configuration.cc.

jsonParser & CASM::Configuration::write_properties ( jsonParser json) const
private

Write properties.calc.json file containing calculated properties and param_composition location: json = supercells/SCEL_NAME/CONFIG_ID/CURR_CLEX/CURR_REF/properties, adds: calc

Definition at line 1223 of file Configuration.cc.

jsonParser & CASM::Configuration::write_source ( jsonParser json) const
private

Write config.json file containing degree of freedom info location: json = supercells/SCEL_NAME/CONFIG_ID, adds: source

Definition at line 1168 of file Configuration.cc.

Member Data Documentation

Properties CASM::Configuration::calculated
private

Definition at line 138 of file Configuration.hh.

friend CASM::Configuration::Comparisons< Configuration >
private

Definition at line 628 of file Configuration.hh.

Properties CASM::Configuration::generated
private

Definition at line 139 of file Configuration.hh.

std::string CASM::Configuration::id
private

Identification.

Configuration DFT data is expected in: casmroot/supercells/SCEL_NAME/CONFIG_ID/CURR_CALCTYPE/properties.calc.json POS files are written to: casmroot/supercells/SCEL_NAME/CONFIG_ID/POS

Definition at line 94 of file Configuration.hh.

ConfigDoF CASM::Configuration::m_configdof
private

Degrees of Freedom.

Definition at line 121 of file Configuration.hh.

notstd::cloneable_ptr<FillSupercell> CASM::Configuration::m_fill_canonical
mutableprivate

Remember how to copy into the canonical Supercell.

Definition at line 145 of file Configuration.hh.

std::string CASM::Configuration::m_name
mutableprivate

Remember name.

Definition at line 148 of file Configuration.hh.

bool CASM::Configuration::m_selected
private

Definition at line 142 of file Configuration.hh.

jsonParser CASM::Configuration::m_source
private

a jsonParser object indicating where this Configuration came from

Definition at line 103 of file Configuration.hh.

std::shared_ptr<Supercell> CASM::Configuration::m_supercell_ptr
private

Definition at line 100 of file Configuration.hh.

int CASM::Configuration::multiplicity
private

Definition at line 108 of file Configuration.hh.

bool CASM::Configuration::prop_updated
private

Properties Keeps track of whether the Configuration properties change since reading. Be sure to set to true in your routine if it did! PROPERTIES (AS OF 07/27/15)

Definition at line 137 of file Configuration.hh.

bool CASM::Configuration::source_updated
private

Definition at line 104 of file Configuration.hh.

Supercell* CASM::Configuration::supercell
private

const pointer to the (non-const) Supercell for this Configuration

Definition at line 97 of file Configuration.hh.


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