CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::Monte::GrandCanonicalConditions Class Reference

#include <GrandCanonicalConditions.hh>

Detailed Description

Conditions for a Grand Canonical run: Temperature Chemical potential Tolerance (for comparing conditions)

Definition at line 17 of file GrandCanonicalConditions.hh.

Public Member Functions

 GrandCanonicalConditions ()
 Default constructor. More...
 
 GrandCanonicalConditions (const PrimClex &_primclex, double _temperature, const Eigen::VectorXd &_param_chem_pot, double _tol)
 Constructor. More...
 
const PrimClexprimclex () const
 
double temperature () const
 
double beta () const
 
Eigen::MatrixXd exchange_chem_pot () const
 matrix of exchange chemical potential, M(new, curr) = chem_pot(new) More...
 
double exchange_chem_pot (Index index_new, Index index_curr) const
 exchange chemical potential: chem_pot(new) - chem_pot(curr) More...
 
Eigen::VectorXd param_chem_pot () const
 parametric chemical potential: dg/dcomp_x More...
 
double param_chem_pot (Index index) const
 parametric chemical potential: dg/dcomp_x(index) More...
 
double tolerance () const
 
void set_temperature (double in_temp)
 Set the temperature of the current grand canonical condition. More...
 
void set_param_chem_pot (const Eigen::VectorXd &in_chem_pot)
 
void set_param_chem_pot (Index ind, double in_chem_pot)
 
GrandCanonicalConditionsoperator+= (const GrandCanonicalConditions &RHS)
 Add temperature and all chemical potentials to *this. More...
 
GrandCanonicalConditions operator+ (const GrandCanonicalConditions &RHS) const
 
GrandCanonicalConditionsoperator-= (const GrandCanonicalConditions &RHS)
 Subtract temperature and all chemical potentials to *this. More...
 
GrandCanonicalConditions operator- (const GrandCanonicalConditions &RHS) const
 
bool operator== (const GrandCanonicalConditions &RHS) const
 Compare temperature and all chemical potentials to *this. More...
 
bool operator!= (const GrandCanonicalConditions &RHS) const
 Compare temperature and all chemical potentials to *this. More...
 
int operator/ (const GrandCanonicalConditions &RHS_inc) const
 Divide ALL parameters and return the greatest number in absolute value. More...
 

Protected Attributes

const PrimClexm_primclex
 
double m_temperature
 Temperature. More...
 
double m_beta
 Inverse temperature. Includes Boltzmann term. More...
 
Eigen::VectorXd m_chem_pot
 
Eigen::VectorXd m_param_chem_pot
 
Eigen::MatrixXd m_exchange_chem_pot
 Matrix(i,j) of chem_pot(i) - chem_pot(j) More...
 
double m_tolerance
 Tolerance for comparison operators == and !=. More...
 

Constructor & Destructor Documentation

◆ GrandCanonicalConditions() [1/2]

CASM::Monte::GrandCanonicalConditions::GrandCanonicalConditions ( )
inline

Default constructor.

Definition at line 20 of file GrandCanonicalConditions.hh.

◆ GrandCanonicalConditions() [2/2]

CASM::Monte::GrandCanonicalConditions::GrandCanonicalConditions ( const PrimClex _primclex,
double  _temperature,
const Eigen::VectorXd &  _param_chem_pot,
double  _tol 
)

Constructor.

Parameters
_primclexPrimClex
_temperaturein K
_param_chem_potParametric composition chemical potential
_toltolerance for comparing conditions

Definition at line 18 of file GrandCanonicalConditions.cc.

Member Function Documentation

◆ beta()

double CASM::Monte::GrandCanonicalConditions::beta ( ) const

Definition at line 41 of file GrandCanonicalConditions.cc.

◆ exchange_chem_pot() [1/2]

Eigen::MatrixXd CASM::Monte::GrandCanonicalConditions::exchange_chem_pot ( ) const

matrix of exchange chemical potential, M(new, curr) = chem_pot(new)

  • chem_pot(curr)

Definition at line 43 of file GrandCanonicalConditions.cc.

◆ exchange_chem_pot() [2/2]

double CASM::Monte::GrandCanonicalConditions::exchange_chem_pot ( Index  index_new,
Index  index_curr 
) const

exchange chemical potential: chem_pot(new) - chem_pot(curr)

Definition at line 47 of file GrandCanonicalConditions.cc.

◆ operator!=()

bool CASM::Monte::GrandCanonicalConditions::operator!= ( const GrandCanonicalConditions RHS) const

Compare temperature and all chemical potentials to *this.

Definition at line 152 of file GrandCanonicalConditions.cc.

◆ operator+()

GrandCanonicalConditions CASM::Monte::GrandCanonicalConditions::operator+ ( const GrandCanonicalConditions RHS) const

Add temperature and all chemical potentials together and return a new Condition

Definition at line 114 of file GrandCanonicalConditions.cc.

