Parameters.h

Input parameters and parsing functions for the Lotus input file.

See Lotus Input File for a description of the Lotus input file. Public member variables of Options are valid keys.

Typedefs

typedef map<string, vector<string>> StrVecMap
class Options
#include <Parameters.h>

Options from Lotus input file.

This object is passed to most other objects to inform their behavior.

Public Functions

void readConfig(const char *configPath)
void printOptions()

Public Members

string dumpfile

Path to the LAMMPS dumpfile.

Required.

See
DumpfileReader

string datafile

Path to the LAMMPS datafile.

Required.

See
DatafileReader

string outLoc

Path to output directory.

Required.

See

Output Files

int stepsPerFrame

Number of Timesteps averaged for each frame.

Required.

In order to increase the number of atoms in each histogram bin, several timesteps are averaged together in each frame. If the number of steps in the dumpfile is not divisible by stepsPerFrame, then the last frame will have more steps than the rest.

See
Time.h

vector<int> liquidTypes

List of liquid atom types.

Required.

These are the types whose masses contribute towards the density calculations for the droplet.

Lists in YAML can be specified in either of the following ways. Both options are equivalent for use in the Lotus input file.

Option 1:

liquidTypes:
  - 1
  - 2
  - 3

Option 2:

liquidTypes: [1, 2, 3]

See
Droplet::fill
See
Monolayer::fill

vector<int> solidTypes

List of susbtrate atom types.

Required.

These are the types whose masses contribute towards the density calculations for the substrate. However, if substrate is false, feel free to supply an empty list (though the option must be present).

Lists in YAML can be specified in either of the following ways. Both options are equivalent for use in the Lotus input file.

Option 1:

substrateTypes:
- 1
- 2
- 3

Option 2:

substrateTypes: [1, 2, 3]

See
Substrate::fill

int numAtoms

Number of atoms in the LAMMPS dumpfile.

Optional. Default: 0

By default, this is read from the LAMMPS datafile. In the case that not all atoms from the datafile are present in the dumpfile (e.g. some are frozen), it is currently necessary to manually specify the number of atoms in the dumpfile via this option.

string geometry

Droplet geometry (spherical or cylindrical).

Optional. Default: “spherical” Acceptable values: “spherical”, “cylindrical”.

If “spherical” is chosen, then the droplet is assumed to be symmetric about the \(z\) axis, and distance to the \(z\) axis is used as the horizontal axis in the 2D density histogram of Figure 5.

If “cylindrical” is chosen, then the droplet is assumed to be periodic in \(y\), and symmetric about the \(y-z\) plane. In this case, distance to the \(y-z\) plane is used as the horizontal axis in Figure 5.

See
Monolayer::fillOne
See
Droplet::fillOne

bool saveImages

Whether to save .png images of figures.

Optional. Default: true

See

See Image Directory.

bool saveROOT

Whether to save .C ROOT macros of figures.

Optional. Default: false

See

See ROOT Directory.

bool verbose

Whether to print verbose output to stdout.

Optional. Default: false

This may include debugging information and other values which are not necessary for routine use.

int waterBondType

LAMMPS bond type for O-H bonds in water molecules.

Optional. Default: 2

This is useful if the droplet is water, and the orientation of water molecules is calculated.

Note
Molecule orientation is currently not calculated.
See
DatafileReader::readWaterBonds

double dz

\( z \) width of 1D and 2D histogram bins.

Optional. Default: 1.0

Units are angstroms.

See
Grid

double dv

Volume of 2D histogram bins.

Optional. Default: 250.0

Units are cubic angstroms.

See
Grid

double dens_min

Minimum density for TanhFigure and DensFigure.

Optional. Defaut: 0.0

Units are g/cm^2

TODO: Should be set to 0.0 everywhere, option is unnecessary.

double dens_max

Maximum density for TanhFigure and DensFigure.

Optional. Default: 5.0

Units are g/cm^3.

TODO: Should be combined with Options::densMax. The only reason not to combine them is that DensFigure (Figure 1) includes the substrate, while DropletFigure (Figure 5) does not. Since the substrate is generally more dense than the liquid, this suggests the use of different scales for the two figures.

double densMax

Maximum density for DropletFigure (Figure 5).

Optional. Default: 1.5

Units are g/cm^3.

double plot_rmax

Maximum \( r \) value for DropletFigure.

Optional. Default: 150.0

This option is not only relevant to the figure produced, but specifies the limits of the figure itself and therefore the maximum droplet size that can be correctly analyzed.

