Path Integral Quantum Monte Carlo
|
A three dimensional cylinder with fixed boundary conditions in the x and y directions and periodic boundary conditions in the z direction. More...
#include <container.h>
Public Member Functions | |
Cylinder (const double, const double, const int) | |
Create a cylinder given density, radius and number of particles. More... | |
Cylinder (const double, const double) | |
Create a cylinder given its radius and length. More... | |
~Cylinder () | |
Destructor. | |
void | putInside (dVec &r) const |
Make sure that a suplied vector is put inside the cylinder. | |
dVec | randPosition (MTRand &) const |
Return a random position inside the cylinder. More... | |
dVec | randUpdate (MTRand &, const dVec &) const |
Return a random position close to the supplied one. | |
dVec | randUpdateJumpShell (MTRand &, const dVec &) const |
Return a random position close to the supplied one. More... | |
dVec | randUpdateSmall (MTRand &, const dVec &) const |
Return a random position close to the supplied one. More... | |
int | gridIndex (const dVec &) const |
Given a particle position, return a single integer which maps to a unique grid position. More... | |
double | gridBoxVolume (const int) const |
Given a grid index, return the hyper volume of the associated grid box. More... | |
Public Member Functions inherited from Container | |
Container () | |
Initialize all variables. | |
virtual | ~Container () |
Empty destructor. | |
void | putInBC (dVec &r) const |
Place a vector in boundary conditions. More... | |
void | putInBC1 (dVec &r) const |
double | gridRadius2 (const int) const |
The radius of a grid box. More... | |
Additional Inherited Members | |
Data Fields inherited from Container | |
TinyVector< unsigned int, NDIM > | periodic |
Determines which dimensions have periodic bc. | |
dVec | side |
The linear dimensions of the box. | |
dVec | sideInv |
The inverse box dimensions. | |
dVec | sideInv2 |
2 times the inverse box dimensions | |
double | volume |
The volume of the container in A^3. | |
double | rcut2 |
The smallest separation squared. | |
double | maxSep |
The maximum possible separation for 2 beads on the same timeslice. | |
string | name |
The name of the container. | |
int | numGrid |
The number of grid boxes for the position grid. | |
bool | fullyPeriodic |
Is the prism fully periodic? | |
dVec | gridSize |
The grid size in each dimension. | |
Protected Attributes inherited from Container | |
dVec | pSide |
Periodic * side. | |
A three dimensional cylinder with fixed boundary conditions in the x and y directions and periodic boundary conditions in the z direction.
Definition at line 143 of file container.h.
Cylinder::Cylinder | ( | const double | _rho, |
const double | radius, | ||
const int | numParticles | ||
) |
Create a cylinder given density, radius and number of particles.
We create a 3d cylinder (otherwise exit) with periodic boundary conditions only in the z-direction. The radius is fixed, and the length is determined by the density in atoms/A^3.
Definition at line 229 of file container.cpp.
Cylinder::Cylinder | ( | const double | radius, |
const double | L | ||
) |
Create a cylinder given its radius and length.
We create a 3d cylinder (otherwise exit) with periodic boundary conditions only in the z-direction. The radius and length are given in angstroms.
L | The length of the cylinder |
radius | The radius of the cylinder |
Definition at line 286 of file container.cpp.
|
virtual |
Given a grid index, return the hyper volume of the associated grid box.
n | The grid index |
Implements Container.
Definition at line 470 of file container.cpp.
|
virtual |
Given a particle position, return a single integer which maps to a unique grid position.
Used for correlating estimators with individual particle positions.
pos | The particle position |
Implements Container.
Definition at line 432 of file container.cpp.
|
virtual |
Return a random position inside the cylinder.
Implements Container.
Definition at line 342 of file container.cpp.
Return a random position close to the supplied one.
Shell Jump
Definition at line 369 of file container.cpp.
Return a random position close to the supplied one.
Same Shell.
Definition at line 397 of file container.cpp.