CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::MappedProperties Struct Reference

#include <MappedProperties.hh>

Detailed Description

Calculated properties of a Configuration

Associated with a particular Configuration as "calculated properties" (std::map<std::string, MappedProperties>), MappedProperties are values of properties (i.e. energy, relaxation displacements, relaxation strain, etc.) that are dependent on the values of the DoF.

MappedProperties are "mapped" in the sense that they are not necessarily the raw output values from a DFT calculation (though some properties are), but are determined by "mapping" the final calculated structure's atomic positions and lattice vectors to the ideal configuration they are most similar to. In the case of significant atomic and lattice relaxations this allows associating calculated properties with the correct Configuration. If the relaxations are too severe, there may be no Configuration that is an appropriate mapping. The user has control of criteria used to judge whether any Configuration is an appropriate mapping and which is the best mapping.

Note: Multiple instances of MappedProperties may be associated with a single Configuration. This may occur if multiple calculation types are performed for a single Configuration. This may also occur if multiple ideal Configuration are unstable and relax to the same other Configuration.

MappedProperties has:

  • "global" (std::map<std::string, Eigen::MatrixXd>), a map of property name to value for global properties properties of the configuration such as energy, strain metrics, or lattice vectors. Property names must follow CASM property naming conventions as documented for AnisoValTraits. This map also holds any scalar properties such as energy or mapping cost ("lattice_deformation_cost", "atomic_deformation_cost", "total_cost"), which can be queried and set using member functions.
  • "site" (std::map<std::string, Eigen::MatrixXd>), a map of property name to value for properties of particular sites such as displacements, forces, or atomic coordinates. Property names must follow CASM property naming conventions as documented for AnisoValTraits.

MappedProperties also has:

  • "origin" (std::string), indicates the source of the properties. This can vary depending on the context, but most typically it is a path to a properties.calc.json type file. In some cases "prim:" is prepended to the file path to indicate that the "to" configuration is the primitive of the structure read from the origin file.
  • "to" (std::string), the name of the Configuration that the properties are mapped to. It must be a Configuration name.
  • "init_config" (std::string), used to indicate the Configuration that was calculated to generate these properties. Typically, it is the name of the Configuration which was used to generate the initial structure input to the calculation. The string "import" is typically used when the properties were imported from outside the project and no initial ideal Configuration is known.
  • "file_data" (FileData), used to store the last write time of the "origin" file

Note: In the future, "origin", "to", "init_config", and "file_data" may be moved out of MappedProperties and stored as part of the PropertiesDatabase or as needed by casm update and casm import.

Definition at line 74 of file MappedProperties.hh.

Public Member Functions

 MappedProperties ()
 default construction sets init_config field to "import" More...
 
bool has_scalar (std::string const &_name) const
 
double const & scalar (std::string const &_name) const
 
double & scalar (std::string const &_name)
 

Public Attributes

std::map< std::string, Eigen::MatrixXd > global
 
std::map< std::string, Eigen::MatrixXd > site
 
std::string origin
 
std::string to
 
std::string init_config
 
FileData file_data
 

Constructor & Destructor Documentation

◆ MappedProperties()

CASM::MappedProperties::MappedProperties ( )
inline

default construction sets init_config field to "import"

Definition at line 76 of file MappedProperties.hh.

Member Function Documentation

◆ has_scalar()

bool CASM::MappedProperties::has_scalar ( std::string const &  _name) const

Definition at line 25 of file MappedProperties.cc.

◆ scalar() [1/2]

double & CASM::MappedProperties::scalar ( std::string const &  _name)

Definition at line 41 of file MappedProperties.cc.

◆ scalar() [2/2]

double const & CASM::MappedProperties::scalar ( std::string const &  _name) const

Definition at line 32 of file MappedProperties.cc.

Member Data Documentation

◆ file_data

FileData CASM::MappedProperties::file_data

Path to properties file and time of last write time corresponding to 'origin'

Definition at line 116 of file MappedProperties.hh.

◆ global

std::map<std::string, Eigen::MatrixXd> CASM::MappedProperties::global

Map of global property name to property value. Property names must follow CASM property naming conventions as documented for AnisoValTraits

Definition at line 81 of file MappedProperties.hh.

◆ init_config

std::string CASM::MappedProperties::init_config

The name of the ideal configuration that served as the starting point for calculation

Typical usage:

  • If generated by 'casm update', the name of the starting config.
  • If generated by 'casm import', "import"

Definition at line 112 of file MappedProperties.hh.

◆ origin

std::string CASM::MappedProperties::origin

Indicates the origin of the properties

Typical usage: The path to the properties.calc.json type file containing the SimpleStructure with these properties.

Definition at line 100 of file MappedProperties.hh.

◆ site

std::map<std::string, Eigen::MatrixXd> CASM::MappedProperties::site

Map of site property name to property value. Property names must follow CASM property naming conventions as documented for AnisoValTraits

Definition at line 86 of file MappedProperties.hh.

◆ to

std::string CASM::MappedProperties::to

The name of the configuration that these properties are mapped to (the ending point of relaxation)

Definition at line 104 of file MappedProperties.hh.


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