MDBase.h¶
Basic quantities related to the MD simulation.
Contains time-independent data such as grid and atom information, as well as time-dependent information such as the substrate and monolayer extents.
-
struct
BoxBounds
¶ - #include <MDBase.h>
Simulation box bounds, as defined in the LAMMPS dumpfile.
This data is updated each timestep.
- See
- DumpfileReader
-
struct
SimData
¶ - #include <MDBase.h>
Source of truth for general MD variables.
Variables are set here, and a pointer to this object is passed around and read elsewhere.
Public Functions
-
~SimData
()¶
-
void
deleteWaterBonds
()¶ Since water bonds are stored as a map from int to int*, those int*s must be allocated upon storage in the map. So we delete them here.
-
void
setOptions
(Options options)¶ Copy a few important options directly to this object.
- See
- liquidTypes
- See
- solidTypes
- See
- stepsPerFrame
- See
- monoTop
- See
- substrateTop
- See
- numAtoms
-
void
setNumSteps
(int _numSteps)¶ Set numsteps and call setStepsPerFrame using value from Options::stepsPerFrame.
-
void
setStepsPerFrame
(int _stepsPerFrame)¶ Set the number of steps per frame and determine how many steps are in the last frame. Must be called after numSteps is defined. This function is called by setNumSteps.
Public Members
-
int
numAtoms
¶
-
int
numSteps
¶
-
int
numFrames
¶
-
int
stepsPerFrame
¶
-
vector<int>
liquidTypes
¶ Which atom types correspond to liquid.
-
vector<int>
solidTypes
¶ Which atom types correspond to substrate.
-
map<int, double>
masses
¶ Mass for each atom type.
-
map<int, int *>
waterBonds
¶ Maps oxygen atom id to two hydrogen atom ids.
-
double
substrateTop
¶ z coordinate of the top of the substrate.
If the substrate option is disabled, this can be manually specified via Options::substrateTop.
-
double
monoTop
¶ z coordinate of the top of the monolayer.
If the monolayer option is disabled, this can be manually specified in Options::monoTop.
-
-
struct
Grid
¶ - #include <MDBase.h>
Grid to use for 2D histogram.
Each bin in the grid has the same volume. dz and dv are specified by Options::dz and Options::dv, and determine the size of the bins.
dr
is determined automatically for each bin from the other two.Public Functions
-
~Grid
()¶ Call deallocateBins
-
void
setBounds
(double _zlo, double _zhi, double _rhi)¶
-
void
setSpacing
(double _dz, double _dv)¶
-
void
init
()¶ Set up grid after calling setBounds and setSpacing.
-
void
calculateVolumeLimits
()¶ Round upper z and r bounds in case dv or dz don’t evenly divide the z and r ranges.
Increase upper limits if total width is not divisible by required spacing (i.e. (zhi-zlo)dz != 0)
-
void
allocateBins
()¶ Allocate rVals before calling calculateBins.
Includes both endpoints https://root.cern.ch/root/roottalk/roottalk10/1170.html
-
void
calculateBins
()¶ Set rVals after calling allocateBins.
\(r_i = \sqrt{\frac{i\,dv}{\pi\,dz}} \)
-