39 #define fftwf_malloc fftw_malloc
40 #define fftwf_free fftw_free
41 #ifdef NAMD_FFTW_NO_TYPE_PREFIX
50 #if defined(WIN32) && !defined(__CYGWIN__)
53 #define MKDIR(X) mkdir(X)
55 #define PATHSEPSTR "\\"
59 #define MKDIR(X) mkdir(X,0777)
61 #define PATHSEPSTR "/"
67 #define access(PATH,MODE) _access(PATH,00)
86 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
88 #define __thread __declspec(thread)
95 extern int avxTilesCommandLineDisable;
101 #define XXXBIGREAL 1.0e32
105 if ( parseopts )
return parseopts->getfromptr(name,outbuf);
110 if ( parseopts )
return parseopts->istruefromptr(name);
115 if ( parseopts )
return parseopts->issetfromptr(name);
144 NAMD_die(
"Internal error in configuration file parser");
149 if (!opts.
set(*config))
151 NAMD_die(
"ERROR(S) IN THE CONFIGURATION FILE");
156 check_config(opts,config,cwd);
158 print_config(opts,config,cwd);
169 return ( (! strncasecmp(s,
"yes",8)) ||
170 (! strncasecmp(s,
"on",8)) ||
171 (! strncasecmp(s,
"true",8)) );
176 if ( CkMyRank() )
return;
178 #define MAX_SCRIPT_PARAM_SIZE 128
179 #define SCRIPT_PARSE_BOOL(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR) = atobool(value); return; } }
180 #define SCRIPT_PARSE_INT(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR) = atoi(value); return; } }
181 #define SCRIPT_PARSE_FLOAT(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR) = atof(value); return; } }
182 #define SCRIPT_PARSE_MOD_FLOAT(NAME,VAR,MOD) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR) = atof(value) MOD; return; } }
183 #define SCRIPT_PARSE_VECTOR(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR).set(value); return; } }
184 #define SCRIPT_PARSE_STRING(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { strcpy(VAR,value); return; } }
197 N = firstTimestep = atoi(value);
return;
206 if ( langevinOn && ! langevinOnAtStartup ) {
207 NAMD_die(
"Langevin must be enabled at startup to disable and re-enable in script.");
239 berendsenPressureRelaxationTime)
251 strcpy(dcdFilename,value);
256 strcpy(velDcdFilename,value);
273 NAMD_die(
"Can't yet modify mgridforcescale in a script");
277 NAMD_die(
"Can't yet modify mgridforcevoff in a script");
282 if ( ! fixedAtomsOn )
283 NAMD_die(
"FixedAtoms may not be enabled in a script.");
284 if ( ! fixedAtomsForces )
285 NAMD_die(
"To use fixedAtoms in script first use fixedAtomsForces yes.");
293 if ( alchOn && ! alchOnAtStartup ) {
294 NAMD_die(
"Alchemy must be enabled at startup to disable and re-enable in script.");
296 alchFepOn = alchOn && alchFepOnAtStartup;
297 alchThermIntOn = alchOn && alchThermIntOnAtStartup;
305 alchLambda = atof(value);
306 if ( alchLambda < 0.0 || 1.0 < alchLambda ) {
307 NAMD_die(
"Alchemical lambda values should be in the range [0.0, 1.0]\n");
314 alchLambda2 = atof(value);
315 if ( alchLambda2 < 0.0 || 1.0 < alchLambda2 ) {
316 NAMD_die(
"Alchemical lambda values should be in the range [0.0, 1.0]\n");
323 alchLambdaIDWS = atof(value);
330 alchLambdaFreq = atoi(value);
331 if ( alchLambdaIDWS >= 0 ) {
332 NAMD_die(
"alchLambdaIDWS and alchLambdaFreq are not compatible.\n");
340 nonbondedScaling = atof(value);
354 soluteScalingFactor = atof(value);
355 if (soluteScalingFactor < 0.0) {
356 NAMD_die(
"Solute scaling factor should be non-negative\n");
358 soluteScalingFactorCharge = soluteScalingFactor;
359 soluteScalingFactorVdw = soluteScalingFactor;
362 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
369 soluteScalingFactorVdw = atof(value);
370 if (soluteScalingFactorVdw < 0.0) {
371 NAMD_die(
"Solute scaling factor for van der Waals "
372 "should be non-negative\n");
376 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
383 soluteScalingFactorCharge = atof(value);
384 if (soluteScalingFactorCharge < 0.0) {
385 NAMD_die(
"Solute scaling factor for electrostatics "
386 "should be non-negative\n");
392 sprintf(error,
"Setting parameter %s from script failed!\n",param);
417 HydrogenBonds =
FALSE;
418 useAntecedent =
TRUE;
423 dhaCutoffAngle = 100.0;
430 config_parser_basic(opts);
431 config_parser_fileio(opts);
432 config_parser_fullelect(opts);
433 config_parser_methods(opts);
434 config_parser_constraints(opts);
435 #ifdef OPENATOM_VERSION
436 config_parser_openatom(opts);
437 #endif // OPENATOM_VERSION
439 config_parser_gridforce(opts);
440 config_parser_mgridforce(opts);
441 config_parser_movdrag(opts);
442 config_parser_rotdrag(opts);
443 config_parser_constorque(opts);
444 config_parser_boundary(opts);
445 config_parser_misc(opts);
449 void SimParameters::config_parser_basic(
ParseOptions &opts) {
454 opts.
optional(
"main",
"obsolete",
"used to flag obsolete options",
458 opts.
require(
"main",
"timestep",
"size of the timestep, in fs",
463 opts.
optional(
"main",
"numsteps",
"number of timesteps to perform",
467 opts.
optional(
"main",
"stepspercycle",
468 "Number of steps between atom migrations",
472 opts.
require(
"main",
"cutoff",
"local electrostatic and Vdw distance",
477 opts.
optional(
"main",
"nonbondedScaling",
"nonbonded scaling factor",
478 &nonbondedScaling, 1.0);
481 opts.
optional(
"main",
"limitDist",
"limit nonbonded below this distance",
485 opts.
require(
"main",
"exclude",
"Electrostatic and VDW exclusion policy",
488 opts.
optional(
"exclude",
"1-4scaling",
"1-4 electrostatic scaling factor",
493 "Should a smoothing function be used?", &switchingActive,
TRUE);
495 opts.
optionalB(
"switching",
"vdwForceSwitching",
496 "Use force switching for vdw?", &vdwForceSwitching,
FALSE);
498 opts.
optional(
"switching",
"switchdist",
499 "Distance for switching function activation",
504 opts.
optionalB(
"main",
"martiniSwitching",
505 "Use Martini residue-based coarse-grain switching?", &martiniSwitching,
FALSE);
506 opts.
optionalB(
"main",
"martiniDielAllow",
507 "Allow use of dielectric != 15.0 when using Martini", &martiniDielAllow,
FALSE);
509 opts.
optional(
"main",
"pairlistdist",
"Pairlist inclusion distance",
514 opts.
optional(
"main",
"pairlistMinProcs",
"Min procs for pairlists",
515 &pairlistMinProcs,1);
518 opts.
optional(
"main",
"pairlistsPerCycle",
"regenerate x times per cycle",
519 &pairlistsPerCycle,2);
522 opts.
optional(
"main",
"outputPairlists",
"how often to print warnings",
523 &outputPairlists, 0);
526 opts.
optional(
"main",
"pairlistShrink",
"tol *= (1 - x) on regeneration",
527 &pairlistShrink,0.01);
530 opts.
optional(
"main",
"pairlistGrow",
"tol *= (1 + x) on trigger",
531 &pairlistGrow, 0.01);
534 opts.
optional(
"main",
"pairlistTrigger",
"trigger is atom > (1 - x) * tol",
535 &pairlistTrigger, 0.3);
538 opts.
optional(
"main",
"temperature",
"initial temperature",
543 opts.
optionalB(
"main",
"COMmotion",
"allow initial center of mass movement",
546 opts.
optionalB(
"main",
"zeroMomentum",
"constrain center of mass",
547 &zeroMomentum,
FALSE);
548 opts.
optionalB(
"zeroMomentum",
"zeroMomentumAlt",
"constrain center of mass",
549 &zeroMomentumAlt,
FALSE);
551 opts.
optionalB(
"main",
"wrapWater",
"wrap waters around periodic boundaries on output",
553 opts.
optionalB(
"main",
"wrapAll",
"wrap all clusters around periodic boundaries on output",
555 opts.
optionalB(
"main",
"wrapNearest",
"wrap to nearest image to cell origin",
556 &wrapNearest,
FALSE);
558 opts.
optional(
"main",
"dielectric",
"dielectric constant",
566 opts.
optional(
"main",
"seed",
"Initial random number seed", &randomSeed);
569 opts.
optional(
"main",
"outputEnergies",
"How often to print energies in timesteps",
573 opts.
optional(
"main",
"outputMomenta",
"How often to print linear and angular momenta in timesteps",
577 opts.
optional(
"main",
"outputTiming",
"How often to print timing data in timesteps",
581 opts.
optional(
"main",
"outputCudaTiming",
"How often to print CUDA timing data in timesteps",
582 &outputCudaTiming, 0);
585 opts.
optional(
"main",
"outputPressure",
"How often to print pressure data in timesteps",
589 opts.
optionalB(
"main",
"mergeCrossterms",
"merge crossterm energy with dihedral when printing?",
590 &mergeCrossterms,
TRUE);
592 opts.
optional(
"main",
"MTSAlgorithm",
"Multiple timestep algorithm",
595 opts.
optional(
"main",
"longSplitting",
"Long range force splitting option",
598 opts.
optionalB(
"main",
"ignoreMass",
"Do not use masses to find hydrogen atoms",
601 opts.
optional(
"main",
"splitPatch",
"Atom into patch splitting option",
603 opts.
optional(
"main",
"hgroupCutoff",
"Hydrogen margin", &hgroupCutoff, 2.5);
605 opts.
optional(
"main",
"extendedSystem",
606 "Initial configuration of extended system variables and periodic cell",
609 opts.
optional(
"main",
"cellBasisVector1",
"Basis vector for periodic cell",
611 opts.
optional(
"main",
"cellBasisVector2",
"Basis vector for periodic cell",
613 opts.
optional(
"main",
"cellBasisVector3",
"Basis vector for periodic cell",
615 opts.
optional(
"main",
"cellOrigin",
"Fixed center of periodic cell",
618 opts.
optionalB(
"main",
"molly",
"Rigid bonds to hydrogen",&mollyOn,
FALSE);
619 opts.
optional(
"main",
"mollyTolerance",
"Error tolerance for MOLLY",
621 opts.
optional(
"main",
"mollyIterations",
622 "Max number of iterations for MOLLY", &mollyIter, 100);
625 opts.
optional(
"main",
"rigidTolerance",
626 "Error tolerance for rigid bonds to hydrogen",
628 opts.
optional(
"main",
"rigidIterations",
629 "Max number of SHAKE iterations for rigid bonds to hydrogen",
631 opts.
optionalB(
"main",
"rigidDieOnError",
632 "Die if rigidTolerance is not achieved after rigidIterations",
635 "Use the SETTLE algorithm for rigid waters",
638 opts.
optional(
"main",
"nonbondedFreq",
"Nonbonded evaluation frequency",
639 &nonbondedFrequency, 1);
642 opts.
optionalB(
"main",
"outputPatchDetails",
"print number of atoms in each patch",
643 &outputPatchDetails,
FALSE);
644 opts.
optionalB(
"main",
"staticAtomAssignment",
"never migrate atoms",
645 &staticAtomAssignment,
FALSE);
646 opts.
optionalB(
"main",
"replicaUniformPatchGrids",
"same patch grid size on all replicas",
647 &replicaUniformPatchGrids,
FALSE);
648 #ifndef MEM_OPT_VERSION
651 opts.
optionalB(
"main",
"lonePairs",
"Enable lone pairs", &lonepairs,
TRUE);
655 opts.
optionalB(
"main",
"lonePairs",
"Enable lone pairs", &lonepairs,
FALSE);
658 opts.
optionalB(
"main",
"LJcorrection",
"Apply analytical tail corrections for energy and virial", &LJcorrection,
FALSE);
659 #ifdef TIMER_COLLECTION
660 opts.
optional(
"main",
"TimerBinWidth",
661 "Bin width of timer histogram collection in microseconds",
662 &timerBinWidth, 1.0);
664 #if defined(NAMD_NVTX_ENABLED) || defined(NAMD_CMK_TRACE_ENABLED) || defined(NAMD_ROCTX_ENABLED)
666 opts.
optional(
"main",
"beginEventPatchID",
"Beginning patch ID for profiling",
667 &beginEventPatchID, 0);
668 opts.
optional(
"main",
"endEventPatchID",
"Ending patch ID for profiling",
669 &endEventPatchID, 5000);
671 opts.
optional(
"main",
"beginEventStep",
"Beginning time step for profiling",
673 opts.
optional(
"main",
"endEventStep",
"Ending time step for profiling",
674 &endEventStep, 1000);
678 void SimParameters::config_parser_fileio(
ParseOptions &opts) {
690 opts.
optional(
"main",
"coordinates",
"initial PDB coordinate file",
694 "initial velocities, given as a PDB file",
PARSE_STRING);
695 opts.
optional(
"main",
"binvelocities",
696 "initial velocities, given as a binary restart",
PARSE_STRING);
697 opts.
optional(
"main",
"bincoordinates",
698 "initial coordinates in a binary restart file",
PARSE_STRING);
699 #ifdef MEM_OPT_VERSION
700 opts.
optional(
"main",
"binrefcoords",
701 "reference coordinates in a binary restart file",
PARSE_STRING);
706 opts.
optional(
"main",
"structure",
"initial PSF structure file",
713 "CHARMm 19 or CHARMm 22 compatable force field file (multiple "
719 opts.
optionalB(
"parameters",
"paraTypeXplor",
"Parameter file in Xplor format?", ¶TypeXplorOn,
FALSE);
720 opts.
optionalB(
"parameters",
"paraTypeCharmm",
"Parameter file in Charmm format?", ¶TypeCharmmOn,
FALSE);
724 opts.
optionalB(
"main",
"GromacsPair",
"Separately calculate pair interactions", &goGroPair,
FALSE);
725 opts.
optionalB(
"main",
"GoForcesOn",
"Go forces will be calculated", &goForcesOn,
FALSE);
726 opts.
require(
"GoForcesOn",
"GoParameters",
"Go parameter file", goParameters);
727 opts.
require(
"GoForcesOn",
"GoCoordinates",
"target coordinates for Go forces", goCoordinates);
732 opts.
require(
"GoForcesOn",
"GoMethod",
"Which type of matrix should be used to store Go contacts?",
PARSE_STRING);
735 opts.
require(
"main",
"outputname",
736 "prefix for the final PDB position and velocity filenames",
739 opts.
optional(
"main",
"auxFile",
"Filename for data stream output",
742 opts.
optional(
"main",
"numinputprocs",
"Number of pes to use for parallel input",
746 opts.
optional(
"main",
"numoutputprocs",
"Number of pes to use for parallel output",
749 opts.
optional(
"main",
"numoutputwriters",
"Number of output processors that simultaneously write to an output file",
753 opts.
optional(
"main",
"DCDfreq",
"Frequency of DCD trajectory output, in "
754 "timesteps", &dcdFrequency, 0);
756 opts.
optional(
"DCDfreq",
"DCDfile",
"DCD trajectory output file name",
758 opts.
optionalB(
"DCDfreq",
"DCDunitcell",
"Store unit cell in dcd timesteps?",
761 opts.
optional(
"main",
"velDCDfreq",
"Frequency of velocity "
762 "DCD output, in timesteps", &velDcdFrequency, 0);
764 opts.
optional(
"velDCDfreq",
"velDCDfile",
"velocity DCD output file name",
767 opts.
optional(
"main",
"forceDCDfreq",
"Frequency of force"
768 "DCD output, in timesteps", &forceDcdFrequency, 0);
770 opts.
optional(
"forceDCDfreq",
"forceDCDfile",
"force DCD output file name",
773 opts.
optional(
"main",
"XSTfreq",
"Frequency of XST trajectory output, in "
774 "timesteps", &xstFrequency, 0);
776 opts.
optional(
"XSTfreq",
"XSTfile",
"Extended sytem trajectory output "
777 "file name", xstFilename);
779 opts.
optional(
"main",
"restartfreq",
"Frequency of restart file "
780 "generation", &restartFrequency, 0);
782 opts.
optional(
"restartfreq",
"restartname",
"Prefix for the position and "
783 "velocity PDB files used for restarting", restartFilename);
784 opts.
optionalB(
"restartfreq",
"restartsave",
"Save restart files with "
785 "unique filenames rather than overwriting", &restartSave,
FALSE);
786 opts.
optionalB(
"restartfreq",
"restartsavedcd",
"Save DCD files with "
787 "unique filenames at each restart", &restartSaveDcd,
FALSE);
789 opts.
optionalB(
"restartfreq",
"binaryrestart",
"Specify use of binary restart files ",
790 &binaryRestart,
TRUE);
792 opts.
optionalB(
"outputname",
"binaryoutput",
"Specify use of binary output files ",
793 &binaryOutput,
TRUE);
795 opts.
optionalB(
"main",
"amber",
"Is it AMBER force field?",
797 opts.
optionalB(
"amber",
"readexclusions",
"Read exclusions from parm file?",
798 &readExclusions,
TRUE);
799 opts.
require(
"amber",
"scnb",
"1-4 VDW interactions are divided by scnb",
805 opts.
optionalB(
"main",
"gromacs",
"Use GROMACS-like force field?",
807 opts.
require(
"gromacs",
"grotopfile",
"GROMACS topology file",
809 opts.
optional(
"gromacs",
"grocoorfile",
"GROMACS coordinate file",
813 opts.
optionalB(
"main",
"vdwGeometricSigma",
814 "Use geometric mean to combine L-J sigmas, as for OPLS",
815 &vdwGeometricSigma,
FALSE);
818 opts.
optional(
"main",
"computeMapFile",
"Filename for computeMap",
820 opts.
optionalB(
"main",
"storeComputeMap",
"store computeMap?",
821 &storeComputeMap,
FALSE);
822 opts.
optionalB(
"main",
"loadComputeMap",
"load computeMap?",
823 &loadComputeMap,
FALSE);
827 void SimParameters::config_parser_fullelect(
ParseOptions &opts) {
831 DebugM(1,
"DPMTA setup start\n");
833 opts.
optionalB(
"main",
"FMA",
"Should FMA be used?", &FMAOn,
FALSE);
834 opts.
optional(
"FMA",
"FMALevels",
"Tree levels to use in FMA", &FMALevels,
837 opts.
optional(
"FMA",
"FMAMp",
"Number of FMA multipoles", &FMAMp, 8);
839 opts.
optionalB(
"FMA",
"FMAFFT",
"Use FFT enhancement in FMA?", &FMAFFTOn,
TRUE);
840 opts.
optional(
"FMAFFT",
"FMAFFTBlock",
"FFT blocking factor",
843 DebugM(1,
"DPMTA setup end\n");
853 opts.
optional(
"main",
"fullElectFrequency",
854 "Number of steps between full electrostatic executions",
855 &fullElectFrequency);
859 opts.
optional(
"main",
"fmaFrequency",
860 "Number of steps between full electrostatic executions",
865 "FMA theta parameter value",
869 opts.
optionalB(
"main",
"FullDirect",
"Should direct calculations of full electrostatics be performed?",
870 &fullDirectOn,
FALSE);
876 "Use multilevel summation method for electrostatics?",
878 opts.
optional(
"MSM",
"MSMQuality",
"MSM quality",
880 opts.
optional(
"MSM",
"MSMApprox",
"MSM approximation",
882 opts.
optional(
"MSM",
"MSMSplit",
"MSM splitting",
884 opts.
optional(
"MSM",
"MSMLevels",
"MSM maximum number of levels",
886 opts.
optional(
"MSM",
"MSMGridSpacing",
"MSM grid spacing (Angstroms)",
887 &MSMGridSpacing, 2.5);
888 opts.
optional(
"MSM",
"MSMPadding",
"MSM padding (Angstroms)",
890 opts.
optional(
"MSM",
"MSMxmin",
"MSM x minimum (Angstroms)", &MSMxmin, 0);
891 opts.
optional(
"MSM",
"MSMxmax",
"MSM x maximum (Angstroms)", &MSMxmax, 0);
892 opts.
optional(
"MSM",
"MSMymin",
"MSM y minimum (Angstroms)", &MSMymin, 0);
893 opts.
optional(
"MSM",
"MSMymax",
"MSM y maximum (Angstroms)", &MSMymax, 0);
894 opts.
optional(
"MSM",
"MSMzmin",
"MSM z minimum (Angstroms)", &MSMzmin, 0);
895 opts.
optional(
"MSM",
"MSMzmax",
"MSM z maximum (Angstroms)", &MSMzmax, 0);
896 opts.
optional(
"MSM",
"MSMBlockSizeX",
897 "MSM grid block size along X direction (for decomposing parallel work)",
899 opts.
optional(
"MSM",
"MSMBlockSizeY",
900 "MSM grid block size along Y direction (for decomposing parallel work)",
902 opts.
optional(
"MSM",
"MSMBlockSizeZ",
903 "MSM grid block size along Z direction (for decomposing parallel work)",
907 "Use MSM serial version for long-range calculation?",
908 &MsmSerialOn,
FALSE);
914 "Use fast multipole method for electrostatics?",
916 opts.
optional(
"FMM",
"FMMLevels",
"FMM number of levels",
918 opts.
optional(
"FMM",
"FMMPadding",
"FMM padding margin (Angstroms)",
921 opts.
optionalB(
"main",
"useCUDA2",
"Use new CUDA code", &useCUDA2,
TRUE);
925 opts.
optionalB(
"main",
"PME",
"Use particle mesh Ewald for electrostatics?",
927 opts.
optional(
"PME",
"PMETolerance",
"PME direct space tolerance",
928 &PMETolerance, 1.e-6);
929 opts.
optional(
"PME",
"PMEInterpOrder",
"PME interpolation order",
931 opts.
optional(
"PME",
"PMEGridSizeX",
"PME grid in x dimension",
933 opts.
optional(
"PME",
"PMEGridSizeY",
"PME grid in y dimension",
935 opts.
optional(
"PME",
"PMEGridSizeZ",
"PME grid in z dimension",
937 opts.
optional(
"PME",
"PMEGridSpacing",
"Maximum PME grid spacing (Angstroms)",
938 &PMEGridSpacing, 0.);
940 opts.
optional(
"PME",
"PMEProcessors",
941 "PME FFT and reciprocal sum processor count", &PMEProcessors, 0);
942 opts.
optional(
"PME",
"PMEMinSlices",
943 "minimum thickness of PME reciprocal sum slab", &PMEMinSlices, 2);
946 "PME FFT and reciprocal sum pencil grid size", &PMEPencils, -1);
948 "PME FFT and reciprocal sum pencil grid size X", &PMEPencilsX, 0);
950 "PME FFT and reciprocal sum pencil grid size Y", &PMEPencilsY, 0);
952 "PME FFT and reciprocal sum pencil grid size Z", &PMEPencilsZ, 0);
956 opts.
optional(
"PME",
"PMEPencilsYLayout",
957 "PME FFT and reciprocal sum Y pencil layout strategy", &PMEPencilsYLayout, 0);
958 opts.
optional(
"PME",
"PMEPencilsXLayout",
959 "PME FFT and reciprocal sum X pencil layout strategy", &PMEPencilsXLayout, 1);
962 opts.
optional(
"PME",
"PMESendOrder",
963 "PME message ordering control", &PMESendOrder, 0);
965 opts.
optional(
"PME",
"PMEMinPoints",
966 "minimum points per PME reciprocal sum pencil", &PMEMinPoints, 10000);
968 opts.
optionalB(
"main",
"PMEBarrier",
"Use barrier in PME?",
970 opts.
optionalB(
"main",
"PMEOffload",
"Offload PME to accelerator?",
973 opts.
optionalB(
"PME",
"usePMECUDA",
"Use the PME CUDA version", &usePMECUDA, CmiNumPhysicalNodes() < 5);
976 opts.
optionalB(
"PME",
"useDPME",
"Use old DPME code?", &useDPME,
FALSE);
980 opts.
optionalB(
"main",
"FFTWPatient",
"Use intensive plan creation to optimize FFTW?",
984 &FFTWPatient,
FALSE);
987 opts.
optionalB(
"main",
"FFTWEstimate",
"Use estimates to optimize FFTW?",
989 &FFTWEstimate,
TRUE);
991 &FFTWEstimate,
FALSE);
993 opts.
optionalB(
"main",
"FFTWUseWisdom",
"Read/save wisdom file for FFTW?",
995 &FFTWUseWisdom,
FALSE);
997 &FFTWUseWisdom,
TRUE);
999 opts.
optional(
"FFTWUseWisdom",
"FFTWWisdomFile",
"File for FFTW wisdom",
1003 "Use \"Tiles\" mode for AVX-512 optimized calculations",
1004 &useAVXTiles,
TRUE);
1007 void SimParameters::config_parser_methods(
ParseOptions &opts) {
1010 opts.
optionalB(
"main",
"minimization",
"Should minimization be performed?",
1011 &minimizeCGOn,
FALSE);
1012 opts.
optionalB(
"main",
"minVerbose",
"Print extra minimization diagnostics?",
1013 &minVerbose,
FALSE);
1014 opts.
optional(
"main",
"minTinyStep",
"very first minimization steps",
1015 &minTinyStep, 1.0e-6);
1017 opts.
optional(
"main",
"minBabyStep",
"initial minimization steps",
1018 &minBabyStep, 1.0e-2);
1020 opts.
optional(
"main",
"minLineGoal",
"line minimization gradient reduction",
1021 &minLineGoal, 1.0e-3);
1024 opts.
optionalB(
"main",
"velocityQuenching",
1025 "Should old-style minimization be performed?", &minimizeOn,
FALSE);
1027 opts.
optional(
"main",
"maximumMove",
"Maximum atom movement per step", &maximumMove, 0.0);
1031 opts.
optionalB(
"main",
"Langevin",
"Should Langevin dynamics be performed?",
1032 &langevinOn,
FALSE);
1033 opts.
require(
"Langevin",
"langevinTemp",
"Temperature for heat bath in Langevin "
1034 "dynamics", &langevinTemp);
1037 opts.
optional(
"Langevin",
"langevinDamping",
"Damping coefficient (1/ps)",
1040 opts.
optionalB(
"Langevin",
"langevinHydrogen",
"Should Langevin dynamics be applied to hydrogen atoms?",
1042 opts.
optional(
"Langevin",
"langevinFile",
"PDB file with temperature "
1043 "coupling terms (B(i)) (default is the PDB input file)",
1045 opts.
optional(
"Langevin",
"langevinCol",
"Column in the langevinFile "
1046 "containing the temperature coupling term B(i);\n"
1050 opts.
optionalB(
"Langevin",
"langevinBAOAB",
1051 "Should Langevin dynamics be performed using BAOAB integration?",
1052 &langevin_useBAOAB,
FALSE);
1055 opts.
optionalB(
"main",
"LoweAndersen",
"Should Lowe-Andersen dynamics be performed?",
1056 &loweAndersenOn,
FALSE);
1057 opts.
require(
"LoweAndersen",
"loweAndersenTemp",
"Temperature for heat bath in Lowe-Andersen "
1058 "dynamics", &loweAndersenTemp);
1061 opts.
optional(
"LoweAndersen",
"loweAndersenRate",
"Collision rate (1/ps)",
1062 &loweAndersenRate, 50);
1064 opts.
optional(
"LoweAndersen",
"loweAndersenCutoff",
"Cutoff radius",
1065 &loweAndersenCutoff, 2.7);
1071 opts.
optionalB(
"main",
"alch",
"Is achemical simulation being performed?",
1073 opts.
require(
"alch",
"alchLambda",
"Alchemical coupling parameter value",
1077 opts.
optionalB(
"alch",
"singleTopology",
1078 "Is single topology used for relative free energy?", &singleTopology,
FALSE);
1081 "Is S-D bonded terms scaling for relative free energy?", &sdScaling,
FALSE);
1083 opts.
optional(
"alch",
"alchFile",
"PDB file with perturbation flags "
1085 opts.
optional(
"alch",
"alchCol",
"Column in the alchFile with the "
1088 opts.
optional(
"alch",
"unperturbedBondFile",
"mini psf file with unperturbed bond info"
1090 opts.
optional(
"alch",
"alchOutFreq",
"Frequency of alchemical energy"
1091 "output in timesteps", &alchOutFreq, 5);
1093 opts.
optional(
"alch",
"alchOutFile",
"Alchemical energy output filename",
1097 opts.
optional(
"alch",
"alchVdwShiftCoeff",
"Coeff used for generating"
1098 "the altered alchemical vDW interactions", &alchVdwShiftCoeff, 5.);
1101 opts.
optionalB(
"alch",
"alchWCA",
"Is WCA decomposition being performed?",
1105 opts.
optional(
"alch",
"alchElecLambdaStart",
"Lambda at which electrostatic"
1106 "scaling of exnihilated particles begins", &alchElecLambdaStart, 0.5);
1109 opts.
optional(
"alch",
"alchVdwLambdaEnd",
"Lambda at which vdW"
1110 "scaling of exnihilated particles ends", &alchVdwLambdaEnd, 1.0);
1113 opts.
optional(
"alch",
"alchRepLambdaEnd",
"Lambda at which repulsive vdW"
1114 "scaling of exnihilated particles ends and attractive vdW scaling"
1115 "begins", &alchRepLambdaEnd, 0.5);
1118 opts.
optional(
"alch",
"alchBondLambdaEnd",
"Lambda at which bonded"
1119 "scaling of exnihilated particles begins", &alchBondLambdaEnd, 0.0);
1122 opts.
optionalB(
"alch",
"alchDecouple",
"Enable alchemical decoupling?",
1123 &alchDecouple,
FALSE);
1124 opts.
optionalB(
"alch",
"alchBondDecouple",
"Enable decoupling of purely "
1125 "alchemical bonds?", &alchBondDecouple,
FALSE);
1128 opts.
optional(
"alch",
"alchType",
"Which alchemical method to use?",
1130 opts.
optional(
"alch",
"alchLambda2",
"Alchemical coupling comparison value",
1132 opts.
optional(
"alch",
"alchLambdaIDWS",
"Alchemical coupling comparison value for interleaved double-wide sampling",
1133 &alchLambdaIDWS, -1);
1134 opts.
optional(
"alch",
"alchLambdaFreq",
1135 "Frequency of increasing coupling parameter value", &alchLambdaFreq, 0);
1137 opts.
optional(
"alch",
"alchSwitchType",
"Switching type flag",
1139 opts.
optional(
"alch",
"alchEquilSteps",
"Equilibration steps, before "
1140 "data collection in the alchemical window", &alchEquilSteps, 0);
1143 opts.
optionalB(
"alch",
"alchEnsembleAvg",
"Ensemble Average in use?",
1144 &alchEnsembleAvg,
TRUE);
1147 opts.
optionalB(
"main",
"les",
"Is locally enhanced sampling enabled?",
1149 opts.
require(
"les",
"lesFactor",
"Local enhancement factor", &lesFactor);
1150 opts.
optional(
"les",
"lesFile",
"PDB file with enhancement flags "
1152 opts.
optional(
"les",
"lesCol",
"Column in the lesFile with the "
1154 opts.
optionalB(
"les",
"lesReduceTemp",
"Reduce enhanced atom temperature?",
1155 &lesReduceTemp,
FALSE);
1156 opts.
optionalB(
"les",
"lesReduceMass",
"Reduce enhanced atom mass?",
1157 &lesReduceMass,
FALSE);
1161 "Is replica exchange solute tempering enabled?",
1162 &soluteScalingOn,
FALSE);
1163 opts.
require(
"soluteScaling",
"soluteScalingFactor",
1164 "Solute scaling factor",
1165 &soluteScalingFactor);
1167 opts.
optional(
"soluteScaling",
"soluteScalingFactorCharge",
1168 "Solute scaling factor for electrostatic interactions",
1169 &soluteScalingFactorCharge);
1171 opts.
optional(
"soluteScaling",
"soluteScalingFactorVdw",
1172 "Solute scaling factor for van der Waals interactions",
1173 &soluteScalingFactorVdw);
1175 opts.
optional(
"soluteScaling",
"soluteScalingFile",
1176 "PDB file with scaling flags; if undefined, defaults to main PDB file",
1178 opts.
optional(
"soluteScaling",
"soluteScalingCol",
1179 "Column in the soluteScalingFile providing the scaling flag",
1181 opts.
optionalB(
"main",
"soluteScalingAll",
1182 "Apply scaling also to bond and angle interactions?",
1183 &soluteScalingAll,
FALSE);
1186 opts.
optionalB(
"main",
"drude",
"Perform integration of Drude oscillators?",
1188 opts.
require(
"drude",
"drudeTemp",
"Temperature for freezing "
1189 "Drude oscillators", &drudeTemp);
1192 opts.
optional(
"drude",
"drudeDamping",
"Damping coefficient (1/ps) for "
1193 "Drude oscillators", &drudeDamping);
1195 opts.
optional(
"drude",
"drudeNbtholeCut",
"Nonbonded Thole interactions "
1196 "interaction radius", &drudeNbtholeCut, 5.0);
1198 opts.
optionalB(
"drude",
"drudeHardWall",
"Apply maximum Drude bond length "
1199 "restriction?", &drudeHardWallOn,
TRUE);
1200 opts.
optional(
"drude",
"drudeBondLen",
"Drude oscillator bond length "
1201 "beyond which to apply restraint", &drudeBondLen, 0.25);
1203 opts.
optional(
"drude",
"drudeBondConst",
"Drude oscillator restraining "
1204 "force constant", &drudeBondConst, 40000.0);
1208 opts.
optionalB(
"main",
"pairInteraction",
1209 "Are pair interactions calculated?", &pairInteractionOn,
FALSE);
1210 opts.
optional(
"pairInteraction",
"pairInteractionFile",
1211 "PDB files with interaction flags " "default is the input PDB file",
1213 opts.
optional(
"pairInteraction",
"pairInteractionCol",
1214 "Column in the pairInteractionFile with the interaction flags",
1216 opts.
require(
"pairInteraction",
"pairInteractionGroup1",
1217 "Flag for interaction group 1", &pairInteractionGroup1);
1218 opts.
optional(
"pairInteraction",
"pairInteractionGroup2",
1219 "Flag for interaction group 2", &pairInteractionGroup2, -1);
1220 opts.
optionalB(
"pairInteraction",
"pairInteractionSelf",
1221 "Compute only within-group interactions?", &pairInteractionSelf,
1224 opts.
optionalB(
"main",
"cosAngles",
"Are some angles cosine-based?", &cosAngles,
FALSE);
1228 opts.
optionalB(
"main",
"globalTest",
"Should global integration (for development) be used?",
1230 opts.
optionalB(
"main",
"dihedral",
"Should dihedral angle dynamics be performed?",
1231 &dihedralOn,
FALSE);
1233 opts.
optionalB(
"dihedral",
"COLD",
"Should overdamped Langevin dynamics be performed?",
1235 opts.
require(
"COLD",
"COLDTemp",
"Temperature for heat bath in COLD",
1239 opts.
require(
"COLD",
"COLDRate",
"Damping rate for COLD",
1245 "Should temperature coupling be performed?",
1247 opts.
require(
"tcouple",
"tCoupleTemp",
1248 "Temperature for temperature coupling", &tCoupleTemp);
1251 opts.
optional(
"tCouple",
"tCoupleFile",
"PDB file with temperature "
1252 "coupling terms (B(i)) (default is the PDB input file)",
1254 opts.
optional(
"tCouple",
"tCoupleCol",
"Column in the tCoupleFile "
1255 "containing the temperature coupling term B(i);\n"
1259 "Should stochastic velocity rescaling be performed?",
1260 &stochRescaleOn,
FALSE);
1261 opts.
require(
"stochRescale",
"stochRescaleTemp",
1262 "Temperature for stochastic velocity rescaling",
1266 opts.
require(
"stochRescale",
"stochRescalePeriod",
1267 "Time scale for stochastic velocity rescaling (ps)",
1268 &stochRescalePeriod);
1270 opts.
optional(
"stochRescale",
"stochRescaleFreq",
1271 "Number of steps between stochastic rescalings",
1274 opts.
optionalB(
"stochRescale",
"stochRescaleHeat",
1275 "Should heat transfer and work be computed?", &stochRescaleHeat,
FALSE);
1277 opts.
optional(
"main",
"rescaleFreq",
"Number of steps between "
1278 "velocity rescaling", &rescaleFreq);
1280 opts.
optional(
"main",
"rescaleTemp",
"Target temperature for velocity rescaling",
1285 opts.
optional(
"main",
"reassignFreq",
"Number of steps between "
1286 "velocity reassignment", &reassignFreq);
1288 opts.
optional(
"main",
"reassignTemp",
"Target temperature for velocity reassignment",
1292 opts.
optional(
"main",
"reassignIncr",
"Temperature increment for velocity reassignment",
1295 opts.
optional(
"main",
"reassignHold",
"Final holding temperature for velocity reassignment",
1301 opts.
optionalB(
"main",
"useGroupPressure",
1302 "Use group rather than atomic quantities for pressure control?",
1303 &useGroupPressure,
FALSE);
1306 opts.
optionalB(
"main",
"useFlexibleCell",
1307 "Use anisotropic cell fluctuation for pressure control?",
1308 &useFlexibleCell,
FALSE);
1312 "Fix some cell dimensions?",
1313 &fixCellDims,
FALSE);
1315 opts.
optionalB(
"fixCellDims",
"fixCellDimX",
1316 "Fix the X dimension?",
1317 &fixCellDimX,
FALSE);
1318 opts.
optionalB(
"fixCellDims",
"fixCellDimY",
1319 "Fix the Y dimension?",
1320 &fixCellDimY,
FALSE);
1321 opts.
optionalB(
"fixCellDims",
"fixCellDimZ",
1322 "Fix the Z dimension?",
1323 &fixCellDimZ,
FALSE);
1326 opts.
optionalB(
"main",
"useConstantRatio",
1327 "Use constant X-Y ratio for pressure control?",
1328 &useConstantRatio,
FALSE);
1331 opts.
optionalB(
"main",
"useConstantArea",
1332 "Use constant area for pressure control?",
1333 &useConstantArea,
FALSE);
1336 opts.
optionalB(
"main",
"excludeFromPressure",
1337 "Should some atoms be excluded from pressure rescaling?",
1338 &excludeFromPressure,
FALSE);
1339 opts.
optional(
"excludeFromPressure",
"excludeFromPressureFile",
1340 "PDB file for atoms to be excluded from pressure",
1342 opts.
optional(
"excludeFromPressure",
"excludeFromPressureCol",
1343 "Column in the excludeFromPressureFile"
1344 "containing the flags (nonzero means excluded);\n"
1348 opts.
optionalB(
"main",
"BerendsenPressure",
1349 "Should Berendsen pressure bath coupling be performed?",
1350 &berendsenPressureOn,
FALSE);
1351 opts.
require(
"BerendsenPressure",
"BerendsenPressureTarget",
1352 "Target pressure for pressure coupling",
1353 &berendsenPressureTarget);
1355 opts.
require(
"BerendsenPressure",
"BerendsenPressureCompressibility",
1356 "Isothermal compressibility for pressure coupling",
1357 &berendsenPressureCompressibility);
1359 opts.
require(
"BerendsenPressure",
"BerendsenPressureRelaxationTime",
1360 "Relaxation time for pressure coupling",
1361 &berendsenPressureRelaxationTime);
1363 opts.
units(
"BerendsenPressureRelaxationTime",
N_FSEC);
1364 opts.
optional(
"BerendsenPressure",
"BerendsenPressureFreq",
1365 "Number of steps between volume rescaling",
1366 &berendsenPressureFreq, 1);
1370 opts.
optionalB(
"main",
"LangevinPiston",
1371 "Should Langevin piston pressure control be used?",
1372 &langevinPistonOn,
FALSE);
1373 opts.
optionalB(
"LangevinPiston",
"LangevinPistonBarrier",
1374 "Should Langevin piston barrier be used?",
1375 &langevinPistonBarrier,
TRUE);
1376 opts.
require(
"LangevinPiston",
"LangevinPistonTarget",
1377 "Target pressure for pressure control",
1378 &langevinPistonTarget);
1379 opts.
require(
"LangevinPiston",
"LangevinPistonPeriod",
1380 "Oscillation period for pressure control",
1381 &langevinPistonPeriod);
1384 opts.
require(
"LangevinPiston",
"LangevinPistonDecay",
1385 "Decay time for pressure control",
1386 &langevinPistonDecay);
1389 opts.
require(
"LangevinPiston",
"LangevinPistonTemp",
1390 "Temperature for pressure control piston",
1391 &langevinPistonTemp);
1394 opts.
optional(
"LangevinPiston",
"StrainRate",
1395 "Initial strain rate for pressure control (x y z)",
1400 "Should multigrator temperature and/or pressure control be used?",
1401 &multigratorOn,
FALSE);
1402 opts.
require(
"Multigrator",
"MultigratorPressureTarget",
1403 "Target pressure for pressure coupling",
1404 &multigratorPressureTarget);
1405 opts.
require(
"Multigrator",
"MultigratorTemperatureTarget",
1406 "Target temperature for temperature coupling",
1407 &multigratorTemperatureTarget);
1408 opts.
require(
"Multigrator",
"MultigratorPressureFreq",
1409 "Number of steps between pressure control moves",
1410 &multigratorPressureFreq);
1412 opts.
optional(
"Multigrator",
"MultigratorPressureRelaxationTime",
1413 "Relaxation time for pressure coupling is fs",
1414 &multigratorPressureRelaxationTime, 30000);
1416 opts.
units(
"MultigratorPressureRelaxationTime",
N_FSEC);
1417 opts.
optional(
"Multigrator",
"MultigratorTemperatureRelaxationTime",
1418 "Relaxation time for temperature coupling is fs",
1419 &multigratorTemperatureRelaxationTime, 1000);
1420 opts.
range(
"MultigratorTemperatureRelaxationTime",
POSITIVE);
1421 opts.
units(
"MultigratorTemperatureRelaxationTime",
N_FSEC);
1422 opts.
require(
"Multigrator",
"MultigratorTemperatureFreq",
1423 "Number of steps between temperature control moves",
1424 &multigratorTemperatureFreq);
1426 opts.
optional(
"Multigrator",
"MultigratorNoseHooverChainLength",
1427 "Nose-Hoover chain length",
1428 &multigratorNoseHooverChainLength, 4);
1432 opts.
optional(
"main",
"SurfaceTensionTarget",
1433 "Surface tension in the x-y plane",
1434 &surfaceTensionTarget, 0);
1437 opts.
optionalB(
"main",
"pressureprofile",
"Compute pressure profile?",
1438 &pressureProfileOn,
FALSE);
1439 opts.
require(
"pressureprofile",
"pressureprofileslabs",
1440 "Number of pressure profile slabs", &pressureProfileSlabs, 10);
1441 opts.
optional(
"pressureprofile",
"pressureprofilefreq",
1442 "How often to store profile data", &pressureProfileFreq, 1);
1443 opts.
optional(
"pressureprofile",
"pressureProfileAtomTypes",
1444 "Number of pressure profile atom types", &pressureProfileAtomTypes, 1);
1446 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesFile",
1447 "PDB files with pressure profile atom types" "default is the input PDB file",
1449 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesCol",
1450 "Column in the pressureProfileAtomTypesFile with the atom types ",
1452 opts.
optionalB(
"pressureProfile",
"pressureProfileEwald",
1453 "Compute Ewald contribution to pressure profile",
1454 &pressureProfileEwaldOn,
FALSE);
1455 opts.
optional(
"pressureProfile",
"pressureProfileEwaldX",
1456 "Ewald grid size X", &pressureProfileEwaldX, 10);
1458 opts.
optional(
"pressureProfile",
"pressureProfileEwaldY",
1459 "Ewald grid size Y", &pressureProfileEwaldY, 10);
1461 opts.
optional(
"pressureProfile",
"pressureProfileEwaldZ",
1462 "Ewald grid size Z", &pressureProfileEwaldZ, 10);
1466 opts.
optionalB(
"main",
"accelMD",
"Perform acclerated MD?", &accelMDOn,
FALSE);
1467 opts.
optional(
"accelMD",
"accelMDFirstStep",
"First accelMD step", &accelMDFirstStep, 0);
1469 opts.
optional(
"accelMD",
"accelMDLastStep",
"Last accelMD step", &accelMDLastStep, 0);
1471 opts.
optional(
"accelMD",
"accelMDOutFreq",
"Frequency of accelMD output", &accelMDOutFreq, 1);
1473 opts.
optionalB(
"accelMD",
"accelMDdihe",
"Apply boost to dihedral potential", &accelMDdihe,
TRUE);
1474 opts.
optionalB(
"accelMD",
"accelMDDebugOn",
"Debugging accelMD", &accelMDDebugOn,
FALSE);
1475 opts.
optional(
"accelMD",
"accelMDE",
"E for AMD", &accelMDE);
1477 opts.
optional(
"accelMD",
"accelMDalpha",
"alpha for AMD", &accelMDalpha);
1480 opts.
optionalB(
"accelMD",
"accelMDdual",
"Apply dual boost", &accelMDdual,
FALSE);
1481 opts.
optional(
"accelMDdual",
"accelMDTE",
"E for total potential under accelMDdual mode", &accelMDTE);
1483 opts.
optional(
"accelMDdual",
"accelMDTalpha",
"alpha for total potential under accelMDdual mode", &accelMDTalpha);
1487 opts.
optionalB(
"accelMD",
"accelMDG",
"Perform Gaussian accelMD calculation?", &accelMDG,
FALSE);
1488 opts.
optional(
"accelMDG",
"accelMDGiE",
"Flag to set the mode iE in Gaussian accelMD", &accelMDGiE, 1);
1489 opts.
optional(
"accelMDG",
"accelMDGcMDSteps",
"Number of cMD steps", &accelMDGcMDSteps, 1000000);
1491 opts.
optional(
"accelMDG",
"accelMDGEquiSteps",
"Number of equilibration steps after adding boost potential", &accelMDGEquiSteps, 1000000);
1493 opts.
require(
"accelMDG",
"accelMDGcMDPrepSteps",
"Number of preparation cMD steps", &accelMDGcMDPrepSteps, 200000);
1495 opts.
require(
"accelMDG",
"accelMDGEquiPrepSteps",
"Number of preparation equilibration steps", &accelMDGEquiPrepSteps, 200000);
1497 opts.
optional(
"accelMDG",
"accelMDGStatWindow",
"Number of steps to calculate avg and std", &accelMDGStatWindow, -1);
1498 opts.
optional(
"accelMDG",
"accelMDGSigma0P",
"Upper limit of std of total potential", &accelMDGSigma0P, 6.0);
1501 opts.
optional(
"accelMDG",
"accelMDGSigma0D",
"Upper limit of std of dihedral potential", &accelMDGSigma0D, 6.0);
1504 opts.
optionalB(
"accelMDG",
"accelMDGRestart",
"Flag to set use restart file in Gaussian accelMD", &accelMDGRestart,
FALSE);
1505 opts.
require(
"accelMDGRestart",
"accelMDGRestartFile",
"Restart file name for Gaussian accelMD", accelMDGRestartFile);
1506 opts.
optionalB(
"accelMDG",
"accelMDGresetVaftercmd",
"Flag to reset potential after accelMDGcMDSteps steps",
1507 &accelMDGresetVaftercmd,
FALSE);
1510 opts.
optionalB(
"main",
"adaptTempMD",
"Perform adaptive temperature sampling", &adaptTempOn,
FALSE);
1511 opts.
optional(
"adaptTempMD",
"adaptTempFirstStep",
"First adaptTemp step", &adaptTempFirstStep, 0);
1513 opts.
optional(
"adaptTempMD",
"adaptTempLastStep",
"Last adaptTemp step", &adaptTempLastStep, 0);
1515 opts.
optional(
"adaptTempMD",
"adaptTempOutFreq",
"Frequency of adaptTemp output", &adaptTempOutFreq, 10);
1517 opts.
optional(
"adaptTempMD",
"adaptTempFreq",
"Frequency of writing average energies to adaptTempOutFile", &adaptTempFreq, 10);
1519 opts.
optionalB(
"adaptTempMD",
"adaptTempDebug",
"Print debug output for adaptTemp", &adaptTempDebug,
FALSE);
1520 opts.
optional(
"adaptTempMD",
"adaptTempTmin",
"Minimun temperature for adaptTemp", &adaptTempTmin);
1523 opts.
optional(
"adaptTempMD",
"adaptTempTmax",
"Maximum temperature for adaptTemp", &adaptTempTmax);
1526 opts.
optional(
"adaptTempMD",
"adaptTempBins",
"Number of bins to store average energies", &adaptTempBins,0);
1528 opts.
optional(
"adaptTempMD",
"adaptTempDt",
"Integration timestep for Temp. updates", &adaptTempDt, 0.0001);
1531 opts.
optional(
"adaptTempMD",
"adaptTempAutoDt",
"Average temperature update in percent of temperature range", &adaptTempAutoDt, 0.0);
1533 opts.
optional(
"adaptTempMD",
"adaptTempCgamma",
"Adaptive bin averaging constant", &adaptTempCgamma, 0.1);
1535 opts.
optionalB(
"adaptTempMD",
"adaptTempLangevin",
"Send adaptTemp temperature to langevin thermostat",&adaptTempLangevin,
TRUE);
1536 opts.
optionalB(
"adaptTempMD",
"adaptTempRescaling",
"Send adaptTemp temperature to velocity rescaling thermostat", &adaptTempRescale,
TRUE);
1537 opts.
optional(
"adaptTempMD",
"adaptTempInFile",
"File containing restart information for adaptTemp", adaptTempInFile);
1538 opts.
optional(
"adaptTempMD",
"adaptTempRestartFile",
"File for writing adaptTemp restart information", adaptTempRestartFile);
1539 opts.
require(
"adaptTempRestartFile",
"adaptTempRestartFreq",
"Frequency of writing restart file", &adaptTempRestartFreq,0);
1541 opts.
optionalB(
"adaptTempMD",
"adaptTempRandom",
"Randomly assign a temperature if we step out of range", &adaptTempRandom,
FALSE);
1544 void SimParameters::config_parser_constraints(
ParseOptions &opts) {
1547 opts.
optionalB(
"main",
"fixedatoms",
"Are there fixed atoms?",
1548 &fixedAtomsOn,
FALSE);
1549 opts.
optionalB(
"fixedatoms",
"fixedAtomsForces",
1550 "Calculate forces between fixed atoms? (Required to unfix during run.)",
1551 &fixedAtomsForces,
FALSE);
1552 opts.
optional(
"fixedatoms",
"fixedAtomsFile",
"PDB file with flags for "
1553 "fixed atoms (default is the PDB input file)",
1555 opts.
optional(
"fixedatoms",
"fixedAtomsCol",
"Column in the fixedAtomsFile "
1556 "containing the flags (nonzero means fixed);\n"
1558 opts.
optional(
"fixedatoms",
"fixedAtomListFile",
"the text input file for fixed atoms "
1560 opts.
optionalB(
"fixedatoms",
"fixedAtomsForceOutput",
1561 "Do we write out forces acting on fixed atoms?",
1562 &fixedAtomsForceOutput,
FALSE);
1565 opts.
optionalB(
"main",
"constraints",
"Are harmonic constraints active?",
1566 &constraintsOn,
FALSE);
1567 opts.
require(
"constraints",
"consexp",
"Exponent for harmonic potential",
1570 #ifndef MEM_OPT_VERSION
1571 opts.
require(
"constraints",
"consref",
"PDB file containing reference "
1574 opts.
require(
"constraints",
"conskfile",
"PDB file containing force "
1576 opts.
require(
"constraints",
"conskcol",
"Column of conskfile to use "
1579 opts.
require(
"constraints",
"consAtomListFile",
"the text input file for constrained atoms "
1582 opts.
require(
"constraints",
"constraintScaling",
"constraint scaling factor",
1583 &constraintScaling, 1.0);
1591 opts.
optionalB(
"constraints",
"selectConstraints",
1592 "Restrain only selected Cartesian components of the coordinates?",
1593 &selectConstraintsOn,
FALSE);
1594 opts.
optionalB(
"selectConstraints",
"selectConstrX",
1595 "Restrain X components of coordinates ", &constrXOn,
FALSE);
1596 opts.
optionalB(
"selectConstraints",
"selectConstrY",
1597 "Restrain Y components of coordinates ", &constrYOn,
FALSE);
1598 opts.
optionalB(
"selectConstraints",
"selectConstrZ",
1599 "Restrain Z components of coordinates ", &constrZOn,
FALSE);
1603 opts.
optionalB(
"constraints",
"sphericalConstraints",
1604 "Restrain only radial spherical component of the coordinates?",
1605 &sphericalConstraintsOn,
FALSE);
1606 opts.
optional(
"sphericalConstraints",
"sphericalConstrCenter",
1607 "Center of spherical constraints", &sphericalConstrCenter);
1612 opts.
optionalB(
"constraints",
"movingConstraints",
1613 "Are some of the constraints moving?",
1614 &movingConstraintsOn,
FALSE);
1615 opts.
require(
"movingConstraints",
"movingConsVel",
1616 "Velocity of the movement, A/timestep", &movingConsVel);
1620 opts.
optionalB(
"constraints",
"rotConstraints",
1621 "Are the constraints rotating?",
1622 &rotConstraintsOn,
FALSE);
1623 opts.
require(
"rotConstraints",
"rotConsAxis",
1624 "Axis of rotation", &rotConsAxis);
1625 opts.
require(
"rotConstraints",
"rotConsPivot",
1626 "Pivot point of rotation",
1628 opts.
require(
"rotConstraints",
"rotConsVel",
1629 "Velocity of rotation, deg/timestep", &rotConsVel);
1634 opts.
optionalB(
"main",
"extForces",
"External command forces?",
1635 &extForcesOn,
FALSE);
1636 opts.
require(
"extForces",
"extForcesCommand",
1637 "External forces command", extForcesCommand);
1638 opts.
require(
"extForces",
"extCoordFilename",
1639 "External forces coordinate filename", extCoordFilename);
1640 opts.
require(
"extForces",
"extForceFilename",
1641 "External forces force filename", extForceFilename);
1645 opts.
optionalB(
"main",
"QMForces",
"Apply QM forces?",
1646 &qmForcesOn,
FALSE);
1647 opts.
require(
"QMForces",
"QMSoftware",
1648 "software whose format will be used for input/output", qmSoftware);
1649 opts.
require(
"QMForces",
"QMExecPath",
1650 "path to executable", qmExecPath);
1651 opts.
optional(
"QMForces",
"QMChargeMode",
1652 "type of QM atom charges gathered from the QM software", qmChrgModeS);
1653 opts.
require(
"QMForces",
"QMColumn",
1654 "column defining QM and MM regions", qmColumn);
1655 opts.
require(
"QMForces",
"QMBaseDir",
1656 "base path and name for QM input and output (preferably in memory)", qmBaseDir);
1657 opts.
optional(
"QMForces",
"QMConfigLine",
1658 "Configuration line for QM (multiple inputs allowed)",
PARSE_MULTIPLES);
1659 opts.
optional(
"QMForces",
"QMParamPDB",
1660 "PDB with QM parameters", qmParamPDB);
1661 opts.
optional(
"QMForces",
"QMPrepProc",
1662 "initial preparation executable", qmPrepProc);
1663 opts.
optional(
"QMForces",
"QMSecProc",
1664 "secondary executable", qmSecProc);
1665 opts.
optional(
"QMForces",
"QMCharge",
1667 opts.
optionalB(
"QMForces",
"QMChargeFromPSF",
1668 "gets charge of the QM group form PSF values", &qmChrgFromPSF,
FALSE);
1669 opts.
optional(
"QMForces",
"QMMult",
1671 opts.
optional(
"QMForces",
"QMLinkElement",
1673 opts.
optionalB(
"QMForces",
"QMReplaceAll",
1674 "replace all NAMD forces with QM forces", &qmReplaceAll,
FALSE);
1675 opts.
optional(
"QMForces",
"QMPCStride",
1676 "frequency of selection of point charges", &qmPCSelFreq, 1);
1678 opts.
optionalB(
"QMForces",
"QMNoPntChrg",
1679 "no point charges will be passed to the QM system(s)", &qmNoPC,
FALSE);
1680 opts.
optionalB(
"QMForces",
"QMElecEmbed",
1681 "activates electrostatic embedding", &qmElecEmbed,
TRUE);
1682 opts.
optionalB(
"QMForces",
"QMVdWParams",
1683 "use special VdW parameters for QM atoms", &qmVDW,
FALSE);
1684 opts.
optional(
"QMForces",
"QMBondColumn",
1685 "column defining QM-MM bomnds", qmBondColumn);
1686 opts.
optionalB(
"QMForces",
"QMBondDist",
1687 "values in QMBondColumn defines the distance of new link atom", &qmBondDist,
FALSE);
1688 opts.
optional(
"QMForces",
"QMBondValueType",
1689 "type of value in bond column: len or ratio", qmBondValueTypeS);
1690 opts.
optional(
"QMForces",
"QMBondScheme",
1691 "type of treatment given to QM-MM bonds.", qmBondSchemeS);
1692 opts.
optional(
"QMForces",
"QMenergyStride",
1693 "frequency of QM specific energy output (every x steps)", &qmEnergyOutFreq, 1);
1694 opts.
optional(
"QMForces",
"QMOutStride",
1695 "frequency of QM specific charge output (every x steps)", &qmOutFreq, 0);
1697 opts.
optional(
"QMForces",
"QMPositionOutStride",
1698 "frequency of QM specific position output (every x steps)", &qmPosOutFreq, 0);
1700 opts.
optional(
"QMForces",
"QMSimsPerNode",
1701 "QM executions per node", &qmSimsPerNode, 1);
1703 opts.
optionalB(
"QMForces",
"QMSwitching",
1704 "apply switching to point charges.", &qmPCSwitchOn,
FALSE);
1705 opts.
optional(
"QMForces",
"QMSwitchingType",
1706 "How are charges scaled down to be presented to QM groups.", qmPCSwitchTypeS);
1707 opts.
optional(
"QMForces",
"QMPointChargeScheme",
1708 "type of treatment given to the total sum of point charges.", qmPCSchemeS);
1709 opts.
optionalB(
"QMForces",
"QMCustomPCSelection",
1710 "custom and fixed selection of point charges per QM group.", &qmCustomPCSel,
FALSE);
1711 opts.
optional(
"QMForces",
"QMCustomPCFile",
1712 "file with a selection of point charges for a single QM group",
PARSE_MULTIPLES);
1713 opts.
optionalB(
"QMForces",
"QMLiveSolventSel",
1714 "Continuously update the selection of solvent molecules in QM groups", &qmLSSOn,
FALSE);
1715 opts.
optional(
"QMForces",
"QMLSSFreq",
1716 "frequency of QM water selection update", &qmLSSFreq, 100);
1718 opts.
optional(
"QMForces",
"QMLSSResname",
1719 "residue name for the solvent molecules (TIP3).", qmLSSResname);
1720 opts.
optional(
"QMForces",
"QMLSSMode",
1721 "mode of selection of point solvent molecules", qmLSSModeS);
1722 opts.
optional(
"QMForces",
"QMLSSRef",
1723 "for COM mode, defines reference for COM distance calculation",
PARSE_MULTIPLES);
1725 "Do we use Conditional SMD option?", &qmCSMD,
FALSE);
1726 opts.
optional(
"QMForces",
"QMCSMDFile",
1727 "File for Conditional SMD information",qmCSMDFile);
1730 opts.
optionalB(
"main",
"printBadContacts",
"Print atoms with huge forces?",
1731 &printBadContacts,
FALSE);
1735 opts.
optionalB(
"main",
"GBIS",
"Use GB implicit solvent?",
1737 opts.
optionalB(
"main",
"GBISSer",
"Use GB implicit solvent?",
1740 opts.
optional(
"GBIS",
"solventDielectric",
1741 "Solvent Dielectric", &solvent_dielectric, 78.5);
1742 opts.
optional(
"GBIS",
"intrinsicRadiusOffset",
1743 "Coulomb Radius Offset", &coulomb_radius_offset, 0.09);
1744 opts.
optional(
"GBIS",
"ionConcentration",
1745 "Ion Concentration", &ion_concentration, 0.2);
1747 "delta from GBOBC", &gbis_delta, 1.0);
1749 "beta from GBOBC", &gbis_beta, 0.8);
1751 "gamma from GBOBC", &gbis_gamma, 4.85);
1752 opts.
optional(
"GBIS",
"alphaCutoff",
1753 "cutoff for calculating effective born radius", &alpha_cutoff, 15);
1755 "maximum allowable born radius", &alpha_max, 30);
1757 "maximum screened intrinsic radius", &fsMax, 1.728);
1759 opts.
optionalB(
"main",
"SASA",
"Use Linear Combination of Pairwise Overlaps (LCPO) for calculating SASA",
1761 opts.
optional(
"SASA",
"surfaceTension",
1762 "Surfce Tension for SASA (kcal/mol/Ang^2)", &surface_tension, 0.005);
1768 "Do we use SMD option?",
1771 "Velocity of the movement, A/timestep", &SMDVel);
1774 "Direction of movement", &SMDDir);
1776 "Elastic constant for SMD", &SMDk);
1778 "Transverse elastic constant for SMD", &SMDk2, 0);
1781 opts.
require(
"SMD",
"SMDFile",
1782 "File for SMD information",
1784 opts.
optional(
"SMD",
"SMDOutputFreq",
1785 "Frequency of output",
1792 opts.
optionalB(
"main",
"tabulatedEnergies",
"Do we get energies from a table?", &tabulatedEnergies,
FALSE);
1794 opts.
require(
"tabulatedEnergies",
"tabulatedEnergiesFile",
"File containing energy table", tabulatedEnergiesFile);
1795 opts.
require(
"tabulatedEnergies",
"tableInterpType",
"Cubic or linear interpolation", tableInterpType);
1798 opts.
optionalB(
"main",
"TMD",
"Perform Targeted MD?", &TMDOn,
FALSE);
1799 opts.
optional(
"TMD",
"TMDk",
"Elastic constant for TMD", &TMDk, 0);
1801 opts.
require(
"TMD",
"TMDFile",
"File for TMD information", TMDFile);
1802 opts.
optionalB(
"TMD",
"TMDDiffRMSD",
"Restrain Difference between the RMSD from two structures", &TMDDiffRMSD,
FALSE);
1803 opts.
require(
"TMDDiffRMSD",
"TMDFile2",
"Second file for TMD information", TMDFile2);
1805 opts.
optional(
"TMD",
"TMDOutputFreq",
"Frequency of TMD output",
1808 opts.
require(
"TMD",
"TMDLastStep",
"Last TMD timestep", &TMDLastStep);
1810 opts.
optional(
"TMD",
"TMDFirstStep",
"First TMD step (default 0)", &TMDFirstStep, 0);
1811 opts.
optional(
"TMD",
"TMDInitialRMSD",
"Target RMSD at first TMD step (default -1 to use initial coordinates)", &TMDInitialRMSD);
1812 TMDInitialRMSD = -1;
1813 opts.
optional(
"TMD",
"TMDFinalRMSD",
"Target RMSD at last TMD step (default 0 )", &TMDFinalRMSD, 0);
1818 opts.
optionalB(
"main",
"symmetryRestraints",
"Enable symmetry restraints?", &symmetryOn,
FALSE);
1819 opts.
optional(
"symmetryRestraints",
"symmetryk",
"Elastic constant for symmetry restraints", &symmetryk, 0);
1821 opts.
optional(
"symmetryRestraints",
"symmetrykfile",
"PDB file specifying force contants on a per-atom basis",
PARSE_MULTIPLES);
1822 opts.
optionalB(
"symmetryRestraints",
"symmetryScaleForces",
"Scale applied forces over time?", &symmetryScaleForces,
FALSE);
1824 opts.
optional(
"symmetryRestraints",
"symmetryMatrixFile",
"File(s) for transfromation matrices",
PARSE_MULTIPLES);
1825 opts.
optional(
"symmetryRestraints",
"symmetryLastStep",
"Last symmetry timestep", &symmetryLastStep, -1);
1826 opts.
optional(
"symmetryRestraints",
"symmetryFirstStep",
"First symmetry step (default 0)", &symmetryFirstStep, 0);
1827 opts.
optional(
"symmetryRestraints",
"symmetryLastFullStep",
"Last full force symmetry timestep (default symmetryLastStep)", &symmetryLastFullStep, symmetryLastStep);
1828 opts.
optional(
"symmetryRestraints",
"symmetryFirstFullStep",
"First full force symmetry step (default symmetryFirstStep)", &symmetryFirstFullStep, symmetryFirstStep);
1832 opts.
optionalB(
"main",
"tclForces",
"Are Tcl global forces active?",
1833 &tclForcesOn,
FALSE);
1834 opts.
require(
"tclForces",
"tclForcesScript",
1838 opts.
optionalB(
"main",
"tclBC",
"Are Tcl boundary forces active?",
1840 opts.
require(
"tclBC",
"tclBCScript",
1841 "Tcl script defining calcforces for boundary forces",
PARSE_STRING);
1843 opts.
optional(
"tclBC",
"tclBCArgs",
"Extra args for calcforces command",
1848 opts.
optionalB(
"main",
"miscForces",
"Are misc global forces active?",
1849 &miscForcesOn,
FALSE);
1850 opts.
optional(
"miscForces",
"miscForcesScript",
1854 opts.
optionalB(
"main",
"freeEnergy",
"Perform free energy perturbation?",
1855 &freeEnergyOn,
FALSE);
1856 opts.
require(
"freeEnergy",
"freeEnergyConfig",
1860 opts.
optionalB(
"main",
"constantforce",
"Apply constant force?",
1861 &consForceOn,
FALSE);
1862 opts.
optional(
"constantforce",
"consForceFile",
1863 "Configuration file for constant forces",
PARSE_STRING);
1864 opts.
require(
"constantforce",
"consForceScaling",
1865 "Scaling factor for constant forces", &consForceScaling, 1.0);
1868 opts.
optionalB(
"main",
"colvars",
"Is the colvars module enabled?",
1870 opts.
optional(
"colvars",
"colvarsConfig",
1871 "configuration for the collective variables",
PARSE_STRING);
1872 opts.
optional(
"colvars",
"colvarsInput",
1873 "input restart file for the collective variables",
PARSE_STRING);
1877 #ifdef OPENATOM_VERSION
1878 void SimParameters::config_parser_openatom(
ParseOptions &opts) {
1879 opts.
optionalB(
"main",
"openatom",
"OpenAtom active?", &openatomOn,
FALSE);
1880 opts.
require(
"openatom",
"openatomDriverFile",
"What config file specifies openatom input parameters",
PARSE_STRING);
1881 opts.
require(
"openatom",
"openatomPhysicsFile",
"What structure file specifies openatom input system",
PARSE_STRING);
1882 opts.
require(
"openatom",
"openatomPdbFile",
"NAMD input file defining QM and MM regions",
PARSE_STRING);
1883 opts.
optional(
"openatom",
"openatomCol",
"Column in the openatomPdb with the QM/MM flag",
PARSE_STRING);
1885 #endif // OPENATOM_VERSION
1888 void SimParameters::config_parser_mgridforce(
ParseOptions &opts) {
1890 opts.
optionalB(
"main",
"mgridforce",
"Is Multiple gridforce active?",
1891 &mgridforceOn,
FALSE);
1892 opts.
optional(
"mgridforce",
"mgridforcevolts",
"Is Gridforce using Volts/eV as units?",
1894 opts.
require(
"mgridforce",
"mgridforcescale",
"Scale factor by which to multiply "
1896 opts.
require(
"mgridforce",
"mgridforcefile",
"PDB file containing force "
1898 opts.
require(
"mgridforce",
"mgridforcecol",
"Column of gridforcefile to "
1900 opts.
optional(
"mgridforce",
"mgridforcechargecol",
"Column of gridforcefile to "
1902 opts.
require(
"mgridforce",
"mgridforcepotfile",
"Gridforce potential file",
1904 opts.
optional(
"mgridforce",
"mgridforcecont1",
"Use continuous grid "
1906 opts.
optional(
"mgridforce",
"mgridforcecont2",
"Use continuous grid "
1908 opts.
optional(
"mgridforce",
"mgridforcecont3",
"Use continuous grid "
1910 opts.
optional(
"mgridforce",
"mgridforcevoff",
"Gridforce potential offsets",
1912 opts.
optional(
"mgridforce",
"mgridforcelite",
"Use Gridforce Lite?",
1914 opts.
optional(
"mgridforce",
"mgridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
PARSE_MULTIPLES);
1917 void SimParameters::config_parser_gridforce(
ParseOptions &opts) {
1919 opts.
optionalB(
"main",
"gridforce",
"Is Gridforce active?",
1920 &gridforceOn,
FALSE);
1921 opts.
optionalB(
"gridforce",
"gridforcevolts",
"Is Gridforce using Volts/eV as units?",
1922 &gridforceVolts,
FALSE);
1923 opts.
require(
"gridforce",
"gridforcescale",
"Scale factor by which to multiply "
1924 "grid forces", &gridforceScale);
1925 opts.
require(
"gridforce",
"gridforcefile",
"PDB file containing force "
1927 opts.
require(
"gridforce",
"gridforcecol",
"Column of gridforcefile to "
1929 opts.
optional(
"gridforce",
"gridforcechargecol",
"Column of gridforcefile to "
1931 opts.
require(
"gridforce",
"gridforcepotfile",
"Gridforce potential file",
1933 opts.
optionalB(
"gridforce",
"gridforcecont1",
"Use continuous grid "
1934 "in A1 direction?", &gridforceContA1,
FALSE);
1935 opts.
optionalB(
"gridforce",
"gridforcecont2",
"Use continuous grid "
1936 "in A2 direction?", &gridforceContA2,
FALSE);
1937 opts.
optionalB(
"gridforce",
"gridforcecont3",
"Use continuous grid "
1938 "in A3 direction?", &gridforceContA3,
FALSE);
1939 opts.
optional(
"gridforce",
"gridforcevoff",
"Gridforce potential offsets",
1941 opts.
optionalB(
"gridforce",
"gridforcelite",
"Use Gridforce Lite?",
1942 &gridforceLite,
FALSE);
1943 opts.
optionalB(
"gridforce",
"gridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
1944 &gridforcechecksize,
TRUE);
1948 void SimParameters::config_parser_movdrag(
ParseOptions &opts) {
1950 opts.
optionalB(
"main",
"movDragOn",
"Do we apply moving drag?",
1952 opts.
require(
"movDragOn",
"movDragFile",
1953 "Main moving drag PDB file", movDragFile);
1954 opts.
require(
"movDragOn",
"movDragCol",
1956 opts.
require(
"movDragOn",
"movDragGlobVel",
1957 "Global moving drag velocity (A/step)", &movDragGlobVel);
1958 opts.
require(
"movDragOn",
"movDragVelFile",
1959 "Moving drag linear velocity file", movDragVelFile);
1962 void SimParameters::config_parser_rotdrag(
ParseOptions &opts) {
1964 opts.
optionalB(
"main",
"rotDragOn",
"Do we apply rotating drag?",
1966 opts.
require(
"rotDragOn",
"rotDragFile",
1967 "Main rotating drag PDB file", rotDragFile);
1968 opts.
require(
"rotDragOn",
"rotDragCol",
1970 opts.
require(
"rotDragOn",
"rotDragAxisFile",
1971 "Rotating drag axis file", rotDragAxisFile);
1972 opts.
require(
"rotDragOn",
"rotDragPivotFile",
1973 "Rotating drag pivot point file", rotDragPivotFile);
1974 opts.
require(
"rotDragOn",
"rotDragGlobVel",
1975 "Global rotating drag angular velocity (deg/step)", &rotDragGlobVel);
1976 opts.
require(
"rotDragOn",
"rotDragVelFile",
1977 "Rotating drag angular velocity file", rotDragVelFile);
1978 opts.
require(
"rotDragOn",
"rotDragVelCol",
1979 "Rotating drag angular velocity column",
PARSE_STRING);
1982 void SimParameters::config_parser_constorque(
ParseOptions &opts) {
1984 opts.
optionalB(
"main",
"consTorqueOn",
"Do we apply \"constant\" torque?",
1985 &consTorqueOn,
FALSE);
1986 opts.
require(
"consTorqueOn",
"consTorqueFile",
1987 "Main \"constant\" torque PDB file", consTorqueFile);
1988 opts.
require(
"consTorqueOn",
"consTorqueCol",
1990 opts.
require(
"consTorqueOn",
"consTorqueAxisFile",
1991 "\"Constant\" torque axis file", consTorqueAxisFile);
1992 opts.
require(
"consTorqueOn",
"consTorquePivotFile",
1993 "\"Constant\" torque pivot point file", consTorquePivotFile);
1994 opts.
require(
"consTorqueOn",
"consTorqueGlobVal",
1995 "Global \"constant\" torque value (Kcal/(mol*A^2))", &consTorqueGlobVal);
1996 opts.
require(
"consTorqueOn",
"consTorqueValFile",
1997 "\"constant\" torque factors file", consTorqueValFile);
1998 opts.
require(
"consTorqueOn",
"consTorqueValCol",
2002 void SimParameters::config_parser_boundary(
ParseOptions &opts) {
2005 opts.
optionalB(
"main",
"sphericalBC",
"Are spherical boundary counditions "
2006 "active?", &sphericalBCOn,
FALSE);
2007 opts.
require(
"sphericalBC",
"sphericalBCCenter",
2008 "Center of spherical boundaries", &sphericalCenter);
2009 opts.
require(
"sphericalBC",
"sphericalBCr1",
"Radius for first sphere "
2010 "potential", &sphericalBCr1);
2013 opts.
require(
"sphericalBC",
"sphericalBCk1",
"Force constant for first "
2014 "sphere potential (+ is an inward force, - outward)",
2017 opts.
optional(
"sphericalBC",
"sphericalBCexp1",
"Exponent for first "
2018 "sphere potential", &sphericalBCexp1, 2);
2021 opts.
optional(
"sphericalBCr1",
"sphericalBCr2",
"Radius for second sphere "
2022 "potential", &sphericalBCr2);
2025 opts.
require(
"sphericalBCr2",
"sphericalBCk2",
"Force constant for second "
2026 "sphere potential (+ is an inward force, - outward)",
2029 opts.
optional(
"sphericalBCr2",
"sphericalBCexp2",
"Exponent for second "
2030 "sphere potential", &sphericalBCexp2, 2);
2034 opts.
optionalB(
"main",
"cylindricalBC",
"Are cylindrical boundary counditions "
2035 "active?", &cylindricalBCOn,
FALSE);
2036 opts.
require(
"cylindricalBC",
"cylindricalBCr1",
"Radius for first cylinder "
2037 "potential", &cylindricalBCr1);
2040 opts.
require(
"cylindricalBC",
"cylindricalBCk1",
"Force constant for first "
2041 "cylinder potential (+ is an inward force, - outward)",
2044 opts.
optional(
"cylindricalBC",
"cylindricalBCexp1",
"Exponent for first "
2045 "cylinder potential", &cylindricalBCexp1, 2);
2050 opts.
optional(
"cylindricalBC",
"cylindricalBCAxis",
"Cylinder axis (defaults to x)",
2052 opts.
require(
"cylindricalBC",
"cylindricalBCCenter",
2053 "Center of cylindrical boundaries", &cylindricalCenter);
2054 opts.
require (
"cylindricalBC",
"cylindricalBCl1",
"Length of first cylinder",
2058 opts.
optional (
"cylindricalBCl1",
"cylindricalBCl2",
"Length of second cylinder",
2064 opts.
optional(
"cylindricalBCr1",
"cylindricalBCr2",
"Radius for second cylinder "
2065 "potential", &cylindricalBCr2);
2068 opts.
require(
"cylindricalBCr2",
"cylindricalBCk2",
"Force constant for second "
2069 "cylinder potential (+ is an inward force, - outward)",
2072 opts.
optional(
"cylindricalBCr2",
"cylindricalBCexp2",
"Exponent for second "
2073 "cylinder potential", &cylindricalBCexp2, 2);
2077 opts.
optionalB(
"main",
"eFieldOn",
"Should an electric field be applied",
2079 opts.
optionalB(
"eFieldOn",
"eFieldNormalized",
"Is eField vector scaled by cell basis vectors?",
2080 &eFieldNormalized,
FALSE);
2081 opts.
require(
"eFieldOn",
"eField",
"Electric field vector", &eField);
2082 opts.
optional(
"eFieldOn",
"eFieldFreq",
"Electric field frequency", &eFieldFreq);
2083 opts.
optional(
"eFieldOn",
"eFieldPhase",
"Electric field phase", &eFieldPhase);
2086 opts.
optionalB(
"main",
"stirOn",
"Should stirring torque be applied",
2088 opts.
optional(
"stirOn",
"stirFilename",
"PDB file with flags for "
2089 "stirred atoms (default is the PDB input file)",
2091 opts.
optional(
"stirOn",
"stirredAtomsCol",
"Column in the stirredAtomsFile "
2092 "containing the flags (nonzero means fixed);\n"
2094 opts.
require(
"stirOn",
"stirStartingTheta",
"Stir starting theta offset", &stirStartingTheta);
2095 opts.
require(
"stirOn",
"stirK",
"Stir force harmonic spring constant", &stirK);
2097 opts.
require(
"stirOn",
"stirVel",
"Stir angular velocity (deg/timestep)", &stirVel);
2098 opts.
require(
"stirOn",
"stirAxis",
"Stir axis (direction vector)", &stirAxis);
2099 opts.
require(
"stirOn",
"stirPivot",
"Stir pivot point (coordinate)", &stirPivot);
2103 "Should extra bonded forces be applied",
2104 &extraBondsOn,
FALSE);
2105 opts.
optional(
"extraBonds",
"extraBondsFile",
2106 "file with list of extra bonds",
2108 opts.
optionalB(
"extraBonds",
"extraBondsCosAngles",
2109 "Should extra angles be cosine-based to match ancient bug",
2110 &extraBondsCosAngles,
TRUE);
2114 void SimParameters::config_parser_misc(
ParseOptions &opts) {
2117 opts.
optional(
"main",
"ldBalancer",
"Load balancer",
2119 opts.
optional(
"main",
"ldbStrategy",
"Load balancing strategy",
2121 opts.
optional(
"main",
"ldbPeriod",
"steps between load balancing",
2124 opts.
optional(
"main",
"firstLdbStep",
"when to start load balancing",
2127 opts.
optional(
"main",
"lastLdbStep",
"when to stop load balancing",
2130 opts.
optional(
"main",
"hybridGroupSize",
"Hybrid load balancing group size",
2132 opts.
optional(
"main",
"ldbBackgroundScaling",
2133 "background load scaling", &ldbBackgroundScaling);
2135 opts.
optional(
"main",
"ldbPMEBackgroundScaling",
2136 "PME node background load scaling", &ldbPMEBackgroundScaling);
2138 opts.
optional(
"main",
"ldbHomeBackgroundScaling",
2139 "home node background load scaling", &ldbHomeBackgroundScaling);
2141 opts.
optional(
"main",
"ldbRelativeGrainsize",
2142 "fraction of average load per compute", &ldbRelativeGrainsize, 0.);
2145 opts.
optional(
"main",
"traceStartStep",
"when to start tracing", &traceStartStep);
2147 opts.
optional(
"main",
"numTraceSteps",
"the number of timesteps to be traced", &numTraceSteps);
2150 #ifdef MEASURE_NAMD_WITH_PAPI
2151 opts.
optionalB(
"main",
"papiMeasure",
"whether use PAPI to measure performacne", &papiMeasure,
FALSE);
2152 opts.
optional(
"main",
"papiMeasureStartStep",
"when to measure performacne using PAPI", &papiMeasureStartStep);
2154 opts.
optional(
"main",
"numPapiMeasureSteps",
"the number of timesteps to be measured using PAPI", &numPapiMeasureSteps);
2158 opts.
optionalB(
"main",
"outputMaps",
"whether to dump compute map and patch map for analysis just before load balancing", &outputMaps,
FALSE);
2159 opts.
optionalB(
"main",
"benchTimestep",
"whether to do benchmarking timestep in which case final file output is disabled", &benchTimestep,
FALSE);
2160 opts.
optional(
"main",
"useCkLoop",
"whether to use CkLoop library to parallelize a loop in a function like OpenMP", &useCkLoop,
2161 #
if CMK_SMP && USE_CKLOOP
2168 opts.
optionalB(
"main",
"simulateInitialMapping",
"whether to study the initial mapping scheme", &simulateInitialMapping,
FALSE);
2169 opts.
optional(
"main",
"simulatedPEs",
"the number of PEs to be used for studying initial mapping", &simulatedPEs);
2171 opts.
optional(
"main",
"simulatedNodeSize",
"the node size to be used for studying initial mapping", &simulatedNodeSize);
2173 opts.
optionalB(
"main",
"disableTopology",
"ignore torus information during patch placement", &disableTopology,
FALSE);
2174 opts.
optionalB(
"main",
"verboseTopology",
"print torus information during patch placement", &verboseTopology,
FALSE);
2176 opts.
optionalB(
"main",
"ldbUnloadPME",
"no load on PME nodes",
2177 &ldbUnloadPME,
FALSE);
2178 opts.
optionalB(
"main",
"ldbUnloadZero",
"no load on pe zero",
2179 &ldbUnloadZero,
FALSE);
2180 opts.
optionalB(
"main",
"ldbUnloadOne",
"no load on pe one",
2181 &ldbUnloadOne,
FALSE);
2182 opts.
optionalB(
"main",
"ldbUnloadOutputPEs",
"no load on output PEs",
2183 &ldbUnloadOutputPEs,
FALSE);
2184 opts.
optionalB(
"main",
"noPatchesOnZero",
"no patches on pe zero",
2185 &noPatchesOnZero,
FALSE);
2186 opts.
optionalB(
"main",
"noPatchesOnOutputPEs",
"no patches on Output PEs",
2187 &noPatchesOnOutputPEs,
FALSE);
2188 opts.
optionalB(
"main",
"noPatchesOnOne",
"no patches on pe one",
2189 &noPatchesOnOne,
FALSE);
2190 opts.
optionalB(
"main",
"useCompressedPsf",
"The structure file psf is in the compressed format",
2191 &useCompressedPsf,
FALSE);
2192 opts.
optionalB(
"main",
"genCompressedPsf",
"Generate the compressed version of the psf file",
2193 &genCompressedPsf,
FALSE);
2194 opts.
optionalB(
"main",
"usePluginIO",
"Use the plugin I/O to load the molecule system",
2195 &usePluginIO,
FALSE);
2196 opts.
optionalB(
"main",
"mallocTest",
"test how much memory all PEs can allocate",
2197 &mallocTest,
FALSE);
2198 opts.
optionalB(
"main",
"printExclusions",
"print exclusion lists to stdout",
2199 &printExclusions,
FALSE);
2200 opts.
optional(
"main",
"proxySendSpanningTree",
"using spanning tree to send proxies",
2201 &proxySendSpanningTree, -1);
2202 opts.
optional(
"main",
"proxyRecvSpanningTree",
"using spanning tree to receive proxies",
2203 &proxyRecvSpanningTree, 0);
2204 opts.
optional(
"main",
"proxyTreeBranchFactor",
"the branch factor when building a spanning tree",
2205 &proxyTreeBranchFactor, 0);
2206 opts.
optionalB(
"main",
"twoAwayX",
"half-size patches in 1st dimension",
2208 opts.
optionalB(
"main",
"twoAwayY",
"half-size patches in 2nd dimension",
2210 opts.
optionalB(
"main",
"twoAwayZ",
"half-size patches in 3rd dimension",
2212 opts.
optional(
"main",
"maxPatches",
"maximum patch count", &maxPatches, -1);
2215 opts.
optional(
"main",
"firsttimestep",
"Timestep to start simulation at",
2220 opts.
optionalB(
"main",
"test",
"Perform self-tests rather than simulation",
2222 opts.
optionalB(
"main",
"commOnly",
"Do not evaluate forces or integrate",
2225 opts.
optionalB(
"main",
"statsOn",
"counters in machine layer",
2228 opts.
optionalB(
"main",
"hbonds",
"Use explicit hydrogen bond term",
2229 &HydrogenBonds,
FALSE);
2230 opts.
optionalB(
"hbonds",
"hbAntecedents",
"Include Antecedent in hbond term",
2231 &useAntecedent,
TRUE);
2232 opts.
optional(
"hbonds",
"hbAAexp",
"Hbond AA-A-H angle cos exponential",
2234 opts.
optional(
"hbonds",
"hbHAexp",
"Hbond D-H-A angle cos exponential",
2236 opts.
optional(
"hbonds",
"hbDistAexp",
"Hbond A-D dist attractive exponential",
2238 opts.
optional(
"hbonds",
"hbDistRexp",
"Hbond A-D dist repulstive exponential",
2240 opts.
optional(
"hbonds",
"hbCutoffAngle",
"Hbond D-H-A cutoff angle",
2241 &dhaCutoffAngle, 100.0);
2243 opts.
optional(
"hbonds",
"hbOnAngle",
"Hbond D-H-A switch function on angle",
2246 opts.
optional(
"hbonds",
"hbOffAngle",
"Hbond D-H-A switch function off angle",
2247 &dhaOffAngle, 80.0);
2249 opts.
optional(
"hbonds",
"hbCutoffDist",
"Hbond A-D cutoff distance",
2250 &daCutoffDist, 7.5);
2253 opts.
optional(
"hbonds",
"hbOnDist",
"Hbond A-D switch function on distance",
2257 opts.
optional(
"hbonds",
"hbOffDist",
"Hbond A-D switch function off distance",
2263 opts.
optionalB(
"main",
"IMDon",
"Connect using IMD?",&IMDon,
FALSE);
2264 opts.
require(
"IMDon",
"IMDport",
"Port to which to bind", &IMDport);
2266 opts.
require(
"IMDon",
"IMDfreq",
"Frequency at which to report", &IMDfreq);
2268 opts.
optionalB(
"IMDon",
"IMDwait",
"Pause until IMD connection?",&IMDwait,
2270 opts.
optionalB(
"IMDon",
"IMDignore",
"Ignore any user input?",&IMDignore,
2272 opts.
optionalB(
"IMDon",
"IMDignoreForces",
"Ignore forces ONLY?",&IMDignoreForces,
2275 opts.
optional(
"ldBalancer",
"maxSelfPart",
2276 "maximum number of self partitions in one patch", &maxSelfPart, 20);
2278 opts.
optional(
"ldBalancer",
"maxPairPart",
2279 "maximum number of pair partitions in one patch", &maxPairPart, 8);
2281 opts.
optional(
"ldBalancer",
"numAtomsSelf",
2282 "maximum number of atoms in one self compute distribution",
2283 &numAtomsSelf, 154);
2286 opts.
optional(
"ldBalancer",
"numAtomsSelf2",
2287 "maximum number of atoms in one self compute distribution",
2288 &numAtomsSelf2, 154);
2291 opts.
optional(
"ldBalancer",
"numAtomsPair",
2292 "maximum number of atoms in one pair compute distribution",
2293 &numAtomsPair, 318);
2295 opts.
optional(
"ldBalancer",
"numAtomsPair2",
2296 "maximum number of atoms in one pair compute distribution",
2297 &numAtomsPair2, 637);
2299 opts.
optional(
"main",
"minAtomsPerPatch",
2300 "minimum average atoms per patch",
2301 &minAtomsPerPatch, 40);
2305 opts.
optional(
"main",
"emptyPatchLoad",
2306 "load generated by empty patch, in atoms",
2307 &emptyPatchLoad, 40);
2311 opts.
optional(
"main",
"maxExclusionFlags",
2312 "maximum number of exclusion flags per atom", &maxExclusionFlags, 256);
2316 opts.
optional(
"main",
"bondedCUDA",
"Bitmask for calculating bonded interactions on GPU", &bondedCUDA, 255);
2321 opts.
optionalB(
"main",
"useCUDAdisable",
"Disable kernels to maintain feature compatibility with CUDA", &useCUDAdisable,
TRUE);
2324 opts.
optional(
"main",
"mic_unloadMICPEs",
"Indicates whether or not the load balancer should unload PEs driving Xeon Phi cards", &mic_unloadMICPEs, 1);
2325 opts.
optional(
"main",
"mic_singleKernel",
"Set to non-zero to have all MIC work to be placed in a single kernel", &mic_singleKernel, 1);
2326 opts.
optional(
"main",
"mic_deviceThreshold",
"Threshold to use for directing computes to Xeon Phi devices", &mic_deviceThreshold, -1);
2327 opts.
optional(
"main",
"mic_hostSplit",
"DMK - reserved", &mic_hostSplit, -1);
2328 opts.
optional(
"main",
"mic_numParts_self_p1",
"MIC-Specific NumParts SELF Parameter 1", &mic_numParts_self_p1, -1);
2329 opts.
optional(
"main",
"mic_numParts_pair_p1",
"MIC-Specific NumParts PAIR Parameter 1", &mic_numParts_pair_p1, -1);
2330 opts.
optional(
"main",
"mic_numParts_pair_p2",
"MIC-Specific NumParts PAIR Parameter 2", &mic_numParts_pair_p2, -1);
2338 iout <<
iINFO <<
"EXTENDED SYSTEM FILE " << filename <<
"\n" <<
endi;
2341 ifstream xscFile(filename);
2342 if ( ! xscFile )
NAMD_die(
"Unable to open extended system file.\n");
2346 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2347 xscFile.getline(labels,1023);
2348 }
while ( strncmp(labels,
"#$LABELS ",9) );
2350 int a_x, a_y, a_z, b_x, b_y, b_z, c_x, c_y, c_z;
2351 a_x = a_y = a_z = b_x = b_y = b_z = c_x = c_y = c_z = -1;
2352 int o_x, o_y, o_z, s_u, s_v, s_w, s_x, s_y, s_z;
2353 o_x = o_y = o_z = s_u = s_v = s_w = s_x = s_y = s_z = -1;
2356 char *l_i = labels + 8;
2358 if ( *l_i ==
' ' ) { ++l_i;
continue; }
2360 for ( l_i2 = l_i; *l_i2 && *l_i2 !=
' '; ++l_i2 );
2361 if ( (l_i2 - l_i) == 3 && (l_i[1] ==
'_') ) {
2362 if (l_i[0] ==
'a' && l_i[2] ==
'x') a_x = pos;
2363 if (l_i[0] ==
'a' && l_i[2] ==
'y') a_y = pos;
2364 if (l_i[0] ==
'a' && l_i[2] ==
'z') a_z = pos;
2365 if (l_i[0] ==
'b' && l_i[2] ==
'x') b_x = pos;
2366 if (l_i[0] ==
'b' && l_i[2] ==
'y') b_y = pos;
2367 if (l_i[0] ==
'b' && l_i[2] ==
'z') b_z = pos;
2368 if (l_i[0] ==
'c' && l_i[2] ==
'x') c_x = pos;
2369 if (l_i[0] ==
'c' && l_i[2] ==
'y') c_y = pos;
2370 if (l_i[0] ==
'c' && l_i[2] ==
'z') c_z = pos;
2371 if (l_i[0] ==
'o' && l_i[2] ==
'x') o_x = pos;
2372 if (l_i[0] ==
'o' && l_i[2] ==
'y') o_y = pos;
2373 if (l_i[0] ==
'o' && l_i[2] ==
'z') o_z = pos;
2374 if (l_i[0] ==
's' && l_i[2] ==
'u') s_u = pos;
2375 if (l_i[0] ==
's' && l_i[2] ==
'v') s_v = pos;
2376 if (l_i[0] ==
's' && l_i[2] ==
'w') s_w = pos;
2377 if (l_i[0] ==
's' && l_i[2] ==
'x') s_x = pos;
2378 if (l_i[0] ==
's' && l_i[2] ==
'y') s_y = pos;
2379 if (l_i[0] ==
's' && l_i[2] ==
'z') s_z = pos;
2386 for ( pos = 0; pos < numpos; ++pos ) {
2389 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2390 if ( pos == a_x ) cellBasisVector1.x = tmp;
2391 if ( pos == a_y ) cellBasisVector1.y = tmp;
2392 if ( pos == a_z ) cellBasisVector1.z = tmp;
2393 if ( pos == b_x ) cellBasisVector2.x = tmp;
2394 if ( pos == b_y ) cellBasisVector2.y = tmp;
2395 if ( pos == b_z ) cellBasisVector2.z = tmp;
2396 if ( pos == c_x ) cellBasisVector3.x = tmp;
2397 if ( pos == c_y ) cellBasisVector3.y = tmp;
2398 if ( pos == c_z ) cellBasisVector3.z = tmp;
2399 if ( pos == o_x ) cellOrigin.x = tmp;
2400 if ( pos == o_y ) cellOrigin.y = tmp;
2401 if ( pos == o_z ) cellOrigin.z = tmp;
2402 if ( pos == s_u ) strainRate2.x = tmp;
2403 if ( pos == s_v ) strainRate2.y = tmp;
2404 if ( pos == s_w ) strainRate2.z = tmp;
2405 if ( pos == s_x ) strainRate.x = tmp;
2406 if ( pos == s_y ) strainRate.y = tmp;
2407 if ( pos == s_z ) strainRate.z = tmp;
2412 test.
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2414 if ( test.
a_p() && ! lattice.a_p() ) {
2415 NAMD_die(
"cellBasisVector1 added during atom reinitialization");
2417 if ( lattice.a_p() && ! test.
a_p() ) {
2418 NAMD_die(
"cellBasisVector1 dropped during atom reinitialization");
2420 if ( test.
b_p() && ! lattice.b_p() ) {
2421 NAMD_die(
"cellBasisVector2 added during atom reinitialization");
2423 if ( lattice.b_p() && ! test.
b_p() ) {
2424 NAMD_die(
"cellBasisVector2 dropped during atom reinitialization");
2426 if ( test.
c_p() && ! lattice.c_p() ) {
2427 NAMD_die(
"cellBasisVector3 added during atom reinitialization");
2429 if ( lattice.c_p() && ! test.
c_p() ) {
2430 NAMD_die(
"cellBasisVector3 dropped during atom reinitialization");
2433 latptr->
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2438 #ifdef MEM_OPT_VERSION
2440 extern char *gWorkDir;
2448 #ifdef MEM_OPT_VERSION
2449 char *namdWorkDir = NULL;
2452 if ( opts.
defined(
"obsolete") ) {
2454 "\"obsolete\" defined, silently ignoring obsolete options\n" <<
endi;
2461 current = config->
find(
"cwd");
2463 len = strlen(current->
data);
2467 NAMD_die(
"chdir() to given cwd failed!");
2475 cwd =
new char[len+1];
2477 strcpy(cwd, current->
data);
2483 #ifdef MEM_OPT_VERSION
2484 if(cwd!=NULL)namdWorkDir = cwd;
2485 else namdWorkDir = gWorkDir;
2486 int dirlen = strlen(namdWorkDir);
2489 if(namdWorkDir[dirlen-1]==
'/'){
2490 tmpDir =
new char[dirlen+1];
2493 tmpDir =
new char[dirlen+2];
2497 memcpy(tmpDir, namdWorkDir, dirlen);
2498 namdWorkDir = tmpDir;
2505 if ( usePluginIO && opts.
defined(
"coordinates") ) {
2506 NAMD_die(
"Separate coordinates file not allowed with plugin IO, coordinates will be taken from structure file.");
2511 if (!amberOn && !gromacsOn) {
2512 #ifndef MEM_OPT_VERSION
2513 if (useCompressedPsf)
2514 NAMD_die(
"useCompressedPsf requires memory-optimized build!");
2515 if (!usePluginIO && !genCompressedPsf && !opts.
defined(
"coordinates"))
2516 NAMD_die(
"coordinates not found in the configuration file!");
2518 if(!usePluginIO && !opts.
defined(
"bincoordinates")) {
2519 NAMD_die(
"bincoordinates not found in the configuration file for the memory optimized version!");
2521 if(!usePluginIO && opts.
defined(
"coordinates")) {
2522 NAMD_die(
"coordinates not allowed in the configuration file for the memory optimized version!");
2525 if (!opts.
defined(
"structure"))
2526 NAMD_die(
"structure not found in the configuration file!");
2527 if (!opts.
defined(
"parameters"))
2528 NAMD_die(
"parameters not found in the configuration file!");
2534 NAMD_die(
"Cannot specify both coordinates and ambercoor!");
2535 #ifndef MEM_OPT_VERSION
2536 if (!genCompressedPsf && !opts.
defined(
"coordinates") && !opts.
defined(
"ambercoor")
2537 && !opts.
defined(
"grocoorfile") && !usePluginIO)
2538 NAMD_die(
"Coordinate file not found!");
2543 if (opts.
defined(
"temperature") &&
2546 NAMD_die(
"Cannot specify both an initial temperature and a velocity file");
2549 #ifdef MEM_OPT_VERSION
2556 char *curfile = NULL;
2557 dirlen = strlen(namdWorkDir);
2558 current = config->
find(
"structure");;
2559 curfile = current->
data;
2560 int filelen = strlen(curfile);
2561 if(*curfile ==
'/' || *curfile==
'~') {
2567 binAtomFile =
new char[filelen+5];
2568 memcpy(binAtomFile, curfile, filelen);
2569 memcpy(binAtomFile+filelen,
".bin", 4);
2570 binAtomFile[filelen+4] = 0;
2572 binAtomFile =
new char[dirlen+filelen+5];
2573 memcpy(binAtomFile, namdWorkDir, dirlen);
2574 memcpy(binAtomFile+dirlen, curfile, filelen);
2575 memcpy(binAtomFile+dirlen+filelen,
".bin", 4);
2576 binAtomFile[dirlen+filelen+4] = 0;
2579 current = config->
find(
"bincoordinates");
2580 curfile = current->
data;
2581 filelen = strlen(curfile);
2582 if(*curfile ==
'/' || *curfile==
'~') {
2583 binCoorFile =
new char[filelen+1];
2584 memcpy(binCoorFile, curfile, filelen);
2585 binCoorFile[filelen] = 0;
2587 binCoorFile =
new char[dirlen+filelen+1];
2588 memcpy(binCoorFile, namdWorkDir, dirlen);
2589 memcpy(binCoorFile+dirlen, curfile, filelen);
2590 binCoorFile[dirlen+filelen] = 0;
2593 if(opts.
defined(
"binvelocities")){
2594 current = config->
find(
"binvelocities");
2595 curfile = current->
data;
2596 filelen = strlen(curfile);
2597 if(*curfile ==
'/' || *curfile==
'~') {
2598 binVelFile =
new char[filelen+1];
2599 memcpy(binVelFile, curfile, filelen);
2600 binVelFile[filelen] = 0;
2602 binVelFile =
new char[dirlen+filelen+1];
2603 memcpy(binVelFile, namdWorkDir, dirlen);
2604 memcpy(binVelFile+dirlen, curfile, filelen);
2605 binVelFile[dirlen+filelen] = 0;
2609 if(opts.
defined(
"binrefcoords")){
2610 current = config->
find(
"binrefcoords");
2611 curfile = current->
data;
2612 filelen = strlen(curfile);
2613 if(*curfile ==
'/' || *curfile==
'~') {
2614 binRefFile =
new char[filelen+1];
2615 memcpy(binRefFile, curfile, filelen);
2616 binRefFile[filelen] = 0;
2618 binRefFile =
new char[dirlen+filelen+1];
2619 memcpy(binRefFile, namdWorkDir, dirlen);
2620 memcpy(binRefFile+dirlen, curfile, filelen);
2621 binRefFile[dirlen+filelen] = 0;
2626 if(outputFilename[0] !=
'/' && outputFilename[0]!=
'~') {
2627 filelen = strlen(outputFilename);
2628 char *tmpout =
new char[filelen];
2629 memcpy(tmpout, outputFilename, filelen);
2630 CmiAssert(filelen+dirlen <= 120);
2631 memcpy(outputFilename, namdWorkDir, dirlen);
2632 memcpy(outputFilename+dirlen, tmpout, filelen);
2633 outputFilename[filelen+dirlen] = 0;
2637 if ( dcdFrequency && opts.
defined(
"dcdfile") &&
2638 dcdFilename[0] !=
'/' && dcdFilename[0]!=
'~' ) {
2639 filelen = strlen(dcdFilename);
2640 char *tmpout =
new char[filelen];
2641 memcpy(tmpout, dcdFilename, filelen);
2642 CmiAssert(filelen+dirlen <= 120);
2643 memcpy(dcdFilename, namdWorkDir, dirlen);
2644 memcpy(dcdFilename+dirlen, tmpout, filelen);
2645 dcdFilename[filelen+dirlen] = 0;
2649 if ( velDcdFrequency && opts.
defined(
"veldcdfile") &&
2650 velDcdFilename[0] !=
'/' && velDcdFilename[0]!=
'~' ) {
2651 filelen = strlen(velDcdFilename);
2652 char *tmpout =
new char[filelen];
2653 memcpy(tmpout, velDcdFilename, filelen);
2654 CmiAssert(filelen+dirlen <= 120);
2655 memcpy(velDcdFilename, namdWorkDir, dirlen);
2656 memcpy(velDcdFilename+dirlen, tmpout, filelen);
2657 velDcdFilename[filelen+dirlen] = 0;
2661 if ( forceDcdFrequency && opts.
defined(
"forcedcdfile") &&
2662 forceDcdFilename[0] !=
'/' && forceDcdFilename[0]!=
'~' ) {
2663 filelen = strlen(forceDcdFilename);
2664 char *tmpout =
new char[filelen];
2665 memcpy(tmpout, forceDcdFilename, filelen);
2666 CmiAssert(filelen+dirlen <= 120);
2667 memcpy(forceDcdFilename, namdWorkDir, dirlen);
2668 memcpy(forceDcdFilename+dirlen, tmpout, filelen);
2669 forceDcdFilename[filelen+dirlen] = 0;
2673 if ( restartFrequency && opts.
defined(
"restartname") &&
2674 restartFilename[0] !=
'/' && restartFilename[0]!=
'~' ) {
2675 filelen = strlen(restartFilename);
2676 char *tmpout =
new char[filelen];
2677 memcpy(tmpout, restartFilename, filelen);
2678 CmiAssert(filelen+dirlen <= 120);
2679 memcpy(restartFilename, namdWorkDir, dirlen);
2680 memcpy(restartFilename+dirlen, tmpout, filelen);
2681 restartFilename[filelen+dirlen] = 0;
2685 delete [] namdWorkDir;
2687 if (opts.
defined(
"numinputprocs")) {
2688 if(numinputprocs > CkNumPes()) {
2689 iout <<
iWARN <<
"The number of input processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
2690 numinputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
2694 if (opts.
defined(
"numoutputprocs")) {
2695 if(numoutputprocs > CkNumPes()) {
2696 iout <<
iWARN <<
"The number of output processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
2697 numoutputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
2701 #ifndef OUTPUT_SINGLE_FILE
2702 #error OUTPUT_SINGLE_FILE not defined!
2705 #if !OUTPUT_SINGLE_FILE
2707 create_output_directories(
"coor");
2708 create_output_directories(
"vel");
2710 create_output_directories(
"dcd");
2712 iout <<
iWARN <<
"The dcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
2715 if (velDcdFrequency) {
2716 create_output_directories(
"veldcd");
2717 if(opts.
defined(
"veldcdfile")){
2718 iout <<
iWARN <<
"The veldcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
2721 if (forceDcdFrequency) {
2722 create_output_directories(
"forcedcd");
2723 if(opts.
defined(
"forcedcdfile")){
2724 iout <<
iWARN <<
"The forcedcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
2730 if (! opts.
defined(
"auxFile")) {
2731 strcpy(auxFilename,outputFilename);
2732 strcat(auxFilename,
".aux");
2737 if (! opts.
defined(
"dcdfile")) {
2738 strcpy(dcdFilename,outputFilename);
2739 strcat(dcdFilename,
".dcd");
2745 if (velDcdFrequency) {
2746 if (! opts.
defined(
"veldcdfile")) {
2747 strcpy(velDcdFilename,outputFilename);
2748 strcat(velDcdFilename,
".veldcd");
2754 if (forceDcdFrequency) {
2755 if (! opts.
defined(
"forcedcdfile")) {
2756 strcpy(forceDcdFilename,outputFilename);
2757 strcat(forceDcdFilename,
".forcedcd");
2764 if (! opts.
defined(
"xstfile")) {
2765 strcpy(xstFilename,outputFilename);
2766 strcat(xstFilename,
".xst");
2772 if (restartFrequency) {
2773 if (! opts.
defined(
"restartname")) {
2774 strcpy(restartFilename,outputFilename);
2775 if ( ! restartSave ) strcat(restartFilename,
".restart");
2779 restartSave =
FALSE;
2780 binaryRestart =
FALSE;
2783 if (storeComputeMap || loadComputeMap) {
2784 if (! opts.
defined(
"computeMapFile")) {
2785 strcpy(computeMapFilename,
"computeMapFile");
2786 strcat(computeMapFilename,
".txt");
2794 if (!paraTypeXplorOn && !paraTypeCharmmOn)
2796 paraTypeXplorOn =
TRUE;
2799 if (paraTypeXplorOn && paraTypeCharmmOn)
2801 NAMD_die(
"Please specify either XPLOR or CHARMM format for parameters!");
2808 if (!(minimizeOn||minimizeCGOn) && !opts.
defined(
"temperature") &&
2811 NAMD_die(
"Must have either an initial temperature or a velocity file");
2814 if (minimizeOn||minimizeCGOn) { initialTemp = 0.0; }
2815 if (opts.
defined(
"velocities") || opts.
defined(
"binvelocities") )
2822 if ( opts.
defined(
"extendedSystem") ) readExtendedSystem(config->
find(
"extendedSystem")->
data);
2824 #ifdef MEM_OPT_VERSION
2825 if ( LJcorrection ) {
2826 NAMD_die(
"LJ tail corrections not yet available for memory optimized builds");
2830 if ( LJcorrection && ! cellBasisVector3.length2() ) {
2831 NAMD_die(
"Can't use LJ tail corrections without periodic boundary conditions!");
2834 if ( cellBasisVector3.length2() && ! cellBasisVector2.length2() ) {
2835 NAMD_die(
"Used cellBasisVector3 without cellBasisVector2!");
2838 if ( cellBasisVector2.length2() && ! cellBasisVector1.length2() ) {
2839 NAMD_die(
"Used cellBasisVector2 without cellBasisVector1!");
2842 if ( cellOrigin.length2() && ! cellBasisVector1.length2() ) {
2843 NAMD_die(
"Used cellOrigin without cellBasisVector1!");
2846 lattice.set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2848 if (! opts.
defined(
"DCDunitcell")) {
2849 dcdUnitCell = lattice.a_p() && lattice.b_p() && lattice.c_p();
2855 if ( ! opts.
defined(
"cylindricalBCAxis") )
2857 cylindricalBCAxis =
'x';
2861 opts.
get(
"cylindricalBCAxis", s);
2863 if (!strcasecmp(s,
"x"))
2865 cylindricalBCAxis =
'x';
2867 else if (!strcasecmp(s,
"y"))
2869 cylindricalBCAxis =
'y';
2871 else if (!strcasecmp(s,
"z"))
2873 cylindricalBCAxis =
'z';
2879 sprintf(err_msg,
"Illegal value '%s' for 'cylindricalBCAxis' in configuration file", s);
2884 if (!opts.
defined(
"splitPatch"))
2890 opts.
get(
"splitPatch", s);
2891 if (!strcasecmp(s,
"position"))
2893 else if (!strcasecmp(s,
"hydrogen"))
2899 "Illegal value '%s' for 'splitPatch' in configuration file",
2906 opts.
get(
"exclude", s);
2908 if (!strcasecmp(s,
"none"))
2913 else if (!strcasecmp(s,
"1-2"))
2918 else if (!strcasecmp(s,
"1-3"))
2922 else if (!strcasecmp(s,
"1-4"))
2926 else if (!strcasecmp(s,
"scaled1-4"))
2934 sprintf(err_msg,
"Illegal value '%s' for 'exclude' in configuration file",
2939 if (scale14 != 1.0 && exclude !=
SCALED14)
2941 iout <<
iWARN <<
"Exclude is not scaled1-4; 1-4scaling ignored.\n" <<
endi;
2945 if (!opts.
defined(
"waterModel")) {
2948 opts.
get(
"waterModel", s);
2949 if (!strncasecmp(s,
"tip4", 4)) {
2952 }
else if (!strncasecmp(s,
"tip3", 4)) {
2955 }
else if (!strncasecmp(s,
"swm4", 4)) {
2961 "Illegal value %s for 'waterModel' in configuration file", s);
2965 if (watmodel ==
WAT_SWM4 && !drudeOn) {
2966 NAMD_die(
"Must have 'drudeOn' enabled to use SWM4-DP water model.");
2968 if (drudeOn && watmodel !=
WAT_SWM4) {
2971 <<
"Setting water model to 'swm4' (SWM4-DP) for Drude polarization.\n"
2984 int * gomethod = &goMethod;
2985 if (!opts.
defined(
"GoMethod")) {
2989 opts.
get(
"GoMethod",s);
2991 *gomethod = atoi(s);
2993 if (!strcasecmp(s,
"matrix")) {
2996 }
else if (!strcasecmp(s,
"faster")) {
2999 }
else if (!strcasecmp(s,
"lowmem")) {
3006 "Illegal value '%s' for 'GoMethod' in configuration file",
3014 if (!opts.
defined(
"MTSAlgorithm"))
3020 opts.
get(
"MTSAlgorithm", s);
3022 if (!strcasecmp(s,
"naive"))
3024 MTSAlgorithm =
NAIVE;
3026 else if (!strcasecmp(s,
"constant"))
3028 MTSAlgorithm =
NAIVE;
3030 else if (!strcasecmp(s,
"impulse"))
3034 else if (!strcasecmp(s,
"verleti"))
3043 "Illegal value '%s' for 'MTSAlgorithm' in configuration file",
3050 if (!opts.
defined(
"longSplitting"))
3056 opts.
get(
"longSplitting", s);
3057 if (!strcasecmp(s,
"sharp"))
3058 longSplitting =
SHARP;
3059 else if (!strcasecmp(s,
"xplor"))
3060 longSplitting =
XPLOR;
3061 else if (!strcasecmp(s,
"c1"))
3063 else if (!strcasecmp(s,
"c2"))
3070 "Illegal value '%s' for 'longSplitting' in configuration file",
3077 if (!opts.
defined(
"rigidBonds"))
3083 opts.
get(
"rigidBonds", s);
3084 if (!strcasecmp(s,
"all"))
3088 else if (!strcasecmp(s,
"water"))
3092 else if (!strcasecmp(s,
"none"))
3100 "Illegal value '%s' for 'rigidBonds' in configuration file", s);
3110 "Water model %s requires rigidBonds set to \"all\" or \"water\"",
3111 (watmodel ==
WAT_TIP4 ?
"TIP4P" :
"SWM4-DP"));
3116 if (switchingActive)
3119 if (!opts.
defined(
"switchDist")) {
3120 NAMD_die(
"switchDist must be defined when switching is enabled");
3123 if ( (switchingDist>cutoff) || (switchingDist<0) )
3128 "switchDist muct be between 0 and cutoff, which is %f", cutoff);
3134 if ( martiniSwitching )
3136 if ( ! switchingActive )
3138 NAMD_die(
"martiniSwitching requires switching");
3140 if ( vdwForceSwitching )
3142 NAMD_die(
"martiniSwitching and vdwForceSwitching are exclusive to one another. Select only one.");
3144 if ( dielectric != 15.0 && ! martiniDielAllow )
3146 iout <<
iWARN <<
"USE DIELECTRIC OF 15.0 WITH MARTINI.\n";
3147 iout << iWARN <<
"SETTING dielectric 15.0\n";
3148 iout << iWARN <<
"FOR NON-STANDARD DIELECTRIC WITH MARTINI, SET: martiniDielAllow on\n";
3153 iout <<
iWARN <<
"USE COSINE BASED ANGLES WITH MARTINI.\n";
3154 iout << iWARN <<
"SETTING cosAngles on\n";
3159 NAMD_die(
"Do not use Particle Mesh Ewald with Martini. Set: PME off");
3163 NAMD_die(
"Do not use Multilevel Summation Method with Martini. Set: MSM off");
3167 NAMD_die(
"Do not use Fast Multipole Method with Martini. Set: FMM off");
3173 if (!opts.
defined(
"pairlistDist"))
3175 pairlistDist = cutoff;
3177 else if (pairlistDist < cutoff)
3179 NAMD_die(
"pairlistDist must be >= cutoff distance");
3182 patchDimension = pairlistDist;
3185 patchDimension += hgroupCutoff;
3189 if (berendsenPressureOn || langevinPistonOn) {
3190 defaultMargin = ( useFlexibleCell ? 0.06 : 0.03 ) * patchDimension;
3193 margin = defaultMargin;
3195 if ( defaultMargin != 0.0 && margin == 0.0 ) {
3196 margin = defaultMargin;
3197 iout <<
iWARN <<
"ALWAYS USE NON-ZERO MARGIN WITH CONSTANT PRESSURE!\n";
3198 iout << iWARN <<
"CHANGING MARGIN FROM 0 to " << margin <<
"\n" <<
endi;
3201 patchDimension += margin;
3207 NAMD_die(
"GBIS not compatible with FullDirect");
3210 NAMD_die(
"GBIS not compatible with PME");
3213 NAMD_die(
"GBIS not compatible with MSM");
3216 NAMD_die(
"GBIS not compatible with FMM");
3219 NAMD_die(
"GBIS not compatible with Alchemical Transformations");
3222 NAMD_die(
"GBIS not compatible with Locally Enhanced Sampling");
3225 NAMD_die(
"GBIS not compatible with FMA");
3228 NAMD_die(
"GBIS not compatible with Drude Polarization");
3231 if (alpha_cutoff > patchDimension) {
3232 patchDimension = alpha_cutoff;
3235 BigReal tmp = (initialTemp > 0) ? initialTemp : 300;
3236 kappa = 50.29216*sqrt(ion_concentration/solvent_dielectric/tmp);
3241 #ifdef MEM_OPT_VERSION
3242 NAMD_die(
"SASA not yet available for memory optimized builds");
3244 if ( lattice.volume() > 0 ) {
3245 NAMD_die(
"SASA does not yet support periodic boundary conditions.");
3253 if ( dihedralOn ) globalOn =
TRUE;
3255 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
3256 if (loweAndersenOn) {
3257 NAMD_die(
"Lowe-Andersen dynamics not compatible with CUDA at this time");
3263 if (loweAndersenOn && (langevinOn || tCoupleOn))
3265 NAMD_die(
"Lowe-Andersen dynamics, Langevin dynamics and temperature coupling are mutually exclusive dynamics modes");
3269 if (tCoupleOn && opts.
defined(
"rescaleFreq") )
3271 NAMD_die(
"Temperature coupling and temperature rescaling are mutually exclusive");
3274 if (globalOn && CkNumPes() > 1)
3276 NAMD_die(
"Global integration does not run in parallel (yet).");
3279 if (COLDOn && langevinOn)
3281 NAMD_die(
"COLD and Langevin dynamics are mutually exclusive dynamics modes");
3283 if (COLDOn && minimizeOn)
3285 NAMD_die(
"COLD and minimization are mutually exclusive dynamics modes");
3287 if (COLDOn && tCoupleOn)
3289 NAMD_die(
"COLD and temperature coupling are mutually exclusive dynamics modes");
3291 if (COLDOn && opts.
defined(
"rescaleFreq"))
3293 NAMD_die(
"COLD and velocity rescaling are mutually exclusive dynamics modes");
3298 NAMD_die(
"splitPatch hydrogen is required for MOLLY");
3303 NAMD_die(
"splitPatch hydrogen is required for rigidBonds");
3309 if(accelMDGiE < 1 || accelMDGiE > 2){
3310 sprintf(msg,
"accelMDGiE was set to %d but it should be 1 or 2", accelMDGiE);
3313 if(accelMDGStatWindow > 0){
3314 if(accelMDGcMDPrepSteps % accelMDGStatWindow != 0)
3315 NAMD_die(
"'accelMDGcMDPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3316 if(accelMDGcMDSteps % accelMDGStatWindow != 0)
3317 NAMD_die(
"'accelMDGcMDSteps' has to be a multiple of 'accelMDGStatWindow'");
3318 if(accelMDGEquiPrepSteps % accelMDGStatWindow != 0)
3319 NAMD_die(
"'accelMDGEquiPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3320 if(accelMDGEquiSteps % accelMDGStatWindow != 0)
3321 NAMD_die(
"'accelMDGEquiSteps' has to be a multiple of 'accelMDGStatWindow'");
3323 if(accelMDGRestart && accelMDGcMDSteps == 0)
3324 accelMDGcMDPrepSteps = 0;
3325 else if(accelMDGcMDSteps - accelMDGcMDPrepSteps < 2)
3326 NAMD_die(
"'accelMDGcMDSteps' should be larger than 'accelMDGcMDPrepSteps'");
3328 if(accelMDGEquiSteps == 0)
3329 accelMDGEquiPrepSteps = 0;
3330 else if(accelMDGresetVaftercmd){
3331 if(accelMDGEquiPrepSteps <= 0)
3332 NAMD_die(
"'accelMDGEquiPrepSteps' should be non-zero");
3333 if(accelMDGEquiSteps - accelMDGEquiPrepSteps < 1)
3334 NAMD_die(
"'accelMDGEquiSteps' should be larger than 'accelMDGEquiPrepSteps'");
3339 iout <<
iWARN <<
"accelMDE will be ignored with accelMDG on.\n" << endi;
3340 if(opts.
defined(
"accelMDalpha"))
3341 iout <<
iWARN <<
"accelMDalpha will be ignored with accelMDG on.\n" << endi;
3343 iout <<
iWARN <<
"accelMDTE will be ignored with accelMDG on.\n" << endi;
3344 if(opts.
defined(
"accelMDTalpha"))
3345 iout <<
iWARN <<
"accelMDTalpha will be ignored with accelMDG on.\n" << endi;
3349 NAMD_die(
"accelMDE and accelMDalpha are required for accelMD with accelMDG off");
3351 if(accelMDdual && (!opts.
defined(
"accelMDTE") || !opts.
defined(
"accelMDTalpha"))){
3352 NAMD_die(
"accelMDTE and accelMDTalpha are required for accelMDdual with accelMDG off");
3359 if (minimizeOn && (maximumMove == 0.0))
3361 maximumMove = 0.75 * pairlistDist/stepsPerCycle;
3364 if (!adaptTempRescale && !adaptTempLangevin)
3365 NAMD_die(
"Adaptive tempering needs to be coupled to either the Langevin thermostat or velocity rescaling.");
3366 if (opts.
defined(
"adaptTempInFile") && (opts.
defined(
"adaptTempTmin") ||
3367 opts.
defined(
"adaptTempTmax") ||
3368 adaptTempBins != 0))
3369 NAMD_die(
"cannot simultaneously specify adaptTempInFile and any of {adaptTempTmin, adaptTempTmax,adaptTempBins} as these are read from the input file");
3370 if (!opts.
defined(
"adaptTempInFile") && !(opts.
defined(
"adaptTempTmin") &&
3371 opts.
defined(
"adaptTempTmax") &&
3372 adaptTempBins != 0 ))
3373 NAMD_die(
"Need to specify either adaptTempInFile or all of {adaptTempTmin, adaptTempTmax,adaptTempBins} if adaptTempMD is on.");
3376 langevinOnAtStartup = langevinOn;
3378 if ( ! opts.
defined(
"langevinDamping") ) langevinDamping = 0.0;
3379 if ( ! opts.
defined(
"langevinHydrogen") ) langevinHydrogen =
TRUE;
3380 if ( (opts.
defined(
"langevinDamping") || opts.
defined(
"langevinHydrogen"))
3381 && (opts.
defined(
"langevinFile") || opts.
defined(
"langevinCol")) )
3382 NAMD_die(
"To specify Langevin dynamics parameters, use either langevinDamping and langevinHydrogen or langevinFile and langevinCol. Do not combine them.");
3383 if ( opts.
defined(
"langevinHydrogen") && langevinDamping == 0.0 )
3384 NAMD_die(
"langevinHydrogen requires langevinDamping to be set.");
3388 if (loweAndersenOn) {
3389 if (!opts.
defined(
"loweAndersenRate")) loweAndersenRate = 100;
3390 if (!opts.
defined(
"loweAndersenCutoff")) loweAndersenCutoff = 2.7;
3395 if (stochRescaleOn) {
3396 if (langevinOn || loweAndersenOn || tCoupleOn ||
3398 NAMD_die(
"Stochastic velocity rescaling is incompatible with other temperature control methods");
3400 if (!opts.
defined(
"stochRescaleFreq")) stochRescaleFreq = stepsPerCycle;
3403 if (opts.
defined(
"rescaleFreq"))
3405 if (!opts.
defined(
"rescaleTemp"))
3407 if (opts.
defined(
"temperature"))
3409 rescaleTemp = initialTemp;
3413 NAMD_die(
"Must give a rescale temperature if rescaleFreq is defined");
3423 if (opts.
defined(
"rescaleTemp"))
3425 if (!opts.
defined(
"rescaleFreq"))
3427 NAMD_die(
"Must give a rescale freqency if rescaleTemp is given");
3431 if (opts.
defined(
"reassignFreq"))
3433 if (!opts.
defined(
"reassignTemp"))
3435 if (opts.
defined(
"temperature"))
3437 reassignTemp = initialTemp;
3441 NAMD_die(
"Must give a reassign temperature if reassignFreq is defined");
3451 if (opts.
defined(
"reassignTemp"))
3453 if (!opts.
defined(
"reassignFreq"))
3455 NAMD_die(
"Must give a reassignment freqency if reassignTemp is given");
3459 if (opts.
defined(
"reassignIncr"))
3461 if (!opts.
defined(
"reassignFreq"))
3463 NAMD_die(
"Must give a reassignment freqency if reassignIncr is given");
3471 if (opts.
defined(
"reassignHold"))
3473 if (!opts.
defined(
"reassignIncr"))
3475 NAMD_die(
"Must give a reassignment increment if reassignHold is given");
3485 randomSeed = (
unsigned int) time(NULL) + 31530001 * CmiMyPartition();
3489 if (opts.
defined(
"soluteScaling")) {
3493 if ( ! opts.
defined(
"soluteScalingFactorCharge") ) {
3494 soluteScalingFactorCharge = soluteScalingFactor;
3496 if ( ! opts.
defined(
"soluteScalingFactorVdw") ) {
3497 soluteScalingFactorVdw = soluteScalingFactor;
3502 alchFepOnAtStartup = alchFepOn =
FALSE;
3503 alchThermIntOnAtStartup = alchThermIntOn =
FALSE;
3504 alchOnAtStartup = alchOn;
3507 if (martiniSwitching) {
3508 iout <<
iWARN <<
"Martini switching disabled for alchemical "
3509 "interactions.\n" <<
endi;
3512 if (!opts.
defined(
"alchType")) {
3513 NAMD_die(
"Must define type of alchemical simulation: fep or ti\n");
3516 opts.
get(
"alchType",s);
3517 if (!strcasecmp(s,
"fep")) {
3518 alchFepOnAtStartup = alchFepOn =
TRUE;
3520 else if (!strcasecmp(s,
"ti")) {
3521 alchThermIntOnAtStartup = alchThermIntOn =
TRUE;
3524 NAMD_die(
"Unknown type of alchemical simulation; choices are fep or ti\n");
3528 if (rescaleFreq > 0) alchTemp = rescaleTemp;
3529 else if (reassignFreq > 0) alchTemp = reassignTemp;
3530 else if (langevinOn) alchTemp = langevinTemp;
3531 else if (stochRescaleOn) alchTemp = stochRescaleTemp;
3532 else if (tCoupleOn) alchTemp = tCoupleTemp;
3533 else NAMD_die(
"Alchemical FEP can be performed only in constant temperature simulations\n");
3535 if (reassignFreq > 0 && reassignIncr != 0)
3536 NAMD_die(
"reassignIncr cannot be used in alchemical simulations\n");
3538 if (alchLambda < 0.0 || alchLambda > 1.0)
3539 NAMD_die(
"alchLambda values should be in the range [0.0, 1.0]\n");
3541 if (alchVdwLambdaEnd > 1.0)
3542 NAMD_die(
"Gosh tiny Elvis, you kicked soft-core in the van der Waals! alchVdwLambdaEnd should be in the range [0.0, 1.0]\n");
3544 if (alchBondLambdaEnd > 1.0)
3545 NAMD_die(
"alchBondLambdaEnd should be in the range [0.0, 1.0]\n");
3547 if (alchElecLambdaStart > 1.0)
3548 NAMD_die(
"alchElecLambdaStart should be in the range [0.0, 1.0]\n");
3551 if (alchRepLambdaEnd > 1.0)
3552 NAMD_die(
"alchRepLambdaEnd should be in the range [0.0, 1.0]\n");
3553 if (alchVdwLambdaEnd < alchRepLambdaEnd)
3554 NAMD_die(
"alchVdwLambdaEnd should be greater than alchRepLambdaEnd\n");
3555 if (alchVdwShiftCoeff > 0.0) {
3556 iout <<
iWARN <<
"alchVdwShiftCoeff is non-zero but not used when WCA"
3557 <<
" is active. Setting it to zero now.\n" <<
endi;
3558 alchVdwShiftCoeff = 0.0;
3560 if (alchThermIntOn) {
3561 NAMD_die(
"alchWCA is not currently compatible with TI");
3563 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
3564 NAMD_die(
"alchWCA is not currently available with CUDA");
3569 if (alchLambda2 < 0.0 || alchLambda2 > 1.0)
3570 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
3574 if (!opts.
defined(
"alchoutfile")) {
3575 strcpy(alchOutFile, outputFilename);
3576 strcat(alchOutFile,
".fep");
3579 if (!opts.
defined(
"alchLambda") || !opts.
defined(
"alchLambda2")) {
3580 NAMD_die(
"alchFepOn is on, but alchLambda or alchLambda2 is not set.");
3583 else if (alchThermIntOn) {
3585 if (alchLambdaFreq && (alchLambda2 < 0.0 || alchLambda2 > 1.0))
3586 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
3588 if (!opts.
defined(
"alchoutfile")) {
3589 strcpy(alchOutFile, outputFilename);
3590 strcat(alchOutFile,
".ti");
3597 if ( alchOn && alchFepOn && alchThermIntOn )
3598 NAMD_die(
"Sorry, combined TI and FEP is not implemented.\n");
3599 if ( alchOn && lesOn )
3600 NAMD_die(
"Sorry, combined LES with FEP or TI is not implemented.\n");
3601 if ( alchOn && alchThermIntOn && lesOn )
3602 NAMD_die(
"Sorry, combined LES and TI is not implemented.\n");
3603 if ( alchWCAOn && !alchOn ) {
3604 iout <<
iWARN <<
"Alchemical WCA decomposition was requested but \
3605 alchemical free energy calculation is not active. Setting \
3606 alchWCA to off.\n" <<
endi;
3609 if ( alchDecouple && !alchOn ) {
3610 iout <<
iWARN <<
"Alchemical decoupling was requested but \
3611 alchemical free energy calculation is not active. Setting \
3612 alchDecouple to off.\n" <<
endi;
3613 alchDecouple =
FALSE;
3615 if ( alchBondDecouple && !alchOn ) {
3616 iout <<
iWARN <<
"Alchemical bond decoupling was requested but \
3617 alchemical free energy calculation is not active. Setting \
3618 alchBondDecouple to off.\n" <<
endi;
3619 alchBondDecouple =
FALSE;
3622 if ( lesOn && ( lesFactor < 1 || lesFactor > 255 ) ) {
3623 NAMD_die(
"lesFactor must be positive and less than 256");
3625 if ((pairInteractionOn && alchOn) || (pairInteractionOn && lesOn))
3626 NAMD_die(
"Sorry, pair interactions may not be calculated when LES, FEP or TI is enabled.");
3630 if ( ! langevinOn ) {
3631 NAMD_die(
"Drude model requires use of Langevin thermostat.");
3633 if ( ! opts.
defined(
"drudeDamping")) {
3634 drudeDamping = langevinDamping;
3635 iout <<
iWARN <<
"Undefined 'drudeDamping' will be set to "
3636 "value of 'langevinDamping'\n" <<
endi;
3639 NAMD_die(
"Drude implementation is incompatible with alchemical "
3640 "free energy calculation.");
3645 if (opts.
defined(
"ldBalancer")) {
3646 if (strcasecmp(loadBalancer,
"none") == 0)
3648 else if (strcasecmp(loadBalancer,
"hybrid") == 0)
3651 NAMD_die(
"Unknown ldBalancer selected");
3654 #ifdef MEM_OPT_VERSION
3659 if (opts.
defined(
"ldbStrategy")) {
3661 if (strcasecmp(loadStrategy,
"comprehensive") == 0)
3663 else if (strcasecmp(loadStrategy,
"refineonly") == 0)
3665 else if (strcasecmp(loadStrategy,
"old") == 0)
3668 NAMD_die(
"Unknown ldbStrategy selected");
3673 if (!opts.
defined(
"ldbPeriod")) {
3674 ldbPeriod=200*stepsPerCycle;
3678 if (!opts.
defined(
"firstLdbStep")) {
3679 firstLdbStep=5*stepsPerCycle;
3682 if (ldbPeriod <= firstLdbStep) {
3683 NAMD_die(
"ldbPeriod must greater than firstLdbStep.");
3686 if (!opts.
defined(
"lastLdbStep")) {
3690 if (!opts.
defined(
"hybridGroupSize")) {
3691 hybridGroupSize = 512;
3693 if ( hybridGroupSize < CkNumPes() ) {
3695 int groupsize = hybridGroupSize;
3698 CmiGetPesOnPhysicalNode(CmiPhysicalNodeID(0), &rpelist, &nodesize);
3699 if ( CkNumPes() % nodesize ) nodesize = CmiNodeSize(CmiNodeOf(0));
3700 if ( CkNumPes() % nodesize ) nodesize = 1;
3701 groupsize += nodesize - 1;
3702 while ( 2 * groupsize > CkNumPes() ) --groupsize;
3703 if ( groupsize < nodesize ) groupsize = nodesize;
3704 while ( groupsize % nodesize ) --groupsize;
3705 while ( groupsize && CkNumPes() % groupsize ) groupsize -= nodesize;
3706 if ( 2 * groupsize < hybridGroupSize ) {
3707 groupsize += nodesize;
3708 while ( CkNumPes() % groupsize ) groupsize += nodesize;
3710 if ( 2 * groupsize <= CkNumPes() ) hybridGroupSize = groupsize;
3715 bool specialTracing = traceAvailable() && (traceIsOn() == 0);
3717 if(!opts.
defined(
"traceStartStep")) {
3718 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
3720 if(!opts.
defined(
"numTraceSteps")) {
3721 numTraceSteps = 100;
3724 if(specialTracing) {
3725 if (!opts.
defined(
"firstLdbStep")) firstLdbStep = 20;
3726 if (!opts.
defined(
"ldbPeriod")) ldbPeriod = 100;
3728 if(!opts.
defined(
"traceStartStep")) {
3729 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
3732 if(!opts.
defined(
"numTraceSteps")) {
3737 #ifdef MEASURE_NAMD_WITH_PAPI
3739 if(!opts.
defined(
"papiMeasureStartStep")) {
3740 papiMeasureStartStep = 3 * firstLdbStep;
3742 if(!opts.
defined(
"numPapiMeasureSteps")) {
3743 numPapiMeasureSteps = 8;
3748 if(simulateInitialMapping) {
3749 if(!opts.
defined(
"simulatedPEs")){
3750 simulatedPEs = CkNumPes();
3752 if(!opts.
defined(
"simulatedNodeSize")){
3753 simulatedNodeSize = CkMyNodeSize();
3757 #ifdef MEM_OPT_VERSION
3766 if(ldbPeriod%stepsPerCycle!=0 || firstLdbStep%stepsPerCycle!=0) {
3767 iout <<
iWARN <<
"In memory optimized version, the ldbPeriod parameter or firstLdbStep parameter is better set to be a multiple of stepsPerCycle parameter!\n";
3771 if (N < firstTimestep) { N = firstTimestep; }
3773 if ( (firstTimestep%stepsPerCycle) != 0)
3775 NAMD_die(
"First timestep must be a multiple of stepsPerCycle!!");
3785 if ( fullDirectOn ) ++i;
3787 NAMD_die(
"More than one full electrostatics algorithm selected!!!");
3790 if (!opts.
defined(
"ldbBackgroundScaling")) {
3791 ldbBackgroundScaling = 1.0;
3793 if (!opts.
defined(
"ldbPMEBackgroundScaling")) {
3794 ldbPMEBackgroundScaling = ldbBackgroundScaling;
3796 if (!opts.
defined(
"ldbHomeBackgroundScaling")) {
3797 ldbHomeBackgroundScaling = ldbBackgroundScaling;
3802 if ( lattice.volume() == 0. ) {
3803 NAMD_die(
"PME requires periodic boundary conditions.");
3805 if ( PMEGridSpacing == 0. ) {
3806 if ( PMEGridSizeX * PMEGridSizeY * PMEGridSizeZ == 0 )
3807 NAMD_die(
"Either PMEGridSpacing or PMEGridSizeX, PMEGridSizeY, and PMEGridSizeZ must be specified.");
3808 else PMEGridSpacing = 1.5;
3810 #ifndef TEST_PME_GRID
3811 for (
int idim = 0; idim < 3; ++idim ) {
3814 const char *direction;
3816 case 0: direction =
"X";
3817 gridSize = &PMEGridSizeX; cellLength = lattice.a().length();
3819 case 1: direction =
"Y";
3820 gridSize = &PMEGridSizeY; cellLength = lattice.b().length();
3822 case 2: direction =
"Z";
3823 gridSize = &PMEGridSizeZ; cellLength = lattice.c().length();
3826 int minSize = (int) ceil(cellLength/PMEGridSpacing);
3828 for (
int minSize = 1; minSize < 300; ++minSize ) {
3830 int bestSize = 10 * (minSize + 10);
3832 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
3833 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
3837 for (
int i2 = 0; i2 <= max2; ++i2 ) {
3838 for (
int i3 = 0; i3 <= max3; ++i3 ) {
3839 for (
int i5 = 0; i5 <= max5; ++i5 ) {
3840 for (
int i7 = 0; i7 <= max7; ++i7 ) {
3841 for (
int i11 = 0; i11 <= max11; ++i11 ) {
3842 if ( i5 + i7 + i11 > i2 )
continue;
3844 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
3845 if ( testSize > bestSize )
continue;
3846 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
3847 if ( testSize > bestSize )
continue;
3848 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
3849 if ( testSize > bestSize )
continue;
3850 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
3851 if ( testSize > bestSize )
continue;
3852 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
3853 if ( testSize > bestSize )
continue;
3854 if ( testSize >= minSize ) bestSize = testSize;
3856 #ifdef TEST_PME_GRID
3857 iout << minSize <<
" " << bestSize <<
"\n" <<
endi;
3859 if ( ! *gridSize ) {
3860 *gridSize = bestSize;
3862 if ( *gridSize * PMEGridSpacing < cellLength ) {
3864 sprintf(errmsg,
"PMEGridSize%s %d is too small for cell length %f and PMEGridSpacing %f\n",
3865 direction, *gridSize, cellLength, PMEGridSpacing);
3870 if ( PMEGridSizeX < 5 ) {
3871 NAMD_die(
"PMEGridSizeX (number of grid points) is very small.");
3873 if ( PMEGridSizeY < 5 ) {
3874 NAMD_die(
"PMEGridSizeY (number of grid points) is very small.");
3876 if ( PMEGridSizeZ < 5 ) {
3877 NAMD_die(
"PMEGridSizeZ (number of grid points) is very small.");
3879 BigReal tolerance = PMETolerance;
3881 while ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) ewaldcof *= 2.0;
3883 BigReal ewaldcof_hi = ewaldcof;
3884 for (
int i = 0; i < 100; ++i ) {
3885 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
3886 if ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) {
3887 ewaldcof_lo = ewaldcof;
3889 ewaldcof_hi = ewaldcof;
3892 PMEEwaldCoefficient = ewaldcof;
3894 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
3896 if ( ! opts.
defined(
"PMEOffload") ) {
3897 PMEOffload = ( (PMEInterpOrder > 4) && one_device_per_node );
3898 if ( PMEOffload )
iout <<
iINFO <<
"Enabling PMEOffload because PMEInterpOrder > 4.\n" <<
endi;
3899 }
else if ( PMEOffload && ! one_device_per_node ) {
3901 iout <<
iWARN <<
"Disabling PMEOffload because multiple CUDA devices per process are not supported.\n" <<
endi;
3903 if ( usePMECUDA && ! ( useCUDA2 || one_device_per_node ) ) {
3905 iout <<
iWARN <<
"Disabling usePMECUDA because multiple CUDA devices per process requires useCUDA2.\n" <<
endi;
3915 PMEGridSpacing = 1000.;
3916 PMEEwaldCoefficient = 0;
3933 if (FMAFFTBlock != 4)
3934 NAMD_die(
"FMAFFTBlock: Block length must be 4 for short FFT's");
3935 if (FMAMp % FMAFFTBlock != 0)
3936 NAMD_die(
"FMAMp: multipole term must be multiple of block length (FMAFFTBlock)");
3939 if ( (nonbondedFrequency > stepsPerCycle) || ( (stepsPerCycle % nonbondedFrequency) != 0) )
3941 NAMD_die(
"stepsPerCycle must be a multiple of nonbondedFreq");
3944 if (!LCPOOn && !GBISOn && !GBISserOn && !FMAOn && !PMEOn && !MSMOn && !fullDirectOn && !FMMOn)
3946 fullElectFrequency = 0;
3950 if (!opts.
defined(
"fullElectFrequency"))
3952 if (opts.
defined(
"fmaFrequency")) {
3953 iout <<
iWARN <<
"The parameter fmaFrequency has been renamed fullElectFrequency.\n" <<
endi;
3954 fullElectFrequency = fmaFrequency;
3956 iout <<
iWARN <<
"The parameter fullElectFrequency now defaults to nonbondedFreq (" << nonbondedFrequency <<
") rather than stepsPerCycle.\n" <<
endi;
3957 fullElectFrequency = nonbondedFrequency;
3962 if (opts.
defined(
"fmaFrequency")) {
3963 iout <<
iWARN <<
"Ignoring redundant parameter fmaFrequency in favor of fullElectFrequency.\n" <<
endi;
3965 if ( (fullElectFrequency > stepsPerCycle) || ( (stepsPerCycle % fullElectFrequency) != 0) )
3967 NAMD_die(
"stepsPerCycle must be a multiple of fullElectFrequency");
3971 if ( (nonbondedFrequency > fullElectFrequency) || ( (fullElectFrequency % nonbondedFrequency) != 0) )
3973 NAMD_die(
"fullElectFrequency must be a multiple of nonbondedFreq");
3976 if (singleTopology && fullElectFrequency > 1)
NAMD_die(
"Single topology free energy calculation discourages multiple timesteps to assure accuracy!");
3977 if (singleTopology && alchDecouple)
NAMD_die(
"Single topology free energy calculation can NOT work with alchDecouple on");
3979 if (multigratorOn) {
3980 if ( (multigratorTemperatureFreq > multigratorPressureFreq) || ( (multigratorPressureFreq % multigratorTemperatureFreq) != 0) )
3982 NAMD_die(
"multigratorTemperatureFreq must be a multiple of multigratorPressureFreq");
3984 if ( (fullElectFrequency > multigratorTemperatureFreq) || ( (multigratorTemperatureFreq % fullElectFrequency) != 0) )
3986 NAMD_die(
"fullElectFrequency must be a multiple of multigratorTemperatureFreq");
3988 if (multigratorNoseHooverChainLength <= 2) {
3989 NAMD_die(
"multigratorNoseHooverChainLength must be greater than 2");
3993 if (!opts.
defined(
"fmaTheta"))
3997 if ( lesOn && ( FMAOn || useDPME || fullDirectOn ) ) {
3998 NAMD_die(
"Sorry, LES is only implemented for PME full electrostatics.");
4000 if ( alchFepOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4001 NAMD_die(
"Sorry, FEP is only implemented for PME full electrostatics.");
4003 if ( alchThermIntOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4004 NAMD_die(
"Sorry, TI is only implemented for PME full electrostatics.");
4006 if ( pairInteractionOn && FMAOn ) {
4007 NAMD_die(
"Sorry, pairInteraction not implemented for FMA.");
4009 if ( pairInteractionOn && useDPME ) {
4010 NAMD_die(
"Sorry, pairInteraction not implemented for DPME.");
4012 if ( pairInteractionOn && fullDirectOn ) {
4013 NAMD_die(
"Sorry, pairInteraction not implemented for full direct electrostatics.");
4015 if ( ! pairInteractionOn ) {
4016 pairInteractionSelf = 0;
4018 if ( pairInteractionOn && !pairInteractionSelf && !config->
find(
"pairInteractionGroup2"))
4019 NAMD_die(
"pairInteractionGroup2 must be specified");
4021 if ( ! fixedAtomsOn ) {
4022 fixedAtomsForces = 0;
4025 if ( gridforceOn || mgridforceOn ) {
4026 parse_mgrid_params(config);
4029 if ( extraBondsOn ) {
4030 extraBondsCosAnglesSetByUser = ! ! config->
find(
"extraBondsCosAngles");
4032 extraBondsCosAnglesSetByUser =
false;
4035 if (!opts.
defined(
"constraints"))
4038 constraintScaling = 1.0;
4041 selectConstraintsOn =
FALSE;
4045 movingConstraintsOn =
FALSE;
4048 rotConstraintsOn =
FALSE;
4053 if (rotConstraintsOn) {
4054 rotConsAxis = rotConsAxis.unit();
4057 if(opts.
defined(
"rotConstraints")
4058 && opts.
defined(
"movingConstraints")) {
4059 NAMD_die(
"Rotating and moving constraints are mutually exclusive!");
4064 if(opts.
defined(
"selectConstraints") && !opts.
defined(
"selectConstrX")
4065 && !opts.
defined(
"selectConstrY") && !opts.
defined(
"selectConstrZ")) {
4066 NAMD_die(
"selectConstraints was specified, but no Cartesian components were defined!");
4068 if (!opts.
defined(
"selectConstraints")) {
4084 if (SMDDir.length2() == 0) {
4085 NAMD_die(
"SMD direction vector must be non-zero");
4088 SMDDir = SMDDir.unit();
4091 if (SMDOutputFreq > 0 && SMDOutputFreq < stepsPerCycle
4092 || SMDOutputFreq % stepsPerCycle != 0) {
4093 NAMD_die(
"SMDOutputFreq must be a multiple of stepsPerCycle");
4101 sphericalBCr1 = 0.0;
4102 sphericalBCk1 = 0.0;
4103 sphericalBCexp1 = 0;
4104 sphericalBCr2 = 0.0;
4105 sphericalBCk2 = 0.0;
4106 sphericalBCexp2 = 0;
4108 else if (!opts.
defined(
"sphericalBCr2"))
4110 sphericalBCr2 = -1.0;
4111 sphericalBCk2 = 0.0;
4112 sphericalBCexp2 = 0;
4115 if (!cylindricalBCOn)
4117 cylindricalBCr1 = 0.0;
4118 cylindricalBCk1 = 0.0;
4119 cylindricalBCexp1 = 0;
4120 cylindricalBCr2 = 0.0;
4121 cylindricalBCk2 = 0.0;
4122 cylindricalBCexp2 = 0;
4123 cylindricalBCl1 = 0.0;
4124 cylindricalBCl2 = 0.0;
4126 else if (!opts.
defined(
"cylindricalBCr2"))
4128 cylindricalBCr2 = -1.0;
4129 cylindricalBCk2 = 0.0;
4130 cylindricalBCexp2 = 0;
4131 cylindricalBCl2 = 0.0;
4144 if (!opts.
defined(
"eFieldFreq")) eFieldFreq = 0.0;
4145 if (!opts.
defined(
"eFieldPhase")) eFieldPhase = 0.0;
4151 stirStartingTheta = 0.0;
4162 if (!opts.
defined(
"langevin"))
4168 if (!opts.
defined(
"loweAndersen"))
4170 loweAndersenTemp = 0.0;
4181 if (daCutoffDist > pairlistDist)
4182 NAMD_die(
"Hydrogen bond cutoff distance must be <= pairlist distance");
4189 if (pairInteractionOn) {
4190 if (outputEnergies != 1) {
4191 iout <<
iWARN <<
"Setting outputEnergies to 1 due to\n";
4192 iout << iWARN <<
"pairInteraction calculations\n" <<
endi;
4196 if (pairInteractionOn || pressureProfileOn) {
4197 if (nonbondedFrequency != 1) {
4198 iout <<
iWARN <<
"Setting nonbondedFreq to 1 due to\n";
4199 iout << iWARN <<
"pairInteraction or pressure profile calculations\n" <<
endi;
4204 if (!opts.
defined(
"outputTiming"))
4206 outputTiming = firstLdbStep;
4207 int ot2 = 10 * outputEnergies;
4208 if ( outputTiming < ot2 ) outputTiming = ot2;
4215 if (opts.
defined(
"QMSecProc")){
4219 qmSecProcOn =
false;
4222 if (opts.
defined(
"qmPrepProc")){
4223 qmPrepProcOn =
true;
4226 qmPrepProcOn =
false;
4229 if (opts.
defined(
"QMParamPDB")){
4230 qmParamPDBDefined =
true;
4233 qmParamPDBDefined =
false;
4236 if (opts.
defined(
"QMBondColumn")){
4243 if ( strcasecmp(qmSoftware,
"orca") != 0 &&
4244 strcasecmp(qmSoftware,
"mopac") != 0 &&
4245 strcasecmp(qmSoftware,
"custom") != 0 ) {
4246 NAMD_die(
"Available QM software options are \'mopac\', \'orca\', or \'custom\'.");
4249 if ( strcasecmp(qmSoftware,
"orca") == 0 )
4251 if ( strcasecmp(qmSoftware,
"mopac") == 0 )
4253 if ( strcasecmp(qmSoftware,
"custom") == 0 )
4258 if (! opts.
defined(
"QMConfigLine"))
4259 NAMD_die(
"If the selected QM software is \'mopac\' or \'orca\'\
4260 , QMConfigLine needs to be defined.");
4266 if (opts.
defined(
"QMChargeMode")) {
4267 if ( strcasecmp(qmChrgModeS,
"none") != 0 &&
4268 strcasecmp(qmChrgModeS,
"mulliken") != 0 &&
4269 strcasecmp(qmChrgModeS,
"chelpg") != 0) {
4270 NAMD_die(
"Available charge options are \'none\', \'mulliken\' or \'chelpg\'.");
4273 if ( strcasecmp(qmChrgModeS,
"none") == 0 )
4275 if ( strcasecmp(qmChrgModeS,
"mulliken") == 0 )
4277 if ( strcasecmp(qmChrgModeS,
"chelpg") == 0 )
4283 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4286 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4288 if (qmBondOn && (opts.
defined(
"QMBondValueType"))) {
4289 if ( strcasecmp(qmBondValueTypeS,
"len") != 0 &&
4290 strcasecmp(qmBondValueTypeS,
"ratio") != 0 ) {
4291 NAMD_die(
"Available QM bond value type options are \'len\' or \'ratio\'.");
4296 if ( strcasecmp(qmBondValueTypeS,
"len") == 0 )
4298 if ( strcasecmp(qmBondValueTypeS,
"ratio") == 0 )
4302 else if (qmBondOn && ! (opts.
defined(
"QMBondValueType")))
4305 if ( strcmp(qmColumn,
"beta") != 0 &&
4306 strcmp(qmColumn,
"occ") != 0 ) {
4307 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4311 if ( strcmp(qmBondColumn,
"beta") != 0 &&
4312 strcmp(qmBondColumn,
"occ") != 0 ) {
4313 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4316 if (strcmp(qmBondColumn,qmColumn) == 0)
4317 NAMD_die(
"QM column and bond-column must be different!");
4321 if (opts.
defined(
"QMBondScheme")) {
4322 if ( strcasecmp(qmBondSchemeS,
"CS") == 0 )
4324 if ( strcasecmp(qmBondSchemeS,
"RCD") == 0 )
4326 if ( strcasecmp(qmBondSchemeS,
"Z1") == 0 )
4328 if ( strcasecmp(qmBondSchemeS,
"Z2") == 0 )
4330 if ( strcasecmp(qmBondSchemeS,
"Z3") == 0 )
4338 if (opts.
defined(
"QMPointChargeScheme") && qmPCSwitchOn) {
4339 if ( strcasecmp(qmPCSchemeS,
"none") == 0 )
4342 if ( strcasecmp(qmPCSchemeS,
"round") == 0 )
4344 if ( strcasecmp(qmPCSchemeS,
"zero") == 0 )
4347 if ( qmPCScheme > 1 && ! qmPCSwitchOn)
4348 NAMD_die(
"QM Charge Schemes \'round\' or \'zero\' can only be applied with QMswitching set to \'on\'!");
4360 NAMD_die(
"QM Live Solvent Selection cannot be done with QMNoPntChrg set to \'on\'!") ;
4363 NAMD_die(
"QM Live Solvent Selection cannot be done with fixed bonds!") ;
4365 if (qmLSSFreq % qmPCSelFreq != 0)
4366 NAMD_die(
"Frequency of QM solvent update must be a multiple of frequency of point charge selection.");
4368 if (qmLSSFreq % stepsPerCycle != 0)
4369 NAMD_die(
"Frequency of QM solvent update must be a multiple of steps per cycle.");
4371 if (opts.
defined(
"QMLSSMode") ) {
4372 if ( strcasecmp(qmLSSModeS,
"dist") != 0 &&
4373 strcasecmp(qmLSSModeS,
"COM") != 0 ) {
4374 NAMD_die(
"Available LSS mode options are \'dist\' and \'COM\'.");
4376 if ( strcasecmp(qmLSSModeS,
"dist") == 0 )
4378 else if ( strcasecmp(qmLSSModeS,
"COM") == 0 )
4389 if (opts.
defined(
"QMSwitchingType") ) {
4390 if ( strcasecmp(qmPCSwitchTypeS,
"shift") != 0 &&
4391 strcasecmp(qmPCSwitchTypeS,
"switch") != 0 ) {
4392 NAMD_die(
"Available scaling options are \'shift\' and \'switch\'.");
4394 if ( strcasecmp(qmPCSwitchTypeS,
"shift") == 0 )
4396 else if ( strcasecmp(qmPCSwitchTypeS,
"switch") == 0 )
4403 if (qmNoPC && qmPCSelFreq > 1) {
4404 iout <<
iWARN <<
"QMPCStride being IGNORED since QMNoPntChrg is set to \'on\'!\n" <<
endi;
4408 if (qmNoPC && qmPCSwitchOn)
4409 NAMD_die(
"QM PC switching can only be applied with QMNoPntChrg set to \'off\'!");
4414 if (qmPCSelFreq <= 0)
4415 NAMD_die(
"QMPCFreq can only be a positive number! For static point charge selection, see QMCutomPC.");
4417 if (qmCustomPCSel && qmNoPC)
4418 NAMD_die(
"QM Custom PC Selection is incompatible with QMNoPntChrg!");
4423 if (qmCustomPCSel && qmPCSelFreq > 1)
4424 NAMD_die(
"QM Custom PC Selection is incompatible with QMPCStride > 1!");
4426 if (qmCSMD && (! opts.
defined(
"QMCSMDFile") ))
4427 NAMD_die(
"QM Conditional SMD is ON, but no CSMD configuration file was profided!");
4430 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
4433 if ( useCUDAdisable ) {
4434 if ( drudeOn && useCUDA2 && (bondedCUDA & 0x0001) ) {
4436 bondedCUDA &= ~0x0001;
4437 iout <<
iWARN <<
"Disabling CUDA kernel for bonds due to incompatibility with Drude oscillators.\n";
4439 if ( accelMDOn && (accelMDdihe || accelMDdual) && useCUDA2 && (bondedCUDA & (0x0004 | 0x0020)) ) {
4441 bondedCUDA &= ~(0x0004 | 0x0020);
4442 iout <<
iWARN <<
"Disabling CUDA kernels for dihedrals and crossterms due to incompatibility with accelerated MD options.\n";
4447 #ifdef NAMD_AVXTILES
4448 if (avxTilesCommandLineDisable) useAVXTiles =
FALSE;
4450 if (alchOn || lesOn || tabulatedEnergies || drudeOn || goForcesOn ||
4451 pressureProfileOn || qmForcesOn) {
4452 useAVXTiles =
FALSE;
4453 iout <<
iWARN <<
"Disabling AVX tiles optimizations due to "
4454 <<
"incompatible simulation params.\n";
4458 useAVXTiles =
FALSE;
4470 iout <<
iINFO <<
"SIMULATION PARAMETERS:\n";
4471 iout << iINFO <<
"TIMESTEP " << dt <<
"\n" <<
endi;
4472 iout << iINFO <<
"NUMBER OF STEPS " << N <<
"\n";
4473 iout << iINFO <<
"STEPS PER CYCLE " << stepsPerCycle <<
"\n";
4476 if ( lattice.a_p() || lattice.b_p() || lattice.c_p() ) {
4477 if ( lattice.a_p() )
4478 iout << iINFO <<
"PERIODIC CELL BASIS 1 " << lattice.a() <<
"\n";
4479 if ( lattice.b_p() )
4480 iout << iINFO <<
"PERIODIC CELL BASIS 2 " << lattice.b() <<
"\n";
4481 if ( lattice.c_p() )
4482 iout << iINFO <<
"PERIODIC CELL BASIS 3 " << lattice.c() <<
"\n";
4483 iout << iINFO <<
"PERIODIC CELL CENTER " << lattice.origin() <<
"\n";
4485 iout << iINFO <<
"WRAPPING WATERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
4488 iout << iINFO <<
"WRAPPING ALL CLUSTERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
4491 iout << iINFO <<
"WRAPPING TO IMAGE NEAREST TO PERIODIC CELL CENTER.\n";
4496 if ( CkNumPes() > 512 ) ldbUnloadOne =
TRUE;
4497 if ( ldbUnloadOne || CkNumPes() > 128 ) ldbUnloadZero =
TRUE;
4500 iout << iINFO <<
"LOAD BALANCER None\n" <<
endi;
4503 iout << iINFO <<
"LOAD BALANCER Centralized\n" <<
endi;
4505 iout << iINFO <<
"LOAD BALANCER Hybrid\n" <<
endi;
4509 iout << iINFO <<
"LOAD BALANCING STRATEGY New Load Balancers -- DEFAULT\n";
4511 iout << iINFO <<
"LOAD BALANCING STRATEGY Refinement Only\n";
4513 iout << iINFO <<
"LOAD BALANCING STRATEGY Comprehensive\n";
4515 iout << iINFO <<
"LOAD BALANCING STRATEGY Old Load Balancers\n";
4518 iout << iINFO <<
"LDB PERIOD " << ldbPeriod <<
" steps\n";
4519 iout << iINFO <<
"FIRST LDB TIMESTEP " << firstLdbStep <<
"\n";
4521 iout << iINFO <<
"HYBRIDLB GROUP SIZE " << hybridGroupSize <<
"\n";
4522 iout << iINFO <<
"LAST LDB TIMESTEP " << lastLdbStep <<
"\n";
4523 if ( ldbRelativeGrainsize > 0. )
4524 iout << iINFO <<
"LDB RELATIVE GRAINSIZE " << ldbRelativeGrainsize <<
"\n";
4525 iout << iINFO <<
"LDB BACKGROUND SCALING " << ldbBackgroundScaling <<
"\n";
4526 iout << iINFO <<
"HOM BACKGROUND SCALING " << ldbHomeBackgroundScaling <<
"\n";
4528 iout << iINFO <<
"PME BACKGROUND SCALING "
4529 << ldbPMEBackgroundScaling <<
"\n";
4531 iout << iINFO <<
"REMOVING LOAD FROM PME NODES" <<
"\n";
4533 if ( ldbUnloadZero )
iout << iINFO <<
"REMOVING LOAD FROM NODE 0\n";
4534 if ( ldbUnloadOne )
iout << iINFO <<
"REMOVING LOAD FROM NODE 1\n";
4535 if ( ldbUnloadOutputPEs )
iout << iINFO <<
"REMOVING LOAD FROM OUTPUT PES\n";
4539 if ( ldbUnloadOne || CkNumPes() > 256 ) noPatchesOnOne =
TRUE;
4540 if ( ldbUnloadZero || noPatchesOnOne ||
4541 CkNumPes() > 64 || ( IMDon && CkNumPes() > 8 ) ) {
4542 noPatchesOnZero =
TRUE;
4544 if ( noPatchesOnZero )
iout << iINFO <<
"REMOVING PATCHES FROM PROCESSOR 0\n";
4545 if ( noPatchesOnOne )
iout << iINFO <<
"REMOVING PATCHES FROM PROCESSOR 1\n";
4548 #if defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC)
4549 maxSelfPart = maxPairPart = 1;
4553 iout << iINFO <<
"MAX SELF PARTITIONS " << maxSelfPart <<
"\n"
4554 << iINFO <<
"MAX PAIR PARTITIONS " << maxPairPart <<
"\n"
4555 << iINFO <<
"SELF PARTITION ATOMS " << numAtomsSelf <<
"\n"
4556 << iINFO <<
"SELF2 PARTITION ATOMS " << numAtomsSelf2 <<
"\n"
4557 << iINFO <<
"PAIR PARTITION ATOMS " << numAtomsPair <<
"\n"
4558 << iINFO <<
"PAIR2 PARTITION ATOMS " << numAtomsPair2 <<
"\n";
4560 iout << iINFO <<
"MIN ATOMS PER PATCH " << minAtomsPerPatch <<
"\n"
4561 << iINFO <<
"EMPTY PATCH LOAD " << emptyPatchLoad <<
" ATOMS\n"
4564 if (initialTemp < 0)
4566 current = config->
find(
"velocities");
4568 if (current == NULL)
4570 current = config->
find(
"binvelocities");
4573 iout << iINFO <<
"VELOCITY FILE " << current->
data <<
"\n";
4577 iout << iINFO <<
"INITIAL TEMPERATURE "
4578 << initialTemp <<
"\n";
4582 iout << iINFO <<
"CENTER OF MASS MOVING INITIALLY? ";
4594 if ( zeroMomentum ) {
4595 iout << iINFO <<
"REMOVING CENTER OF MASS DRIFT DURING SIMULATION";
4596 if ( zeroMomentumAlt )
iout <<
" (ALT METHOD)";
4600 iout << iINFO <<
"DIELECTRIC "
4601 << dielectric <<
"\n";
4603 if ( nonbondedScaling != 1.0 )
4605 iout << iINFO <<
"NONBONDED SCALING " << nonbondedScaling <<
"\n" <<
endi;
4607 iout << iINFO <<
"EXCLUDE ";
4618 iout <<
"ONETHREE\n";
4621 iout <<
"ONE-FOUR\n";
4624 iout <<
"SCALED ONE-FOUR\n";
4631 iout << iINFO <<
"1-4 ELECTROSTATICS SCALED BY " << scale14 <<
"\n";
4632 iout << iINFO <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE USED\n" <<
endi;
4634 iout <<
iWARN <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE IGNORED\n" <<
endi;
4637 #ifdef SPEC_DISABLED_VERSION
4638 if (dcdFrequency > 0) {
4640 iout <<
iWARN <<
"DCD TRAJECTORY OUTPUT IS DISABLED IN SPEC RELEASE\n";
4644 if (dcdFrequency > 0)
4646 iout << iINFO <<
"DCD FILENAME "
4647 << dcdFilename <<
"\n";
4648 iout << iINFO <<
"DCD FREQUENCY "
4649 << dcdFrequency <<
"\n";
4650 iout << iINFO <<
"DCD FIRST STEP "
4651 << ( ((firstTimestep + dcdFrequency)/dcdFrequency)*dcdFrequency ) <<
"\n";
4652 if ( dcdUnitCell ) {
4653 iout << iINFO <<
"DCD FILE WILL CONTAIN UNIT CELL DATA\n";
4658 iout << iINFO <<
"NO DCD TRAJECTORY OUTPUT\n";
4662 if (xstFrequency > 0)
4664 iout << iINFO <<
"XST FILENAME "
4665 << xstFilename <<
"\n";
4666 iout << iINFO <<
"XST FREQUENCY "
4667 << xstFrequency <<
"\n";
4671 iout << iINFO <<
"NO EXTENDED SYSTEM TRAJECTORY OUTPUT\n";
4675 if (velDcdFrequency > 0)
4677 iout << iINFO <<
"VELOCITY DCD FILENAME "
4678 << velDcdFilename <<
"\n";
4679 iout << iINFO <<
"VELOCITY DCD FREQUENCY "
4680 << velDcdFrequency <<
"\n";
4681 iout << iINFO <<
"VELOCITY DCD FIRST STEP "
4682 << ( ((firstTimestep + velDcdFrequency)/velDcdFrequency)*velDcdFrequency ) <<
"\n";
4686 iout << iINFO <<
"NO VELOCITY DCD OUTPUT\n";
4690 if (forceDcdFrequency > 0)
4692 iout << iINFO <<
"FORCE DCD FILENAME "
4693 << forceDcdFilename <<
"\n";
4694 iout << iINFO <<
"FORCE DCD FREQUENCY "
4695 << forceDcdFrequency <<
"\n";
4696 iout << iINFO <<
"FORCE DCD FIRST STEP "
4697 << ( ((firstTimestep + forceDcdFrequency)/forceDcdFrequency)*forceDcdFrequency ) <<
"\n";
4701 iout << iINFO <<
"NO FORCE DCD OUTPUT\n";
4705 iout << iINFO <<
"OUTPUT FILENAME "
4706 << outputFilename <<
"\n" <<
endi;
4709 iout << iINFO <<
"BINARY OUTPUT FILES WILL BE USED\n" <<
endi;
4711 #ifdef MEM_OPT_VERSION
4713 iout <<
iWARN <<
"SINCE MEMORY OPTIMIZED VERSION IS USED, OUTPUT IN TEXT FORMAT IS DISABLED!\n" <<
endi;
4714 binaryOutput =
TRUE;
4718 if (! restartFrequency)
4720 iout << iINFO <<
"NO RESTART FILE\n";
4724 iout << iINFO <<
"RESTART FILENAME "
4725 << restartFilename <<
"\n";
4726 iout << iINFO <<
"RESTART FREQUENCY "
4727 << restartFrequency <<
"\n";
4729 iout << iINFO <<
"RESTART FILES WILL NOT BE OVERWRITTEN\n";
4731 if (restartSaveDcd) {
4732 iout << iINFO <<
"DCD FILE WILL BE SPLIT WHEN RESTART FILES ARE WRITTEN\n";
4737 iout << iINFO <<
"BINARY RESTART FILES WILL BE USED\n";
4742 if (switchingActive)
4744 iout << iINFO <<
"SWITCHING ACTIVE\n";
4745 if ( vdwForceSwitching ) {
4746 iout << iINFO <<
"VDW FORCE SWITCHING ACTIVE\n";
4748 if ( martiniSwitching ) {
4749 iout << iINFO <<
"MARTINI RESIDUE-BASED COARSE-GRAIN SWITCHING ACTIVE\n";
4751 iout << iINFO <<
"SWITCHING ON "
4752 << switchingDist <<
"\n";
4753 iout << iINFO <<
"SWITCHING OFF "
4758 iout << iINFO <<
"CUTOFF "
4762 iout << iINFO <<
"PAIRLIST DISTANCE " << pairlistDist <<
"\n";
4763 iout << iINFO <<
"PAIRLIST SHRINK RATE " << pairlistShrink <<
"\n";
4764 iout << iINFO <<
"PAIRLIST GROW RATE " << pairlistGrow <<
"\n";
4765 iout << iINFO <<
"PAIRLIST TRIGGER " << pairlistTrigger <<
"\n";
4766 iout << iINFO <<
"PAIRLISTS PER CYCLE " << pairlistsPerCycle <<
"\n";
4767 if ( outputPairlists )
4768 iout << iINFO <<
"PAIRLIST OUTPUT STEPS " << outputPairlists <<
"\n";
4771 if ( pairlistMinProcs > 1 )
4772 iout << iINFO <<
"REQUIRING " << pairlistMinProcs <<
" PROCESSORS FOR PAIRLISTS\n";
4773 usePairlists = ( CkNumPes() >= pairlistMinProcs );
4775 #ifdef OPENATOM_VERSION
4778 iout << iINFO <<
"OPENATOM QM/MM CAR-PARINELLO ACTIVE\n";
4779 iout << iINFO <<
"OPENATOM CONFIG FILE: " << openatomConfig <<
"\n";
4780 iout << iINFO <<
"OPENATOM STRUCT FILE: " << openatomStruct <<
"\n";
4781 iout << iINFO <<
"OPENATOM PDB FILE: " << openatomPDB <<
"\n";
4783 #endif // OPENATOM_VERSION
4786 if ( (alchOn) && (!usePairlists)) {
4787 NAMD_die(
"Sorry, Alchemical simulations require pairlists to be enabled\n");
4789 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
4790 if ( ! usePairlists ) {
4792 iout << iINFO <<
"CUDA ACCELERATION REQUIRES PAIRLISTS\n";
4796 iout << iINFO <<
"PAIRLISTS " << ( usePairlists ?
"ENABLED" :
"DISABLED" )
4799 iout << iINFO <<
"MARGIN " << margin <<
"\n";
4800 if ( margin > 4.0 ) {
4801 iout <<
iWARN <<
"MARGIN IS UNUSUALLY LARGE AND WILL LOWER PERFORMANCE\n";
4802 BigReal f = patchDimension/(patchDimension-margin);
4804 iout << iWARN <<
"MARGIN INCREASED PATCH VOLUME BY A FACTOR OF " << f <<
"\n";
4808 iout << iINFO <<
"HYDROGEN GROUP CUTOFF " << hgroupCutoff <<
"\n";
4811 iout << iINFO <<
"PATCH DIMENSION "
4812 << patchDimension <<
"\n";
4816 if (outputEnergies != 1)
4818 iout << iINFO <<
"ENERGY OUTPUT STEPS "
4819 << outputEnergies <<
"\n";
4823 if (mergeCrossterms) {
4824 iout << iINFO <<
"CROSSTERM ENERGY INCLUDED IN DIHEDRAL\n" <<
endi;
4827 if (outputMomenta != 0)
4829 iout << iINFO <<
"MOMENTUM OUTPUT STEPS "
4830 << outputMomenta <<
"\n";
4834 if (outputTiming != 0)
4836 iout << iINFO <<
"TIMING OUTPUT STEPS "
4837 << outputTiming <<
"\n";
4841 if (outputCudaTiming != 0)
4843 iout << iINFO <<
"CUDA TIMING OUTPUT STEPS "
4844 << outputCudaTiming <<
"\n";
4848 if (outputPressure != 0)
4850 iout << iINFO <<
"PRESSURE OUTPUT STEPS "
4851 << outputPressure <<
"\n";
4857 iout << iINFO <<
"FIXED ATOMS ACTIVE\n";
4858 if ( fixedAtomsForces )
4859 iout << iINFO <<
"FORCES BETWEEN FIXED ATOMS ARE CALCULATED\n";
4865 iout << iINFO <<
"HARMONIC CONSTRAINTS ACTIVE\n";
4867 iout << iINFO <<
"HARMONIC CONS EXP "
4868 << constraintExp <<
"\n";
4870 if (constraintScaling != 1.0) {
4871 iout << iINFO <<
"HARMONIC CONS SCALING "
4872 << constraintScaling <<
"\n";
4877 if (selectConstraintsOn) {
4878 iout << iINFO <<
"SELECTED CARTESIAN COMPONENTS OF HARMONIC RESTRAINTS ACTIVE\n";
4881 iout << iINFO <<
"RESTRAINING X-COMPONENTS OF CARTESIAN COORDINATES!\n";
4884 iout << iINFO <<
"RESTRAINING Y-COMPONENTS OF CARTESIAN COORDINATES!\n";
4887 iout << iINFO <<
"RESTRAINING Z-COMPONENTS OF CARTESIAN COORDINATES!\n";
4891 if (sphericalConstraintsOn) {
4892 iout << iINFO <<
"SPHERICAL HARMONIC CONSTRAINTS ACTIVE\n";
4893 iout << iINFO <<
"RESTRAINING DISTANCE TO " << sphericalConstrCenter <<
"\n";
4899 if (movingConstraintsOn) {
4900 iout << iINFO <<
"MOVING HARMONIC CONSTRAINTS ACTIVE\n";
4902 iout << iINFO <<
"MOVING CONSTRAINT VELOCITY "
4903 << movingConsVel <<
" ANGSTROM/TIMESTEP\n";
4905 iout << iINFO <<
"ALL CONSTRAINED ATOMS WILL MOVE\n";
4912 if (rotConstraintsOn) {
4913 iout << iINFO <<
"ROTATING HARMONIC CONSTRAINTS ACTIVE\n";
4915 iout << iINFO <<
"AXIS OF ROTATION "
4916 << rotConsAxis <<
"\n";
4918 iout << iINFO <<
"PIVOT OF ROTATION "
4919 << rotConsPivot <<
"\n";
4921 iout << iINFO <<
"ROTATING CONSTRAINT VELOCITY "
4922 << rotConsVel <<
" DEGREES/TIMESTEP\n";
4930 iout << iINFO <<
"MOVING DRAG ACTIVE.\n";
4932 iout << iINFO <<
"MOVING DRAG MAIN PDB FILE "
4933 << movDragFile <<
"\n";
4935 iout << iINFO <<
"MOVING DRAG GLOBAL VELOCITY (A/step) "
4936 << movDragGlobVel <<
"\n";
4938 iout << iINFO <<
"MOVING DRAG LINEAR VELOCITY FILE "
4939 << movDragVelFile <<
"\n";
4946 iout << iINFO <<
"ROTATING DRAG ACTIVE.\n";
4948 iout << iINFO <<
"ROTATING DRAG MAIN PDB FILE "
4949 << rotDragFile <<
"\n";
4951 iout << iINFO <<
"ROTATING DRAG AXIS FILE "
4952 << rotDragAxisFile <<
"\n";
4954 iout << iINFO <<
"ROTATING DRAG PIVOT POINT FILE "
4955 << rotDragPivotFile <<
"\n";
4957 iout << iINFO <<
"ROTATING DRAG GLOBAL ANGULAR VELOCITY (deg/step) "
4958 << rotDragGlobVel <<
"\n";
4960 iout << iINFO <<
"ROTATING DRAG ANGULAR VELOCITY FILE "
4961 << rotDragVelFile <<
"\n";
4969 iout << iINFO <<
"\"CONSTANT\" TORQUE ACTIVE.\n";
4971 iout << iINFO <<
"\"CONSTANT\" TORQUE MAIN PDB FILE "
4972 << consTorqueFile <<
"\n";
4974 iout << iINFO <<
"\"CONSTANT\" TORQUE AXIS FILE "
4975 << consTorqueAxisFile <<
"\n";
4977 iout << iINFO <<
"\"CONSTANT\" TORQUE PIVOT POINT FILE "
4978 << consTorquePivotFile <<
"\n";
4980 iout << iINFO <<
"\"CONSTANT\" TORQUE GLOBAL VALUE (Kcal/(mol*A^2)) "
4981 << consTorqueGlobVal <<
"\n";
4983 iout << iINFO <<
"\"CONSTANT\" TORQUE DACTORS FILE "
4984 << consTorqueValFile <<
"\n";
4990 iout << iINFO <<
"GRID FORCE ACTIVE\n";
4991 iout << iINFO <<
" Please include this reference in published work using\n";
4992 iout << iINFO <<
" the Gridforce module of NAMD: David Wells, Volha Abramkina,\n";
4993 iout << iINFO <<
" and Aleksei Aksimentiev, J. Chem. Phys. 127:125101-10 (2007).\n";
4994 print_mgrid_params();
5000 iout << iINFO <<
"SMD ACTIVE\n";
5002 iout << iINFO <<
"SMD VELOCITY "
5003 << SMDVel <<
" ANGSTROM/TIMESTEP\n";
5005 iout << iINFO <<
"SMD DIRECTION "
5008 iout << iINFO <<
"SMD K "
5011 iout << iINFO <<
"SMD K2 "
5014 iout << iINFO <<
"SMD OUTPUT FREQUENCY "
5015 << SMDOutputFreq <<
" TIMESTEPS\n";
5017 iout << iINFO <<
"SMD FILE " << SMDFile <<
"\n";
5025 iout << iINFO <<
"TMD ACTIVE BETWEEN STEPS " << TMDFirstStep
5026 <<
" and " << TMDLastStep <<
"\n";
5027 iout << iINFO <<
"TMD K " << TMDk <<
"\n";
5028 iout << iINFO <<
"TMD FILE " << TMDFile <<
"\n";
5029 iout << iINFO <<
"TMD OUTPUT FREQUENCY " << TMDOutputFreq <<
"\n";
5030 if (TMDInitialRMSD) {
5031 iout << iINFO <<
"TMD TARGET RMSD AT FIRST STEP " << TMDInitialRMSD <<
"\n";
5033 iout << iINFO <<
"TMD TARGET RMSD AT FIRST STEP COMPUTED FROM INITIAL COORDINATES\n";
5035 iout << iINFO <<
"TMD TARGET RMSD AT FINAL STEP " << TMDFinalRMSD <<
"\n";
5040 if (symmetryLastStep == -1){
5041 iout << iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " <<
"INFINITY" <<
"\n";
5044 iout << iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " << symmetryLastStep <<
"\n";
5048 current = config->
find(
"symmetryFile");
5049 for ( ; current; current = current->
next ) {
5050 iout << iINFO <<
"SYMMETRY FILE " << current->
data <<
"\n";
5053 current = config->
find(
"symmetryMatrixFile");
5054 for ( ; current; current = current->
next ) {
5055 iout << iINFO <<
"SYMMETRY MATRIX FILE " << current->
data <<
"\n";
5057 iout << iINFO <<
"SYMMETRY FORCE CONSTANT " << symmetryk <<
"\n";
5058 if (symmetryScaleForces){
5059 iout << iINFO <<
"SYMMETRY SCALE FORCES ON\n";
5061 iout << iINFO <<
"SYMMETRY FIRST FULL STEP " << symmetryFirstFullStep <<
"\n";
5062 if (symmetryLastFullStep == -1){
5063 iout << iINFO <<
"SYMMETRY LAST FULL STEP " <<
"INFINITY" <<
"\n";
5067 iout << iINFO <<
"SYMMETRY LAST FULL STEP " << symmetryLastFullStep <<
"\n";
5079 iout << iINFO <<
"ALCHEMICAL FEP ON\n";
5080 iout << iINFO <<
"FEP CURRENT LAMBDA VALUE "
5081 << alchLambda <<
"\n";
5082 iout << iINFO <<
"FEP COMPARISON LAMBDA VALUE "
5083 << alchLambda2 <<
"\n";
5084 if (alchLambdaIDWS >= 0.) {
5085 iout << iINFO <<
"FEP ALTERNATE COMPARISON LAMBDA VALUE "
5086 << alchLambdaIDWS <<
"\n";
5088 if (alchLambdaFreq > 0) {
5089 iout << iINFO <<
"FEP CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY "
5090 << alchLambdaFreq <<
" STEPS\n";
5092 if (!alchDecouple) {
5093 iout << iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE "
5096 iout << iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE "
5099 if (alchBondDecouple) {
5100 iout << iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE "
5103 iout << iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE "
5107 iout << iINFO <<
"FEP WEEKS-CHANDLER-ANDERSEN (WCA) VDW DECOUPLING "
5110 iout << iINFO <<
"FEP VDW SHIFTING COEFFICIENT "
5111 << alchVdwShiftCoeff <<
"\n";
5113 iout << iINFO <<
"FEP ELEC. ACTIVE FOR ANNIHILATED "
5114 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = "
5115 << (1 - alchElecLambdaStart) <<
"\n";
5116 iout << iINFO <<
"FEP ELEC. ACTIVE FOR EXNIHILATED "
5117 <<
"PARTICLES BETWEEN LAMBDA = "
5118 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
5120 iout << iINFO <<
"FEP VDW-REPU. ACTIVE FOR ANNIHILATED PARTICLES "
5121 <<
"BETWEEN LAMBDA = " << (1 - alchRepLambdaEnd) <<
" AND LAMBDA "
5123 iout << iINFO <<
"FEP VDW-REPU. ACTIVE FOR EXNIHILATED PARTICLES "
5124 <<
"BETWEEN LAMBDA = 0 AND LAMBDA " << alchRepLambdaEnd <<
"\n";
5125 iout << iINFO <<
"FEP VDW-ATTR. ACTIVE FOR ANNIHILATED PARTICLES "
5126 <<
"BETWEEN LAMBDA = " << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = "
5127 << (1 - alchRepLambdaEnd) <<
"\n";
5128 iout << iINFO <<
"FEP VDW-ATTR. ACTIVE FOR EXNIHILATED PARTICLES "
5129 <<
"BETWEEN LAMBDA = " << alchRepLambdaEnd <<
" AND LAMBDA = "
5130 << alchVdwLambdaEnd <<
"\n";
5132 iout << iINFO <<
"FEP VDW ACTIVE FOR ANNIHILATED "
5133 <<
"PARTICLES BETWEEN LAMBDA = "
5134 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
5135 iout << iINFO <<
"FEP VDW ACTIVE FOR EXNIHILATED "
5136 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = "
5137 << alchVdwLambdaEnd <<
"\n";
5139 iout << iINFO <<
"FEP BOND ACTIVE FOR ANNIHILATED "
5140 <<
"PARTICLES BETWEEN LAMBDA = "
5141 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
5142 iout << iINFO <<
"FEP BOND ACTIVE FOR EXNIHILATED "
5143 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = "
5144 << alchBondLambdaEnd <<
"\n";
5150 iout << iINFO <<
"THERMODYNAMIC INTEGRATION (TI) ON\n";
5151 iout << iINFO <<
"TI LAMBDA VALUE "
5152 << alchLambda <<
"\n";
5153 if (alchLambdaFreq > 0) {
5154 iout << iINFO <<
"TI COMPARISON LAMBDA VALUE "
5155 << alchLambda2 <<
"\n";
5156 iout << iINFO <<
"TI CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY "
5157 << alchLambdaFreq <<
" STEPS\n";
5159 if (!alchDecouple) {
5160 iout << iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE "
5163 iout << iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE "
5166 if (alchBondDecouple) {
5167 iout << iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE "
5170 iout << iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE "
5173 iout << iINFO <<
"TI VDW SHIFTING COEFFICIENT "
5174 << alchVdwShiftCoeff <<
"\n";
5175 iout << iINFO <<
"TI ELEC. ACTIVE FOR ANNIHILATED "
5176 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = "
5177 << (1 - alchElecLambdaStart) <<
"\n";
5178 iout << iINFO <<
"TI ELEC. ACTIVE FOR EXNIHILATED "
5179 <<
"PARTICLES BETWEEN LAMBDA = "
5180 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
5181 iout << iINFO <<
"TI VDW ACTIVE FOR ANNIHILATED "
5182 <<
"PARTICLES BETWEEN LAMBDA = "
5183 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
5184 iout << iINFO <<
"TI VDW ACTIVE FOR EXNIHILATED "