53#include "applications/sequentialProps/COMVel.hpp"
54#include "applications/sequentialProps/CountDifference.hpp"
55#include "applications/sequentialProps/CenterOfMass.hpp"
56#include "applications/sequentialProps/ContactAngle1.hpp"
57#include "applications/sequentialProps/ContactAngle2.hpp"
58#include "applications/sequentialProps/FluxOut.hpp"
59#include "applications/sequentialProps/GCNSeq.hpp"
60#include "applications/sequentialProps/Qsurf.hpp"
61#include "applications/sequentialProps/SequentialAnalyzer.hpp"
62#include "applications/sequentialProps/equipartitionTest.hpp"
66#include "utils/simError.h"
70int main(
int argc,
char* argv[]) {
74 if (cmdline_parser(argc, argv, &args_info) != 0) { exit(1); }
77 std::string dumpFileName = args_info.
input_arg;
88 char* sele1Env = getenv(
"SELECTION1");
102 char* sele2Env = getenv(
"SELECTION2");
123 case privilegedAxis_arg_x:
126 case privilegedAxis_arg_y:
129 case privilegedAxis_arg_z:
135 std::unique_ptr<SequentialAnalyzer> analyzer {
nullptr};
138 analyzer = std::make_unique<CenterOfMass>(info, dumpFileName, sele1, sele2);
140 analyzer = std::make_unique<COMVel>(info, dumpFileName, sele1, sele2);
142 analyzer = std::make_unique<FluxOut>(info, dumpFileName, sele1,
145 analyzer = std::make_unique<CountDifference>(info, dumpFileName, sele1,
148 analyzer = std::make_unique<Equipartition>(info, dumpFileName, sele1,
152 analyzer = std::make_unique<GCNSeq>(info, dumpFileName, sele1, sele2,
156 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
157 "A cutoff radius (rcut) must be specified when calculating\n"
158 "\tGeneralized Coordinate Number");
159 painCave.severity = OPENMD_ERROR;
160 painCave.isFatal = 1;
164 RealType solidZ(0.0);
168 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
169 "--referenceZ must be set if --ca1 is used\n");
170 painCave.severity = OPENMD_ERROR;
171 painCave.isFatal = 1;
174 RealType dropletR(0.0);
178 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
179 "--dropletR must be set if --ca1 is used\n");
180 painCave.severity = OPENMD_ERROR;
181 painCave.isFatal = 1;
186 std::make_unique<ContactAngle1>(info, dumpFileName, sele1, sele2,
189 RealType solidZ(0.0);
193 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
194 "--referenceZ must be set if --ca2 is used\n");
195 painCave.severity = OPENMD_ERROR;
196 painCave.isFatal = 1;
199 RealType centroidX(0.0);
203 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
204 "--centroidX must be set if --ca2 is used\n");
205 painCave.severity = OPENMD_ERROR;
206 painCave.isFatal = 1;
209 RealType centroidY(0.0);
213 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
214 "--centroidY must be set if --ca2 is used\n");
215 painCave.severity = OPENMD_ERROR;
216 painCave.isFatal = 1;
219 RealType threshDens(0.0);
223 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
224 "--threshDens must be set if --ca2 is used\n");
225 painCave.severity = OPENMD_ERROR;
226 painCave.isFatal = 1;
229 RealType bufferLength(0.0);
233 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
234 "--bufferLength must be set if --ca2 is used\n");
235 painCave.severity = OPENMD_ERROR;
236 painCave.isFatal = 1;
240 analyzer = std::make_unique<ContactAngle2>(info, dumpFileName, sele1,
241 sele2, solidZ, centroidX,
242 centroidY, threshDens,
248 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
249 "A cutoff radius (--rcut) must be specified when using\n"
250 "\t--qsurf for the neighbor search.");
251 painCave.severity = OPENMD_ERROR;
252 painCave.isFatal = 1;
256 analyzer = std::make_unique<Qsurf>(info, dumpFileName, sele1, sele2,
262 if (analyzer != NULL) {
265 analyzer->setOutputName(args_info.
output_arg);
268 analyzer->doSequence();
270 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
271 "SequentialProps: No Analyzer was created, nothing to do!");
272 painCave.severity = OPENMD_ERROR;
273 painCave.isFatal = 1;
The header file for the command line option parser generated by GNU Gengetopt version 2....
The only responsibility of SimCreator is to parse the meta-data file and create a SimInfo instance ba...
SimInfo * createSim(const std::string &mdFileName, bool loadInitCoords=true)
Setup Simulation.
One of the heavy-weight classes of OpenMD, SimInfo maintains objects and variables relating to the cu...
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.
Where the command line options are stored.
unsigned int comvel_given
Whether comvel was given.
char * sele2_arg
select second stuntdouble set (if sele2 is not set, use script from sele1).
unsigned int output_given
Whether output was given.
double gaussWidth_arg
Gaussian width for coarse graining (Angstroms) (default='3.0').
double centroidX_arg
Location of droplet centroid in x.
unsigned int referenceZ_given
Whether referenceZ was given.
unsigned int dropletR_given
Whether dropletR was given.
unsigned int fluxOut_given
Whether fluxOut was given.
unsigned int threshDens_given
Whether threshDens was given.
double bufferLength_arg
Buffer length in angstroms.
double referenceZ_arg
Reference z-height of solid surface.
unsigned int ca2_given
Whether ca2 was given.
char * output_arg
output file name.
unsigned int centroidY_given
Whether centroidY was given.
unsigned int testequi_given
Whether testequi was given.
char * input_arg
input dump file.
int nbins_z_arg
number of bins in z axis (default='100').
unsigned int sele1_given
Whether sele1 was given.
unsigned int gcn_given
Whether gcn was given.
unsigned int com_given
Whether com was given.
double rcut_arg
cutoff radius (angstroms).
unsigned int deltaCount_given
Whether deltaCount was given.
unsigned int ca1_given
Whether ca1 was given.
double voxelSize_arg
voxel size for coarse graining (Angstroms) (default='2.0').
char * sele1_arg
select first stuntdouble set.
double centroidY_arg
Location of droplet centroid in y.
unsigned int rcut_given
Whether rcut was given.
unsigned int bufferLength_given
Whether bufferLength was given.
double threshDens_arg
Threshold Density in g/cm^3.
unsigned int qsurf_given
Whether qsurf was given.
int nbins_arg
Number of bins (default='100').
enum enum_privilegedAxis privilegedAxis_arg
which axis is special for spatial analysis (default = z axis) (default='z').
unsigned int centroidX_given
Whether centroidX was given.
unsigned int sele2_given
Whether sele2 was given.
double dropletR_arg
Droplet radius in angstroms.