CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::Monte Namespace Reference

Classes

class  Canonical
 
class  CanonicalConditions
 
class  CanonicalEvent
 Data structure for storing information regarding a proposed grand canonical Monte Carlo event. More...
 
class  CanonicalSettings
 
class  Conversions
 
class  SiteMod
 Describes the modification of a variable on a basis site. More...
 
class  GrandCanonical
 
class  GrandCanonicalConditions
 
class  GrandCanonicalEvent
 Data structure for storing information regarding a proposed grand canonical Monte Carlo event. More...
 
class  GrandCanonicalSettings
 
class  MCData
 MCData stores observations of properties. More...
 
class  MCDataEquilibration
 Checks if a range of observations have equilibrated. More...
 
class  MCDataConvergence
 Checks if a range of observations have converged. More...
 
struct  SamplerNameCompare
 
class  MonteCarlo
 Interface base class for all types of Monte Carlo simulations (not meant to be used polymorphically) More...
 
class  MonteCarloEnumMetric
 
class  MonteCarloEnumCheck
 
class  MonteCarloEnum
 
class  MonteCounter
 Track the number of passes, steps and samples taken in a Monte Carlo calculation. More...
 
class  MonteDriver
 
class  MonteCarloDirectoryStructure
 
struct  CovEvaluator
 Functor to help evaluate covariance. More...
 
class  MonteSampler
 An abstract base class for sampling and storing data observations. More...
 
class  ScalarMonteSampler
 Sampler for a scalar property. More...
 
class  VectorMonteSampler
 Sampler for individual elements of a vector property. More...
 
class  QueryMonteSampler
 Sampler for individual elements of a vector property. More...
 
class  CompMonteSampler
 Sampler for parametric composition. More...
 
class  SiteFracMonteSampler
 Sampler for site fraction. More...
 
class  AtomFracMonteSampler
 Sampler for atom fraction. More...
 
class  MonteSettings
 Settings for Monte Carlo calculations. More...
 
class  EquilibriumMonteSettings
 
struct  OccCandidate
 
class  OccSwap
 Store swap type, mutating sites, and info for keeping OccLocation up-to-date. More...
 
class  OccCandidateList
 
struct  Species
 Represents an indivisible molecule component. More...
 
struct  Mol
 Represents the occupant on a site. More...
 
struct  OccTransform
 
struct  SpeciesLocation
 
struct  SpeciesTraj
 
struct  OccEvent
 
class  OccLocation
 Stores data to enable efficient proposal and update of occupation mutation. More...
 
class  SiteExchanger
 

Typedefs

typedef const MonteCarloConstMonteCarloPtr
 const pointer to const MonteCarlo More...
 
typedef SiteMod< int > OccMod
 An OccMod describes the change in occupation variable on a site. More...
 
typedef Index size_type
 

Enumerations

enum class  ENSEMBLE { GrandCanonical , Canonical }
 Monte Carlo ensemble type. More...
 
enum class  METHOD { Metropolis , LTE1 }
 Monte Carlo method type. More...
 
enum class  SAMPLE_MODE { STEP , PASS }
 How often to sample runs. More...
 
enum class  DRIVE_MODE { INCREMENTAL , CUSTOM }
 How to change conditions. More...
 
enum class  ENUM_SAMPLE_MODE { ON_SAMPLE , ON_ACCEPT }
 How often to sample runs. More...
 

Functions

std::ostream & operator<< (std::ostream &sout, const CanonicalConditions &cond)
 
DataFormatter< ConstMonteCarloPtrmake_results_formatter (const Canonical &mc)
 Make a LTE results formatter. More...
 
jsonParserto_json (const CanonicalConditions &conditions, jsonParser &json)
 Store CanonicalConditions in JSON format. More...
 
void from_json (CanonicalConditions &conditions, const PrimClex &primclex, const jsonParser &json)
 Read CanonicalConditions from JSON format. More...
 