double plot_zmax

Maximum \( z \) value for DropletFigure.

Optional. Default: 100.0

This option is not only relevant to the figure produced, but specifies the limits of the figure itself and therefore the maximum droplet size that can be correctly analyzed.

double plot_aspect

Aspect ratio of figures.

Optional. Default: 1.0

Plot width is specified by plot_width, so this option is used to implicitly determine plot height.

int plot_width

Width of plots in pixels.

Optional. Default: 800

double expectedLiquidDensity

Theoretical density of the bulk liquid droplet.

Optional. Default: 1.0

Units are g/cm^3. This is useful for estimating the hyperbolic tangent fits before actually performing the fits.

Note
This is not actually used, although it would be a good idea and easy to implement.
See
TanhFit::guessTanhFit

bool monolayer

Whether to perform monolayer calculations.

Optional. Default: true

By default, the droplet’s base radius and contact angle are calculated by intersecting the fitted boundary circle with the \( z \) plane defining the top of the monolayer. In the case that this option is false, that plane may be manually specified through monoTop.

Note
monoTop is relative to the top of the substrate.
See
substrate
See
substrateTop
See
Monolayer

bool substrate

Whether to perform substrate calculations.

Optional. Default: true

By default, all \( z \) coordinates (including monoTop) are given relative to the top of the substrate. In the case that this option is false, the reference plane may be specified via substrateTop.

See
Substrate

bool fitCircle

Whether to fit a circle to the boundary points.

Optional. Default: true

As described in Calculation of Geometric Quantities of Interest, calculation of the bulk radius, contact angle, and bulk height require a circle to be fit to the boundary points. Therefore, these quantities will not be calculated if this option is false.

See
CircleFit
See
CircularBulk

double monoTop

\( z \) coordinate with which to intersect fitted circle.

Optional. Default: true

This option is only necessary if monolayer is false.

double substrateTop

\( z \) coordinate which is taken to be \( z=0 \).

Optional. Default: true

This option is only necessary if substrate is false.

double rDensCyl

Radius of cylinder used for 1D droplet density calculations.

Optional. Default: 10.0

Units are angstroms.

In order to calculate a density, we must select a volume over which to count atoms and sum their masses. For spherical droplets, a thin cylinder around the \( z \) axis is chosen. This parameter is the radius of that cylinder.

See
Droplet::fillOne
See
Droplet::convertUnits
See
Droplet::hLiquidDens

int outputColWidth

Column width of output data files.

Optional. Default: 15

Number of characters in each column. e.g., the 15 in %15.6s.

See
http://www.cplusplus.com/reference/cstdio/printf/

int outputPrecision

Floating point precision in output data files.

Optional. Default: 6

Number of digits after the decimal point. e.g., the 6 in %15.6s.

See
http://www.cplusplus.com/reference/cstdio/printf/

double circleX0Min

Limits for circle fit parameters.

Optional.

Defaults:

  • \( x_0 \in [-0.1, 0.1] \)
  • \( y_0 \in [-200.0, 200.0] \)
  • \( r \in [10.0, 250.0] \)

These options limit the potential size and location of the fitted circle.

See
CircleFit::innerFit

double circleX0Max

See
circleX0Min.

double circleY0Min

See
circleX0Min.

double circleY0Max

See
circleX0Min.

double circleRMin

See
circleX0Min.

double circleRMax

See
circleX0Min.

Private Functions

StrVecMap parseYaml(const char *configPath)
bool mapHasKey(StrVecMap yamlMap, string key)
void printYamlMap(StrVecMap yamlMap)
void fromString(string optionString, bool &option)
void fromString(string optionString, int &option)
void fromString(string optionString, double &option)
void fromString(string optionString, string &option)
template <typename T>
void unsafeParseOption(string optionName, T &option)
template <typename T>
void unsafeParseOption(string optionName, vector<T> &optionVec)
template <typename T>
void parseDefaultOption(string optionName, T &option, T defaultValue)
template <typename T>
void parseRequiredOption(string optionName, T &option)
template <typename T>
void printOption(string optionName, T option)
template <typename T>
void printOption(string optionName, vector<T> option)

Private Members

StrVecMap yamlMap
char configPath[256]
struct CommandLineParser
#include <Parameters.h>

Public Functions

CommandLineParser(int argc, const char *argv[])
void parseArgs(int argc, const char *argv[])
void print()

Public Members

char configPath[256]
Options options