◆ operator+=()

GrandCanonicalConditions & CASM::Monte::GrandCanonicalConditions::operator+= ( const GrandCanonicalConditions RHS)

Add temperature and all chemical potentials to *this.

Definition at line 103 of file GrandCanonicalConditions.cc.

◆ operator-()

GrandCanonicalConditions CASM::Monte::GrandCanonicalConditions::operator- ( const GrandCanonicalConditions RHS) const

Subtract temperature and all chemical potentials together and return a new Condition

Definition at line 131 of file GrandCanonicalConditions.cc.

◆ operator-=()

GrandCanonicalConditions & CASM::Monte::GrandCanonicalConditions::operator-= ( const GrandCanonicalConditions RHS)

Subtract temperature and all chemical potentials to *this.

Definition at line 120 of file GrandCanonicalConditions.cc.

◆ operator/()

int CASM::Monte::GrandCanonicalConditions::operator/ ( const GrandCanonicalConditions RHS_inc) const

Divide ALL parameters and return the greatest number in absolute value.

Definition at line 157 of file GrandCanonicalConditions.cc.

◆ operator==()

bool CASM::Monte::GrandCanonicalConditions::operator== ( const GrandCanonicalConditions RHS) const

Compare temperature and all chemical potentials to *this.

Definition at line 136 of file GrandCanonicalConditions.cc.

◆ param_chem_pot() [1/2]

Eigen::VectorXd CASM::Monte::GrandCanonicalConditions::param_chem_pot ( ) const

parametric chemical potential: dg/dcomp_x

Definition at line 52 of file GrandCanonicalConditions.cc.

◆ param_chem_pot() [2/2]

double CASM::Monte::GrandCanonicalConditions::param_chem_pot ( Index  index) const

parametric chemical potential: dg/dcomp_x(index)

Definition at line 56 of file GrandCanonicalConditions.cc.

◆ primclex()

const PrimClex & CASM::Monte::GrandCanonicalConditions::primclex ( ) const

Definition at line 35 of file GrandCanonicalConditions.cc.

◆ set_param_chem_pot() [1/2]

void CASM::Monte::GrandCanonicalConditions::set_param_chem_pot ( const Eigen::VectorXd &  in_chem_pot)

Set all the parametric chemical potentials of the current grand canonical condition.

Definition at line 71 of file GrandCanonicalConditions.cc.

◆ set_param_chem_pot() [2/2]

void CASM::Monte::GrandCanonicalConditions::set_param_chem_pot ( Index  ind,
double  in_chem_pot 
)

Set a single parametric chemical potential by specifying an index and a value.

Definition at line 93 of file GrandCanonicalConditions.cc.

◆ set_temperature()

void CASM::Monte::GrandCanonicalConditions::set_temperature ( double  in_temp)

Set the temperature of the current grand canonical condition.

Definition at line 65 of file GrandCanonicalConditions.cc.

◆ temperature()

double CASM::Monte::GrandCanonicalConditions::temperature ( ) const

Definition at line 39 of file GrandCanonicalConditions.cc.

◆ tolerance()

double CASM::Monte::GrandCanonicalConditions::tolerance ( ) const

Definition at line 60 of file GrandCanonicalConditions.cc.

Member Data Documentation

◆ m_beta

double CASM::Monte::GrandCanonicalConditions::m_beta
protected

Inverse temperature. Includes Boltzmann term.

Definition at line 103 of file GrandCanonicalConditions.hh.

◆ m_chem_pot

Eigen::VectorXd CASM::Monte::GrandCanonicalConditions::m_chem_pot
protected

Vector of the 'atomic' chemical potentials for each species. Ordered as primclex.get_param_comp().get_components()

Definition at line 107 of file GrandCanonicalConditions.hh.

◆ m_exchange_chem_pot

Eigen::MatrixXd CASM::Monte::GrandCanonicalConditions::m_exchange_chem_pot
protected

Matrix(i,j) of chem_pot(i) - chem_pot(j)

Definition at line 114 of file GrandCanonicalConditions.hh.

◆ m_param_chem_pot

Eigen::VectorXd CASM::Monte::GrandCanonicalConditions::m_param_chem_pot
protected

Vector of the parametric chemical potentials conjugate to the parametric compositions.

Definition at line 111 of file GrandCanonicalConditions.hh.

◆ m_primclex

const PrimClex* CASM::Monte::GrandCanonicalConditions::m_primclex
protected

Definition at line 97 of file GrandCanonicalConditions.hh.

◆ m_temperature

double CASM::Monte::GrandCanonicalConditions::m_temperature
protected

Temperature.

Definition at line 100 of file GrandCanonicalConditions.hh.

◆ m_tolerance

double CASM::Monte::GrandCanonicalConditions::m_tolerance
protected

Tolerance for comparison operators == and !=.

Definition at line 117 of file GrandCanonicalConditions.hh.


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