std::ostream & operator<< (std::ostream &sout, const GrandCanonicalConditions &cond)
 
DataFormatter< ConstMonteCarloPtrmake_results_formatter (const GrandCanonical &mc)
 Make a LTE results formatter. More...
 
DataFormatter< ConstMonteCarloPtrmake_lte_results_formatter (const GrandCanonical &mc, const double &phi_LTE1, const std::string &configname)
 Make a results formatter. More...
 
jsonParserto_json (const GrandCanonicalConditions &conditions, jsonParser &json)
 Store GrandCanonicalConditions in JSON format. More...
 
void from_json (GrandCanonicalConditions &conditions, const PrimClex &primclex, const jsonParser &json)
 Read GrandCanonicalConditions from JSON format. More...
 
GenericDatumFormatter< double, ConstMonteCarloPtrGrandCanonicalLTEFormatter (const double &phi_LTE1)
 Print single spin flip LTE. More...
 
void write_lte_results (const MonteSettings &settings, const GrandCanonical &mc, const double &phi_LTE1, const std::string &configname, Log &_log)
 Will create new file or append to existing results file the results of the latest run. More...
 
template<typename RunType >
bool monte_carlo_step (RunType &monte_run)
 Perform a single monte carlo step, return true if accepted. More...
 
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloMeanFormatter (std::string prop_name)
 Print mean property values: <prop_name> More...
 
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloPrecFormatter (std::string prop_name)
 Print calculated precision of property values: prec(<prop_name>) More...
 
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloCovFormatter (std::string prop_name1, std::string prop_name2)
 Print covariance: cov(prop_name1, prop_name2) More...
 
GenericDatumFormatter< bool, ConstMonteCarloPtrMonteCarloIsEquilibratedFormatter ()
 Print if equilibrated (not counting explicitly requested equilibration) More...
 
GenericDatumFormatter< bool, ConstMonteCarloPtrMonteCarloIsConvergedFormatter ()
 Print if converged. More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloTFormatter ()
 Print Temperature. More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloBetaFormatter ()
 Print Beta. More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloParamChemPotFormatter (const MonteType &mc, int index)
 Print param_chem_pot(x) More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloChemPotFormatter (const MonteType &mc, int index)
 Print chem_pot(N) More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloCompFormatter (const MonteType &mc, int index)
 Print comp(x) More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloCompNFormatter (const MonteType &mc, int index)
 Print comp_n(N) More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloHeatCapacityFormatter ()
 Print heat capacity, 'heat_capacity'. More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloSuscXFormatter (std::string comp_var_i, std::string comp_var_j)
 Print parametric susceptibility, 'susc_x(a,b)'. More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloSuscNFormatter (std::string species_i, std::string species_j)
 Print susceptibility, 'susc_n(A,B)'. More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloThermoChemSuscXFormatter (std::string comp_var_i)
 Print parametric thermo-chemical susceptibility, 'susc_x(S,a)'. More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloThermoChemSuscNFormatter (std::string species_i)
 Print thermo-chemical susceptibility, 'susc_n(S,A)'. More...
 
GenericDatumFormatter< size_type, ConstMonteCarloPtrMonteCarloNEquilSamplesFormatter ()
 Print number of samples used for equilibration (not counting explicitly requested equilibration) More...
 
GenericDatumFormatter< size_type, ConstMonteCarloPtrMonteCarloNAvgSamplesFormatter ()
 Print number of samples used in calculating means. More...
 
GenericDatumFormatter< size_type, std::pair< ConstMonteCarloPtr, size_type > > MonteCarloPassFormatter ()
 Print Pass number of observation. More...
 
GenericDatumFormatter< size_type, std::pair< ConstMonteCarloPtr, size_type > > MonteCarloStepFormatter ()
 Print Step number of observation. More...
 
GenericDatumFormatter< double, std::pair< ConstMonteCarloPtr, size_type > > MonteCarloObservationFormatter (std::string prop_name)
 Print value of observation. More...
 
