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

#include <OccLocation.hh>

Detailed Description

Stores data to enable efficient proposal and update of occupation mutation.

Definition at line 76 of file OccLocation.hh.

Public Types

typedef Index size_type
 

Public Member Functions

 OccLocation (const Conversions &_convert, const OccCandidateList &_cand)
 
void initialize (const Configuration &config)
 Fill tables with occupation info. More...
 
size_type size () const
 Total number of mutating sites. More...
 
Molmol (Index mol_id)
 
const Molmol (Index mol_id) const
 
size_type cand_size (Index cand_index) const
 Total number of mutating sites, of OccCandidate type, specified by index. More...
 
size_type cand_size (const OccCandidate &cand) const
 Total number of mutating sites, of OccCandidate type. More...
 
Index mol_id (Index cand_index, Index loc) const
 Mol.id of a particular OccCandidate type. More...
 
Index mol_id (const OccCandidate &cand, Index loc) const
 Mol.id of a particular OccCandidate type. More...
 
Index l_to_mol_id (Index l) const
 Convert from config index to variable site index. More...
 
OccEventpropose_canonical (OccEvent &e, const std::vector< OccSwap > &canonical_swap, MTRand &mtrand) const
 Propose canonical OccEvent. More...
 
OccEventpropose_grand_canonical (OccEvent &e, const OccSwap &swap, MTRand &mtrand) const
 Propose grand canonical OccEvent. More...
 
void apply (const OccEvent &e, ConfigDoF &configdof)
 Update configdof and this to reflect that event 'e' occurred. More...
 

Private Member Functions

OccEvent_propose (OccEvent &e, const OccSwap &swap, MTRand &mtrand, Index cand_a, Index cand_b, Index size_a, Index size_b) const
 Canonical propose. More...
 
OccEvent_propose (OccEvent &e, const OccSwap &swap, MTRand &mtrand) const
 Canonical propose. More...
 

Private Attributes

const Conversionsm_convert
 
const OccCandidateListm_cand
 
std::vector< std::vector< Index > > m_loc
 
std::vector< Speciesm_species
 Holds Monte::Species objects. More...
 
std::vector< Molm_mol
 Holds Mol objects, one for each mutating site in the configuration. More...
 
std::vector< Indexm_l_to_mol
 l_to_mol[l] -> Mol.id, m_mol.size() otherwise More...
 
bool m_kmc
 If true, update Species location during apply. More...
 
std::vector< Molm_tmol
 Data structure used store temporaries during apply. More...
 
std::vector< double > m_tsum
 Data used by propose_canonical. More...
 

Member Typedef Documentation

◆ size_type

Definition at line 78 of file OccLocation.hh.

Constructor & Destructor Documentation

◆ OccLocation()

CASM::Monte::OccLocation::OccLocation ( const Conversions _convert,
const OccCandidateList _cand 
)

Definition at line 11 of file OccLocation.cc.

Member Function Documentation

◆ _propose() [1/2]

OccEvent & CASM::Monte::OccLocation::_propose ( OccEvent e,
const OccSwap swap,
MTRand &  mtrand 
) const
private

Canonical propose.

Definition at line 220 of file OccLocation.cc.

◆ _propose() [2/2]

OccEvent & CASM::Monte::OccLocation::_propose ( OccEvent e,
const OccSwap swap,
MTRand &  mtrand,
Index  cand_a,
Index  cand_b,
Index  size_a,
Index  size_b 
) const
private

Canonical propose.

Definition at line 192 of file OccLocation.cc.

◆ apply()

void CASM::Monte::OccLocation::apply ( const OccEvent e,
ConfigDoF configdof 
)

Update configdof and this to reflect that event 'e' occurred.

Definition at line 147 of file OccLocation.cc.

◆ cand_size() [1/2]

OccLocation::size_type CASM::Monte::OccLocation::cand_size ( const OccCandidate cand) const

Total number of mutating sites, of OccCandidate type.

Definition at line 85 of file OccLocation.cc.

