QMCPACK
SimulationCell Class Reference
+ Collaboration diagram for SimulationCell:

Public Types

using Lattice = PtclOnLatticeTraits::ParticleLayout
 

Public Member Functions

 SimulationCell ()
 
 SimulationCell (const Lattice &lattice)
 
const LatticegetLattice () const
 
const LatticegetPrimLattice () const
 
const LatticegetLRBox () const
 
void resetLRBox ()
 
const KContainergetKLists () const
 access k_lists_ read only More...
 

Private Attributes

Lattice lattice_
 simulation cell lattice More...
 
Lattice primative_lattice_
 Primative cell lattice. More...
 
Lattice LRBox_
 long-range box More...
 
KContainer k_lists_
 K-Vector List. More...
 

Friends

class ParticleSetPool
 

Detailed Description

Definition at line 23 of file SimulationCell.h.

Member Typedef Documentation

◆ Lattice

Definition at line 26 of file SimulationCell.h.

Constructor & Destructor Documentation

◆ SimulationCell() [1/2]

SimulationCell ( )
default

◆ SimulationCell() [2/2]

SimulationCell ( const Lattice lattice)

Definition at line 20 of file SimulationCell.cpp.

References SimulationCell::resetLRBox().

21  : lattice_(lattice)
22 {
23  resetLRBox();
24 }
Lattice lattice_
simulation cell lattice
CrystalLattice< OHMMS_PRECISION, OHMMS_DIM > lattice

Member Function Documentation

◆ getKLists()

const KContainer& getKLists ( ) const
inline

access k_lists_ read only

Definition at line 38 of file SimulationCell.h.

References SimulationCell::k_lists_.

Referenced by ParticleSet::createSK(), and qmcplusplus::TEST_CASE().

38 { return k_lists_; }
KContainer k_lists_
K-Vector List.

◆ getLattice()

const Lattice& getLattice ( ) const
inline

◆ getLRBox()

const Lattice& getLRBox ( ) const
inline

Definition at line 33 of file SimulationCell.h.

References SimulationCell::LRBox_.

Referenced by ParticleSet::getLRBox().

33 { return LRBox_; }
Lattice LRBox_
long-range box

◆ getPrimLattice()

const Lattice& getPrimLattice ( ) const
inline

Definition at line 32 of file SimulationCell.h.

References SimulationCell::primative_lattice_.

Referenced by ParticleSet::getPrimitiveLattice().

32 { return primative_lattice_; }
Lattice primative_lattice_
Primative cell lattice.

◆ resetLRBox()

void resetLRBox ( )

Definition at line 26 of file SimulationCell.cpp.

References qmcplusplus::app_log(), qmcplusplus::app_summary(), SimulationCell::k_lists_, SimulationCell::lattice_, SimulationCell::LRBox_, CrystalLattice< T, D >::print(), CrystalLattice< T, D >::R, CrystalLattice< T, D >::reset(), CrystalLattice< T, D >::Rv, qmcplusplus::SUPERCELL_OPEN, qmcplusplus::SUPERCELL_SLAB, qmcplusplus::SUPERCELL_WIRE, CrystalLattice< T, D >::SuperCellEnum, KContainer::updateKLists(), and CrystalLattice< T, D >::VacuumScale.

Referenced by SimulationCell::SimulationCell().

27 {
29  {
30  lattice_.SetLRCutoffs(lattice_.Rv);
31  LRBox_ = lattice_;
32  bool changed = false;
34  {
35  LRBox_.R(2, 0) *= lattice_.VacuumScale;
36  LRBox_.R(2, 1) *= lattice_.VacuumScale;
37  LRBox_.R(2, 2) *= lattice_.VacuumScale;
38  changed = true;
39  }
41  {
42  LRBox_.R(1, 0) *= lattice_.VacuumScale;
43  LRBox_.R(1, 1) *= lattice_.VacuumScale;
44  LRBox_.R(1, 2) *= lattice_.VacuumScale;
45  LRBox_.R(2, 0) *= lattice_.VacuumScale;
46  LRBox_.R(2, 1) *= lattice_.VacuumScale;
47  LRBox_.R(2, 2) *= lattice_.VacuumScale;
48  changed = true;
49  }
50  LRBox_.reset();
51  LRBox_.SetLRCutoffs(LRBox_.Rv);
52  LRBox_.printCutoffs(app_log());
53 
54  if (changed)
55  {
56  app_summary() << " Simulation box changed by vacuum supercell conditions" << std::endl;
57  app_log() << "--------------------------------------- " << std::endl;
58  LRBox_.print(app_log());
59  app_log() << "--------------------------------------- " << std::endl;
60  }
61 
63  }
64 }
int SuperCellEnum
supercell enumeration
void reset()
Evaluate the reciprocal vectors, volume and metric tensor.
std::ostream & app_log()
Definition: OutputManager.h:65
std::ostream & app_summary()
Definition: OutputManager.h:63
T VacuumScale
The scale factor for adding vacuum.
void print(std::ostream &, int level=2) const
Print out CrystalLattice Data.
TinyVector< SingleParticlePos, D > Rv
Real-space unit vectors.
Lattice lattice_
simulation cell lattice
Lattice LRBox_
long-range box
void updateKLists(const ParticleLayout &lattice, RealType kc, unsigned ndim, const PosType &twist=PosType(), bool useSphere=true)
k points sorted by the |k| excluding |k|=0
Definition: KContainer.cpp:24
KContainer k_lists_
K-Vector List.
Tensor_t R
Real-space unit vectors. R(i,j) i=vector and j=x,y,z.

Friends And Related Function Documentation

◆ ParticleSetPool

friend class ParticleSetPool
friend

Definition at line 51 of file SimulationCell.h.

Member Data Documentation

◆ k_lists_

KContainer k_lists_
private

K-Vector List.

Definition at line 49 of file SimulationCell.h.

Referenced by SimulationCell::getKLists(), and SimulationCell::resetLRBox().

◆ lattice_

Lattice lattice_
private

simulation cell lattice

Definition at line 42 of file SimulationCell.h.

Referenced by SimulationCell::getLattice(), and SimulationCell::resetLRBox().

◆ LRBox_

Lattice LRBox_
private

long-range box

Definition at line 46 of file SimulationCell.h.

Referenced by SimulationCell::getLRBox(), and SimulationCell::resetLRBox().

◆ primative_lattice_

Lattice primative_lattice_
private

Primative cell lattice.

Definition at line 44 of file SimulationCell.h.

Referenced by SimulationCell::getPrimLattice().


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