GenericDatumFormatter< int, std::pair< ConstMonteCarloPtr, size_type > > MonteCarloOccFormatter (size_type occ_index)
 Print value of a particular occupation variable. More...
 
DataFormatter< std::pair< ConstMonteCarloPtr, size_type > > make_observation_formatter (const MonteCarlo &mc)
 Make a observation formatter. More...
 
DataFormatter< std::pair< ConstMonteCarloPtr, size_type > > make_trajectory_formatter (const MonteCarlo &mc)
 Make a trajectory formatter. More...
 
template<typename MonteType >
void write_results (const MonteSettings &settings, const MonteType &mc, Log &_log)
 Will create new file or append to existing file results of the latest run. More...
 
template<typename MonteType >
void write_conditions_json (const MonteSettings &settings, const MonteType &mc, size_type cond_index, Log &_log)
 Write conditions to conditions.cond_index directory. More...
 
void write_observations (const MonteSettings &settings, const MonteCarlo &mc, size_type cond_index, Log &_log)
 Will create (and possibly overwrite) new file with all observations from run with conditions.cond_index. More...
 
void write_trajectory (const MonteSettings &settings, const MonteCarlo &mc, size_type cond_index, Log &_log)
 Will create (and possibly overwrite) new file with all observations from run with conditions.cond_index. More...
 
void write_POSCAR_initial (const MonteCarlo &mc, size_type cond_index, Log &_log)
 For the initial state, write a POSCAR file. More...
 
void write_POSCAR_final (const MonteCarlo &mc, size_type cond_index, Log &_log)
 For the final state, write a POSCAR file. More...
 
void write_POSCAR_trajectory (const MonteCarlo &mc, size_type cond_index, Log &_log)
 For every snapshot taken, write a POSCAR file. More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloSiteFracFormatter (const MonteType &mc, int index)
 Print site_frac(x) for any class MonteType with valid 'Eigen::VectorXd MonteType::comp_n'. More...
 
template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtrMonteCarloAtomFracFormatter (const MonteType &mc, int index)
 Print atom_frac(X) for any class MonteType with valid 'Eigen::VectorXd MonteType::comp_n'. More...
 
bool operator== (const jsonParser &json, const MonteSettings &settings)
 
bool operator!= (const jsonParser &json, const MonteSettings &settings)
 
jsonParserto_json (const OccCandidate &cand, const Conversions &convert, jsonParser &json)
 
std::ostream & operator<< (std::ostream &sout, std::pair< const OccCandidate &, const Conversions & > value)
 
jsonParserto_json (const OccSwap &swap, const Conversions &convert, jsonParser &json)
 
std::ostream & operator<< (std::ostream &sout, std::pair< const OccSwap &, const Conversions & > value)
 
jsonParserto_json (const OccCandidateList &list, const Conversions &convert, jsonParser &json)
 
std::ostream & operator<< (std::ostream &sout, std::pair< const OccCandidateList &, const Conversions & > value)
 
Clex make_clex (PrimClex const &primclex, CanonicalSettings const &settings)
 
Clex make_clex (PrimClex const &primclex, GrandCanonicalSettings const &settings)
 
double covariance (const Eigen::VectorXd &X, const Eigen::VectorXd &Y, double mean)
 

Typedef Documentation

◆ ConstMonteCarloPtr

const pointer to const MonteCarlo

Definition at line 15 of file CanonicalIO.hh.

◆ OccMod

An OccMod describes the change in occupation variable on a site.

Definition at line 64 of file DoFMod.hh.

◆ size_type

Definition at line 11 of file MonteDefinitions.hh.

Enumeration Type Documentation

◆ DRIVE_MODE

How to change conditions.

Enumerator
INCREMENTAL 
CUSTOM 

Definition at line 32 of file MonteDefinitions.hh.

◆ ENSEMBLE

