OpenMD 3.2
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
StaticProps.cpp
1/*
2 * Copyright (c) 2004-present, The University of Notre Dame. All rights
3 * reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * 3. Neither the name of the copyright holder nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 *
31 * SUPPORT OPEN SCIENCE! If you use OpenMD or its source code in your
32 * research, please cite the following paper when you publish your work:
33 *
34 * [1] Drisko et al., J. Open Source Softw. 9, 7004 (2024).
35 *
36 * Good starting points for code and simulation methodology are:
37 *
38 * [2] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).
39 * [3] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).
40 * [4] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).
41 * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
42 * [6] Kuang & Gezelter, Mol. Phys., 110, 691-701 (2012).
43 * [7] Lamichhane, Gezelter & Newman, J. Chem. Phys. 141, 134109 (2014).
44 * [8] Bhattarai, Newman & Gezelter, Phys. Rev. B 99, 094106 (2019).
45 * [9] Drisko & Gezelter, J. Chem. Theory Comput. 20, 4986-4997 (2024).
46 */
47
48#include <fstream>
49#include <iostream>
50#include <memory>
51#include <string>
52
53#include "StaticPropsCmd.hpp"
54#include "applications/staticProps/BOPofR.hpp"
55#include "applications/staticProps/BondAngleDistribution.hpp"
56#include "applications/staticProps/BondOrderParameter.hpp"
57#include "applications/staticProps/DensityPlot.hpp"
58#include "applications/staticProps/GofAngle2.hpp"
59#include "applications/staticProps/GofR.hpp"
60#include "applications/staticProps/GofRAngle.hpp"
61#include "applications/staticProps/GofRAngle2.hpp"
62#include "applications/staticProps/GofRZ.hpp"
63#include "applications/staticProps/GofXyz.hpp"
64#include "applications/staticProps/GofZ.hpp"
65#include "applications/staticProps/KirkwoodBuff.hpp"
66#include "applications/staticProps/NanoLength.hpp"
67#include "applications/staticProps/NanoVolume.hpp"
68#include "applications/staticProps/ObjectCount.hpp"
69#include "applications/staticProps/P2OrderParameter.hpp"
70#include "applications/staticProps/P2R.hpp"
71#include "applications/staticProps/PipeDensity.hpp"
72#include "applications/staticProps/RhoZ.hpp"
73#include "applications/staticProps/RippleOP.hpp"
74#include "applications/staticProps/SCDOrderParameter.hpp"
75#include "applications/staticProps/SFGTimeAvg.hpp"
76#include "applications/staticProps/StaticAnalyser.hpp"
77#include "applications/staticProps/TwoDGofR.hpp"
78#include "applications/staticProps/pAngle.hpp"
79#include "brains/SimCreator.hpp"
80#include "brains/SimInfo.hpp"
81#include "io/DumpReader.hpp"
82#include "utils/simError.h"
83#if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H)
84#include "applications/staticProps/Hxy.hpp"
85#endif
86#include "applications/staticProps/AngleR.hpp"
87#include "applications/staticProps/ChargeDensityZ.hpp"
88#include "applications/staticProps/ChargeHistogram.hpp"
89#include "applications/staticProps/ChargeR.hpp"
90#include "applications/staticProps/ChargeZ.hpp"
91#include "applications/staticProps/CoordinationNumber.hpp"
92#include "applications/staticProps/CurrentDensity.hpp"
93#include "applications/staticProps/DensityHistogram.hpp"
94#include "applications/staticProps/DipoleOrientation.hpp"
95#include "applications/staticProps/Field.hpp"
96#include "applications/staticProps/HBondGeometric.hpp"
97#include "applications/staticProps/HBondR.hpp"
98#include "applications/staticProps/HBondRvol.hpp"
99#include "applications/staticProps/HBondZ.hpp"
100#include "applications/staticProps/HBondZvol.hpp"
101#include "applications/staticProps/Kirkwood.hpp"
102#include "applications/staticProps/MassDensityR.hpp"
103#include "applications/staticProps/MassDensityZ.hpp"
104#include "applications/staticProps/MomentumHistogram.hpp"
105#include "applications/staticProps/MultipoleSum.hpp"
106#include "applications/staticProps/NitrileFrequencyMap.hpp"
107#include "applications/staticProps/NumberR.hpp"
108#include "applications/staticProps/NumberZ.hpp"
109#include "applications/staticProps/OHFrequencyMap.hpp"
110#include "applications/staticProps/OrderParameterProbZ.hpp"
111#include "applications/staticProps/PositionZ.hpp"
113#include "applications/staticProps/RNEMDStats.hpp"
114#include "applications/staticProps/RhoR.hpp"
115#include "applications/staticProps/SurfaceDiffusion.hpp"
116#include "applications/staticProps/TetrahedralityHBMatrix.hpp"
117#include "applications/staticProps/TetrahedralityParam.hpp"
118#include "applications/staticProps/TetrahedralityParamDens.hpp"
119#include "applications/staticProps/TetrahedralityParamR.hpp"
120#include "applications/staticProps/TetrahedralityParamRAngle.hpp"
121#include "applications/staticProps/TetrahedralityParamXYZ.hpp"
122#include "applications/staticProps/TetrahedralityParamZ.hpp"
123#include "applications/staticProps/TranslationalOrderParamZ.hpp"
124#include "applications/staticProps/VelocityZ.hpp"
125
126using namespace OpenMD;
127
128int main(int argc, char* argv[]) {
129 gengetopt_args_info args_info;
130
131 // parse the command line option
132 if (cmdline_parser(argc, argv, &args_info) != 0) { exit(1); }
133
134 // get the dumpfile name
135 std::string dumpFileName = args_info.input_arg;
136 std::string sele1;
137 std::string sele2;
138 std::string sele3;
139 std::string comsele;
140
141 // check the first selection argument, or set it to the environment
142 // variable, or failing that, set it to "select all"
143
144 if (args_info.sele1_given) {
145 sele1 = args_info.sele1_arg;
146 } else {
147 char* sele1Env = getenv("SELECTION1");
148 if (sele1Env) {
149 sele1 = sele1Env;
150 } else {
151 sele1 = "select all";
152 }
153 }
154
155 // check the second selection argument, or set it to the environment
156 // variable, or failing that, set it to the first selection
157
158 if (args_info.sele2_given) {
159 sele2 = args_info.sele2_arg;
160 } else {
161 char* sele2Env = getenv("SELECTION2");
162 if (sele2Env) {
163 sele2 = sele2Env;
164 } else {
165 // If sele2 is not specified, then the default behavior
166 // should be what is already intended for sele1
167 sele2 = sele1;
168 }
169 }
170
171 // check the third selection argument, which is only set if
172 // requested by the user
173
174 if (args_info.sele3_given) sele3 = args_info.sele3_arg;
175
176 // check the comsele selection argument, which is only set if
177 // requested by the user
178
179 if (args_info.comsele_given) comsele = args_info.comsele_arg;
180
181 bool batchMode(false);
182 if (args_info.scd_given) {
183 if (args_info.sele1_given && args_info.sele2_given &&
184 args_info.sele3_given) {
185 batchMode = false;
186 } else if (args_info.molname_given && args_info.begin_given &&
187 args_info.end_given) {
188 if (args_info.begin_arg < 0 || args_info.end_arg < 0 ||
189 args_info.begin_arg > args_info.end_arg - 2) {
190 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
191 "below conditions are not satisfied:\n"
192 "0 <= begin && 0<= end && begin <= end-2\n");
193 painCave.severity = OPENMD_ERROR;
194 painCave.isFatal = 1;
195 simError();
196 }
197 batchMode = true;
198 } else {
199 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
200 "either --sele1, --sele2, --sele3 are specified,"
201 " or --molname, --begin, --end are specified\n");
202 painCave.severity = OPENMD_ERROR;
203 painCave.isFatal = 1;
204 simError();
205 }
206 }
207
208 // parse md file and set up the system
209 SimCreator creator;
210 SimInfo* info = creator.createSim(dumpFileName);
211
212 // convert privilegedAxis to corresponding integer
213 // x axis -> 0
214 // y axis -> 1
215 // z axis -> 2 (default)
216
217 int privilegedAxis;
218 switch (args_info.privilegedAxis_arg) {
219 case privilegedAxis_arg_x:
220 privilegedAxis = 0;
221 break;
222 case privilegedAxis_arg_y:
223 privilegedAxis = 1;
224 break;
225 case privilegedAxis_arg_z:
226 default:
227 privilegedAxis = 2;
228 break;
229 }
230
231 int privilegedAxis2;
232 switch (args_info.privilegedAxis2_arg) {
233 case privilegedAxis2_arg_x:
234 privilegedAxis2 = 0;
235 break;
236 case privilegedAxis2_arg_y:
237 privilegedAxis2 = 1;
238 break;
239 case privilegedAxis2_arg_z:
240 default:
241 privilegedAxis2 = 2;
242 break;
243 }
244
245 RealType maxLen;
246 RealType zmaxLen(0.0);
247 if (args_info.length_given) {
248 maxLen = args_info.length_arg;
249 if (args_info.zlength_given) { zmaxLen = args_info.zlength_arg; }
250 } else {
251 Mat3x3d hmat = info->getSnapshotManager()->getCurrentSnapshot()->getHmat();
252 // The maximum length for radial distribution functions is actually half
253 // the smallest box length
254 maxLen = std::min(std::min(hmat(0, 0), hmat(1, 1)), hmat(2, 2)) / 2.0;
255 // This should be the extent of the privileged axis:
256 zmaxLen = hmat(privilegedAxis, privilegedAxis);
257 }
258
259 int nanglebins, nrbins;
260 // in case we override nbins with nrbins:
261 if (args_info.nrbins_given) {
262 nrbins = args_info.nrbins_arg;
263 } else {
264 nrbins = args_info.nbins_arg;
265 }
266 // in case we override nbins with nanglebins:
267 if (args_info.nanglebins_given) {
268 nanglebins = args_info.nanglebins_arg;
269 } else {
270 nanglebins = args_info.nbins_arg;
271 }
272
273 RealType binWidth = args_info.binWidth_arg;
274
275 // override default vander waals radius for fictious atoms in a model
276 RealType vRadius;
277 if (args_info.v_radius_given) {
278 vRadius = args_info.v_radius_arg;
279 } else {
280 vRadius = 1.52;
281 }
282
283 int momentum_type;
284 switch (args_info.momentum_arg) {
285 case momentum_arg_P:
286 momentum_type = 0;
287 break;
288 case momentum_arg_J:
289 default:
290 momentum_type = 1;
291 break;
292 }
293
294 int momentum_comp;
295 switch (args_info.component_arg) {
296 case component_arg_x:
297 momentum_comp = 0;
298 break;
299 case component_arg_y:
300 momentum_comp = 1;
301 break;
302 case component_arg_z:
303 default:
304 momentum_comp = 2;
305 break;
306 }
307
308 std::unique_ptr<StaticAnalyser> analyser {nullptr};
309
310 if (args_info.gofr_given) {
311 analyser = std::make_unique<GofR>(info, dumpFileName, sele1, sele2, maxLen,
312 nrbins);
313 } else if (args_info.gofz_given) {
314 analyser =
315 std::make_unique<GofZ>(info, dumpFileName, sele1, sele2, maxLen,
316 zmaxLen, args_info.nbins_arg, privilegedAxis);
317 } else if (args_info.r_z_given) {
318 analyser = std::make_unique<GofRZ>(info, dumpFileName, sele1, sele2, maxLen,
319 zmaxLen, nrbins, args_info.nbins_z_arg,
320 privilegedAxis);
321 } else if (args_info.r_theta_given) {
322 if (args_info.sele3_given)
323 analyser = std::make_unique<GofRTheta>(info, dumpFileName, sele1, sele2,
324 sele3, maxLen, nrbins, nanglebins);
325 else
326 analyser = std::make_unique<GofRTheta>(info, dumpFileName, sele1, sele2,
327 maxLen, nrbins, nanglebins);
328 } else if (args_info.r_omega_given) {
329 if (args_info.sele3_given)
330 analyser = std::make_unique<GofROmega>(info, dumpFileName, sele1, sele2,
331 sele3, maxLen, nrbins, nanglebins);
332 else
333 analyser = std::make_unique<GofROmega>(info, dumpFileName, sele1, sele2,
334 maxLen, nrbins, nanglebins);
335 } else if (args_info.theta_omega_given) {
336 if (args_info.sele3_given)
337 analyser = std::make_unique<GofAngle2>(info, dumpFileName, sele1, sele2,
338 sele3, nanglebins);
339 else
340 analyser = std::make_unique<GofAngle2>(info, dumpFileName, sele1, sele2,
341 nanglebins);
342 } else if (args_info.r_theta_omega_given) {
343 if (args_info.sele3_given)
344 analyser = std::make_unique<GofRAngle2>(
345 info, dumpFileName, sele1, sele2, sele3, maxLen, nrbins, nanglebins);
346 else
347 analyser = std::make_unique<GofRAngle2>(info, dumpFileName, sele1, sele2,
348 maxLen, nrbins, nanglebins);
349 } else if (args_info.gxyz_given) {
350 if (args_info.refsele_given) {
351 analyser = std::make_unique<GofXyz>(info, dumpFileName, sele1, sele2,
352 args_info.refsele_arg, maxLen,
353 args_info.nbins_arg);
354 } else {
355 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
356 "--refsele must set when --gxyz is used");
357 painCave.severity = OPENMD_ERROR;
358 painCave.isFatal = 1;
359 simError();
360 }
361 } else if (args_info.twodgofr_given) {
362 if (args_info.dz_given) {
363 analyser = std::make_unique<TwoDGofR>(info, dumpFileName, sele1, sele2,
364 maxLen, args_info.dz_arg, nrbins);
365 } else {
366 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
367 "A slab width (dz) must be specified when calculating TwoDGofR");
368 painCave.severity = OPENMD_ERROR;
369 painCave.isFatal = 1;
370 simError();
371 }
372 } else if (args_info.kirkwood_buff_given) {
373 if (args_info.sele1_given && args_info.sele2_given) {
374 analyser = std::make_unique<KirkwoodBuff>(info, dumpFileName, sele1,
375 sele2, maxLen, nrbins);
376 } else {
377 snprintf(
378 painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
379 "Two selection scripts (--sele1 and --sele2) must be specified when "
380 "calculating Kirkwood Buff integrals");
381 painCave.severity = OPENMD_ERROR;
382 painCave.isFatal = 1;
383 simError();
384 }
385 } else if (args_info.p2_given) {
386 if (args_info.sele1_given) {
387 if (args_info.sele2_given) {
388 analyser = std::make_unique<P2OrderParameter>(info, dumpFileName, sele1,
389 sele2);
390 } else if (args_info.seleoffset_given) {
391 analyser = std::make_unique<P2OrderParameter>(info, dumpFileName, sele1,
392 args_info.seleoffset_arg);
393 } else {
394 analyser =
395 std::make_unique<P2OrderParameter>(info, dumpFileName, sele1);
396 }
397 } else {
398 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
399 "At least one selection script (--sele1) must be specified when "
400 "calculating P2 order parameters");
401 painCave.severity = OPENMD_ERROR;
402 painCave.isFatal = 1;
403 simError();
404 }
405 } else if (args_info.rp2_given) {
406 analyser = std::make_unique<RippleOP>(info, dumpFileName, sele1, sele2);
407 } else if (args_info.bo_given) {
408 if (args_info.rcut_given) {
409 analyser = std::make_unique<BondOrderParameter>(
410 info, dumpFileName, sele1, args_info.rcut_arg, args_info.nbins_arg);
411 } else {
412 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
413 "A cutoff radius (rcut) must be specified when calculating Bond "
414 "Order "
415 "Parameters");
416 painCave.severity = OPENMD_ERROR;
417 painCave.isFatal = 1;
418 simError();
419 }
420 } else if (args_info.multipole_given) {
421 analyser = std::make_unique<MultipoleSum>(info, dumpFileName, sele1, maxLen,
422 args_info.nbins_arg);
423
424 } else if (args_info.tet_param_given) {
425 if (args_info.rcut_given) {
426 analyser = std::make_unique<TetrahedralityParam>(
427 info, dumpFileName, sele1, args_info.rcut_arg, args_info.nbins_arg);
428 } else {
429 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
430 "A cutoff radius (rcut) must be specified when calculating "
431 "Tetrahedrality "
432 "Parameters");
433 painCave.severity = OPENMD_ERROR;
434 painCave.isFatal = 1;
435 simError();
436 }
437 } else if (args_info.tet_param_z_given) {
438 if (args_info.rcut_given) {
439 analyser = std::make_unique<TetrahedralityParamZ>(
440 info, dumpFileName, sele1, sele2, args_info.rcut_arg,
441 args_info.nbins_arg, privilegedAxis);
442 } else {
443 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
444 "A cutoff radius (rcut) must be specified when calculating "
445 "Tetrahedrality "
446 "Parameters");
447 painCave.severity = OPENMD_ERROR;
448 painCave.isFatal = 1;
449 simError();
450 }
451 } else if (args_info.tet_param_r_given) {
452 if (args_info.rcut_given) {
453 if (args_info.sele3_given) {
454 analyser = std::make_unique<TetrahedralityParamR>(
455 info, dumpFileName, sele1, sele2, sele3, args_info.rcut_arg, maxLen,
456 nrbins);
457 } else {
458 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
459 "Selection3 (--sele3) must be given when calculating "
460 "Tetrahedrality Parameter Qk(r)");
461 painCave.severity = OPENMD_ERROR;
462 painCave.isFatal = 1;
463 simError();
464 }
465 }
466 } else if (args_info.tet_param_rangle_given) {
467 if (args_info.rcut_given) {
468 if (args_info.sele3_given) {
469 if (args_info.seleoffset3_given) {
470 analyser = std::make_unique<TetrahedralityParamRAngle>(
471 info, dumpFileName, sele1, sele2, sele3,
472 args_info.seleoffset3_arg, args_info.rcut_arg, maxLen,
473 nrbins, nanglebins);
474 } else {
475 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
476 "Selection3 offset (--seleoffset3) must be given when "
477 "calculating Tetrahedrality Parameter Qk(r, cos(theta))");
478 painCave.severity = OPENMD_ERROR;
479 painCave.isFatal = 1;
480 simError();
481 }
482 } else {
483 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
484 "Selection3 (--sele3) must be given when calculating "
485 "Tetrahedrality Parameter Qk(r, cos(theta))");
486 painCave.severity = OPENMD_ERROR;
487 painCave.isFatal = 1;
488 simError();
489 }
490 } else {
491 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
492 "A cutoff radius (rcut) must be specified when calculating "
493 "Tetrahedrality "
494 "Parameters");
495 painCave.severity = OPENMD_ERROR;
496 painCave.isFatal = 1;
497 simError();
498 }
499 } else if (args_info.tet_param_dens_given) {
500 if (args_info.rcut_given) {
501 analyser = std::make_unique<TetrahedralityParamDens>(
502 info, dumpFileName, sele1, sele2, args_info.rcut_arg,
503 args_info.nbins_arg);
504 } else {
505 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
506 "A cutoff radius (rcut) must be specified when calculating "
507 "Tetrahedrality "
508 "Parameters");
509 painCave.severity = OPENMD_ERROR;
510 painCave.isFatal = 1;
511 simError();
512 }
513 } else if (args_info.tet_hb_given) {
514 if (args_info.rcut_given) {
515 analyser = std::make_unique<TetrahedralityHBMatrix>(
516 info, dumpFileName, sele1, args_info.rcut_arg, args_info.OOcut_arg,
517 args_info.thetacut_arg, args_info.OHcut_arg, args_info.nbins_arg);
518 } else {
519 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
520 "A cutoff radius (rcut) must be specified when calculating "
521 " Tetrahedrality Hydrogen Bonding Matrix");
522 painCave.severity = OPENMD_ERROR;
523 painCave.isFatal = 1;
524 simError();
525 }
526 } else if (args_info.tet_param_xyz_given) {
527 if (!args_info.rcut_given) {
528 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
529 "A cutoff radius (rcut) must be specified when calculating"
530 " Tetrahedrality Parameters");
531 painCave.severity = OPENMD_ERROR;
532 painCave.isFatal = 1;
533 simError();
534 }
535 if (!args_info.voxelSize_given) {
536 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
537 "A voxel size must be specified when calculating"
538 " volume-resolved Tetrahedrality Parameters");
539 painCave.severity = OPENMD_ERROR;
540 painCave.isFatal = 1;
541 simError();
542 }
543 if (!args_info.gaussWidth_given) {
544 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
545 "A gaussian width must be specified when calculating"
546 " volume-resolved Tetrahedrality Parameters");
547 painCave.severity = OPENMD_ERROR;
548 painCave.isFatal = 1;
549 simError();
550 }
551 analyser = std::make_unique<TetrahedralityParamXYZ>(
552 info, dumpFileName, sele1, sele2, args_info.rcut_arg,
553 args_info.voxelSize_arg, args_info.gaussWidth_arg);
554 } else if (args_info.ior_given) {
555 if (args_info.rcut_given) {
556 analyser = std::make_unique<IcosahedralOfR>(
557 info, dumpFileName, sele1, args_info.rcut_arg, nrbins, maxLen);
558 } else {
559 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
560 "A cutoff radius (rcut) must be specified when calculating Bond "
561 "Order "
562 "Parameters");
563 painCave.severity = OPENMD_ERROR;
564 painCave.isFatal = 1;
565 simError();
566 }
567 } else if (args_info.for_given) {
568 if (args_info.rcut_given) {
569 analyser = std::make_unique<FCCOfR>(info, dumpFileName, sele1,
570 args_info.rcut_arg, nrbins, maxLen);
571 } else {
572 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
573 "A cutoff radius (rcut) must be specified when calculating Bond "
574 "Order "
575 "Parameters");
576 painCave.severity = OPENMD_ERROR;
577 painCave.isFatal = 1;
578 simError();
579 }
580 } else if (args_info.bad_given) {
581 if (args_info.rcut_given) {
582 analyser = std::make_unique<BondAngleDistribution>(
583 info, dumpFileName, sele1, args_info.rcut_arg, args_info.nbins_arg);
584 } else {
585 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
586 "A cutoff radius (rcut) must be specified when calculating Bond "
587 "Angle "
588 "Distributions");
589 painCave.severity = OPENMD_ERROR;
590 painCave.isFatal = 1;
591 simError();
592 }
593 } else if (args_info.scd_given) {
594 if (batchMode) {
595 analyser = std::make_unique<SCDOrderParameter>(
596 info, dumpFileName, args_info.molname_arg, args_info.begin_arg,
597 args_info.end_arg);
598 } else {
599 analyser = std::make_unique<SCDOrderParameter>(info, dumpFileName, sele1,
600 sele2, sele3);
601 }
602 } else if (args_info.density_given) {
603 analyser = std::make_unique<DensityPlot>(info, dumpFileName, sele1, sele2,
604 maxLen, args_info.nbins_arg);
605 } else if (args_info.count_given) {
606 analyser = std::make_unique<ObjectCount>(info, dumpFileName, sele1);
607 } else if (args_info.mcount_given) {
608 analyser = std::make_unique<MoleculeCount>(info, dumpFileName, sele1);
609 } else if (args_info.slab_density_given) {
610 analyser = std::make_unique<RhoZ>(info, dumpFileName, sele1,
611 args_info.nbins_arg, privilegedAxis);
612 } else if (args_info.eam_density_given) {
613 analyser = std::make_unique<DensityHistogram>(info, dumpFileName, sele1,
614 args_info.nbins_arg);
615 } else if (args_info.momentum_distribution_given) {
616 analyser = std::make_unique<MomentumHistogram>(
617 info, dumpFileName, sele1, args_info.nbins_arg, momentum_type,
618 momentum_comp);
619 } else if (args_info.net_charge_given) {
620 analyser = std::make_unique<ChargeHistogram>(info, dumpFileName, sele1,
621 args_info.nbins_arg);
622 } else if (args_info.current_density_given) {
623 analyser = std::make_unique<CurrentDensity>(
624 info, dumpFileName, sele1, args_info.nbins_arg, privilegedAxis);
625 } else if (args_info.chargez_given) {
626 analyser = std::make_unique<ChargeZ>(info, dumpFileName, sele1,
627 args_info.nbins_arg, privilegedAxis);
628 } else if (args_info.charger_given) {
629 analyser = std::make_unique<ChargeR>(info, dumpFileName, sele1, maxLen,
630 args_info.nbins_arg);
631 } else if (args_info.numberz_given) {
632 analyser = std::make_unique<NumberZ>(info, dumpFileName, sele1,
633 args_info.nbins_arg, privilegedAxis);
634 } else if (args_info.numberr_given) {
635 analyser = std::make_unique<NumberR>(info, dumpFileName, sele1, maxLen,
636 args_info.nbins_arg);
637 } else if (args_info.massdensityz_given) {
638 analyser = std::make_unique<MassDensityZ>(
639 info, dumpFileName, sele1, args_info.nbins_arg, privilegedAxis);
640 } else if (args_info.massdensityr_given) {
641 analyser = std::make_unique<MassDensityR>(info, dumpFileName, sele1, maxLen,
642 args_info.nbins_arg);
643 } else if (args_info.charge_density_z_given) {
644 analyser = std::make_unique<ChargeDensityZ>(
645 info, dumpFileName, sele1, args_info.nbins_arg, vRadius,
646 args_info.atom_name_arg, args_info.gen_xyz_flag, privilegedAxis);
647 } else if (args_info.countz_given) {
648 analyser = std::make_unique<PositionZ>(info, dumpFileName, sele1,
649 args_info.nbins_arg, privilegedAxis);
650 } else if (args_info.pipe_density_given) {
651 switch (privilegedAxis) {
652 case 0:
653 analyser = std::make_unique<PipeDensity>(
654 info, dumpFileName, sele1, args_info.nbins_y_arg,
655 args_info.nbins_z_arg, privilegedAxis);
656 break;
657 case 1:
658 analyser = std::make_unique<PipeDensity>(
659 info, dumpFileName, sele1, args_info.nbins_z_arg,
660 args_info.nbins_x_arg, privilegedAxis);
661 break;
662 case 2:
663 default:
664 analyser = std::make_unique<PipeDensity>(
665 info, dumpFileName, sele1, args_info.nbins_x_arg,
666 args_info.nbins_y_arg, privilegedAxis);
667 break;
668 }
669 } else if (args_info.rnemdz_given) {
670 analyser = std::make_unique<RNEMDZ>(info, dumpFileName, sele1,
671 args_info.nbins_arg, privilegedAxis);
672 } else if (args_info.rnemdr_given) {
673 analyser = std::make_unique<RNEMDR>(info, dumpFileName, sele1, comsele,
674 nrbins, binWidth);
675 } else if (args_info.rnemdrt_given) {
676 analyser = std::make_unique<RNEMDRTheta>(info, dumpFileName, sele1, comsele,
677 nrbins, binWidth, nanglebins);
678 } else if (args_info.nitrile_given) {
679 analyser = std::make_unique<NitrileFrequencyMap>(info, dumpFileName, sele1,
680 args_info.nbins_arg);
681 } else if (args_info.OHfreqmap_given) {
682 analyser = std::make_unique<OHFrequencyMap>(info, dumpFileName, sele1,
683 args_info.nbins_arg);
684 } else if (args_info.sfg_given) {
685 analyser = std::make_unique<SFGTimeAvg>(info, dumpFileName, sele1,
686 args_info.nbins_arg,
687 args_info.sfgPolarization_arg,
688 privilegedAxis,
689 args_info.lorentzianWidth_arg,
690 args_info.fermiCoupling_arg);
691
692 } else if (args_info.p_angle_given) {
693 if (args_info.sele1_given) {
694 if (args_info.sele2_given)
695 analyser = std::make_unique<pAngle>(info, dumpFileName, sele1, sele2,
696 args_info.nbins_arg);
697 else if (args_info.seleoffset_given) {
698 if (args_info.seleoffset2_given) {
699 analyser = std::make_unique<pAngle>(
700 info, dumpFileName, sele1, args_info.seleoffset_arg,
701 args_info.seleoffset2_arg, args_info.nbins_arg);
702 } else {
703 analyser = std::make_unique<pAngle>(info, dumpFileName, sele1,
704 args_info.seleoffset_arg,
705 args_info.nbins_arg);
706 }
707 } else
708 analyser = std::make_unique<pAngle>(info, dumpFileName, sele1,
709 args_info.nbins_arg);
710 } else {
711 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
712 "At least one selection script (--sele1) must be specified when "
713 "calculating P(angle) distributions");
714 painCave.severity = OPENMD_ERROR;
715 painCave.isFatal = 1;
716 simError();
717 }
718#if defined(HAVE_FFTW_H) || defined(HAVE_DFFTW_H) || defined(HAVE_FFTW3_H)
719 } else if (args_info.hxy_given) {
720 analyser = std::make_unique<Hxy>(
721 info, dumpFileName, sele1, args_info.nbins_x_arg, args_info.nbins_y_arg,
722 args_info.nbins_z_arg, args_info.nbins_arg);
723#endif
724 } else if (args_info.cn_given || args_info.scn_given || args_info.gcn_given) {
725 if (args_info.rcut_given) {
726 if (args_info.cn_given) {
727 analyser = std::make_unique<CoordinationNumber>(
728 info, dumpFileName, sele1, sele2, args_info.rcut_arg,
729 args_info.nbins_arg);
730 } else if (args_info.scn_given) {
731 analyser =
732 std::make_unique<SCN>(info, dumpFileName, sele1, sele2,
733 args_info.rcut_arg, args_info.nbins_arg);
734 } else if (args_info.gcn_given) {
735 analyser =
736 std::make_unique<GCN>(info, dumpFileName, sele1, sele2,
737 args_info.rcut_arg, args_info.nbins_arg);
738 }
739 } else {
740 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
741 "A cutoff radius (rcut) must be specified when calculating\n"
742 "\t Coordination Numbers");
743 painCave.severity = OPENMD_ERROR;
744 painCave.isFatal = 1;
745 simError();
746 }
747 } else if (args_info.surfDiffusion_given) {
748 analyser =
749 std::make_unique<SurfaceDiffusion>(info, dumpFileName, sele1, maxLen);
750 } else if (args_info.rho_r_given) {
751 if (args_info.radius_given) {
752 analyser = std::make_unique<RhoR>(info, dumpFileName, sele1, maxLen,
753 nrbins, args_info.radius_arg);
754 } else {
755 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
756 "A particle radius (radius) must be specified when calculating "
757 "Rho(r)");
758 painCave.severity = OPENMD_ERROR;
759 painCave.isFatal = 1;
760 simError();
761 }
762 } else if (args_info.hullvol_given) {
763 analyser = std::make_unique<NanoVolume>(info, dumpFileName, sele1);
764 } else if (args_info.rodlength_given) {
765 analyser = std::make_unique<NanoLength>(info, dumpFileName, sele1);
766 } else if (args_info.angle_r_given) {
767 if (args_info.sele1_given) {
768 if (args_info.sele2_given)
769 analyser = std::make_unique<AngleR>(info, dumpFileName, sele1, sele2,
770 maxLen, nrbins);
771 else if (args_info.seleoffset_given) {
772 if (args_info.seleoffset2_given) {
773 analyser = std::make_unique<AngleR>(
774 info, dumpFileName, sele1, args_info.seleoffset_arg,
775 args_info.seleoffset2_arg, maxLen, nrbins);
776 } else {
777 analyser = std::make_unique<AngleR>(info, dumpFileName, sele1,
778 args_info.seleoffset_arg, maxLen,
779 nrbins);
780 }
781 } else
782 analyser =
783 std::make_unique<AngleR>(info, dumpFileName, sele1, maxLen, nrbins);
784 } else {
785 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
786 "At least one selection script (--sele1) must be specified when "
787 "calculating Angle(r) values");
788 painCave.severity = OPENMD_ERROR;
789 painCave.isFatal = 1;
790 simError();
791 }
792 } else if (args_info.p2r_given) {
793 if (args_info.sele1_given) {
794 if (args_info.sele2_given)
795 analyser = std::make_unique<P2R>(info, dumpFileName, sele1, sele2,
796 args_info.nbins_arg);
797 else if (args_info.seleoffset_given) {
798 if (args_info.seleoffset2_given) {
799 analyser = std::make_unique<P2R>(
800 info, dumpFileName, sele1, args_info.seleoffset_arg,
801 args_info.seleoffset2_arg, args_info.nbins_arg);
802 } else {
803 analyser = std::make_unique<P2R>(info, dumpFileName, sele1,
804 args_info.seleoffset_arg,
805 args_info.nbins_arg);
806 }
807 } else
808 analyser = std::make_unique<P2R>(info, dumpFileName, sele1,
809 args_info.nbins_arg);
810 } else {
811 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
812 "At least one selection script (--sele1) must be specified when "
813 "calculating P2R values");
814 painCave.severity = OPENMD_ERROR;
815 painCave.isFatal = 1;
816 simError();
817 }
818 } else if (args_info.p2z_given) {
819 if (args_info.sele1_given) {
820 if (args_info.sele2_given)
821 analyser = std::make_unique<P2Z>(info, dumpFileName, sele1, sele2,
822 args_info.nbins_arg, privilegedAxis);
823 else if (args_info.seleoffset_given) {
824 if (args_info.seleoffset2_given) {
825 analyser = std::make_unique<P2Z>(
826 info, dumpFileName, sele1, args_info.seleoffset_arg,
827 args_info.seleoffset2_arg, args_info.nbins_arg, privilegedAxis);
828 } else {
829 analyser = std::make_unique<P2Z>(info, dumpFileName, sele1,
830 args_info.seleoffset_arg,
831 args_info.nbins_arg, privilegedAxis);
832 }
833 } else
834 analyser = std::make_unique<P2Z>(info, dumpFileName, sele1,
835 args_info.nbins_arg, privilegedAxis);
836 } else {
837 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
838 "At least one selection script (--sele1) must be specified when "
839 "calculating P2Z values");
840 painCave.severity = OPENMD_ERROR;
841 painCave.isFatal = 1;
842 simError();
843 }
844 } else if (args_info.hbond_given) {
845 if (args_info.rcut_given) {
846 if (args_info.thetacut_given) {
847 analyser = std::make_unique<HBondGeometric>(
848 info, dumpFileName, sele1, sele2, args_info.rcut_arg,
849 args_info.thetacut_arg, args_info.nbins_arg);
850 } else {
851 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
852 "A cutoff angle (thetacut) must be specified when calculating "
853 "Hydrogen "
854 "Bonding Statistics");
855 painCave.severity = OPENMD_ERROR;
856 painCave.isFatal = 1;
857 simError();
858 }
859 } else {
860 snprintf(
861 painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
862 "A cutoff radius (rcut) must be specified when calculating Hydrogen "
863 "Bonding Statistics");
864 painCave.severity = OPENMD_ERROR;
865 painCave.isFatal = 1;
866 simError();
867 }
868
869 } else if (args_info.hbondz_given) {
870 if (args_info.rcut_given) {
871 if (args_info.thetacut_given) {
872 analyser = std::make_unique<HBondZ>(
873 info, dumpFileName, sele1, sele2, args_info.rcut_arg,
874 args_info.thetacut_arg, args_info.nbins_arg);
875 } else {
876 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
877 "A cutoff angle (thetacut) must be specified when calculating "
878 "Hydrogen "
879 "Bonding Statistics");
880 painCave.severity = OPENMD_ERROR;
881 painCave.isFatal = 1;
882 simError();
883 }
884 } else {
885 snprintf(
886 painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
887 "A cutoff radius (rcut) must be specified when calculating Hydrogen "
888 "Bonding Statistics");
889 painCave.severity = OPENMD_ERROR;
890 painCave.isFatal = 1;
891 simError();
892 }
893 } else if (args_info.hbondzvol_given) {
894 if (args_info.rcut_given) {
895 if (args_info.thetacut_given) {
896 analyser = std::make_unique<HBondZvol>(
897 info, dumpFileName, sele1, sele2, args_info.rcut_arg,
898 args_info.thetacut_arg, args_info.nbins_arg);
899 } else {
900 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
901 "A cutoff angle (thetacut) must be specified when calculating "
902 "Hydrogen "
903 "Bonding Statistics");
904 painCave.severity = OPENMD_ERROR;
905 painCave.isFatal = 1;
906 simError();
907 }
908 } else {
909 snprintf(
910 painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
911 "A cutoff radius (rcut) must be specified when calculating Hydrogen "
912 "Bonding Statistics");
913 painCave.severity = OPENMD_ERROR;
914 painCave.isFatal = 1;
915 simError();
916 }
917 } else if (args_info.hbondr_given) {
918 if (args_info.rcut_given) {
919 if (args_info.thetacut_given) {
920 analyser = std::make_unique<HBondR>(
921 info, dumpFileName, sele1, sele2, sele3, args_info.rcut_arg, maxLen,
922 args_info.thetacut_arg, args_info.nrbins_arg);
923 } else {
924 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
925 "A cutoff angle (thetacut) must be specified when calculating "
926 "Hydrogen "
927 "Bonding Statistics");
928 painCave.severity = OPENMD_ERROR;
929 painCave.isFatal = 1;
930 simError();
931 }
932 } else {
933 snprintf(
934 painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
935 "A cutoff radius (rcut) must be specified when calculating Hydrogen "
936 "Bonding Statistics");
937 painCave.severity = OPENMD_ERROR;
938 painCave.isFatal = 1;
939 simError();
940 }
941 } else if (args_info.hbondrvol_given) {
942 if (args_info.rcut_given) {
943 if (args_info.thetacut_given) {
944 analyser = std::make_unique<HBondRvol>(
945 info, dumpFileName, sele1, sele2, sele3, args_info.rcut_arg, maxLen,
946 args_info.thetacut_arg, args_info.nrbins_arg);
947 } else {
948 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
949 "A cutoff angle (thetacut) must be specified when calculating "
950 "Hydrogen "
951 "Bonding Statistics");
952 painCave.severity = OPENMD_ERROR;
953 painCave.isFatal = 1;
954 simError();
955 }
956 } else {
957 snprintf(
958 painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
959 "A cutoff radius (rcut) must be specified when calculating Hydrogen "
960 "Bonding Statistics");
961 painCave.severity = OPENMD_ERROR;
962 painCave.isFatal = 1;
963 simError();
964 }
965 } else if (args_info.potDiff_given) {
966 analyser = std::make_unique<PotDiff>(info, dumpFileName, sele1);
967 } else if (args_info.kirkwood_given) {
968 analyser = std::make_unique<Kirkwood>(info, dumpFileName, sele1, sele2,
969 maxLen, nrbins);
970 } else if (args_info.kirkwoodQ_given) {
971 analyser = std::make_unique<KirkwoodQuadrupoles>(info, dumpFileName, sele1,
972 sele2, maxLen, nrbins);
973 } else if (args_info.densityfield_given) {
974 analyser = std::make_unique<DensityField>(info, dumpFileName, sele1,
975 args_info.voxelSize_arg);
976 } else if (args_info.velocityfield_given) {
977 analyser = std::make_unique<SDVelocityField>(info, dumpFileName, sele1,
978 args_info.voxelSize_arg);
979 } else if (args_info.velocityZ_given) {
980 switch (privilegedAxis) {
981 case 0:
982 if (privilegedAxis2 == 1) {
983 analyser = std::make_unique<VelocityZ>(
984 info, dumpFileName, sele1, args_info.nbins_x_arg,
985 args_info.nbins_y_arg, privilegedAxis, privilegedAxis2);
986 } else if (privilegedAxis2 == 2) {
987 analyser = std::make_unique<VelocityZ>(
988 info, dumpFileName, sele1, args_info.nbins_x_arg,
989 args_info.nbins_z_arg, privilegedAxis, privilegedAxis2);
990 }
991 break;
992 case 1:
993 if (privilegedAxis2 == 0) {
994 analyser = std::make_unique<VelocityZ>(
995 info, dumpFileName, sele1, args_info.nbins_y_arg,
996 args_info.nbins_x_arg, privilegedAxis, privilegedAxis2);
997 } else if (privilegedAxis2 == 2) {
998 analyser = std::make_unique<VelocityZ>(
999 info, dumpFileName, sele1, args_info.nbins_y_arg,
1000 args_info.nbins_z_arg, privilegedAxis, privilegedAxis2);
1001 }
1002 break;
1003 case 2:
1004 default:
1005 if (privilegedAxis2 == 0) {
1006 analyser = std::make_unique<VelocityZ>(
1007 info, dumpFileName, sele1, args_info.nbins_z_arg,
1008 args_info.nbins_x_arg, privilegedAxis, privilegedAxis2);
1009 } else if (privilegedAxis2 == 1) {
1010 analyser = std::make_unique<VelocityZ>(
1011 info, dumpFileName, sele1, args_info.nbins_z_arg,
1012 args_info.nbins_y_arg, privilegedAxis, privilegedAxis2);
1013 }
1014 break;
1015 }
1016 } else if (args_info.dipole_orientation_given) {
1017 if (args_info.dipoleX_given && args_info.dipoleY_given &&
1018 args_info.dipoleZ_given)
1019 analyser = std::make_unique<DipoleOrientation>(
1020 info, dumpFileName, sele1, args_info.dipoleX_arg,
1021 args_info.dipoleY_arg, args_info.dipoleZ_arg, args_info.nbins_arg,
1022 privilegedAxis);
1023 else {
1024 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
1025 "Dipole components must be provided.");
1026 painCave.severity = OPENMD_ERROR;
1027 painCave.isFatal = 1;
1028 simError();
1029 }
1030
1031 } else if (args_info.order_prob_given) {
1032 if (args_info.dipoleX_given && args_info.dipoleY_given &&
1033 args_info.dipoleZ_given)
1034 analyser = std::make_unique<OrderParameterProbZ>(
1035 info, dumpFileName, sele1, args_info.dipoleX_arg,
1036 args_info.dipoleY_arg, args_info.dipoleZ_arg, args_info.nbins_arg,
1037 privilegedAxis);
1038 else {
1039 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
1040 "Dipole components must be provided.");
1041 painCave.severity = OPENMD_ERROR;
1042 painCave.isFatal = 1;
1043 simError();
1044 }
1045 } else if (args_info.trans_param_z_given) {
1046 if (args_info.rcut_given) {
1047 analyser = std::make_unique<TranslationalOrderParamZ>(
1048 info, dumpFileName, sele1, sele2, args_info.rcut_arg,
1049 args_info.nbins_arg, args_info.nbins_z_arg, maxLen, zmaxLen,
1050 privilegedAxis);
1051 } else {
1052 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
1053 "A cutoff radius (rcut) must be specified when calculating "
1054 "Translational Order "
1055 "Parameters");
1056 painCave.severity = OPENMD_ERROR;
1057 painCave.isFatal = 1;
1058 simError();
1059 }
1060 }
1061
1062 if (analyser != NULL) {
1063 if (args_info.output_given) {
1064 analyser->setOutputName(args_info.output_arg);
1065 }
1066 if (args_info.step_given) { analyser->setStep(args_info.step_arg); }
1067
1068 analyser->process();
1069 } else {
1070 snprintf(painCave.errMsg, MAX_SIM_ERROR_MSG_LENGTH,
1071 "StaticProps: No Analyser was created, nothing to do!");
1072 painCave.severity = OPENMD_ERROR;
1073 painCave.isFatal = 1;
1074 simError();
1075 }
1076
1077 delete info;
1078
1079 return 0;
1080}
StaticAnalyser for Potential Energy changes with charges turned off.
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...
Definition SimInfo.hpp:96
SnapshotManager * getSnapshotManager()
Returns the snapshot manager.
Definition SimInfo.hpp:251
Mat3x3d getHmat()
Returns the H-Matrix.
Definition Snapshot.cpp:217
Snapshot * getCurrentSnapshot()
Returns the pointer of current snapshot.
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.
Where the command line options are stored.
unsigned int nanglebins_given
Whether nanglebins was given.
unsigned int seleoffset2_given
Whether seleoffset2 was given.
char * sele2_arg
select second stuntdouble set (if sele2 is not set, use script from sele1).
unsigned int pipe_density_given
Whether pipe_density was given.
unsigned int surfDiffusion_given
Whether surfDiffusion was given.
unsigned int tet_param_r_given
Whether tet_param_r was given.
unsigned int output_given
Whether output was given.
double gaussWidth_arg
Gaussian width for coarse graining (Angstroms) (default='3.0').
unsigned int multipole_given
Whether multipole was given.
int nanglebins_arg
number of bins for cos(angle) (default='50').
unsigned int density_given
Whether density was given.
unsigned int comsele_given
Whether comsele was given.
unsigned int for_given
Whether for was given.
unsigned int thetacut_given
Whether thetacut was given.
char * atom_name_arg
name of atom for with average charge to be generated.
unsigned int scd_given
Whether scd was given.
unsigned int step_given
Whether step was given.
unsigned int rho_r_given
Whether rho_r was given.
unsigned int hullvol_given
Whether hullvol was given.
unsigned int net_charge_given
Whether net_charge was given.
unsigned int end_given
Whether end was given.
unsigned int ior_given
Whether ior was given.
char * sfgPolarization_arg
SFG polarization combination: ssp, ppp, sps (default='ssp').
unsigned int sele3_given
Whether sele3 was given.
double dipoleZ_arg
Z-component of the dipole with respect to body frame (default='-1.0').
double binWidth_arg
width of radial bins in angstroms (default='1.0').
unsigned int tet_hb_given
Whether tet_hb was given.
unsigned int chargez_given
Whether chargez was given.
unsigned int velocityZ_given
Whether velocityZ was given.
char * molname_arg
molecule name.
char * comsele_arg
select stunt doubles for center-of-mass reference point.
unsigned int voxelSize_given
Whether voxelSize was given.
unsigned int kirkwood_given
Whether kirkwood was given.
unsigned int gofr_given
Whether gofr was given.
unsigned int r_theta_omega_given
Whether r_theta_omega was given.
unsigned int potDiff_given
Whether potDiff was given.
unsigned int massdensityz_given
Whether massdensityz was given.
unsigned int molname_given
Whether molname was given.
int nbins_x_arg
number of bins in x axis (default='100').
unsigned int tet_param_z_given
Whether tet_param_z was given.
unsigned int gxyz_given
Whether gxyz was given.
unsigned int bo_given
Whether bo was given.
unsigned int kirkwoodQ_given
Whether kirkwoodQ was given.
unsigned int begin_given
Whether begin was given.
unsigned int p2z_given
Whether p2z was given.
double dipoleY_arg
Y-component of the dipole with respect to body frame (default='0.0').
int begin_arg
begin internal index.
unsigned int charge_density_z_given
Whether charge_density_z was given.
unsigned int cn_given
Whether cn was given.
unsigned int tet_param_rangle_given
Whether tet_param_rangle was given.
unsigned int tet_param_given
Whether tet_param was given.
unsigned int dipole_orientation_given
Whether dipole_orientation was given.
unsigned int hbond_given
Whether hbond was given.
int nbins_y_arg
number of bins in y axis (default='100').
unsigned int hbondr_given
Whether hbondr was given.
unsigned int refsele_given
Whether refsele was given.
unsigned int bad_given
Whether bad was given.
double fermiCoupling_arg
Fermi coupling [cm-1] for stretch-bend coupling in SFG spectra (default='25').
unsigned int hbondrvol_given
Whether hbondrvol was given.
unsigned int charger_given
Whether charger was given.
unsigned int p2_given
Whether p2 was given.
unsigned int gaussWidth_given
Whether gaussWidth was given.
double length_arg
maximum length (default='100').
unsigned int rnemdr_given
Whether rnemdr was given.
char * sele3_arg
select third stuntdouble set.
unsigned int dipoleX_given
Whether dipoleX was given.
char * output_arg
output file name.
unsigned int eam_density_given
Whether eam_density was given.
unsigned int velocityfield_given
Whether velocityfield was given.
unsigned int tet_param_dens_given
Whether tet_param_dens was given.
double lorentzianWidth_arg
Lorentzian half-width [cm-1] applied to eigenstates in SFG spectra (default='5').
unsigned int seleoffset3_given
Whether seleoffset3 was given.
unsigned int r_z_given
Whether r_z was given.
unsigned int v_radius_given
Whether v_radius was given.
char * input_arg
input dump file.
unsigned int hbondz_given
Whether hbondz was given.
int nbins_z_arg
number of bins in z axis (default='100').
int seleoffset3_arg
global index offset for a fourth object (used to define a vector between sites in molecule).
double thetacut_arg
HOO cutoff angle (degrees) (default='30').
unsigned int dipoleZ_given
Whether dipoleZ was given.
unsigned int sele1_given
Whether sele1 was given.
unsigned int sfg_given
Whether sfg was given.
unsigned int gcn_given
Whether gcn was given.
unsigned int length_given
Whether length was given.
int seleoffset_arg
global index offset for a second object (used to define a vector between sites in molecule).
unsigned int countz_given
Whether countz was given.
unsigned int rnemdrt_given
Whether rnemdrt was given.
unsigned int current_density_given
Whether current_density was given.
double rcut_arg
cutoff radius (angstroms).
unsigned int slab_density_given
Whether slab_density was given.
int gen_xyz_flag
generates xyz file (default=off).
unsigned int kirkwood_buff_given
Whether kirkwood_buff was given.
unsigned int p_angle_given
Whether p_angle was given.
unsigned int trans_param_z_given
Whether trans_param_z was given.
unsigned int densityfield_given
Whether densityfield was given.
enum enum_momentum momentum_arg
Type of momentum whose distribtution is required (default = Liner Momentum) (default='P').
char * refsele_arg
select reference.
double dz_arg
slab width (dz).
unsigned int twodgofr_given
Whether twodgofr was given.
enum enum_component component_arg
component of momentum for the momemtum distribution (default = z axis) (default='z').
double OHcut_arg
Oxygen-Hydrogen cutoff radius (angstroms) (default='2.45').
double voxelSize_arg
voxel size for coarse graining (Angstroms) (default='2.0').
unsigned int OHfreqmap_given
Whether OHfreqmap was given.
char * sele1_arg
select first stuntdouble set.
double radius_arg
Nanoparticle radius in Angstroms.
unsigned int dipoleY_given
Whether dipoleY was given.
unsigned int order_prob_given
Whether order_prob was given.
double dipoleX_arg
X-component of the dipole with respect to body frame (default='0.0').
unsigned int rcut_given
Whether rcut was given.
unsigned int r_theta_given
Whether r_theta was given.
unsigned int nitrile_given
Whether nitrile was given.
unsigned int gofz_given
Whether gofz was given.
unsigned int rodlength_given
Whether rodlength was given.
unsigned int numberz_given
Whether numberz was given.
unsigned int radius_given
Whether radius was given.
unsigned int scn_given
Whether scn was given.
int nbins_arg
Number of bins (default='100').
unsigned int rp2_given
Whether rp2 was given.
unsigned int nrbins_given
Whether nrbins was given.
unsigned int p2r_given
Whether p2r was given.
enum enum_privilegedAxis privilegedAxis_arg
which axis is special for spatial analysis (default = z axis) (default='z').
unsigned int numberr_given
Whether numberr was given.
unsigned int hbondzvol_given
Whether hbondzvol was given.
unsigned int sele2_given
Whether sele2 was given.
double end_arg
ending affine scale (default='1.2').
unsigned int hxy_given
Whether hxy was given.
enum enum_privilegedAxis2 privilegedAxis2_arg
which axis is special for spatial analysis (default = x axis) (default='x').
unsigned int zlength_given
Whether zlength was given.
int seleoffset2_arg
global index offset for a third object (used to define a vector between sites in molecule).
double zlength_arg
maximum length (Defaults to 1/2 smallest length of first frame).
unsigned int r_omega_given
Whether r_omega was given.
unsigned int count_given
Whether count was given.
unsigned int momentum_distribution_given
Whether momentum_distribution was given.
unsigned int angle_r_given
Whether angle_r was given.
unsigned int tet_param_xyz_given
Whether tet_param_xyz was given.
double OOcut_arg
Oxygen-Oxygen cutoff radius (angstroms) (default='3.5').
int nrbins_arg
number of radial bins (usually duplicates functionality of nbins) (default='100').
unsigned int theta_omega_given
Whether theta_omega was given.
unsigned int seleoffset_given
Whether seleoffset was given.
unsigned int rnemdz_given
Whether rnemdz was given.
unsigned int massdensityr_given
Whether massdensityr was given.
double v_radius_arg
VanderWaals radiius for fictious atoms used in model eg.
unsigned int dz_given
Whether dz was given.
unsigned int mcount_given
Whether mcount was given.
int step_arg
process every n frame (default='1').