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)
252 strcpy(dcdFilename,value);
257 strcpy(velDcdFilename,value);
274 NAMD_die(
"Can't yet modify mgridforcescale in a script");
278 NAMD_die(
"Can't yet modify mgridforcevoff in a script");
283 if ( ! fixedAtomsOn )
284 NAMD_die(
"FixedAtoms may not be enabled in a script.");
285 if ( ! fixedAtomsForces )
286 NAMD_die(
"To use fixedAtoms in script first use fixedAtomsForces yes.");
294 if ( alchOn && ! alchOnAtStartup ) {
295 NAMD_die(
"Alchemy must be enabled at startup to disable and re-enable in script.");
297 alchFepOn = alchOn && alchFepOnAtStartup;
298 alchThermIntOn = alchOn && alchThermIntOnAtStartup;
306 alchLambda = atof(value);
307 if ( alchLambda < 0.0 || 1.0 < alchLambda ) {
308 NAMD_die(
"Alchemical lambda values should be in the range [0.0, 1.0]\n");
315 alchLambda2 = atof(value);
316 if ( alchLambda2 < 0.0 || 1.0 < alchLambda2 ) {
317 NAMD_die(
"Alchemical lambda values should be in the range [0.0, 1.0]\n");
324 alchLambdaIDWS = atof(value);
331 alchLambdaFreq = atoi(value);
332 if ( alchLambdaIDWS >= 0 ) {
333 NAMD_die(
"alchLambdaIDWS and alchLambdaFreq are not compatible.\n");
341 nonbondedScaling = atof(value);
355 soluteScalingFactor = atof(value);
356 if (soluteScalingFactor < 0.0) {
357 NAMD_die(
"Solute scaling factor should be non-negative\n");
359 soluteScalingFactorCharge = soluteScalingFactor;
360 soluteScalingFactorVdw = soluteScalingFactor;
363 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
370 soluteScalingFactorVdw = atof(value);
371 if (soluteScalingFactorVdw < 0.0) {
372 NAMD_die(
"Solute scaling factor for van der Waals "
373 "should be non-negative\n");
377 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
384 soluteScalingFactorCharge = atof(value);
385 if (soluteScalingFactorCharge < 0.0) {
386 NAMD_die(
"Solute scaling factor for electrostatics "
387 "should be non-negative\n");
393 sprintf(error,
"Setting parameter %s from script failed!\n",param);
418 HydrogenBonds =
FALSE;
419 useAntecedent =
TRUE;
424 dhaCutoffAngle = 100.0;
431 config_parser_basic(opts);
432 config_parser_fileio(opts);
433 config_parser_fullelect(opts);
434 config_parser_methods(opts);
435 config_parser_constraints(opts);
436 #ifdef OPENATOM_VERSION
437 config_parser_openatom(opts);
438 #endif // OPENATOM_VERSION
440 config_parser_gridforce(opts);
441 config_parser_mgridforce(opts);
442 config_parser_movdrag(opts);
443 config_parser_rotdrag(opts);
444 config_parser_constorque(opts);
445 config_parser_boundary(opts);
446 config_parser_misc(opts);
450 void SimParameters::config_parser_basic(
ParseOptions &opts) {
455 opts.
optional(
"main",
"obsolete",
"used to flag obsolete options",
459 opts.
require(
"main",
"timestep",
"size of the timestep, in fs",
464 opts.
optional(
"main",
"numsteps",
"number of timesteps to perform",
468 opts.
optional(
"main",
"stepspercycle",
469 "Number of steps between atom migrations",
473 opts.
require(
"main",
"cutoff",
"local electrostatic and Vdw distance",
478 opts.
optional(
"main",
"nonbondedScaling",
"nonbonded scaling factor",
479 &nonbondedScaling, 1.0);
482 opts.
optional(
"main",
"limitDist",
"limit nonbonded below this distance",
486 opts.
require(
"main",
"exclude",
"Electrostatic and VDW exclusion policy",
489 opts.
optional(
"exclude",
"1-4scaling",
"1-4 electrostatic scaling factor",
494 "Should a smoothing function be used?", &switchingActive,
TRUE);
496 opts.
optionalB(
"switching",
"vdwForceSwitching",
497 "Use force switching for vdw?", &vdwForceSwitching,
FALSE);
499 opts.
optional(
"switching",
"switchdist",
500 "Distance for switching function activation",
505 opts.
optionalB(
"main",
"martiniSwitching",
506 "Use Martini residue-based coarse-grain switching?", &martiniSwitching,
FALSE);
507 opts.
optionalB(
"main",
"martiniDielAllow",
508 "Allow use of dielectric != 15.0 when using Martini", &martiniDielAllow,
FALSE);
510 opts.
optional(
"main",
"pairlistdist",
"Pairlist inclusion distance",
515 opts.
optional(
"main",
"pairlistMinProcs",
"Min procs for pairlists",
516 &pairlistMinProcs,1);
519 opts.
optional(
"main",
"pairlistsPerCycle",
"regenerate x times per cycle",
520 &pairlistsPerCycle,2);
523 opts.
optional(
"main",
"outputPairlists",
"how often to print warnings",
524 &outputPairlists, 0);
527 opts.
optional(
"main",
"pairlistShrink",
"tol *= (1 - x) on regeneration",
528 &pairlistShrink,0.01);
531 opts.
optional(
"main",
"pairlistGrow",
"tol *= (1 + x) on trigger",
532 &pairlistGrow, 0.01);
535 opts.
optional(
"main",
"pairlistTrigger",
"trigger is atom > (1 - x) * tol",
536 &pairlistTrigger, 0.3);
539 opts.
optional(
"main",
"temperature",
"initial temperature",
544 opts.
optionalB(
"main",
"COMmotion",
"allow initial center of mass movement",
547 opts.
optionalB(
"main",
"zeroMomentum",
"constrain center of mass",
548 &zeroMomentum,
FALSE);
549 opts.
optionalB(
"zeroMomentum",
"zeroMomentumAlt",
"constrain center of mass",
550 &zeroMomentumAlt,
FALSE);
552 opts.
optionalB(
"main",
"wrapWater",
"wrap waters around periodic boundaries on output",
554 opts.
optionalB(
"main",
"wrapAll",
"wrap all clusters around periodic boundaries on output",
556 opts.
optionalB(
"main",
"wrapNearest",
"wrap to nearest image to cell origin",
557 &wrapNearest,
FALSE);
559 opts.
optional(
"main",
"dielectric",
"dielectric constant",
567 opts.
optional(
"main",
"seed",
"Initial random number seed", &randomSeed);
570 opts.
optional(
"main",
"outputEnergies",
"How often to print energies in timesteps",
574 opts.
optional(
"main",
"outputEnergiesPrecision",
"Output energy precision",
575 &outputEnergiesPrecision, 4);
578 opts.
optional(
"main",
"outputMomenta",
"How often to print linear and angular momenta in timesteps",
582 opts.
optional(
"main",
"outputTiming",
"How often to print timing data in timesteps",
586 opts.
optional(
"main",
"outputCudaTiming",
"How often to print CUDA timing data in timesteps",
587 &outputCudaTiming, 0);
590 opts.
optional(
"main",
"outputPressure",
"How often to print pressure data in timesteps",
594 opts.
optionalB(
"main",
"mergeCrossterms",
"merge crossterm energy with dihedral when printing?",
595 &mergeCrossterms,
TRUE);
597 opts.
optional(
"main",
"MTSAlgorithm",
"Multiple timestep algorithm",
600 opts.
optional(
"main",
"longSplitting",
"Long range force splitting option",
603 opts.
optionalB(
"main",
"ignoreMass",
"Do not use masses to find hydrogen atoms",
606 opts.
optional(
"main",
"splitPatch",
"Atom into patch splitting option",
608 opts.
optional(
"main",
"hgroupCutoff",
"Hydrogen margin", &hgroupCutoff, 2.5);
610 opts.
optional(
"main",
"extendedSystem",
611 "Initial configuration of extended system variables and periodic cell",
614 opts.
optional(
"main",
"cellBasisVector1",
"Basis vector for periodic cell",
616 opts.
optional(
"main",
"cellBasisVector2",
"Basis vector for periodic cell",
618 opts.
optional(
"main",
"cellBasisVector3",
"Basis vector for periodic cell",
620 opts.
optional(
"main",
"cellOrigin",
"Fixed center of periodic cell",
623 opts.
optionalB(
"main",
"molly",
"Rigid bonds to hydrogen",&mollyOn,
FALSE);
624 opts.
optional(
"main",
"mollyTolerance",
"Error tolerance for MOLLY",
626 opts.
optional(
"main",
"mollyIterations",
627 "Max number of iterations for MOLLY", &mollyIter, 100);
630 opts.
optional(
"main",
"rigidTolerance",
631 "Error tolerance for rigid bonds to hydrogen",
633 opts.
optional(
"main",
"rigidIterations",
634 "Max number of SHAKE iterations for rigid bonds to hydrogen",
636 opts.
optionalB(
"main",
"rigidDieOnError",
637 "Die if rigidTolerance is not achieved after rigidIterations",
640 "Use the SETTLE algorithm for rigid waters",
643 opts.
optional(
"main",
"nonbondedFreq",
"Nonbonded evaluation frequency",
644 &nonbondedFrequency, 1);
647 opts.
optionalB(
"main",
"outputPatchDetails",
"print number of atoms in each patch",
648 &outputPatchDetails,
FALSE);
649 opts.
optionalB(
"main",
"staticAtomAssignment",
"never migrate atoms",
650 &staticAtomAssignment,
FALSE);
651 opts.
optionalB(
"main",
"replicaUniformPatchGrids",
"same patch grid size on all replicas",
652 &replicaUniformPatchGrids,
FALSE);
653 #ifndef MEM_OPT_VERSION
656 opts.
optionalB(
"main",
"lonePairs",
"Enable lone pairs", &lonepairs,
TRUE);
660 opts.
optionalB(
"main",
"lonePairs",
"Enable lone pairs", &lonepairs,
FALSE);
663 opts.
optionalB(
"main",
"LJcorrection",
"Apply analytical tail corrections for energy and virial", &LJcorrection,
FALSE);
664 #ifdef TIMER_COLLECTION
665 opts.
optional(
"main",
"TimerBinWidth",
666 "Bin width of timer histogram collection in microseconds",
667 &timerBinWidth, 1.0);
669 #if defined(NAMD_NVTX_ENABLED) || defined(NAMD_CMK_TRACE_ENABLED) || defined(NAMD_ROCTX_ENABLED)
671 opts.
optional(
"main",
"beginEventPatchID",
"Beginning patch ID for profiling",
672 &beginEventPatchID, 0);
673 opts.
optional(
"main",
"endEventPatchID",
"Ending patch ID for profiling",
674 &endEventPatchID, 5000);
676 opts.
optional(
"main",
"beginEventStep",
"Beginning time step for profiling",
678 opts.
optional(
"main",
"endEventStep",
"Ending time step for profiling",
679 &endEventStep, 1000);
683 void SimParameters::config_parser_fileio(
ParseOptions &opts) {
695 opts.
optional(
"main",
"coordinates",
"initial PDB coordinate file",
699 "initial velocities, given as a PDB file",
PARSE_STRING);
700 opts.
optional(
"main",
"binvelocities",
701 "initial velocities, given as a binary restart",
PARSE_STRING);
702 opts.
optional(
"main",
"bincoordinates",
703 "initial coordinates in a binary restart file",
PARSE_STRING);
704 #ifdef MEM_OPT_VERSION
705 opts.
optional(
"main",
"binrefcoords",
706 "reference coordinates in a binary restart file",
PARSE_STRING);
711 opts.
optional(
"main",
"structure",
"initial PSF structure file",
718 "CHARMm 19 or CHARMm 22 compatable force field file (multiple "
724 opts.
optionalB(
"parameters",
"paraTypeXplor",
"Parameter file in Xplor format?", ¶TypeXplorOn,
FALSE);
725 opts.
optionalB(
"parameters",
"paraTypeCharmm",
"Parameter file in Charmm format?", ¶TypeCharmmOn,
FALSE);
729 opts.
optionalB(
"main",
"GromacsPair",
"Separately calculate pair interactions", &goGroPair,
FALSE);
730 opts.
optionalB(
"main",
"GoForcesOn",
"Go forces will be calculated", &goForcesOn,
FALSE);
731 opts.
require(
"GoForcesOn",
"GoParameters",
"Go parameter file", goParameters);
732 opts.
require(
"GoForcesOn",
"GoCoordinates",
"target coordinates for Go forces", goCoordinates);
737 opts.
require(
"GoForcesOn",
"GoMethod",
"Which type of matrix should be used to store Go contacts?",
PARSE_STRING);
740 opts.
require(
"main",
"outputname",
741 "prefix for the final PDB position and velocity filenames",
744 opts.
optional(
"main",
"auxFile",
"Filename for data stream output",
747 opts.
optional(
"main",
"numinputprocs",
"Number of pes to use for parallel input",
751 opts.
optional(
"main",
"numoutputprocs",
"Number of pes to use for parallel output",
754 opts.
optional(
"main",
"numoutputwriters",
"Number of output processors that simultaneously write to an output file",
758 opts.
optional(
"main",
"DCDfreq",
"Frequency of DCD trajectory output, in "
759 "timesteps", &dcdFrequency, 0);
761 opts.
optional(
"DCDfreq",
"DCDfile",
"DCD trajectory output file name",
763 opts.
optionalB(
"DCDfreq",
"DCDunitcell",
"Store unit cell in dcd timesteps?",
766 opts.
optional(
"main",
"velDCDfreq",
"Frequency of velocity "
767 "DCD output, in timesteps", &velDcdFrequency, 0);
769 opts.
optional(
"velDCDfreq",
"velDCDfile",
"velocity DCD output file name",
772 opts.
optional(
"main",
"forceDCDfreq",
"Frequency of force"
773 "DCD output, in timesteps", &forceDcdFrequency, 0);
775 opts.
optional(
"forceDCDfreq",
"forceDCDfile",
"force DCD output file name",
778 opts.
optional(
"main",
"XSTfreq",
"Frequency of XST trajectory output, in "
779 "timesteps", &xstFrequency, 0);
781 opts.
optional(
"XSTfreq",
"XSTfile",
"Extended sytem trajectory output "
782 "file name", xstFilename);
784 opts.
optional(
"main",
"restartfreq",
"Frequency of restart file "
785 "generation", &restartFrequency, 0);
787 opts.
optional(
"restartfreq",
"restartname",
"Prefix for the position and "
788 "velocity PDB files used for restarting", restartFilename);
789 opts.
optionalB(
"restartfreq",
"restartsave",
"Save restart files with "
790 "unique filenames rather than overwriting", &restartSave,
FALSE);
791 opts.
optionalB(
"restartfreq",
"restartsavedcd",
"Save DCD files with "
792 "unique filenames at each restart", &restartSaveDcd,
FALSE);
794 opts.
optionalB(
"restartfreq",
"binaryrestart",
"Specify use of binary restart files ",
795 &binaryRestart,
TRUE);
797 opts.
optionalB(
"outputname",
"binaryoutput",
"Specify use of binary output files ",
798 &binaryOutput,
TRUE);
800 opts.
optionalB(
"main",
"amber",
"Is it AMBER force field?",
802 opts.
optionalB(
"amber",
"oldParmReader",
"Use the old AMBER parm/parm7 reader?", &oldParmReader,
FALSE);
803 opts.
optionalB(
"amber",
"readexclusions",
"Read exclusions from parm file?",
804 &readExclusions,
TRUE);
805 opts.
require(
"amber",
"scnb",
"1-4 VDW interactions are divided by scnb",
811 opts.
optionalB(
"main",
"gromacs",
"Use GROMACS-like force field?",
813 opts.
require(
"gromacs",
"grotopfile",
"GROMACS topology file",
815 opts.
optional(
"gromacs",
"grocoorfile",
"GROMACS coordinate file",
819 opts.
optionalB(
"main",
"vdwGeometricSigma",
820 "Use geometric mean to combine L-J sigmas, as for OPLS",
821 &vdwGeometricSigma,
FALSE);
824 opts.
optional(
"main",
"computeMapFile",
"Filename for computeMap",
826 opts.
optionalB(
"main",
"storeComputeMap",
"store computeMap?",
827 &storeComputeMap,
FALSE);
828 opts.
optionalB(
"main",
"loadComputeMap",
"load computeMap?",
829 &loadComputeMap,
FALSE);
833 void SimParameters::config_parser_fullelect(
ParseOptions &opts) {
837 DebugM(1,
"DPMTA setup start\n");
839 opts.
optionalB(
"main",
"FMA",
"Should FMA be used?", &FMAOn,
FALSE);
840 opts.
optional(
"FMA",
"FMALevels",
"Tree levels to use in FMA", &FMALevels,
843 opts.
optional(
"FMA",
"FMAMp",
"Number of FMA multipoles", &FMAMp, 8);
845 opts.
optionalB(
"FMA",
"FMAFFT",
"Use FFT enhancement in FMA?", &FMAFFTOn,
TRUE);
846 opts.
optional(
"FMAFFT",
"FMAFFTBlock",
"FFT blocking factor",
849 DebugM(1,
"DPMTA setup end\n");
859 opts.
optional(
"main",
"fullElectFrequency",
860 "Number of steps between full electrostatic executions",
861 &fullElectFrequency);
865 opts.
optional(
"main",
"fmaFrequency",
866 "Number of steps between full electrostatic executions",
871 "FMA theta parameter value",
875 opts.
optionalB(
"main",
"FullDirect",
"Should direct calculations of full electrostatics be performed?",
876 &fullDirectOn,
FALSE);
882 "Use multilevel summation method for electrostatics?",
884 opts.
optional(
"MSM",
"MSMQuality",
"MSM quality",
886 opts.
optional(
"MSM",
"MSMApprox",
"MSM approximation",
888 opts.
optional(
"MSM",
"MSMSplit",
"MSM splitting",
890 opts.
optional(
"MSM",
"MSMLevels",
"MSM maximum number of levels",
892 opts.
optional(
"MSM",
"MSMGridSpacing",
"MSM grid spacing (Angstroms)",
893 &MSMGridSpacing, 2.5);
894 opts.
optional(
"MSM",
"MSMPadding",
"MSM padding (Angstroms)",
896 opts.
optional(
"MSM",
"MSMxmin",
"MSM x minimum (Angstroms)", &MSMxmin, 0);
897 opts.
optional(
"MSM",
"MSMxmax",
"MSM x maximum (Angstroms)", &MSMxmax, 0);
898 opts.
optional(
"MSM",
"MSMymin",
"MSM y minimum (Angstroms)", &MSMymin, 0);
899 opts.
optional(
"MSM",
"MSMymax",
"MSM y maximum (Angstroms)", &MSMymax, 0);
900 opts.
optional(
"MSM",
"MSMzmin",
"MSM z minimum (Angstroms)", &MSMzmin, 0);
901 opts.
optional(
"MSM",
"MSMzmax",
"MSM z maximum (Angstroms)", &MSMzmax, 0);
902 opts.
optional(
"MSM",
"MSMBlockSizeX",
903 "MSM grid block size along X direction (for decomposing parallel work)",
905 opts.
optional(
"MSM",
"MSMBlockSizeY",
906 "MSM grid block size along Y direction (for decomposing parallel work)",
908 opts.
optional(
"MSM",
"MSMBlockSizeZ",
909 "MSM grid block size along Z direction (for decomposing parallel work)",
913 "Use MSM serial version for long-range calculation?",
914 &MsmSerialOn,
FALSE);
920 "Use fast multipole method for electrostatics?",
922 opts.
optional(
"FMM",
"FMMLevels",
"FMM number of levels",
924 opts.
optional(
"FMM",
"FMMPadding",
"FMM padding margin (Angstroms)",
927 opts.
optionalB(
"main",
"useCUDA2",
"Use new CUDA code", &useCUDA2,
TRUE);
931 opts.
optionalB(
"main",
"PME",
"Use particle mesh Ewald for electrostatics?",
933 opts.
optional(
"PME",
"PMETolerance",
"PME direct space tolerance",
934 &PMETolerance, 1.e-6);
935 opts.
optional(
"PME",
"PMEInterpOrder",
"PME interpolation order",
937 opts.
optional(
"PME",
"PMEGridSizeX",
"PME grid in x dimension",
939 opts.
optional(
"PME",
"PMEGridSizeY",
"PME grid in y dimension",
941 opts.
optional(
"PME",
"PMEGridSizeZ",
"PME grid in z dimension",
943 opts.
optional(
"PME",
"PMEGridSpacing",
"Maximum PME grid spacing (Angstroms)",
944 &PMEGridSpacing, 0.);
946 opts.
optional(
"PME",
"PMEProcessors",
947 "PME FFT and reciprocal sum processor count", &PMEProcessors, 0);
948 opts.
optional(
"PME",
"PMEMinSlices",
949 "minimum thickness of PME reciprocal sum slab", &PMEMinSlices, 2);
952 "PME FFT and reciprocal sum pencil grid size", &PMEPencils, -1);
954 "PME FFT and reciprocal sum pencil grid size X", &PMEPencilsX, 0);
956 "PME FFT and reciprocal sum pencil grid size Y", &PMEPencilsY, 0);
958 "PME FFT and reciprocal sum pencil grid size Z", &PMEPencilsZ, 0);
962 opts.
optional(
"PME",
"PMEPencilsYLayout",
963 "PME FFT and reciprocal sum Y pencil layout strategy", &PMEPencilsYLayout, 0);
964 opts.
optional(
"PME",
"PMEPencilsXLayout",
965 "PME FFT and reciprocal sum X pencil layout strategy", &PMEPencilsXLayout, 1);
968 opts.
optional(
"PME",
"PMESendOrder",
969 "PME message ordering control", &PMESendOrder, 0);
971 opts.
optional(
"PME",
"PMEMinPoints",
972 "minimum points per PME reciprocal sum pencil", &PMEMinPoints, 10000);
974 opts.
optionalB(
"main",
"PMEBarrier",
"Use barrier in PME?",
976 opts.
optionalB(
"main",
"PMEOffload",
"Offload PME to accelerator?",
979 opts.
optionalB(
"PME",
"usePMECUDA",
"Use the PME CUDA version", &usePMECUDA, CmiNumPhysicalNodes() < 5);
982 opts.
optionalB(
"PME",
"useDPME",
"Use old DPME code?", &useDPME,
FALSE);
986 opts.
optionalB(
"main",
"FFTWPatient",
"Use intensive plan creation to optimize FFTW?",
990 &FFTWPatient,
FALSE);
993 opts.
optionalB(
"main",
"FFTWEstimate",
"Use estimates to optimize FFTW?",
995 &FFTWEstimate,
TRUE);
997 &FFTWEstimate,
FALSE);
999 opts.
optionalB(
"main",
"FFTWUseWisdom",
"Read/save wisdom file for FFTW?",
1001 &FFTWUseWisdom,
FALSE);
1003 &FFTWUseWisdom,
TRUE);
1005 opts.
optional(
"FFTWUseWisdom",
"FFTWWisdomFile",
"File for FFTW wisdom",
1009 "Use \"Tiles\" mode for AVX-512 optimized calculations",
1010 &useAVXTiles,
TRUE);
1013 void SimParameters::config_parser_methods(
ParseOptions &opts) {
1016 opts.
optionalB(
"main",
"minimization",
"Should minimization be performed?",
1017 &minimizeCGOn,
FALSE);
1018 opts.
optionalB(
"main",
"minVerbose",
"Print extra minimization diagnostics?",
1019 &minVerbose,
FALSE);
1020 opts.
optional(
"main",
"minTinyStep",
"very first minimization steps",
1021 &minTinyStep, 1.0e-6);
1023 opts.
optional(
"main",
"minBabyStep",
"initial minimization steps",
1024 &minBabyStep, 1.0e-2);
1026 opts.
optional(
"main",
"minLineGoal",
"line minimization gradient reduction",
1027 &minLineGoal, 1.0e-3);
1030 opts.
optionalB(
"main",
"velocityQuenching",
1031 "Should old-style minimization be performed?", &minimizeOn,
FALSE);
1033 opts.
optional(
"main",
"maximumMove",
"Maximum atom movement per step", &maximumMove, 0.0);
1037 opts.
optionalB(
"main",
"Langevin",
"Should Langevin dynamics be performed?",
1038 &langevinOn,
FALSE);
1039 opts.
require(
"Langevin",
"langevinTemp",
"Temperature for heat bath in Langevin "
1040 "dynamics", &langevinTemp);
1043 opts.
optional(
"Langevin",
"langevinDamping",
"Damping coefficient (1/ps)",
1046 opts.
optionalB(
"Langevin",
"langevinHydrogen",
"Should Langevin dynamics be applied to hydrogen atoms?",
1048 opts.
optional(
"Langevin",
"langevinFile",
"PDB file with temperature "
1049 "coupling terms (B(i)) (default is the PDB input file)",
1051 opts.
optional(
"Langevin",
"langevinCol",
"Column in the langevinFile "
1052 "containing the temperature coupling term B(i);\n"
1056 opts.
optionalB(
"Langevin",
"langevinBAOAB",
1057 "Should Langevin dynamics be performed using BAOAB integration?",
1058 &langevin_useBAOAB,
FALSE);
1061 opts.
optionalB(
"main",
"LoweAndersen",
"Should Lowe-Andersen dynamics be performed?",
1062 &loweAndersenOn,
FALSE);
1063 opts.
require(
"LoweAndersen",
"loweAndersenTemp",
"Temperature for heat bath in Lowe-Andersen "
1064 "dynamics", &loweAndersenTemp);
1067 opts.
optional(
"LoweAndersen",
"loweAndersenRate",
"Collision rate (1/ps)",
1068 &loweAndersenRate, 50);
1070 opts.
optional(
"LoweAndersen",
"loweAndersenCutoff",
"Cutoff radius",
1071 &loweAndersenCutoff, 2.7);
1077 opts.
optionalB(
"main",
"alch",
"Is achemical simulation being performed?",
1079 opts.
require(
"alch",
"alchLambda",
"Alchemical coupling parameter value",
1083 opts.
optionalB(
"alch",
"singleTopology",
1084 "Is single topology used for relative free energy?", &singleTopology,
FALSE);
1087 "Is S-D bonded terms scaling for relative free energy?", &sdScaling,
FALSE);
1089 opts.
optional(
"alch",
"alchFile",
"PDB file with perturbation flags "
1091 opts.
optional(
"alch",
"alchCol",
"Column in the alchFile with the "
1094 opts.
optional(
"alch",
"unperturbedBondFile",
"mini psf file with unperturbed bond info"
1096 opts.
optional(
"alch",
"alchOutFreq",
"Frequency of alchemical energy"
1097 "output in timesteps", &alchOutFreq, 5);
1099 opts.
optional(
"alch",
"alchOutFile",
"Alchemical energy output filename",
1103 opts.
optional(
"alch",
"alchVdwShiftCoeff",
"Coeff used for generating"
1104 "the altered alchemical vDW interactions", &alchVdwShiftCoeff, 5.);
1107 opts.
optionalB(
"alch",
"alchWCA",
"Is WCA decomposition being performed?",
1111 opts.
optional(
"alch",
"alchElecLambdaStart",
"Lambda at which electrostatic"
1112 "scaling of exnihilated particles begins", &alchElecLambdaStart, 0.5);
1115 opts.
optional(
"alch",
"alchVdwLambdaEnd",
"Lambda at which vdW"
1116 "scaling of exnihilated particles ends", &alchVdwLambdaEnd, 1.0);
1119 opts.
optional(
"alch",
"alchRepLambdaEnd",
"Lambda at which repulsive vdW"
1120 "scaling of exnihilated particles ends and attractive vdW scaling"
1121 "begins", &alchRepLambdaEnd, 0.5);
1124 opts.
optional(
"alch",
"alchBondLambdaEnd",
"Lambda at which bonded"
1125 "scaling of exnihilated particles begins", &alchBondLambdaEnd, 0.0);
1128 opts.
optionalB(
"alch",
"alchDecouple",
"Enable alchemical decoupling?",
1129 &alchDecouple,
FALSE);
1130 opts.
optionalB(
"alch",
"alchBondDecouple",
"Enable decoupling of purely "
1131 "alchemical bonds?", &alchBondDecouple,
FALSE);
1134 opts.
optional(
"alch",
"alchType",
"Which alchemical method to use?",
1136 opts.
optional(
"alch",
"alchLambda2",
"Alchemical coupling comparison value",
1138 opts.
optional(
"alch",
"alchLambdaIDWS",
"Alchemical coupling comparison value for interleaved double-wide sampling",
1139 &alchLambdaIDWS, -1);
1140 opts.
optional(
"alch",
"alchLambdaFreq",
1141 "Frequency of increasing coupling parameter value", &alchLambdaFreq, 0);
1143 opts.
optional(
"alch",
"alchSwitchType",
"Switching type flag",
1145 opts.
optional(
"alch",
"alchEquilSteps",
"Equilibration steps, before "
1146 "data collection in the alchemical window", &alchEquilSteps, 0);
1149 opts.
optionalB(
"alch",
"alchEnsembleAvg",
"Ensemble Average in use?",
1150 &alchEnsembleAvg,
TRUE);
1153 opts.
optionalB(
"main",
"les",
"Is locally enhanced sampling enabled?",
1155 opts.
require(
"les",
"lesFactor",
"Local enhancement factor", &lesFactor);
1156 opts.
optional(
"les",
"lesFile",
"PDB file with enhancement flags "
1158 opts.
optional(
"les",
"lesCol",
"Column in the lesFile with the "
1160 opts.
optionalB(
"les",
"lesReduceTemp",
"Reduce enhanced atom temperature?",
1161 &lesReduceTemp,
FALSE);
1162 opts.
optionalB(
"les",
"lesReduceMass",
"Reduce enhanced atom mass?",
1163 &lesReduceMass,
FALSE);
1167 "Is replica exchange solute tempering enabled?",
1168 &soluteScalingOn,
FALSE);
1169 opts.
optional(
"soluteScaling",
"soluteScalingFactor",
1170 "Solute scaling factor",
1171 &soluteScalingFactor, 1.0);
1173 opts.
optional(
"soluteScaling",
"soluteScalingFactorCharge",
1174 "Solute scaling factor for electrostatic interactions",
1175 &soluteScalingFactorCharge);
1177 opts.
optional(
"soluteScaling",
"soluteScalingFactorVdw",
1178 "Solute scaling factor for van der Waals interactions",
1179 &soluteScalingFactorVdw);
1181 opts.
optional(
"soluteScaling",
"soluteScalingFile",
1182 "PDB file with scaling flags; if undefined, defaults to main PDB file",
1184 opts.
optional(
"soluteScaling",
"soluteScalingCol",
1185 "Column in the soluteScalingFile providing the scaling flag",
1187 opts.
optionalB(
"main",
"soluteScalingAll",
1188 "Apply scaling also to bond and angle interactions?",
1189 &soluteScalingAll,
FALSE);
1192 opts.
optionalB(
"main",
"drude",
"Perform integration of Drude oscillators?",
1194 opts.
require(
"drude",
"drudeTemp",
"Temperature for freezing "
1195 "Drude oscillators", &drudeTemp);
1198 opts.
optional(
"drude",
"drudeDamping",
"Damping coefficient (1/ps) for "
1199 "Drude oscillators", &drudeDamping);
1201 opts.
optional(
"drude",
"drudeNbtholeCut",
"Nonbonded Thole interactions "
1202 "interaction radius", &drudeNbtholeCut, 5.0);
1204 opts.
optionalB(
"drude",
"drudeHardWall",
"Apply maximum Drude bond length "
1205 "restriction?", &drudeHardWallOn,
TRUE);
1206 opts.
optional(
"drude",
"drudeBondLen",
"Drude oscillator bond length "
1207 "beyond which to apply restraint", &drudeBondLen, 0.25);
1209 opts.
optional(
"drude",
"drudeBondConst",
"Drude oscillator restraining "
1210 "force constant", &drudeBondConst, 40000.0);
1214 opts.
optionalB(
"main",
"pairInteraction",
1215 "Are pair interactions calculated?", &pairInteractionOn,
FALSE);
1216 opts.
optional(
"pairInteraction",
"pairInteractionFile",
1217 "PDB files with interaction flags " "default is the input PDB file",
1219 opts.
optional(
"pairInteraction",
"pairInteractionCol",
1220 "Column in the pairInteractionFile with the interaction flags",
1222 opts.
require(
"pairInteraction",
"pairInteractionGroup1",
1223 "Flag for interaction group 1", &pairInteractionGroup1);
1224 opts.
optional(
"pairInteraction",
"pairInteractionGroup2",
1225 "Flag for interaction group 2", &pairInteractionGroup2, -1);
1226 opts.
optionalB(
"pairInteraction",
"pairInteractionSelf",
1227 "Compute only within-group interactions?", &pairInteractionSelf,
1230 opts.
optionalB(
"main",
"cosAngles",
"Are some angles cosine-based?", &cosAngles,
FALSE);
1234 opts.
optionalB(
"main",
"globalTest",
"Should global integration (for development) be used?",
1236 opts.
optionalB(
"main",
"dihedral",
"Should dihedral angle dynamics be performed?",
1237 &dihedralOn,
FALSE);
1239 opts.
optionalB(
"dihedral",
"COLD",
"Should overdamped Langevin dynamics be performed?",
1241 opts.
require(
"COLD",
"COLDTemp",
"Temperature for heat bath in COLD",
1245 opts.
require(
"COLD",
"COLDRate",
"Damping rate for COLD",
1251 "Should temperature coupling be performed?",
1253 opts.
require(
"tcouple",
"tCoupleTemp",
1254 "Temperature for temperature coupling", &tCoupleTemp);
1257 opts.
optional(
"tCouple",
"tCoupleFile",
"PDB file with temperature "
1258 "coupling terms (B(i)) (default is the PDB input file)",
1260 opts.
optional(
"tCouple",
"tCoupleCol",
"Column in the tCoupleFile "
1261 "containing the temperature coupling term B(i);\n"
1265 "Should stochastic velocity rescaling be performed?",
1266 &stochRescaleOn,
FALSE);
1267 opts.
require(
"stochRescale",
"stochRescaleTemp",
1268 "Temperature for stochastic velocity rescaling",
1272 opts.
require(
"stochRescale",
"stochRescalePeriod",
1273 "Time scale for stochastic velocity rescaling (ps)",
1274 &stochRescalePeriod);
1276 opts.
optional(
"stochRescale",
"stochRescaleFreq",
1277 "Number of steps between stochastic rescalings",
1280 opts.
optionalB(
"stochRescale",
"stochRescaleHeat",
1281 "Should heat transfer and work be computed?", &stochRescaleHeat,
FALSE);
1283 opts.
optional(
"main",
"rescaleFreq",
"Number of steps between "
1284 "velocity rescaling", &rescaleFreq);
1286 opts.
optional(
"main",
"rescaleTemp",
"Target temperature for velocity rescaling",
1291 opts.
optional(
"main",
"reassignFreq",
"Number of steps between "
1292 "velocity reassignment", &reassignFreq);
1294 opts.
optional(
"main",
"reassignTemp",
"Target temperature for velocity reassignment",
1298 opts.
optional(
"main",
"reassignIncr",
"Temperature increment for velocity reassignment",
1301 opts.
optional(
"main",
"reassignHold",
"Final holding temperature for velocity reassignment",
1307 opts.
optionalB(
"main",
"useGroupPressure",
1308 "Use group rather than atomic quantities for pressure control?",
1309 &useGroupPressure,
FALSE);
1312 opts.
optionalB(
"main",
"useFlexibleCell",
1313 "Use anisotropic cell fluctuation for pressure control?",
1314 &useFlexibleCell,
FALSE);
1318 "Fix some cell dimensions?",
1319 &fixCellDims,
FALSE);
1321 opts.
optionalB(
"fixCellDims",
"fixCellDimX",
1322 "Fix the X dimension?",
1323 &fixCellDimX,
FALSE);
1324 opts.
optionalB(
"fixCellDims",
"fixCellDimY",
1325 "Fix the Y dimension?",
1326 &fixCellDimY,
FALSE);
1327 opts.
optionalB(
"fixCellDims",
"fixCellDimZ",
1328 "Fix the Z dimension?",
1329 &fixCellDimZ,
FALSE);
1332 opts.
optionalB(
"main",
"useConstantRatio",
1333 "Use constant X-Y ratio for pressure control?",
1334 &useConstantRatio,
FALSE);
1337 opts.
optionalB(
"main",
"useConstantArea",
1338 "Use constant area for pressure control?",
1339 &useConstantArea,
FALSE);
1342 opts.
optionalB(
"main",
"excludeFromPressure",
1343 "Should some atoms be excluded from pressure rescaling?",
1344 &excludeFromPressure,
FALSE);
1345 opts.
optional(
"excludeFromPressure",
"excludeFromPressureFile",
1346 "PDB file for atoms to be excluded from pressure",
1348 opts.
optional(
"excludeFromPressure",
"excludeFromPressureCol",
1349 "Column in the excludeFromPressureFile"
1350 "containing the flags (nonzero means excluded);\n"
1354 opts.
optionalB(
"main",
"BerendsenPressure",
1355 "Should Berendsen pressure bath coupling be performed?",
1356 &berendsenPressureOn,
FALSE);
1357 opts.
require(
"BerendsenPressure",
"BerendsenPressureTarget",
1358 "Target pressure for pressure coupling",
1359 &berendsenPressureTarget);
1361 opts.
require(
"BerendsenPressure",
"BerendsenPressureCompressibility",
1362 "Isothermal compressibility for pressure coupling",
1363 &berendsenPressureCompressibility);
1365 opts.
require(
"BerendsenPressure",
"BerendsenPressureRelaxationTime",
1366 "Relaxation time for pressure coupling",
1367 &berendsenPressureRelaxationTime);
1369 opts.
units(
"BerendsenPressureRelaxationTime",
N_FSEC);
1370 opts.
optional(
"BerendsenPressure",
"BerendsenPressureFreq",
1371 "Number of steps between volume rescaling",
1372 &berendsenPressureFreq, 1);
1376 opts.
optionalB(
"main",
"LangevinPiston",
1377 "Should Langevin piston pressure control be used?",
1378 &langevinPistonOn,
FALSE);
1379 opts.
optionalB(
"LangevinPiston",
"LangevinPistonBarrier",
1380 "Should Langevin piston barrier be used?",
1381 &langevinPistonBarrier,
TRUE);
1382 opts.
require(
"LangevinPiston",
"LangevinPistonTarget",
1383 "Target pressure for pressure control",
1384 &langevinPistonTarget);
1385 opts.
require(
"LangevinPiston",
"LangevinPistonPeriod",
1386 "Oscillation period for pressure control",
1387 &langevinPistonPeriod);
1390 opts.
require(
"LangevinPiston",
"LangevinPistonDecay",
1391 "Decay time for pressure control",
1392 &langevinPistonDecay);
1395 opts.
require(
"LangevinPiston",
"LangevinPistonTemp",
1396 "Temperature for pressure control piston",
1397 &langevinPistonTemp);
1400 opts.
optional(
"LangevinPiston",
"StrainRate",
1401 "Initial strain rate for pressure control (x y z)",
1406 "Should multigrator temperature and/or pressure control be used?",
1407 &multigratorOn,
FALSE);
1408 opts.
require(
"Multigrator",
"MultigratorPressureTarget",
1409 "Target pressure for pressure coupling",
1410 &multigratorPressureTarget);
1411 opts.
require(
"Multigrator",
"MultigratorTemperatureTarget",
1412 "Target temperature for temperature coupling",
1413 &multigratorTemperatureTarget);
1414 opts.
require(
"Multigrator",
"MultigratorPressureFreq",
1415 "Number of steps between pressure control moves",
1416 &multigratorPressureFreq);
1418 opts.
optional(
"Multigrator",
"MultigratorPressureRelaxationTime",
1419 "Relaxation time for pressure coupling is fs",
1420 &multigratorPressureRelaxationTime, 30000);
1422 opts.
units(
"MultigratorPressureRelaxationTime",
N_FSEC);
1423 opts.
optional(
"Multigrator",
"MultigratorTemperatureRelaxationTime",
1424 "Relaxation time for temperature coupling is fs",
1425 &multigratorTemperatureRelaxationTime, 1000);
1426 opts.
range(
"MultigratorTemperatureRelaxationTime",
POSITIVE);
1427 opts.
units(
"MultigratorTemperatureRelaxationTime",
N_FSEC);
1428 opts.
require(
"Multigrator",
"MultigratorTemperatureFreq",
1429 "Number of steps between temperature control moves",
1430 &multigratorTemperatureFreq);
1432 opts.
optional(
"Multigrator",
"MultigratorNoseHooverChainLength",
1433 "Nose-Hoover chain length",
1434 &multigratorNoseHooverChainLength, 4);
1438 opts.
optional(
"main",
"SurfaceTensionTarget",
1439 "Surface tension in the x-y plane",
1440 &surfaceTensionTarget, 0);
1443 opts.
optionalB(
"main",
"pressureprofile",
"Compute pressure profile?",
1444 &pressureProfileOn,
FALSE);
1445 opts.
require(
"pressureprofile",
"pressureprofileslabs",
1446 "Number of pressure profile slabs", &pressureProfileSlabs, 10);
1447 opts.
optional(
"pressureprofile",
"pressureprofilefreq",
1448 "How often to store profile data", &pressureProfileFreq, 1);
1449 opts.
optional(
"pressureprofile",
"pressureProfileAtomTypes",
1450 "Number of pressure profile atom types", &pressureProfileAtomTypes, 1);
1452 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesFile",
1453 "PDB files with pressure profile atom types" "default is the input PDB file",
1455 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesCol",
1456 "Column in the pressureProfileAtomTypesFile with the atom types ",
1458 opts.
optionalB(
"pressureProfile",
"pressureProfileEwald",
1459 "Compute Ewald contribution to pressure profile",
1460 &pressureProfileEwaldOn,
FALSE);
1461 opts.
optional(
"pressureProfile",
"pressureProfileEwaldX",
1462 "Ewald grid size X", &pressureProfileEwaldX, 10);
1464 opts.
optional(
"pressureProfile",
"pressureProfileEwaldY",
1465 "Ewald grid size Y", &pressureProfileEwaldY, 10);
1467 opts.
optional(
"pressureProfile",
"pressureProfileEwaldZ",
1468 "Ewald grid size Z", &pressureProfileEwaldZ, 10);
1472 opts.
optionalB(
"main",
"accelMD",
"Perform acclerated MD?", &accelMDOn,
FALSE);
1473 opts.
optional(
"accelMD",
"accelMDFirstStep",
"First accelMD step", &accelMDFirstStep, 0);
1475 opts.
optional(
"accelMD",
"accelMDLastStep",
"Last accelMD step", &accelMDLastStep, 0);
1477 opts.
optional(
"accelMD",
"accelMDOutFreq",
"Frequency of accelMD output", &accelMDOutFreq, 1);
1479 opts.
optionalB(
"accelMD",
"accelMDdihe",
"Apply boost to dihedral potential", &accelMDdihe,
TRUE);
1480 opts.
optionalB(
"accelMD",
"accelMDDebugOn",
"Debugging accelMD", &accelMDDebugOn,
FALSE);
1481 opts.
optional(
"accelMD",
"accelMDE",
"E for AMD", &accelMDE);
1483 opts.
optional(
"accelMD",
"accelMDalpha",
"alpha for AMD", &accelMDalpha);
1486 opts.
optionalB(
"accelMD",
"accelMDdual",
"Apply dual boost", &accelMDdual,
FALSE);
1487 opts.
optional(
"accelMDdual",
"accelMDTE",
"E for total potential under accelMDdual mode", &accelMDTE);
1489 opts.
optional(
"accelMDdual",
"accelMDTalpha",
"alpha for total potential under accelMDdual mode", &accelMDTalpha);
1493 opts.
optionalB(
"accelMD",
"accelMDG",
"Perform Gaussian accelMD calculation?", &accelMDG,
FALSE);
1494 opts.
optional(
"accelMDG",
"accelMDGiE",
"Flag to set the mode iE in Gaussian accelMD", &accelMDGiE, 1);
1495 opts.
optional(
"accelMDG",
"accelMDGcMDSteps",
"Number of cMD steps", &accelMDGcMDSteps, 1000000);
1497 opts.
optional(
"accelMDG",
"accelMDGEquiSteps",
"Number of equilibration steps after adding boost potential", &accelMDGEquiSteps, 1000000);
1499 opts.
require(
"accelMDG",
"accelMDGcMDPrepSteps",
"Number of preparation cMD steps", &accelMDGcMDPrepSteps, 200000);
1501 opts.
require(
"accelMDG",
"accelMDGEquiPrepSteps",
"Number of preparation equilibration steps", &accelMDGEquiPrepSteps, 200000);
1503 opts.
optional(
"accelMDG",
"accelMDGStatWindow",
"Number of steps to calculate avg and std", &accelMDGStatWindow, -1);
1504 opts.
optional(
"accelMDG",
"accelMDGSigma0P",
"Upper limit of std of total potential", &accelMDGSigma0P, 6.0);
1507 opts.
optional(
"accelMDG",
"accelMDGSigma0D",
"Upper limit of std of dihedral potential", &accelMDGSigma0D, 6.0);
1510 opts.
optionalB(
"accelMDG",
"accelMDGRestart",
"Flag to set use restart file in Gaussian accelMD", &accelMDGRestart,
FALSE);
1511 opts.
require(
"accelMDGRestart",
"accelMDGRestartFile",
"Restart file name for Gaussian accelMD", accelMDGRestartFile);
1512 opts.
optionalB(
"accelMDG",
"accelMDGresetVaftercmd",
"Flag to reset potential after accelMDGcMDSteps steps",
1513 &accelMDGresetVaftercmd,
FALSE);
1516 opts.
optionalB(
"main",
"adaptTempMD",
"Perform adaptive temperature sampling", &adaptTempOn,
FALSE);
1517 opts.
optional(
"adaptTempMD",
"adaptTempFirstStep",
"First adaptTemp step", &adaptTempFirstStep, 0);
1519 opts.
optional(
"adaptTempMD",
"adaptTempLastStep",
"Last adaptTemp step", &adaptTempLastStep, 0);
1521 opts.
optional(
"adaptTempMD",
"adaptTempOutFreq",
"Frequency of adaptTemp output", &adaptTempOutFreq, 10);
1523 opts.
optional(
"adaptTempMD",
"adaptTempFreq",
"Frequency of writing average energies to adaptTempOutFile", &adaptTempFreq, 10);
1525 opts.
optionalB(
"adaptTempMD",
"adaptTempDebug",
"Print debug output for adaptTemp", &adaptTempDebug,
FALSE);
1526 opts.
optional(
"adaptTempMD",
"adaptTempTmin",
"Minimun temperature for adaptTemp", &adaptTempTmin);
1529 opts.
optional(
"adaptTempMD",
"adaptTempTmax",
"Maximum temperature for adaptTemp", &adaptTempTmax);
1532 opts.
optional(
"adaptTempMD",
"adaptTempBins",
"Number of bins to store average energies", &adaptTempBins,0);
1534 opts.
optional(
"adaptTempMD",
"adaptTempDt",
"Integration timestep for Temp. updates", &adaptTempDt, 0.0001);
1537 opts.
optional(
"adaptTempMD",
"adaptTempAutoDt",
"Average temperature update in percent of temperature range", &adaptTempAutoDt, 0.0);
1539 opts.
optional(
"adaptTempMD",
"adaptTempCgamma",
"Adaptive bin averaging constant", &adaptTempCgamma, 0.1);
1541 opts.
optionalB(
"adaptTempMD",
"adaptTempLangevin",
"Send adaptTemp temperature to langevin thermostat",&adaptTempLangevin,
TRUE);
1542 opts.
optionalB(
"adaptTempMD",
"adaptTempRescaling",
"Send adaptTemp temperature to velocity rescaling thermostat", &adaptTempRescale,
TRUE);
1543 opts.
optional(
"adaptTempMD",
"adaptTempInFile",
"File containing restart information for adaptTemp", adaptTempInFile);
1544 opts.
optional(
"adaptTempMD",
"adaptTempRestartFile",
"File for writing adaptTemp restart information", adaptTempRestartFile);
1545 opts.
require(
"adaptTempRestartFile",
"adaptTempRestartFreq",
"Frequency of writing restart file", &adaptTempRestartFreq,0);
1547 opts.
optionalB(
"adaptTempMD",
"adaptTempRandom",
"Randomly assign a temperature if we step out of range", &adaptTempRandom,
FALSE);
1550 void SimParameters::config_parser_constraints(
ParseOptions &opts) {
1553 opts.
optionalB(
"main",
"fixedatoms",
"Are there fixed atoms?",
1554 &fixedAtomsOn,
FALSE);
1555 opts.
optionalB(
"fixedatoms",
"fixedAtomsForces",
1556 "Calculate forces between fixed atoms? (Required to unfix during run.)",
1557 &fixedAtomsForces,
FALSE);
1558 opts.
optional(
"fixedatoms",
"fixedAtomsFile",
"PDB file with flags for "
1559 "fixed atoms (default is the PDB input file)",
1561 opts.
optional(
"fixedatoms",
"fixedAtomsCol",
"Column in the fixedAtomsFile "
1562 "containing the flags (nonzero means fixed);\n"
1564 opts.
optional(
"fixedatoms",
"fixedAtomListFile",
"the text input file for fixed atoms "
1566 opts.
optionalB(
"fixedatoms",
"fixedAtomsForceOutput",
1567 "Do we write out forces acting on fixed atoms?",
1568 &fixedAtomsForceOutput,
FALSE);
1571 opts.
optionalB(
"main",
"constraints",
"Are harmonic constraints active?",
1572 &constraintsOn,
FALSE);
1573 opts.
require(
"constraints",
"consexp",
"Exponent for harmonic potential",
1576 #ifndef MEM_OPT_VERSION
1577 opts.
require(
"constraints",
"consref",
"PDB file containing reference "
1580 opts.
require(
"constraints",
"conskfile",
"PDB file containing force "
1582 opts.
require(
"constraints",
"conskcol",
"Column of conskfile to use "
1585 opts.
require(
"constraints",
"consAtomListFile",
"the text input file for constrained atoms "
1588 opts.
require(
"constraints",
"constraintScaling",
"constraint scaling factor",
1589 &constraintScaling, 1.0);
1597 opts.
optionalB(
"constraints",
"selectConstraints",
1598 "Restrain only selected Cartesian components of the coordinates?",
1599 &selectConstraintsOn,
FALSE);
1600 opts.
optionalB(
"selectConstraints",
"selectConstrX",
1601 "Restrain X components of coordinates ", &constrXOn,
FALSE);
1602 opts.
optionalB(
"selectConstraints",
"selectConstrY",
1603 "Restrain Y components of coordinates ", &constrYOn,
FALSE);
1604 opts.
optionalB(
"selectConstraints",
"selectConstrZ",
1605 "Restrain Z components of coordinates ", &constrZOn,
FALSE);
1609 opts.
optionalB(
"constraints",
"sphericalConstraints",
1610 "Restrain only radial spherical component of the coordinates?",
1611 &sphericalConstraintsOn,
FALSE);
1612 opts.
optional(
"sphericalConstraints",
"sphericalConstrCenter",
1613 "Center of spherical constraints", &sphericalConstrCenter);
1618 opts.
optionalB(
"constraints",
"movingConstraints",
1619 "Are some of the constraints moving?",
1620 &movingConstraintsOn,
FALSE);
1621 opts.
require(
"movingConstraints",
"movingConsVel",
1622 "Velocity of the movement, A/timestep", &movingConsVel);
1626 opts.
optionalB(
"constraints",
"rotConstraints",
1627 "Are the constraints rotating?",
1628 &rotConstraintsOn,
FALSE);
1629 opts.
require(
"rotConstraints",
"rotConsAxis",
1630 "Axis of rotation", &rotConsAxis);
1631 opts.
require(
"rotConstraints",
"rotConsPivot",
1632 "Pivot point of rotation",
1634 opts.
require(
"rotConstraints",
"rotConsVel",
1635 "Velocity of rotation, deg/timestep", &rotConsVel);
1640 opts.
optionalB(
"main",
"extForces",
"External command forces?",
1641 &extForcesOn,
FALSE);
1642 opts.
require(
"extForces",
"extForcesCommand",
1643 "External forces command", extForcesCommand);
1644 opts.
require(
"extForces",
"extCoordFilename",
1645 "External forces coordinate filename", extCoordFilename);
1646 opts.
require(
"extForces",
"extForceFilename",
1647 "External forces force filename", extForceFilename);
1651 opts.
optionalB(
"main",
"QMForces",
"Apply QM forces?",
1652 &qmForcesOn,
FALSE);
1653 opts.
require(
"QMForces",
"QMSoftware",
1654 "software whose format will be used for input/output", qmSoftware);
1655 opts.
require(
"QMForces",
"QMExecPath",
1656 "path to executable", qmExecPath);
1657 opts.
optional(
"QMForces",
"QMChargeMode",
1658 "type of QM atom charges gathered from the QM software", qmChrgModeS);
1659 opts.
require(
"QMForces",
"QMColumn",
1660 "column defining QM and MM regions", qmColumn);
1661 opts.
require(
"QMForces",
"QMBaseDir",
1662 "base path and name for QM input and output (preferably in memory)", qmBaseDir);
1663 opts.
optional(
"QMForces",
"QMConfigLine",
1664 "Configuration line for QM (multiple inputs allowed)",
PARSE_MULTIPLES);
1665 opts.
optional(
"QMForces",
"QMParamPDB",
1666 "PDB with QM parameters", qmParamPDB);
1667 opts.
optional(
"QMForces",
"QMPrepProc",
1668 "initial preparation executable", qmPrepProc);
1669 opts.
optional(
"QMForces",
"QMSecProc",
1670 "secondary executable", qmSecProc);
1671 opts.
optional(
"QMForces",
"QMCharge",
1673 opts.
optionalB(
"QMForces",
"QMChargeFromPSF",
1674 "gets charge of the QM group form PSF values", &qmChrgFromPSF,
FALSE);
1675 opts.
optional(
"QMForces",
"QMMult",
1677 opts.
optional(
"QMForces",
"QMLinkElement",
1679 opts.
optionalB(
"QMForces",
"QMReplaceAll",
1680 "replace all NAMD forces with QM forces", &qmReplaceAll,
FALSE);
1681 opts.
optional(
"QMForces",
"QMPCStride",
1682 "frequency of selection of point charges", &qmPCSelFreq, 1);
1684 opts.
optionalB(
"QMForces",
"QMNoPntChrg",
1685 "no point charges will be passed to the QM system(s)", &qmNoPC,
FALSE);
1686 opts.
optionalB(
"QMForces",
"QMElecEmbed",
1687 "activates electrostatic embedding", &qmElecEmbed,
TRUE);
1688 opts.
optionalB(
"QMForces",
"QMVdWParams",
1689 "use special VdW parameters for QM atoms", &qmVDW,
FALSE);
1690 opts.
optional(
"QMForces",
"QMBondColumn",
1691 "column defining QM-MM bomnds", qmBondColumn);
1692 opts.
optionalB(
"QMForces",
"QMBondDist",
1693 "values in QMBondColumn defines the distance of new link atom", &qmBondDist,
FALSE);
1694 opts.
optional(
"QMForces",
"QMBondValueType",
1695 "type of value in bond column: len or ratio", qmBondValueTypeS);
1696 opts.
optional(
"QMForces",
"QMBondScheme",
1697 "type of treatment given to QM-MM bonds.", qmBondSchemeS);
1698 opts.
optional(
"QMForces",
"QMenergyStride",
1699 "frequency of QM specific energy output (every x steps)", &qmEnergyOutFreq, 1);
1700 opts.
optional(
"QMForces",
"QMOutStride",
1701 "frequency of QM specific charge output (every x steps)", &qmOutFreq, 0);
1703 opts.
optional(
"QMForces",
"QMPositionOutStride",
1704 "frequency of QM specific position output (every x steps)", &qmPosOutFreq, 0);
1706 opts.
optional(
"QMForces",
"QMSimsPerNode",
1707 "QM executions per node", &qmSimsPerNode, 1);
1709 opts.
optionalB(
"QMForces",
"QMSwitching",
1710 "apply switching to point charges.", &qmPCSwitchOn,
FALSE);
1711 opts.
optional(
"QMForces",
"QMSwitchingType",
1712 "How are charges scaled down to be presented to QM groups.", qmPCSwitchTypeS);
1713 opts.
optional(
"QMForces",
"QMPointChargeScheme",
1714 "type of treatment given to the total sum of point charges.", qmPCSchemeS);
1715 opts.
optionalB(
"QMForces",
"QMCustomPCSelection",
1716 "custom and fixed selection of point charges per QM group.", &qmCustomPCSel,
FALSE);
1717 opts.
optional(
"QMForces",
"QMCustomPCFile",
1718 "file with a selection of point charges for a single QM group",
PARSE_MULTIPLES);
1719 opts.
optionalB(
"QMForces",
"QMLiveSolventSel",
1720 "Continuously update the selection of solvent molecules in QM groups", &qmLSSOn,
FALSE);
1721 opts.
optional(
"QMForces",
"QMLSSFreq",
1722 "frequency of QM water selection update", &qmLSSFreq, 100);
1724 opts.
optional(
"QMForces",
"QMLSSResname",
1725 "residue name for the solvent molecules (TIP3).", qmLSSResname);
1726 opts.
optional(
"QMForces",
"QMLSSMode",
1727 "mode of selection of point solvent molecules", qmLSSModeS);
1728 opts.
optional(
"QMForces",
"QMLSSRef",
1729 "for COM mode, defines reference for COM distance calculation",
PARSE_MULTIPLES);
1731 "Do we use Conditional SMD option?", &qmCSMD,
FALSE);
1732 opts.
optional(
"QMForces",
"QMCSMDFile",
1733 "File for Conditional SMD information",qmCSMDFile);
1736 opts.
optionalB(
"main",
"printBadContacts",
"Print atoms with huge forces?",
1737 &printBadContacts,
FALSE);
1741 opts.
optionalB(
"main",
"GBIS",
"Use GB implicit solvent?",
1743 opts.
optionalB(
"main",
"GBISSer",
"Use GB implicit solvent?",
1746 opts.
optional(
"GBIS",
"solventDielectric",
1747 "Solvent Dielectric", &solvent_dielectric, 78.5);
1748 opts.
optional(
"GBIS",
"intrinsicRadiusOffset",
1749 "Coulomb Radius Offset", &coulomb_radius_offset, 0.09);
1750 opts.
optional(
"GBIS",
"ionConcentration",
1751 "Ion Concentration", &ion_concentration, 0.2);
1753 "delta from GBOBC", &gbis_delta, 1.0);
1755 "beta from GBOBC", &gbis_beta, 0.8);
1757 "gamma from GBOBC", &gbis_gamma, 4.85);
1758 opts.
optional(
"GBIS",
"alphaCutoff",
1759 "cutoff for calculating effective born radius", &alpha_cutoff, 15);
1761 "maximum allowable born radius", &alpha_max, 30);
1763 "maximum screened intrinsic radius", &fsMax, 1.728);
1765 opts.
optionalB(
"main",
"SASA",
"Use Linear Combination of Pairwise Overlaps (LCPO) for calculating SASA",
1767 opts.
optional(
"SASA",
"surfaceTension",
1768 "Surfce Tension for SASA (kcal/mol/Ang^2)", &surface_tension, 0.005);
1774 "Do we use SMD option?",
1777 "Velocity of the movement, A/timestep", &SMDVel);
1780 "Direction of movement", &SMDDir);
1782 "Elastic constant for SMD", &SMDk);
1784 "Transverse elastic constant for SMD", &SMDk2, 0);
1787 opts.
require(
"SMD",
"SMDFile",
1788 "File for SMD information",
1790 opts.
optional(
"SMD",
"SMDOutputFreq",
1791 "Frequency of output",
1798 opts.
optionalB(
"main",
"tabulatedEnergies",
"Do we get energies from a table?", &tabulatedEnergies,
FALSE);
1800 opts.
require(
"tabulatedEnergies",
"tabulatedEnergiesFile",
"File containing energy table", tabulatedEnergiesFile);
1801 opts.
require(
"tabulatedEnergies",
"tableInterpType",
"Cubic or linear interpolation", tableInterpType);
1804 opts.
optionalB(
"main",
"TMD",
"Perform Targeted MD?", &TMDOn,
FALSE);
1805 opts.
optional(
"TMD",
"TMDk",
"Elastic constant for TMD", &TMDk, 0);
1807 opts.
require(
"TMD",
"TMDFile",
"File for TMD information", TMDFile);
1808 opts.
optionalB(
"TMD",
"TMDDiffRMSD",
"Restrain Difference between the RMSD from two structures", &TMDDiffRMSD,
FALSE);
1809 opts.
require(
"TMDDiffRMSD",
"TMDFile2",
"Second file for TMD information", TMDFile2);
1811 opts.
optional(
"TMD",
"TMDOutputFreq",
"Frequency of TMD output",
1814 opts.
require(
"TMD",
"TMDLastStep",
"Last TMD timestep", &TMDLastStep);
1816 opts.
optional(
"TMD",
"TMDFirstStep",
"First TMD step (default 0)", &TMDFirstStep, 0);
1817 opts.
optional(
"TMD",
"TMDInitialRMSD",
"Target RMSD at first TMD step (default -1 to use initial coordinates)", &TMDInitialRMSD);
1818 TMDInitialRMSD = -1;
1819 opts.
optional(
"TMD",
"TMDFinalRMSD",
"Target RMSD at last TMD step (default 0 )", &TMDFinalRMSD, 0);
1824 opts.
optionalB(
"main",
"symmetryRestraints",
"Enable symmetry restraints?", &symmetryOn,
FALSE);
1825 opts.
optional(
"symmetryRestraints",
"symmetryk",
"Elastic constant for symmetry restraints", &symmetryk, 0);
1827 opts.
optional(
"symmetryRestraints",
"symmetrykfile",
"PDB file specifying force contants on a per-atom basis",
PARSE_MULTIPLES);
1828 opts.
optionalB(
"symmetryRestraints",
"symmetryScaleForces",
"Scale applied forces over time?", &symmetryScaleForces,
FALSE);
1830 opts.
optional(
"symmetryRestraints",
"symmetryMatrixFile",
"File(s) for transfromation matrices",
PARSE_MULTIPLES);
1831 opts.
optional(
"symmetryRestraints",
"symmetryLastStep",
"Last symmetry timestep", &symmetryLastStep, -1);
1832 opts.
optional(
"symmetryRestraints",
"symmetryFirstStep",
"First symmetry step (default 0)", &symmetryFirstStep, 0);
1833 opts.
optional(
"symmetryRestraints",
"symmetryLastFullStep",
"Last full force symmetry timestep (default symmetryLastStep)", &symmetryLastFullStep, symmetryLastStep);
1834 opts.
optional(
"symmetryRestraints",
"symmetryFirstFullStep",
"First full force symmetry step (default symmetryFirstStep)", &symmetryFirstFullStep, symmetryFirstStep);
1838 opts.
optionalB(
"main",
"tclForces",
"Are Tcl global forces active?",
1839 &tclForcesOn,
FALSE);
1840 opts.
require(
"tclForces",
"tclForcesScript",
1844 opts.
optionalB(
"main",
"tclBC",
"Are Tcl boundary forces active?",
1846 opts.
require(
"tclBC",
"tclBCScript",
1847 "Tcl script defining calcforces for boundary forces",
PARSE_STRING);
1849 opts.
optional(
"tclBC",
"tclBCArgs",
"Extra args for calcforces command",
1854 opts.
optionalB(
"main",
"miscForces",
"Are misc global forces active?",
1855 &miscForcesOn,
FALSE);
1856 opts.
optional(
"miscForces",
"miscForcesScript",
1860 opts.
optionalB(
"main",
"freeEnergy",
"Perform free energy perturbation?",
1861 &freeEnergyOn,
FALSE);
1862 opts.
require(
"freeEnergy",
"freeEnergyConfig",
1866 opts.
optionalB(
"main",
"constantforce",
"Apply constant force?",
1867 &consForceOn,
FALSE);
1868 opts.
optional(
"constantforce",
"consForceFile",
1869 "Configuration file for constant forces",
PARSE_STRING);
1870 opts.
require(
"constantforce",
"consForceScaling",
1871 "Scaling factor for constant forces", &consForceScaling, 1.0);
1874 opts.
optionalB(
"main",
"colvars",
"Is the colvars module enabled?",
1876 opts.
optional(
"colvars",
"colvarsConfig",
1877 "configuration for the collective variables",
PARSE_STRING);
1878 opts.
optional(
"colvars",
"colvarsInput",
1879 "input restart file for the collective variables",
PARSE_STRING);
1883 #ifdef OPENATOM_VERSION
1884 void SimParameters::config_parser_openatom(
ParseOptions &opts) {
1885 opts.
optionalB(
"main",
"openatom",
"OpenAtom active?", &openatomOn,
FALSE);
1886 opts.
require(
"openatom",
"openatomDriverFile",
"What config file specifies openatom input parameters",
PARSE_STRING);
1887 opts.
require(
"openatom",
"openatomPhysicsFile",
"What structure file specifies openatom input system",
PARSE_STRING);
1888 opts.
require(
"openatom",
"openatomPdbFile",
"NAMD input file defining QM and MM regions",
PARSE_STRING);
1889 opts.
optional(
"openatom",
"openatomCol",
"Column in the openatomPdb with the QM/MM flag",
PARSE_STRING);
1891 #endif // OPENATOM_VERSION
1894 void SimParameters::config_parser_mgridforce(
ParseOptions &opts) {
1896 opts.
optionalB(
"main",
"mgridforce",
"Is Multiple gridforce active?",
1897 &mgridforceOn,
FALSE);
1898 opts.
optional(
"mgridforce",
"mgridforcevolts",
"Is Gridforce using Volts/eV as units?",
1900 opts.
require(
"mgridforce",
"mgridforcescale",
"Scale factor by which to multiply "
1902 opts.
require(
"mgridforce",
"mgridforcefile",
"PDB file containing force "
1904 opts.
require(
"mgridforce",
"mgridforcecol",
"Column of gridforcefile to "
1906 opts.
optional(
"mgridforce",
"mgridforcechargecol",
"Column of gridforcefile to "
1908 opts.
require(
"mgridforce",
"mgridforcepotfile",
"Gridforce potential file",
1910 opts.
optional(
"mgridforce",
"mgridforcecont1",
"Use continuous grid "
1912 opts.
optional(
"mgridforce",
"mgridforcecont2",
"Use continuous grid "
1914 opts.
optional(
"mgridforce",
"mgridforcecont3",
"Use continuous grid "
1916 opts.
optional(
"mgridforce",
"mgridforcevoff",
"Gridforce potential offsets",
1918 opts.
optional(
"mgridforce",
"mgridforcelite",
"Use Gridforce Lite?",
1920 opts.
optional(
"mgridforce",
"mgridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
PARSE_MULTIPLES);
1923 void SimParameters::config_parser_gridforce(
ParseOptions &opts) {
1925 opts.
optionalB(
"main",
"gridforce",
"Is Gridforce active?",
1926 &gridforceOn,
FALSE);
1927 opts.
optionalB(
"gridforce",
"gridforcevolts",
"Is Gridforce using Volts/eV as units?",
1928 &gridforceVolts,
FALSE);
1929 opts.
require(
"gridforce",
"gridforcescale",
"Scale factor by which to multiply "
1930 "grid forces", &gridforceScale);
1931 opts.
require(
"gridforce",
"gridforcefile",
"PDB file containing force "
1933 opts.
require(
"gridforce",
"gridforcecol",
"Column of gridforcefile to "
1935 opts.
optional(
"gridforce",
"gridforcechargecol",
"Column of gridforcefile to "
1937 opts.
require(
"gridforce",
"gridforcepotfile",
"Gridforce potential file",
1939 opts.
optionalB(
"gridforce",
"gridforcecont1",
"Use continuous grid "
1940 "in A1 direction?", &gridforceContA1,
FALSE);
1941 opts.
optionalB(
"gridforce",
"gridforcecont2",
"Use continuous grid "
1942 "in A2 direction?", &gridforceContA2,
FALSE);
1943 opts.
optionalB(
"gridforce",
"gridforcecont3",
"Use continuous grid "
1944 "in A3 direction?", &gridforceContA3,
FALSE);
1945 opts.
optional(
"gridforce",
"gridforcevoff",
"Gridforce potential offsets",
1947 opts.
optionalB(
"gridforce",
"gridforcelite",
"Use Gridforce Lite?",
1948 &gridforceLite,
FALSE);
1949 opts.
optionalB(
"gridforce",
"gridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
1950 &gridforcechecksize,
TRUE);
1954 void SimParameters::config_parser_movdrag(
ParseOptions &opts) {
1956 opts.
optionalB(
"main",
"movDragOn",
"Do we apply moving drag?",
1958 opts.
require(
"movDragOn",
"movDragFile",
1959 "Main moving drag PDB file", movDragFile);
1960 opts.
require(
"movDragOn",
"movDragCol",
1962 opts.
require(
"movDragOn",
"movDragGlobVel",
1963 "Global moving drag velocity (A/step)", &movDragGlobVel);
1964 opts.
require(
"movDragOn",
"movDragVelFile",
1965 "Moving drag linear velocity file", movDragVelFile);
1968 void SimParameters::config_parser_rotdrag(
ParseOptions &opts) {
1970 opts.
optionalB(
"main",
"rotDragOn",
"Do we apply rotating drag?",
1972 opts.
require(
"rotDragOn",
"rotDragFile",
1973 "Main rotating drag PDB file", rotDragFile);
1974 opts.
require(
"rotDragOn",
"rotDragCol",
1976 opts.
require(
"rotDragOn",
"rotDragAxisFile",
1977 "Rotating drag axis file", rotDragAxisFile);
1978 opts.
require(
"rotDragOn",
"rotDragPivotFile",
1979 "Rotating drag pivot point file", rotDragPivotFile);
1980 opts.
require(
"rotDragOn",
"rotDragGlobVel",
1981 "Global rotating drag angular velocity (deg/step)", &rotDragGlobVel);
1982 opts.
require(
"rotDragOn",
"rotDragVelFile",
1983 "Rotating drag angular velocity file", rotDragVelFile);
1984 opts.
require(
"rotDragOn",
"rotDragVelCol",
1985 "Rotating drag angular velocity column",
PARSE_STRING);
1988 void SimParameters::config_parser_constorque(
ParseOptions &opts) {
1990 opts.
optionalB(
"main",
"consTorqueOn",
"Do we apply \"constant\" torque?",
1991 &consTorqueOn,
FALSE);
1992 opts.
require(
"consTorqueOn",
"consTorqueFile",
1993 "Main \"constant\" torque PDB file", consTorqueFile);
1994 opts.
require(
"consTorqueOn",
"consTorqueCol",
1996 opts.
require(
"consTorqueOn",
"consTorqueAxisFile",
1997 "\"Constant\" torque axis file", consTorqueAxisFile);
1998 opts.
require(
"consTorqueOn",
"consTorquePivotFile",
1999 "\"Constant\" torque pivot point file", consTorquePivotFile);
2000 opts.
require(
"consTorqueOn",
"consTorqueGlobVal",
2001 "Global \"constant\" torque value (Kcal/(mol*A^2))", &consTorqueGlobVal);
2002 opts.
require(
"consTorqueOn",
"consTorqueValFile",
2003 "\"constant\" torque factors file", consTorqueValFile);
2004 opts.
require(
"consTorqueOn",
"consTorqueValCol",
2008 void SimParameters::config_parser_boundary(
ParseOptions &opts) {
2011 opts.
optionalB(
"main",
"sphericalBC",
"Are spherical boundary counditions "
2012 "active?", &sphericalBCOn,
FALSE);
2013 opts.
require(
"sphericalBC",
"sphericalBCCenter",
2014 "Center of spherical boundaries", &sphericalCenter);
2015 opts.
require(
"sphericalBC",
"sphericalBCr1",
"Radius for first sphere "
2016 "potential", &sphericalBCr1);
2019 opts.
require(
"sphericalBC",
"sphericalBCk1",
"Force constant for first "
2020 "sphere potential (+ is an inward force, - outward)",
2023 opts.
optional(
"sphericalBC",
"sphericalBCexp1",
"Exponent for first "
2024 "sphere potential", &sphericalBCexp1, 2);
2027 opts.
optional(
"sphericalBCr1",
"sphericalBCr2",
"Radius for second sphere "
2028 "potential", &sphericalBCr2);
2031 opts.
require(
"sphericalBCr2",
"sphericalBCk2",
"Force constant for second "
2032 "sphere potential (+ is an inward force, - outward)",
2035 opts.
optional(
"sphericalBCr2",
"sphericalBCexp2",
"Exponent for second "
2036 "sphere potential", &sphericalBCexp2, 2);
2040 opts.
optionalB(
"main",
"cylindricalBC",
"Are cylindrical boundary counditions "
2041 "active?", &cylindricalBCOn,
FALSE);
2042 opts.
require(
"cylindricalBC",
"cylindricalBCr1",
"Radius for first cylinder "
2043 "potential", &cylindricalBCr1);
2046 opts.
require(
"cylindricalBC",
"cylindricalBCk1",
"Force constant for first "
2047 "cylinder potential (+ is an inward force, - outward)",
2050 opts.
optional(
"cylindricalBC",
"cylindricalBCexp1",
"Exponent for first "
2051 "cylinder potential", &cylindricalBCexp1, 2);
2056 opts.
optional(
"cylindricalBC",
"cylindricalBCAxis",
"Cylinder axis (defaults to x)",
2058 opts.
require(
"cylindricalBC",
"cylindricalBCCenter",
2059 "Center of cylindrical boundaries", &cylindricalCenter);
2060 opts.
require (
"cylindricalBC",
"cylindricalBCl1",
"Length of first cylinder",
2064 opts.
optional (
"cylindricalBCl1",
"cylindricalBCl2",
"Length of second cylinder",
2070 opts.
optional(
"cylindricalBCr1",
"cylindricalBCr2",
"Radius for second cylinder "
2071 "potential", &cylindricalBCr2);
2074 opts.
require(
"cylindricalBCr2",
"cylindricalBCk2",
"Force constant for second "
2075 "cylinder potential (+ is an inward force, - outward)",
2078 opts.
optional(
"cylindricalBCr2",
"cylindricalBCexp2",
"Exponent for second "
2079 "cylinder potential", &cylindricalBCexp2, 2);
2083 opts.
optionalB(
"main",
"eFieldOn",
"Should an electric field be applied",
2085 opts.
optionalB(
"eFieldOn",
"eFieldNormalized",
"Is eField vector scaled by cell basis vectors?",
2086 &eFieldNormalized,
FALSE);
2087 opts.
require(
"eFieldOn",
"eField",
"Electric field vector", &eField);
2088 opts.
optional(
"eFieldOn",
"eFieldFreq",
"Electric field frequency", &eFieldFreq);
2089 opts.
optional(
"eFieldOn",
"eFieldPhase",
"Electric field phase", &eFieldPhase);
2092 opts.
optionalB(
"main",
"stirOn",
"Should stirring torque be applied",
2094 opts.
optional(
"stirOn",
"stirFilename",
"PDB file with flags for "
2095 "stirred atoms (default is the PDB input file)",
2097 opts.
optional(
"stirOn",
"stirredAtomsCol",
"Column in the stirredAtomsFile "
2098 "containing the flags (nonzero means fixed);\n"
2100 opts.
require(
"stirOn",
"stirStartingTheta",
"Stir starting theta offset", &stirStartingTheta);
2101 opts.
require(
"stirOn",
"stirK",
"Stir force harmonic spring constant", &stirK);
2103 opts.
require(
"stirOn",
"stirVel",
"Stir angular velocity (deg/timestep)", &stirVel);
2104 opts.
require(
"stirOn",
"stirAxis",
"Stir axis (direction vector)", &stirAxis);
2105 opts.
require(
"stirOn",
"stirPivot",
"Stir pivot point (coordinate)", &stirPivot);
2109 "Should extra bonded forces be applied",
2110 &extraBondsOn,
FALSE);
2111 opts.
optional(
"extraBonds",
"extraBondsFile",
2112 "file with list of extra bonds",
2114 opts.
optionalB(
"extraBonds",
"extraBondsCosAngles",
2115 "Should extra angles be cosine-based to match ancient bug",
2116 &extraBondsCosAngles,
TRUE);
2120 void SimParameters::config_parser_misc(
ParseOptions &opts) {
2123 opts.
optional(
"main",
"ldBalancer",
"Load balancer",
2125 opts.
optional(
"main",
"ldbStrategy",
"Load balancing strategy",
2127 opts.
optional(
"main",
"ldbPeriod",
"steps between load balancing",
2130 opts.
optional(
"main",
"firstLdbStep",
"when to start load balancing",
2133 opts.
optional(
"main",
"lastLdbStep",
"when to stop load balancing",
2136 opts.
optional(
"main",
"hybridGroupSize",
"Hybrid load balancing group size",
2138 opts.
optional(
"main",
"ldbBackgroundScaling",
2139 "background load scaling", &ldbBackgroundScaling);
2141 opts.
optional(
"main",
"ldbPMEBackgroundScaling",
2142 "PME node background load scaling", &ldbPMEBackgroundScaling);
2144 opts.
optional(
"main",
"ldbHomeBackgroundScaling",
2145 "home node background load scaling", &ldbHomeBackgroundScaling);
2147 opts.
optional(
"main",
"ldbRelativeGrainsize",
2148 "fraction of average load per compute", &ldbRelativeGrainsize, 0.);
2151 opts.
optional(
"main",
"traceStartStep",
"when to start tracing", &traceStartStep);
2153 opts.
optional(
"main",
"numTraceSteps",
"the number of timesteps to be traced", &numTraceSteps);
2156 #ifdef MEASURE_NAMD_WITH_PAPI
2157 opts.
optionalB(
"main",
"papiMeasure",
"whether use PAPI to measure performacne", &papiMeasure,
FALSE);
2158 opts.
optional(
"main",
"papiMeasureStartStep",
"when to measure performacne using PAPI", &papiMeasureStartStep);
2160 opts.
optional(
"main",
"numPapiMeasureSteps",
"the number of timesteps to be measured using PAPI", &numPapiMeasureSteps);
2164 opts.
optionalB(
"main",
"outputMaps",
"whether to dump compute map and patch map for analysis just before load balancing", &outputMaps,
FALSE);
2165 opts.
optionalB(
"main",
"benchTimestep",
"whether to do benchmarking timestep in which case final file output is disabled", &benchTimestep,
FALSE);
2166 opts.
optional(
"main",
"useCkLoop",
"whether to use CkLoop library to parallelize a loop in a function like OpenMP", &useCkLoop,
2167 #
if CMK_SMP && USE_CKLOOP
2174 opts.
optionalB(
"main",
"simulateInitialMapping",
"whether to study the initial mapping scheme", &simulateInitialMapping,
FALSE);
2175 opts.
optional(
"main",
"simulatedPEs",
"the number of PEs to be used for studying initial mapping", &simulatedPEs);
2177 opts.
optional(
"main",
"simulatedNodeSize",
"the node size to be used for studying initial mapping", &simulatedNodeSize);
2179 opts.
optionalB(
"main",
"disableTopology",
"ignore torus information during patch placement", &disableTopology,
FALSE);
2180 opts.
optionalB(
"main",
"verboseTopology",
"print torus information during patch placement", &verboseTopology,
FALSE);
2182 opts.
optionalB(
"main",
"ldbUnloadPME",
"no load on PME nodes",
2183 &ldbUnloadPME,
FALSE);
2184 opts.
optionalB(
"main",
"ldbUnloadZero",
"no load on pe zero",
2185 &ldbUnloadZero,
FALSE);
2186 opts.
optionalB(
"main",
"ldbUnloadOne",
"no load on pe one",
2187 &ldbUnloadOne,
FALSE);
2188 opts.
optionalB(
"main",
"ldbUnloadOutputPEs",
"no load on output PEs",
2189 &ldbUnloadOutputPEs,
FALSE);
2190 opts.
optionalB(
"main",
"noPatchesOnZero",
"no patches on pe zero",
2191 &noPatchesOnZero,
FALSE);
2192 opts.
optionalB(
"main",
"noPatchesOnOutputPEs",
"no patches on Output PEs",
2193 &noPatchesOnOutputPEs,
FALSE);
2194 opts.
optionalB(
"main",
"noPatchesOnOne",
"no patches on pe one",
2195 &noPatchesOnOne,
FALSE);
2196 opts.
optionalB(
"main",
"useCompressedPsf",
"The structure file psf is in the compressed format",
2197 &useCompressedPsf,
FALSE);
2198 opts.
optionalB(
"main",
"genCompressedPsf",
"Generate the compressed version of the psf file",
2199 &genCompressedPsf,
FALSE);
2200 opts.
optionalB(
"main",
"usePluginIO",
"Use the plugin I/O to load the molecule system",
2201 &usePluginIO,
FALSE);
2202 opts.
optionalB(
"main",
"mallocTest",
"test how much memory all PEs can allocate",
2203 &mallocTest,
FALSE);
2204 opts.
optionalB(
"main",
"printExclusions",
"print exclusion lists to stdout",
2205 &printExclusions,
FALSE);
2206 opts.
optional(
"main",
"proxySendSpanningTree",
"using spanning tree to send proxies",
2207 &proxySendSpanningTree, -1);
2208 opts.
optional(
"main",
"proxyRecvSpanningTree",
"using spanning tree to receive proxies",
2209 &proxyRecvSpanningTree, 0);
2210 opts.
optional(
"main",
"proxyTreeBranchFactor",
"the branch factor when building a spanning tree",
2211 &proxyTreeBranchFactor, 0);
2212 opts.
optionalB(
"main",
"twoAwayX",
"half-size patches in 1st dimension",
2214 opts.
optionalB(
"main",
"twoAwayY",
"half-size patches in 2nd dimension",
2216 opts.
optionalB(
"main",
"twoAwayZ",
"half-size patches in 3rd dimension",
2218 opts.
optional(
"main",
"maxPatches",
"maximum patch count", &maxPatches, -1);
2221 opts.
optional(
"main",
"firsttimestep",
"Timestep to start simulation at",
2226 opts.
optionalB(
"main",
"test",
"Perform self-tests rather than simulation",
2228 opts.
optionalB(
"main",
"commOnly",
"Do not evaluate forces or integrate",
2231 opts.
optionalB(
"main",
"statsOn",
"counters in machine layer",
2234 opts.
optionalB(
"main",
"hbonds",
"Use explicit hydrogen bond term",
2235 &HydrogenBonds,
FALSE);
2236 opts.
optionalB(
"hbonds",
"hbAntecedents",
"Include Antecedent in hbond term",
2237 &useAntecedent,
TRUE);
2238 opts.
optional(
"hbonds",
"hbAAexp",
"Hbond AA-A-H angle cos exponential",
2240 opts.
optional(
"hbonds",
"hbHAexp",
"Hbond D-H-A angle cos exponential",
2242 opts.
optional(
"hbonds",
"hbDistAexp",
"Hbond A-D dist attractive exponential",
2244 opts.
optional(
"hbonds",
"hbDistRexp",
"Hbond A-D dist repulstive exponential",
2246 opts.
optional(
"hbonds",
"hbCutoffAngle",
"Hbond D-H-A cutoff angle",
2247 &dhaCutoffAngle, 100.0);
2249 opts.
optional(
"hbonds",
"hbOnAngle",
"Hbond D-H-A switch function on angle",
2252 opts.
optional(
"hbonds",
"hbOffAngle",
"Hbond D-H-A switch function off angle",
2253 &dhaOffAngle, 80.0);
2255 opts.
optional(
"hbonds",
"hbCutoffDist",
"Hbond A-D cutoff distance",
2256 &daCutoffDist, 7.5);
2259 opts.
optional(
"hbonds",
"hbOnDist",
"Hbond A-D switch function on distance",
2263 opts.
optional(
"hbonds",
"hbOffDist",
"Hbond A-D switch function off distance",
2269 opts.
optionalB(
"main",
"IMDon",
"Connect using IMD?",&IMDon,
FALSE);
2270 opts.
require(
"IMDon",
"IMDport",
"Port to which to bind", &IMDport);
2272 opts.
require(
"IMDon",
"IMDfreq",
"Frequency at which to report", &IMDfreq);
2274 opts.
optionalB(
"IMDon",
"IMDwait",
"Pause until IMD connection?",&IMDwait,
2276 opts.
optionalB(
"IMDon",
"IMDignore",
"Ignore any user input?",&IMDignore,
2278 opts.
optionalB(
"IMDon",
"IMDignoreForces",
"Ignore forces ONLY?",&IMDignoreForces,
2281 opts.
optional(
"ldBalancer",
"maxSelfPart",
2282 "maximum number of self partitions in one patch", &maxSelfPart, 20);
2284 opts.
optional(
"ldBalancer",
"maxPairPart",
2285 "maximum number of pair partitions in one patch", &maxPairPart, 8);
2287 opts.
optional(
"ldBalancer",
"numAtomsSelf",
2288 "maximum number of atoms in one self compute distribution",
2289 &numAtomsSelf, 154);
2292 opts.
optional(
"ldBalancer",
"numAtomsSelf2",
2293 "maximum number of atoms in one self compute distribution",
2294 &numAtomsSelf2, 154);
2297 opts.
optional(
"ldBalancer",
"numAtomsPair",
2298 "maximum number of atoms in one pair compute distribution",
2299 &numAtomsPair, 318);
2301 opts.
optional(
"ldBalancer",
"numAtomsPair2",
2302 "maximum number of atoms in one pair compute distribution",
2303 &numAtomsPair2, 637);
2305 opts.
optional(
"main",
"minAtomsPerPatch",
2306 "minimum average atoms per patch",
2307 &minAtomsPerPatch, 40);
2311 opts.
optional(
"main",
"emptyPatchLoad",
2312 "load generated by empty patch, in atoms",
2313 &emptyPatchLoad, 40);
2317 opts.
optional(
"main",
"maxExclusionFlags",
2318 "maximum number of exclusion flags per atom", &maxExclusionFlags, 256);
2322 opts.
optional(
"main",
"bondedCUDA",
"Bitmask for calculating bonded interactions on GPU", &bondedCUDA, 255);
2327 opts.
optionalB(
"main",
"useCUDAdisable",
"Disable kernels to maintain feature compatibility with CUDA", &useCUDAdisable,
TRUE);
2330 opts.
optional(
"main",
"mic_unloadMICPEs",
"Indicates whether or not the load balancer should unload PEs driving Xeon Phi cards", &mic_unloadMICPEs, 1);
2331 opts.
optional(
"main",
"mic_singleKernel",
"Set to non-zero to have all MIC work to be placed in a single kernel", &mic_singleKernel, 1);
2332 opts.
optional(
"main",
"mic_deviceThreshold",
"Threshold to use for directing computes to Xeon Phi devices", &mic_deviceThreshold, -1);
2333 opts.
optional(
"main",
"mic_hostSplit",
"DMK - reserved", &mic_hostSplit, -1);
2334 opts.
optional(
"main",
"mic_numParts_self_p1",
"MIC-Specific NumParts SELF Parameter 1", &mic_numParts_self_p1, -1);
2335 opts.
optional(
"main",
"mic_numParts_pair_p1",
"MIC-Specific NumParts PAIR Parameter 1", &mic_numParts_pair_p1, -1);
2336 opts.
optional(
"main",
"mic_numParts_pair_p2",
"MIC-Specific NumParts PAIR Parameter 2", &mic_numParts_pair_p2, -1);
2344 iout <<
iINFO <<
"EXTENDED SYSTEM FILE " << filename <<
"\n" <<
endi;
2347 ifstream xscFile(filename);
2348 if ( ! xscFile )
NAMD_die(
"Unable to open extended system file.\n");
2352 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2353 xscFile.getline(labels,1023);
2354 }
while ( strncmp(labels,
"#$LABELS ",9) );
2356 int a_x, a_y, a_z, b_x, b_y, b_z, c_x, c_y, c_z;
2357 a_x = a_y = a_z = b_x = b_y = b_z = c_x = c_y = c_z = -1;
2358 int o_x, o_y, o_z, s_u, s_v, s_w, s_x, s_y, s_z;
2359 o_x = o_y = o_z = s_u = s_v = s_w = s_x = s_y = s_z = -1;
2362 char *l_i = labels + 8;
2364 if ( *l_i ==
' ' ) { ++l_i;
continue; }
2366 for ( l_i2 = l_i; *l_i2 && *l_i2 !=
' '; ++l_i2 );
2367 if ( (l_i2 - l_i) == 3 && (l_i[1] ==
'_') ) {
2368 if (l_i[0] ==
'a' && l_i[2] ==
'x') a_x = pos;
2369 if (l_i[0] ==
'a' && l_i[2] ==
'y') a_y = pos;
2370 if (l_i[0] ==
'a' && l_i[2] ==
'z') a_z = pos;
2371 if (l_i[0] ==
'b' && l_i[2] ==
'x') b_x = pos;
2372 if (l_i[0] ==
'b' && l_i[2] ==
'y') b_y = pos;
2373 if (l_i[0] ==
'b' && l_i[2] ==
'z') b_z = pos;
2374 if (l_i[0] ==
'c' && l_i[2] ==
'x') c_x = pos;
2375 if (l_i[0] ==
'c' && l_i[2] ==
'y') c_y = pos;
2376 if (l_i[0] ==
'c' && l_i[2] ==
'z') c_z = pos;
2377 if (l_i[0] ==
'o' && l_i[2] ==
'x') o_x = pos;
2378 if (l_i[0] ==
'o' && l_i[2] ==
'y') o_y = pos;
2379 if (l_i[0] ==
'o' && l_i[2] ==
'z') o_z = pos;
2380 if (l_i[0] ==
's' && l_i[2] ==
'u') s_u = pos;
2381 if (l_i[0] ==
's' && l_i[2] ==
'v') s_v = pos;
2382 if (l_i[0] ==
's' && l_i[2] ==
'w') s_w = pos;
2383 if (l_i[0] ==
's' && l_i[2] ==
'x') s_x = pos;
2384 if (l_i[0] ==
's' && l_i[2] ==
'y') s_y = pos;
2385 if (l_i[0] ==
's' && l_i[2] ==
'z') s_z = pos;
2392 for ( pos = 0; pos < numpos; ++pos ) {
2395 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2396 if ( pos == a_x ) cellBasisVector1.x = tmp;
2397 if ( pos == a_y ) cellBasisVector1.y = tmp;
2398 if ( pos == a_z ) cellBasisVector1.z = tmp;
2399 if ( pos == b_x ) cellBasisVector2.x = tmp;
2400 if ( pos == b_y ) cellBasisVector2.y = tmp;
2401 if ( pos == b_z ) cellBasisVector2.z = tmp;
2402 if ( pos == c_x ) cellBasisVector3.x = tmp;
2403 if ( pos == c_y ) cellBasisVector3.y = tmp;
2404 if ( pos == c_z ) cellBasisVector3.z = tmp;
2405 if ( pos == o_x ) cellOrigin.x = tmp;
2406 if ( pos == o_y ) cellOrigin.y = tmp;
2407 if ( pos == o_z ) cellOrigin.z = tmp;
2408 if ( pos == s_u ) strainRate2.x = tmp;
2409 if ( pos == s_v ) strainRate2.y = tmp;
2410 if ( pos == s_w ) strainRate2.z = tmp;
2411 if ( pos == s_x ) strainRate.x = tmp;
2412 if ( pos == s_y ) strainRate.y = tmp;
2413 if ( pos == s_z ) strainRate.z = tmp;
2418 test.
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2420 if ( test.
a_p() && ! lattice.a_p() ) {
2421 NAMD_die(
"cellBasisVector1 added during atom reinitialization");
2423 if ( lattice.a_p() && ! test.
a_p() ) {
2424 NAMD_die(
"cellBasisVector1 dropped during atom reinitialization");
2426 if ( test.
b_p() && ! lattice.b_p() ) {
2427 NAMD_die(
"cellBasisVector2 added during atom reinitialization");
2429 if ( lattice.b_p() && ! test.
b_p() ) {
2430 NAMD_die(
"cellBasisVector2 dropped during atom reinitialization");
2432 if ( test.
c_p() && ! lattice.c_p() ) {
2433 NAMD_die(
"cellBasisVector3 added during atom reinitialization");
2435 if ( lattice.c_p() && ! test.
c_p() ) {
2436 NAMD_die(
"cellBasisVector3 dropped during atom reinitialization");
2439 latptr->
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2444 #ifdef MEM_OPT_VERSION
2446 extern char *gWorkDir;
2454 #ifdef MEM_OPT_VERSION
2455 char *namdWorkDir = NULL;
2458 if ( opts.
defined(
"obsolete") ) {
2460 "\"obsolete\" defined, silently ignoring obsolete options\n" <<
endi;
2467 current = config->
find(
"cwd");
2469 len = strlen(current->
data);
2473 NAMD_die(
"chdir() to given cwd failed!");
2481 cwd =
new char[len+1];
2483 strcpy(cwd, current->
data);
2489 #ifdef MEM_OPT_VERSION
2490 if(cwd!=NULL)namdWorkDir = cwd;
2491 else namdWorkDir = gWorkDir;
2492 int dirlen = strlen(namdWorkDir);
2495 if(namdWorkDir[dirlen-1]==
'/'){
2496 tmpDir =
new char[dirlen+1];
2499 tmpDir =
new char[dirlen+2];
2503 memcpy(tmpDir, namdWorkDir, dirlen);
2504 namdWorkDir = tmpDir;
2511 if ( usePluginIO && opts.
defined(
"coordinates") ) {
2512 NAMD_die(
"Separate coordinates file not allowed with plugin IO, coordinates will be taken from structure file.");
2517 if (!amberOn && !gromacsOn) {
2518 #ifndef MEM_OPT_VERSION
2519 if (useCompressedPsf)
2520 NAMD_die(
"useCompressedPsf requires memory-optimized build!");
2521 if (!usePluginIO && !genCompressedPsf && !opts.
defined(
"coordinates"))
2522 NAMD_die(
"coordinates not found in the configuration file!");
2524 if(!usePluginIO && !opts.
defined(
"bincoordinates")) {
2525 NAMD_die(
"bincoordinates not found in the configuration file for the memory optimized version!");
2527 if(!usePluginIO && opts.
defined(
"coordinates")) {
2528 NAMD_die(
"coordinates not allowed in the configuration file for the memory optimized version!");
2531 if (!opts.
defined(
"structure"))
2532 NAMD_die(
"structure not found in the configuration file!");
2533 if (!opts.
defined(
"parameters"))
2534 NAMD_die(
"parameters not found in the configuration file!");
2540 NAMD_die(
"Cannot specify both coordinates and ambercoor!");
2541 #ifndef MEM_OPT_VERSION
2542 if (!genCompressedPsf && !opts.
defined(
"coordinates") && !opts.
defined(
"ambercoor")
2543 && !opts.
defined(
"grocoorfile") && !usePluginIO)
2544 NAMD_die(
"Coordinate file not found!");
2549 if (opts.
defined(
"temperature") &&
2552 NAMD_die(
"Cannot specify both an initial temperature and a velocity file");
2555 #ifdef MEM_OPT_VERSION
2562 char *curfile = NULL;
2563 dirlen = strlen(namdWorkDir);
2564 current = config->
find(
"structure");;
2565 curfile = current->
data;
2566 int filelen = strlen(curfile);
2567 if(*curfile ==
'/' || *curfile==
'~') {
2573 binAtomFile =
new char[filelen+5];
2574 memcpy(binAtomFile, curfile, filelen);
2575 memcpy(binAtomFile+filelen,
".bin", 4);
2576 binAtomFile[filelen+4] = 0;
2578 binAtomFile =
new char[dirlen+filelen+5];
2579 memcpy(binAtomFile, namdWorkDir, dirlen);
2580 memcpy(binAtomFile+dirlen, curfile, filelen);
2581 memcpy(binAtomFile+dirlen+filelen,
".bin", 4);
2582 binAtomFile[dirlen+filelen+4] = 0;
2585 current = config->
find(
"bincoordinates");
2586 curfile = current->
data;
2587 filelen = strlen(curfile);
2588 if(*curfile ==
'/' || *curfile==
'~') {
2589 binCoorFile =
new char[filelen+1];
2590 memcpy(binCoorFile, curfile, filelen);
2591 binCoorFile[filelen] = 0;
2593 binCoorFile =
new char[dirlen+filelen+1];
2594 memcpy(binCoorFile, namdWorkDir, dirlen);
2595 memcpy(binCoorFile+dirlen, curfile, filelen);
2596 binCoorFile[dirlen+filelen] = 0;
2599 if(opts.
defined(
"binvelocities")){
2600 current = config->
find(
"binvelocities");
2601 curfile = current->
data;
2602 filelen = strlen(curfile);
2603 if(*curfile ==
'/' || *curfile==
'~') {
2604 binVelFile =
new char[filelen+1];
2605 memcpy(binVelFile, curfile, filelen);
2606 binVelFile[filelen] = 0;
2608 binVelFile =
new char[dirlen+filelen+1];
2609 memcpy(binVelFile, namdWorkDir, dirlen);
2610 memcpy(binVelFile+dirlen, curfile, filelen);
2611 binVelFile[dirlen+filelen] = 0;
2615 if(opts.
defined(
"binrefcoords")){
2616 current = config->
find(
"binrefcoords");
2617 curfile = current->
data;
2618 filelen = strlen(curfile);
2619 if(*curfile ==
'/' || *curfile==
'~') {
2620 binRefFile =
new char[filelen+1];
2621 memcpy(binRefFile, curfile, filelen);
2622 binRefFile[filelen] = 0;
2624 binRefFile =
new char[dirlen+filelen+1];
2625 memcpy(binRefFile, namdWorkDir, dirlen);
2626 memcpy(binRefFile+dirlen, curfile, filelen);
2627 binRefFile[dirlen+filelen] = 0;
2632 if(outputFilename[0] !=
'/' && outputFilename[0]!=
'~') {
2633 filelen = strlen(outputFilename);
2634 char *tmpout =
new char[filelen];
2635 memcpy(tmpout, outputFilename, filelen);
2636 CmiAssert(filelen+dirlen <= 120);
2637 memcpy(outputFilename, namdWorkDir, dirlen);
2638 memcpy(outputFilename+dirlen, tmpout, filelen);
2639 outputFilename[filelen+dirlen] = 0;
2643 if ( dcdFrequency && opts.
defined(
"dcdfile") &&
2644 dcdFilename[0] !=
'/' && dcdFilename[0]!=
'~' ) {
2645 filelen = strlen(dcdFilename);
2646 char *tmpout =
new char[filelen];
2647 memcpy(tmpout, dcdFilename, filelen);
2648 CmiAssert(filelen+dirlen <= 120);
2649 memcpy(dcdFilename, namdWorkDir, dirlen);
2650 memcpy(dcdFilename+dirlen, tmpout, filelen);
2651 dcdFilename[filelen+dirlen] = 0;
2655 if ( velDcdFrequency && opts.
defined(
"veldcdfile") &&
2656 velDcdFilename[0] !=
'/' && velDcdFilename[0]!=
'~' ) {
2657 filelen = strlen(velDcdFilename);
2658 char *tmpout =
new char[filelen];
2659 memcpy(tmpout, velDcdFilename, filelen);
2660 CmiAssert(filelen+dirlen <= 120);
2661 memcpy(velDcdFilename, namdWorkDir, dirlen);
2662 memcpy(velDcdFilename+dirlen, tmpout, filelen);
2663 velDcdFilename[filelen+dirlen] = 0;
2667 if ( forceDcdFrequency && opts.
defined(
"forcedcdfile") &&
2668 forceDcdFilename[0] !=
'/' && forceDcdFilename[0]!=
'~' ) {
2669 filelen = strlen(forceDcdFilename);
2670 char *tmpout =
new char[filelen];
2671 memcpy(tmpout, forceDcdFilename, filelen);
2672 CmiAssert(filelen+dirlen <= 120);
2673 memcpy(forceDcdFilename, namdWorkDir, dirlen);
2674 memcpy(forceDcdFilename+dirlen, tmpout, filelen);
2675 forceDcdFilename[filelen+dirlen] = 0;
2679 if ( restartFrequency && opts.
defined(
"restartname") &&
2680 restartFilename[0] !=
'/' && restartFilename[0]!=
'~' ) {
2681 filelen = strlen(restartFilename);
2682 char *tmpout =
new char[filelen];
2683 memcpy(tmpout, restartFilename, filelen);
2684 CmiAssert(filelen+dirlen <= 120);
2685 memcpy(restartFilename, namdWorkDir, dirlen);
2686 memcpy(restartFilename+dirlen, tmpout, filelen);
2687 restartFilename[filelen+dirlen] = 0;
2691 delete [] namdWorkDir;
2693 if (opts.
defined(
"numinputprocs")) {
2694 if(numinputprocs > CkNumPes()) {
2695 iout <<
iWARN <<
"The number of input processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
2696 numinputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
2700 if (opts.
defined(
"numoutputprocs")) {
2701 if(numoutputprocs > CkNumPes()) {
2702 iout <<
iWARN <<
"The number of output processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
2703 numoutputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
2707 #ifndef OUTPUT_SINGLE_FILE
2708 #error OUTPUT_SINGLE_FILE not defined!
2711 #if !OUTPUT_SINGLE_FILE
2713 create_output_directories(
"coor");
2714 create_output_directories(
"vel");
2716 create_output_directories(
"dcd");
2718 iout <<
iWARN <<
"The dcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
2721 if (velDcdFrequency) {
2722 create_output_directories(
"veldcd");
2723 if(opts.
defined(
"veldcdfile")){
2724 iout <<
iWARN <<
"The veldcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
2727 if (forceDcdFrequency) {
2728 create_output_directories(
"forcedcd");
2729 if(opts.
defined(
"forcedcdfile")){
2730 iout <<
iWARN <<
"The forcedcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
2736 if (! opts.
defined(
"auxFile")) {
2737 strcpy(auxFilename,outputFilename);
2738 strcat(auxFilename,
".aux");
2743 if (! opts.
defined(
"dcdfile")) {
2744 strcpy(dcdFilename,outputFilename);
2745 strcat(dcdFilename,
".dcd");
2751 if (velDcdFrequency) {
2752 if (! opts.
defined(
"veldcdfile")) {
2753 strcpy(velDcdFilename,outputFilename);
2754 strcat(velDcdFilename,
".veldcd");
2760 if (forceDcdFrequency) {
2761 if (! opts.
defined(
"forcedcdfile")) {
2762 strcpy(forceDcdFilename,outputFilename);
2763 strcat(forceDcdFilename,
".forcedcd");
2770 if (! opts.
defined(
"xstfile")) {
2771 strcpy(xstFilename,outputFilename);
2772 strcat(xstFilename,
".xst");
2778 if (restartFrequency) {
2779 if (! opts.
defined(
"restartname")) {
2780 strcpy(restartFilename,outputFilename);
2781 if ( ! restartSave ) strcat(restartFilename,
".restart");
2785 restartSave =
FALSE;
2786 binaryRestart =
FALSE;
2789 if (storeComputeMap || loadComputeMap) {
2790 if (! opts.
defined(
"computeMapFile")) {
2791 strcpy(computeMapFilename,
"computeMapFile");
2792 strcat(computeMapFilename,
".txt");
2800 if (!paraTypeXplorOn && !paraTypeCharmmOn)
2802 paraTypeXplorOn =
TRUE;
2805 if (paraTypeXplorOn && paraTypeCharmmOn)
2807 NAMD_die(
"Please specify either XPLOR or CHARMM format for parameters!");
2814 if (!(minimizeOn||minimizeCGOn) && !opts.
defined(
"temperature") &&
2817 NAMD_die(
"Must have either an initial temperature or a velocity file");
2820 if (minimizeOn||minimizeCGOn) { initialTemp = 0.0; }
2821 if (opts.
defined(
"velocities") || opts.
defined(
"binvelocities") )
2828 if ( opts.
defined(
"extendedSystem") ) readExtendedSystem(config->
find(
"extendedSystem")->
data);
2830 #ifdef MEM_OPT_VERSION
2831 if ( LJcorrection ) {
2832 NAMD_die(
"LJ tail corrections not yet available for memory optimized builds");
2836 if ( LJcorrection && ! cellBasisVector3.length2() ) {
2837 NAMD_die(
"Can't use LJ tail corrections without periodic boundary conditions!");
2840 if ( cellBasisVector3.length2() && ! cellBasisVector2.length2() ) {
2841 NAMD_die(
"Used cellBasisVector3 without cellBasisVector2!");
2844 if ( cellBasisVector2.length2() && ! cellBasisVector1.length2() ) {
2845 NAMD_die(
"Used cellBasisVector2 without cellBasisVector1!");
2848 if ( cellOrigin.length2() && ! cellBasisVector1.length2() ) {
2849 NAMD_die(
"Used cellOrigin without cellBasisVector1!");
2852 lattice.set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2854 if (! opts.
defined(
"DCDunitcell")) {
2855 dcdUnitCell = lattice.a_p() && lattice.b_p() && lattice.c_p();
2861 if ( ! opts.
defined(
"cylindricalBCAxis") )
2863 cylindricalBCAxis =
'x';
2867 opts.
get(
"cylindricalBCAxis", s);
2869 if (!strcasecmp(s,
"x"))
2871 cylindricalBCAxis =
'x';
2873 else if (!strcasecmp(s,
"y"))
2875 cylindricalBCAxis =
'y';
2877 else if (!strcasecmp(s,
"z"))
2879 cylindricalBCAxis =
'z';
2885 sprintf(err_msg,
"Illegal value '%s' for 'cylindricalBCAxis' in configuration file", s);
2890 if (!opts.
defined(
"splitPatch"))
2896 opts.
get(
"splitPatch", s);
2897 if (!strcasecmp(s,
"position"))
2899 else if (!strcasecmp(s,
"hydrogen"))
2905 "Illegal value '%s' for 'splitPatch' in configuration file",
2912 opts.
get(
"exclude", s);
2914 if (!strcasecmp(s,
"none"))
2919 else if (!strcasecmp(s,
"1-2"))
2924 else if (!strcasecmp(s,
"1-3"))
2928 else if (!strcasecmp(s,
"1-4"))
2932 else if (!strcasecmp(s,
"scaled1-4"))
2940 sprintf(err_msg,
"Illegal value '%s' for 'exclude' in configuration file",
2945 if (scale14 != 1.0 && exclude !=
SCALED14)
2947 iout <<
iWARN <<
"Exclude is not scaled1-4; 1-4scaling ignored.\n" <<
endi;
2951 if (!opts.
defined(
"waterModel")) {
2954 opts.
get(
"waterModel", s);
2955 if (!strncasecmp(s,
"tip4", 4)) {
2958 }
else if (!strncasecmp(s,
"tip3", 4)) {
2961 }
else if (!strncasecmp(s,
"swm4", 4)) {
2967 "Illegal value %s for 'waterModel' in configuration file", s);
2971 if (watmodel ==
WAT_SWM4 && !drudeOn) {
2972 NAMD_die(
"Must have 'drudeOn' enabled to use SWM4-DP water model.");
2974 if (drudeOn && watmodel !=
WAT_SWM4) {
2977 <<
"Setting water model to 'swm4' (SWM4-DP) for Drude polarization.\n"
2990 int * gomethod = &goMethod;
2991 if (!opts.
defined(
"GoMethod")) {
2995 opts.
get(
"GoMethod",s);
2997 *gomethod = atoi(s);
2999 if (!strcasecmp(s,
"matrix")) {
3002 }
else if (!strcasecmp(s,
"faster")) {
3005 }
else if (!strcasecmp(s,
"lowmem")) {
3012 "Illegal value '%s' for 'GoMethod' in configuration file",
3020 if (!opts.
defined(
"MTSAlgorithm"))
3026 opts.
get(
"MTSAlgorithm", s);
3028 if (!strcasecmp(s,
"naive"))
3030 MTSAlgorithm =
NAIVE;
3032 else if (!strcasecmp(s,
"constant"))
3034 MTSAlgorithm =
NAIVE;
3036 else if (!strcasecmp(s,
"impulse"))
3040 else if (!strcasecmp(s,
"verleti"))
3049 "Illegal value '%s' for 'MTSAlgorithm' in configuration file",
3056 if (!opts.
defined(
"longSplitting"))
3062 opts.
get(
"longSplitting", s);
3063 if (!strcasecmp(s,
"sharp"))
3064 longSplitting =
SHARP;
3065 else if (!strcasecmp(s,
"xplor"))
3066 longSplitting =
XPLOR;
3067 else if (!strcasecmp(s,
"c1"))
3069 else if (!strcasecmp(s,
"c2"))
3076 "Illegal value '%s' for 'longSplitting' in configuration file",
3083 if (!opts.
defined(
"rigidBonds"))
3089 opts.
get(
"rigidBonds", s);
3090 if (!strcasecmp(s,
"all"))
3094 else if (!strcasecmp(s,
"water"))
3098 else if (!strcasecmp(s,
"none"))
3106 "Illegal value '%s' for 'rigidBonds' in configuration file", s);
3116 "Water model %s requires rigidBonds set to \"all\" or \"water\"",
3117 (watmodel ==
WAT_TIP4 ?
"TIP4P" :
"SWM4-DP"));
3122 if (switchingActive)
3125 if (!opts.
defined(
"switchDist")) {
3126 NAMD_die(
"switchDist must be defined when switching is enabled");
3129 if ( (switchingDist>cutoff) || (switchingDist<0) )
3134 "switchDist muct be between 0 and cutoff, which is %f", cutoff);
3140 if ( martiniSwitching )
3142 if ( ! switchingActive )
3144 NAMD_die(
"martiniSwitching requires switching");
3146 if ( vdwForceSwitching )
3148 NAMD_die(
"martiniSwitching and vdwForceSwitching are exclusive to one another. Select only one.");
3150 if ( dielectric != 15.0 && ! martiniDielAllow )
3152 iout <<
iWARN <<
"USE DIELECTRIC OF 15.0 WITH MARTINI.\n";
3153 iout << iWARN <<
"SETTING dielectric 15.0\n";
3154 iout << iWARN <<
"FOR NON-STANDARD DIELECTRIC WITH MARTINI, SET: martiniDielAllow on\n";
3159 iout <<
iWARN <<
"USE COSINE BASED ANGLES WITH MARTINI.\n";
3160 iout << iWARN <<
"SETTING cosAngles on\n";
3165 NAMD_die(
"Do not use Particle Mesh Ewald with Martini. Set: PME off");
3169 NAMD_die(
"Do not use Multilevel Summation Method with Martini. Set: MSM off");
3173 NAMD_die(
"Do not use Fast Multipole Method with Martini. Set: FMM off");
3179 if (!opts.
defined(
"pairlistDist"))
3181 pairlistDist = cutoff;
3183 else if (pairlistDist < cutoff)
3185 NAMD_die(
"pairlistDist must be >= cutoff distance");
3188 patchDimension = pairlistDist;
3191 patchDimension += hgroupCutoff;
3195 if (berendsenPressureOn || langevinPistonOn) {
3196 defaultMargin = ( useFlexibleCell ? 0.06 : 0.03 ) * patchDimension;
3199 margin = defaultMargin;
3201 if ( defaultMargin != 0.0 && margin == 0.0 ) {
3202 margin = defaultMargin;
3203 iout <<
iWARN <<
"ALWAYS USE NON-ZERO MARGIN WITH CONSTANT PRESSURE!\n";
3204 iout << iWARN <<
"CHANGING MARGIN FROM 0 to " << margin <<
"\n" <<
endi;
3207 patchDimension += margin;
3213 NAMD_die(
"GBIS not compatible with FullDirect");
3216 NAMD_die(
"GBIS not compatible with PME");
3219 NAMD_die(
"GBIS not compatible with MSM");
3222 NAMD_die(
"GBIS not compatible with FMM");
3225 NAMD_die(
"GBIS not compatible with Alchemical Transformations");
3228 NAMD_die(
"GBIS not compatible with Locally Enhanced Sampling");
3231 NAMD_die(
"GBIS not compatible with FMA");
3234 NAMD_die(
"GBIS not compatible with Drude Polarization");
3237 if (alpha_cutoff > patchDimension) {
3238 patchDimension = alpha_cutoff;
3241 BigReal tmp = (initialTemp > 0) ? initialTemp : 300;
3242 kappa = 50.29216*sqrt(ion_concentration/solvent_dielectric/tmp);
3247 #ifdef MEM_OPT_VERSION
3248 NAMD_die(
"SASA not yet available for memory optimized builds");
3250 if ( lattice.volume() > 0 ) {
3251 NAMD_die(
"SASA does not yet support periodic boundary conditions.");
3259 if ( dihedralOn ) globalOn =
TRUE;
3261 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
3262 if (loweAndersenOn) {
3263 NAMD_die(
"Lowe-Andersen dynamics not compatible with CUDA at this time");
3269 if (loweAndersenOn && (langevinOn || tCoupleOn))
3271 NAMD_die(
"Lowe-Andersen dynamics, Langevin dynamics and temperature coupling are mutually exclusive dynamics modes");
3275 if (tCoupleOn && opts.
defined(
"rescaleFreq") )
3277 NAMD_die(
"Temperature coupling and temperature rescaling are mutually exclusive");
3280 if (globalOn && CkNumPes() > 1)
3282 NAMD_die(
"Global integration does not run in parallel (yet).");
3285 if (COLDOn && langevinOn)
3287 NAMD_die(
"COLD and Langevin dynamics are mutually exclusive dynamics modes");
3289 if (COLDOn && minimizeOn)
3291 NAMD_die(
"COLD and minimization are mutually exclusive dynamics modes");
3293 if (COLDOn && tCoupleOn)
3295 NAMD_die(
"COLD and temperature coupling are mutually exclusive dynamics modes");
3297 if (COLDOn && opts.
defined(
"rescaleFreq"))
3299 NAMD_die(
"COLD and velocity rescaling are mutually exclusive dynamics modes");
3304 NAMD_die(
"splitPatch hydrogen is required for MOLLY");
3309 NAMD_die(
"splitPatch hydrogen is required for rigidBonds");
3315 if(accelMDGiE < 1 || accelMDGiE > 2){
3316 sprintf(msg,
"accelMDGiE was set to %d but it should be 1 or 2", accelMDGiE);
3319 if(accelMDGStatWindow > 0){
3320 if(accelMDGcMDPrepSteps % accelMDGStatWindow != 0)
3321 NAMD_die(
"'accelMDGcMDPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3322 if(accelMDGcMDSteps % accelMDGStatWindow != 0)
3323 NAMD_die(
"'accelMDGcMDSteps' has to be a multiple of 'accelMDGStatWindow'");
3324 if(accelMDGEquiPrepSteps % accelMDGStatWindow != 0)
3325 NAMD_die(
"'accelMDGEquiPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3326 if(accelMDGEquiSteps % accelMDGStatWindow != 0)
3327 NAMD_die(
"'accelMDGEquiSteps' has to be a multiple of 'accelMDGStatWindow'");
3329 if(accelMDGRestart && accelMDGcMDSteps == 0)
3330 accelMDGcMDPrepSteps = 0;
3331 else if(accelMDGcMDSteps - accelMDGcMDPrepSteps < 2)
3332 NAMD_die(
"'accelMDGcMDSteps' should be larger than 'accelMDGcMDPrepSteps'");
3334 if(accelMDGEquiSteps == 0)
3335 accelMDGEquiPrepSteps = 0;
3336 else if(accelMDGresetVaftercmd){
3337 if(accelMDGEquiPrepSteps <= 0)
3338 NAMD_die(
"'accelMDGEquiPrepSteps' should be non-zero");
3339 if(accelMDGEquiSteps - accelMDGEquiPrepSteps < 1)
3340 NAMD_die(
"'accelMDGEquiSteps' should be larger than 'accelMDGEquiPrepSteps'");
3345 iout <<
iWARN <<
"accelMDE will be ignored with accelMDG on.\n" << endi;
3346 if(opts.
defined(
"accelMDalpha"))
3347 iout <<
iWARN <<
"accelMDalpha will be ignored with accelMDG on.\n" << endi;
3349 iout <<
iWARN <<
"accelMDTE will be ignored with accelMDG on.\n" << endi;
3350 if(opts.
defined(
"accelMDTalpha"))
3351 iout <<
iWARN <<
"accelMDTalpha will be ignored with accelMDG on.\n" << endi;
3355 NAMD_die(
"accelMDE and accelMDalpha are required for accelMD with accelMDG off");
3357 if(accelMDdual && (!opts.
defined(
"accelMDTE") || !opts.
defined(
"accelMDTalpha"))){
3358 NAMD_die(
"accelMDTE and accelMDTalpha are required for accelMDdual with accelMDG off");
3365 if (minimizeOn && (maximumMove == 0.0))
3367 maximumMove = 0.75 * pairlistDist/stepsPerCycle;
3370 if (!adaptTempRescale && !adaptTempLangevin)
3371 NAMD_die(
"Adaptive tempering needs to be coupled to either the Langevin thermostat or velocity rescaling.");
3372 if (opts.
defined(
"adaptTempInFile") && (opts.
defined(
"adaptTempTmin") ||
3373 opts.
defined(
"adaptTempTmax") ||
3374 adaptTempBins != 0))
3375 NAMD_die(
"cannot simultaneously specify adaptTempInFile and any of {adaptTempTmin, adaptTempTmax,adaptTempBins} as these are read from the input file");
3376 if (!opts.
defined(
"adaptTempInFile") && !(opts.
defined(
"adaptTempTmin") &&
3377 opts.
defined(
"adaptTempTmax") &&
3378 adaptTempBins != 0 ))
3379 NAMD_die(
"Need to specify either adaptTempInFile or all of {adaptTempTmin, adaptTempTmax,adaptTempBins} if adaptTempMD is on.");
3382 langevinOnAtStartup = langevinOn;
3384 if ( ! opts.
defined(
"langevinDamping") ) langevinDamping = 0.0;
3385 if ( ! opts.
defined(
"langevinHydrogen") ) langevinHydrogen =
TRUE;
3386 if ( (opts.
defined(
"langevinDamping") || opts.
defined(
"langevinHydrogen"))
3387 && (opts.
defined(
"langevinFile") || opts.
defined(
"langevinCol")) )
3388 NAMD_die(
"To specify Langevin dynamics parameters, use either langevinDamping and langevinHydrogen or langevinFile and langevinCol. Do not combine them.");
3389 if ( opts.
defined(
"langevinHydrogen") && langevinDamping == 0.0 )
3390 NAMD_die(
"langevinHydrogen requires langevinDamping to be set.");
3394 if (loweAndersenOn) {
3395 if (!opts.
defined(
"loweAndersenRate")) loweAndersenRate = 100;
3396 if (!opts.
defined(
"loweAndersenCutoff")) loweAndersenCutoff = 2.7;
3401 if (stochRescaleOn) {
3402 if (langevinOn || loweAndersenOn || tCoupleOn ||
3404 NAMD_die(
"Stochastic velocity rescaling is incompatible with other temperature control methods");
3406 if (!opts.
defined(
"stochRescaleFreq")) stochRescaleFreq = stepsPerCycle;
3409 if (opts.
defined(
"rescaleFreq"))
3411 if (!opts.
defined(
"rescaleTemp"))
3413 if (opts.
defined(
"temperature"))
3415 rescaleTemp = initialTemp;
3419 NAMD_die(
"Must give a rescale temperature if rescaleFreq is defined");
3429 if (opts.
defined(
"rescaleTemp"))
3431 if (!opts.
defined(
"rescaleFreq"))
3433 NAMD_die(
"Must give a rescale freqency if rescaleTemp is given");
3437 if (opts.
defined(
"reassignFreq"))
3439 if (!opts.
defined(
"reassignTemp"))
3441 if (opts.
defined(
"temperature"))
3443 reassignTemp = initialTemp;
3447 NAMD_die(
"Must give a reassign temperature if reassignFreq is defined");
3457 if (opts.
defined(
"reassignTemp"))
3459 if (!opts.
defined(
"reassignFreq"))
3461 NAMD_die(
"Must give a reassignment freqency if reassignTemp is given");
3465 if (opts.
defined(
"reassignIncr"))
3467 if (!opts.
defined(
"reassignFreq"))
3469 NAMD_die(
"Must give a reassignment freqency if reassignIncr is given");
3477 if (opts.
defined(
"reassignHold"))
3479 if (!opts.
defined(
"reassignIncr"))
3481 NAMD_die(
"Must give a reassignment increment if reassignHold is given");
3491 randomSeed = (
unsigned int) time(NULL) + 31530001 * CmiMyPartition();
3495 if (opts.
defined(
"soluteScaling")) {
3499 if ( ! opts.
defined(
"soluteScalingFactorCharge") ) {
3500 soluteScalingFactorCharge = soluteScalingFactor;
3502 if ( ! opts.
defined(
"soluteScalingFactorVdw") ) {
3503 soluteScalingFactorVdw = soluteScalingFactor;
3508 alchFepOnAtStartup = alchFepOn =
FALSE;
3509 alchThermIntOnAtStartup = alchThermIntOn =
FALSE;
3510 alchOnAtStartup = alchOn;
3513 if (martiniSwitching) {
3514 iout <<
iWARN <<
"Martini switching disabled for alchemical "
3515 "interactions.\n" <<
endi;
3518 if (!opts.
defined(
"alchType")) {
3519 NAMD_die(
"Must define type of alchemical simulation: fep or ti\n");
3522 opts.
get(
"alchType",s);
3523 if (!strcasecmp(s,
"fep")) {
3524 alchFepOnAtStartup = alchFepOn =
TRUE;
3526 else if (!strcasecmp(s,
"ti")) {
3527 alchThermIntOnAtStartup = alchThermIntOn =
TRUE;
3530 NAMD_die(
"Unknown type of alchemical simulation; choices are fep or ti\n");
3534 if (rescaleFreq > 0) alchTemp = rescaleTemp;
3535 else if (reassignFreq > 0) alchTemp = reassignTemp;
3536 else if (langevinOn) alchTemp = langevinTemp;
3537 else if (stochRescaleOn) alchTemp = stochRescaleTemp;
3538 else if (tCoupleOn) alchTemp = tCoupleTemp;
3539 else NAMD_die(
"Alchemical FEP can be performed only in constant temperature simulations\n");
3541 if (reassignFreq > 0 && reassignIncr != 0)
3542 NAMD_die(
"reassignIncr cannot be used in alchemical simulations\n");
3544 if (alchLambda < 0.0 || alchLambda > 1.0)
3545 NAMD_die(
"alchLambda values should be in the range [0.0, 1.0]\n");
3547 if (alchVdwLambdaEnd > 1.0)
3548 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");
3550 if (alchBondLambdaEnd > 1.0)
3551 NAMD_die(
"alchBondLambdaEnd should be in the range [0.0, 1.0]\n");
3553 if (alchElecLambdaStart > 1.0)
3554 NAMD_die(
"alchElecLambdaStart should be in the range [0.0, 1.0]\n");
3557 if (alchRepLambdaEnd > 1.0)
3558 NAMD_die(
"alchRepLambdaEnd should be in the range [0.0, 1.0]\n");
3559 if (alchVdwLambdaEnd < alchRepLambdaEnd)
3560 NAMD_die(
"alchVdwLambdaEnd should be greater than alchRepLambdaEnd\n");
3561 if (alchVdwShiftCoeff > 0.0) {
3562 iout <<
iWARN <<
"alchVdwShiftCoeff is non-zero but not used when WCA"
3563 <<
" is active. Setting it to zero now.\n" <<
endi;
3564 alchVdwShiftCoeff = 0.0;
3566 if (alchThermIntOn) {
3567 NAMD_die(
"alchWCA is not currently compatible with TI");
3569 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
3570 NAMD_die(
"alchWCA is not currently available with CUDA");
3575 if (alchLambda2 < 0.0 || alchLambda2 > 1.0)
3576 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
3580 if (!opts.
defined(
"alchoutfile")) {
3581 strcpy(alchOutFile, outputFilename);
3582 strcat(alchOutFile,
".fep");
3585 if (!opts.
defined(
"alchLambda") || !opts.
defined(
"alchLambda2")) {
3586 NAMD_die(
"alchFepOn is on, but alchLambda or alchLambda2 is not set.");
3589 else if (alchThermIntOn) {
3591 if (alchLambdaFreq && (alchLambda2 < 0.0 || alchLambda2 > 1.0))
3592 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
3594 if (!opts.
defined(
"alchoutfile")) {
3595 strcpy(alchOutFile, outputFilename);
3596 strcat(alchOutFile,
".ti");
3603 if ( alchOn && alchFepOn && alchThermIntOn )
3604 NAMD_die(
"Sorry, combined TI and FEP is not implemented.\n");
3605 if ( alchOn && lesOn )
3606 NAMD_die(
"Sorry, combined LES with FEP or TI is not implemented.\n");
3607 if ( alchOn && alchThermIntOn && lesOn )
3608 NAMD_die(
"Sorry, combined LES and TI is not implemented.\n");
3609 if ( alchWCAOn && !alchOn ) {
3610 iout <<
iWARN <<
"Alchemical WCA decomposition was requested but \
3611 alchemical free energy calculation is not active. Setting \
3612 alchWCA to off.\n" <<
endi;
3615 if ( alchDecouple && !alchOn ) {
3616 iout <<
iWARN <<
"Alchemical decoupling was requested but \
3617 alchemical free energy calculation is not active. Setting \
3618 alchDecouple to off.\n" <<
endi;
3619 alchDecouple =
FALSE;
3621 if ( alchBondDecouple && !alchOn ) {
3622 iout <<
iWARN <<
"Alchemical bond decoupling was requested but \
3623 alchemical free energy calculation is not active. Setting \
3624 alchBondDecouple to off.\n" <<
endi;
3625 alchBondDecouple =
FALSE;
3628 if ( lesOn && ( lesFactor < 1 || lesFactor > 255 ) ) {
3629 NAMD_die(
"lesFactor must be positive and less than 256");
3631 if ((pairInteractionOn && alchOn) || (pairInteractionOn && lesOn))
3632 NAMD_die(
"Sorry, pair interactions may not be calculated when LES, FEP or TI is enabled.");
3636 if ( ! langevinOn ) {
3637 NAMD_die(
"Drude model requires use of Langevin thermostat.");
3639 if ( ! opts.
defined(
"drudeDamping")) {
3640 drudeDamping = langevinDamping;
3641 iout <<
iWARN <<
"Undefined 'drudeDamping' will be set to "
3642 "value of 'langevinDamping'\n" <<
endi;
3645 NAMD_die(
"Drude implementation is incompatible with alchemical "
3646 "free energy calculation.");
3651 if (opts.
defined(
"ldBalancer")) {
3652 if (strcasecmp(loadBalancer,
"none") == 0)
3654 else if (strcasecmp(loadBalancer,
"hybrid") == 0)
3657 NAMD_die(
"Unknown ldBalancer selected");
3660 #ifdef MEM_OPT_VERSION
3665 if (opts.
defined(
"ldbStrategy")) {
3667 if (strcasecmp(loadStrategy,
"comprehensive") == 0)
3669 else if (strcasecmp(loadStrategy,
"refineonly") == 0)
3671 else if (strcasecmp(loadStrategy,
"old") == 0)
3674 NAMD_die(
"Unknown ldbStrategy selected");
3679 if (!opts.
defined(
"ldbPeriod")) {
3680 ldbPeriod=200*stepsPerCycle;
3684 if (!opts.
defined(
"firstLdbStep")) {
3685 firstLdbStep=5*stepsPerCycle;
3688 if (ldbPeriod <= firstLdbStep) {
3689 NAMD_die(
"ldbPeriod must greater than firstLdbStep.");
3692 if (!opts.
defined(
"lastLdbStep")) {
3696 if (!opts.
defined(
"hybridGroupSize")) {
3697 hybridGroupSize = 512;
3699 if ( hybridGroupSize < CkNumPes() ) {
3701 int groupsize = hybridGroupSize;
3704 CmiGetPesOnPhysicalNode(CmiPhysicalNodeID(0), &rpelist, &nodesize);
3705 if ( CkNumPes() % nodesize ) nodesize = CmiNodeSize(CmiNodeOf(0));
3706 if ( CkNumPes() % nodesize ) nodesize = 1;
3707 groupsize += nodesize - 1;
3708 while ( 2 * groupsize > CkNumPes() ) --groupsize;
3709 if ( groupsize < nodesize ) groupsize = nodesize;
3710 while ( groupsize % nodesize ) --groupsize;
3711 while ( groupsize && CkNumPes() % groupsize ) groupsize -= nodesize;
3712 if ( 2 * groupsize < hybridGroupSize ) {
3713 groupsize += nodesize;
3714 while ( CkNumPes() % groupsize ) groupsize += nodesize;
3716 if ( 2 * groupsize <= CkNumPes() ) hybridGroupSize = groupsize;
3721 bool specialTracing = traceAvailable() && (traceIsOn() == 0);
3723 if(!opts.
defined(
"traceStartStep")) {
3724 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
3726 if(!opts.
defined(
"numTraceSteps")) {
3727 numTraceSteps = 100;
3730 if(specialTracing) {
3731 if (!opts.
defined(
"firstLdbStep")) firstLdbStep = 20;
3732 if (!opts.
defined(
"ldbPeriod")) ldbPeriod = 100;
3734 if(!opts.
defined(
"traceStartStep")) {
3735 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
3738 if(!opts.
defined(
"numTraceSteps")) {
3743 #ifdef MEASURE_NAMD_WITH_PAPI
3745 if(!opts.
defined(
"papiMeasureStartStep")) {
3746 papiMeasureStartStep = 3 * firstLdbStep;
3748 if(!opts.
defined(
"numPapiMeasureSteps")) {
3749 numPapiMeasureSteps = 8;
3754 if(simulateInitialMapping) {
3755 if(!opts.
defined(
"simulatedPEs")){
3756 simulatedPEs = CkNumPes();
3758 if(!opts.
defined(
"simulatedNodeSize")){
3759 simulatedNodeSize = CkMyNodeSize();
3763 #ifdef MEM_OPT_VERSION
3772 if(ldbPeriod%stepsPerCycle!=0 || firstLdbStep%stepsPerCycle!=0) {
3773 iout <<
iWARN <<
"In memory optimized version, the ldbPeriod parameter or firstLdbStep parameter is better set to be a multiple of stepsPerCycle parameter!\n";
3777 if (N < firstTimestep) { N = firstTimestep; }
3779 if ( (firstTimestep%stepsPerCycle) != 0)
3781 NAMD_die(
"First timestep must be a multiple of stepsPerCycle!!");
3791 if ( fullDirectOn ) ++i;
3793 NAMD_die(
"More than one full electrostatics algorithm selected!!!");
3796 if (!opts.
defined(
"ldbBackgroundScaling")) {
3797 ldbBackgroundScaling = 1.0;
3799 if (!opts.
defined(
"ldbPMEBackgroundScaling")) {
3800 ldbPMEBackgroundScaling = ldbBackgroundScaling;
3802 if (!opts.
defined(
"ldbHomeBackgroundScaling")) {
3803 ldbHomeBackgroundScaling = ldbBackgroundScaling;
3808 if ( lattice.volume() == 0. ) {
3809 NAMD_die(
"PME requires periodic boundary conditions.");
3811 if ( PMEGridSpacing == 0. ) {
3812 if ( PMEGridSizeX * PMEGridSizeY * PMEGridSizeZ == 0 )
3813 NAMD_die(
"Either PMEGridSpacing or PMEGridSizeX, PMEGridSizeY, and PMEGridSizeZ must be specified.");
3814 else PMEGridSpacing = 1.5;
3816 #ifndef TEST_PME_GRID
3817 for (
int idim = 0; idim < 3; ++idim ) {
3820 const char *direction;
3822 case 0: direction =
"X";
3823 gridSize = &PMEGridSizeX; cellLength = lattice.a().length();
3825 case 1: direction =
"Y";
3826 gridSize = &PMEGridSizeY; cellLength = lattice.b().length();
3828 case 2: direction =
"Z";
3829 gridSize = &PMEGridSizeZ; cellLength = lattice.c().length();
3832 int minSize = (int) ceil(cellLength/PMEGridSpacing);
3834 for (
int minSize = 1; minSize < 300; ++minSize ) {
3836 int bestSize = 10 * (minSize + 10);
3838 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
3839 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
3843 for (
int i2 = 0; i2 <= max2; ++i2 ) {
3844 for (
int i3 = 0; i3 <= max3; ++i3 ) {
3845 for (
int i5 = 0; i5 <= max5; ++i5 ) {
3846 for (
int i7 = 0; i7 <= max7; ++i7 ) {
3847 for (
int i11 = 0; i11 <= max11; ++i11 ) {
3848 if ( i5 + i7 + i11 > i2 )
continue;
3850 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
3851 if ( testSize > bestSize )
continue;
3852 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
3853 if ( testSize > bestSize )
continue;
3854 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
3855 if ( testSize > bestSize )
continue;
3856 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
3857 if ( testSize > bestSize )
continue;
3858 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
3859 if ( testSize > bestSize )
continue;
3860 if ( testSize >= minSize ) bestSize = testSize;
3862 #ifdef TEST_PME_GRID
3863 iout << minSize <<
" " << bestSize <<
"\n" <<
endi;
3865 if ( ! *gridSize ) {
3866 *gridSize = bestSize;
3868 if ( *gridSize * PMEGridSpacing < cellLength ) {
3870 sprintf(errmsg,
"PMEGridSize%s %d is too small for cell length %f and PMEGridSpacing %f\n",
3871 direction, *gridSize, cellLength, PMEGridSpacing);
3876 if ( PMEGridSizeX < 5 ) {
3877 NAMD_die(
"PMEGridSizeX (number of grid points) is very small.");
3879 if ( PMEGridSizeY < 5 ) {
3880 NAMD_die(
"PMEGridSizeY (number of grid points) is very small.");
3882 if ( PMEGridSizeZ < 5 ) {
3883 NAMD_die(
"PMEGridSizeZ (number of grid points) is very small.");
3885 BigReal tolerance = PMETolerance;
3887 while ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) ewaldcof *= 2.0;
3889 BigReal ewaldcof_hi = ewaldcof;
3890 for (
int i = 0; i < 100; ++i ) {
3891 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
3892 if ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) {
3893 ewaldcof_lo = ewaldcof;
3895 ewaldcof_hi = ewaldcof;
3898 PMEEwaldCoefficient = ewaldcof;
3900 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
3902 if ( ! opts.
defined(
"PMEOffload") ) {
3903 PMEOffload = ( (PMEInterpOrder > 4) && one_device_per_node );
3904 if ( PMEOffload )
iout <<
iINFO <<
"Enabling PMEOffload because PMEInterpOrder > 4.\n" <<
endi;
3905 }
else if ( PMEOffload && ! one_device_per_node ) {
3907 iout <<
iWARN <<
"Disabling PMEOffload because multiple CUDA devices per process are not supported.\n" <<
endi;
3909 if ( usePMECUDA && ! ( useCUDA2 || one_device_per_node ) ) {
3911 iout <<
iWARN <<
"Disabling usePMECUDA because multiple CUDA devices per process requires useCUDA2.\n" <<
endi;
3921 PMEGridSpacing = 1000.;
3922 PMEEwaldCoefficient = 0;
3939 if (FMAFFTBlock != 4)
3940 NAMD_die(
"FMAFFTBlock: Block length must be 4 for short FFT's");
3941 if (FMAMp % FMAFFTBlock != 0)
3942 NAMD_die(
"FMAMp: multipole term must be multiple of block length (FMAFFTBlock)");
3945 if ( (nonbondedFrequency > stepsPerCycle) || ( (stepsPerCycle % nonbondedFrequency) != 0) )
3947 NAMD_die(
"stepsPerCycle must be a multiple of nonbondedFreq");
3950 if (!LCPOOn && !GBISOn && !GBISserOn && !FMAOn && !PMEOn && !MSMOn && !fullDirectOn && !FMMOn)
3952 fullElectFrequency = 0;
3956 if (!opts.
defined(
"fullElectFrequency"))
3958 if (opts.
defined(
"fmaFrequency")) {
3959 iout <<
iWARN <<
"The parameter fmaFrequency has been renamed fullElectFrequency.\n" <<
endi;
3960 fullElectFrequency = fmaFrequency;
3962 iout <<
iWARN <<
"The parameter fullElectFrequency now defaults to nonbondedFreq (" << nonbondedFrequency <<
") rather than stepsPerCycle.\n" <<
endi;
3963 fullElectFrequency = nonbondedFrequency;
3968 if (opts.
defined(
"fmaFrequency")) {
3969 iout <<
iWARN <<
"Ignoring redundant parameter fmaFrequency in favor of fullElectFrequency.\n" <<
endi;
3971 if ( (fullElectFrequency > stepsPerCycle) || ( (stepsPerCycle % fullElectFrequency) != 0) )
3973 NAMD_die(
"stepsPerCycle must be a multiple of fullElectFrequency");
3977 if ( (nonbondedFrequency > fullElectFrequency) || ( (fullElectFrequency % nonbondedFrequency) != 0) )
3979 NAMD_die(
"fullElectFrequency must be a multiple of nonbondedFreq");
3982 if (singleTopology && fullElectFrequency > 1)
NAMD_die(
"Single topology free energy calculation discourages multiple timesteps to assure accuracy!");
3983 if (singleTopology && alchDecouple)
NAMD_die(
"Single topology free energy calculation can NOT work with alchDecouple on");
3985 if (multigratorOn) {
3986 if ( (multigratorTemperatureFreq > multigratorPressureFreq) || ( (multigratorPressureFreq % multigratorTemperatureFreq) != 0) )
3988 NAMD_die(
"multigratorTemperatureFreq must be a multiple of multigratorPressureFreq");
3990 if ( (fullElectFrequency > multigratorTemperatureFreq) || ( (multigratorTemperatureFreq % fullElectFrequency) != 0) )
3992 NAMD_die(
"fullElectFrequency must be a multiple of multigratorTemperatureFreq");
3994 if (multigratorNoseHooverChainLength <= 2) {
3995 NAMD_die(
"multigratorNoseHooverChainLength must be greater than 2");
3999 if (!opts.
defined(
"fmaTheta"))
4003 if ( lesOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4004 NAMD_die(
"Sorry, LES is only implemented for PME full electrostatics.");
4006 if ( alchFepOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4007 NAMD_die(
"Sorry, FEP is only implemented for PME full electrostatics.");
4009 if ( alchThermIntOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4010 NAMD_die(
"Sorry, TI is only implemented for PME full electrostatics.");
4012 if ( pairInteractionOn && FMAOn ) {
4013 NAMD_die(
"Sorry, pairInteraction not implemented for FMA.");
4015 if ( pairInteractionOn && useDPME ) {
4016 NAMD_die(
"Sorry, pairInteraction not implemented for DPME.");
4018 if ( pairInteractionOn && fullDirectOn ) {
4019 NAMD_die(
"Sorry, pairInteraction not implemented for full direct electrostatics.");
4021 if ( ! pairInteractionOn ) {
4022 pairInteractionSelf = 0;
4024 if ( pairInteractionOn && !pairInteractionSelf && !config->
find(
"pairInteractionGroup2"))
4025 NAMD_die(
"pairInteractionGroup2 must be specified");
4027 if ( ! fixedAtomsOn ) {
4028 fixedAtomsForces = 0;
4031 if ( gridforceOn || mgridforceOn ) {
4032 parse_mgrid_params(config);
4035 if ( extraBondsOn ) {
4036 extraBondsCosAnglesSetByUser = ! ! config->
find(
"extraBondsCosAngles");
4038 extraBondsCosAnglesSetByUser =
false;
4041 if (!opts.
defined(
"constraints"))
4044 constraintScaling = 1.0;
4047 selectConstraintsOn =
FALSE;
4051 movingConstraintsOn =
FALSE;
4054 rotConstraintsOn =
FALSE;
4059 if (rotConstraintsOn) {
4060 rotConsAxis = rotConsAxis.unit();
4063 if(opts.
defined(
"rotConstraints")
4064 && opts.
defined(
"movingConstraints")) {
4065 NAMD_die(
"Rotating and moving constraints are mutually exclusive!");
4070 if(opts.
defined(
"selectConstraints") && !opts.
defined(
"selectConstrX")
4071 && !opts.
defined(
"selectConstrY") && !opts.
defined(
"selectConstrZ")) {
4072 NAMD_die(
"selectConstraints was specified, but no Cartesian components were defined!");
4074 if (!opts.
defined(
"selectConstraints")) {
4090 if (SMDDir.length2() == 0) {
4091 NAMD_die(
"SMD direction vector must be non-zero");
4094 SMDDir = SMDDir.unit();
4097 if (SMDOutputFreq > 0 && SMDOutputFreq < stepsPerCycle
4098 || SMDOutputFreq % stepsPerCycle != 0) {
4099 NAMD_die(
"SMDOutputFreq must be a multiple of stepsPerCycle");
4107 sphericalBCr1 = 0.0;
4108 sphericalBCk1 = 0.0;
4109 sphericalBCexp1 = 0;
4110 sphericalBCr2 = 0.0;
4111 sphericalBCk2 = 0.0;
4112 sphericalBCexp2 = 0;
4114 else if (!opts.
defined(
"sphericalBCr2"))
4116 sphericalBCr2 = -1.0;
4117 sphericalBCk2 = 0.0;
4118 sphericalBCexp2 = 0;
4121 if (!cylindricalBCOn)
4123 cylindricalBCr1 = 0.0;
4124 cylindricalBCk1 = 0.0;
4125 cylindricalBCexp1 = 0;
4126 cylindricalBCr2 = 0.0;
4127 cylindricalBCk2 = 0.0;
4128 cylindricalBCexp2 = 0;
4129 cylindricalBCl1 = 0.0;
4130 cylindricalBCl2 = 0.0;
4132 else if (!opts.
defined(
"cylindricalBCr2"))
4134 cylindricalBCr2 = -1.0;
4135 cylindricalBCk2 = 0.0;
4136 cylindricalBCexp2 = 0;
4137 cylindricalBCl2 = 0.0;
4150 if (!opts.
defined(
"eFieldFreq")) eFieldFreq = 0.0;
4151 if (!opts.
defined(
"eFieldPhase")) eFieldPhase = 0.0;
4157 stirStartingTheta = 0.0;
4168 if (!opts.
defined(
"langevin"))
4174 if (!opts.
defined(
"loweAndersen"))
4176 loweAndersenTemp = 0.0;
4187 if (daCutoffDist > pairlistDist)
4188 NAMD_die(
"Hydrogen bond cutoff distance must be <= pairlist distance");
4195 if (pairInteractionOn) {
4196 if (outputEnergies != 1) {
4197 iout <<
iWARN <<
"Setting outputEnergies to 1 due to\n";
4198 iout << iWARN <<
"pairInteraction calculations\n" <<
endi;
4202 if (pairInteractionOn || pressureProfileOn) {
4203 if (nonbondedFrequency != 1) {
4204 iout <<
iWARN <<
"Setting nonbondedFreq to 1 due to\n";
4205 iout << iWARN <<
"pairInteraction or pressure profile calculations\n" <<
endi;
4210 if (!opts.
defined(
"outputTiming"))
4212 outputTiming = firstLdbStep;
4213 int ot2 = 10 * outputEnergies;
4214 if ( outputTiming < ot2 ) outputTiming = ot2;
4221 if (opts.
defined(
"QMSecProc")){
4225 qmSecProcOn =
false;
4228 if (opts.
defined(
"qmPrepProc")){
4229 qmPrepProcOn =
true;
4232 qmPrepProcOn =
false;
4235 if (opts.
defined(
"QMParamPDB")){
4236 qmParamPDBDefined =
true;
4239 qmParamPDBDefined =
false;
4242 if (opts.
defined(
"QMBondColumn")){
4249 if ( strcasecmp(qmSoftware,
"orca") != 0 &&
4250 strcasecmp(qmSoftware,
"mopac") != 0 &&
4251 strcasecmp(qmSoftware,
"custom") != 0 ) {
4252 NAMD_die(
"Available QM software options are \'mopac\', \'orca\', or \'custom\'.");
4255 if ( strcasecmp(qmSoftware,
"orca") == 0 )
4257 if ( strcasecmp(qmSoftware,
"mopac") == 0 )
4259 if ( strcasecmp(qmSoftware,
"custom") == 0 )
4264 if (! opts.
defined(
"QMConfigLine"))
4265 NAMD_die(
"If the selected QM software is \'mopac\' or \'orca\'\
4266 , QMConfigLine needs to be defined.");
4272 if (opts.
defined(
"QMChargeMode")) {
4273 if ( strcasecmp(qmChrgModeS,
"none") != 0 &&
4274 strcasecmp(qmChrgModeS,
"mulliken") != 0 &&
4275 strcasecmp(qmChrgModeS,
"chelpg") != 0) {
4276 NAMD_die(
"Available charge options are \'none\', \'mulliken\' or \'chelpg\'.");
4279 if ( strcasecmp(qmChrgModeS,
"none") == 0 )
4281 if ( strcasecmp(qmChrgModeS,
"mulliken") == 0 )
4283 if ( strcasecmp(qmChrgModeS,
"chelpg") == 0 )
4289 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4292 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4294 if (qmBondOn && (opts.
defined(
"QMBondValueType"))) {
4295 if ( strcasecmp(qmBondValueTypeS,
"len") != 0 &&
4296 strcasecmp(qmBondValueTypeS,
"ratio") != 0 ) {
4297 NAMD_die(
"Available QM bond value type options are \'len\' or \'ratio\'.");
4302 if ( strcasecmp(qmBondValueTypeS,
"len") == 0 )
4304 if ( strcasecmp(qmBondValueTypeS,
"ratio") == 0 )
4308 else if (qmBondOn && ! (opts.
defined(
"QMBondValueType")))
4311 if ( strcmp(qmColumn,
"beta") != 0 &&
4312 strcmp(qmColumn,
"occ") != 0 ) {
4313 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4317 if ( strcmp(qmBondColumn,
"beta") != 0 &&
4318 strcmp(qmBondColumn,
"occ") != 0 ) {
4319 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4322 if (strcmp(qmBondColumn,qmColumn) == 0)
4323 NAMD_die(
"QM column and bond-column must be different!");
4327 if (opts.
defined(
"QMBondScheme")) {
4328 if ( strcasecmp(qmBondSchemeS,
"CS") == 0 )
4330 if ( strcasecmp(qmBondSchemeS,
"RCD") == 0 )
4332 if ( strcasecmp(qmBondSchemeS,
"Z1") == 0 )
4334 if ( strcasecmp(qmBondSchemeS,
"Z2") == 0 )
4336 if ( strcasecmp(qmBondSchemeS,
"Z3") == 0 )
4344 if (opts.
defined(
"QMPointChargeScheme") && qmPCSwitchOn) {
4345 if ( strcasecmp(qmPCSchemeS,
"none") == 0 )
4348 if ( strcasecmp(qmPCSchemeS,
"round") == 0 )
4350 if ( strcasecmp(qmPCSchemeS,
"zero") == 0 )
4353 if ( qmPCScheme > 1 && ! qmPCSwitchOn)
4354 NAMD_die(
"QM Charge Schemes \'round\' or \'zero\' can only be applied with QMswitching set to \'on\'!");
4366 NAMD_die(
"QM Live Solvent Selection cannot be done with QMNoPntChrg set to \'on\'!") ;
4369 NAMD_die(
"QM Live Solvent Selection cannot be done with fixed bonds!") ;
4371 if (qmLSSFreq % qmPCSelFreq != 0)
4372 NAMD_die(
"Frequency of QM solvent update must be a multiple of frequency of point charge selection.");
4374 if (qmLSSFreq % stepsPerCycle != 0)
4375 NAMD_die(
"Frequency of QM solvent update must be a multiple of steps per cycle.");
4377 if (opts.
defined(
"QMLSSMode") ) {
4378 if ( strcasecmp(qmLSSModeS,
"dist") != 0 &&
4379 strcasecmp(qmLSSModeS,
"COM") != 0 ) {
4380 NAMD_die(
"Available LSS mode options are \'dist\' and \'COM\'.");
4382 if ( strcasecmp(qmLSSModeS,
"dist") == 0 )
4384 else if ( strcasecmp(qmLSSModeS,
"COM") == 0 )
4395 if (opts.
defined(
"QMSwitchingType") ) {
4396 if ( strcasecmp(qmPCSwitchTypeS,
"shift") != 0 &&
4397 strcasecmp(qmPCSwitchTypeS,
"switch") != 0 ) {
4398 NAMD_die(
"Available scaling options are \'shift\' and \'switch\'.");
4400 if ( strcasecmp(qmPCSwitchTypeS,
"shift") == 0 )
4402 else if ( strcasecmp(qmPCSwitchTypeS,
"switch") == 0 )
4409 if (qmNoPC && qmPCSelFreq > 1) {
4410 iout <<
iWARN <<
"QMPCStride being IGNORED since QMNoPntChrg is set to \'on\'!\n" <<
endi;
4414 if (qmNoPC && qmPCSwitchOn)
4415 NAMD_die(
"QM PC switching can only be applied with QMNoPntChrg set to \'off\'!");
4420 if (qmPCSelFreq <= 0)
4421 NAMD_die(
"QMPCFreq can only be a positive number! For static point charge selection, see QMCutomPC.");
4423 if (qmCustomPCSel && qmNoPC)
4424 NAMD_die(
"QM Custom PC Selection is incompatible with QMNoPntChrg!");
4429 if (qmCustomPCSel && qmPCSelFreq > 1)
4430 NAMD_die(
"QM Custom PC Selection is incompatible with QMPCStride > 1!");
4432 if (qmCSMD && (! opts.
defined(
"QMCSMDFile") ))
4433 NAMD_die(
"QM Conditional SMD is ON, but no CSMD configuration file was profided!");
4436 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
4439 if ( useCUDAdisable ) {
4440 if ( drudeOn && useCUDA2 && (bondedCUDA & 0x0001) ) {
4442 bondedCUDA &= ~0x0001;
4443 iout <<
iWARN <<
"Disabling CUDA kernel for bonds due to incompatibility with Drude oscillators.\n";
4445 if ( accelMDOn && (accelMDdihe || accelMDdual) && useCUDA2 && (bondedCUDA & (0x0004 | 0x0020)) ) {
4447 bondedCUDA &= ~(0x0004 | 0x0020);
4448 iout <<
iWARN <<
"Disabling CUDA kernels for dihedrals and crossterms due to incompatibility with accelerated MD options.\n";
4453 #ifdef NAMD_AVXTILES
4454 if (avxTilesCommandLineDisable) useAVXTiles =
FALSE;
4456 if (alchOn || lesOn || tabulatedEnergies || drudeOn || goForcesOn ||
4457 pressureProfileOn || qmForcesOn) {
4458 useAVXTiles =
FALSE;
4459 iout <<
iWARN <<
"Disabling AVX tiles optimizations due to "
4460 <<
"incompatible simulation params.\n";
4464 useAVXTiles =
FALSE;
4476 iout <<
iINFO <<
"SIMULATION PARAMETERS:\n";
4477 iout << iINFO <<
"TIMESTEP " << dt <<
"\n" <<
endi;
4478 iout << iINFO <<
"NUMBER OF STEPS " << N <<
"\n";
4479 iout << iINFO <<
"STEPS PER CYCLE " << stepsPerCycle <<
"\n";
4482 if ( lattice.a_p() || lattice.b_p() || lattice.c_p() ) {
4483 if ( lattice.a_p() )
4484 iout << iINFO <<
"PERIODIC CELL BASIS 1 " << lattice.a() <<
"\n";
4485 if ( lattice.b_p() )
4486 iout << iINFO <<
"PERIODIC CELL BASIS 2 " << lattice.b() <<
"\n";
4487 if ( lattice.c_p() )
4488 iout << iINFO <<
"PERIODIC CELL BASIS 3 " << lattice.c() <<
"\n";
4489 iout << iINFO <<
"PERIODIC CELL CENTER " << lattice.origin() <<
"\n";
4491 iout << iINFO <<
"WRAPPING WATERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
4494 iout << iINFO <<
"WRAPPING ALL CLUSTERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
4497 iout << iINFO <<
"WRAPPING TO IMAGE NEAREST TO PERIODIC CELL CENTER.\n";
4502 if ( CkNumPes() > 512 ) ldbUnloadOne =
TRUE;
4503 if ( ldbUnloadOne || CkNumPes() > 128 ) ldbUnloadZero =
TRUE;
4506 iout << iINFO <<
"LOAD BALANCER None\n" <<
endi;
4509 iout << iINFO <<
"LOAD BALANCER Centralized\n" <<
endi;
4511 iout << iINFO <<
"LOAD BALANCER Hybrid\n" <<
endi;
4515 iout << iINFO <<
"LOAD BALANCING STRATEGY New Load Balancers -- DEFAULT\n";
4517 iout << iINFO <<
"LOAD BALANCING STRATEGY Refinement Only\n";
4519 iout << iINFO <<
"LOAD BALANCING STRATEGY Comprehensive\n";
4521 iout << iINFO <<
"LOAD BALANCING STRATEGY Old Load Balancers\n";
4524 iout << iINFO <<
"LDB PERIOD " << ldbPeriod <<
" steps\n";
4525 iout << iINFO <<
"FIRST LDB TIMESTEP " << firstLdbStep <<
"\n";
4527 iout << iINFO <<
"HYBRIDLB GROUP SIZE " << hybridGroupSize <<
"\n";
4528 iout << iINFO <<
"LAST LDB TIMESTEP " << lastLdbStep <<
"\n";
4529 if ( ldbRelativeGrainsize > 0. )
4530 iout << iINFO <<
"LDB RELATIVE GRAINSIZE " << ldbRelativeGrainsize <<
"\n";
4531 iout << iINFO <<
"LDB BACKGROUND SCALING " << ldbBackgroundScaling <<
"\n";
4532 iout << iINFO <<
"HOM BACKGROUND SCALING " << ldbHomeBackgroundScaling <<
"\n";
4534 iout << iINFO <<
"PME BACKGROUND SCALING "
4535 << ldbPMEBackgroundScaling <<
"\n";
4537 iout << iINFO <<
"REMOVING LOAD FROM PME NODES" <<
"\n";
4539 if ( ldbUnloadZero )
iout << iINFO <<
"REMOVING LOAD FROM NODE 0\n";
4540 if ( ldbUnloadOne )
iout << iINFO <<
"REMOVING LOAD FROM NODE 1\n";
4541 if ( ldbUnloadOutputPEs )
iout << iINFO <<
"REMOVING LOAD FROM OUTPUT PES\n";
4545 if ( ldbUnloadOne || CkNumPes() > 256 ) noPatchesOnOne =
TRUE;
4546 if ( ldbUnloadZero || noPatchesOnOne ||
4547 CkNumPes() > 64 || ( IMDon && CkNumPes() > 8 ) ) {
4548 noPatchesOnZero =
TRUE;
4550 if ( noPatchesOnZero )
iout << iINFO <<
"REMOVING PATCHES FROM PROCESSOR 0\n";
4551 if ( noPatchesOnOne )
iout << iINFO <<
"REMOVING PATCHES FROM PROCESSOR 1\n";
4554 #if defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC)
4555 maxSelfPart = maxPairPart = 1;
4559 iout << iINFO <<
"MAX SELF PARTITIONS " << maxSelfPart <<
"\n"
4560 << iINFO <<
"MAX PAIR PARTITIONS " << maxPairPart <<
"\n"
4561 << iINFO <<
"SELF PARTITION ATOMS " << numAtomsSelf <<
"\n"
4562 << iINFO <<
"SELF2 PARTITION ATOMS " << numAtomsSelf2 <<
"\n"
4563 << iINFO <<
"PAIR PARTITION ATOMS " << numAtomsPair <<
"\n"
4564 << iINFO <<
"PAIR2 PARTITION ATOMS " << numAtomsPair2 <<
"\n";
4566 iout << iINFO <<
"MIN ATOMS PER PATCH " << minAtomsPerPatch <<
"\n"
4567 << iINFO <<
"EMPTY PATCH LOAD " << emptyPatchLoad <<
" ATOMS\n"
4570 if (initialTemp < 0)
4572 current = config->
find(
"velocities");
4574 if (current == NULL)
4576 current = config->
find(
"binvelocities");
4579 iout << iINFO <<
"VELOCITY FILE " << current->
data <<
"\n";
4583 iout << iINFO <<
"INITIAL TEMPERATURE "
4584 << initialTemp <<
"\n";
4588 iout << iINFO <<
"CENTER OF MASS MOVING INITIALLY? ";
4600 if ( zeroMomentum ) {
4601 iout << iINFO <<
"REMOVING CENTER OF MASS DRIFT DURING SIMULATION";
4602 if ( zeroMomentumAlt )
iout <<
" (ALT METHOD)";
4606 iout << iINFO <<
"DIELECTRIC "
4607 << dielectric <<
"\n";
4609 if ( nonbondedScaling != 1.0 )
4611 iout << iINFO <<
"NONBONDED SCALING " << nonbondedScaling <<
"\n" <<
endi;
4613 iout << iINFO <<
"EXCLUDE ";
4624 iout <<
"ONETHREE\n";
4627 iout <<
"ONE-FOUR\n";
4630 iout <<
"SCALED ONE-FOUR\n";
4637 iout << iINFO <<
"1-4 ELECTROSTATICS SCALED BY " << scale14 <<
"\n";
4638 iout << iINFO <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE USED\n" <<
endi;
4640 iout <<
iWARN <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE IGNORED\n" <<
endi;
4643 #ifdef SPEC_DISABLED_VERSION
4644 if (dcdFrequency > 0) {
4646 iout <<
iWARN <<
"DCD TRAJECTORY OUTPUT IS DISABLED IN SPEC RELEASE\n";
4650 if (dcdFrequency > 0)
4652 iout << iINFO <<
"DCD FILENAME "
4653 << dcdFilename <<
"\n";
4654 iout << iINFO <<
"DCD FREQUENCY "
4655 << dcdFrequency <<
"\n";
4656 iout << iINFO <<
"DCD FIRST STEP "
4657 << ( ((firstTimestep + dcdFrequency)/dcdFrequency)*dcdFrequency ) <<
"\n";
4658 if ( dcdUnitCell ) {
4659 iout << iINFO <<
"DCD FILE WILL CONTAIN UNIT CELL DATA\n";
4664 iout << iINFO <<
"NO DCD TRAJECTORY OUTPUT\n";
4668 if (xstFrequency > 0)
4670 iout << iINFO <<
"XST FILENAME "
4671 << xstFilename <<
"\n";
4672 iout << iINFO <<
"XST FREQUENCY "
4673 << xstFrequency <<
"\n";
4677 iout << iINFO <<
"NO EXTENDED SYSTEM TRAJECTORY OUTPUT\n";
4681 if (velDcdFrequency > 0)
4683 iout << iINFO <<
"VELOCITY DCD FILENAME "
4684 << velDcdFilename <<
"\n";
4685 iout << iINFO <<
"VELOCITY DCD FREQUENCY "
4686 << velDcdFrequency <<
"\n";
4687 iout << iINFO <<
"VELOCITY DCD FIRST STEP "
4688 << ( ((firstTimestep + velDcdFrequency)/velDcdFrequency)*velDcdFrequency ) <<
"\n";
4692 iout << iINFO <<
"NO VELOCITY DCD OUTPUT\n";
4696 if (forceDcdFrequency > 0)
4698 iout << iINFO <<
"FORCE DCD FILENAME "
4699 << forceDcdFilename <<
"\n";
4700 iout << iINFO <<
"FORCE DCD FREQUENCY "
4701 << forceDcdFrequency <<
"\n";
4702 iout << iINFO <<
"FORCE DCD FIRST STEP "
4703 << ( ((firstTimestep + forceDcdFrequency)/forceDcdFrequency)*forceDcdFrequency ) <<
"\n";
4707 iout << iINFO <<
"NO FORCE DCD OUTPUT\n";
4711 iout << iINFO <<
"OUTPUT FILENAME "
4712 << outputFilename <<
"\n" <<
endi;
4715 iout << iINFO <<
"BINARY OUTPUT FILES WILL BE USED\n" <<
endi;
4717 #ifdef MEM_OPT_VERSION
4719 iout <<
iWARN <<
"SINCE MEMORY OPTIMIZED VERSION IS USED, OUTPUT IN TEXT FORMAT IS DISABLED!\n" <<
endi;
4720 binaryOutput =
TRUE;
4724 if (! restartFrequency)
4726 iout << iINFO <<
"NO RESTART FILE\n";
4730 iout << iINFO <<
"RESTART FILENAME "
4731 << restartFilename <<
"\n";
4732 iout << iINFO <<
"RESTART FREQUENCY "
4733 << restartFrequency <<
"\n";
4735 iout << iINFO <<
"RESTART FILES WILL NOT BE OVERWRITTEN\n";
4737 if (restartSaveDcd) {
4738 iout << iINFO <<
"DCD FILE WILL BE SPLIT WHEN RESTART FILES ARE WRITTEN\n";
4743 iout << iINFO <<
"BINARY RESTART FILES WILL BE USED\n";
4748 if (switchingActive)
4750 iout << iINFO <<
"SWITCHING ACTIVE\n";
4751 if ( vdwForceSwitching ) {
4752 iout << iINFO <<
"VDW FORCE SWITCHING ACTIVE\n";
4754 if ( martiniSwitching ) {
4755 iout << iINFO <<
"MARTINI RESIDUE-BASED COARSE-GRAIN SWITCHING ACTIVE\n";
4757 iout << iINFO <<
"SWITCHING ON "
4758 << switchingDist <<
"\n";
4759 iout << iINFO <<
"SWITCHING OFF "
4764 iout << iINFO <<
"CUTOFF "
4768 iout << iINFO <<
"PAIRLIST DISTANCE " << pairlistDist <<
"\n";
4769 iout << iINFO <<
"PAIRLIST SHRINK RATE " << pairlistShrink <<
"\n";
4770 iout << iINFO <<
"PAIRLIST GROW RATE " << pairlistGrow <<
"\n";
4771 iout << iINFO <<
"PAIRLIST TRIGGER " << pairlistTrigger <<
"\n";
4772 iout << iINFO <<
"PAIRLISTS PER CYCLE " << pairlistsPerCycle <<
"\n";
4773 if ( outputPairlists )
4774 iout << iINFO <<
"PAIRLIST OUTPUT STEPS " << outputPairlists <<
"\n";
4777 if ( pairlistMinProcs > 1 )
4778 iout << iINFO <<
"REQUIRING " << pairlistMinProcs <<
" PROCESSORS FOR PAIRLISTS\n";
4779 usePairlists = ( CkNumPes() >= pairlistMinProcs );
4781 #ifdef OPENATOM_VERSION
4784 iout << iINFO <<
"OPENATOM QM/MM CAR-PARINELLO ACTIVE\n";
4785 iout << iINFO <<
"OPENATOM CONFIG FILE: " << openatomConfig <<
"\n";
4786 iout << iINFO <<
"OPENATOM STRUCT FILE: " << openatomStruct <<
"\n";
4787 iout << iINFO <<
"OPENATOM PDB FILE: " << openatomPDB <<
"\n";
4789 #endif // OPENATOM_VERSION
4792 if ( (alchOn) && (!usePairlists)) {
4793 NAMD_die(
"Sorry, Alchemical simulations require pairlists to be enabled\n");
4795 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
4796 if ( ! usePairlists ) {
4798 iout << iINFO <<
"CUDA ACCELERATION REQUIRES PAIRLISTS\n";
4802 iout << iINFO <<
"PAIRLISTS " << ( usePairlists ?
"ENABLED" :
"DISABLED" )
4805 iout << iINFO <<
"MARGIN " << margin <<
"\n";
4806 if ( margin > 4.0 ) {
4807 iout <<
iWARN <<
"MARGIN IS UNUSUALLY LARGE AND WILL LOWER PERFORMANCE\n";
4808 BigReal f = patchDimension/(patchDimension-margin);
4810 iout << iWARN <<
"MARGIN INCREASED PATCH VOLUME BY A FACTOR OF " << f <<
"\n";
4814 iout << iINFO <<
"HYDROGEN GROUP CUTOFF " << hgroupCutoff <<
"\n";
4817 iout << iINFO <<
"PATCH DIMENSION "
4818 << patchDimension <<
"\n";
4822 if (outputEnergies != 1)
4824 iout << iINFO <<
"ENERGY OUTPUT STEPS "
4825 << outputEnergies <<
"\n";
4829 iout << iINFO <<
"OUPUT ENERGY PRECISION " << outputEnergiesPrecision <<
"\n";
4831 if (mergeCrossterms) {
4832 iout << iINFO <<
"CROSSTERM ENERGY INCLUDED IN DIHEDRAL\n" <<
endi;
4835 if (outputMomenta != 0)
4837 iout << iINFO <<
"MOMENTUM OUTPUT STEPS "
4838 << outputMomenta <<
"\n";
4842 if (outputTiming != 0)
4844 iout << iINFO <<
"TIMING OUTPUT STEPS "
4845 << outputTiming <<
"\n";
4849 if (outputCudaTiming != 0)
4851 iout << iINFO <<
"CUDA TIMING OUTPUT STEPS "
4852 << outputCudaTiming <<
"\n";
4856 if (outputPressure != 0)
4858 iout << iINFO <<
"PRESSURE OUTPUT STEPS "
4859 << outputPressure <<
"\n";
4865 iout << iINFO <<
"FIXED ATOMS ACTIVE\n";
4866 if ( fixedAtomsForces )
4867 iout << iINFO <<
"FORCES BETWEEN FIXED ATOMS ARE CALCULATED\n";
4873 iout << iINFO <<
"HARMONIC CONSTRAINTS ACTIVE\n";
4875 iout << iINFO <<
"HARMONIC CONS EXP "
4876 << constraintExp <<
"\n";
4878 if (constraintScaling != 1.0) {
4879 iout << iINFO <<
"HARMONIC CONS SCALING "
4880 << constraintScaling <<
"\n";
4885 if (selectConstraintsOn) {
4886 iout << iINFO <<
"SELECTED CARTESIAN COMPONENTS OF HARMONIC RESTRAINTS ACTIVE\n";
4889 iout << iINFO <<
"RESTRAINING X-COMPONENTS OF CARTESIAN COORDINATES!\n";
4892 iout << iINFO <<
"RESTRAINING Y-COMPONENTS OF CARTESIAN COORDINATES!\n";
4895 iout << iINFO <<
"RESTRAINING Z-COMPONENTS OF CARTESIAN COORDINATES!\n";
4899 if (sphericalConstraintsOn) {
4900 iout << iINFO <<
"SPHERICAL HARMONIC CONSTRAINTS ACTIVE\n";
4901 iout << iINFO <<
"RESTRAINING DISTANCE TO " << sphericalConstrCenter <<
"\n";
4907 if (movingConstraintsOn) {
4908 iout << iINFO <<
"MOVING HARMONIC CONSTRAINTS ACTIVE\n";
4910 iout << iINFO <<
"MOVING CONSTRAINT VELOCITY "
4911 << movingConsVel <<
" ANGSTROM/TIMESTEP\n";
4913 iout << iINFO <<
"ALL CONSTRAINED ATOMS WILL MOVE\n";
4920 if (rotConstraintsOn) {
4921 iout << iINFO <<
"ROTATING HARMONIC CONSTRAINTS ACTIVE\n";
4923 iout << iINFO <<
"AXIS OF ROTATION "
4924 << rotConsAxis <<
"\n";
4926 iout << iINFO <<
"PIVOT OF ROTATION "
4927 << rotConsPivot <<
"\n";
4929 iout << iINFO <<
"ROTATING CONSTRAINT VELOCITY "
4930 << rotConsVel <<
" DEGREES/TIMESTEP\n";
4938 iout << iINFO <<
"MOVING DRAG ACTIVE.\n";
4940 iout << iINFO <<
"MOVING DRAG MAIN PDB FILE "
4941 << movDragFile <<
"\n";
4943 iout << iINFO <<
"MOVING DRAG GLOBAL VELOCITY (A/step) "
4944 << movDragGlobVel <<
"\n";
4946 iout << iINFO <<
"MOVING DRAG LINEAR VELOCITY FILE "
4947 << movDragVelFile <<
"\n";
4954 iout << iINFO <<
"ROTATING DRAG ACTIVE.\n";
4956 iout << iINFO <<
"ROTATING DRAG MAIN PDB FILE "
4957 << rotDragFile <<
"\n";
4959 iout << iINFO <<
"ROTATING DRAG AXIS FILE "
4960 << rotDragAxisFile <<
"\n";
4962 iout << iINFO <<
"ROTATING DRAG PIVOT POINT FILE "
4963 << rotDragPivotFile <<
"\n";
4965 iout << iINFO <<
"ROTATING DRAG GLOBAL ANGULAR VELOCITY (deg/step) "
4966 << rotDragGlobVel <<
"\n";
4968 iout << iINFO <<
"ROTATING DRAG ANGULAR VELOCITY FILE "
4969 << rotDragVelFile <<
"\n";
4977 iout << iINFO <<
"\"CONSTANT\" TORQUE ACTIVE.\n";
4979 iout << iINFO <<
"\"CONSTANT\" TORQUE MAIN PDB FILE "
4980 << consTorqueFile <<
"\n";
4982 iout << iINFO <<
"\"CONSTANT\" TORQUE AXIS FILE "
4983 << consTorqueAxisFile <<
"\n";
4985 iout << iINFO <<
"\"CONSTANT\" TORQUE PIVOT POINT FILE "
4986 << consTorquePivotFile <<
"\n";
4988 iout << iINFO <<
"\"CONSTANT\" TORQUE GLOBAL VALUE (Kcal/(mol*A^2)) "
4989 << consTorqueGlobVal <<
"\n";
4991 iout << iINFO <<
"\"CONSTANT\" TORQUE DACTORS FILE "
4992 << consTorqueValFile <<
"\n";
4998 iout << iINFO <<
"GRID FORCE ACTIVE\n";
4999 iout << iINFO <<
" Please include this reference in published work using\n";
5000 iout << iINFO <<
" the Gridforce module of NAMD: David Wells, Volha Abramkina,\n";
5001 iout << iINFO <<
" and Aleksei Aksimentiev, J. Chem. Phys. 127:125101-10 (2007).\n";
5002 print_mgrid_params();
5008 iout << iINFO <<
"SMD ACTIVE\n";
5010 iout << iINFO <<
"SMD VELOCITY "
5011 << SMDVel <<
" ANGSTROM/TIMESTEP\n";
5013 iout << iINFO <<
"SMD DIRECTION "
5016 iout << iINFO <<
"SMD K "
5019 iout << iINFO <<
"SMD K2 "
5022 iout << iINFO <<
"SMD OUTPUT FREQUENCY "
5023 << SMDOutputFreq <<
" TIMESTEPS\n";
5025 iout << iINFO <<
"SMD FILE " << SMDFile <<
"\n";
5033 iout << iINFO <<
"TMD ACTIVE BETWEEN STEPS " << TMDFirstStep
5034 <<
" and " << TMDLastStep <<
"\n";
5035 iout << iINFO <<
"TMD K " << TMDk <<
"\n";
5036 iout << iINFO <<
"TMD FILE " << TMDFile <<
"\n";
5037 iout << iINFO <<
"TMD OUTPUT FREQUENCY " << TMDOutputFreq <<
"\n";
5038 if (TMDInitialRMSD) {
5039 iout << iINFO <<
"TMD TARGET RMSD AT FIRST STEP " << TMDInitialRMSD <<
"\n";
5041 iout << iINFO <<
"TMD TARGET RMSD AT FIRST STEP COMPUTED FROM INITIAL COORDINATES\n";
5043 iout << iINFO <<
"TMD TARGET RMSD AT FINAL STEP " << TMDFinalRMSD <<
"\n";
5048 if (symmetryLastStep == -1){
5049 iout << iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " <<
"INFINITY" <<
"\n";
5052 iout << iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " << symmetryLastStep <<
"\n";
5056 current = config->
find(
"symmetryFile");
5057 for ( ; current; current = current->
next ) {
5058 iout << iINFO <<
"SYMMETRY FILE " << current->
data <<
"\n";
5061 current = config->
find(
"symmetryMatrixFile");
5062 for ( ; current; current = current->
next ) {
5063 iout << iINFO <<
"SYMMETRY MATRIX FILE " << current->
data <<
"\n";
5065 iout << iINFO <<
"SYMMETRY FORCE CONSTANT " << symmetryk <<
"\n";
5066 if (symmetryScaleForces){
5067 iout << iINFO <<
"SYMMETRY SCALE FORCES ON\n";
5069 iout << iINFO <<
"SYMMETRY FIRST FULL STEP " << symmetryFirstFullStep <<
"\n";
5070 if (symmetryLastFullStep == -1){
5071 iout << iINFO <<
"SYMMETRY LAST FULL STEP " <<
"INFINITY" <<
"\n";
5075 iout << iINFO <<
"SYMMETRY LAST FULL STEP " << symmetryLastFullStep <<
"\n";
5087 iout << iINFO <<
"ALCHEMICAL FEP ON\n";
5088 iout << iINFO <<
"FEP CURRENT LAMBDA VALUE "
5089 << alchLambda <<
"\n";
5090 iout << iINFO <<
"FEP COMPARISON LAMBDA VALUE "
5091 << alchLambda2 <<
"\n";
5092 if (alchLambdaIDWS >= 0.) {
5093 iout << iINFO <<
"FEP ALTERNATE COMPARISON LAMBDA VALUE "
5094 << alchLambdaIDWS <<
"\n";
5096 if (alchLambdaFreq > 0) {
5097 iout << iINFO <<
"FEP CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY "
5098 << alchLambdaFreq <<
" STEPS\n";
5100 if (!alchDecouple) {
5101 iout << iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE "
5104 iout << iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE "
5107 if (alchBondDecouple) {
5108 iout << iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE "
5111 iout << iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE "
5115 iout << iINFO <<
"FEP WEEKS-CHANDLER-ANDERSEN (WCA) VDW DECOUPLING "
5118 iout << iINFO <<
"FEP VDW SHIFTING COEFFICIENT "
5119 << alchVdwShiftCoeff <<
"\n";
5121 iout << iINFO <<
"FEP ELEC. ACTIVE FOR ANNIHILATED "
5122 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = "
5123 << (1 - alchElecLambdaStart) <<
"\n";
5124 iout << iINFO <<
"FEP ELEC. ACTIVE FOR EXNIHILATED "
5125 <<
"PARTICLES BETWEEN LAMBDA = "
5126 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
5128 iout << iINFO <<
"FEP VDW-REPU. ACTIVE FOR ANNIHILATED PARTICLES "
5129 <<
"BETWEEN LAMBDA = " << (1 - alchRepLambdaEnd) <<
" AND LAMBDA "
5131 iout << iINFO <<
"FEP VDW-REPU. ACTIVE FOR EXNIHILATED PARTICLES "
5132 <<
"BETWEEN LAMBDA = 0 AND LAMBDA " << alchRepLambdaEnd <<
"\n";
5133 iout << iINFO <<
"FEP VDW-ATTR. ACTIVE FOR ANNIHILATED PARTICLES "
5134 <<
"BETWEEN LAMBDA = " << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = "
5135 << (1 - alchRepLambdaEnd) <<
"\n";
5136 iout << iINFO <<
"FEP VDW-ATTR. ACTIVE FOR EXNIHILATED PARTICLES "
5137 <<
"BETWEEN LAMBDA = " << alchRepLambdaEnd <<
" AND LAMBDA = "
5138 << alchVdwLambdaEnd <<
"\n";
5140 iout << iINFO <<
"FEP VDW ACTIVE FOR ANNIHILATED "
5141 <<
"PARTICLES BETWEEN LAMBDA = "
5142 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
5143 iout << iINFO <<
"FEP VDW ACTIVE FOR EXNIHILATED "
5144 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = "
5145 << alchVdwLambdaEnd <<
"\n";
5147 iout << iINFO <<
"FEP BOND ACTIVE FOR ANNIHILATED "
5148 <<
"PARTICLES BETWEEN LAMBDA = "
5149 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
5150 iout << iINFO <<
"FEP BOND ACTIVE FOR EXNIHILATED "
5151 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = "
5152 << alchBondLambdaEnd <<
"\n";
5158 iout << iINFO <<
"THERMODYNAMIC INTEGRATION (TI) ON\n";
5159 iout << iINFO <<
"TI LAMBDA VALUE "
5160 << alchLambda <<
"\n";
5161 if (alchLambdaFreq > 0) {
5162 iout << iINFO <<
"TI COMPARISON LAMBDA VALUE "
5163 << alchLambda2 <<
"\n";
5164 iout << iINFO <<
"TI CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY "
5165 << alchLambdaFreq <<
" STEPS\n";
5167 if (!alchDecouple) {
5168 iout << iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE "
5171 iout << iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE "
5174 if (alchBondDecouple) {
5175 iout << iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE "
5178 iout << iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE "
5181 iout << iINFO <<
"TI VDW SHIFTING COEFFICIENT "
5182 << alchVdwShiftCoeff <<
"\n";