enum CASM::Monte::ENSEMBLE
strong

Monte Carlo ensemble type.

Enumerator
GrandCanonical 
Canonical 

Definition at line 14 of file MonteDefinitions.hh.

◆ ENUM_SAMPLE_MODE

How often to sample runs.

Enumerator
ON_SAMPLE 
ON_ACCEPT 

Definition at line 38 of file MonteDefinitions.hh.

◆ METHOD

enum CASM::Monte::METHOD
strong

Monte Carlo method type.

Enumerator
Metropolis 
LTE1 

Definition at line 20 of file MonteDefinitions.hh.

◆ SAMPLE_MODE

How often to sample runs.

Enumerator
STEP 
PASS 

Definition at line 26 of file MonteDefinitions.hh.

Function Documentation

◆ covariance()

double CASM::Monte::covariance ( const Eigen::VectorXd &  X,
const Eigen::VectorXd &  Y,
double  mean 
)

Definition at line 159 of file MCData.cc.

◆ from_json() [1/2]

void CASM::Monte::from_json ( CanonicalConditions conditions,
const PrimClex primclex,
const jsonParser json 
)

Read CanonicalConditions from JSON format.

Read GrandCanonicalConditions from JSON format.

{
"temperature" : number,
"tol: number,
"comp" : {"a": number, "b": number, ...} // option 1: comp object
"comp" : [number, number, ...] // option 2: comp array
"comp_n" : {"A": number, "B": number, ...} // option 3: comp_n object
"comp_n" : [number, number, ...] // option 2: comp_n array
}
Eigen::VectorXd comp(const Configuration &config)
Returns parametric composition, as calculated using PrimClex::param_comp.
Eigen::VectorXd comp_n(const Configuration &config)
Returns the composition, as number of each species per unit cell.

Definition at line 137 of file CanonicalIO.cc.

◆ from_json() [2/2]

void CASM::Monte::from_json ( GrandCanonicalConditions conditions,
const PrimClex primclex,
const jsonParser json 
)

Read GrandCanonicalConditions from JSON format.

{
"temperature" : number,
"tol: number,
"param_chem_pot" : {"a": number, "b": number, ...}
}

Definition at line 262 of file GrandCanonicalIO.cc.

◆ GrandCanonicalLTEFormatter()

GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::GrandCanonicalLTEFormatter ( const double &  phi_LTE1)

Print single spin flip LTE.

Definition at line 279 of file GrandCanonicalIO.cc.

◆ make_clex() [1/2]

Clex CASM::Monte::make_clex ( PrimClex const &  primclex,
CanonicalSettings const &  settings 
)

Definition at line 26 of file Canonical.cc.

◆ make_clex() [2/2]

Clex CASM::Monte::make_clex ( PrimClex const &  primclex,
GrandCanonicalSettings const &  settings 
)

Definition at line 32 of file GrandCanonical.cc.

◆ make_lte_results_formatter()

DataFormatter< ConstMonteCarloPtr > CASM::Monte::make_lte_results_formatter ( const GrandCanonical mc,
const double &  phi_LTE1,
const std::string &  configname 
)

Make a results formatter.

Make a LTE results formatter.

Output data is:

  • T
  • phi_LTE
  • Beta
  • configname
  • gs_potential_energy
  • gs_formation_energy
  • param_chem_pot(a) ...
  • gs_comp(a) ...
  • gs_comp_n(a) ...

For JSON format is:

{ "key0":[...], "key1":[...], ... }

Definition at line 157 of file GrandCanonicalIO.cc.

◆ make_observation_formatter()

DataFormatter< std::pair< ConstMonteCarloPtr, size_type > > CASM::Monte::make_observation_formatter ( const MonteCarlo mc)

Make a observation formatter.

For csv:

# Pass Step X1 X2 ...

For JSON:

{"Pass/Step":[...], "X":[...], ...}

Definition at line 223 of file MonteIO.cc.