◆ cand_size() [2/2]

OccLocation::size_type CASM::Monte::OccLocation::cand_size ( Index  cand_index) const

Total number of mutating sites, of OccCandidate type, specified by index.

Definition at line 80 of file OccLocation.cc.

◆ initialize()

void CASM::Monte::OccLocation::initialize ( const Configuration config)

Fill tables with occupation info.

Definition at line 16 of file OccLocation.cc.

◆ l_to_mol_id()

Index CASM::Monte::OccLocation::l_to_mol_id ( Index  l) const

Convert from config index to variable site index.

Definition at line 100 of file OccLocation.cc.

◆ mol() [1/2]

Mol & CASM::Monte::OccLocation::mol ( Index  mol_id)

Definition at line 75 of file OccLocation.cc.

◆ mol() [2/2]

const Mol & CASM::Monte::OccLocation::mol ( Index  mol_id) const

Definition at line 77 of file OccLocation.cc.

◆ mol_id() [1/2]

Index CASM::Monte::OccLocation::mol_id ( const OccCandidate cand,
Index  loc 
) const

Mol.id of a particular OccCandidate type.

The index into the configuration of a particular mutating site.

Definition at line 95 of file OccLocation.cc.

◆ mol_id() [2/2]

Index CASM::Monte::OccLocation::mol_id ( Index  cand_index,
Index  loc 
) const

Mol.id of a particular OccCandidate type.

The index into the configuration of a particular mutating site.

Definition at line 90 of file OccLocation.cc.

◆ propose_canonical()

OccEvent & CASM::Monte::OccLocation::propose_canonical ( OccEvent e,
const std::vector< OccSwap > &  canonical_swap,
MTRand &  mtrand 
) const

Propose canonical OccEvent.

Definition at line 103 of file OccLocation.cc.

◆ propose_grand_canonical()

OccEvent & CASM::Monte::OccLocation::propose_grand_canonical ( OccEvent e,
const OccSwap swap,
MTRand &  mtrand 
) const

Propose grand canonical OccEvent.

Definition at line 128 of file OccLocation.cc.

◆ size()

OccLocation::size_type CASM::Monte::OccLocation::size ( ) const

Total number of mutating sites.

Definition at line 73 of file OccLocation.cc.

Member Data Documentation

◆ m_cand

const OccCandidateList& CASM::Monte::OccLocation::m_cand
private

Definition at line 130 of file OccLocation.hh.

◆ m_convert

const Conversions& CASM::Monte::OccLocation::m_convert
private

Definition at line 128 of file OccLocation.hh.

◆ m_kmc

bool CASM::Monte::OccLocation::m_kmc
private

If true, update Species location during apply.

Definition at line 146 of file OccLocation.hh.

◆ m_l_to_mol

std::vector<Index> CASM::Monte::OccLocation::m_l_to_mol
private

l_to_mol[l] -> Mol.id, m_mol.size() otherwise

Definition at line 143 of file OccLocation.hh.

◆ m_loc

std::vector<std::vector<Index> > CASM::Monte::OccLocation::m_loc
private

Gives a list of all Mol of the same {asym, species}-type allowed to mutate m_loc[cand_index][i] -> m_mol index

Definition at line 134 of file OccLocation.hh.

◆ m_mol

std::vector<Mol> CASM::Monte::OccLocation::m_mol
private

Holds Mol objects, one for each mutating site in the configuration.

Definition at line 140 of file OccLocation.hh.

◆ m_species

std::vector<Species> CASM::Monte::OccLocation::m_species
private

Holds Monte::Species objects.

Definition at line 137 of file OccLocation.hh.

◆ m_tmol

std::vector<Mol> CASM::Monte::OccLocation::m_tmol
private

Data structure used store temporaries during apply.

Definition at line 149 of file OccLocation.hh.

◆ m_tsum

std::vector<double> CASM::Monte::OccLocation::m_tsum
mutableprivate

Data used by propose_canonical.

Definition at line 152 of file OccLocation.hh.


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