1 #ifndef CASM_Monte_OccLocation_HH
2 #define CASM_Monte_OccLocation_HH
24 class OccCandidateList;
109 const std::vector<OccSwap> &canonical_swap,
110 MTRand &mtrand)
const;
114 MTRand &mtrand)
const;
134 std::vector<std::vector<Index> >
m_loc;
Stores data to enable efficient proposal and update of occupation mutation.
std::vector< Index > m_l_to_mol
l_to_mol[l] -> Mol.id, m_mol.size() otherwise
Index mol_id(Index cand_index, Index loc) const
Mol.id of a particular OccCandidate type.
OccEvent & _propose(OccEvent &e, const OccSwap &swap, MTRand &mtrand, Index cand_a, Index cand_b, Index size_a, Index size_b) const
Canonical propose.
size_type cand_size(Index cand_index) const
Total number of mutating sites, of OccCandidate type, specified by index.
std::vector< Mol > m_mol
Holds Mol objects, one for each mutating site in the configuration.
bool m_kmc
If true, update Species location during apply.
OccEvent & propose_grand_canonical(OccEvent &e, const OccSwap &swap, MTRand &mtrand) const
Propose grand canonical OccEvent.
std::vector< Species > m_species
Holds Monte::Species objects.
const OccCandidateList & m_cand
void apply(const OccEvent &e, ConfigDoF &configdof)
Update configdof and this to reflect that event 'e' occurred.
Index l_to_mol_id(Index l) const
Convert from config index to variable site index.
OccLocation(const Conversions &_convert, const OccCandidateList &_cand)
const Conversions & m_convert
std::vector< std::vector< Index > > m_loc
size_type size() const
Total number of mutating sites.
OccEvent & propose_canonical(OccEvent &e, const std::vector< OccSwap > &canonical_swap, MTRand &mtrand) const
Propose canonical OccEvent.
void initialize(const Configuration &config)
Fill tables with occupation info.
std::vector< double > m_tsum
Data used by propose_canonical.
std::vector< Mol > m_tmol
Data structure used store temporaries during apply.
Store swap type, mutating sites, and info for keeping OccLocation up-to-date.
ConfigIO::GenericConfigFormatter< jsonParser > config()
void swap(ConfigDoF &A, ConfigDoF &B)
INDEX_TYPE Index
For long integer indexing:
Represents the occupant on a site.
Index loc
Location in OccLocation.m_loc.
Index id
Location in OccLocation.m_mol.
std::vector< Index > component
Location of component Specie in OccLocation.m_species.
Index asym
Asym unit index (must be consistent with l)
Index l
Location in config.
std::vector< SpeciesTraj > species_traj
std::vector< OccTransform > occ_transform
Represents an indivisible molecule component.
Index id
Location in OccLocation.m_species.
xtal::UnitCellCoord bijk_begin
Saves initial position.
Index mol_comp_begin
Saves initial Mol.component index.
Species(xtal::UnitCellCoord _bijk_begin)
Index species_index
Species type index.
Index mol_comp
Location in mol.components.
Index l
Config occupant that is being transformed.
Index mol_id
Location in OccLocation.m_mol.