◆ make_results_formatter() [1/2]

DataFormatter< ConstMonteCarloPtr > CASM::Monte::make_results_formatter ( const Canonical mc)

Make a LTE results formatter.

Make a results formatter.

Output data is:

  • N_equil_samples
  • N_avg_samples
  • T
  • Beta
  • <potential_energy>, prec(<potential_energy>)
  • <formation_energy>, prec(<formation_energy>)
  • <comp(a)> prec(<comp(a)>) ...
  • <comp_n(a)> prec(<comp_n(a)>) ...
  • (other properties: correlations, atom_frac, site_frac, etc.)
  • heat_capacity

For JSON format is:

{ "key0":[...], "key1":[...], ... }

Definition at line 31 of file CanonicalIO.cc.

◆ make_results_formatter() [2/2]

DataFormatter< ConstMonteCarloPtr > CASM::Monte::make_results_formatter ( const GrandCanonical mc)

Make a LTE results formatter.

Make a results formatter.

Output data is:

  • N_equil_samples
  • N_avg_samples
  • T
  • Beta
  • <potential_energy>, prec(<potential_energy>)
  • <formation_energy>, prec(<formation_energy>)
  • param_chem_pot(a) ...
  • <comp(a)> prec(<comp(a)>) ...
  • <comp_n(a)> prec(<comp_n(a)>) ...
  • (other properties: correlations, atom_frac, site_frac, etc.)
  • heat_capacity
  • susc_x(a,a), ...
  • susc_x(S,a), ...
  • susc_n(A,A), ...
  • susc_n(S,A), ...

For JSON format is:

{ "key0":[...], "key1":[...], ... }

Definition at line 36 of file GrandCanonicalIO.cc.

◆ make_trajectory_formatter()

DataFormatter< std::pair< ConstMonteCarloPtr, size_type > > CASM::Monte::make_trajectory_formatter ( const MonteCarlo mc)

Make a trajectory formatter.

For csv:

Pass Step occ(0) occ(1) ...

For JSON:

{"Pass" : [...], "Step":[...], "occ":[[...]]}

Definition at line 246 of file MonteIO.cc.

◆ monte_carlo_step()

template<typename RunType >
bool CASM::Monte::monte_carlo_step ( RunType &  monte_run)

Perform a single monte carlo step, return true if accepted.

Definition at line 450 of file MonteDriver_impl.hh.

◆ MonteCarloAtomFracFormatter()

template<typename MonteType >
GenericDatumFormatter<double, ConstMonteCarloPtr> CASM::Monte::MonteCarloAtomFracFormatter ( const MonteType &  mc,
int  index 
)

Print atom_frac(X) for any class MonteType with valid 'Eigen::VectorXd MonteType::comp_n'.

Definition at line 130 of file MonteIO_impl.hh.

◆ MonteCarloBetaFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloBetaFormatter ( )

Print Beta.

Print Beta for any class MonteType with valid 'double MonteType::conditions().beta()'.

Definition at line 36 of file MonteIO_impl.hh.

◆ MonteCarloChemPotFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloChemPotFormatter ( const MonteType &  mc,
int  index 
)

Print chem_pot(N)

Print chem_pot(N) for any class MonteType with valid 'double MonteType::conditions().chem_pot(index)'.

Definition at line 64 of file MonteIO_impl.hh.

◆ MonteCarloCompFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloCompFormatter ( const MonteType &  mc,
int  index 
)

Print comp(x)

Print comp(x) for any class MonteType with valid 'double MonteType::conditions().param_composition()(index)'.

Definition at line 79 of file MonteIO_impl.hh.

◆ MonteCarloCompNFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloCompNFormatter ( const MonteType &  mc,
int  index 
)

Print comp_n(N)

Print comp(x) for any class MonteType with valid 'double MonteType::conditions().mol_composition()(index)'.

Definition at line 96 of file MonteIO_impl.hh.

◆ MonteCarloCovFormatter()

GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloCovFormatter ( std::string  prop_name1,
std::string  prop_name2 
)

Print covariance: cov(prop_name1, prop_name2)

Definition at line 96 of file MonteIO.cc.

◆ MonteCarloHeatCapacityFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloHeatCapacityFormatter ( )

Print heat capacity, 'heat_capacity'.

  • Heat capacity (per unit cell) = cov(potential_energy, potential_energy)*N/(k*T*T)

Definition at line 153 of file MonteIO_impl.hh.

◆ MonteCarloIsConvergedFormatter()

GenericDatumFormatter< bool, ConstMonteCarloPtr > CASM::Monte::MonteCarloIsConvergedFormatter ( )

Print if converged.

Definition at line 125 of file MonteIO.cc.

◆ MonteCarloIsEquilibratedFormatter()

GenericDatumFormatter< bool, ConstMonteCarloPtr > CASM::Monte::MonteCarloIsEquilibratedFormatter ( )

Print if equilibrated (not counting explicitly requested equilibration)

Definition at line 114 of file MonteIO.cc.

◆ MonteCarloMeanFormatter()

GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloMeanFormatter ( std::string  prop_name)

Print mean property values: <prop_name>

Definition at line 31 of file MonteIO.cc.

◆ MonteCarloNAvgSamplesFormatter()

GenericDatumFormatter< size_type, ConstMonteCarloPtr > CASM::Monte::MonteCarloNAvgSamplesFormatter ( )

Print number of samples used in calculating means.

Definition at line 148 of file MonteIO.cc.

◆ MonteCarloNEquilSamplesFormatter()

GenericDatumFormatter< size_type, ConstMonteCarloPtr > CASM::Monte::MonteCarloNEquilSamplesFormatter ( )

Print number of samples used for equilibration (not counting explicitly requested equilibration)

Definition at line 137 of file MonteIO.cc.

◆ MonteCarloObservationFormatter()

GenericDatumFormatter< double, std::pair< ConstMonteCarloPtr, size_type > > CASM::Monte::MonteCarloObservationFormatter ( std::string  prop_name)

Print value of observation.

Definition at line 184 of file MonteIO.cc.

◆ MonteCarloOccFormatter()

GenericDatumFormatter< int, std::pair< ConstMonteCarloPtr, size_type > > CASM::Monte::MonteCarloOccFormatter ( size_type  occ_index)

Print value of a particular occupation variable.

Definition at line 198 of file MonteIO.cc.

◆ MonteCarloParamChemPotFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloParamChemPotFormatter ( const MonteType &  mc,
int  index 
)

Print param_chem_pot(x)

Print param_chem_pot(x) for any class MonteType with valid 'double MonteType::conditions().param_chem_pot()(index)'.

Definition at line 49 of file MonteIO_impl.hh.

◆ MonteCarloPassFormatter()

GenericDatumFormatter< MonteCounter::size_type, std::pair< ConstMonteCarloPtr, size_type > > CASM::Monte::MonteCarloPassFormatter ( )

Print Pass number of observation.

Definition at line 160 of file MonteIO.cc.

◆ MonteCarloPrecFormatter()

GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloPrecFormatter ( std::string  prop_name)

Print calculated precision of property values: prec(<prop_name>)

Definition at line 49 of file MonteIO.cc.

◆ MonteCarloSiteFracFormatter()

template<typename MonteType >
GenericDatumFormatter<double, ConstMonteCarloPtr> CASM::Monte::MonteCarloSiteFracFormatter ( const MonteType &  mc,
int  index 
)

Print site_frac(x) for any class MonteType with valid 'Eigen::VectorXd MonteType::comp_n'.

Definition at line 113 of file MonteIO_impl.hh.

◆ MonteCarloStepFormatter()

GenericDatumFormatter< size_type, std::pair< ConstMonteCarloPtr, size_type > > CASM::Monte::MonteCarloStepFormatter ( )

Print Step number of observation.

Definition at line 172 of file MonteIO.cc.

◆ MonteCarloSuscNFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloSuscNFormatter ( std::string  species_i,
std::string  species_j 
)

Print susceptibility, 'susc_n(A,B)'.

Print parametric susceptibility, 'susc_x(a,b)'.

  • species_i: First species "A", "B", "C", ...
  • species_j: Second species "A", "B", "C", ...
  • Heat capacity (per unit cell) = cov(x_i, x_j)*N/(k*T)

Definition at line 210 of file MonteIO_impl.hh.

◆ MonteCarloSuscXFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloSuscXFormatter ( std::string  comp_var_i,
std::string  comp_var_j 
)

Print parametric susceptibility, 'susc_x(a,b)'.

  • comp_var_i: First parametric composition variable "a", "b", "c", ...
  • comp_var_j: Second parametric composition variable "a", "b", "c", ...
  • Heat capacity (per unit cell) = cov(x_i, x_j)*N/(k*T)

Definition at line 179 of file MonteIO_impl.hh.

◆ MonteCarloTFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloTFormatter ( )

Print Temperature.

Print Temperature for any class MonteType with valid 'double MonteType::conditions().temperature()'.

Definition at line 24 of file MonteIO_impl.hh.

◆ MonteCarloThermoChemSuscNFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloThermoChemSuscNFormatter ( std::string  species_i)

Print thermo-chemical susceptibility, 'susc_n(S,A)'.

Definition at line 266 of file MonteIO_impl.hh.

◆ MonteCarloThermoChemSuscXFormatter()

template<typename MonteType >
GenericDatumFormatter< double, ConstMonteCarloPtr > CASM::Monte::MonteCarloThermoChemSuscXFormatter ( std::string  comp_var_i)

Print parametric thermo-chemical susceptibility, 'susc_x(S,a)'.

  • species_i: First species "A", "B", "C", ...
  • thermo-chemical susceptibility (per unit cell) = cov(potential_energy, x_i)*N/(k*T)

Definition at line 242 of file MonteIO_impl.hh.

◆ operator!=()

bool CASM::Monte::operator!= ( const jsonParser json,
const MonteSettings settings 
)
inline

Definition at line 205 of file MonteSettings.hh.

◆ operator<<() [1/5]

std::ostream & CASM::Monte::operator<< ( std::ostream &  sout,
const CanonicalConditions cond 
)

Definition at line 153 of file CanonicalConditions.cc.

◆ operator<<() [2/5]

std::ostream & CASM::Monte::operator<< ( std::ostream &  sout,
const GrandCanonicalConditions cond 
)

Definition at line 177 of file GrandCanonicalConditions.cc.

◆ operator<<() [3/5]

std::ostream & CASM::Monte::operator<< ( std::ostream &  sout,
std::pair< const OccCandidate &, const Conversions & >  value 
)

Definition at line 37 of file OccCandidate.cc.

◆ operator<<() [4/5]

std::ostream & CASM::Monte::operator<< ( std::ostream &  sout,
std::pair< const OccCandidateList &, const Conversions & >  value 
)

Definition at line 164 of file OccCandidate.cc.

◆ operator<<() [5/5]

std::ostream & CASM::Monte::operator<< ( std::ostream &  sout,
std::pair< const OccSwap &, const Conversions & >  value 
)

Definition at line 54 of file OccCandidate.cc.

◆ operator==()

bool CASM::Monte::operator== ( const jsonParser json,
const MonteSettings settings 
)
inline

Definition at line 201 of file MonteSettings.hh.

◆ to_json() [1/5]

jsonParser & CASM::Monte::to_json ( const CanonicalConditions conditions,
jsonParser json 
)

Store CanonicalConditions in JSON format.

Store GrandCanonicalConditions in JSON format.

{
"temperature" : number,
"tol: number,
"comp" : {"a": number, "b": number, ...},
"comp_n" : {"A": number, "B": number, ...}
}

Definition at line 102 of file CanonicalIO.cc.

◆ to_json() [2/5]

jsonParser & CASM::Monte::to_json ( const GrandCanonicalConditions conditions,
jsonParser json 
)

Store GrandCanonicalConditions in JSON format.

{
"temperature" : number,
"tol: number,
"param_chem_pot" : {"a": number, "b": number, ...}
}

Definition at line 237 of file GrandCanonicalIO.cc.

◆ to_json() [3/5]

jsonParser & CASM::Monte::to_json ( const OccCandidate cand,
const Conversions convert,
jsonParser json 
)

Definition at line 29 of file OccCandidate.cc.

◆ to_json() [4/5]

jsonParser & CASM::Monte::to_json ( const OccCandidateList list,
const Conversions convert,
jsonParser json 
)

Definition at line 138 of file OccCandidate.cc.

◆ to_json() [5/5]

jsonParser & CASM::Monte::to_json ( const OccSwap swap,
const Conversions convert,
jsonParser json 
)

Definition at line 45 of file OccCandidate.cc.

◆ write_conditions_json()

template<typename MonteType >
void CASM::Monte::write_conditions_json ( const MonteSettings settings,
const MonteType &  mc,
size_type  cond_index,
Log _log 
)

Write conditions to conditions.cond_index directory.

Definition at line 338 of file MonteIO_impl.hh.

◆ write_lte_results()

void CASM::Monte::write_lte_results ( const MonteSettings settings,
const GrandCanonical mc,
const double &  phi_LTE1,
const std::string &  configname,
Log _log 
)

Will create new file or append to existing results file the results of the latest run.

Definition at line 288 of file GrandCanonicalIO.cc.

◆ write_observations()

void CASM::Monte::write_observations ( const MonteSettings settings,
const MonteCarlo mc,
size_type  cond_index,
Log _log 
)

Will create (and possibly overwrite) new file with all observations from run with conditions.cond_index.

Definition at line 260 of file MonteIO.cc.

◆ write_POSCAR_final()

void CASM::Monte::write_POSCAR_final ( const MonteCarlo mc,
size_type  cond_index,
Log _log 
)

For the final state, write a POSCAR file.

The current naming convention is 'POSCAR.final'

Definition at line 458 of file MonteIO.cc.

◆ write_POSCAR_initial()

void CASM::Monte::write_POSCAR_initial ( const MonteCarlo mc,
size_type  cond_index,
Log _log 
)

For the initial state, write a POSCAR file.

The current naming convention is 'POSCAR.initial'

Definition at line 429 of file MonteIO.cc.

◆ write_POSCAR_trajectory()

void CASM::Monte::write_POSCAR_trajectory ( const MonteCarlo mc,
size_type  cond_index,
Log _log 
)

For every snapshot taken, write a POSCAR file.

The current naming convention is 'POSCAR.sample' POSCAR title comment is printed with "Sample: # Pass: # Step: #"

Definition at line 487 of file MonteIO.cc.

◆ write_results()

template<typename MonteType >
void CASM::Monte::write_results ( const MonteSettings settings,
const MonteType &  mc,
Log _log 
)

Will create new file or append to existing file results of the latest run.

Will create new file or append to existing results file the results of the latest run.

Definition at line 290 of file MonteIO_impl.hh.

◆ write_trajectory()

void CASM::Monte::write_trajectory ( const MonteSettings settings,
const MonteCarlo mc,
size_type  cond_index,
Log _log 
)

Will create (and possibly overwrite) new file with all observations from run with conditions.cond_index.

  • Also writes "occupation_key" file giving occupant index -> species for each prim basis site

For csv:

site_index occ_index_0 occ_index_1 ...
0 Ni Al
1 Ni -
...

For JSON:

[["A", "B"],["A" "C"], ... ]

Definition at line 325 of file MonteIO.cc.