44 #define fftwf_malloc fftw_malloc 45 #define fftwf_free fftw_free 46 #ifdef NAMD_FFTW_NO_TYPE_PREFIX 55 #if defined(WIN32) && !defined(__CYGWIN__) 58 #define MKDIR(X) mkdir(X) 60 #define PATHSEPSTR "\\" 64 #define MKDIR(X) mkdir(X,0777) 66 #define PATHSEPSTR "/" 72 #define access(PATH,MODE) _access(PATH,00) 89 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 91 #define __thread __declspec(thread) 98 extern int avxTilesCommandLineDisable;
104 #define XXXBIGREAL 1.0e32 108 if ( parseopts )
return parseopts->getfromptr(name,outbuf);
113 if ( parseopts )
return parseopts->istruefromptr(name);
118 if ( parseopts )
return parseopts->issetfromptr(name);
147 NAMD_die(
"Internal error in configuration file parser");
152 if (!opts.
set(*config))
154 NAMD_die(
"ERROR(S) IN THE CONFIGURATION FILE");
159 check_config(opts,config,cwd);
161 print_config(opts,config,cwd);
172 return ( (! strncasecmp(s,
"yes",8)) ||
173 (! strncasecmp(s,
"on",8)) ||
174 (! strncasecmp(s,
"true",8)) );
179 if ( CkMyRank() )
return;
181 #define MAX_SCRIPT_PARAM_SIZE 128 182 #define SCRIPT_PARSE_BOOL(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR) = atobool(value); return; } } 183 #define SCRIPT_PARSE_INT(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR) = atoi(value); return; } } 184 #define SCRIPT_PARSE_FLOAT(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR) = atof(value); return; } } 185 #define SCRIPT_PARSE_MOD_FLOAT(NAME,VAR,MOD) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR) = atof(value) MOD; return; } } 186 #define SCRIPT_PARSE_VECTOR(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { (VAR).set(value); return; } } 187 #define SCRIPT_PARSE_STRING(NAME,VAR) { if ( ! strncasecmp(param,(NAME),MAX_SCRIPT_PARAM_SIZE) ) { strcpy(VAR,value); return; } } 200 N = firstTimestep = atoi(value);
return;
209 if ( langevinOn && ! langevinOnAtStartup ) {
210 NAMD_die(
"Langevin must be enabled at startup to disable and re-enable in script.");
242 berendsenPressureRelaxationTime)
245 monteCarloPressureOn =
atobool(value);
246 if ( monteCarloPressureOn && ! monteCarloPressureOnAtStartup ) {
247 NAMD_die(
"Monte Carlo pressure control must be enabled at startup to disable and re-enable in script.");
271 strcpy(dcdFilename,value);
276 strcpy(velDcdFilename,value);
298 if ( ! CUDASOAintegrateMode ) {
299 NAMD_die(
"Can't modify CUDASOAintegrate when that mode was never enabled");
301 CUDASOAintegrate =
atobool(value);
306 NAMD_die(
"Can't yet modify mgridforcescale in a script");
310 NAMD_die(
"Can't yet modify mgridforcevoff in a script");
315 if ( ! fixedAtomsOn )
316 NAMD_die(
"FixedAtoms may not be enabled in a script.");
317 if ( ! fixedAtomsForces )
318 NAMD_die(
"To use fixedAtoms in script first use fixedAtomsForces yes.");
326 if ( alchOn && ! alchOnAtStartup ) {
327 NAMD_die(
"Alchemy must be enabled at startup to disable and re-enable in script.");
329 alchFepOn = alchOn && alchFepOnAtStartup;
330 alchThermIntOn = alchOn && alchThermIntOnAtStartup;
333 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 335 if (bondedCUDA > 0) {
339 #endif // BONDED_CUDA 346 alchLambda = atof(value);
347 if ( alchLambda < 0.0 || 1.0 < alchLambda ) {
348 NAMD_die(
"Alchemical lambda values should be in the range [0.0, 1.0]\n");
351 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 353 if (bondedCUDA > 0) {
357 #endif // BONDED_CUDA 363 alchLambda2 = atof(value);
364 if ( alchLambda2 < 0.0 || 1.0 < alchLambda2 ) {
365 NAMD_die(
"Alchemical lambda values should be in the range [0.0, 1.0]\n");
368 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 370 if (bondedCUDA > 0) {
374 #endif // BONDED_CUDA 380 alchLambdaIDWS = atof(value);
385 if (bondedCUDA > 0) {
389 #endif // BONDED_CUDA 395 alchLambdaFreq = atoi(value);
396 if ( alchLambdaIDWS >= 0 ) {
397 NAMD_die(
"alchLambdaIDWS and alchLambdaFreq are not compatible.\n");
402 if (bondedCUDA > 0) {
406 #endif // BONDED_CUDA 413 nonbondedScaling = atof(value);
427 if (!soluteScalingOn) {
428 NAMD_die(
"Cannot set solute scaling factor when soluteScaling is off\n");
430 soluteScalingFactor = atof(value);
431 if (soluteScalingFactor < 0.0) {
432 NAMD_die(
"Solute scaling factor should be non-negative\n");
434 soluteScalingFactorCharge = soluteScalingFactor;
435 soluteScalingFactorVdw = soluteScalingFactor;
438 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 445 soluteScalingFactorVdw = atof(value);
446 if (soluteScalingFactorVdw < 0.0) {
447 NAMD_die(
"Solute scaling factor for van der Waals " 448 "should be non-negative\n");
452 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 459 soluteScalingFactorCharge = atof(value);
460 if (soluteScalingFactorCharge < 0.0) {
461 NAMD_die(
"Solute scaling factor for electrostatics " 462 "should be non-negative\n");
468 sprintf(error,
"Setting parameter %s from script failed!\n",param);
493 HydrogenBonds =
FALSE;
494 useAntecedent =
TRUE;
499 dhaCutoffAngle = 100.0;
506 config_parser_basic(opts);
507 config_parser_fileio(opts);
508 config_parser_fullelect(opts);
509 config_parser_methods(opts);
510 config_parser_constraints(opts);
511 #ifdef OPENATOM_VERSION 512 config_parser_openatom(opts);
513 #endif // OPENATOM_VERSION 515 config_parser_gridforce(opts);
516 config_parser_mgridforce(opts);
517 config_parser_group_restraints(opts);
518 config_parser_dcd_selections(opts);
519 config_parser_movdrag(opts);
520 config_parser_rotdrag(opts);
521 config_parser_constorque(opts);
522 config_parser_boundary(opts);
523 config_parser_misc(opts);
527 void SimParameters::config_parser_basic(
ParseOptions &opts) {
532 opts.
optional(
"main",
"obsolete",
"used to flag obsolete options",
536 opts.
require(
"main",
"timestep",
"size of the timestep, in fs",
541 opts.
optional(
"main",
"numsteps",
"number of timesteps to perform",
545 opts.
optional(
"main",
"stepspercycle",
546 "Number of steps between atom migrations",
550 opts.
require(
"main",
"cutoff",
"local electrostatic and Vdw distance",
555 opts.
optional(
"main",
"nonbondedScaling",
"nonbonded scaling factor",
556 &nonbondedScaling, 1.0);
559 opts.
optional(
"main",
"limitDist",
"limit nonbonded below this distance",
563 opts.
require(
"main",
"exclude",
"Electrostatic and VDW exclusion policy",
566 opts.
optional(
"exclude",
"1-4scaling",
"1-4 electrostatic scaling factor",
570 opts.
optional(
"exclude",
"oneFourScaling",
"1-4 electrostatic scaling factor",
575 "Should a smoothing function be used?", &switchingActive,
TRUE);
577 opts.
optionalB(
"switching",
"vdwForceSwitching",
578 "Use force switching for vdw?", &vdwForceSwitching,
FALSE);
580 opts.
optional(
"switching",
"switchdist",
581 "Distance for switching function activation",
586 opts.
optionalB(
"main",
"martiniSwitching",
587 "Use Martini residue-based coarse-grain switching?", &martiniSwitching,
FALSE);
588 opts.
optionalB(
"main",
"martiniDielAllow",
589 "Allow use of dielectric != 15.0 when using Martini", &martiniDielAllow,
FALSE);
591 opts.
optional(
"main",
"pairlistdist",
"Pairlist inclusion distance",
596 opts.
optional(
"main",
"pairlistMinProcs",
"Min procs for pairlists",
597 &pairlistMinProcs,1);
600 opts.
optional(
"main",
"pairlistsPerCycle",
"regenerate x times per cycle",
601 &pairlistsPerCycle,2);
604 opts.
optional(
"main",
"outputPairlists",
"how often to print warnings",
605 &outputPairlists, 0);
608 opts.
optional(
"main",
"pairlistShrink",
"tol *= (1 - x) on regeneration",
609 &pairlistShrink,0.01);
612 opts.
optional(
"main",
"pairlistGrow",
"tol *= (1 + x) on trigger",
613 &pairlistGrow, 0.01);
616 opts.
optional(
"main",
"pairlistTrigger",
"trigger is atom > (1 - x) * tol",
617 &pairlistTrigger, 0.3);
620 opts.
optional(
"main",
"temperature",
"initial temperature",
625 opts.
optionalB(
"main",
"COMmotion",
"allow initial center of mass movement",
628 opts.
optionalB(
"main",
"zeroMomentum",
"constrain center of mass",
629 &zeroMomentum,
FALSE);
630 opts.
optionalB(
"zeroMomentum",
"zeroMomentumAlt",
"constrain center of mass",
631 &zeroMomentumAlt,
FALSE);
633 opts.
optionalB(
"main",
"wrapWater",
"wrap waters around periodic boundaries on output",
635 opts.
optionalB(
"main",
"wrapAll",
"wrap all clusters around periodic boundaries on output",
637 opts.
optionalB(
"main",
"wrapNearest",
"wrap to nearest image to cell origin",
638 &wrapNearest,
FALSE);
640 opts.
optional(
"main",
"dielectric",
"dielectric constant",
648 opts.
optional(
"main",
"seed",
"Initial random number seed", &randomSeed);
651 opts.
optional(
"main",
"outputEnergies",
"How often to print energies in timesteps",
655 opts.
optional(
"main",
"outputEnergiesPrecision",
"Output energy precision",
656 &outputEnergiesPrecision, 4);
659 opts.
optional(
"main",
"computeEnergies",
"How often to evaluate energies in timesteps",
663 opts.
optional(
"main",
"outputMomenta",
"How often to print linear and angular momenta in timesteps",
667 opts.
optional(
"main",
"outputTiming",
"How often to print timing data in timesteps",
671 opts.
optionalB(
"main",
"outputPerformance",
672 "Print performance statistics on \"outputTiming\" steps",
673 &outputPerformance,
TRUE);
674 opts.
optional(
"main",
"benchmarkTime",
675 "Perform benchmark simulation stopping after some number of seconds",
678 opts.
optional(
"main",
"outputCudaTiming",
"How often to print CUDA timing data in timesteps",
679 &outputCudaTiming, 0);
682 opts.
optional(
"main",
"outputPressure",
"How often to print pressure data in timesteps",
686 opts.
optionalB(
"main",
"mergeCrossterms",
"merge crossterm energy with dihedral when printing?",
687 &mergeCrossterms,
TRUE);
689 opts.
optional(
"main",
"MTSAlgorithm",
"Multiple timestep algorithm",
692 opts.
optional(
"main",
"longSplitting",
"Long range force splitting option",
695 opts.
optionalB(
"main",
"ignoreMass",
"Do not use masses to find hydrogen atoms",
698 opts.
optional(
"main",
"splitPatch",
"Atom into patch splitting option",
700 opts.
optional(
"main",
"hgroupCutoff",
"Hydrogen margin", &hgroupCutoff, 2.5);
702 opts.
optional(
"main",
"extendedSystem",
703 "Initial configuration of extended system variables and periodic cell",
706 opts.
optional(
"main",
"cellBasisVector1",
"Basis vector for periodic cell",
708 opts.
optional(
"main",
"cellBasisVector2",
"Basis vector for periodic cell",
710 opts.
optional(
"main",
"cellBasisVector3",
"Basis vector for periodic cell",
712 opts.
optional(
"main",
"cellOrigin",
"Fixed center of periodic cell",
715 opts.
optionalB(
"main",
"molly",
"Rigid bonds to hydrogen",&mollyOn,
FALSE);
716 opts.
optional(
"main",
"mollyTolerance",
"Error tolerance for MOLLY",
718 opts.
optional(
"main",
"mollyIterations",
719 "Max number of iterations for MOLLY", &mollyIter, 100);
722 opts.
optional(
"main",
"rigidTolerance",
723 "Error tolerance for rigid bonds to hydrogen",
725 opts.
optional(
"main",
"rigidIterations",
726 "Max number of SHAKE iterations for rigid bonds to hydrogen",
728 opts.
optionalB(
"main",
"rigidDieOnError",
729 "Die if rigidTolerance is not achieved after rigidIterations",
732 "Use the SETTLE algorithm for rigid waters",
735 opts.
optional(
"main",
"nonbondedFreq",
"Nonbonded evaluation frequency",
736 &nonbondedFrequency, 1);
739 opts.
optionalB(
"main",
"outputPatchDetails",
"print number of atoms in each patch",
740 &outputPatchDetails,
FALSE);
741 opts.
optionalB(
"main",
"staticAtomAssignment",
"never migrate atoms",
742 &staticAtomAssignment,
FALSE);
743 opts.
optionalB(
"main",
"replicaUniformPatchGrids",
"same patch grid size on all replicas",
744 &replicaUniformPatchGrids,
FALSE);
745 #ifndef MEM_OPT_VERSION 748 opts.
optionalB(
"main",
"lonePairs",
"Enable lone pairs", &lonepairs,
TRUE);
752 opts.
optionalB(
"main",
"lonePairs",
"Enable lone pairs", &lonepairs,
FALSE);
755 opts.
optionalB(
"main",
"LJcorrection",
"Apply analytical tail corrections for energy and virial", &LJcorrection,
FALSE);
756 opts.
optionalB(
"main",
"LJcorrectionAlt",
"Apply alternative analytical tail corrections for energy and virial", &LJcorrectionAlt,
FALSE);
759 opts.
optionalB(
"main",
"SOAintegrate",
"Use SOA integration routine",
760 &SOAintegrateOn,
FALSE);
762 opts.
optionalB(
"main",
"CUDASOAintegrate",
"Use CUDA SOA integration routine",
763 &CUDASOAintegrateMode,
FALSE);
765 opts.
optionalB(
"main",
"GPUresident",
"Use GPU-resident mode",
768 opts.
optional(
"main",
"movingAverageWindowSize",
769 "Window size for moving averages of reductions for GPUresident",
770 &movingAverageWindowSize, 20);
771 opts.
optionalB(
"main",
"nsPerDay",
"Prints sampling rate in ns/day instead of days/ns",
773 #ifdef TIMER_COLLECTION 774 opts.
optional(
"main",
"TimerBinWidth",
775 "Bin width of timer histogram collection in microseconds",
776 &timerBinWidth, 1.0);
778 #if defined(NAMD_NVTX_ENABLED) || defined(NAMD_CMK_TRACE_ENABLED) || defined(NAMD_ROCTX_ENABLED) 780 opts.
optional(
"main",
"beginEventPatchID",
"Beginning patch ID for profiling",
781 &beginEventPatchID, 0);
782 opts.
optional(
"main",
"endEventPatchID",
"Ending patch ID for profiling",
783 &endEventPatchID, 5000);
785 opts.
optional(
"main",
"beginEventStep",
"Beginning time step for profiling",
787 opts.
optional(
"main",
"endEventStep",
"Ending time step for profiling",
788 &endEventStep, 1000);
790 opts.
optionalB(
"main",
"mshake",
"Using MSHAKE for rigid bond constraints",
792 opts.
optionalB(
"main",
"lincs",
"Using LINCS for rigid bond constrainsts",
795 opts.
optionalB(
"main",
"CUDAForceTable",
"Always use force table interpolation for nonbonded CUDA kernel",
796 &useCUDANonbondedForceTable,
TRUE);
797 opts.
optionalB(
"main",
"GPUForceTable",
"Always use force table interpolation for nonbonded GPU kernel",
798 &useGPUNonbondedForceTable);
800 opts.
optionalB(
"main",
"DeviceMigration",
"Perform migration on the device",
801 &useDeviceMigration,
FALSE);
802 opts.
optionalB(
"main",
"GPUAtomMigration",
"Perform atom migration on GPU",
803 &useGPUAtomMigration);
804 opts.
optionalB(
"main",
"UpdateAtomMap",
"Update the atom map when using GPU migration",
805 &updateAtomMap,
FALSE);
808 void SimParameters::config_parser_fileio(
ParseOptions &opts) {
820 opts.
optional(
"main",
"coordinates",
"initial PDB coordinate file",
824 "initial velocities, given as a PDB file",
PARSE_STRING);
825 opts.
optional(
"main",
"binvelocities",
826 "initial velocities, given as a binary restart",
PARSE_STRING);
827 opts.
optional(
"main",
"bincoordinates",
828 "initial coordinates in a binary restart file",
PARSE_STRING);
829 #ifdef MEM_OPT_VERSION 830 opts.
optional(
"main",
"binrefcoords",
831 "reference coordinates in a binary restart file",
PARSE_STRING);
836 opts.
optional(
"main",
"structure",
"initial PSF structure file",
843 "CHARMm 19 or CHARMm 22 compatable force field file (multiple " 849 opts.
optionalB(
"parameters",
"paraTypeXplor",
"Parameter file in Xplor format?", ¶TypeXplorOn,
FALSE);
850 opts.
optionalB(
"parameters",
"paraTypeCharmm",
"Parameter file in Charmm format?", ¶TypeCharmmOn,
FALSE);
854 opts.
optionalB(
"main",
"GromacsPair",
"Separately calculate pair interactions", &goGroPair,
FALSE);
855 opts.
optionalB(
"main",
"GoForcesOn",
"Go forces will be calculated", &goForcesOn,
FALSE);
856 opts.
require(
"GoForcesOn",
"GoParameters",
"Go parameter file", goParameters);
857 opts.
require(
"GoForcesOn",
"GoCoordinates",
"target coordinates for Go forces", goCoordinates);
862 opts.
require(
"GoForcesOn",
"GoMethod",
"Which type of matrix should be used to store Go contacts?",
PARSE_STRING);
865 opts.
require(
"main",
"outputname",
866 "prefix for the final PDB position and velocity filenames",
869 opts.
optional(
"main",
"auxFile",
"Filename for data stream output",
872 opts.
optional(
"main",
"numinputprocs",
"Number of pes to use for parallel input",
876 opts.
optional(
"main",
"numoutputprocs",
"Number of pes to use for parallel output",
879 opts.
optional(
"main",
"numoutputwriters",
"Number of output processors that simultaneously write to an output file",
883 opts.
optional(
"main",
"DCDfreq",
"Frequency of DCD trajectory output, in " 884 "timesteps", &dcdFrequency, 0);
886 opts.
optional(
"DCDfreq",
"DCDfile",
"DCD trajectory output file name",
888 opts.
optionalB(
"DCDfreq",
"DCDunitcell",
"Store unit cell in dcd timesteps?",
891 opts.
optional(
"main",
"velDCDfreq",
"Frequency of velocity " 892 "DCD output, in timesteps", &velDcdFrequency, 0);
894 opts.
optional(
"velDCDfreq",
"velDCDfile",
"velocity DCD output file name",
897 opts.
optional(
"main",
"forceDCDfreq",
"Frequency of force" 898 "DCD output, in timesteps", &forceDcdFrequency, 0);
900 opts.
optional(
"forceDCDfreq",
"forceDCDfile",
"force DCD output file name",
903 opts.
optional(
"main",
"XSTfreq",
"Frequency of XST trajectory output, in " 904 "timesteps", &xstFrequency, 0);
906 opts.
optional(
"XSTfreq",
"XSTfile",
"Extended sytem trajectory output " 907 "file name", xstFilename);
909 opts.
optional(
"main",
"restartfreq",
"Frequency of restart file " 910 "generation", &restartFrequency, 0);
912 opts.
optional(
"restartfreq",
"restartname",
"Prefix for the position and " 913 "velocity PDB files used for restarting", restartFilename);
914 opts.
optionalB(
"restartfreq",
"restartsave",
"Save restart files with " 915 "unique filenames rather than overwriting", &restartSave,
FALSE);
916 opts.
optionalB(
"restartfreq",
"restartsavedcd",
"Save DCD files with " 917 "unique filenames at each restart", &restartSaveDcd,
FALSE);
919 opts.
optionalB(
"restartfreq",
"binaryrestart",
"Specify use of binary restart files ",
920 &binaryRestart,
TRUE);
922 opts.
optionalB(
"outputname",
"binaryoutput",
"Specify use of binary output files ",
923 &binaryOutput,
TRUE);
925 opts.
optionalB(
"main",
"amber",
"Is it AMBER force field?",
927 opts.
optionalB(
"amber",
"oldParmReader",
"Use the old AMBER parm/parm7 reader?", &oldParmReader,
FALSE);
928 opts.
optionalB(
"amber",
"readexclusions",
"Read exclusions from parm file?",
929 &readExclusions,
TRUE);
930 opts.
require(
"amber",
"scnb",
"1-4 VDW interactions are divided by scnb",
936 opts.
optionalB(
"main",
"gromacs",
"Use GROMACS-like force field?",
938 opts.
require(
"gromacs",
"grotopfile",
"GROMACS topology file",
940 opts.
optional(
"gromacs",
"grocoorfile",
"GROMACS coordinate file",
944 opts.
optionalB(
"main",
"vdwGeometricSigma",
945 "Use geometric mean to combine L-J sigmas, as for OPLS",
946 &vdwGeometricSigma,
FALSE);
949 opts.
optional(
"main",
"computeMapFile",
"Filename for computeMap",
951 opts.
optionalB(
"main",
"storeComputeMap",
"store computeMap?",
952 &storeComputeMap,
FALSE);
953 opts.
optionalB(
"main",
"loadComputeMap",
"load computeMap?",
954 &loadComputeMap,
FALSE);
957 void SimParameters::config_parser_fullelect(
ParseOptions &opts) {
961 DebugM(1,
"DPMTA setup start\n");
963 opts.
optionalB(
"main",
"FMA",
"Should FMA be used?", &FMAOn,
FALSE);
964 opts.
optional(
"FMA",
"FMALevels",
"Tree levels to use in FMA", &FMALevels,
967 opts.
optional(
"FMA",
"FMAMp",
"Number of FMA multipoles", &FMAMp, 8);
969 opts.
optionalB(
"FMA",
"FMAFFT",
"Use FFT enhancement in FMA?", &FMAFFTOn,
TRUE);
970 opts.
optional(
"FMAFFT",
"FMAFFTBlock",
"FFT blocking factor",
973 DebugM(1,
"DPMTA setup end\n");
983 opts.
optional(
"main",
"fullElectFrequency",
984 "Number of steps between full electrostatic executions",
985 &fullElectFrequency);
988 opts.
optional(
"main",
"fullDispersionFrequency",
989 "Number of steps between full LJ dispersion executions",
990 &fullDispersionFrequency, 1);
994 opts.
optional(
"main",
"fmaFrequency",
995 "Number of steps between full electrostatic executions",
1000 "FMA theta parameter value",
1004 opts.
optionalB(
"main",
"FullDirect",
"Should direct calculations of full electrostatics be performed?",
1005 &fullDirectOn,
FALSE);
1011 "Use multilevel summation method for electrostatics?",
1013 opts.
optional(
"MSM",
"MSMQuality",
"MSM quality",
1015 opts.
optional(
"MSM",
"MSMApprox",
"MSM approximation",
1017 opts.
optional(
"MSM",
"MSMSplit",
"MSM splitting",
1019 opts.
optional(
"MSM",
"MSMLevels",
"MSM maximum number of levels",
1021 opts.
optional(
"MSM",
"MSMGridSpacing",
"MSM grid spacing (Angstroms)",
1022 &MSMGridSpacing, 2.5);
1023 opts.
optional(
"MSM",
"MSMPadding",
"MSM padding (Angstroms)",
1025 opts.
optional(
"MSM",
"MSMxmin",
"MSM x minimum (Angstroms)", &MSMxmin, 0);
1026 opts.
optional(
"MSM",
"MSMxmax",
"MSM x maximum (Angstroms)", &MSMxmax, 0);
1027 opts.
optional(
"MSM",
"MSMymin",
"MSM y minimum (Angstroms)", &MSMymin, 0);
1028 opts.
optional(
"MSM",
"MSMymax",
"MSM y maximum (Angstroms)", &MSMymax, 0);
1029 opts.
optional(
"MSM",
"MSMzmin",
"MSM z minimum (Angstroms)", &MSMzmin, 0);
1030 opts.
optional(
"MSM",
"MSMzmax",
"MSM z maximum (Angstroms)", &MSMzmax, 0);
1031 opts.
optional(
"MSM",
"MSMBlockSizeX",
1032 "MSM grid block size along X direction (for decomposing parallel work)",
1034 opts.
optional(
"MSM",
"MSMBlockSizeY",
1035 "MSM grid block size along Y direction (for decomposing parallel work)",
1037 opts.
optional(
"MSM",
"MSMBlockSizeZ",
1038 "MSM grid block size along Z direction (for decomposing parallel work)",
1042 "Use MSM serial version for long-range calculation?",
1043 &MsmSerialOn,
FALSE);
1049 "Use fast multipole method for electrostatics?",
1051 opts.
optional(
"FMM",
"FMMLevels",
"FMM number of levels",
1053 opts.
optional(
"FMM",
"FMMPadding",
"FMM padding margin (Angstroms)",
1058 opts.
optionalB(
"main",
"LJPME",
"Use particle mesh Ewald for LJ dispersion?",
1060 opts.
optional(
"LJPME",
"LJPMETolerance",
"LJ-PME direct space tolerance",
1061 &LJPMETolerance, 1.e-6);
1062 opts.
optional(
"LJPME",
"LJPMEInterpOrder",
"LJ-PME interpolation order",
1063 &LJPMEInterpOrder, 4);
1064 opts.
optional(
"LJPME",
"LJPMEGridSizeX",
"LJ-PME grid in x dimension",
1065 &LJPMEGridSizeX, 0);
1066 opts.
optional(
"LJPME",
"LJPMEGridSizeY",
"LJ-PME grid in y dimension",
1067 &LJPMEGridSizeY, 0);
1068 opts.
optional(
"LJPME",
"LJPMEGridSizeZ",
"LJ-PME grid in z dimension",
1069 &LJPMEGridSizeZ, 0);
1070 opts.
optional(
"LJPME",
"LJPMEGridSpacing",
"Maximum LJ-PME grid spacing (Angstroms)",
1071 &LJPMEGridSpacing, 0.);
1076 opts.
optionalB(
"main",
"PME",
"Use particle mesh Ewald for electrostatics?",
1078 opts.
optional(
"PME",
"PMETolerance",
"PME direct space tolerance",
1079 &PMETolerance, 1.e-6);
1080 opts.
optional(
"PME",
"PMEInterpOrder",
"PME interpolation order",
1081 &PMEInterpOrder, 4);
1082 opts.
optional(
"PME",
"PMEGridSizeX",
"PME grid in x dimension",
1084 opts.
optional(
"PME",
"PMEGridSizeY",
"PME grid in y dimension",
1086 opts.
optional(
"PME",
"PMEGridSizeZ",
"PME grid in z dimension",
1088 opts.
optional(
"PME",
"PMEGridSpacing",
"Maximum PME grid spacing (Angstroms)",
1089 &PMEGridSpacing, 0.);
1091 opts.
optional(
"PME",
"PMEProcessors",
1092 "PME FFT and reciprocal sum processor count", &PMEProcessors, 0);
1093 opts.
optional(
"PME",
"PMEMinSlices",
1094 "minimum thickness of PME reciprocal sum slab", &PMEMinSlices, 2);
1097 "PME FFT and reciprocal sum pencil grid size", &PMEPencils, -1);
1098 opts.
optional(
"PME",
"PMEPencilsX",
1099 "PME FFT and reciprocal sum pencil grid size X", &PMEPencilsX, 0);
1100 opts.
optional(
"PME",
"PMEPencilsY",
1101 "PME FFT and reciprocal sum pencil grid size Y", &PMEPencilsY, 0);
1102 opts.
optional(
"PME",
"PMEPencilsZ",
1103 "PME FFT and reciprocal sum pencil grid size Z", &PMEPencilsZ, 0);
1107 opts.
optional(
"PME",
"PMEPencilsYLayout",
1108 "PME FFT and reciprocal sum Y pencil layout strategy", &PMEPencilsYLayout, 0);
1109 opts.
optional(
"PME",
"PMEPencilsXLayout",
1110 "PME FFT and reciprocal sum X pencil layout strategy", &PMEPencilsXLayout, 1);
1113 opts.
optional(
"PME",
"PMESendOrder",
1114 "PME message ordering control", &PMESendOrder, 0);
1116 opts.
optional(
"PME",
"PMEMinPoints",
1117 "minimum points per PME reciprocal sum pencil", &PMEMinPoints, 10000);
1119 opts.
optionalB(
"main",
"PMEBarrier",
"Use barrier in PME?",
1120 &PMEBarrier,
FALSE);
1121 opts.
optionalB(
"main",
"PMEOffload",
"Offload PME to accelerator?",
1124 opts.
optionalB(
"PME",
"usePMECUDA",
"Use the PME CUDA version", &usePMECUDA, CmiNumPhysicalNodes() == 1);
1125 opts.
optionalB(
"PME",
"usePMEGPU",
"Use the PME GPU version", &usePMEGPU);
1128 opts.
optionalB(
"PME",
"useDPME",
"Use old DPME code?", &useDPME,
FALSE);
1132 opts.
optionalB(
"main",
"FFTWPatient",
"Use intensive plan creation to optimize FFTW?",
1134 &FFTWPatient,
TRUE);
1136 &FFTWPatient,
FALSE);
1139 opts.
optionalB(
"main",
"FFTWEstimate",
"Use estimates to optimize FFTW?",
1141 &FFTWEstimate,
TRUE);
1143 &FFTWEstimate,
FALSE);
1145 opts.
optionalB(
"main",
"FFTWUseWisdom",
"Read/save wisdom file for FFTW?",
1147 &FFTWUseWisdom,
FALSE);
1149 &FFTWUseWisdom,
TRUE);
1151 opts.
optional(
"FFTWUseWisdom",
"FFTWWisdomFile",
"File for FFTW wisdom",
1165 "Use \"Tiles\" mode for AVX-512 optimized calculations",
1166 &useAVXTiles,
TRUE);
1168 opts.
optionalB(
"main",
"gpuGlobal",
"use GPU global (external) force",
1169 &useCudaGlobal,
FALSE);
1171 opts.
optional(
"gpuGlobal",
"gpuGlobalProfilingFreq",
"Frequency of printing GPU global profiling information", &cudaGlobalProfilingFreq, -1);
1173 useCudaGlobal =
false;
1177 void SimParameters::config_parser_methods(
ParseOptions &opts) {
1180 opts.
optionalB(
"main",
"minimization",
"Should minimization be performed?",
1181 &minimizeCGOn,
FALSE);
1182 opts.
optionalB(
"main",
"minVerbose",
"Print extra minimization diagnostics?",
1183 &minVerbose,
FALSE);
1184 opts.
optional(
"main",
"minTinyStep",
"very first minimization steps",
1185 &minTinyStep, 1.0e-6);
1187 opts.
optional(
"main",
"minBabyStep",
"initial minimization steps",
1188 &minBabyStep, 1.0e-2);
1190 opts.
optional(
"main",
"minLineGoal",
"line minimization gradient reduction",
1191 &minLineGoal, 1.0e-3);
1194 opts.
optionalB(
"main",
"velocityQuenching",
1195 "Should old-style minimization be performed?", &minimizeOn,
FALSE);
1197 opts.
optional(
"main",
"maximumMove",
"Maximum atom movement per step", &maximumMove, 0.0);
1201 opts.
optionalB(
"main",
"Langevin",
"Should Langevin dynamics be performed?",
1202 &langevinOn,
FALSE);
1203 opts.
require(
"Langevin",
"langevinTemp",
"Temperature for heat bath in Langevin " 1204 "dynamics", &langevinTemp);
1207 opts.
optional(
"Langevin",
"langevinDamping",
"Damping coefficient (1/ps)",
1210 opts.
optionalB(
"Langevin",
"langevinHydrogen",
"Should Langevin dynamics be applied to hydrogen atoms?",
1212 opts.
optional(
"Langevin",
"langevinFile",
"PDB file with temperature " 1213 "coupling terms (B(i)) (default is the PDB input file)",
1215 opts.
optional(
"Langevin",
"langevinCol",
"Column in the langevinFile " 1216 "containing the temperature coupling term B(i);\n" 1220 opts.
optionalB(
"Langevin",
"langevinBAOAB",
1221 "Should Langevin dynamics be performed using BAOAB integration?",
1222 &langevin_useBAOAB,
FALSE);
1225 opts.
optionalB(
"main",
"LoweAndersen",
"Should Lowe-Andersen dynamics be performed?",
1226 &loweAndersenOn,
FALSE);
1227 opts.
require(
"LoweAndersen",
"loweAndersenTemp",
"Temperature for heat bath in Lowe-Andersen " 1228 "dynamics", &loweAndersenTemp);
1231 opts.
optional(
"LoweAndersen",
"loweAndersenRate",
"Collision rate (1/ps)",
1232 &loweAndersenRate, 50);
1234 opts.
optional(
"LoweAndersen",
"loweAndersenCutoff",
"Cutoff radius",
1235 &loweAndersenCutoff, 2.7);
1241 opts.
optionalB(
"main",
"alch",
"Is achemical simulation being performed?",
1243 opts.
require(
"alch",
"alchLambda",
"Alchemical coupling parameter value",
1247 opts.
optionalB(
"alch",
"singleTopology",
1248 "Is single topology used for relative free energy?", &singleTopology,
FALSE);
1251 "Is S-D bonded terms scaling for relative free energy?", &sdScaling,
FALSE);
1253 opts.
optional(
"alch",
"alchFile",
"PDB file with perturbation flags " 1255 opts.
optional(
"alch",
"alchCol",
"Column in the alchFile with the " 1258 opts.
optional(
"alch",
"unperturbedBondFile",
"mini psf file with unperturbed bond info" 1260 opts.
optional(
"alch",
"alchOutFreq",
"Frequency of alchemical energy" 1261 "output in timesteps", &alchOutFreq, 5);
1263 opts.
optional(
"alch",
"alchOutFile",
"Alchemical energy output filename",
1267 opts.
optional(
"alch",
"alchVdwShiftCoeff",
"Coeff used for generating" 1268 "the altered alchemical vDW interactions", &alchVdwShiftCoeff, 5.);
1271 opts.
optionalB(
"alch",
"alchWCA",
"Is WCA decomposition being performed?",
1275 opts.
optional(
"alch",
"alchElecLambdaStart",
"Lambda at which electrostatic" 1276 "scaling of exnihilated particles begins", &alchElecLambdaStart, 0.5);
1279 opts.
optional(
"alch",
"alchVdwLambdaEnd",
"Lambda at which vdW" 1280 "scaling of exnihilated particles ends", &alchVdwLambdaEnd, 1.0);
1283 opts.
optional(
"alch",
"alchRepLambdaEnd",
"Lambda at which repulsive vdW" 1284 "scaling of exnihilated particles ends and attractive vdW scaling" 1285 "begins", &alchRepLambdaEnd, 0.5);
1288 opts.
optional(
"alch",
"alchBondLambdaEnd",
"Lambda at which bonded" 1289 "scaling of exnihilated particles begins", &alchBondLambdaEnd, 0.0);
1292 opts.
optionalB(
"alch",
"alchDecouple",
"Enable alchemical decoupling?",
1293 &alchDecouple,
FALSE);
1294 opts.
optionalB(
"alch",
"alchBondDecouple",
"Enable decoupling of purely " 1295 "alchemical bonds?", &alchBondDecouple,
FALSE);
1298 opts.
optional(
"alch",
"alchType",
"Which alchemical method to use?",
1300 opts.
optional(
"alch",
"alchLambda2",
"Alchemical coupling comparison value",
1302 opts.
optional(
"alch",
"alchLambdaIDWS",
"Alchemical coupling comparison value for interleaved double-wide sampling",
1303 &alchLambdaIDWS, -1);
1304 opts.
optional(
"alch",
"alchLambdaFreq",
1305 "Frequency of increasing coupling parameter value", &alchLambdaFreq, 0);
1307 opts.
optional(
"alch",
"alchSwitchType",
"Switching type flag",
1309 opts.
optional(
"alch",
"alchEquilSteps",
"Equilibration steps, before " 1310 "data collection in the alchemical window", &alchEquilSteps, 0);
1313 opts.
optionalB(
"alch",
"alchEnsembleAvg",
"Ensemble Average in use?",
1314 &alchEnsembleAvg,
TRUE);
1317 opts.
optionalB(
"main",
"les",
"Is locally enhanced sampling enabled?",
1319 opts.
require(
"les",
"lesFactor",
"Local enhancement factor", &lesFactor);
1320 opts.
optional(
"les",
"lesFile",
"PDB file with enhancement flags " 1322 opts.
optional(
"les",
"lesCol",
"Column in the lesFile with the " 1324 opts.
optionalB(
"les",
"lesReduceTemp",
"Reduce enhanced atom temperature?",
1325 &lesReduceTemp,
FALSE);
1326 opts.
optionalB(
"les",
"lesReduceMass",
"Reduce enhanced atom mass?",
1327 &lesReduceMass,
FALSE);
1331 "Is replica exchange solute tempering enabled?",
1332 &soluteScalingOn,
FALSE);
1333 opts.
optional(
"soluteScaling",
"soluteScalingFactor",
1334 "Solute scaling factor",
1335 &soluteScalingFactor, 1.0);
1337 opts.
optional(
"soluteScaling",
"soluteScalingFactorCharge",
1338 "Solute scaling factor for electrostatic interactions",
1339 &soluteScalingFactorCharge);
1341 opts.
optional(
"soluteScaling",
"soluteScalingFactorVdw",
1342 "Solute scaling factor for van der Waals interactions",
1343 &soluteScalingFactorVdw);
1345 opts.
optional(
"soluteScaling",
"soluteScalingFile",
1346 "PDB file with scaling flags; if undefined, defaults to main PDB file",
1348 opts.
optional(
"soluteScaling",
"soluteScalingCol",
1349 "Column in the soluteScalingFile providing the scaling flag",
1351 opts.
optionalB(
"main",
"soluteScalingAll",
1352 "Apply scaling also to bond and angle interactions?",
1353 &soluteScalingAll,
FALSE);
1356 opts.
optionalB(
"main",
"drude",
"Perform integration of Drude oscillators?",
1358 opts.
require(
"drude",
"drudeTemp",
"Temperature for freezing " 1359 "Drude oscillators", &drudeTemp);
1362 opts.
optional(
"drude",
"drudeDamping",
"Damping coefficient (1/ps) for " 1363 "Drude oscillators", &drudeDamping);
1365 opts.
optional(
"drude",
"drudeNbtholeCut",
"Nonbonded Thole interactions " 1366 "interaction radius", &drudeNbtholeCut, 5.0);
1368 opts.
optionalB(
"drude",
"drudeHardWall",
"Apply maximum Drude bond length " 1369 "restriction?", &drudeHardWallOn,
TRUE);
1370 opts.
optional(
"drude",
"drudeBondLen",
"Drude oscillator bond length " 1371 "beyond which to apply restraint", &drudeBondLen, 0.25);
1373 opts.
optional(
"drude",
"drudeBondConst",
"Drude oscillator restraining " 1374 "force constant", &drudeBondConst, 40000.0);
1378 opts.
optionalB(
"main",
"pairInteraction",
1379 "Are pair interactions calculated?", &pairInteractionOn,
FALSE);
1380 opts.
optional(
"pairInteraction",
"pairInteractionFile",
1381 "PDB files with interaction flags " "default is the input PDB file",
1383 opts.
optional(
"pairInteraction",
"pairInteractionCol",
1384 "Column in the pairInteractionFile with the interaction flags",
1386 opts.
require(
"pairInteraction",
"pairInteractionGroup1",
1387 "Flag for interaction group 1", &pairInteractionGroup1);
1388 opts.
optional(
"pairInteraction",
"pairInteractionGroup2",
1389 "Flag for interaction group 2", &pairInteractionGroup2, -1);
1390 opts.
optionalB(
"pairInteraction",
"pairInteractionSelf",
1391 "Compute only within-group interactions?", &pairInteractionSelf,
1394 opts.
optionalB(
"main",
"cosAngles",
"Are some angles cosine-based?", &cosAngles,
FALSE);
1398 opts.
optionalB(
"main",
"globalTest",
"Should global integration (for development) be used?",
1400 opts.
optionalB(
"main",
"dihedral",
"Should dihedral angle dynamics be performed?",
1401 &dihedralOn,
FALSE);
1403 opts.
optionalB(
"dihedral",
"COLD",
"Should overdamped Langevin dynamics be performed?",
1405 opts.
require(
"COLD",
"COLDTemp",
"Temperature for heat bath in COLD",
1409 opts.
require(
"COLD",
"COLDRate",
"Damping rate for COLD",
1415 "Should temperature coupling be performed?",
1417 opts.
require(
"tcouple",
"tCoupleTemp",
1418 "Temperature for temperature coupling", &tCoupleTemp);
1421 opts.
optional(
"tCouple",
"tCoupleFile",
"PDB file with temperature " 1422 "coupling terms (B(i)) (default is the PDB input file)",
1424 opts.
optional(
"tCouple",
"tCoupleCol",
"Column in the tCoupleFile " 1425 "containing the temperature coupling term B(i);\n" 1429 "Should stochastic velocity rescaling be performed?",
1430 &stochRescaleOn,
FALSE);
1431 opts.
require(
"stochRescale",
"stochRescaleTemp",
1432 "Temperature for stochastic velocity rescaling",
1436 opts.
require(
"stochRescale",
"stochRescalePeriod",
1437 "Time scale for stochastic velocity rescaling (ps)",
1438 &stochRescalePeriod);
1440 opts.
optional(
"stochRescale",
"stochRescaleFreq",
1441 "Number of steps between stochastic rescalings",
1444 opts.
optionalB(
"stochRescale",
"stochRescaleHeat",
1445 "Should heat transfer and work be computed?", &stochRescaleHeat,
FALSE);
1447 opts.
optional(
"main",
"rescaleFreq",
"Number of steps between " 1448 "velocity rescaling", &rescaleFreq);
1450 opts.
optional(
"main",
"rescaleTemp",
"Target temperature for velocity rescaling",
1455 opts.
optional(
"main",
"reassignFreq",
"Number of steps between " 1456 "velocity reassignment", &reassignFreq);
1458 opts.
optional(
"main",
"reassignTemp",
"Target temperature for velocity reassignment",
1462 opts.
optional(
"main",
"reassignIncr",
"Temperature increment for velocity reassignment",
1465 opts.
optional(
"main",
"reassignHold",
"Final holding temperature for velocity reassignment",
1471 opts.
optionalB(
"main",
"useGroupPressure",
1472 "Use group rather than atomic quantities for pressure control?",
1473 &useGroupPressure,
FALSE);
1476 opts.
optionalB(
"main",
"useFlexibleCell",
1477 "Use anisotropic cell fluctuation for pressure control?",
1478 &useFlexibleCell,
FALSE);
1482 "Fix some cell dimensions?",
1483 &fixCellDims,
FALSE);
1485 opts.
optionalB(
"fixCellDims",
"fixCellDimX",
1486 "Fix the X dimension?",
1487 &fixCellDimX,
FALSE);
1488 opts.
optionalB(
"fixCellDims",
"fixCellDimY",
1489 "Fix the Y dimension?",
1490 &fixCellDimY,
FALSE);
1491 opts.
optionalB(
"fixCellDims",
"fixCellDimZ",
1492 "Fix the Z dimension?",
1493 &fixCellDimZ,
FALSE);
1496 opts.
optionalB(
"main",
"useConstantRatio",
1497 "Use constant X-Y ratio for pressure control?",
1498 &useConstantRatio,
FALSE);
1501 opts.
optionalB(
"main",
"useConstantArea",
1502 "Use constant area for pressure control?",
1503 &useConstantArea,
FALSE);
1506 opts.
optionalB(
"main",
"excludeFromPressure",
1507 "Should some atoms be excluded from pressure rescaling?",
1508 &excludeFromPressure,
FALSE);
1509 opts.
optional(
"excludeFromPressure",
"excludeFromPressureFile",
1510 "PDB file for atoms to be excluded from pressure",
1512 opts.
optional(
"excludeFromPressure",
"excludeFromPressureCol",
1513 "Column in the excludeFromPressureFile" 1514 "containing the flags (nonzero means excluded);\n" 1518 opts.
optionalB(
"main",
"MonteCarloPressure",
1519 "Should Monte Carlo pressure control be used?",
1520 &monteCarloPressureOn,
FALSE);
1521 opts.
require(
"MonteCarloPressure",
"MonteCarloPressureTarget",
1522 "Target pressure for Monte Carlo pressure control",
1523 &monteCarloPressureTarget);
1524 opts.
require(
"MonteCarloPressure",
"MonteCarloTemp",
1525 "Temperature for Monte Carlo pressure control",
1529 opts.
optional(
"MonteCarloPressure",
"MonteCarloAcceptanceRate",
1530 "Acceptance rate for Monte Carlo pressure control",
1531 &monteCarloAcceptanceRate);
1533 opts.
optional(
"MonteCarloPressure",
"MonteCarloMaxVolume",
1534 "Maximum Volume change vector for Monte Carlo pressure control",
1535 &monteCarloMaxVolume);
1536 opts.
optional(
"MonteCarloPressure",
"MonteCarloAdjustmentFreq",
1537 "Number of steps between volume rescaling",
1538 &monteCarloAdjustmentFreq, 30);
1540 opts.
optional(
"MonteCarloPressure",
"MonteCarloPressureFreq",
1541 "Number of steps between volume rescaling",
1542 &monteCarloPressureFreq, 50);
1546 opts.
optionalB(
"main",
"BerendsenPressure",
1547 "Should Berendsen pressure bath coupling be performed?",
1548 &berendsenPressureOn,
FALSE);
1549 opts.
require(
"BerendsenPressure",
"BerendsenPressureTarget",
1550 "Target pressure for pressure coupling",
1551 &berendsenPressureTarget);
1553 opts.
require(
"BerendsenPressure",
"BerendsenPressureCompressibility",
1554 "Isothermal compressibility for pressure coupling",
1555 &berendsenPressureCompressibility);
1557 opts.
require(
"BerendsenPressure",
"BerendsenPressureRelaxationTime",
1558 "Relaxation time for pressure coupling",
1559 &berendsenPressureRelaxationTime);
1561 opts.
units(
"BerendsenPressureRelaxationTime",
N_FSEC);
1562 opts.
optional(
"BerendsenPressure",
"BerendsenPressureFreq",
1563 "Number of steps between volume rescaling",
1564 &berendsenPressureFreq, 1);
1568 opts.
optionalB(
"main",
"LangevinPiston",
1569 "Should Langevin piston pressure control be used?",
1570 &langevinPistonOn,
FALSE);
1571 opts.
optionalB(
"LangevinPiston",
"LangevinPistonBarrier",
1572 "Should Langevin piston barrier be used?",
1573 &langevinPistonBarrier,
TRUE);
1574 opts.
require(
"LangevinPiston",
"LangevinPistonTarget",
1575 "Target pressure for pressure control",
1576 &langevinPistonTarget);
1577 opts.
require(
"LangevinPiston",
"LangevinPistonPeriod",
1578 "Oscillation period for pressure control",
1579 &langevinPistonPeriod);
1582 opts.
require(
"LangevinPiston",
"LangevinPistonDecay",
1583 "Decay time for pressure control",
1584 &langevinPistonDecay);
1587 opts.
require(
"LangevinPiston",
"LangevinPistonTemp",
1588 "Temperature for pressure control piston",
1589 &langevinPistonTemp);
1592 opts.
optional(
"LangevinPiston",
"StrainRate",
1593 "Initial strain rate for pressure control (x y z)",
1598 "Should multigrator temperature and/or pressure control be used?",
1599 &multigratorOn,
FALSE);
1600 opts.
require(
"Multigrator",
"MultigratorPressureTarget",
1601 "Target pressure for pressure coupling",
1602 &multigratorPressureTarget);
1603 opts.
require(
"Multigrator",
"MultigratorTemperatureTarget",
1604 "Target temperature for temperature coupling",
1605 &multigratorTemperatureTarget);
1606 opts.
require(
"Multigrator",
"MultigratorPressureFreq",
1607 "Number of steps between pressure control moves",
1608 &multigratorPressureFreq);
1610 opts.
optional(
"Multigrator",
"MultigratorPressureRelaxationTime",
1611 "Relaxation time for pressure coupling is fs",
1612 &multigratorPressureRelaxationTime, 30000);
1614 opts.
units(
"MultigratorPressureRelaxationTime",
N_FSEC);
1615 opts.
optional(
"Multigrator",
"MultigratorTemperatureRelaxationTime",
1616 "Relaxation time for temperature coupling is fs",
1617 &multigratorTemperatureRelaxationTime, 1000);
1618 opts.
range(
"MultigratorTemperatureRelaxationTime",
POSITIVE);
1619 opts.
units(
"MultigratorTemperatureRelaxationTime",
N_FSEC);
1620 opts.
require(
"Multigrator",
"MultigratorTemperatureFreq",
1621 "Number of steps between temperature control moves",
1622 &multigratorTemperatureFreq);
1624 opts.
optional(
"Multigrator",
"MultigratorNoseHooverChainLength",
1625 "Nose-Hoover chain length",
1626 &multigratorNoseHooverChainLength, 4);
1630 opts.
optional(
"main",
"SurfaceTensionTarget",
1631 "Surface tension in the x-y plane",
1632 &surfaceTensionTarget, 0);
1635 opts.
optionalB(
"main",
"pressureprofile",
"Compute pressure profile?",
1636 &pressureProfileOn,
FALSE);
1637 opts.
require(
"pressureprofile",
"pressureprofileslabs",
1638 "Number of pressure profile slabs", &pressureProfileSlabs, 10);
1639 opts.
optional(
"pressureprofile",
"pressureprofilefreq",
1640 "How often to store profile data", &pressureProfileFreq, 1);
1641 opts.
optional(
"pressureprofile",
"pressureProfileAtomTypes",
1642 "Number of pressure profile atom types", &pressureProfileAtomTypes, 1);
1644 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesFile",
1645 "PDB files with pressure profile atom types" "default is the input PDB file",
1647 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesCol",
1648 "Column in the pressureProfileAtomTypesFile with the atom types ",
1650 opts.
optionalB(
"pressureProfile",
"pressureProfileEwald",
1651 "Compute Ewald contribution to pressure profile",
1652 &pressureProfileEwaldOn,
FALSE);
1653 opts.
optional(
"pressureProfile",
"pressureProfileEwaldX",
1654 "Ewald grid size X", &pressureProfileEwaldX, 10);
1656 opts.
optional(
"pressureProfile",
"pressureProfileEwaldY",
1657 "Ewald grid size Y", &pressureProfileEwaldY, 10);
1659 opts.
optional(
"pressureProfile",
"pressureProfileEwaldZ",
1660 "Ewald grid size Z", &pressureProfileEwaldZ, 10);
1664 opts.
optionalB(
"main",
"accelMD",
"Perform acclerated MD?", &accelMDOn,
FALSE);
1665 opts.
optional(
"accelMD",
"accelMDFirstStep",
"First accelMD step", &accelMDFirstStep, 0);
1667 opts.
optional(
"accelMD",
"accelMDLastStep",
"Last accelMD step", &accelMDLastStep, 0);
1669 opts.
optional(
"accelMD",
"accelMDOutFreq",
"Frequency of accelMD output", &accelMDOutFreq, 1);
1671 opts.
optionalB(
"accelMD",
"accelMDdihe",
"Apply boost to dihedral potential", &accelMDdihe,
TRUE);
1672 opts.
optionalB(
"accelMD",
"accelMDDebugOn",
"Debugging accelMD", &accelMDDebugOn,
FALSE);
1673 opts.
optional(
"accelMD",
"accelMDE",
"E for AMD", &accelMDE);
1675 opts.
optional(
"accelMD",
"accelMDalpha",
"alpha for AMD", &accelMDalpha);
1678 opts.
optionalB(
"accelMD",
"accelMDdual",
"Apply dual boost", &accelMDdual,
FALSE);
1679 opts.
optional(
"accelMDdual",
"accelMDTE",
"E for total potential under accelMDdual mode", &accelMDTE);
1681 opts.
optional(
"accelMDdual",
"accelMDTalpha",
"alpha for total potential under accelMDdual mode", &accelMDTalpha);
1685 opts.
optionalB(
"accelMD",
"accelMDG",
"Perform Gaussian accelMD calculation?", &accelMDG,
FALSE);
1686 opts.
optional(
"accelMDG",
"accelMDGiE",
"Flag to set the mode iE in Gaussian accelMD", &accelMDGiE, 1);
1687 opts.
optional(
"accelMDG",
"accelMDGcMDSteps",
"Number of cMD steps", &accelMDGcMDSteps, 1000000);
1689 opts.
optional(
"accelMDG",
"accelMDGEquiSteps",
"Number of equilibration steps after adding boost potential", &accelMDGEquiSteps, 1000000);
1691 opts.
require(
"accelMDG",
"accelMDGcMDPrepSteps",
"Number of preparation cMD steps", &accelMDGcMDPrepSteps, 200000);
1693 opts.
require(
"accelMDG",
"accelMDGEquiPrepSteps",
"Number of preparation equilibration steps", &accelMDGEquiPrepSteps, 200000);
1695 opts.
optional(
"accelMDG",
"accelMDGStatWindow",
"Number of steps to calculate avg and std", &accelMDGStatWindow, -1);
1696 opts.
optional(
"accelMDG",
"accelMDGSigma0P",
"Upper limit of std of total potential", &accelMDGSigma0P, 6.0);
1699 opts.
optional(
"accelMDG",
"accelMDGSigma0D",
"Upper limit of std of dihedral potential", &accelMDGSigma0D, 6.0);
1702 opts.
optionalB(
"accelMDG",
"accelMDGRestart",
"Flag to set use restart file in Gaussian accelMD", &accelMDGRestart,
FALSE);
1703 opts.
require(
"accelMDGRestart",
"accelMDGRestartFile",
"Restart file name for Gaussian accelMD", accelMDGRestartFile);
1704 opts.
optionalB(
"accelMDG",
"accelMDGresetVaftercmd",
"Flag to reset potential after accelMDGcMDSteps steps",
1705 &accelMDGresetVaftercmd,
FALSE);
1708 opts.
optionalB(
"main",
"adaptTempMD",
"Perform adaptive temperature sampling", &adaptTempOn,
FALSE);
1709 opts.
optional(
"adaptTempMD",
"adaptTempFirstStep",
"First adaptTemp step", &adaptTempFirstStep, 0);
1711 opts.
optional(
"adaptTempMD",
"adaptTempLastStep",
"Last adaptTemp step", &adaptTempLastStep, 0);
1713 opts.
optional(
"adaptTempMD",
"adaptTempOutFreq",
"Frequency of adaptTemp output", &adaptTempOutFreq, 10);
1715 opts.
optional(
"adaptTempMD",
"adaptTempFreq",
"Frequency of writing average energies to adaptTempOutFile", &adaptTempFreq, 10);
1717 opts.
optionalB(
"adaptTempMD",
"adaptTempDebug",
"Print debug output for adaptTemp", &adaptTempDebug,
FALSE);
1718 opts.
optional(
"adaptTempMD",
"adaptTempTmin",
"Minimun temperature for adaptTemp", &adaptTempTmin);
1721 opts.
optional(
"adaptTempMD",
"adaptTempTmax",
"Maximum temperature for adaptTemp", &adaptTempTmax);
1724 opts.
optional(
"adaptTempMD",
"adaptTempBins",
"Number of bins to store average energies", &adaptTempBins,0);
1726 opts.
optional(
"adaptTempMD",
"adaptTempDt",
"Integration timestep for Temp. updates", &adaptTempDt, 0.0001);
1729 opts.
optional(
"adaptTempMD",
"adaptTempAutoDt",
"Average temperature update in percent of temperature range", &adaptTempAutoDt, 0.0);
1731 opts.
optional(
"adaptTempMD",
"adaptTempCgamma",
"Adaptive bin averaging constant", &adaptTempCgamma, 0.1);
1733 opts.
optionalB(
"adaptTempMD",
"adaptTempLangevin",
"Send adaptTemp temperature to langevin thermostat",&adaptTempLangevin,
TRUE);
1734 opts.
optionalB(
"adaptTempMD",
"adaptTempRescaling",
"Send adaptTemp temperature to velocity rescaling thermostat", &adaptTempRescale,
TRUE);
1735 opts.
optional(
"adaptTempMD",
"adaptTempInFile",
"File containing restart information for adaptTemp", adaptTempInFile);
1736 opts.
optional(
"adaptTempMD",
"adaptTempRestartFile",
"File for writing adaptTemp restart information", adaptTempRestartFile);
1737 opts.
require(
"adaptTempRestartFile",
"adaptTempRestartFreq",
"Frequency of writing restart file", &adaptTempRestartFreq,0);
1739 opts.
optionalB(
"adaptTempMD",
"adaptTempRandom",
"Randomly assign a temperature if we step out of range", &adaptTempRandom,
FALSE);
1742 void SimParameters::config_parser_constraints(
ParseOptions &opts) {
1745 opts.
optionalB(
"main",
"fixedatoms",
"Are there fixed atoms?",
1746 &fixedAtomsOn,
FALSE);
1747 opts.
optionalB(
"fixedatoms",
"fixedAtomsForces",
1748 "Calculate forces between fixed atoms? (Required to unfix during run.)",
1749 &fixedAtomsForces,
FALSE);
1750 opts.
optional(
"fixedatoms",
"fixedAtomsFile",
"PDB file with flags for " 1751 "fixed atoms (default is the PDB input file)",
1753 opts.
optional(
"fixedatoms",
"fixedAtomsCol",
"Column in the fixedAtomsFile " 1754 "containing the flags (nonzero means fixed);\n" 1756 opts.
optional(
"fixedatoms",
"fixedAtomListFile",
"the text input file for fixed atoms " 1758 opts.
optionalB(
"fixedatoms",
"fixedAtomsForceOutput",
1759 "Do we write out forces acting on fixed atoms?",
1760 &fixedAtomsForceOutput,
FALSE);
1763 opts.
optionalB(
"main",
"constraints",
"Are harmonic constraints active?",
1764 &constraintsOn,
FALSE);
1765 opts.
require(
"constraints",
"consexp",
"Exponent for harmonic potential",
1768 #ifndef MEM_OPT_VERSION 1769 opts.
require(
"constraints",
"consref",
"PDB file containing reference " 1772 opts.
require(
"constraints",
"conskfile",
"PDB file containing force " 1774 opts.
require(
"constraints",
"conskcol",
"Column of conskfile to use " 1777 opts.
require(
"constraints",
"consAtomListFile",
"the text input file for constrained atoms " 1780 opts.
require(
"constraints",
"constraintScaling",
"constraint scaling factor",
1781 &constraintScaling, 1.0);
1789 opts.
optionalB(
"constraints",
"selectConstraints",
1790 "Restrain only selected Cartesian components of the coordinates?",
1791 &selectConstraintsOn,
FALSE);
1792 opts.
optionalB(
"selectConstraints",
"selectConstrX",
1793 "Restrain X components of coordinates ", &constrXOn,
FALSE);
1794 opts.
optionalB(
"selectConstraints",
"selectConstrY",
1795 "Restrain Y components of coordinates ", &constrYOn,
FALSE);
1796 opts.
optionalB(
"selectConstraints",
"selectConstrZ",
1797 "Restrain Z components of coordinates ", &constrZOn,
FALSE);
1801 opts.
optionalB(
"constraints",
"sphericalConstraints",
1802 "Restrain only radial spherical component of the coordinates?",
1803 &sphericalConstraintsOn,
FALSE);
1804 opts.
optional(
"sphericalConstraints",
"sphericalConstrCenter",
1805 "Center of spherical constraints", &sphericalConstrCenter);
1810 opts.
optionalB(
"constraints",
"movingConstraints",
1811 "Are some of the constraints moving?",
1812 &movingConstraintsOn,
FALSE);
1813 opts.
require(
"movingConstraints",
"movingConsVel",
1814 "Velocity of the movement, A/timestep", &movingConsVel);
1818 opts.
optionalB(
"constraints",
"rotConstraints",
1819 "Are the constraints rotating?",
1820 &rotConstraintsOn,
FALSE);
1821 opts.
require(
"rotConstraints",
"rotConsAxis",
1822 "Axis of rotation", &rotConsAxis);
1823 opts.
require(
"rotConstraints",
"rotConsPivot",
1824 "Pivot point of rotation",
1826 opts.
require(
"rotConstraints",
"rotConsVel",
1827 "Velocity of rotation, deg/timestep", &rotConsVel);
1832 opts.
optionalB(
"main",
"extForces",
"External command forces?",
1833 &extForcesOn,
FALSE);
1834 opts.
require(
"extForces",
"extForcesCommand",
1835 "External forces command", extForcesCommand);
1836 opts.
require(
"extForces",
"extCoordFilename",
1837 "External forces coordinate filename", extCoordFilename);
1838 opts.
require(
"extForces",
"extForceFilename",
1839 "External forces force filename", extForceFilename);
1843 opts.
optionalB(
"main",
"QMForces",
"Apply QM forces?",
1844 &qmForcesOn,
FALSE);
1845 opts.
require(
"QMForces",
"QMSoftware",
1846 "software whose format will be used for input/output", qmSoftware);
1847 opts.
require(
"QMForces",
"QMExecPath",
1848 "path to executable", qmExecPath);
1849 opts.
optional(
"QMForces",
"QMChargeMode",
1850 "type of QM atom charges gathered from the QM software", qmChrgModeS);
1851 opts.
require(
"QMForces",
"QMColumn",
1852 "column defining QM and MM regions", qmColumn);
1853 opts.
require(
"QMForces",
"QMBaseDir",
1854 "base path and name for QM input and output (preferably in memory)", qmBaseDir);
1855 opts.
optional(
"QMForces",
"QMConfigLine",
1856 "Configuration line for QM (multiple inputs allowed)",
PARSE_MULTIPLES);
1857 opts.
optional(
"QMForces",
"QMParamPDB",
1858 "PDB with QM parameters", qmParamPDB);
1859 opts.
optional(
"QMForces",
"QMPrepProc",
1860 "initial preparation executable", qmPrepProc);
1861 opts.
optional(
"QMForces",
"QMSecProc",
1862 "secondary executable", qmSecProc);
1863 opts.
optional(
"QMForces",
"QMCharge",
1865 opts.
optionalB(
"QMForces",
"QMChargeFromPSF",
1866 "gets charge of the QM group form PSF values", &qmChrgFromPSF,
FALSE);
1867 opts.
optional(
"QMForces",
"QMMult",
1869 opts.
optional(
"QMForces",
"QMLinkElement",
1871 opts.
optionalB(
"QMForces",
"QMReplaceAll",
1872 "replace all NAMD forces with QM forces", &qmReplaceAll,
FALSE);
1873 opts.
optional(
"QMForces",
"QMPCStride",
1874 "frequency of selection of point charges", &qmPCSelFreq, 1);
1876 opts.
optionalB(
"QMForces",
"QMNoPntChrg",
1877 "no point charges will be passed to the QM system(s)", &qmNoPC,
FALSE);
1878 opts.
optionalB(
"QMForces",
"QMElecEmbed",
1879 "activates electrostatic embedding", &qmElecEmbed,
TRUE);
1880 opts.
optionalB(
"QMForces",
"QMVdWParams",
1881 "use special VdW parameters for QM atoms", &qmVDW,
FALSE);
1882 opts.
optionalB(
"QMForces",
"QMBondGuess",
1883 "Guess QM-MM bonds from topology and QM atom definitions", &qmBondGuess,
FALSE);
1884 opts.
optional(
"QMForces",
"QMBondColumn",
1885 "column defining QM-MM bonds", qmBondColumn);
1886 opts.
optionalB(
"QMForces",
"QMBondDist",
1887 "values in QMBondColumn defines the distance of new link atom", &qmBondDist,
FALSE);
1888 opts.
optional(
"QMForces",
"QMBondValueType",
1889 "type of value in bond column: len or ratio", qmBondValueTypeS);
1890 opts.
optional(
"QMForces",
"QMBondScheme",
1891 "type of treatment given to QM-MM bonds.", qmBondSchemeS);
1892 opts.
optional(
"QMForces",
"QMenergyStride",
1893 "frequency of QM specific energy output (every x steps)", &qmEnergyOutFreq, 1);
1894 opts.
optional(
"QMForces",
"QMOutStride",
1895 "frequency of QM specific charge output (every x steps)", &qmOutFreq, 0);
1897 opts.
optional(
"QMForces",
"QMPositionOutStride",
1898 "frequency of QM specific position output (every x steps)", &qmPosOutFreq, 0);
1900 opts.
optional(
"QMForces",
"QMSimsPerNode",
1901 "QM executions per node", &qmSimsPerNode, 1);
1903 opts.
optionalB(
"QMForces",
"QMSwitching",
1904 "apply switching to point charges.", &qmPCSwitchOn,
FALSE);
1905 opts.
optional(
"QMForces",
"QMSwitchingType",
1906 "How are charges scaled down to be presented to QM groups.", qmPCSwitchTypeS);
1907 opts.
optional(
"QMForces",
"QMPointChargeScheme",
1908 "type of treatment given to the total sum of point charges.", qmPCSchemeS);
1909 opts.
optionalB(
"QMForces",
"QMCustomPCSelection",
1910 "custom and fixed selection of point charges per QM group.", &qmCustomPCSel,
FALSE);
1911 opts.
optional(
"QMForces",
"QMCustomPCFile",
1912 "file with a selection of point charges for a single QM group",
PARSE_MULTIPLES);
1913 opts.
optionalB(
"QMForces",
"QMLiveSolventSel",
1914 "Continuously update the selection of solvent molecules in QM groups", &qmLSSOn,
FALSE);
1915 opts.
optional(
"QMForces",
"QMLSSFreq",
1916 "frequency of QM water selection update", &qmLSSFreq, 100);
1918 opts.
optional(
"QMForces",
"QMLSSResname",
1919 "residue name for the solvent molecules (TIP3).", qmLSSResname);
1920 opts.
optional(
"QMForces",
"QMLSSMode",
1921 "mode of selection of point solvent molecules", qmLSSModeS);
1922 opts.
optional(
"QMForces",
"QMLSSRef",
1923 "for COM mode, defines reference for COM distance calculation",
PARSE_MULTIPLES);
1925 "Do we use Conditional SMD option?", &qmCSMD,
FALSE);
1926 opts.
optional(
"QMForces",
"QMCSMDFile",
1927 "File for Conditional SMD information",qmCSMDFile);
1930 opts.
optionalB(
"main",
"printBadContacts",
"Print atoms with huge forces?",
1931 &printBadContacts,
FALSE);
1935 opts.
optionalB(
"main",
"GBIS",
"Use GB implicit solvent?",
1937 opts.
optionalB(
"main",
"GBISSer",
"Use GB implicit solvent?",
1940 opts.
optional(
"GBIS",
"solventDielectric",
1941 "Solvent Dielectric", &solvent_dielectric, 78.5);
1942 opts.
optional(
"GBIS",
"intrinsicRadiusOffset",
1943 "Coulomb Radius Offset", &coulomb_radius_offset, 0.09);
1944 opts.
optional(
"GBIS",
"ionConcentration",
1945 "Ion Concentration", &ion_concentration, 0.2);
1947 "delta from GBOBC", &gbis_delta, 1.0);
1949 "beta from GBOBC", &gbis_beta, 0.8);
1951 "gamma from GBOBC", &gbis_gamma, 4.85);
1952 opts.
optional(
"GBIS",
"alphaCutoff",
1953 "cutoff for calculating effective born radius", &alpha_cutoff, 15);
1955 "maximum allowable born radius", &alpha_max, 30);
1957 "maximum screened intrinsic radius", &fsMax, 1.728);
1959 opts.
optionalB(
"main",
"SASA",
"Use Linear Combination of Pairwise Overlaps (LCPO) for calculating SASA",
1961 opts.
optional(
"SASA",
"surfaceTension",
1962 "Surfce Tension for SASA (kcal/mol/Ang^2)", &surface_tension, 0.005);
1968 "Do we use SMD option?",
1971 "Velocity of the movement, A/timestep", &SMDVel);
1974 "Direction of movement", &SMDDir);
1976 "Elastic constant for SMD", &SMDk);
1978 "Transverse elastic constant for SMD", &SMDk2, 0);
1981 opts.
require(
"SMD",
"SMDFile",
1982 "File for SMD information",
1984 opts.
optional(
"SMD",
"SMDOutputFreq",
1985 "Frequency of output",
1992 opts.
optionalB(
"main",
"tabulatedEnergies",
"Do we get energies from a table?", &tabulatedEnergies,
FALSE);
1994 opts.
require(
"tabulatedEnergies",
"tabulatedEnergiesFile",
"File containing energy table", tabulatedEnergiesFile);
1995 opts.
require(
"tabulatedEnergies",
"tableInterpType",
"Cubic or linear interpolation", tableInterpType);
1998 opts.
optionalB(
"main",
"TMD",
"Perform Targeted MD?", &TMDOn,
FALSE);
1999 opts.
optional(
"TMD",
"TMDk",
"Elastic constant for TMD", &TMDk, 0);
2001 opts.
require(
"TMD",
"TMDFile",
"File for TMD information", TMDFile);
2002 opts.
optionalB(
"TMD",
"TMDDiffRMSD",
"Restrain Difference between the RMSD from two structures", &TMDDiffRMSD,
FALSE);
2003 opts.
require(
"TMDDiffRMSD",
"TMDFile2",
"Second file for TMD information", TMDFile2);
2005 opts.
optional(
"TMD",
"TMDOutputFreq",
"Frequency of TMD output",
2008 opts.
require(
"TMD",
"TMDLastStep",
"Last TMD timestep", &TMDLastStep);
2010 opts.
optional(
"TMD",
"TMDFirstStep",
"First TMD step (default 0)", &TMDFirstStep, 0);
2011 opts.
optional(
"TMD",
"TMDInitialRMSD",
"Target RMSD at first TMD step (default -1 to use initial coordinates)", &TMDInitialRMSD);
2012 TMDInitialRMSD = -1;
2013 opts.
optional(
"TMD",
"TMDFinalRMSD",
"Target RMSD at last TMD step (default 0 )", &TMDFinalRMSD, 0);
2018 opts.
optionalB(
"main",
"symmetryRestraints",
"Enable symmetry restraints?", &symmetryOn,
FALSE);
2019 opts.
optional(
"symmetryRestraints",
"symmetryk",
"Elastic constant for symmetry restraints", &symmetryk, 0);
2021 opts.
optional(
"symmetryRestraints",
"symmetrykfile",
"PDB file specifying force contants on a per-atom basis",
PARSE_MULTIPLES);
2022 opts.
optionalB(
"symmetryRestraints",
"symmetryScaleForces",
"Scale applied forces over time?", &symmetryScaleForces,
FALSE);
2024 opts.
optional(
"symmetryRestraints",
"symmetryMatrixFile",
"File(s) for transfromation matrices",
PARSE_MULTIPLES);
2025 opts.
optional(
"symmetryRestraints",
"symmetryLastStep",
"Last symmetry timestep", &symmetryLastStep, -1);
2026 opts.
optional(
"symmetryRestraints",
"symmetryFirstStep",
"First symmetry step (default 0)", &symmetryFirstStep, 0);
2027 opts.
optional(
"symmetryRestraints",
"symmetryLastFullStep",
"Last full force symmetry timestep (default symmetryLastStep)", &symmetryLastFullStep, symmetryLastStep);
2028 opts.
optional(
"symmetryRestraints",
"symmetryFirstFullStep",
"First full force symmetry step (default symmetryFirstStep)", &symmetryFirstFullStep, symmetryFirstStep);
2032 opts.
optionalB(
"main",
"tclForces",
"Are Tcl global forces active?",
2033 &tclForcesOn,
FALSE);
2034 opts.
require(
"tclForces",
"tclForcesScript",
2038 opts.
optionalB(
"main",
"tclBC",
"Are Tcl boundary forces active?",
2040 opts.
require(
"tclBC",
"tclBCScript",
2041 "Tcl script defining calcforces for boundary forces",
PARSE_STRING);
2043 opts.
optional(
"tclBC",
"tclBCArgs",
"Extra args for calcforces command",
2048 opts.
optionalB(
"main",
"miscForces",
"Are misc global forces active?",
2049 &miscForcesOn,
FALSE);
2050 opts.
optional(
"miscForces",
"miscForcesScript",
2054 opts.
optionalB(
"main",
"freeEnergy",
"Perform free energy perturbation?",
2055 &freeEnergyOn,
FALSE);
2056 opts.
require(
"freeEnergy",
"freeEnergyConfig",
2060 opts.
optionalB(
"main",
"constantforce",
"Apply constant force?",
2061 &consForceOn,
FALSE);
2062 opts.
optional(
"constantforce",
"consForceFile",
2063 "Configuration file for constant forces",
PARSE_STRING);
2064 opts.
require(
"constantforce",
"consForceScaling",
2065 "Scaling factor for constant forces", &consForceScaling, 1.0);
2068 opts.
optionalB(
"main",
"colvars",
"Is the colvars module enabled?",
2070 opts.
optional(
"colvars",
"colvarsConfig",
2072 opts.
optional(
"colvars",
"colvarsInput",
2073 "input restart file for the collective variables",
PARSE_STRING);
2076 opts.
optional(
"main",
"globalMasterFrequency",
"Number of steps between globalMaster client calls", &globalMasterFrequency, 1);
2078 opts.
optionalB(
"main",
"globalMasterScaleByFrequency",
"Scale globalmaster forces by frequency?",
2079 &globalMasterScaleByFrequency,
FALSE);
2080 opts.
optionalB(
"main",
"globalMasterStaleForces",
"Use stale forces MTS for globalmaster forces by frequency?",
2081 &globalMasterStaleForces,
FALSE);
2086 #ifdef OPENATOM_VERSION 2087 void SimParameters::config_parser_openatom(
ParseOptions &opts) {
2088 opts.
optionalB(
"main",
"openatom",
"OpenAtom active?", &openatomOn,
FALSE);
2089 opts.
require(
"openatom",
"openatomDriverFile",
"What config file specifies openatom input parameters",
PARSE_STRING);
2090 opts.
require(
"openatom",
"openatomPhysicsFile",
"What structure file specifies openatom input system",
PARSE_STRING);
2091 opts.
require(
"openatom",
"openatomPdbFile",
"NAMD input file defining QM and MM regions",
PARSE_STRING);
2092 opts.
optional(
"openatom",
"openatomCol",
"Column in the openatomPdb with the QM/MM flag",
PARSE_STRING);
2094 #endif // OPENATOM_VERSION 2097 void SimParameters::config_parser_mgridforce(
ParseOptions &opts) {
2099 opts.
optionalB(
"main",
"mgridforce",
"Is Multiple gridforce active?",
2100 &mgridforceOn,
FALSE);
2101 opts.
optional(
"mgridforce",
"mgridforcevolts",
"Is Gridforce using Volts/eV as units?",
2103 opts.
require(
"mgridforce",
"mgridforcescale",
"Scale factor by which to multiply " 2105 opts.
require(
"mgridforce",
"mgridforcefile",
"PDB file containing force " 2107 opts.
require(
"mgridforce",
"mgridforcecol",
"Column of gridforcefile to " 2109 opts.
optional(
"mgridforce",
"mgridforcechargecol",
"Column of gridforcefile to " 2111 opts.
require(
"mgridforce",
"mgridforcepotfile",
"Gridforce potential file",
2113 opts.
optional(
"mgridforce",
"mgridforcecont1",
"Use continuous grid " 2115 opts.
optional(
"mgridforce",
"mgridforcecont2",
"Use continuous grid " 2117 opts.
optional(
"mgridforce",
"mgridforcecont3",
"Use continuous grid " 2119 opts.
optional(
"mgridforce",
"mgridforcevoff",
"Gridforce potential offsets",
2121 opts.
optional(
"mgridforce",
"mgridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
PARSE_MULTIPLES);
2124 void SimParameters::config_parser_gridforce(
ParseOptions &opts) {
2126 opts.
optionalB(
"main",
"gridforce",
"Is Gridforce active?",
2127 &gridforceOn,
FALSE);
2128 opts.
optionalB(
"gridforce",
"gridforcevolts",
"Is Gridforce using Volts/eV as units?",
2129 &gridforceVolts,
FALSE);
2130 opts.
require(
"gridforce",
"gridforcescale",
"Scale factor by which to multiply " 2131 "grid forces", &gridforceScale);
2132 opts.
require(
"gridforce",
"gridforcefile",
"PDB file containing force " 2134 opts.
require(
"gridforce",
"gridforcecol",
"Column of gridforcefile to " 2136 opts.
optional(
"gridforce",
"gridforcechargecol",
"Column of gridforcefile to " 2138 opts.
require(
"gridforce",
"gridforcepotfile",
"Gridforce potential file",
2140 opts.
optionalB(
"gridforce",
"gridforcecont1",
"Use continuous grid " 2141 "in A1 direction?", &gridforceContA1,
FALSE);
2142 opts.
optionalB(
"gridforce",
"gridforcecont2",
"Use continuous grid " 2143 "in A2 direction?", &gridforceContA2,
FALSE);
2144 opts.
optionalB(
"gridforce",
"gridforcecont3",
"Use continuous grid " 2145 "in A3 direction?", &gridforceContA3,
FALSE);
2146 opts.
optional(
"gridforce",
"gridforcevoff",
"Gridforce potential offsets",
2148 opts.
optionalB(
"gridforce",
"gridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
2149 &gridforcechecksize,
TRUE);
2152 void SimParameters::config_parser_dcd_selections(
ParseOptions &opts) {
2154 opts.
optionalB(
"main",
"DcdSelection",
"Selection list DCD trajectory output",
2155 &dcdSelectionOn,
FALSE);
2157 opts.
require(
"DcdSelection",
"DcdSelectionInputFile",
2160 opts.
require(
"DcdSelection",
"DCDSelectionFreq",
2161 "Frequency of selection list DCD trajectory output, in timesteps",
2163 opts.
optional(
"DcdSelection",
"DCDSelectionFile",
2164 "Selection list DCD trajectory output file name",
2168 void SimParameters::config_parser_group_restraints(
ParseOptions &opts) {
2169 opts.
optionalB(
"main",
"groupRestraints",
"Is Group restraints active?",
2170 &groupRestraintsOn,
FALSE);
2171 opts.
require(
"groupRestraints",
"groupResCenter",
"The center or equilibrium " 2173 opts.
require(
"groupRestraints",
"groupResK",
"Restraints force constant",
2175 opts.
optional(
"groupRestraints",
"groupResExp",
"Restraints exponent",
2177 opts.
optional(
"groupRestraints",
"groupResUseMagnitude",
"Should magnitude of " 2179 opts.
optional(
"groupRestraints",
"group1File",
"Text file containing atom indices " 2181 opts.
optional(
"groupRestraints",
"group1List",
"List of atom indices for group 1" 2183 opts.
optional(
"groupRestraints",
"group1RefPos",
"Reference COM position for group 1",
2185 opts.
optional(
"groupRestraints",
"group2File",
"Text file containing atom indices " 2187 opts.
optional(
"groupRestraints",
"group2List",
"List of atom indices for group 2",
2189 opts.
optional(
"groupRestraints",
"groupResX",
"Apply restraints in x direction",
2191 opts.
optional(
"groupRestraints",
"groupResY",
"Apply restraints in y direction",
2193 opts.
optional(
"groupRestraints",
"groupResZ",
"Apply restraints in z direction",
2197 void SimParameters::config_parser_movdrag(
ParseOptions &opts) {
2199 opts.
optionalB(
"main",
"movDragOn",
"Do we apply moving drag?",
2201 opts.
require(
"movDragOn",
"movDragFile",
2202 "Main moving drag PDB file", movDragFile);
2203 opts.
require(
"movDragOn",
"movDragCol",
2205 opts.
require(
"movDragOn",
"movDragGlobVel",
2206 "Global moving drag velocity (A/step)", &movDragGlobVel);
2207 opts.
require(
"movDragOn",
"movDragVelFile",
2208 "Moving drag linear velocity file", movDragVelFile);
2211 void SimParameters::config_parser_rotdrag(
ParseOptions &opts) {
2213 opts.
optionalB(
"main",
"rotDragOn",
"Do we apply rotating drag?",
2215 opts.
require(
"rotDragOn",
"rotDragFile",
2216 "Main rotating drag PDB file", rotDragFile);
2217 opts.
require(
"rotDragOn",
"rotDragCol",
2219 opts.
require(
"rotDragOn",
"rotDragAxisFile",
2220 "Rotating drag axis file", rotDragAxisFile);
2221 opts.
require(
"rotDragOn",
"rotDragPivotFile",
2222 "Rotating drag pivot point file", rotDragPivotFile);
2223 opts.
require(
"rotDragOn",
"rotDragGlobVel",
2224 "Global rotating drag angular velocity (deg/step)", &rotDragGlobVel);
2225 opts.
require(
"rotDragOn",
"rotDragVelFile",
2226 "Rotating drag angular velocity file", rotDragVelFile);
2227 opts.
require(
"rotDragOn",
"rotDragVelCol",
2228 "Rotating drag angular velocity column",
PARSE_STRING);
2231 void SimParameters::config_parser_constorque(
ParseOptions &opts) {
2233 opts.
optionalB(
"main",
"consTorqueOn",
"Do we apply \"constant\" torque?",
2234 &consTorqueOn,
FALSE);
2235 opts.
require(
"consTorqueOn",
"consTorqueFile",
2236 "Main \"constant\" torque PDB file", consTorqueFile);
2237 opts.
require(
"consTorqueOn",
"consTorqueCol",
2239 opts.
require(
"consTorqueOn",
"consTorqueAxisFile",
2240 "\"Constant\" torque axis file", consTorqueAxisFile);
2241 opts.
require(
"consTorqueOn",
"consTorquePivotFile",
2242 "\"Constant\" torque pivot point file", consTorquePivotFile);
2243 opts.
require(
"consTorqueOn",
"consTorqueGlobVal",
2244 "Global \"constant\" torque value (Kcal/(mol*A^2))", &consTorqueGlobVal);
2245 opts.
require(
"consTorqueOn",
"consTorqueValFile",
2246 "\"constant\" torque factors file", consTorqueValFile);
2247 opts.
require(
"consTorqueOn",
"consTorqueValCol",
2251 void SimParameters::config_parser_boundary(
ParseOptions &opts) {
2254 opts.
optionalB(
"main",
"sphericalBC",
"Are spherical boundary counditions " 2255 "active?", &sphericalBCOn,
FALSE);
2256 opts.
require(
"sphericalBC",
"sphericalBCCenter",
2257 "Center of spherical boundaries", &sphericalCenter);
2258 opts.
require(
"sphericalBC",
"sphericalBCr1",
"Radius for first sphere " 2259 "potential", &sphericalBCr1);
2262 opts.
require(
"sphericalBC",
"sphericalBCk1",
"Force constant for first " 2263 "sphere potential (+ is an inward force, - outward)",
2266 opts.
optional(
"sphericalBC",
"sphericalBCexp1",
"Exponent for first " 2267 "sphere potential", &sphericalBCexp1, 2);
2270 opts.
optional(
"sphericalBCr1",
"sphericalBCr2",
"Radius for second sphere " 2271 "potential", &sphericalBCr2);
2274 opts.
require(
"sphericalBCr2",
"sphericalBCk2",
"Force constant for second " 2275 "sphere potential (+ is an inward force, - outward)",
2278 opts.
optional(
"sphericalBCr2",
"sphericalBCexp2",
"Exponent for second " 2279 "sphere potential", &sphericalBCexp2, 2);
2283 opts.
optionalB(
"main",
"cylindricalBC",
"Are cylindrical boundary counditions " 2284 "active?", &cylindricalBCOn,
FALSE);
2285 opts.
require(
"cylindricalBC",
"cylindricalBCr1",
"Radius for first cylinder " 2286 "potential", &cylindricalBCr1);
2289 opts.
require(
"cylindricalBC",
"cylindricalBCk1",
"Force constant for first " 2290 "cylinder potential (+ is an inward force, - outward)",
2293 opts.
optional(
"cylindricalBC",
"cylindricalBCexp1",
"Exponent for first " 2294 "cylinder potential", &cylindricalBCexp1, 2);
2299 opts.
optional(
"cylindricalBC",
"cylindricalBCAxis",
"Cylinder axis (defaults to x)",
2301 opts.
require(
"cylindricalBC",
"cylindricalBCCenter",
2302 "Center of cylindrical boundaries", &cylindricalCenter);
2303 opts.
require (
"cylindricalBC",
"cylindricalBCl1",
"Length of first cylinder",
2307 opts.
optional (
"cylindricalBCl1",
"cylindricalBCl2",
"Length of second cylinder",
2313 opts.
optional(
"cylindricalBCr1",
"cylindricalBCr2",
"Radius for second cylinder " 2314 "potential", &cylindricalBCr2);
2317 opts.
require(
"cylindricalBCr2",
"cylindricalBCk2",
"Force constant for second " 2318 "cylinder potential (+ is an inward force, - outward)",
2321 opts.
optional(
"cylindricalBCr2",
"cylindricalBCexp2",
"Exponent for second " 2322 "cylinder potential", &cylindricalBCexp2, 2);
2326 opts.
optionalB(
"main",
"eFieldOn",
"Should an electric field be applied",
2328 opts.
optionalB(
"eFieldOn",
"eFieldNormalized",
"Is eField vector scaled by cell basis vectors?",
2329 &eFieldNormalized,
FALSE);
2330 opts.
require(
"eFieldOn",
"eField",
"Electric field vector", &eField);
2331 opts.
optional(
"eFieldOn",
"eFieldFreq",
"Electric field frequency", &eFieldFreq);
2332 opts.
optional(
"eFieldOn",
"eFieldPhase",
"Electric field phase", &eFieldPhase);
2335 opts.
optionalB(
"main",
"stirOn",
"Should stirring torque be applied",
2337 opts.
optional(
"stirOn",
"stirFilename",
"PDB file with flags for " 2338 "stirred atoms (default is the PDB input file)",
2340 opts.
optional(
"stirOn",
"stirredAtomsCol",
"Column in the stirredAtomsFile " 2341 "containing the flags (nonzero means fixed);\n" 2343 opts.
require(
"stirOn",
"stirStartingTheta",
"Stir starting theta offset", &stirStartingTheta);
2344 opts.
require(
"stirOn",
"stirK",
"Stir force harmonic spring constant", &stirK);
2346 opts.
require(
"stirOn",
"stirVel",
"Stir angular velocity (deg/timestep)", &stirVel);
2347 opts.
require(
"stirOn",
"stirAxis",
"Stir axis (direction vector)", &stirAxis);
2348 opts.
require(
"stirOn",
"stirPivot",
"Stir pivot point (coordinate)", &stirPivot);
2352 "Should extra bonded forces be applied",
2353 &extraBondsOn,
FALSE);
2354 opts.
optional(
"extraBonds",
"extraBondsFile",
2355 "file with list of extra bonds",
2357 opts.
optionalB(
"extraBonds",
"extraBondsCosAngles",
2358 "Should extra angles be cosine-based to match ancient bug",
2359 &extraBondsCosAngles,
TRUE);
2363 void SimParameters::config_parser_misc(
ParseOptions &opts) {
2366 opts.
optional(
"main",
"ldBalancer",
"Load balancer",
2368 opts.
optional(
"main",
"ldbStrategy",
"Load balancing strategy",
2370 opts.
optional(
"main",
"ldbPeriod",
"steps between load balancing",
2373 opts.
optional(
"main",
"firstLdbStep",
"when to start load balancing",
2376 opts.
optional(
"main",
"lastLdbStep",
"when to stop load balancing",
2379 opts.
optional(
"main",
"hybridGroupSize",
"Hybrid load balancing group size",
2381 opts.
optional(
"main",
"ldbBackgroundScaling",
2382 "background load scaling", &ldbBackgroundScaling);
2384 opts.
optional(
"main",
"ldbPMEBackgroundScaling",
2385 "PME node background load scaling", &ldbPMEBackgroundScaling);
2387 opts.
optional(
"main",
"ldbHomeBackgroundScaling",
2388 "home node background load scaling", &ldbHomeBackgroundScaling);
2390 opts.
optional(
"main",
"ldbRelativeGrainsize",
2391 "fraction of average load per compute", &ldbRelativeGrainsize, 0.);
2394 opts.
optional(
"main",
"traceStartStep",
"when to start tracing", &traceStartStep);
2396 opts.
optional(
"main",
"numTraceSteps",
"the number of timesteps to be traced", &numTraceSteps);
2399 #ifdef MEASURE_NAMD_WITH_PAPI 2400 opts.
optionalB(
"main",
"papiMeasure",
"whether use PAPI to measure performacne", &papiMeasure,
FALSE);
2401 opts.
optional(
"main",
"papiMeasureStartStep",
"when to measure performacne using PAPI", &papiMeasureStartStep);
2403 opts.
optional(
"main",
"numPapiMeasureSteps",
"the number of timesteps to be measured using PAPI", &numPapiMeasureSteps);
2407 opts.
optionalB(
"main",
"outputMaps",
"whether to dump compute map and patch map for analysis just before load balancing", &outputMaps,
FALSE);
2408 opts.
optionalB(
"main",
"benchTimestep",
"whether to do benchmarking timestep in which case final file output is disabled", &benchTimestep,
FALSE);
2409 opts.
optional(
"main",
"useCkLoop",
"whether to use CkLoop library to parallelize a loop in a function like OpenMP", &useCkLoop,
2410 #
if CMK_SMP && USE_CKLOOP
2417 opts.
optionalB(
"main",
"simulateInitialMapping",
"whether to study the initial mapping scheme", &simulateInitialMapping,
FALSE);
2418 opts.
optional(
"main",
"simulatedPEs",
"the number of PEs to be used for studying initial mapping", &simulatedPEs);
2420 opts.
optional(
"main",
"simulatedNodeSize",
"the node size to be used for studying initial mapping", &simulatedNodeSize);
2422 opts.
optionalB(
"main",
"disableTopology",
"ignore torus information during patch placement", &disableTopology,
FALSE);
2423 opts.
optionalB(
"main",
"verboseTopology",
"print torus information during patch placement", &verboseTopology,
FALSE);
2425 opts.
optionalB(
"main",
"ldbUnloadPME",
"no load on PME nodes",
2426 &ldbUnloadPME,
FALSE);
2427 opts.
optionalB(
"main",
"ldbUnloadZero",
"no load on pe zero",
2428 &ldbUnloadZero,
FALSE);
2429 opts.
optionalB(
"main",
"ldbUnloadOne",
"no load on pe one",
2430 &ldbUnloadOne,
FALSE);
2431 opts.
optionalB(
"main",
"ldbUnloadOutputPEs",
"no load on output PEs",
2432 &ldbUnloadOutputPEs,
FALSE);
2433 opts.
optionalB(
"main",
"noPatchesOnZero",
"no patches on pe zero",
2434 &noPatchesOnZero,
FALSE);
2435 opts.
optionalB(
"main",
"noPatchesOnOutputPEs",
"no patches on Output PEs",
2436 &noPatchesOnOutputPEs,
FALSE);
2437 opts.
optionalB(
"main",
"noPatchesOnOne",
"no patches on pe one",
2438 &noPatchesOnOne,
FALSE);
2439 opts.
optionalB(
"main",
"useCompressedPsf",
"The structure file psf is in the compressed format",
2440 &useCompressedPsf,
FALSE);
2441 opts.
optionalB(
"main",
"genCompressedPsf",
"Generate the compressed version of the psf file",
2442 &genCompressedPsf,
FALSE);
2443 opts.
optionalB(
"main",
"usePluginIO",
"Use the plugin I/O to load the molecule system",
2444 &usePluginIO,
FALSE);
2445 opts.
optionalB(
"main",
"mallocTest",
"test how much memory all PEs can allocate",
2446 &mallocTest,
FALSE);
2447 opts.
optionalB(
"main",
"printExclusions",
"print exclusion lists to stdout",
2448 &printExclusions,
FALSE);
2449 opts.
optional(
"main",
"proxySendSpanningTree",
"using spanning tree to send proxies",
2450 &proxySendSpanningTree, -1);
2451 opts.
optional(
"main",
"proxyRecvSpanningTree",
"using spanning tree to receive proxies",
2452 &proxyRecvSpanningTree, 0);
2453 opts.
optional(
"main",
"proxyTreeBranchFactor",
"the branch factor when building a spanning tree",
2454 &proxyTreeBranchFactor, 0);
2455 opts.
optionalB(
"main",
"twoAwayX",
"half-size patches in 1st dimension",
2457 opts.
optionalB(
"main",
"twoAwayY",
"half-size patches in 2nd dimension",
2459 opts.
optionalB(
"main",
"twoAwayZ",
"half-size patches in 3rd dimension",
2461 opts.
optional(
"main",
"maxPatches",
"maximum patch count", &maxPatches, -1);
2464 opts.
optional(
"main",
"firsttimestep",
"Timestep to start simulation at",
2469 opts.
optionalB(
"main",
"test",
"Perform self-tests rather than simulation",
2471 opts.
optionalB(
"main",
"commOnly",
"Do not evaluate forces or integrate",
2474 opts.
optionalB(
"main",
"statsOn",
"counters in machine layer",
2477 opts.
optionalB(
"main",
"hbonds",
"Use explicit hydrogen bond term",
2478 &HydrogenBonds,
FALSE);
2479 opts.
optionalB(
"hbonds",
"hbAntecedents",
"Include Antecedent in hbond term",
2480 &useAntecedent,
TRUE);
2481 opts.
optional(
"hbonds",
"hbAAexp",
"Hbond AA-A-H angle cos exponential",
2483 opts.
optional(
"hbonds",
"hbHAexp",
"Hbond D-H-A angle cos exponential",
2485 opts.
optional(
"hbonds",
"hbDistAexp",
"Hbond A-D dist attractive exponential",
2487 opts.
optional(
"hbonds",
"hbDistRexp",
"Hbond A-D dist repulstive exponential",
2489 opts.
optional(
"hbonds",
"hbCutoffAngle",
"Hbond D-H-A cutoff angle",
2490 &dhaCutoffAngle, 100.0);
2492 opts.
optional(
"hbonds",
"hbOnAngle",
"Hbond D-H-A switch function on angle",
2495 opts.
optional(
"hbonds",
"hbOffAngle",
"Hbond D-H-A switch function off angle",
2496 &dhaOffAngle, 80.0);
2498 opts.
optional(
"hbonds",
"hbCutoffDist",
"Hbond A-D cutoff distance",
2499 &daCutoffDist, 7.5);
2502 opts.
optional(
"hbonds",
"hbOnDist",
"Hbond A-D switch function on distance",
2506 opts.
optional(
"hbonds",
"hbOffDist",
"Hbond A-D switch function off distance",
2512 opts.
optionalB(
"main",
"IMDon",
"Connect using IMD?",&IMDon,
FALSE);
2513 opts.
require(
"IMDon",
"IMDport",
"Port to which to bind", &IMDport);
2515 opts.
require(
"IMDon",
"IMDfreq",
"Frequency at which to report", &IMDfreq);
2517 opts.
optionalB(
"IMDon",
"IMDwait",
"Pause until IMD connection?",&IMDwait,
2519 opts.
optionalB(
"IMDon",
"IMDignore",
"Ignore any user input?",&IMDignore,
2521 opts.
optionalB(
"IMDon",
"IMDignoreForces",
"Ignore forces ONLY?",&IMDignoreForces,
2524 opts.
optional(
"ldBalancer",
"maxSelfPart",
2525 "maximum number of self partitions in one patch", &maxSelfPart, 20);
2527 opts.
optional(
"ldBalancer",
"maxPairPart",
2528 "maximum number of pair partitions in one patch", &maxPairPart, 8);
2530 opts.
optional(
"ldBalancer",
"numAtomsSelf",
2531 "maximum number of atoms in one self compute distribution",
2532 &numAtomsSelf, 154);
2535 opts.
optional(
"ldBalancer",
"numAtomsSelf2",
2536 "maximum number of atoms in one self compute distribution",
2537 &numAtomsSelf2, 154);
2540 opts.
optional(
"ldBalancer",
"numAtomsPair",
2541 "maximum number of atoms in one pair compute distribution",
2542 &numAtomsPair, 318);
2544 opts.
optional(
"ldBalancer",
"numAtomsPair2",
2545 "maximum number of atoms in one pair compute distribution",
2546 &numAtomsPair2, 637);
2548 opts.
optional(
"main",
"minAtomsPerPatch",
2549 "minimum average atoms per patch",
2550 &minAtomsPerPatch, 40);
2554 opts.
optional(
"main",
"emptyPatchLoad",
2555 "load generated by empty patch, in atoms",
2556 &emptyPatchLoad, 40);
2560 opts.
optional(
"main",
"maxExclusionFlags",
2561 "maximum number of exclusion flags per atom", &maxExclusionFlags, 256);
2565 opts.
optional(
"main",
"bondedCUDA",
"Bitmask for calculating bonded interactions on GPU", &bondedCUDA, 255);
2566 opts.
optional(
"main",
"bondedGPU",
"Bitmask for calculating bonded interactions on GPU", &bondedGPU);
2571 opts.
optionalB(
"main",
"useCUDAdisable",
"Disable kernels to maintain feature compatibility with CUDA", &useCUDAdisable,
TRUE);
2574 opts.
optional(
"main",
"mic_unloadMICPEs",
"Indicates whether or not the load balancer should unload PEs driving Xeon Phi cards", &mic_unloadMICPEs, 1);
2575 opts.
optional(
"main",
"mic_singleKernel",
"Set to non-zero to have all MIC work to be placed in a single kernel", &mic_singleKernel, 1);
2576 opts.
optional(
"main",
"mic_deviceThreshold",
"Threshold to use for directing computes to Xeon Phi devices", &mic_deviceThreshold, -1);
2577 opts.
optional(
"main",
"mic_hostSplit",
"DMK - reserved", &mic_hostSplit, -1);
2578 opts.
optional(
"main",
"mic_numParts_self_p1",
"MIC-Specific NumParts SELF Parameter 1", &mic_numParts_self_p1, -1);
2579 opts.
optional(
"main",
"mic_numParts_pair_p1",
"MIC-Specific NumParts PAIR Parameter 1", &mic_numParts_pair_p1, -1);
2580 opts.
optional(
"main",
"mic_numParts_pair_p2",
"MIC-Specific NumParts PAIR Parameter 2", &mic_numParts_pair_p2, -1);
2588 iout <<
iINFO <<
"EXTENDED SYSTEM FILE " << filename <<
"\n" <<
endi;
2591 ifstream xscFile(filename);
2592 if ( ! xscFile )
NAMD_die(
"Unable to open extended system file.\n");
2596 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2597 xscFile.getline(labels,1023);
2598 }
while ( strncmp(labels,
"#$LABELS ",9) );
2600 int a_x, a_y, a_z, b_x, b_y, b_z, c_x, c_y, c_z;
2601 a_x = a_y = a_z = b_x = b_y = b_z = c_x = c_y = c_z = -1;
2602 int o_x, o_y, o_z, s_u, s_v, s_w, s_x, s_y, s_z;
2603 o_x = o_y = o_z = s_u = s_v = s_w = s_x = s_y = s_z = -1;
2604 int v_x = -1, v_y = -1 , v_z = -1;
2607 char *l_i = labels + 8;
2609 if ( *l_i ==
' ' ) { ++l_i;
continue; }
2611 for ( l_i2 = l_i; *l_i2 && *l_i2 !=
' '; ++l_i2 );
2612 if ( (l_i2 - l_i) == 3 && (l_i[1] ==
'_') ) {
2613 if (l_i[0] ==
'a' && l_i[2] ==
'x') a_x = pos;
2614 if (l_i[0] ==
'a' && l_i[2] ==
'y') a_y = pos;
2615 if (l_i[0] ==
'a' && l_i[2] ==
'z') a_z = pos;
2616 if (l_i[0] ==
'b' && l_i[2] ==
'x') b_x = pos;
2617 if (l_i[0] ==
'b' && l_i[2] ==
'y') b_y = pos;
2618 if (l_i[0] ==
'b' && l_i[2] ==
'z') b_z = pos;
2619 if (l_i[0] ==
'c' && l_i[2] ==
'x') c_x = pos;
2620 if (l_i[0] ==
'c' && l_i[2] ==
'y') c_y = pos;
2621 if (l_i[0] ==
'c' && l_i[2] ==
'z') c_z = pos;
2622 if (l_i[0] ==
'o' && l_i[2] ==
'x') o_x = pos;
2623 if (l_i[0] ==
'o' && l_i[2] ==
'y') o_y = pos;
2624 if (l_i[0] ==
'o' && l_i[2] ==
'z') o_z = pos;
2625 if (l_i[0] ==
's' && l_i[2] ==
'u') s_u = pos;
2626 if (l_i[0] ==
's' && l_i[2] ==
'v') s_v = pos;
2627 if (l_i[0] ==
's' && l_i[2] ==
'w') s_w = pos;
2628 if (l_i[0] ==
's' && l_i[2] ==
'x') s_x = pos;
2629 if (l_i[0] ==
's' && l_i[2] ==
'y') s_y = pos;
2630 if (l_i[0] ==
's' && l_i[2] ==
'z') s_z = pos;
2631 if (l_i[0] ==
'v' && l_i[2] ==
'x') v_x = pos;
2632 if (l_i[0] ==
'v' && l_i[2] ==
'y') v_y = pos;
2633 if (l_i[0] ==
'v' && l_i[2] ==
'z') v_z = pos;
2640 for ( pos = 0; pos < numpos; ++pos ) {
2643 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2644 if ( pos == a_x ) cellBasisVector1.x = tmp;
2645 if ( pos == a_y ) cellBasisVector1.y = tmp;
2646 if ( pos == a_z ) cellBasisVector1.z = tmp;
2647 if ( pos == b_x ) cellBasisVector2.x = tmp;
2648 if ( pos == b_y ) cellBasisVector2.y = tmp;
2649 if ( pos == b_z ) cellBasisVector2.z = tmp;
2650 if ( pos == c_x ) cellBasisVector3.x = tmp;
2651 if ( pos == c_y ) cellBasisVector3.y = tmp;
2652 if ( pos == c_z ) cellBasisVector3.z = tmp;
2653 if ( pos == o_x ) cellOrigin.x = tmp;
2654 if ( pos == o_y ) cellOrigin.y = tmp;
2655 if ( pos == o_z ) cellOrigin.z = tmp;
2656 if ( pos == s_u ) strainRate2.x = tmp;
2657 if ( pos == s_v ) strainRate2.y = tmp;
2658 if ( pos == s_w ) strainRate2.z = tmp;
2659 if ( pos == s_x ) strainRate.x = tmp;
2660 if ( pos == s_y ) strainRate.y = tmp;
2661 if ( pos == s_z ) strainRate.z = tmp;
2662 if ( pos == v_x ) monteCarloMaxVolume.x = tmp;
2663 if ( pos == v_y ) monteCarloMaxVolume.y = tmp;
2664 if ( pos == v_z ) monteCarloMaxVolume.z = tmp;
2669 test.
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2671 if ( test.
a_p() && ! lattice.a_p() ) {
2672 NAMD_die(
"cellBasisVector1 added during atom reinitialization");
2674 if ( lattice.a_p() && ! test.
a_p() ) {
2675 NAMD_die(
"cellBasisVector1 dropped during atom reinitialization");
2677 if ( test.
b_p() && ! lattice.b_p() ) {
2678 NAMD_die(
"cellBasisVector2 added during atom reinitialization");
2680 if ( lattice.b_p() && ! test.
b_p() ) {
2681 NAMD_die(
"cellBasisVector2 dropped during atom reinitialization");
2683 if ( test.
c_p() && ! lattice.c_p() ) {
2684 NAMD_die(
"cellBasisVector3 added during atom reinitialization");
2686 if ( lattice.c_p() && ! test.
c_p() ) {
2687 NAMD_die(
"cellBasisVector3 dropped during atom reinitialization");
2690 latptr->
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2695 #ifdef MEM_OPT_VERSION 2697 extern char *gWorkDir;
2705 #ifdef MEM_OPT_VERSION 2706 char *namdWorkDir = NULL;
2709 if ( opts.
defined(
"obsolete") ) {
2711 "\"obsolete\" defined, silently ignoring obsolete options\n" <<
endi;
2718 current = config->
find(
"cwd");
2720 len = strlen(current->
data);
2724 NAMD_die(
"chdir() to given cwd failed!");
2732 cwd =
new char[len+1];
2734 strcpy(cwd, current->
data);
2740 #ifdef MEM_OPT_VERSION 2741 if(cwd!=NULL)namdWorkDir = cwd;
2742 else namdWorkDir = gWorkDir;
2743 int dirlen = strlen(namdWorkDir);
2746 if(namdWorkDir[dirlen-1]==
'/'){
2747 tmpDir =
new char[dirlen+1];
2750 tmpDir =
new char[dirlen+2];
2754 memcpy(tmpDir, namdWorkDir, dirlen);
2755 namdWorkDir = tmpDir;
2777 if (opts.
defined(
"oneFourScaling")) {
2779 if (config->
find(
"1-4scaling")) {
2780 NAMD_die(
"Multiple definitions of 1-4scaling using \"1-4scaling\" and \"oneFourScaling\".");
2782 scale14 = scale14alt;
2784 else if (config->
find(
"1-4scaling")) {
2785 iout <<
iWARN <<
"Option \"1-4scaling\" has been deprecated. Instead use \"oneFourScaling\".\n" <<
endi;
2789 if (opts.
defined(
"GPUresident")) {
2791 if (config->
find(
"CUDASOAintegrate")) {
2792 NAMD_die(
"Multiple definitions of GPUresident using \"CUDASOAintegrate\" and \"GPUresident\".");
2794 CUDASOAintegrateMode = GPUresidentMode;
2796 else if (config->
find(
"CUDASOAintegrate")) {
2797 iout <<
iWARN <<
"Option \"CUDASOAintegrate\" has been deprecated. Instead use \"GPUresident\".\n" <<
endi;
2801 if (opts.
defined(
"GPUForceTable")) {
2803 if (config->
find(
"CUDAForceTable")) {
2804 NAMD_die(
"Multiple definitions of GPUForceTable using \"CUDAForceTable\" and \"GPUForceTable\".");
2806 useCUDANonbondedForceTable = useGPUNonbondedForceTable;
2808 else if (config->
find(
"CUDAForceTable")) {
2809 iout <<
iWARN <<
"Option \"CUDAForceTable\" has been deprecated. Instead use \"GPUForceTable\".\n" <<
endi;
2811 if ( ! useCUDANonbondedForceTable) {
2812 iout <<
iWARN <<
"Setting \"GPUForceTable off\" is considered experimental.\n" <<
endi;
2816 if (opts.
defined(
"GPUAtomMigration")) {
2818 if (config->
find(
"DeviceMigration")) {
2819 NAMD_die(
"Multiple definitions of GPUAtomMigration using \"DeviceMigration\" and \"GPUAtomMigration\".");
2821 useDeviceMigration = useGPUAtomMigration;
2823 else if (config->
find(
"DeviceMigration")) {
2824 iout <<
iWARN <<
"Option \"DeviceMigration\" has been deprecated. Instead use \"GPUAtomMigration\".\n" <<
endi;
2826 if (useDeviceMigration) {
2827 iout <<
iWARN <<
"Setting \"GPUAtomMigration on\" is considered experimental.\n" <<
endi;
2831 if (opts.
defined(
"usePMEGPU")) {
2833 if (config->
find(
"usePMECUDA")) {
2834 NAMD_die(
"Multiple definitions of usePMEGPU using \"usePMECUDA\" and \"usePMEGPU\".");
2836 usePMECUDA = usePMEGPU;
2838 else if (config->
find(
"usePMECUDA")) {
2839 iout <<
iWARN <<
"Option \"usePMECUDA\" has been deprecated. Instead use \"usePMEGPU\".\n" <<
endi;
2843 if (opts.
defined(
"bondedGPU")) {
2845 if (config->
find(
"bondedCUDA")) {
2846 NAMD_die(
"Multiple definitions of bondedGPU using \"bondedCUDA\" and \"bondedGPU\".");
2848 bondedCUDA = bondedGPU;
2850 else if (config->
find(
"bondedCUDA")) {
2851 iout <<
iWARN <<
"Option \"bondedCUDA\" has been deprecated. Instead use \"bondedGPU\".\n" <<
endi;
2856 if ( usePluginIO && opts.
defined(
"coordinates") ) {
2857 NAMD_die(
"Separate coordinates file not allowed with plugin IO, coordinates will be taken from structure file.");
2862 if (!amberOn && !gromacsOn) {
2863 #ifndef MEM_OPT_VERSION 2864 if (useCompressedPsf)
2865 NAMD_die(
"useCompressedPsf requires memory-optimized build!");
2866 if (!usePluginIO && !genCompressedPsf && !opts.
defined(
"coordinates"))
2867 NAMD_die(
"coordinates not found in the configuration file!");
2869 if(!usePluginIO && !opts.
defined(
"bincoordinates")) {
2870 NAMD_die(
"bincoordinates not found in the configuration file for the memory optimized version!");
2872 if(!usePluginIO && opts.
defined(
"coordinates")) {
2873 NAMD_die(
"coordinates not allowed in the configuration file for the memory optimized version!");
2876 if (!opts.
defined(
"structure"))
2877 NAMD_die(
"structure not found in the configuration file!");
2878 if (!opts.
defined(
"parameters"))
2879 NAMD_die(
"parameters not found in the configuration file!");
2885 NAMD_die(
"Cannot specify both coordinates and ambercoor!");
2886 #ifndef MEM_OPT_VERSION 2887 if (!genCompressedPsf && !opts.
defined(
"coordinates") && !opts.
defined(
"ambercoor")
2888 && !opts.
defined(
"grocoorfile") && !usePluginIO)
2889 NAMD_die(
"Coordinate file not found!");
2894 if (opts.
defined(
"temperature") &&
2897 NAMD_die(
"Cannot specify both an initial temperature and a velocity file");
2900 #ifdef MEM_OPT_VERSION 2907 char *curfile = NULL;
2908 dirlen = strlen(namdWorkDir);
2909 current = config->
find(
"structure");;
2910 curfile = current->
data;
2911 int filelen = strlen(curfile);
2912 if(*curfile ==
'/' || *curfile==
'~') {
2918 binAtomFile =
new char[filelen+5];
2919 memcpy(binAtomFile, curfile, filelen);
2920 memcpy(binAtomFile+filelen,
".bin", 4);
2921 binAtomFile[filelen+4] = 0;
2923 binAtomFile =
new char[dirlen+filelen+5];
2924 memcpy(binAtomFile, namdWorkDir, dirlen);
2925 memcpy(binAtomFile+dirlen, curfile, filelen);
2926 memcpy(binAtomFile+dirlen+filelen,
".bin", 4);
2927 binAtomFile[dirlen+filelen+4] = 0;
2930 current = config->
find(
"bincoordinates");
2931 curfile = current->
data;
2932 filelen = strlen(curfile);
2933 if(*curfile ==
'/' || *curfile==
'~') {
2934 binCoorFile =
new char[filelen+1];
2935 memcpy(binCoorFile, curfile, filelen);
2936 binCoorFile[filelen] = 0;
2938 binCoorFile =
new char[dirlen+filelen+1];
2939 memcpy(binCoorFile, namdWorkDir, dirlen);
2940 memcpy(binCoorFile+dirlen, curfile, filelen);
2941 binCoorFile[dirlen+filelen] = 0;
2944 if(opts.
defined(
"binvelocities")){
2945 current = config->
find(
"binvelocities");
2946 curfile = current->
data;
2947 filelen = strlen(curfile);
2948 if(*curfile ==
'/' || *curfile==
'~') {
2949 binVelFile =
new char[filelen+1];
2950 memcpy(binVelFile, curfile, filelen);
2951 binVelFile[filelen] = 0;
2953 binVelFile =
new char[dirlen+filelen+1];
2954 memcpy(binVelFile, namdWorkDir, dirlen);
2955 memcpy(binVelFile+dirlen, curfile, filelen);
2956 binVelFile[dirlen+filelen] = 0;
2960 if(opts.
defined(
"binrefcoords")){
2961 current = config->
find(
"binrefcoords");
2962 curfile = current->
data;
2963 filelen = strlen(curfile);
2964 if(*curfile ==
'/' || *curfile==
'~') {
2965 binRefFile =
new char[filelen+1];
2966 memcpy(binRefFile, curfile, filelen);
2967 binRefFile[filelen] = 0;
2969 binRefFile =
new char[dirlen+filelen+1];
2970 memcpy(binRefFile, namdWorkDir, dirlen);
2971 memcpy(binRefFile+dirlen, curfile, filelen);
2972 binRefFile[dirlen+filelen] = 0;
2977 if(outputFilename[0] !=
'/' && outputFilename[0]!=
'~') {
2978 filelen = strlen(outputFilename);
2979 char *tmpout =
new char[filelen];
2980 memcpy(tmpout, outputFilename, filelen);
2981 CmiAssert(filelen+dirlen <= 120);
2982 memcpy(outputFilename, namdWorkDir, dirlen);
2983 memcpy(outputFilename+dirlen, tmpout, filelen);
2984 outputFilename[filelen+dirlen] = 0;
2988 if ( dcdFrequency && opts.
defined(
"dcdfile") &&
2989 dcdFilename[0] !=
'/' && dcdFilename[0]!=
'~' ) {
2990 filelen = strlen(dcdFilename);
2991 char *tmpout =
new char[filelen];
2992 memcpy(tmpout, dcdFilename, filelen);
2993 CmiAssert(filelen+dirlen <= 120);
2994 memcpy(dcdFilename, namdWorkDir, dirlen);
2995 memcpy(dcdFilename+dirlen, tmpout, filelen);
2996 dcdFilename[filelen+dirlen] = 0;
3000 if ( velDcdFrequency && opts.
defined(
"veldcdfile") &&
3001 velDcdFilename[0] !=
'/' && velDcdFilename[0]!=
'~' ) {
3002 filelen = strlen(velDcdFilename);
3003 char *tmpout =
new char[filelen];
3004 memcpy(tmpout, velDcdFilename, filelen);
3005 CmiAssert(filelen+dirlen <= 120);
3006 memcpy(velDcdFilename, namdWorkDir, dirlen);
3007 memcpy(velDcdFilename+dirlen, tmpout, filelen);
3008 velDcdFilename[filelen+dirlen] = 0;
3012 if ( forceDcdFrequency && opts.
defined(
"forcedcdfile") &&
3013 forceDcdFilename[0] !=
'/' && forceDcdFilename[0]!=
'~' ) {
3014 filelen = strlen(forceDcdFilename);
3015 char *tmpout =
new char[filelen];
3016 memcpy(tmpout, forceDcdFilename, filelen);
3017 CmiAssert(filelen+dirlen <= 120);
3018 memcpy(forceDcdFilename, namdWorkDir, dirlen);
3019 memcpy(forceDcdFilename+dirlen, tmpout, filelen);
3020 forceDcdFilename[filelen+dirlen] = 0;
3024 if ( restartFrequency && opts.
defined(
"restartname") &&
3025 restartFilename[0] !=
'/' && restartFilename[0]!=
'~' ) {
3026 filelen = strlen(restartFilename);
3027 char *tmpout =
new char[filelen];
3028 memcpy(tmpout, restartFilename, filelen);
3029 CmiAssert(filelen+dirlen <= 120);
3030 memcpy(restartFilename, namdWorkDir, dirlen);
3031 memcpy(restartFilename+dirlen, tmpout, filelen);
3032 restartFilename[filelen+dirlen] = 0;
3036 delete [] namdWorkDir;
3038 if (opts.
defined(
"numinputprocs")) {
3039 if(numinputprocs > CkNumPes()) {
3040 iout <<
iWARN <<
"The number of input processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
3041 numinputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
3045 if (opts.
defined(
"numoutputprocs")) {
3046 if(numoutputprocs > CkNumPes()) {
3047 iout <<
iWARN <<
"The number of output processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
3048 numoutputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
3052 #ifndef OUTPUT_SINGLE_FILE 3053 #error OUTPUT_SINGLE_FILE not defined! 3056 #if !OUTPUT_SINGLE_FILE 3058 create_output_directories(
"coor");
3059 create_output_directories(
"vel");
3061 create_output_directories(
"dcd");
3063 iout <<
iWARN <<
"The dcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3066 if (velDcdFrequency) {
3067 create_output_directories(
"veldcd");
3068 if(opts.
defined(
"veldcdfile")){
3069 iout <<
iWARN <<
"The veldcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3072 if (forceDcdFrequency) {
3073 create_output_directories(
"forcedcd");
3074 if(opts.
defined(
"forcedcdfile")){
3075 iout <<
iWARN <<
"The forcedcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3081 if (! opts.
defined(
"auxFile")) {
3082 strcpy(auxFilename,outputFilename);
3083 strcat(auxFilename,
".aux");
3088 if (! opts.
defined(
"dcdfile")) {
3089 strcpy(dcdFilename,outputFilename);
3090 strcat(dcdFilename,
".dcd");
3096 if (velDcdFrequency) {
3097 if (! opts.
defined(
"veldcdfile")) {
3098 strcpy(velDcdFilename,outputFilename);
3099 strcat(velDcdFilename,
".veldcd");
3105 if (forceDcdFrequency) {
3106 if (! opts.
defined(
"forcedcdfile")) {
3107 strcpy(forceDcdFilename,outputFilename);
3108 strcat(forceDcdFilename,
".forcedcd");
3115 if (! opts.
defined(
"xstfile")) {
3116 strcpy(xstFilename,outputFilename);
3117 strcat(xstFilename,
".xst");
3123 if (restartFrequency) {
3124 if (! opts.
defined(
"restartname")) {
3125 strcpy(restartFilename,outputFilename);
3126 if ( ! restartSave ) strcat(restartFilename,
".restart");
3130 restartSave =
FALSE;
3131 binaryRestart =
FALSE;
3134 if (storeComputeMap || loadComputeMap) {
3135 if (! opts.
defined(
"computeMapFile")) {
3136 strcpy(computeMapFilename,
"computeMapFile");
3137 strcat(computeMapFilename,
".txt");
3145 if (!paraTypeXplorOn && !paraTypeCharmmOn)
3147 paraTypeXplorOn =
TRUE;
3150 if (paraTypeXplorOn && paraTypeCharmmOn)
3152 NAMD_die(
"Please specify either XPLOR or CHARMM format for parameters!");
3159 if (!(minimizeOn||minimizeCGOn) && !opts.
defined(
"temperature") &&
3162 NAMD_die(
"Must have either an initial temperature or a velocity file");
3165 if (minimizeOn||minimizeCGOn) { initialTemp = 0.0; }
3166 if (opts.
defined(
"velocities") || opts.
defined(
"binvelocities") )
3171 if (LJcorrection && LJcorrectionAlt) {
3172 NAMD_die(
"Only one method for LJ tail correction must be used.");
3176 if ( opts.
defined(
"extendedSystem") ) readExtendedSystem(config->
find(
"extendedSystem")->
data);
3178 #ifdef MEM_OPT_VERSION 3179 if ( LJcorrection ) {
3180 NAMD_die(
"LJ tail corrections not yet available for memory optimized builds");
3182 if ( LJcorrectionAlt ) {
3183 NAMD_die(
"Alternative LJ tail corrections not yet available for memory optimized builds");
3187 if ( LJcorrection && ! cellBasisVector3.length2() ) {
3188 NAMD_die(
"Can't use LJ tail corrections without periodic boundary conditions!");
3191 if ( LJcorrectionAlt && ! cellBasisVector3.length2() ) {
3192 NAMD_die(
"Can't use alternative LJ tail corrections without periodic boundary conditions!");
3195 if ( cellBasisVector3.length2() && ! cellBasisVector2.length2() ) {
3196 NAMD_die(
"Used cellBasisVector3 without cellBasisVector2!");
3199 if ( cellBasisVector2.length2() && ! cellBasisVector1.length2() ) {
3200 NAMD_die(
"Used cellBasisVector2 without cellBasisVector1!");
3203 if ( cellOrigin.length2() && ! cellBasisVector1.length2() ) {
3204 NAMD_die(
"Used cellOrigin without cellBasisVector1!");
3207 lattice.set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
3209 if (! opts.
defined(
"DCDunitcell")) {
3210 dcdUnitCell = lattice.a_p() && lattice.b_p() && lattice.c_p();
3216 if ( ! opts.
defined(
"cylindricalBCAxis") )
3218 cylindricalBCAxis =
'x';
3222 opts.
get(
"cylindricalBCAxis", s);
3224 if (!strcasecmp(s,
"x"))
3226 cylindricalBCAxis =
'x';
3228 else if (!strcasecmp(s,
"y"))
3230 cylindricalBCAxis =
'y';
3232 else if (!strcasecmp(s,
"z"))
3234 cylindricalBCAxis =
'z';
3240 sprintf(err_msg,
"Illegal value '%s' for 'cylindricalBCAxis' in configuration file", s);
3245 if (!opts.
defined(
"splitPatch"))
3251 opts.
get(
"splitPatch", s);
3252 if (!strcasecmp(s,
"position"))
3254 else if (!strcasecmp(s,
"hydrogen"))
3260 "Illegal value '%s' for 'splitPatch' in configuration file",
3267 opts.
get(
"exclude", s);
3269 if (!strcasecmp(s,
"none"))
3274 else if (!strcasecmp(s,
"1-2"))
3279 else if (!strcasecmp(s,
"1-3"))
3283 else if (!strcasecmp(s,
"1-4"))
3287 else if (!strcasecmp(s,
"scaled1-4"))
3295 sprintf(err_msg,
"Illegal value '%s' for 'exclude' in configuration file",
3300 if (scale14 != 1.0 && exclude !=
SCALED14)
3302 iout <<
iWARN <<
"Exclude is not scaled1-4; 1-4scaling ignored.\n" <<
endi;
3306 if (!opts.
defined(
"waterModel")) {
3309 opts.
get(
"waterModel", s);
3310 if (!strncasecmp(s,
"tip4", 4)) {
3313 }
else if (!strncasecmp(s,
"tip3", 4)) {
3316 }
else if (!strncasecmp(s,
"swm4", 4)) {
3322 "Illegal value %s for 'waterModel' in configuration file", s);
3327 NAMD_die(
"Must have 'drudeOn' enabled to use SWM4-DP water model.");
3332 <<
"Setting water model to 'swm4' (SWM4-DP) for Drude polarization.\n" 3345 int * gomethod = &goMethod;
3346 if (!opts.
defined(
"GoMethod")) {
3350 opts.
get(
"GoMethod",s);
3352 *gomethod = atoi(s);
3354 if (!strcasecmp(s,
"matrix")) {
3357 }
else if (!strcasecmp(s,
"faster")) {
3360 }
else if (!strcasecmp(s,
"lowmem")) {
3367 "Illegal value '%s' for 'GoMethod' in configuration file",
3375 if (!opts.
defined(
"MTSAlgorithm"))
3381 opts.
get(
"MTSAlgorithm", s);
3383 if (!strcasecmp(s,
"naive"))
3385 MTSAlgorithm =
NAIVE;
3387 else if (!strcasecmp(s,
"constant"))
3389 MTSAlgorithm =
NAIVE;
3391 else if (!strcasecmp(s,
"impulse"))
3395 else if (!strcasecmp(s,
"verleti"))
3404 "Illegal value '%s' for 'MTSAlgorithm' in configuration file",
3411 if (!opts.
defined(
"longSplitting"))
3417 opts.
get(
"longSplitting", s);
3418 if (!strcasecmp(s,
"sharp"))
3419 longSplitting =
SHARP;
3420 else if (!strcasecmp(s,
"xplor"))
3421 longSplitting =
XPLOR;
3422 else if (!strcasecmp(s,
"c1"))
3424 else if (!strcasecmp(s,
"c2"))
3431 "Illegal value '%s' for 'longSplitting' in configuration file",
3438 if (!opts.
defined(
"rigidBonds"))
3444 opts.
get(
"rigidBonds", s);
3445 if (!strcasecmp(s,
"all"))
3449 else if (!strcasecmp(s,
"water"))
3453 else if (!strcasecmp(s,
"none"))
3461 "Illegal value '%s' for 'rigidBonds' in configuration file", s);
3471 "Water model %s requires rigidBonds set to \"all\" or \"water\"",
3477 if (switchingActive)
3480 if (!opts.
defined(
"switchDist")) {
3481 NAMD_die(
"switchDist must be defined when switching is enabled");
3484 if ( (switchingDist>cutoff) || (switchingDist<0) )
3489 "switchDist muct be between 0 and cutoff, which is %f", cutoff);
3495 if ( martiniSwitching )
3497 if ( ! switchingActive && ! LJPMEOn)
3499 NAMD_die(
"martiniSwitching requires switching");
3501 if ( vdwForceSwitching )
3503 NAMD_die(
"martiniSwitching and vdwForceSwitching are exclusive to one another. Select only one.");
3505 if ( dielectric != 15.0 && ! martiniDielAllow )
3507 iout <<
iWARN <<
"USE DIELECTRIC OF 15.0 WITH MARTINI.\n";
3508 iout <<
iWARN <<
"SETTING dielectric 15.0\n";
3509 iout <<
iWARN <<
"FOR NON-STANDARD DIELECTRIC WITH MARTINI, SET: martiniDielAllow on\n";
3514 iout <<
iWARN <<
"USE COSINE BASED ANGLES WITH MARTINI.\n";
3515 iout <<
iWARN <<
"SETTING cosAngles on\n";
3520 NAMD_die(
"Do not use Particle Mesh Ewald with Martini. Set: PME off");
3524 NAMD_die(
"Do not use Multilevel Summation Method with Martini. Set: MSM off");
3528 NAMD_die(
"Do not use Fast Multipole Method with Martini. Set: FMM off");
3534 if (!opts.
defined(
"pairlistDist"))
3536 pairlistDist = cutoff;
3538 else if (pairlistDist < cutoff)
3540 NAMD_die(
"pairlistDist must be >= cutoff distance");
3543 patchDimension = pairlistDist;
3546 patchDimension += hgroupCutoff;
3550 if (berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) {
3551 defaultMargin = ( useFlexibleCell ? 0.06 : 0.03 ) * patchDimension;
3554 margin = defaultMargin;
3557 if (CUDASOAintegrateMode) {
3559 <<
"Tuning parameters to improve GPU-resident performance\n" 3566 const double CUDASOA_defaultMargin = 4;
3567 const int CUDASOA_defaultOutputEnergies = 100;
3569 if (! config->
find(
"margin")) {
3570 margin = CUDASOA_defaultMargin;
3572 <<
"Setting margin to " << margin <<
"\n" 3575 else if (margin < CUDASOA_defaultMargin) {
3577 <<
"Keeping margin at user-specified value " << margin <<
"\n" 3579 <<
"Performance might be improved by increasing margin size to >= " 3580 << CUDASOA_defaultMargin <<
"\n" 3584 if (! config->
find(
"outputEnergies")) {
3585 outputEnergies = CUDASOA_defaultOutputEnergies;;
3587 <<
"Setting outputEnergies to " << outputEnergies <<
"\n" 3590 else if (outputEnergies < CUDASOA_defaultOutputEnergies) {
3592 <<
"Keeping outputEnergies at user-specified value " 3593 << outputEnergies <<
"\n" 3595 <<
"Performance might be improved by increasing outputEnergies to >= " 3596 << CUDASOA_defaultOutputEnergies <<
"\n" 3601 if ( defaultMargin != 0.0 && margin == 0.0 ) {
3602 margin = defaultMargin;
3603 iout <<
iWARN <<
"ALWAYS USE NON-ZERO MARGIN WITH CONSTANT PRESSURE!\n";
3604 iout <<
iWARN <<
"CHANGING MARGIN FROM 0 to " << margin <<
"\n" <<
endi;
3607 patchDimension += margin;
3613 NAMD_die(
"GBIS not compatible with FullDirect");
3616 NAMD_die(
"GBIS not compatible with PME");
3619 NAMD_die(
"GBIS not compatible with MSM");
3622 NAMD_die(
"GBIS not compatible with FMM");
3625 NAMD_die(
"GBIS not compatible with Alchemical Transformations");
3628 NAMD_die(
"GBIS not compatible with Locally Enhanced Sampling");
3631 NAMD_die(
"GBIS not compatible with FMA");
3634 NAMD_die(
"GBIS not compatible with Drude Polarization");
3637 if (alpha_cutoff > patchDimension) {
3638 patchDimension = alpha_cutoff;
3641 BigReal tmp = (initialTemp > 0) ? initialTemp : 300;
3642 kappa = 50.29216*sqrt(ion_concentration/solvent_dielectric/tmp);
3647 #ifdef MEM_OPT_VERSION 3648 NAMD_die(
"SASA not yet available for memory optimized builds");
3650 if ( lattice.volume() > 0 ) {
3651 NAMD_die(
"SASA does not yet support periodic boundary conditions.");
3659 if ( dihedralOn ) globalOn =
TRUE;
3661 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 3662 if (loweAndersenOn) {
3663 NAMD_die(
"Lowe-Andersen dynamics not compatible with CUDA at this time");
3669 if (loweAndersenOn && (langevinOn || tCoupleOn))
3671 NAMD_die(
"Lowe-Andersen dynamics, Langevin dynamics and temperature coupling are mutually exclusive dynamics modes");
3675 if (tCoupleOn && opts.
defined(
"rescaleFreq") )
3677 NAMD_die(
"Temperature coupling and temperature rescaling are mutually exclusive");
3680 if (globalOn && CkNumPes() > 1)
3682 NAMD_die(
"Global integration does not run in parallel (yet).");
3685 if (COLDOn && langevinOn)
3687 NAMD_die(
"COLD and Langevin dynamics are mutually exclusive dynamics modes");
3689 if (COLDOn && minimizeOn)
3691 NAMD_die(
"COLD and minimization are mutually exclusive dynamics modes");
3693 if (COLDOn && tCoupleOn)
3695 NAMD_die(
"COLD and temperature coupling are mutually exclusive dynamics modes");
3697 if (COLDOn && opts.
defined(
"rescaleFreq"))
3699 NAMD_die(
"COLD and velocity rescaling are mutually exclusive dynamics modes");
3704 NAMD_die(
"splitPatch hydrogen is required for MOLLY");
3709 NAMD_die(
"splitPatch hydrogen is required for rigidBonds");
3715 if(accelMDGiE < 1 || accelMDGiE > 2){
3716 sprintf(msg,
"accelMDGiE was set to %d but it should be 1 or 2", accelMDGiE);
3719 if(accelMDGStatWindow > 0){
3720 if(accelMDGcMDPrepSteps % accelMDGStatWindow != 0)
3721 NAMD_die(
"'accelMDGcMDPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3722 if(accelMDGcMDSteps % accelMDGStatWindow != 0)
3723 NAMD_die(
"'accelMDGcMDSteps' has to be a multiple of 'accelMDGStatWindow'");
3724 if(accelMDGEquiPrepSteps % accelMDGStatWindow != 0)
3725 NAMD_die(
"'accelMDGEquiPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3726 if(accelMDGEquiSteps % accelMDGStatWindow != 0)
3727 NAMD_die(
"'accelMDGEquiSteps' has to be a multiple of 'accelMDGStatWindow'");
3729 if(accelMDGRestart && accelMDGcMDSteps == 0)
3730 accelMDGcMDPrepSteps = 0;
3731 else if(accelMDGcMDSteps - accelMDGcMDPrepSteps < 2)
3732 NAMD_die(
"'accelMDGcMDSteps' should be larger than 'accelMDGcMDPrepSteps'");
3734 if(accelMDGEquiSteps == 0)
3735 accelMDGEquiPrepSteps = 0;
3736 else if(accelMDGresetVaftercmd){
3737 if(accelMDGEquiPrepSteps <= 0)
3738 NAMD_die(
"'accelMDGEquiPrepSteps' should be non-zero");
3739 if(accelMDGEquiSteps - accelMDGEquiPrepSteps < 1)
3740 NAMD_die(
"'accelMDGEquiSteps' should be larger than 'accelMDGEquiPrepSteps'");
3745 iout <<
iWARN <<
"accelMDE will be ignored with accelMDG on.\n" <<
endi;
3746 if(opts.
defined(
"accelMDalpha"))
3747 iout <<
iWARN <<
"accelMDalpha will be ignored with accelMDG on.\n" <<
endi;
3749 iout <<
iWARN <<
"accelMDTE will be ignored with accelMDG on.\n" <<
endi;
3750 if(opts.
defined(
"accelMDTalpha"))
3751 iout <<
iWARN <<
"accelMDTalpha will be ignored with accelMDG on.\n" <<
endi;
3755 NAMD_die(
"accelMDE and accelMDalpha are required for accelMD with accelMDG off");
3757 if(accelMDdual && (!opts.
defined(
"accelMDTE") || !opts.
defined(
"accelMDTalpha"))){
3758 NAMD_die(
"accelMDTE and accelMDTalpha are required for accelMDdual with accelMDG off");
3765 if (minimizeOn && (maximumMove == 0.0))
3767 maximumMove = 0.75 * pairlistDist/stepsPerCycle;
3770 if (!adaptTempRescale && !adaptTempLangevin)
3771 NAMD_die(
"Adaptive tempering needs to be coupled to either the Langevin thermostat or velocity rescaling.");
3772 if (opts.
defined(
"adaptTempInFile") && (opts.
defined(
"adaptTempTmin") ||
3773 opts.
defined(
"adaptTempTmax") ||
3774 adaptTempBins != 0))
3775 NAMD_die(
"cannot simultaneously specify adaptTempInFile and any of {adaptTempTmin, adaptTempTmax,adaptTempBins} as these are read from the input file");
3776 if (!opts.
defined(
"adaptTempInFile") && !(opts.
defined(
"adaptTempTmin") &&
3777 opts.
defined(
"adaptTempTmax") &&
3778 adaptTempBins != 0 ))
3779 NAMD_die(
"Need to specify either adaptTempInFile or all of {adaptTempTmin, adaptTempTmax,adaptTempBins} if adaptTempMD is on.");
3783 monteCarloPressureOnAtStartup = monteCarloPressureOn;
3785 langevinOnAtStartup = langevinOn;
3787 if ( ! opts.
defined(
"langevinDamping") ) langevinDamping = 0.0;
3788 if ( ! opts.
defined(
"langevinHydrogen") ) langevinHydrogen =
TRUE;
3789 if ( (opts.
defined(
"langevinDamping") || opts.
defined(
"langevinHydrogen"))
3790 && (opts.
defined(
"langevinFile") || opts.
defined(
"langevinCol")) )
3791 NAMD_die(
"To specify Langevin dynamics parameters, use either langevinDamping and langevinHydrogen or langevinFile and langevinCol. Do not combine them.");
3792 if ( opts.
defined(
"langevinHydrogen") && langevinDamping == 0.0 )
3793 NAMD_die(
"langevinHydrogen requires langevinDamping to be set.");
3797 langevinGammasDiffer = ( ! langevinHydrogen ) ||
3798 opts.
defined(
"langevinFile") ||
3799 ( opts.
defined(
"drudeDamping") && drudeDamping != langevinDamping );
3800 if (langevinGammasDiffer) {
3803 <<
"The Langevin gamma parameters differ over the particles,\n" 3805 <<
"requiring extra work per step to constrain rigid bonds.\n" 3811 if (loweAndersenOn) {
3812 if (!opts.
defined(
"loweAndersenRate")) loweAndersenRate = 100;
3813 if (!opts.
defined(
"loweAndersenCutoff")) loweAndersenCutoff = 2.7;
3818 if (stochRescaleOn) {
3819 if (langevinOn || loweAndersenOn || tCoupleOn ||
3821 NAMD_die(
"Stochastic velocity rescaling is incompatible with other temperature control methods");
3823 if (!opts.
defined(
"stochRescaleFreq")) stochRescaleFreq = stepsPerCycle;
3826 if (opts.
defined(
"rescaleFreq"))
3828 if (!opts.
defined(
"rescaleTemp"))
3830 if (opts.
defined(
"temperature"))
3832 rescaleTemp = initialTemp;
3836 NAMD_die(
"Must give a rescale temperature if rescaleFreq is defined");
3846 if (opts.
defined(
"rescaleTemp"))
3848 if (!opts.
defined(
"rescaleFreq"))
3850 NAMD_die(
"Must give a rescale freqency if rescaleTemp is given");
3854 if (opts.
defined(
"reassignFreq"))
3856 if (!opts.
defined(
"reassignTemp"))
3858 if (opts.
defined(
"temperature"))
3860 reassignTemp = initialTemp;
3864 NAMD_die(
"Must give a reassign temperature if reassignFreq is defined");
3874 if (opts.
defined(
"reassignTemp"))
3876 if (!opts.
defined(
"reassignFreq"))
3878 NAMD_die(
"Must give a reassignment freqency if reassignTemp is given");
3882 if (opts.
defined(
"reassignIncr"))
3884 if (!opts.
defined(
"reassignFreq"))
3886 NAMD_die(
"Must give a reassignment freqency if reassignIncr is given");
3894 if (opts.
defined(
"reassignHold"))
3896 if (!opts.
defined(
"reassignIncr"))
3898 NAMD_die(
"Must give a reassignment increment if reassignHold is given");
3908 randomSeed = (
unsigned int) time(NULL) + 31530001 * CmiMyPartition();
3912 if (opts.
defined(
"soluteScaling")) {
3916 if ( ! opts.
defined(
"soluteScalingFactorCharge") ) {
3917 soluteScalingFactorCharge = soluteScalingFactor;
3919 if ( ! opts.
defined(
"soluteScalingFactorVdw") ) {
3920 soluteScalingFactorVdw = soluteScalingFactor;
3925 alchFepOnAtStartup = alchFepOn =
FALSE;
3926 alchThermIntOnAtStartup = alchThermIntOn =
FALSE;
3927 alchOnAtStartup = alchOn;
3930 #if !defined(NAMD_CUDA) && !defined(NAMD_HIP) 3933 if (martiniSwitching) {
3934 iout <<
iWARN <<
"Martini switching disabled for alchemical " 3935 "interactions.\n" <<
endi;
3938 if (!opts.
defined(
"alchType")) {
3939 NAMD_die(
"Must define type of alchemical simulation: fep or ti\n");
3942 opts.
get(
"alchType",s);
3943 if (!strcasecmp(s,
"fep")) {
3944 alchFepOnAtStartup = alchFepOn =
TRUE;
3946 else if (!strcasecmp(s,
"ti")) {
3947 alchThermIntOnAtStartup = alchThermIntOn =
TRUE;
3950 NAMD_die(
"Unknown type of alchemical simulation; choices are fep or ti\n");
3954 if (rescaleFreq > 0) alchTemp = rescaleTemp;
3955 else if (reassignFreq > 0) alchTemp = reassignTemp;
3956 else if (langevinOn) alchTemp = langevinTemp;
3957 else if (stochRescaleOn) alchTemp = stochRescaleTemp;
3958 else if (tCoupleOn) alchTemp = tCoupleTemp;
3959 else NAMD_die(
"Alchemical FEP can be performed only in constant temperature simulations\n");
3961 if (reassignFreq > 0 && reassignIncr != 0)
3962 NAMD_die(
"reassignIncr cannot be used in alchemical simulations\n");
3964 if (alchLambda < 0.0 || alchLambda > 1.0)
3965 NAMD_die(
"alchLambda values should be in the range [0.0, 1.0]\n");
3967 if (alchVdwLambdaEnd > 1.0)
3968 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");
3970 if (alchBondLambdaEnd > 1.0)
3971 NAMD_die(
"alchBondLambdaEnd should be in the range [0.0, 1.0]\n");
3973 if (alchElecLambdaStart > 1.0)
3974 NAMD_die(
"alchElecLambdaStart should be in the range [0.0, 1.0]\n");
3977 if (alchRepLambdaEnd > 1.0)
3978 NAMD_die(
"alchRepLambdaEnd should be in the range [0.0, 1.0]\n");
3979 if (alchVdwLambdaEnd < alchRepLambdaEnd)
3980 NAMD_die(
"alchVdwLambdaEnd should be greater than alchRepLambdaEnd\n");
3981 if (alchVdwShiftCoeff > 0.0) {
3982 iout <<
iWARN <<
"alchVdwShiftCoeff is non-zero but not used when WCA" 3983 <<
" is active. Setting it to zero now.\n" <<
endi;
3984 alchVdwShiftCoeff = 0.0;
3986 if (alchThermIntOn) {
3987 NAMD_die(
"alchWCA is not currently compatible with TI");
3989 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 3990 NAMD_die(
"alchWCA is not currently available with CUDA");
3995 if (alchLambda2 < 0.0 || alchLambda2 > 1.0)
3996 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
4000 if (!opts.
defined(
"alchoutfile")) {
4001 strcpy(alchOutFile, outputFilename);
4002 strcat(alchOutFile,
".fep");
4005 if (!opts.
defined(
"alchLambda") || !opts.
defined(
"alchLambda2")) {
4006 NAMD_die(
"alchFepOn is on, but alchLambda or alchLambda2 is not set.");
4009 else if (alchThermIntOn) {
4011 if (alchLambdaFreq && (alchLambda2 < 0.0 || alchLambda2 > 1.0))
4012 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
4014 if (!opts.
defined(
"alchoutfile")) {
4015 strcpy(alchOutFile, outputFilename);
4016 strcat(alchOutFile,
".ti");
4023 if ( alchOn && alchFepOn && alchThermIntOn )
4024 NAMD_die(
"Sorry, combined TI and FEP is not implemented.\n");
4025 if ( alchOn && lesOn )
4026 NAMD_die(
"Sorry, combined LES with FEP or TI is not implemented.\n");
4027 if ( alchOn && alchThermIntOn && lesOn )
4028 NAMD_die(
"Sorry, combined LES and TI is not implemented.\n");
4029 if ( alchWCAOn && !alchOn ) {
4030 iout <<
iWARN <<
"Alchemical WCA decomposition was requested but \ 4031 alchemical free energy calculation is not active. Setting \ 4032 alchWCA to off.\n" <<
endi;
4035 if ( alchDecouple && !alchOn ) {
4036 iout <<
iWARN <<
"Alchemical decoupling was requested but \ 4037 alchemical free energy calculation is not active. Setting \ 4038 alchDecouple to off.\n" <<
endi;
4039 alchDecouple =
FALSE;
4041 if ( alchBondDecouple && !alchOn ) {
4042 iout <<
iWARN <<
"Alchemical bond decoupling was requested but \ 4043 alchemical free energy calculation is not active. Setting \ 4044 alchBondDecouple to off.\n" <<
endi;
4045 alchBondDecouple =
FALSE;
4048 if ( lesOn && ( lesFactor < 1 || lesFactor > 255 ) ) {
4049 NAMD_die(
"lesFactor must be positive and less than 256");
4051 if ((pairInteractionOn && alchOn) || (pairInteractionOn && lesOn))
4052 NAMD_die(
"Sorry, pair interactions may not be calculated when LES, FEP or TI is enabled.");
4056 if ( ! langevinOn ) {
4057 NAMD_die(
"Drude model requires use of Langevin thermostat.");
4059 if ( ! opts.
defined(
"drudeDamping")) {
4060 drudeDamping = langevinDamping;
4061 iout <<
iWARN <<
"Undefined 'drudeDamping' will be set to " 4062 "value of 'langevinDamping'\n" <<
endi;
4065 NAMD_die(
"Drude implementation is incompatible with alchemical " 4066 "free energy calculation.");
4071 if (opts.
defined(
"ldBalancer")) {
4072 if (strcasecmp(loadBalancer,
"none") == 0)
4074 else if (strcasecmp(loadBalancer,
"hybrid") == 0)
4077 NAMD_die(
"Unknown ldBalancer selected");
4080 #ifdef MEM_OPT_VERSION 4085 if (opts.
defined(
"ldbStrategy")) {
4087 if (strcasecmp(loadStrategy,
"comprehensive") == 0)
4089 else if (strcasecmp(loadStrategy,
"refineonly") == 0)
4091 else if (strcasecmp(loadStrategy,
"old") == 0)
4094 NAMD_die(
"Unknown ldbStrategy selected");
4099 if (!opts.
defined(
"ldbPeriod")) {
4100 ldbPeriod=200*stepsPerCycle;
4104 if (!opts.
defined(
"firstLdbStep")) {
4105 firstLdbStep=5*stepsPerCycle;
4108 if (ldbPeriod <= firstLdbStep) {
4109 NAMD_die(
"ldbPeriod must greater than firstLdbStep.");
4112 if (!opts.
defined(
"lastLdbStep")) {
4116 if (!opts.
defined(
"hybridGroupSize")) {
4117 hybridGroupSize = 512;
4119 if ( hybridGroupSize < CkNumPes() ) {
4121 int groupsize = hybridGroupSize;
4124 CmiGetPesOnPhysicalNode(CmiPhysicalNodeID(0), &rpelist, &nodesize);
4125 if ( CkNumPes() % nodesize ) nodesize = CmiNodeSize(CmiNodeOf(0));
4126 if ( CkNumPes() % nodesize ) nodesize = 1;
4127 groupsize += nodesize - 1;
4128 while ( 2 * groupsize > CkNumPes() ) --groupsize;
4129 if ( groupsize < nodesize ) groupsize = nodesize;
4130 while ( groupsize % nodesize ) --groupsize;
4131 while ( groupsize && CkNumPes() % groupsize ) groupsize -= nodesize;
4132 if ( 2 * groupsize < hybridGroupSize ) {
4133 groupsize += nodesize;
4134 while ( CkNumPes() % groupsize ) groupsize += nodesize;
4136 if ( 2 * groupsize <= CkNumPes() ) hybridGroupSize = groupsize;
4141 bool specialTracing = traceAvailable() && (traceIsOn() == 0);
4143 if(!opts.
defined(
"traceStartStep")) {
4144 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
4146 if(!opts.
defined(
"numTraceSteps")) {
4147 numTraceSteps = 100;
4150 if(specialTracing) {
4151 if (!opts.
defined(
"firstLdbStep")) firstLdbStep = 20;
4152 if (!opts.
defined(
"ldbPeriod")) ldbPeriod = 100;
4154 if(!opts.
defined(
"traceStartStep")) {
4155 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
4158 if(!opts.
defined(
"numTraceSteps")) {
4163 #ifdef MEASURE_NAMD_WITH_PAPI 4165 if(!opts.
defined(
"papiMeasureStartStep")) {
4166 papiMeasureStartStep = 3 * firstLdbStep;
4168 if(!opts.
defined(
"numPapiMeasureSteps")) {
4169 numPapiMeasureSteps = 8;
4174 if(simulateInitialMapping) {
4175 if(!opts.
defined(
"simulatedPEs")){
4176 simulatedPEs = CkNumPes();
4178 if(!opts.
defined(
"simulatedNodeSize")){
4179 simulatedNodeSize = CkMyNodeSize();
4183 #ifdef MEM_OPT_VERSION 4192 if(ldbPeriod%stepsPerCycle!=0 || firstLdbStep%stepsPerCycle!=0) {
4193 iout <<
iWARN <<
"In memory optimized version, the ldbPeriod parameter or firstLdbStep parameter is better set to be a multiple of stepsPerCycle parameter!\n";
4197 if (N < firstTimestep) { N = firstTimestep; }
4199 if ( (firstTimestep%stepsPerCycle) != 0)
4201 NAMD_die(
"First timestep must be a multiple of stepsPerCycle!!");
4211 if ( fullDirectOn ) ++i;
4213 NAMD_die(
"More than one full electrostatics algorithm selected!!!");
4216 if (!opts.
defined(
"ldbBackgroundScaling")) {
4217 ldbBackgroundScaling = 1.0;
4219 if (!opts.
defined(
"ldbPMEBackgroundScaling")) {
4220 ldbPMEBackgroundScaling = ldbBackgroundScaling;
4222 if (!opts.
defined(
"ldbHomeBackgroundScaling")) {
4223 ldbHomeBackgroundScaling = ldbBackgroundScaling;
4228 if ( lattice.volume() == 0. ) {
4229 NAMD_die(
"LJ-PME requires periodic boundary conditions.");
4231 if ( LJPMEGridSpacing == 0. ) {
4232 if ( LJPMEGridSizeX * LJPMEGridSizeY * LJPMEGridSizeZ == 0 )
4233 NAMD_die(
"Either LJPMEGridSpacing or LJPMEGridSizeX, LJPMEGridSizeY, and LJPMEGridSizeZ must be specified.");
4234 else LJPMEGridSpacing = 1.5;
4236 #ifndef TEST_PME_GRID 4237 for (
int idim = 0; idim < 3; ++idim ) {
4240 const char *direction;
4242 case 0: direction =
"X";
4243 gridSize = &LJPMEGridSizeX; cellLength = lattice.a().length();
4245 case 1: direction =
"Y";
4246 gridSize = &LJPMEGridSizeY; cellLength = lattice.b().length();
4248 case 2: direction =
"Z";
4249 gridSize = &LJPMEGridSizeZ; cellLength = lattice.c().length();
4252 int minSize = (int) ceil(cellLength/LJPMEGridSpacing);
4254 for (
int minSize = 1; minSize < 300; ++minSize ) {
4256 int bestSize = 10 * (minSize + 10);
4258 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
4259 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
4263 for (
int i2 = 0; i2 <= max2; ++i2 ) {
4264 for (
int i3 = 0; i3 <= max3; ++i3 ) {
4265 for (
int i5 = 0; i5 <= max5; ++i5 ) {
4266 for (
int i7 = 0; i7 <= max7; ++i7 ) {
4267 for (
int i11 = 0; i11 <= max11; ++i11 ) {
4268 if ( i5 + i7 + i11 > i2 )
continue;
4270 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
4271 if ( testSize > bestSize )
continue;
4272 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
4273 if ( testSize > bestSize )
continue;
4274 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
4275 if ( testSize > bestSize )
continue;
4276 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
4277 if ( testSize > bestSize )
continue;
4278 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
4279 if ( testSize > bestSize )
continue;
4280 if ( testSize >= minSize ) bestSize = testSize;
4282 #ifdef TEST_PME_GRID 4283 iout <<
"LJ-PME: " << minSize <<
" " << bestSize <<
"\n" <<
endi;
4285 if ( ! *gridSize ) {
4286 *gridSize = bestSize;
4288 if ( *gridSize * LJPMEGridSpacing < cellLength ) {
4290 sprintf(errmsg,
"LJPMEGridSize%s %d is too small for cell length %f and LJPMEGridSpacing %f\n",
4291 direction, *gridSize, cellLength, LJPMEGridSpacing);
4296 if ( LJPMEGridSizeX < 5 ) {
4297 NAMD_die(
"LJPMEGridSizeX (number of grid points) is very small.");
4299 if ( LJPMEGridSizeY < 5 ) {
4300 NAMD_die(
"LJPMEGridSizeY (number of grid points) is very small.");
4302 if ( LJPMEGridSizeZ < 5 ) {
4303 NAMD_die(
"LJPMEGridSizeZ (number of grid points) is very small.");
4305 BigReal tolerance = LJPMETolerance;
4307 BigReal aRc = ewaldcof*cutoff;
4310 BigReal damping = (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom;
4311 while ( damping >= tolerance ) {
4313 aRc = ewaldcof*cutoff;
4314 damping = (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom;
4317 BigReal ewaldcof_hi = ewaldcof;
4318 for (
int i = 0; i < 100; ++i ) {
4319 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
4320 aRc = ewaldcof*cutoff;
4321 if ( (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom >= tolerance ) {
4322 ewaldcof_lo = ewaldcof;
4324 ewaldcof_hi = ewaldcof;
4327 LJPMEEwaldCoefficient = ewaldcof;
4332 LJPMEGridSpacing = 1000.;
4333 LJPMEEwaldCoefficient = 0;
4338 if ( lattice.volume() == 0. ) {
4339 NAMD_die(
"PME requires periodic boundary conditions.");
4341 if ( PMEGridSpacing == 0. ) {
4342 if ( PMEGridSizeX * PMEGridSizeY * PMEGridSizeZ == 0 )
4343 NAMD_die(
"Either PMEGridSpacing or PMEGridSizeX, PMEGridSizeY, and PMEGridSizeZ must be specified.");
4344 else PMEGridSpacing = 1.5;
4346 #ifndef TEST_PME_GRID 4347 for (
int idim = 0; idim < 3; ++idim ) {
4350 const char *direction;
4352 case 0: direction =
"X";
4353 gridSize = &PMEGridSizeX; cellLength = lattice.a().length();
4355 case 1: direction =
"Y";
4356 gridSize = &PMEGridSizeY; cellLength = lattice.b().length();
4358 case 2: direction =
"Z";
4359 gridSize = &PMEGridSizeZ; cellLength = lattice.c().length();
4362 int minSize = (int) ceil(cellLength/PMEGridSpacing);
4364 for (
int minSize = 1; minSize < 300; ++minSize ) {
4366 int bestSize = 10 * (minSize + 10);
4368 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
4369 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
4373 for (
int i2 = 0; i2 <= max2; ++i2 ) {
4374 for (
int i3 = 0; i3 <= max3; ++i3 ) {
4375 for (
int i5 = 0; i5 <= max5; ++i5 ) {
4376 for (
int i7 = 0; i7 <= max7; ++i7 ) {
4377 for (
int i11 = 0; i11 <= max11; ++i11 ) {
4378 if ( i5 + i7 + i11 > i2 )
continue;
4380 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
4381 if ( testSize > bestSize )
continue;
4382 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
4383 if ( testSize > bestSize )
continue;
4384 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
4385 if ( testSize > bestSize )
continue;
4386 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
4387 if ( testSize > bestSize )
continue;
4388 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
4389 if ( testSize > bestSize )
continue;
4390 if ( testSize >= minSize ) bestSize = testSize;
4392 #ifdef TEST_PME_GRID 4393 iout << minSize <<
" " << bestSize <<
"\n" <<
endi;
4395 if ( ! *gridSize ) {
4396 *gridSize = bestSize;
4398 if ( *gridSize * PMEGridSpacing < cellLength ) {
4400 sprintf(errmsg,
"PMEGridSize%s %d is too small for cell length %f and PMEGridSpacing %f\n",
4401 direction, *gridSize, cellLength, PMEGridSpacing);
4406 if ( PMEGridSizeX < 5 ) {
4407 NAMD_die(
"PMEGridSizeX (number of grid points) is very small.");
4409 if ( PMEGridSizeY < 5 ) {
4410 NAMD_die(
"PMEGridSizeY (number of grid points) is very small.");
4412 if ( PMEGridSizeZ < 5 ) {
4413 NAMD_die(
"PMEGridSizeZ (number of grid points) is very small.");
4415 BigReal tolerance = PMETolerance;
4417 while ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) ewaldcof *= 2.0;
4419 BigReal ewaldcof_hi = ewaldcof;
4420 for (
int i = 0; i < 100; ++i ) {
4421 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
4422 if ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) {
4423 ewaldcof_lo = ewaldcof;
4425 ewaldcof_hi = ewaldcof;
4428 PMEEwaldCoefficient = ewaldcof;
4430 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 4432 if ( ! opts.
defined(
"PMEOffload") ) {
4433 PMEOffload = ( (PMEInterpOrder > 4) && one_device_per_node );
4434 if ( PMEOffload )
iout <<
iINFO <<
"Enabling PMEOffload because PMEInterpOrder > 4.\n" <<
endi;
4435 }
else if ( PMEOffload && ! one_device_per_node ) {
4437 iout <<
iWARN <<
"Disabling PMEOffload because multiple CUDA devices per process are not supported.\n" <<
endi;
4447 PMEGridSpacing = 1000.;
4448 PMEEwaldCoefficient = 0;
4465 if (FMAFFTBlock != 4)
4466 NAMD_die(
"FMAFFTBlock: Block length must be 4 for short FFT's");
4467 if (FMAMp % FMAFFTBlock != 0)
4468 NAMD_die(
"FMAMp: multipole term must be multiple of block length (FMAFFTBlock)");
4471 if ( (nonbondedFrequency > stepsPerCycle) || ( (stepsPerCycle % nonbondedFrequency) != 0) )
4473 NAMD_die(
"stepsPerCycle must be a multiple of nonbondedFreq");
4476 if (!LCPOOn && !GBISOn && !GBISserOn && !FMAOn && !PMEOn && !MSMOn && !fullDirectOn && !FMMOn)
4478 fullElectFrequency = 0;
4482 if (!opts.
defined(
"fullElectFrequency"))
4484 if (opts.
defined(
"fmaFrequency")) {
4485 iout <<
iWARN <<
"The parameter fmaFrequency has been renamed fullElectFrequency.\n" <<
endi;
4486 fullElectFrequency = fmaFrequency;
4488 iout <<
iWARN <<
"The parameter fullElectFrequency now defaults to nonbondedFreq (" << nonbondedFrequency <<
") rather than stepsPerCycle.\n" <<
endi;
4489 fullElectFrequency = nonbondedFrequency;
4494 if (opts.
defined(
"fmaFrequency")) {
4495 iout <<
iWARN <<
"Ignoring redundant parameter fmaFrequency in favor of fullElectFrequency.\n" <<
endi;
4497 if ( (fullElectFrequency > stepsPerCycle) || ( (stepsPerCycle % fullElectFrequency) != 0) )
4499 NAMD_die(
"stepsPerCycle must be a multiple of fullElectFrequency");
4503 if ( (nonbondedFrequency > fullElectFrequency) || ( (fullElectFrequency % nonbondedFrequency) != 0) )
4505 NAMD_die(
"fullElectFrequency must be a multiple of nonbondedFreq");
4508 if (singleTopology && fullElectFrequency > 1)
NAMD_die(
"Single topology free energy calculation discourages multiple timesteps to assure accuracy!");
4509 if (singleTopology && alchDecouple)
NAMD_die(
"Single topology free energy calculation can NOT work with alchDecouple on");
4511 if (multigratorOn) {
4512 if ( (multigratorTemperatureFreq > multigratorPressureFreq) || ( (multigratorPressureFreq % multigratorTemperatureFreq) != 0) )
4514 NAMD_die(
"multigratorTemperatureFreq must be a multiple of multigratorPressureFreq");
4516 if ( (fullElectFrequency > multigratorTemperatureFreq) || ( (multigratorTemperatureFreq % fullElectFrequency) != 0) )
4518 NAMD_die(
"fullElectFrequency must be a multiple of multigratorTemperatureFreq");
4520 if (multigratorNoseHooverChainLength <= 2) {
4521 NAMD_die(
"multigratorNoseHooverChainLength must be greater than 2");
4525 if (!opts.
defined(
"fmaTheta"))
4529 if ( lesOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4530 NAMD_die(
"Sorry, LES is only implemented for PME full electrostatics.");
4532 if ( alchFepOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4533 NAMD_die(
"Sorry, FEP is only implemented for PME full electrostatics.");
4535 if ( alchThermIntOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4536 NAMD_die(
"Sorry, TI is only implemented for PME full electrostatics.");
4538 if ( pairInteractionOn && FMAOn ) {
4539 NAMD_die(
"Sorry, pairInteraction not implemented for FMA.");
4541 if ( pairInteractionOn && useDPME ) {
4542 NAMD_die(
"Sorry, pairInteraction not implemented for DPME.");
4544 if ( pairInteractionOn && fullDirectOn ) {
4545 NAMD_die(
"Sorry, pairInteraction not implemented for full direct electrostatics.");
4547 if ( ! pairInteractionOn ) {
4548 pairInteractionSelf = 0;
4550 if ( pairInteractionOn && !pairInteractionSelf && !config->
find(
"pairInteractionGroup2"))
4551 NAMD_die(
"pairInteractionGroup2 must be specified");
4553 if ( ! fixedAtomsOn ) {
4554 fixedAtomsForces = 0;
4557 if ( gridforceOn || mgridforceOn ) {
4558 parse_mgrid_params(config);
4561 if (groupRestraintsOn) {
4562 #ifdef NODEGROUP_FORCE_REGISTER 4563 if (CUDASOAintegrateMode) {
4565 NAMD_die(
"GroupRestraints is not compatible with multi-GPU simulation");
4568 parse_group_restraints_params(config);
4570 groupRestraints.CheckGroupRestraints();
4574 sprintf(msg,
"GroupRestraints requires GPUresident.\n" 4575 " Otherwise, use Colvars for similar functionality.");
4580 sprintf(msg,
"GroupRestraints is not supported on regular multicore builds.\n" 4581 " Please use single-node single-GPU build with GPUresident on\n" 4582 " or use Colvars for similar functionality.");
4587 if ( extraBondsOn ) {
4588 extraBondsCosAnglesSetByUser = ! ! config->
find(
"extraBondsCosAngles");
4590 extraBondsCosAnglesSetByUser =
false;
4593 if (!opts.
defined(
"constraints"))
4596 constraintScaling = 1.0;
4599 selectConstraintsOn =
FALSE;
4603 movingConstraintsOn =
FALSE;
4606 rotConstraintsOn =
FALSE;
4611 if (rotConstraintsOn) {
4612 rotConsAxis = rotConsAxis.unit();
4615 if(opts.
defined(
"rotConstraints")
4616 && opts.
defined(
"movingConstraints")) {
4617 NAMD_die(
"Rotating and moving constraints are mutually exclusive!");
4622 if(opts.
defined(
"selectConstraints") && !opts.
defined(
"selectConstrX")
4623 && !opts.
defined(
"selectConstrY") && !opts.
defined(
"selectConstrZ")) {
4624 NAMD_die(
"selectConstraints was specified, but no Cartesian components were defined!");
4626 if (!opts.
defined(
"selectConstraints")) {
4642 if (SMDDir.length2() == 0) {
4643 NAMD_die(
"SMD direction vector must be non-zero");
4646 SMDDir = SMDDir.unit();
4649 if (SMDOutputFreq > 0 && SMDOutputFreq < stepsPerCycle
4650 || SMDOutputFreq % stepsPerCycle != 0) {
4651 NAMD_die(
"SMDOutputFreq must be a multiple of stepsPerCycle");
4659 sphericalBCr1 = 0.0;
4660 sphericalBCk1 = 0.0;
4661 sphericalBCexp1 = 0;
4662 sphericalBCr2 = 0.0;
4663 sphericalBCk2 = 0.0;
4664 sphericalBCexp2 = 0;
4666 else if (!opts.
defined(
"sphericalBCr2"))
4668 sphericalBCr2 = -1.0;
4669 sphericalBCk2 = 0.0;
4670 sphericalBCexp2 = 0;
4673 if (!cylindricalBCOn)
4675 cylindricalBCr1 = 0.0;
4676 cylindricalBCk1 = 0.0;
4677 cylindricalBCexp1 = 0;
4678 cylindricalBCr2 = 0.0;
4679 cylindricalBCk2 = 0.0;
4680 cylindricalBCexp2 = 0;
4681 cylindricalBCl1 = 0.0;
4682 cylindricalBCl2 = 0.0;
4684 else if (!opts.
defined(
"cylindricalBCr2"))
4686 cylindricalBCr2 = -1.0;
4687 cylindricalBCk2 = 0.0;
4688 cylindricalBCexp2 = 0;
4689 cylindricalBCl2 = 0.0;
4702 if (!opts.
defined(
"eFieldFreq")) eFieldFreq = 0.0;
4703 if (!opts.
defined(
"eFieldPhase")) eFieldPhase = 0.0;
4709 stirStartingTheta = 0.0;
4720 if (!opts.
defined(
"langevin"))
4726 if (!opts.
defined(
"loweAndersen"))
4728 loweAndersenTemp = 0.0;
4739 if (daCutoffDist > pairlistDist)
4740 NAMD_die(
"Hydrogen bond cutoff distance must be <= pairlist distance");
4747 if (pairInteractionOn) {
4748 if (outputEnergies != 1) {
4749 iout <<
iWARN <<
"Setting outputEnergies to 1 due to\n";
4754 if (pairInteractionOn || pressureProfileOn) {
4755 if (nonbondedFrequency != 1) {
4756 iout <<
iWARN <<
"Setting nonbondedFreq to 1 due to\n";
4757 iout <<
iWARN <<
"pairInteraction or pressure profile calculations\n" <<
endi;
4762 if (!opts.
defined(
"outputTiming"))
4764 outputTiming = firstLdbStep;
4765 int ot2 = 10 * outputEnergies;
4766 if ( outputTiming < ot2 ) outputTiming = ot2;
4775 if (fullElectFrequency > 1)
NAMD_die(
"QM/MM discourages multiple timesteps to assure accuracy!");
4777 if (opts.
defined(
"QMSecProc")){
4781 qmSecProcOn =
false;
4784 if (opts.
defined(
"qmPrepProc")){
4785 qmPrepProcOn =
true;
4788 qmPrepProcOn =
false;
4791 if (opts.
defined(
"QMParamPDB")){
4792 qmParamPDBDefined =
true;
4795 qmParamPDBDefined =
false;
4798 if (opts.
defined(
"QMBondColumn")){
4799 qmBondColumnDefined =
true;
4802 qmBondColumnDefined =
false;
4805 if (qmBondColumnDefined || qmBondGuess){
4812 if ( strcasecmp(qmSoftware,
"orca") != 0 &&
4813 strcasecmp(qmSoftware,
"mopac") != 0 &&
4814 strcasecmp(qmSoftware,
"custom") != 0 ) {
4815 NAMD_die(
"Available QM software options are \'mopac\', \'orca\', or \'custom\'.");
4818 if ( strcasecmp(qmSoftware,
"orca") == 0 )
4820 if ( strcasecmp(qmSoftware,
"mopac") == 0 )
4822 if ( strcasecmp(qmSoftware,
"custom") == 0 )
4827 if (! opts.
defined(
"QMConfigLine"))
4828 NAMD_die(
"If the selected QM software is \'mopac\' or \'orca\'\ 4829 , QMConfigLine needs to be defined.");
4835 if (opts.
defined(
"QMChargeMode")) {
4836 if ( strcasecmp(qmChrgModeS,
"none") != 0 &&
4837 strcasecmp(qmChrgModeS,
"mulliken") != 0 &&
4838 strcasecmp(qmChrgModeS,
"chelpg") != 0) {
4839 NAMD_die(
"Available charge options are \'none\', \'mulliken\' or \'chelpg\'.");
4842 if ( strcasecmp(qmChrgModeS,
"none") == 0 )
4844 if ( strcasecmp(qmChrgModeS,
"mulliken") == 0 )
4846 if ( strcasecmp(qmChrgModeS,
"chelpg") == 0 )
4852 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4855 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4857 if (qmBondOn && (opts.
defined(
"QMBondValueType"))) {
4858 if ( strcasecmp(qmBondValueTypeS,
"len") != 0 &&
4859 strcasecmp(qmBondValueTypeS,
"ratio") != 0 ) {
4860 NAMD_die(
"Available QM bond value type options are \'len\' or \'ratio\'.");
4865 if ( strcasecmp(qmBondValueTypeS,
"len") == 0 )
4867 if ( strcasecmp(qmBondValueTypeS,
"ratio") == 0 )
4871 else if (qmBondOn && ! (opts.
defined(
"QMBondValueType")))
4874 if ( strcmp(qmColumn,
"beta") != 0 &&
4875 strcmp(qmColumn,
"occ") != 0 ) {
4876 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4879 if (qmBondColumnDefined) {
4880 if ( strcmp(qmBondColumn,
"beta") != 0 &&
4881 strcmp(qmBondColumn,
"occ") != 0 ) {
4882 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4885 if (strcmp(qmBondColumn,qmColumn) == 0)
4886 NAMD_die(
"QM column and bond-column must be different!");
4890 if (opts.
defined(
"QMBondScheme")) {
4891 if ( strcasecmp(qmBondSchemeS,
"CS") == 0 )
4893 if ( strcasecmp(qmBondSchemeS,
"RCD") == 0 )
4895 if ( strcasecmp(qmBondSchemeS,
"Z1") == 0 )
4897 if ( strcasecmp(qmBondSchemeS,
"Z2") == 0 )
4899 if ( strcasecmp(qmBondSchemeS,
"Z3") == 0 )
4907 if (opts.
defined(
"QMPointChargeScheme") && qmPCSwitchOn) {
4908 if ( strcasecmp(qmPCSchemeS,
"none") == 0 )
4911 if ( strcasecmp(qmPCSchemeS,
"round") == 0 )
4913 if ( strcasecmp(qmPCSchemeS,
"zero") == 0 )
4916 if ( qmPCScheme > 1 && ! qmPCSwitchOn)
4917 NAMD_die(
"QM Charge Schemes \'round\' or \'zero\' can only be applied with QMswitching set to \'on\'!");
4929 NAMD_die(
"QM Live Solvent Selection cannot be done with QMNoPntChrg set to \'on\'!") ;
4932 NAMD_die(
"QM Live Solvent Selection cannot be done with fixed bonds!") ;
4934 if (qmLSSFreq % qmPCSelFreq != 0)
4935 NAMD_die(
"Frequency of QM solvent update must be a multiple of frequency of point charge selection.");
4937 if (qmLSSFreq % stepsPerCycle != 0)
4938 NAMD_die(
"Frequency of QM solvent update must be a multiple of steps per cycle.");
4940 if (opts.
defined(
"QMLSSMode") ) {
4941 if ( strcasecmp(qmLSSModeS,
"dist") != 0 &&
4942 strcasecmp(qmLSSModeS,
"COM") != 0 ) {
4943 NAMD_die(
"Available LSS mode options are \'dist\' and \'COM\'.");
4945 if ( strcasecmp(qmLSSModeS,
"dist") == 0 )
4947 else if ( strcasecmp(qmLSSModeS,
"COM") == 0 )
4958 if (opts.
defined(
"QMSwitchingType") ) {
4959 if ( strcasecmp(qmPCSwitchTypeS,
"shift") != 0 &&
4960 strcasecmp(qmPCSwitchTypeS,
"switch") != 0 ) {
4961 NAMD_die(
"Available scaling options are \'shift\' and \'switch\'.");
4963 if ( strcasecmp(qmPCSwitchTypeS,
"shift") == 0 )
4965 else if ( strcasecmp(qmPCSwitchTypeS,
"switch") == 0 )
4972 if (qmNoPC && qmPCSelFreq > 1) {
4973 iout <<
iWARN <<
"QMPCStride being IGNORED since QMNoPntChrg is set to \'on\'!\n" <<
endi;
4977 if (qmNoPC && qmPCSwitchOn)
4978 NAMD_die(
"QM PC switching can only be applied with QMNoPntChrg set to \'off\'!");
4983 if (qmPCSelFreq <= 0)
4984 NAMD_die(
"QMPCFreq can only be a positive number! For static point charge selection, see QMCutomPC.");
4986 if (qmCustomPCSel && qmNoPC)
4987 NAMD_die(
"QM Custom PC Selection is incompatible with QMNoPntChrg!");
4992 if (qmCustomPCSel && qmPCSelFreq > 1)
4993 NAMD_die(
"QM Custom PC Selection is incompatible with QMPCStride > 1!");
4995 if (qmCSMD && (! opts.
defined(
"QMCSMDFile") ))
4996 NAMD_die(
"QM Conditional SMD is ON, but no CSMD configuration file was profided!");
5000 if (CUDASOAintegrateMode) {
5002 CUDASOAintegrate =
TRUE;
5003 SOAintegrateOn =
TRUE;
5006 CUDASOAintegrate =
FALSE;
5009 if (CUDASOAintegrateMode && (minimizeOn || minimizeCGOn)) {
5011 "GPUresident does not support \"minimization\" keyword.\n" 5012 "Instead use \"minimize\" available through Tcl scripting interface." 5016 if (SOAintegrateOn) {
5029 if (testOn || commOnly || statsOn ||
5030 minimizeOn || minimizeCGOn ||
5032 pressureProfileOn ||
5038 langevin_useBAOAB ||
5041 zeroMomentum || zeroMomentumAlt ||
5042 (constraintsOn && ! CUDASOAintegrateMode) ||
5043 (monteCarloPressureOn && ! CUDASOAintegrateMode) ||
5045 (tclForcesOn && (TCL_MAJOR_VERSION<=8 && TCL_MINOR_VERSION <6)) ||
5053 berendsenPressureOn ||
5064 tabulatedEnergies ||
5068 pairInteractionOn ||
5069 #ifdef OPENATOM_VERSION
5085 "%s is incompatible with the following options:\n" 5086 " minimization; pressure profiling; multigrator; Lowe-Andersen;\n" 5087 " fixed atoms; GBIS; LCPO; zero momentum;%s\n" 5088 " temperature coupling, rescaling, or reassignment;\n" 5089 " water models other than TIP3 and TIP4; Drude.\n" 5091 "( Bribe us with coffee to get your feature GPU-Resident! :)",
5092 (CUDASOAintegrateMode ?
"GPUresident" :
"SOAintegrate"),
5093 (CUDASOAintegrateMode ?
"" :
" Monte Carlo pressure control;"),
5094 (CUDASOAintegrateMode ?
"" :
" harmonic restraints;")
5096 char featuremsg[1024];
5097 snprintf(featuremsg,1024,
"\nConfiguration could amend the following options to proceeed :\n");
5098 if(testOn) strncat(featuremsg,
" test\n",1023);
5099 if(commOnly) strncat(featuremsg,
" commOnly\n",1023);
5100 if(statsOn) strncat(featuremsg,
" stats\n",1023);
5101 if(minimizeOn) strncat(featuremsg,
" minimize\n",1023);
5102 if(minimizeCGOn) strncat(featuremsg,
" minimizeCG\n",1023);
5103 if(maximumMove != 0) strncat(featuremsg,
" maximumMove\n",1023);
5104 if(pressureProfileOn) strncat(featuremsg,
" pressureProfile\n",1023);
5105 if(accelMDOn) strncat(featuremsg,
" accelMD\n",1023);
5106 if(adaptTempOn) strncat(featuremsg,
" adaptTemp\n",1023);
5107 if(mollyOn) strncat(featuremsg,
" molly\n",1023);
5108 if(multigratorOn) strncat(featuremsg,
" multigrator\n",1023);
5109 if(loweAndersenOn) strncat(featuremsg,
" loweAndersen\n",1023);
5110 if(langevin_useBAOAB) strncat(featuremsg,
" langevin_useBAOAB\n",1023);
5111 if(fixedAtomsOn) strncat(featuremsg,
" fixedAtoms\n",1023);
5112 if(GBISOn) strncat(featuremsg,
" GBIS\n",1023);
5113 if(LCPOOn) strncat(featuremsg,
" LCPO\n",1023);
5114 if(zeroMomentum) strncat(featuremsg,
" zeroMomentum\n",1023);
5115 if(zeroMomentumAlt) strncat(featuremsg,
" zeroMomentumAlt\n",1023);
5116 if(constraintsOn && ! CUDASOAintegrateMode) strncat(featuremsg,
" constraints\n",1023);
5117 if(monteCarloPressureOn && ! CUDASOAintegrateMode) strncat(featuremsg,
" monteCarloPressure\n",1023);
5118 if(tCoupleOn) strncat(featuremsg,
" tCouple\n",1023);
5119 if(rescaleFreq > 0) strncat(featuremsg,
" rescaleFreq\n",1023);
5120 if(watmodel ==
WaterModel::SWM4) strncat(featuremsg,
" watmodel != SWM4\n",1023);
5121 if(lonepairs) strncat(featuremsg,
" lonepairs\n",1023);
5122 if(drudeOn) strncat(featuremsg,
" drude\n",1023);
5124 if(tclForcesOn && (TCL_MAJOR_VERSION<=8 && TCL_MINOR_VERSION <6))
5126 strncat(featuremsg,
" tclForces supported in GPU resident mode only with TCL newer than 8.6, we recommended 8.6.13, your build has ",1023);
5127 strncat(featuremsg, TCL_PATCH_LEVEL,1023);
5130 if(FMAOn) strncat(featuremsg,
" FMAOn\n",1023);
5131 if(fullDirectOn) strncat(featuremsg,
" fullDirectOn\n",1023);
5132 if(MSMOn) strncat(featuremsg,
" MSMon\n",1023);
5133 if(FMMOn) strncat(featuremsg,
" FMMon\n",1023);
5134 if(globalOn) strncat(featuremsg,
" globalOn\n",1023);
5135 if(dihedralOn) strncat(featuremsg,
" dihedralOn\n",1023);
5136 if(berendsenPressureOn) strncat(featuremsg,
" berendsenPressureOn\n",1023);
5137 if(printBadContacts) strncat(featuremsg,
" printBadContacts\n",1023);
5138 if(freeEnergyOn) strncat(featuremsg,
" freeEnergyOn\n",1023);
5139 if(miscForcesOn) strncat(featuremsg,
" miscForcesOn\n",1023);
5140 if(IMDon) strncat(featuremsg,
" IMDOn\n",1023);
5141 if(TMDOn) strncat(featuremsg,
" TMDOn\n",1023);
5142 if(symmetryOn) strncat(featuremsg,
" symmetryOn\n",1023);
5143 if(qmForcesOn) strncat(featuremsg,
" qmForcesOn\n",1023);
5144 if(sphericalBCOn) strncat(featuremsg,
" sphericalBCOn\n",1023);
5145 if(cylindricalBCOn) strncat(featuremsg,
" cylindricalBCOn\n",1023);
5146 if(extForcesOn) strncat(featuremsg,
" extForcesOn\n",1023);
5147 if(tabulatedEnergies) strncat(featuremsg,
" tabulatedEnergies\n",1023);
5148 if(tclBCOn) strncat(featuremsg,
" tclBCOn\n",1023);
5149 if(lesOn) strncat(featuremsg,
" lesOn\n",1023);
5150 if(goForcesOn) strncat(featuremsg,
" goForcesOn\n",1023);
5151 if(pairInteractionOn) strncat(featuremsg,
" pairInteractionOn\n",1023);
5152 #ifdef OPENATOM_VERSION 5153 if(openatomOn) strncat(featuremsg,
" openatomOn\n",1023);
5155 if(movDragOn) strncat(featuremsg,
" movDragOn\n",1023);
5156 if(rotDragOn) strncat(featuremsg,
" rotDragOn\n",1023);
5157 if(consTorqueOn) strncat(featuremsg,
" consTorqueOn\n",1023);
5158 if(stirOn) strncat(featuremsg,
" stirOn\n",1023);
5159 if(HydrogenBonds) strncat(featuremsg,
" HydrogenBonds\n",1023);
5160 strncat(msg,featuremsg,2047);
5161 if (CUDASOAintegrateMode) {
5167 <<
"Falling back on standard integration code path\n" <<
endi;
5169 SOAintegrateOn =
FALSE;
5172 if (CUDASOAintegrateMode) {
5173 #ifndef NODEGROUP_FORCE_REGISTER 5174 NAMD_die(
"GPUresident not supported on regular multicore builds");
5176 if (monteCarloPressureOn && fixedAtomsOn) {
5177 NAMD_die(
"Monte Carlo barostat is not compatible with fixed atoms in GPU-resident mode.\n");
5180 NAMD_die(
"GPUresident does not support QM forces");
5183 NAMD_die(
"GPUresident does not support " 5184 "locally enhanced sampling");
5187 if(CkNumNodes() > 1){
5190 "GPUresident is a shared-memory, single-process mode of execution.\n" 5191 "You're probably not setting the '++ppn' flags accordingly or\n" 5192 "the Charm++ build is not a multicore build and you're spawning\n" 5193 "multiple processes, which is not cool." 5196 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5201 NAMD_die(
"SMD is not compatible with multi-GPU GPUresident");
5204 if(monteCarloPressureOn){
5205 NAMD_die(
"Monte Carlo barostat is not compatible with multi-GPU GPUresident");
5211 <<
"Running with GPU-resident mode\n" 5217 NAMD_die(
"SOAintegrate is not fully supported. Please use GPUresident instead.");
5222 if (!CUDASOAintegrateMode && monteCarloPressureOn) {
5223 NAMD_die(
"GPUresident is required for Monte Carlo pressure control. \n");
5226 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5227 if (CUDASOAintegrateMode) {
5228 if (bondedCUDA != 255) {
5229 iout <<
iWARN <<
"GPUresident cannot delegate the bonded calculations to CPU (bondedGPU != 255).\n";
5230 iout <<
iWARN <<
"Will reset bondedGPU to 255.\n";
5236 if ( useCUDAdisable ) {
5237 if ( drudeOn && (bondedCUDA & 0x0001) ) {
5239 bondedCUDA &= ~0x0001;
5240 iout <<
iWARN <<
"Disabling GPU kernel for bonds due to incompatibility with Drude oscillators.\n";
5242 if ( accelMDOn && (accelMDdihe || accelMDdual) && (bondedCUDA & (0x0004 | 0x0020)) ) {
5244 bondedCUDA &= ~(0x0004 | 0x0020);
5245 iout <<
iWARN <<
"Disabling GPU kernels for dihedrals and crossterms due to incompatibility with accelerated MD options.\n";
5249 if ( alchOn || !switchingActive || vdwForceSwitching || martiniSwitching || !PMEOn ||
5250 longSplitting!=
C1 || scale14!=1.0 || limitDist > 0.0) {
5251 useCUDANonbondedForceTable =
TRUE;
5252 iout <<
iWARN <<
"Always using force tables for GPU nonbonded kernel due to unsupported config parameters.\n";
5255 if (useDeviceMigration && !CUDASOAintegrateMode) {
5256 useDeviceMigration =
FALSE;
5257 iout <<
iWARN <<
"GPUAtomMigration is only supported for GPUresident. Disabling GPUAtomMigration.\n";
5260 if ( useDeviceMigration ) {
5261 if (constraintsOn || SMDOn || groupRestraintsOn || eFieldOn || fixedAtomsOn || monteCarloPressureOn ||
5262 tclForcesOn || colvarsOn || gridforceOn || mgridforceOn || consForceOn || useCudaGlobal ) {
5263 updateAtomMap =
TRUE;
5268 NAMD_die(
"Fixed atoms are not supported in GPUAtomMigration.\n");
5271 if ( useDeviceMigration ) {
5272 iout <<
iWARN <<
"GPUAtomMigration is experimental\n";
5277 #ifdef NAMD_AVXTILES 5278 if (avxTilesCommandLineDisable) useAVXTiles =
FALSE;
5280 if (alchOn || lesOn || tabulatedEnergies || drudeOn || goForcesOn ||
5281 pressureProfileOn || qmForcesOn) {
5282 useAVXTiles =
FALSE;
5283 iout <<
iWARN <<
"Disabling AVX tiles optimizations due to " 5284 <<
"incompatible simulation params.\n";
5288 useAVXTiles =
FALSE;
5300 iout <<
iINFO <<
"SIMULATION PARAMETERS:\n";
5302 iout <<
iINFO <<
"NUMBER OF STEPS " << N <<
"\n";
5303 iout <<
iINFO <<
"STEPS PER CYCLE " << stepsPerCycle <<
"\n";
5306 if ( lattice.a_p() || lattice.b_p() || lattice.c_p() ) {
5307 if ( lattice.a_p() )
5308 iout <<
iINFO <<
"PERIODIC CELL BASIS 1 " << lattice.a() <<
"\n";
5309 if ( lattice.b_p() )
5310 iout <<
iINFO <<
"PERIODIC CELL BASIS 2 " << lattice.b() <<
"\n";
5311 if ( lattice.c_p() )
5312 iout <<
iINFO <<
"PERIODIC CELL BASIS 3 " << lattice.c() <<
"\n";
5313 iout <<
iINFO <<
"PERIODIC CELL CENTER " << lattice.origin() <<
"\n";
5315 iout <<
iINFO <<
"WRAPPING WATERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
5318 iout <<
iINFO <<
"WRAPPING ALL CLUSTERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
5321 iout <<
iINFO <<
"WRAPPING TO IMAGE NEAREST TO PERIODIC CELL CENTER.\n";
5326 if ( CkNumPes() > 512 ) ldbUnloadOne =
TRUE;
5327 if ( ldbUnloadOne || CkNumPes() > 128 ) ldbUnloadZero =
TRUE;
5339 iout <<
iINFO <<
"LOAD BALANCING STRATEGY New Load Balancers -- DEFAULT\n";
5341 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Refinement Only\n";
5343 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Comprehensive\n";
5345 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Old Load Balancers\n";
5348 iout <<
iINFO <<
"LDB PERIOD " << ldbPeriod <<
" steps\n";
5349 iout <<
iINFO <<
"FIRST LDB TIMESTEP " << firstLdbStep <<
"\n";
5351 iout <<
iINFO <<
"HYBRIDLB GROUP SIZE " << hybridGroupSize <<
"\n";
5352 iout <<
iINFO <<
"LAST LDB TIMESTEP " << lastLdbStep <<
"\n";
5353 if ( ldbRelativeGrainsize > 0. )
5354 iout <<
iINFO <<
"LDB RELATIVE GRAINSIZE " << ldbRelativeGrainsize <<
"\n";
5355 iout <<
iINFO <<
"LDB BACKGROUND SCALING " << ldbBackgroundScaling <<
"\n";
5356 iout <<
iINFO <<
"HOM BACKGROUND SCALING " << ldbHomeBackgroundScaling <<
"\n";
5358 iout <<
iINFO <<
"PME BACKGROUND SCALING " 5359 << ldbPMEBackgroundScaling <<
"\n";
5361 iout <<
iINFO <<
"REMOVING LOAD FROM PME NODES" <<
"\n";
5363 if ( ldbUnloadZero )
iout <<
iINFO <<
"REMOVING LOAD FROM NODE 0\n";
5364 if ( ldbUnloadOne )
iout <<
iINFO <<
"REMOVING LOAD FROM NODE 1\n";
5365 if ( ldbUnloadOutputPEs )
iout <<
iINFO <<
"REMOVING LOAD FROM OUTPUT PES\n";
5369 if ( ldbUnloadOne || CkNumPes() > 256 ) noPatchesOnOne =
TRUE;
5370 if ( ldbUnloadZero || noPatchesOnOne ||
5371 CkNumPes() > 64 || ( IMDon && CkNumPes() > 8 ) ) {
5372 noPatchesOnZero =
TRUE;
5374 if ( (noPatchesOnZero || noPatchesOnOne) && CUDASOAintegrateMode ) {
5375 noPatchesOnZero =
FALSE;
5376 noPatchesOnOne =
FALSE;
5377 iout <<
iWARN <<
"OVERRIDING NOPATCH SETTING. Not supported with GPUresident on\n";
5379 if ( noPatchesOnZero )
iout <<
iINFO <<
"REMOVING PATCHES FROM PROCESSOR 0\n";
5380 if ( noPatchesOnOne )
iout <<
iINFO <<
"REMOVING PATCHES FROM PROCESSOR 1\n";
5383 #if defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC) 5384 maxSelfPart = maxPairPart = 1;
5388 iout <<
iINFO <<
"MAX SELF PARTITIONS " << maxSelfPart <<
"\n" 5389 <<
iINFO <<
"MAX PAIR PARTITIONS " << maxPairPart <<
"\n" 5390 <<
iINFO <<
"SELF PARTITION ATOMS " << numAtomsSelf <<
"\n" 5391 <<
iINFO <<
"SELF2 PARTITION ATOMS " << numAtomsSelf2 <<
"\n" 5392 <<
iINFO <<
"PAIR PARTITION ATOMS " << numAtomsPair <<
"\n" 5393 <<
iINFO <<
"PAIR2 PARTITION ATOMS " << numAtomsPair2 <<
"\n";
5395 iout <<
iINFO <<
"MIN ATOMS PER PATCH " << minAtomsPerPatch <<
"\n" 5396 <<
iINFO <<
"EMPTY PATCH LOAD " << emptyPatchLoad <<
" ATOMS\n" 5399 if (initialTemp < 0)
5401 current = config->
find(
"velocities");
5403 if (current == NULL)
5405 current = config->
find(
"binvelocities");
5413 << initialTemp <<
"\n";
5417 iout <<
iINFO <<
"CENTER OF MASS MOVING INITIALLY? ";
5429 if ( zeroMomentum ) {
5430 iout <<
iINFO <<
"REMOVING CENTER OF MASS DRIFT DURING SIMULATION";
5431 if ( zeroMomentumAlt )
iout <<
" (ALT METHOD)";
5436 << dielectric <<
"\n";
5438 if ( nonbondedScaling != 1.0 )
5440 iout <<
iINFO <<
"NONBONDED SCALING " << nonbondedScaling <<
"\n" <<
endi;
5453 iout <<
"ONETHREE\n";
5456 iout <<
"ONE-FOUR\n";
5459 iout <<
"SCALED ONE-FOUR\n";
5466 iout <<
iINFO <<
"1-4 ELECTROSTATICS SCALED BY " << scale14 <<
"\n";
5467 iout <<
iINFO <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE USED\n" <<
endi;
5469 iout <<
iWARN <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE IGNORED\n" <<
endi;
5472 #ifdef SPEC_DISABLED_VERSION 5473 if (dcdFrequency > 0) {
5475 iout <<
iWARN <<
"DCD TRAJECTORY OUTPUT IS DISABLED IN SPEC RELEASE\n";
5479 if (dcdFrequency > 0)
5482 << dcdFilename <<
"\n";
5484 << dcdFrequency <<
"\n";
5486 << ( ((firstTimestep + dcdFrequency)/dcdFrequency)*dcdFrequency ) <<
"\n";
5487 if ( dcdUnitCell ) {
5488 iout <<
iINFO <<
"DCD FILE WILL CONTAIN UNIT CELL DATA\n";
5493 iout <<
iINFO <<
"NO DCD TRAJECTORY OUTPUT\n";
5497 if (xstFrequency > 0)
5500 << xstFilename <<
"\n";
5502 << xstFrequency <<
"\n";
5506 iout <<
iINFO <<
"NO EXTENDED SYSTEM TRAJECTORY OUTPUT\n";
5510 if (velDcdFrequency > 0)
5512 iout <<
iINFO <<
"VELOCITY DCD FILENAME " 5513 << velDcdFilename <<
"\n";
5514 iout <<
iINFO <<
"VELOCITY DCD FREQUENCY " 5515 << velDcdFrequency <<
"\n";
5516 iout <<
iINFO <<
"VELOCITY DCD FIRST STEP " 5517 << ( ((firstTimestep + velDcdFrequency)/velDcdFrequency)*velDcdFrequency ) <<
"\n";
5521 iout <<
iINFO <<
"NO VELOCITY DCD OUTPUT\n";
5525 if (forceDcdFrequency > 0)
5528 << forceDcdFilename <<
"\n";
5530 << forceDcdFrequency <<
"\n";
5531 iout <<
iINFO <<
"FORCE DCD FIRST STEP " 5532 << ( ((firstTimestep + forceDcdFrequency)/forceDcdFrequency)*forceDcdFrequency ) <<
"\n";
5536 iout <<
iINFO <<
"NO FORCE DCD OUTPUT\n";
5541 << outputFilename <<
"\n" <<
endi;
5544 iout <<
iINFO <<
"BINARY OUTPUT FILES WILL BE USED\n" <<
endi;
5546 #ifdef MEM_OPT_VERSION 5548 iout <<
iWARN <<
"SINCE MEMORY OPTIMIZED VERSION IS USED, OUTPUT IN TEXT FORMAT IS DISABLED!\n" <<
endi;
5549 binaryOutput =
TRUE;
5553 if (! restartFrequency)
5560 << restartFilename <<
"\n";
5562 << restartFrequency <<
"\n";
5564 iout <<
iINFO <<
"RESTART FILES WILL NOT BE OVERWRITTEN\n";
5566 if (restartSaveDcd) {
5567 iout <<
iINFO <<
"DCD FILE WILL BE SPLIT WHEN RESTART FILES ARE WRITTEN\n";
5572 iout <<
iINFO <<
"BINARY RESTART FILES WILL BE USED\n";
5577 if (switchingActive)
5580 if ( vdwForceSwitching ) {
5581 iout <<
iINFO <<
"VDW FORCE SWITCHING ACTIVE\n";
5583 if ( martiniSwitching ) {
5584 iout <<
iINFO <<
"MARTINI RESIDUE-BASED COARSE-GRAIN SWITCHING ACTIVE\n";
5587 << switchingDist <<
"\n";
5597 iout <<
iINFO <<
"PAIRLIST DISTANCE " << pairlistDist <<
"\n";
5598 iout <<
iINFO <<
"PAIRLIST SHRINK RATE " << pairlistShrink <<
"\n";
5599 iout <<
iINFO <<
"PAIRLIST GROW RATE " << pairlistGrow <<
"\n";
5600 iout <<
iINFO <<
"PAIRLIST TRIGGER " << pairlistTrigger <<
"\n";
5601 iout <<
iINFO <<
"PAIRLISTS PER CYCLE " << pairlistsPerCycle <<
"\n";
5602 if ( outputPairlists )
5603 iout <<
iINFO <<
"PAIRLIST OUTPUT STEPS " << outputPairlists <<
"\n";
5606 if ( pairlistMinProcs > 1 )
5607 iout <<
iINFO <<
"REQUIRING " << pairlistMinProcs <<
" PROCESSORS FOR PAIRLISTS\n";
5608 usePairlists = ( CkNumPes() >= pairlistMinProcs );
5610 #ifdef OPENATOM_VERSION 5613 iout <<
iINFO <<
"OPENATOM QM/MM CAR-PARINELLO ACTIVE\n";
5614 iout <<
iINFO <<
"OPENATOM CONFIG FILE: " << openatomConfig <<
"\n";
5615 iout <<
iINFO <<
"OPENATOM STRUCT FILE: " << openatomStruct <<
"\n";
5616 iout <<
iINFO <<
"OPENATOM PDB FILE: " << openatomPDB <<
"\n";
5618 #endif // OPENATOM_VERSION 5621 if ( (alchOn) && (!usePairlists)) {
5622 NAMD_die(
"Sorry, Alchemical simulations require pairlists to be enabled\n");
5624 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5625 if ( ! usePairlists ) {
5627 iout <<
iINFO <<
"GPU ACCELERATION REQUIRES PAIRLISTS\n";
5631 iout <<
iINFO <<
"PAIRLISTS " << ( usePairlists ?
"ENABLED" :
"DISABLED" )
5634 iout <<
iINFO <<
"MARGIN " << margin <<
"\n";
5635 if ( margin > 4.0 ) {
5636 iout <<
iWARN <<
"MARGIN IS UNUSUALLY LARGE AND WILL LOWER PERFORMANCE\n";
5637 BigReal f = patchDimension/(patchDimension-margin);
5639 iout <<
iWARN <<
"MARGIN INCREASED PATCH VOLUME BY A FACTOR OF " << f <<
"\n";
5643 iout <<
iINFO <<
"HYDROGEN GROUP CUTOFF " << hgroupCutoff <<
"\n";
5647 << patchDimension <<
"\n";
5651 if (outputEnergies != 1)
5654 << outputEnergies <<
"\n";
5658 if (!opts.
defined(
"computeEnergies")) {
5659 computeEnergies = outputEnergies;
5662 if (computeEnergies != 1)
5666 if (outputEnergies % computeEnergies != 0) {
5667 const std::string err_msg = std::string{
"The period of outputting energies (outputEnergies = "}
5668 + std::to_string(outputEnergies)
5669 + std::string{
") is not a multiple of the period of computing energies (computeEnergies = "}
5670 + std::to_string(computeEnergies)
5671 + std::string{
").\n"};
5674 if (alchOn && (alchOutFreq % computeEnergies != 0)) {
5676 const std::string err_msg = std::string{
"The period of outputting energies relating to alchemical transformations (alchOutFreq = "}
5677 + std::to_string(alchOutFreq)
5678 + std::string{
") is not a multiple of the period of computing energies (computeEnergies = "}
5679 + std::to_string(computeEnergies)
5680 + std::string{
"). If alchOutFreq is smaller than outputEnergies and computeEnergies is not defined, a better solution is to set computeEnergies explicitly and keep it the same as alchOutFreq. The simulation will use the greatest common divisor of computeEnergies and alchOutFreq as the period of energy evaluation.\n"};
5684 iout <<
iINFO <<
"ENERGY EVALUATION STEPS " 5685 << computeEnergies <<
"\n";
5689 iout <<
iINFO <<
"OUTPUT ENERGY PRECISION " << outputEnergiesPrecision <<
"\n";
5691 if (mergeCrossterms) {
5692 iout <<
iINFO <<
"CROSSTERM ENERGY INCLUDED IN DIHEDRAL\n" <<
endi;
5695 if (outputMomenta != 0)
5697 iout <<
iINFO <<
"MOMENTUM OUTPUT STEPS " 5698 << outputMomenta <<
"\n";
5702 if (outputTiming != 0)
5705 << outputTiming <<
"\n";
5709 if (outputCudaTiming != 0)
5711 iout <<
iINFO <<
"GPU TIMING OUTPUT STEPS " 5712 << outputCudaTiming <<
"\n";
5716 if (outputPressure != 0)
5718 iout <<
iINFO <<
"PRESSURE OUTPUT STEPS " 5719 << outputPressure <<
"\n";
5725 iout <<
iINFO <<
"FIXED ATOMS ACTIVE\n";
5726 if ( fixedAtomsForces )
5727 iout <<
iINFO <<
"FORCES BETWEEN FIXED ATOMS ARE CALCULATED\n";
5733 iout <<
iINFO <<
"HARMONIC CONSTRAINTS ACTIVE\n";
5736 << constraintExp <<
"\n";
5738 if (constraintScaling != 1.0) {
5739 iout <<
iINFO <<
"HARMONIC CONS SCALING " 5740 << constraintScaling <<
"\n";
5745 if (selectConstraintsOn) {
5746 iout <<
iINFO <<
"SELECTED CARTESIAN COMPONENTS OF HARMONIC RESTRAINTS ACTIVE\n";
5749 iout <<
iINFO <<
"RESTRAINING X-COMPONENTS OF CARTESIAN COORDINATES!\n";
5752 iout <<
iINFO <<
"RESTRAINING Y-COMPONENTS OF CARTESIAN COORDINATES!\n";
5755 iout <<
iINFO <<
"RESTRAINING Z-COMPONENTS OF CARTESIAN COORDINATES!\n";
5759 if (sphericalConstraintsOn) {
5760 iout <<
iINFO <<
"SPHERICAL HARMONIC CONSTRAINTS ACTIVE\n";
5761 iout <<
iINFO <<
"RESTRAINING DISTANCE TO " << sphericalConstrCenter <<
"\n";
5767 if (movingConstraintsOn) {
5768 iout <<
iINFO <<
"MOVING HARMONIC CONSTRAINTS ACTIVE\n";
5770 iout <<
iINFO <<
"MOVING CONSTRAINT VELOCITY " 5771 << movingConsVel <<
" ANGSTROM/TIMESTEP\n";
5773 iout <<
iINFO <<
"ALL CONSTRAINED ATOMS WILL MOVE\n";
5780 if (rotConstraintsOn) {
5781 iout <<
iINFO <<
"ROTATING HARMONIC CONSTRAINTS ACTIVE\n";
5784 << rotConsAxis <<
"\n";
5787 << rotConsPivot <<
"\n";
5789 iout <<
iINFO <<
"ROTATING CONSTRAINT VELOCITY " 5790 << rotConsVel <<
" DEGREES/TIMESTEP\n";
5798 iout <<
iINFO <<
"MOVING DRAG ACTIVE.\n";
5800 iout <<
iINFO <<
"MOVING DRAG MAIN PDB FILE " 5801 << movDragFile <<
"\n";
5803 iout <<
iINFO <<
"MOVING DRAG GLOBAL VELOCITY (A/step) " 5804 << movDragGlobVel <<
"\n";
5806 iout <<
iINFO <<
"MOVING DRAG LINEAR VELOCITY FILE " 5807 << movDragVelFile <<
"\n";
5814 iout <<
iINFO <<
"ROTATING DRAG ACTIVE.\n";
5816 iout <<
iINFO <<
"ROTATING DRAG MAIN PDB FILE " 5817 << rotDragFile <<
"\n";
5819 iout <<
iINFO <<
"ROTATING DRAG AXIS FILE " 5820 << rotDragAxisFile <<
"\n";
5822 iout <<
iINFO <<
"ROTATING DRAG PIVOT POINT FILE " 5823 << rotDragPivotFile <<
"\n";
5825 iout <<
iINFO <<
"ROTATING DRAG GLOBAL ANGULAR VELOCITY (deg/step) " 5826 << rotDragGlobVel <<
"\n";
5828 iout <<
iINFO <<
"ROTATING DRAG ANGULAR VELOCITY FILE " 5829 << rotDragVelFile <<
"\n";
5837 iout <<
iINFO <<
"\"CONSTANT\" TORQUE ACTIVE.\n";
5839 iout <<
iINFO <<
"\"CONSTANT\" TORQUE MAIN PDB FILE " 5840 << consTorqueFile <<
"\n";
5842 iout <<
iINFO <<
"\"CONSTANT\" TORQUE AXIS FILE " 5843 << consTorqueAxisFile <<
"\n";
5845 iout <<
iINFO <<
"\"CONSTANT\" TORQUE PIVOT POINT FILE " 5846 << consTorquePivotFile <<
"\n";
5848 iout <<
iINFO <<
"\"CONSTANT\" TORQUE GLOBAL VALUE (Kcal/(mol*A^2)) " 5849 << consTorqueGlobVal <<
"\n";
5851 iout <<
iINFO <<
"\"CONSTANT\" TORQUE DACTORS FILE " 5852 << consTorqueValFile <<
"\n";
5859 iout <<
iINFO <<
" Please include this reference in published work using\n";
5860 iout <<
iINFO <<
" the Gridforce module of NAMD: David Wells, Volha Abramkina,\n";
5861 iout <<
iINFO <<
" and Aleksei Aksimentiev, J. Chem. Phys. 127:125101-10 (2007).\n";
5862 print_mgrid_params();
5865 if (groupRestraintsOn) {
5866 iout <<
iINFO <<
"GROUP RESTRAINTS ACTIVE\n";
5867 groupRestraints.PrintGroupRestraints();
5876 << SMDVel <<
" ANGSTROM/TIMESTEP\n";
5887 iout <<
iINFO <<
"SMD OUTPUT FREQUENCY " 5888 << SMDOutputFreq <<
" TIMESTEPS\n";
5890 iout <<
iINFO <<
"SMD FILE " << SMDFile <<
"\n";
5898 iout <<
iINFO <<
"TMD ACTIVE BETWEEN STEPS " << TMDFirstStep
5899 <<
" and " << TMDLastStep <<
"\n";
5900 iout <<
iINFO <<
"TMD K " << TMDk <<
"\n";
5901 iout <<
iINFO <<
"TMD FILE " << TMDFile <<
"\n";
5902 iout <<
iINFO <<
"TMD OUTPUT FREQUENCY " << TMDOutputFreq <<
"\n";
5903 if (TMDInitialRMSD) {
5904 iout <<
iINFO <<
"TMD TARGET RMSD AT FIRST STEP " << TMDInitialRMSD <<
"\n";
5906 iout <<
iINFO <<
"TMD TARGET RMSD AT FIRST STEP COMPUTED FROM INITIAL COORDINATES\n";
5908 iout <<
iINFO <<
"TMD TARGET RMSD AT FINAL STEP " << TMDFinalRMSD <<
"\n";
5913 if (symmetryLastStep == -1){
5914 iout <<
iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " <<
"INFINITY" <<
"\n";
5917 iout <<
iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " << symmetryLastStep <<
"\n";
5921 current = config->
find(
"symmetryFile");
5922 for ( ; current; current = current->
next ) {
5926 current = config->
find(
"symmetryMatrixFile");
5927 for ( ; current; current = current->
next ) {
5928 iout <<
iINFO <<
"SYMMETRY MATRIX FILE " << current->
data <<
"\n";
5930 iout <<
iINFO <<
"SYMMETRY FORCE CONSTANT " << symmetryk <<
"\n";
5931 if (symmetryScaleForces){
5932 iout <<
iINFO <<
"SYMMETRY SCALE FORCES ON\n";
5934 iout <<
iINFO <<
"SYMMETRY FIRST FULL STEP " << symmetryFirstFullStep <<
"\n";
5935 if (symmetryLastFullStep == -1){
5936 iout <<
iINFO <<
"SYMMETRY LAST FULL STEP " <<
"INFINITY" <<
"\n";
5940 iout <<
iINFO <<
"SYMMETRY LAST FULL STEP " << symmetryLastFullStep <<
"\n";
5953 iout <<
iINFO <<
"FEP CURRENT LAMBDA VALUE " 5954 << alchLambda <<
"\n";
5955 iout <<
iINFO <<
"FEP COMPARISON LAMBDA VALUE " 5956 << alchLambda2 <<
"\n";
5957 if (alchLambdaIDWS >= 0.) {
5958 iout <<
iINFO <<
"FEP ALTERNATE COMPARISON LAMBDA VALUE " 5959 << alchLambdaIDWS <<
"\n";
5961 if (alchLambdaFreq > 0) {
5962 iout <<
iINFO <<
"FEP CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY " 5963 << alchLambdaFreq <<
" STEPS\n";
5965 if (!alchDecouple) {
5966 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 5969 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 5972 if (alchBondDecouple) {
5973 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 5976 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 5980 iout <<
iINFO <<
"FEP WEEKS-CHANDLER-ANDERSEN (WCA) VDW DECOUPLING " 5983 iout <<
iINFO <<
"FEP VDW SHIFTING COEFFICIENT " 5984 << alchVdwShiftCoeff <<
"\n";
5986 iout <<
iINFO <<
"FEP ELEC. ACTIVE FOR ANNIHILATED " 5987 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 5988 << (1 - alchElecLambdaStart) <<
"\n";
5989 iout <<
iINFO <<
"FEP ELEC. ACTIVE FOR EXNIHILATED " 5990 <<
"PARTICLES BETWEEN LAMBDA = " 5991 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
5993 iout <<
iINFO <<
"FEP VDW-REPU. ACTIVE FOR ANNIHILATED PARTICLES " 5994 <<
"BETWEEN LAMBDA = " << (1 - alchRepLambdaEnd) <<
" AND LAMBDA " 5996 iout <<
iINFO <<
"FEP VDW-REPU. ACTIVE FOR EXNIHILATED PARTICLES " 5997 <<
"BETWEEN LAMBDA = 0 AND LAMBDA " << alchRepLambdaEnd <<
"\n";
5998 iout <<
iINFO <<
"FEP VDW-ATTR. ACTIVE FOR ANNIHILATED PARTICLES " 5999 <<
"BETWEEN LAMBDA = " << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = " 6000 << (1 - alchRepLambdaEnd) <<
"\n";
6001 iout <<
iINFO <<
"FEP VDW-ATTR. ACTIVE FOR EXNIHILATED PARTICLES " 6002 <<
"BETWEEN LAMBDA = " << alchRepLambdaEnd <<
" AND LAMBDA = " 6003 << alchVdwLambdaEnd <<
"\n";
6005 iout <<
iINFO <<
"FEP VDW ACTIVE FOR ANNIHILATED " 6006 <<
"PARTICLES BETWEEN LAMBDA = " 6007 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
6008 iout <<
iINFO <<
"FEP VDW ACTIVE FOR EXNIHILATED " 6009 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6010 << alchVdwLambdaEnd <<
"\n";
6012 iout <<
iINFO <<
"FEP BOND ACTIVE FOR ANNIHILATED " 6013 <<
"PARTICLES BETWEEN LAMBDA = " 6014 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
6015 iout <<
iINFO <<
"FEP BOND ACTIVE FOR EXNIHILATED " 6016 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6017 << alchBondLambdaEnd <<
"\n";
6023 iout <<
iINFO <<
"THERMODYNAMIC INTEGRATION (TI) ON\n";
6025 << alchLambda <<
"\n";
6026 if (alchLambdaFreq > 0) {
6027 iout <<
iINFO <<
"TI COMPARISON LAMBDA VALUE " 6028 << alchLambda2 <<
"\n";
6029 iout <<
iINFO <<
"TI CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY " 6030 << alchLambdaFreq <<
" STEPS\n";
6032 if (!alchDecouple) {
6033 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6036 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6039 if (alchBondDecouple) {
6040 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6043 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6046 iout <<
iINFO <<
"TI VDW SHIFTING COEFFICIENT " 6047 << alchVdwShiftCoeff <<
"\n";
6048 iout <<
iINFO <<
"TI ELEC. ACTIVE FOR ANNIHILATED " 6049 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6050 << (1 - alchElecLambdaStart) <<
"\n";
6051 iout <<
iINFO <<
"TI ELEC. ACTIVE FOR EXNIHILATED " 6052 <<
"PARTICLES BETWEEN LAMBDA = " 6053 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
6054 iout <<
iINFO <<
"TI VDW ACTIVE FOR ANNIHILATED " 6055 <<
"PARTICLES BETWEEN LAMBDA = " 6056 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
6057 iout <<
iINFO <<
"TI VDW ACTIVE FOR EXNIHILATED " 6058 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6059 << alchVdwLambdaEnd <<
"\n";
6060 iout <<
iINFO <<
"TI BOND ACTIVE FOR ANNIHILATED " 6061 <<
"PARTICLES BETWEEN LAMBDA = " 6062 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
6063 iout <<
iINFO <<
"TI BOND ACTIVE FOR EXNIHILATED " 6064 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6065 << alchBondLambdaEnd <<
"\n";
6070 iout <<
iINFO <<
"LOCALLY ENHANCED SAMPLING ACTIVE\n";
6071 iout <<
iINFO <<
"LOCAL ENHANCEMENT FACTOR IS " 6072 << lesFactor <<
"\n";
6074 <<
"SCALING ENHANCED ATOM TEMPERATURE BY 1/" << lesFactor <<
"\n";
6076 <<
"SCALING ENHANCED ATOM MASS BY 1/" << lesFactor <<
"\n";
6079 if ( singleTopology ) {
6080 iout <<
iINFO <<
"SINGLE TOPOLOGY IS ON FOR RELATIVE FREE ENERGY CALCULATION\n";
6084 if ( soluteScalingOn ) {
6085 iout <<
iINFO <<
"SOLUTE SCALING IS ACTIVE\n";
6086 if (soluteScalingFactorCharge != soluteScalingFactorVdw) {
6087 iout <<
iINFO <<
"SCALING FOR ELECTROSTATIC INTERACTIONS IS " 6088 << soluteScalingFactorCharge <<
"\n";
6089 iout <<
iINFO <<
"SCALING FOR VAN DER WAALS INTERACTIONS IS " 6090 << soluteScalingFactorVdw <<
"\n";
6091 iout <<
iINFO <<
"SCALING FOR BONDED INTERACTIONS IS " 6092 << soluteScalingFactor <<
"\n";
6095 iout <<
iINFO <<
"SOLUTE SCALING FACTOR IS " 6096 << soluteScalingFactor <<
"\n";
6098 if ( ! soluteScalingAll ) {
6099 iout <<
iINFO <<
"SOLUTE SCALING DISABLED FOR BONDS AND ANGLES\n";
6103 if ( pairInteractionOn ) {
6104 iout <<
iINFO <<
"PAIR INTERACTION CALCULATIONS ACTIVE\n";
6105 iout <<
iINFO <<
"USING FLAG " << pairInteractionGroup1
6106 <<
" FOR GROUP 1\n";
6107 if (pairInteractionSelf) {
6108 iout <<
iINFO <<
"COMPUTING ONLY SELF INTERACTIONS FOR GROUP 1 ATOMS\n";
6110 iout <<
iINFO <<
"USING FLAG " << pairInteractionGroup2
6111 <<
" FOR GROUP 2\n";
6116 iout <<
iINFO <<
"CONSTANT FORCE ACTIVE\n";
6117 if ( consForceScaling != 1.0 ) {
6118 iout <<
iINFO <<
"CONSTANT FORCE SCALING " 6119 << consForceScaling <<
"\n" <<
endi;
6127 iout <<
iINFO <<
"EXTERNAL COMMAND FORCES ACTIVE\n";
6128 iout <<
iINFO <<
"EXT FORCES COMMAND: " << extForcesCommand <<
"\n";
6129 iout <<
iINFO <<
"EXT COORD FILENAME: " << extCoordFilename <<
"\n";
6130 iout <<
iINFO <<
"EXT FORCE FILENAME: " << extForceFilename <<
"\n";
6138 if (qmParamPDBDefined){
6139 iout <<
iINFO <<
"QM PDB PARAMETER FILE: " << qmParamPDB <<
"\n";
6141 iout <<
iINFO <<
"QM SOFTWARE: " << qmSoftware <<
"\n";
6144 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: NONE\n";
6146 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: MULLIKEN\n";
6148 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: CHELPG\n";
6150 iout <<
iINFO <<
"QM EXECUTABLE PATH: " << qmExecPath <<
"\n";
6151 iout <<
iINFO <<
"QM COLUMN: " << qmColumn <<
"\n";
6153 iout <<
iINFO <<
"QM WILL DETECT BONDS BETWEEN QM AND MM ATOMS.\n";
6156 iout <<
iINFO <<
"QM BONDS WILL BE GUESSED FROM TOPOLOGY AND QM REGIONS.\n";
6158 if (qmBondColumnDefined) {
6159 iout <<
iINFO <<
"QM BOND COLUMN: " << qmBondColumn <<
"\n";
6162 iout <<
iINFO <<
"QM BOND COLUMN WILL DEFINE LINK AOTM DISTANCE.\n";
6163 if (qmBondValType == 1)
6164 iout <<
iINFO <<
"QM BOND COLUMN HAS LENGTH INFORMATION.\n";
6165 else if (qmBondValType == 2)
6166 iout <<
iINFO <<
"QM BOND COLUMN HAS RATIO INFORMATION.\n";
6169 iout <<
iINFO <<
"MECHANICHAL EMBEDDING SELECTED." 6170 " BOND SCHEME WILL BE IGNORED!\n" <<
endi;
6175 iout <<
iINFO <<
"QM-MM BOND SCHEME: Charge Shift.\n";
6177 iout <<
iINFO <<
"QM-MM BOND SCHEME: Redistributed Charge and Dipole.\n";
6179 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z1.\n";
6181 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z2.\n";
6183 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z3.\n";
6188 if (qmChrgFromPSF) {
6189 iout <<
iINFO <<
"QM Will use PSF charges.\n";
6192 iout <<
iINFO <<
"QM BASE DIRECTORY: " << qmBaseDir <<
"\n";
6195 iout <<
iINFO <<
"QM PREPARATION PROCESS: " << qmPrepProc <<
"\n";
6198 iout <<
iINFO <<
"QM SECONDARY PROCESS: " << qmSecProc <<
"\n";
6201 current = config->
find(
"QMConfigLine");
6202 for ( ; current; current = current->
next ) {
6204 if ( strstr(current->
data,
"\n") ) {
6205 iout <<
iINFO <<
"QM configuration lines from NADM config file\n";
6209 iout <<
iINFO <<
"QM CONFIG LINE: " << current->
data <<
"\n";
6214 iout <<
iINFO <<
"QM FORCES WILL REPLACE ALL NAMD FORCES!\n";
6218 iout <<
iINFO <<
"QM NO POINT CHARGE: ON.\n";
6221 iout <<
iINFO <<
"QM CUSTOM POINT CHARGE SELECTION IS ACTIVATED\n";
6223 if (! qmNoPC && ! qmCustomPCSel)
6224 iout <<
iINFO <<
"QM POINT CHARGES WILL BE SELECTED EVERY " 6225 << qmPCSelFreq <<
" STEPS.\n";
6228 iout <<
iINFO <<
"QM Point Charge Switching: ON.\n";
6230 if (qmPCScheme == 1)
6231 iout <<
iINFO <<
"QM Point Charge SCHEME: none.\n";
6232 else if (qmPCScheme == 2)
6233 iout <<
iINFO <<
"QM Point Charge SCHEME: round.\n";
6234 else if (qmPCScheme == 3)
6235 iout <<
iINFO <<
"QM Point Charge SCHEME: zero.\n";
6239 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION IS ACTIVE.\n" ;
6240 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION FREQUENCY: " 6241 << qmLSSFreq <<
"\n" <<
endi;
6243 current = config->
find(
"QMLSSSize");
6244 for ( ; current; current = current->
next ) {
6245 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION SIZE (\"qmGrpID numMolecules\"): " << current->
data <<
"\n";
6248 if (! opts.
defined(
"QMLWSResname"))
6249 strcpy(qmLSSResname,
"TIP3");
6250 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION WILL USE RESIDUE TYPE: " << qmLSSResname <<
"\n" <<
endi;
6253 iout <<
iINFO <<
"QM executions per node: " << qmSimsPerNode <<
"\n";
6263 iout <<
iINFO<<
"GBIS GENERALIZED BORN IMPLICIT SOLVENT ACTIVE (SERIAL)\n";
6266 iout <<
iINFO <<
"GBIS GENERALIZED BORN IMPLICIT SOLVENT ACTIVE\n";
6268 if (GBISOn || GBISserOn) {
6269 iout <<
iINFO <<
"GBIS SOLVENT DIELECTRIC: " << solvent_dielectric<<
"\n";
6270 iout <<
iINFO <<
"GBIS PROTEIN DIELECTRIC: " << dielectric<<
"\n";
6271 iout <<
iINFO<<
"GBIS COULOMB RADIUS OFFSET: "<< coulomb_radius_offset<<
" Ang\n";
6272 iout <<
iINFO <<
"GBIS ION CONCENTRATION: " << ion_concentration <<
" M\n";
6273 iout <<
iINFO <<
"GBIS DEBYE SCREENING LENGTH: " << 1.0/kappa <<
" Ang\n";
6274 iout <<
iINFO <<
"GBIS DELTA: " << gbis_delta <<
"\n";
6275 iout <<
iINFO <<
"GBIS BETA: " << gbis_beta <<
"\n";
6276 iout <<
iINFO <<
"GBIS GAMMA: " << gbis_gamma <<
"\n";
6277 iout <<
iINFO <<
"GBIS BORN RADIUS CUTOFF: " << alpha_cutoff <<
" Ang\n";
6278 iout <<
iINFO <<
"GBIS MAX BORN RADIUS: " << alpha_max <<
" Ang\n";
6283 iout <<
iINFO <<
"SASA SURFACE TENSION: " << surface_tension<<
" kcal/mol/Ang^2\n";
6288 iout <<
iINFO <<
"TCL BOUNDARY FORCES ACTIVE\n";
6289 current = config->
find(
"tclBCScript");
6291 tclBCScript = current->
data;
6292 iout <<
iINFO <<
"TCL BOUNDARY FORCES SCRIPT " << current->
data <<
"\n";
6294 iout <<
iINFO <<
"TCL BOUNDARY FORCES ARGS " << tclBCArgs <<
"\n";
6300 globalForcesOn = ( tclForcesOn || freeEnergyOn || miscForcesOn ||
6301 (IMDon && ! (IMDignore || IMDignoreForces)) || (SMDOn && !CUDASOAintegrateMode) || TMDOn ||
6302 colvarsOn || symmetryOn || qmForcesOn );
6304 if (globalForcesOn && monteCarloPressureOn) {
6305 NAMD_die(
"Monte Carlo pressure control is not compatible with " 6306 "global forces computations (Colvars, TclForces, TMD, IMD, " 6307 "symmetryRestraints, and similar features)");
6309 if(globalForcesOn && globalMasterFrequency >1 && !CUDASOAintegrateMode)
6311 iout <<
iINFO <<
"GLOBAL FORCES frequency disabled for non GPU Resident mode \n";
6312 globalMasterFrequency=1;
6313 globalMasterStaleForces=
false;
6314 globalMasterScaleByFrequency=
false;
6316 if(globalForcesOn && globalMasterFrequency >1 )
6318 iout <<
iINFO <<
"GLOBAL FORCES FREQENCY " << globalMasterFrequency<<
"\n";
6319 iout <<
iINFO <<
"GLOBAL FORCES SCALING " << globalMasterScaleByFrequency<<
"\n";
6320 iout <<
iINFO <<
"GLOBAL FORCES STALE FORCES MTS " << globalMasterStaleForces<<
"\n";
6324 iout <<
iINFO <<
"TCL GLOBAL FORCES ACTIVE\n";
6326 current = config->
find(
"tclForcesScript");
6328 for ( ; current; current = current->
next ) {
6330 if ( strstr(current->
data,
"\n") ) {
6331 iout <<
iINFO <<
"TCL GLOBAL FORCES SCRIPT INLINED IN CONFIG FILE\n";
6335 iout <<
iINFO <<
"TCL GLOBAL FORCES SCRIPT " << current->
data <<
"\n";
6343 iout <<
iINFO <<
"MISC FORCES ACTIVE\n";
6345 current = config->
find(
"miscForcesScript");
6347 for ( ; current; current = current->
next ) {
6349 if ( strstr(current->
data,
"\n") ) {
6350 iout <<
iINFO <<
"MISC FORCES SCRIPT INLINED IN CONFIG FILE\n";
6354 iout <<
iINFO <<
"MISC FORCES SCRIPT " << current->
data <<
"\n";
6362 iout <<
iINFO <<
"FREE ENERGY PERTURBATION ACTIVE\n";
6364 current = config->
find(
"freeEnergyConfig");
6366 for ( ; current; current = current->
next ) {
6368 if ( strstr(current->
data,
"\n") ) {
6369 iout <<
iINFO <<
"FREE ENERGY PERTURBATION SCRIPT INLINED IN CONFIG FILE\n";
6373 iout <<
iINFO <<
"FREE ENERGY PERTURBATION SCRIPT " << current->
data <<
"\n";
6381 iout <<
iINFO <<
"COLLECTIVE VARIABLES CALCULATION REQUESTED\n";
6383 current = config->
find (
"colvarsConfig");
6384 for ( ; current; current = current->
next ) {
6385 if ( strstr(current->
data,
"\n") ) {
6386 iout <<
iINFO <<
"COLLECTIVE VARIABLES CONFIGURATION INLINED IN CONFIG FILE\n";
6389 iout <<
iINFO <<
"COLLECTIVE VARIABLES CONFIGURATION " << current->
data <<
"\n";
6392 current = config->
find (
"colvarsInput");
6393 for ( ; current; current = current->
next ) {
6394 if ( strstr(current->
data,
"\n") ) {
6395 iout <<
iINFO <<
"COLLECTIVE VARIABLES RESTART INFORMATION INLINED IN CONFIG FILE\n";
6398 iout <<
iINFO <<
"COLLECTIVE VARIABLES RESTART INFORMATION " << current->
data <<
"\n";
6406 iout <<
iINFO <<
"INTERACTIVE MD ACTIVE\n";
6407 iout <<
iINFO <<
"INTERACTIVE MD PORT " << IMDport <<
"\n";
6408 iout <<
iINFO <<
"INTERACTIVE MD FREQ " << IMDfreq <<
"\n";
6410 iout <<
iINFO <<
"INTERACTIVE MD WILL NOT INFLUENCE SIMULATION\n";
6412 if (IMDignoreForces)
6414 iout <<
iINFO <<
"INTERACTIVE FORCES ARE DISABLED\n";
6415 iout <<
iINFO <<
"PAUSE, RESUME, DETACH AND FINISH INTERACTIVE MD ARE ENABLED\n";
6417 if (IMDwait)
iout <<
iINFO <<
"WILL AWAIT INTERACTIVE MD CONNECTION\n";
6422 if (globalOn && !dihedralOn)
6424 iout <<
iINFO <<
"GLOBAL INTEGRATION TEST MODE ACTIVE\n";
6430 iout <<
iINFO <<
"DIHEDRAL ANGLE DYNAMICS ACTIVE\n";
6433 iout <<
iINFO <<
"*** DIHEDRAL ANGLE DYNAMICS IS HIGHLY EXPERIMENTAL ***\n";
6434 iout <<
iINFO <<
"PLEASE CONSIDER USING THE COLD OPTION AS WELL\n";
6447 iout <<
iINFO <<
"COLD (CONSTRAINED OVERDAMPED LANGEVIN DYNAMICS) ACTIVE\n";
6450 << COLDTemp <<
"\n";
6453 << COLDRate <<
"\n";
6456 if (cylindricalBCOn)
6458 iout <<
iINFO <<
"CYLINDRICAL BOUNDARY CONDITIONS ACTIVE\n";
6459 iout <<
iINFO <<
"AXIS " << cylindricalBCAxis <<
"\n";
6460 iout <<
iINFO <<
"RADIUS #1 " << cylindricalBCr1 <<
"\n";
6461 iout <<
iINFO <<
"FORCE CONSTANT #1 " << cylindricalBCk1 <<
"\n";
6462 iout <<
iINFO <<
"EXPONENT #1 " << cylindricalBCexp1 <<
"\n";
6463 iout <<
iINFO <<
"LENGTH #1 " << cylindricalBCl1 <<
"\n";
6464 if (cylindricalBCr2 > 0.0)
6466 iout <<
iINFO <<
"RADIUS #2 " << cylindricalBCr2 <<
"\n";
6467 iout <<
iINFO <<
"FORCE CONSTANT #2 " << cylindricalBCk2 <<
"\n";
6468 iout <<
iINFO <<
"EXPONENT #2 " << cylindricalBCexp2 <<
"\n";
6469 iout <<
iINFO <<
"LENGTH #2 " << cylindricalBCl2 <<
"\n";
6471 iout <<
iINFO <<
"CYLINDER BOUNDARY CENTER(" << cylindricalCenter.x <<
", " 6472 << cylindricalCenter.y <<
", " << cylindricalCenter.z <<
")\n";
6478 iout <<
iINFO <<
"SPHERICAL BOUNDARY CONDITIONS ACTIVE\n";
6481 << sphericalBCr1 <<
"\n";
6483 << sphericalBCk1 <<
"\n";
6485 << sphericalBCexp1 <<
"\n";
6487 if (sphericalBCr2 > 0)
6490 << sphericalBCr2 <<
"\n";
6492 << sphericalBCk2 <<
"\n";
6494 << sphericalBCexp2 <<
"\n";
6497 iout <<
iINFO <<
"SPHERE BOUNDARY CENTER(" << sphericalCenter.x <<
", " 6498 << sphericalCenter.y <<
", " << sphericalCenter.z <<
")\n";
6504 iout <<
iINFO <<
"ELECTRIC FIELD ACTIVE\n";
6507 << eField.x <<
", " << eField.y
6508 <<
", " << eField.z <<
")\n";
6509 if ( eFieldNormalized )
iout <<
iINFO <<
"E-FIELD VECTOR IS SCALED BY CELL BASIS VECTORS\n";
6510 iout <<
iINFO <<
"E-FIELD FREQUENCY IS (1/ps) " << eFieldFreq <<
"\n";
6511 iout <<
iINFO <<
"E-FIELD PHASE IS (deg) " << eFieldPhase <<
"\n";
6518 iout <<
iINFO <<
"STIRRING TORQUES ACTIVE\n";
6520 iout <<
iINFO <<
"STIR STARTING THETA (deg) "<< stirStartingTheta <<
"\n";
6521 iout <<
iINFO <<
"STIR ANGULAR VELOCITY (deg/ts) " << stirVel <<
"\n";
6522 iout <<
iINFO <<
"STIR FORCE HARMONIC SPRING CONSTANT "<< stirK <<
"\n";
6523 iout <<
iINFO <<
"STIR AXIS OF ROTATION (DIRECTION) (" 6524 << stirAxis.x <<
", " << stirAxis.y
6525 <<
", " << stirAxis.z <<
")\n";
6526 iout <<
iINFO <<
"STIR PIVOT POINT (COORDINATE) (" 6527 << stirPivot.x <<
", " << stirPivot.y
6528 <<
", " << stirPivot.z <<
")\n";
6529 current = config->
find(
"stirFilename");
6531 iout <<
iINFO <<
"STIR ATOMS AND ORIGINAL POSITIONS FROM FILE " <<current ->
data <<
'\n';
6532 current = config->
find(
"stirredAtomsCol");
6533 iout <<
iINFO <<
"STIR FILE COLUMN " << current ->
data <<
'\n';
6539 iout <<
iINFO <<
"DRUDE MODEL DUAL THERMOSTAT IS ACTIVE\n";
6540 iout <<
iINFO <<
"DRUDE BOND TEMPERATURE " << drudeTemp <<
"\n";
6541 if (drudeDamping > 0.0) {
6542 iout <<
iINFO <<
"DRUDE DAMPING COEFFICIENT IS " 6543 << drudeDamping <<
" INVERSE PS\n";
6545 if (drudeHardWallOn) {
6546 iout <<
iINFO <<
"DRUDE HARD WALL RESTRAINT IS ACTIVE FOR DRUDE BONDS\n";
6547 iout <<
iINFO <<
"DRUDE MAXIMUM BOND LENGTH BEFORE RESTRAINT IS " 6548 << drudeBondLen <<
"\n";
6549 }
else if (drudeBondConst > 0.0) {
6550 iout <<
iINFO <<
"DRUDE QUARTIC RESTRAINT IS ACTIVE FOR DRUDE BONDS\n";
6551 iout <<
iINFO <<
"DRUDE MAXIMUM BOND LENGTH BEFORE RESTRAINT IS " 6552 << drudeBondLen <<
"\n";
6553 iout <<
iINFO <<
"DRUDE BOND RESTRAINT CONSTANT IS " 6554 << drudeBondConst <<
"\n";
6556 if (drudeNbtholeCut > 0.0) {
6557 iout <<
iINFO <<
"DRUDE NBTHOLE IS ACTIVE\n";
6558 iout <<
iINFO <<
"DRUDE NBTHOLE RADIUS IS " 6559 << drudeNbtholeCut <<
"\n";
6565 iout <<
iINFO <<
"LANGEVIN DYNAMICS ACTIVE\n";
6566 iout <<
iINFO <<
"LANGEVIN TEMPERATURE " 6567 << langevinTemp <<
"\n";
6568 if (! langevin_useBAOAB)
iout <<
iINFO <<
"LANGEVIN USING BBK INTEGRATOR\n";
6569 else iout <<
iINFO <<
"LANGEVIN USING BAOAB INTEGRATOR\n";
6570 if (langevinDamping > 0.0) {
6571 iout <<
iINFO <<
"LANGEVIN DAMPING COEFFICIENT IS " 6572 << langevinDamping <<
" INVERSE PS\n";
6573 if (langevinHydrogen)
6574 iout <<
iINFO <<
"LANGEVIN DYNAMICS APPLIED TO HYDROGENS\n";
6576 iout <<
iINFO <<
"LANGEVIN DYNAMICS NOT APPLIED TO HYDROGENS\n";
6578 iout <<
iINFO <<
"LANGEVIN DAMPING COEFFICIENTS DETERMINED FROM FILES\n";
6579 current = config->
find(
"langevinFile");
6580 if ( current )
iout <<
iINFO <<
"LANGEVIN DAMPING FILE: " <<
6581 current->
data <<
"\n";
6582 else iout <<
iINFO <<
"LANGEVIN DAMPING FILE IS COORDINATE PDB\n";
6583 current = config->
find(
"langevinCol");
6584 if ( current )
iout <<
iINFO <<
"LANGEVIN DAMPING COLUMN: " <<
6585 current->
data <<
"\n";
6586 else iout <<
iINFO <<
"LANGEVIN DAMPING COLUMN: DEFAULT (4TH, O)\n";
6594 iout <<
iINFO <<
"LOWE-ANDERSEN DYNAMICS ACTIVE\n";
6595 iout <<
iINFO <<
"LOWE-ANDERSEN TEMPERATURE " 6596 << loweAndersenTemp <<
" K\n";
6598 << loweAndersenRate <<
" INVERSE PS\n";
6599 iout <<
iINFO <<
"LOWE-ANDERSEN CUTOFF " 6600 << loweAndersenCutoff <<
" ANGSTROMS\n";
6607 iout <<
iINFO <<
"TEMPERATURE COUPLING ACTIVE\n";
6608 iout <<
iINFO <<
"COUPLING TEMPERATURE " 6609 << tCoupleTemp <<
"\n";
6615 iout <<
iINFO <<
"STOCHASTIC RESCALING ACTIVE\n";
6616 iout <<
iINFO <<
"STOCHASTIC RESCALING TEMPERATURE " 6617 << stochRescaleTemp <<
" K\n";
6618 iout <<
iINFO <<
"STOCHASTIC RESCALING PERIOD " 6619 << stochRescalePeriod <<
" PS\n";
6620 iout <<
iINFO <<
"STOCHASTIC RESCALING WILL OCCUR EVERY " 6621 << stochRescaleFreq <<
" STEPS\n";
6627 iout <<
iINFO <<
"OLD STYLE MINIMIZATION ACTIVE\n";
6633 iout <<
iINFO <<
"CONJUGATE GRADIENT MINIMIZATION ACTIVE\n";
6634 iout <<
iINFO <<
"LINE MINIMIZATION GOAL = " << minLineGoal <<
"\n";
6635 iout <<
iINFO <<
"BABY STEP SIZE = " << minBabyStep <<
"\n";
6636 iout <<
iINFO <<
"TINY STEP SIZE = " << minTinyStep <<
"\n";
6643 << maximumMove <<
"\n";
6647 if (rescaleFreq > 0)
6649 iout <<
iINFO <<
"VELOCITY RESCALE FREQ " 6650 << rescaleFreq <<
"\n";
6651 iout <<
iINFO <<
"VELOCITY RESCALE TEMP " 6652 << rescaleTemp <<
"\n";
6656 if (reassignFreq > 0)
6658 iout <<
iINFO <<
"VELOCITY REASSIGNMENT FREQ " 6659 << reassignFreq <<
"\n";
6660 iout <<
iINFO <<
"VELOCITY REASSIGNMENT TEMP " 6661 << reassignTemp <<
"\n";
6662 if ( reassignIncr != 0. )
6663 iout <<
iINFO <<
"VELOCITY REASSIGNMENT INCR " 6664 << reassignIncr <<
"\n";
6665 if ( reassignHold != 0. )
6666 iout <<
iINFO <<
"VELOCITY REASSIGNMENT HOLD " 6667 << reassignHold <<
"\n";
6671 if ((
int)berendsenPressureOn + (
int)langevinPistonOn + (
int)monteCarloPressureOn + (
int)multigratorOn > 1)
6673 NAMD_die(
"Multiple pressure control algorithms selected!\n");
6676 if (excludeFromPressure) {
6677 iout <<
iINFO <<
"EXCLUDE FROM PRESSURE ACTIVE\n";
6679 if (useConstantArea && useConstantRatio) {
6680 NAMD_die(
"useConstantArea and useConstantRatio are mutually exclusive.\n");
6682 if (useConstantRatio && !useFlexibleCell) {
6683 NAMD_die(
"useConstantRatio requires useFlexibleCell.\n");
6685 if (useConstantArea && surfaceTensionTarget) {
6686 NAMD_die(
"surfaceTensionTarget and useConstantArea are mutually exclusive.\n");
6688 if (useConstantArea && !useFlexibleCell) {
6689 NAMD_die(
"useConstantArea requires useFlexibleCell.\n");
6693 if (!useFlexibleCell) {
6694 if (fixCellDimX || fixCellDimY || fixCellDimZ) {
6695 NAMD_die(
"fixCellDims requires useFlexibleCell.\n");
6698 if(useConstantArea && fixCellDimZ) {
6699 NAMD_die(
"fixCellDimZ can not be used with useConstantArea.\n");
6700 }
else if (useConstantRatio && fixCellDimX) {
6701 NAMD_die(
"fixCellDimX can not be used with useConstantRatio.\n");
6702 }
else if (useConstantRatio && fixCellDimY) {
6703 NAMD_die(
"fixCellDimY can not be used with useConstantRatio.\n");
6707 if (fixCellDimX && fixCellDimY && fixCellDimZ) {
6708 NAMD_die(
"Cell dimension can not be fixed in X, Y, and Z axis, simultaneously.\n");
6712 if (berendsenPressureOn || langevinPistonOn) {
6714 useGroupPressure =
TRUE;
6715 iout <<
iWARN <<
"Option useGroupPressure is being enabled " 6716 <<
"due to pressure control with rigidBonds.\n" <<
endi;
6720 if (monteCarloPressureOn) {
6721 if (!opts.
defined(
"MonteCarloAcceptanceRate")) {
6722 monteCarloAcceptanceRate = 0.5;
6723 }
else if (monteCarloAcceptanceRate > 0.8 || monteCarloAcceptanceRate < 0.2) {
6724 NAMD_die(
"Acceptance rate in Monte Carlo pressure control must be between 0.2 and 0.8!\n");
6727 if ( monteCarloAdjustmentFreq < 10 ) {
6728 iout <<
iWARN <<
"Modifying the frequency of adjusting the maximum volume change.\n" <<
endi;
6729 monteCarloAdjustmentFreq = 30;
6732 if (!opts.
defined(
"MonteCarloMaxVolume")) {
6734 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6735 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6736 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6739 if (0.3 < (monteCarloMaxVolume.x / lattice.volume())) {
6740 iout <<
iWARN <<
"Modifying the maximum volume change for x-axis.\n" <<
endi;
6741 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6743 if (0.3 < (monteCarloMaxVolume.y / lattice.volume())) {
6744 iout <<
iWARN <<
"Modifying the maximum volume change for y-axis.\n" <<
endi;
6745 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6747 if (0.3 < (monteCarloMaxVolume.z / lattice.volume())) {
6748 iout <<
iWARN <<
"Modifying the maximum volume change for z-axis.\n" <<
endi;
6749 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6751 if (monteCarloMaxVolume.x < 1.0) {
6752 iout <<
iWARN <<
"Maximum volume change is negative or too small for x-axis.\n" <<
6753 " Modifying the maximum volume change for x-axis.\n" <<
endi;
6754 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6756 if (monteCarloMaxVolume.y < 1.0) {
6757 iout <<
iWARN <<
"Maximum volume change is negative or too small for y-axis.\n" <<
6758 " Modifying the maximum volume change for y-axis.\n" <<
endi;
6759 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6761 if (monteCarloMaxVolume.z < 1.0) {
6762 iout <<
iWARN <<
"Maximum volume change is negative or too small for z-axis.\n" <<
6763 " Modifying the maximum volume change for z-axis.\n" <<
endi;
6764 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6768 if (!opts.
defined(
"MonteCarloPressureFreq")) {
6769 monteCarloPressureFreq = 50 * nonbondedFrequency;
6770 if ( fullElectFrequency ) {
6771 monteCarloPressureFreq = 50 * fullElectFrequency;
6773 }
else if ((monteCarloPressureFreq % nonbondedFrequency) || ( fullElectFrequency
6774 && (monteCarloPressureFreq % fullElectFrequency) )) {
6775 NAMD_die(
"monteCarloPressureFreq must be a multiple of both fullElectFrequency and nonbondedFrequency\n");
6778 iout <<
iINFO <<
"MONTE CARLO PRESSURE CONTROL ACTIVE\n";
6780 << monteCarloPressureTarget <<
" BAR\n";
6781 iout <<
iINFO <<
" TARGET ACCEPTANCE RATE IS " 6782 << monteCarloAcceptanceRate <<
"\n";
6783 iout <<
iINFO <<
" IMPOSED TEMPERATURE IS " 6784 << monteCarloTemp <<
" K\n";
6785 iout <<
iINFO <<
" MAXIMUM VOLUME CHANGE IS (" 6786 << monteCarloMaxVolume.x <<
", " << monteCarloMaxVolume.y <<
", " 6787 << monteCarloMaxVolume.z <<
") A^3 \n";
6788 iout <<
iINFO <<
" ADJUST MAXIMUM VOLUME CHANGE EVERY " 6789 << monteCarloAdjustmentFreq <<
" TRIALS\n";
6791 << monteCarloPressureFreq <<
" STEPS\n";
6792 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6793 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6798 if (berendsenPressureOn)
6800 if ( ! opts.
defined(
"BerendsenPressureFreq") ) {
6801 berendsenPressureFreq = nonbondedFrequency;
6802 if ( fullElectFrequency )
6803 berendsenPressureFreq = fullElectFrequency;
6805 if ( (berendsenPressureFreq % nonbondedFrequency) || ( fullElectFrequency
6806 && (berendsenPressureFreq % fullElectFrequency) ) ) {
6807 NAMD_die(
"berendsenPressureFreq must be a multiple of both fullElectFrequency and nonbondedFrequency\n");
6809 iout <<
iINFO <<
"BERENDSEN PRESSURE COUPLING ACTIVE\n";
6811 << berendsenPressureTarget <<
" BAR\n";
6812 iout <<
iINFO <<
" COMPRESSIBILITY ESTIMATE IS " 6813 << berendsenPressureCompressibility <<
" BAR^(-1)\n";
6815 << berendsenPressureRelaxationTime <<
" FS\n";
6817 << berendsenPressureFreq <<
" STEPS\n";
6818 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6819 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6825 if (langevinPistonOn)
6827 iout <<
iINFO <<
"LANGEVIN PISTON PRESSURE CONTROL ACTIVE\n";
6829 << langevinPistonTarget <<
" BAR\n";
6830 iout <<
iINFO <<
" OSCILLATION PERIOD IS " 6831 << langevinPistonPeriod <<
" FS\n";
6833 << langevinPistonDecay <<
" FS\n";
6834 iout <<
iINFO <<
" PISTON TEMPERATURE IS " 6835 << langevinPistonTemp <<
" K\n";
6836 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6837 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6838 iout <<
iINFO <<
" INITIAL STRAIN RATE IS " 6839 << strainRate <<
"\n";
6844 if (multigratorOn) {
6848 if (berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) {
6849 iout <<
iINFO <<
" CELL FLUCTUATION IS " 6850 << (useFlexibleCell?
"AN":
"") <<
"ISOTROPIC\n";
6851 if (useConstantRatio)
6852 iout <<
iINFO <<
" SHAPE OF CELL IS CONSTRAINED IN X-Y PLANE\n";
6853 if (useConstantArea)
6854 iout <<
iINFO <<
" CONSTANT AREA PRESSURE CONTROL ACTIVE\n";
6857 if (surfaceTensionTarget != 0)
6859 iout <<
iINFO <<
"SURFACE TENSION CONTROL ACTIVE\n";
6860 iout <<
iINFO <<
" TARGET SURFACE TENSION IS " 6861 << surfaceTensionTarget <<
" DYN/CM\n";
6868 if (pressureProfileOn) {
6869 if ((berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) && !dcdUnitCell) {
6871 iout <<
iWARN <<
"Turning on dcdUnitCell so that trajectory files contain unit cell data.\n" <<
endi;
6874 NAMD_die(
"Sorry, pressure profile not implemented for constant pressure.");
6878 if (pressureProfileEwaldOn)
6879 pressureProfileOn = 0;
6881 if (pressureProfileSlabs < 1)
6882 NAMD_die(
"pressureProfileSlabs must be positive.");
6883 iout <<
iINFO <<
"PRESSURE PROFILE CALCULATIONS ACTIVE\n";
6884 iout <<
iINFO <<
" NUMBER OF SLABS: " << pressureProfileSlabs <<
"\n";
6885 iout <<
iINFO <<
" SLAB THICKNESS: " << cellBasisVector3.z / pressureProfileSlabs
6887 iout <<
iINFO <<
" TIMESTEPS BETWEEN DATA OUTPUT: " 6888 << pressureProfileFreq <<
"\n";
6889 iout <<
iINFO <<
" NUMBER OF ATOM TYPES: " << pressureProfileAtomTypes <<
"\n";
6892 pressureProfileEwaldOn = 0;
6893 pressureProfileAtomTypes = 1;
6897 iout <<
iINFO <<
"ACCELERATED MD ACTIVE\n";
6900 accelMDdihe =
FALSE;
6901 iout <<
iINFO <<
"APPLYING DUAL BOOST\n";
6903 else if ( accelMDdihe ) {
6904 iout <<
iINFO <<
"BOOSTING DIHEDRAL POTENTIAL\n";
6906 iout <<
iINFO <<
"BOOSTING TOTAL POTENTIAL\n";
6910 switch(accelMDGiE) {
6912 iout <<
iINFO <<
"accelMDG THRESHOLD ENERGY SET TO LOWER BOUND Vmax\n";
6915 iout <<
iINFO <<
"accelMDG THRESHOLD ENERGY SET TO UPPER BOUND Vmin+(Vmax-Vmin)/k0\n";
6919 iout <<
iINFO <<
"accelMDG USING RESTART FILE " << accelMDGRestartFile <<
"\n";
6920 if(accelMDGresetVaftercmd)
6921 iout <<
iINFO <<
"accelMDG WILL RESET STATISTICS AFTER FIRST CMD STEPS\n";
6923 iout <<
iINFO <<
"accelMDG " << accelMDGcMDSteps <<
" CONVENTIONAL MD STEPS " 6924 <<
"(WITH " << accelMDGcMDPrepSteps <<
" PREPARATION STEPS)\n";
6925 if(accelMDGcMDSteps == 0)
6926 iout <<
iINFO <<
"(accelMDGcMDPrepSteps is set to zero automatically)\n";
6928 iout <<
iINFO <<
"accelMDG " << accelMDGEquiSteps <<
" EQUILIBRATION STEPS " 6929 <<
"(WITH " << accelMDGEquiPrepSteps <<
" PREPARATION STEPS)\n";
6930 if(accelMDGEquiSteps == 0)
6931 iout <<
iINFO <<
"(accelMDGEquiPrepSteps is set to zero automatically)\n";
6933 if(accelMDGStatWindow > 0)
6934 iout <<
iINFO <<
"accelMDG WILL RESET AVERAGE AND STANDARD DEVIATION EVERY " << accelMDGEquiSteps <<
" STEPS\n";
6936 iout <<
iINFO <<
"accelMDG WILL NOT RESET AVERAGE AND STANDARD DEVIATION\n";
6939 iout <<
iINFO <<
"accelMDGSigma0D: " << accelMDGSigma0D <<
" KCAL/MOL\n";
6940 else if(accelMDdual)
6941 iout <<
iINFO <<
"accelMDGSigma0P: " << accelMDGSigma0P <<
" KCAL/MOL, " 6942 <<
"accelMDGSigma0D: " << accelMDGSigma0D <<
" KCAL/MOL\n";
6944 iout <<
iINFO <<
"accelMDGSigma0P: " << accelMDGSigma0P <<
" KCAL/MOL\n";
6947 iout <<
iINFO <<
"accelMDE: " << accelMDE <<
" KCAL/MOL, accelMDalpha: " << accelMDalpha <<
" KCAL/MOL\n";
6949 iout <<
iINFO <<
"accelMDTE: " << accelMDTE <<
" KCAL/MOL, " 6950 <<
"accelMDTalpha: " << accelMDTalpha <<
" KCAL/MOL\n";
6953 if ( accelMDLastStep > 0) {
6954 iout <<
iINFO <<
"accelMD WILL BE DONE FROM STEP " << accelMDFirstStep <<
" TO STEP " << accelMDLastStep <<
"\n";
6956 iout <<
iINFO <<
"accelMD WILL BE DONE FROM STEP " << accelMDFirstStep <<
" TO THE END OF THE SIMULATION \n";
6958 iout <<
iINFO <<
"accelMD OUTPUT FREQUENCY " << accelMDOutFreq <<
"\n";
6963 iout <<
iINFO <<
"ADAPTIVE TEMPERING ACTIVE:\n";
6964 iout <<
iINFO <<
" OUTPUT FREQUENCY: " << adaptTempOutFreq <<
"\n";
6965 iout <<
iINFO <<
" TEMPERATURE UPDATE FREQUENCY: " << adaptTempFreq <<
"\n";
6966 if ( adaptTempLastStep > 0 )
6967 iout <<
iINFO <<
" ADAPTIVE TEMPERING WILL BE DONE FROM STEP " << adaptTempFirstStep <<
" TO " << adaptTempLastStep <<
"\n";
6969 iout <<
iINFO <<
" ADAPTIVE TEMPERING WILL BE DONE FROM STEP " << adaptTempFirstStep <<
"\n";
6970 if ( adaptTempLangevin )
6971 iout <<
iINFO <<
" ADAPTIVE TEMPERING COUPLED TO LANGEVIN THERMOSTAT\n";
6972 if ( adaptTempRescale )
6973 iout <<
iINFO <<
" ADAPTIVE TEMPERING COUPLED TO VELOCITY RESCALING\n";
6974 if (adaptTempRestartFreq > 0) {
6975 iout <<
iINFO <<
" WRITING RESTART INFORMATION TO " << adaptTempRestartFile <<
" EVERY " << adaptTempRestartFreq <<
" STEPS\n";
6984 << fmaTheta <<
"\n";
6989 FFTWWisdomString = 0;
6992 iout <<
iINFO <<
"PARTICLE MESH EWALD (PME) ACTIVE\n";
6994 << PMETolerance <<
"\n";
6995 iout <<
iINFO <<
"PME EWALD COEFFICIENT " 6996 << PMEEwaldCoefficient <<
"\n";
6997 iout <<
iINFO <<
"PME INTERPOLATION ORDER " 6998 << PMEInterpOrder <<
"\n";
7000 << PMEGridSizeX <<
" " 7001 << PMEGridSizeY <<
" " 7002 << PMEGridSizeZ <<
"\n";
7003 iout <<
iINFO <<
"PME MAXIMUM GRID SPACING " 7004 << PMEGridSpacing <<
"\n";
7006 iout <<
iINFO <<
"PME BARRIER ENABLED\n";
7009 iout <<
iINFO <<
"PME RECIPROCAL SUM OFFLOADED TO GPU\n";
7012 if ( useDPME )
iout <<
iINFO <<
"USING OLD DPME CODE\n";
7013 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 7014 else if ( usePMECUDA ) {
7015 iout <<
iINFO <<
"PME CALCULATION WILL BE PERFORMED ON GPU" <<
"\n" 7020 else if ( FFTWUseWisdom ) {
7022 iout <<
iINFO <<
"Attempting to read FFTW data from system" <<
"\n" <<
endi;
7023 fftwf_import_system_wisdom();
7025 if (! opts.
defined(
"FFTWWisdomFile")) {
7026 strcpy(FFTWWisdomFile,
"FFTW_NAMD_");
7027 strcat(FFTWWisdomFile,NAMD_VERSION);
7028 strcat(FFTWWisdomFile,
"_");
7029 strcat(FFTWWisdomFile,NAMD_PLATFORM);
7031 strcat(FFTWWisdomFile,
"_FFTW3");
7033 strcat(FFTWWisdomFile,
".txt");
7036 iout <<
iINFO <<
"Attempting to read FFTW data from " 7037 << FFTWWisdomFile <<
"\n" <<
endi;
7038 FILE *wisdom_file = fopen(FFTWWisdomFile,
"r");
7039 if ( wisdom_file ) {
7041 fftwf_import_wisdom_from_file(wisdom_file);
7043 fftw_import_wisdom_from_file(wisdom_file);
7045 fclose(wisdom_file);
7050 int minslices = PMEMinSlices;
7051 int dimx = PMEGridSizeX;
7052 int nrpx = ( dimx + minslices - 1 ) / minslices;
7053 if ( nrpx > nrp ) nrp = nrpx;
7054 int dimy = PMEGridSizeY;
7055 int nrpy = ( dimy + minslices - 1 ) / minslices;
7056 if ( nrpy > nrp ) nrp = nrpy;
7059 int nrpp = CkNumPes();
7061 if ( nrpp < nrp ) nrp = nrpp;
7064 int nrps = PMEProcessors;
7065 if ( nrps > CkNumPes() ) nrps = CkNumPes();
7066 if ( nrps > 0 ) nrp = nrps;
7069 int bx = ( dimx + nrp - 1 ) / nrp;
7070 int nrpbx = ( dimx + bx - 1 ) / bx;
7071 int by = ( dimy + nrp - 1 ) / nrp;
7072 int nrpby = ( dimy + by - 1 ) / by;
7073 nrp = ( nrpby > nrpbx ? nrpby : nrpbx );
7074 if ( bx != ( dimx + nrp - 1 ) / nrp )
7075 NAMD_bug(
"Error in selecting number of PME processors.");
7076 if ( by != ( dimy + nrp - 1 ) / nrp )
7077 NAMD_bug(
"Error in selecting number of PME processors.");
7082 int block2 = (PMEGridSizeY + nrp - 1) / nrp;
7083 int block2_min = PMEGridSizeY % block2;
7084 if ( ! block2_min ) block2_min = block2;
7085 int dim3 = 2 * (PMEGridSizeZ/2 + 1);
7087 int n[3]; n[0] = PMEGridSizeX; n[1] = PMEGridSizeY; n[2] = PMEGridSizeZ;
7088 fftw_complex *work =
new fftw_complex[n[0]];
7089 float *grid1 = (
float *)
fftwf_malloc(
sizeof(
float) *n[1]*dim3);
7090 float *grid2 = (
float *)
fftwf_malloc(
sizeof(
float) *n[0]*block2*dim3*2);
7093 int fftwFlags = FFTWPatient ? FFTW_PATIENT : FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE ;
7094 int planLineSizes[1];
7095 planLineSizes[0]=n[2];
7098 int sizeLines=nx*ny;
7101 int xStride=block2 * dim3 / 2;
7103 fftwf_plan_many_dft_r2c(1, planLineSizes, sizeLines,
7104 (
float *) grid2, NULL, 1,
7106 (fftwf_complex *) grid2,
7113 fftwf_plan_many_dft_c2r(1, planLineSizes, sizeLines,
7114 (fftwf_complex *) grid2,
7117 (
float *) grid2, NULL, 1,
7122 planLineSizes[0]=block2;
7123 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7124 (fftwf_complex *) grid2, NULL,
7126 (fftwf_complex *) grid2, NULL,
7131 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7132 (fftwf_complex *) grid2, NULL,
7134 (fftwf_complex *) grid2, NULL,
7140 planLineSizes[0]=n[0];
7141 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7142 (fftwf_complex *) grid2, NULL,
7144 (fftwf_complex *) grid2, NULL,
7149 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7150 (fftwf_complex *) grid2, NULL,
7152 (fftwf_complex *) grid2, NULL,
7158 rfftwnd_destroy_plan( rfftwnd_create_plan_specific(
7159 2, n+1, FFTW_REAL_TO_COMPLEX,
7160 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7161 | FFTW_IN_PLACE | FFTW_USE_WISDOM, grid1, 1, 0, 0) );
7163 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_REAL_TO_COMPLEX,
7164 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7165 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7166 block2*dim3/2, work, 1) );
7168 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_REAL_TO_COMPLEX,
7169 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7170 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7171 block2_min*dim3/2, work, 1) );
7173 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_COMPLEX_TO_REAL,
7174 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7175 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7176 block2*dim3/2, work, 1) );
7178 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_COMPLEX_TO_REAL,
7179 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7180 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7181 block2_min*dim3/2, work, 1) );
7183 rfftwnd_destroy_plan( rfftwnd_create_plan_specific(
7184 2, n+1, FFTW_COMPLEX_TO_REAL,
7185 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7186 | FFTW_IN_PLACE | FFTW_USE_WISDOM, grid1, 1, 0, 0) );
7194 FFTWWisdomString = fftwf_export_wisdom_to_string();
7196 FFTWWisdomString = fftw_export_wisdom_to_string();
7199 if ( FFTWWisdomString && (CmiNumPartitions() == 1) ) {
7200 iout <<
iINFO <<
"Writing FFTW data to " 7201 << FFTWWisdomFile <<
"\n" <<
endi;
7202 wisdom_file = fopen(FFTWWisdomFile,
"w");
7203 if ( wisdom_file ) {
7205 fftwf_export_wisdom_to_file(wisdom_file);
7207 fftw_export_wisdom_to_file(wisdom_file);
7209 fclose(wisdom_file);
7221 if (switchingActive) {
7222 NAMD_die(
"Cannot use LJ-PME with switch smoothing function. Select only one. ");
7224 if (vdwForceSwitching) {
7225 NAMD_die(
"Cannot use LJ-PME with VDW Force switch smoothing function. Select only one.");
7228 NAMD_die(
"Cannot use LJ-PME with LJ tail corrections. Select only one.");
7231 NAMD_die(
"Sorry, alchemical transformation is not supported with LJ-PME.");
7233 if (!fullElectFrequency) {
7234 NAMD_die(
"To use LJ-PME, a full-range electrostatic method must be activated.");
7236 #ifdef OPENATOM_VERSION 7238 NAMD_die(
"Sorry, open-atom simulation is not supported with LJ-PME.");
7242 #ifdef MEM_OPT_VERSION 7243 NAMD_die(
"Sorry, memory-optimized version of NAMD does not support LJ-PME.");
7245 if(fullElectFrequency > 1 || nonbondedFrequency > 1 || fullDispersionFrequency > 1) {
7246 NAMD_die(
"The LJ-PME method does not support multiple time steps.");
7251 iout <<
iINFO <<
"LJ PARTICLE MESH EWALD (LJ-PME) ACTIVE\n";
7253 << LJPMETolerance <<
"\n";
7254 iout <<
iINFO <<
"LJ-PME EWALD COEFFICIENT " 7255 << LJPMEEwaldCoefficient <<
"\n";
7256 iout <<
iINFO <<
"LJ-PME INTERPOLATION ORDER " 7257 << LJPMEInterpOrder <<
"\n";
7258 iout <<
iINFO <<
"LJ-PME GRID DIMENSIONS " 7259 << LJPMEGridSizeX <<
" " 7260 << LJPMEGridSizeY <<
" " 7261 << LJPMEGridSizeZ <<
"\n";
7262 iout <<
iINFO <<
"LJ-PME MAXIMUM GRID SPACING " 7263 << LJPMEGridSpacing <<
"\n";
7264 iout <<
iINFO <<
"FULL LJ DISPERSION EVALUATION FREQUENCY " 7265 << fullDispersionFrequency <<
"\n";
7270 iout <<
iINFO <<
"DIRECT FULL ELECTROSTATIC CALCULATIONS ACTIVE\n";
7278 enum { LO=0, MEDLO, MED, MEDHI, HI };
7281 enum { CUBIC=0, QUINTIC, QUINTIC2,
7282 SEPTIC, SEPTIC3, NONIC, NONIC4, C1HERMITE, NUM_APPROX };
7285 enum { TAYLOR2=0, TAYLOR3, TAYLOR4,
7286 TAYLOR5, TAYLOR6, TAYLOR7, TAYLOR8, NUM_SPLIT };
7288 if (MSMApprox || MSMSplit) {
7289 if (MSMApprox < 0 || MSMApprox >= NUM_APPROX) {
7290 NAMD_die(
"MSM: unknown approximation requested (MSMApprox)");
7292 if (MSMSplit < 0 || MSMSplit >= NUM_SPLIT) {
7293 NAMD_die(
"MSM: unknown splitting requested (MSMSplit)");
7297 switch (MSMQuality) {
7303 MSMApprox = C1HERMITE;
7307 MSMApprox = QUINTIC;
7319 NAMD_die(
"MSM: unknown quality requested (MSMQuality)");
7324 <<
"MULTILEVEL SUMMATION METHOD (MSM) FOR ELECTROSTATICS ACTIVE\n";
7327 <<
"PERFORMING SERIAL MSM CALCULATION FOR LONG-RANGE PART\n";
7329 const char *approx_str, *split_str;
7330 switch (MSMApprox) {
7331 case CUBIC: approx_str =
"C1 CUBIC";
break;
7332 case QUINTIC: approx_str =
"C1 QUINTIC";
break;
7333 case QUINTIC2: approx_str =
"C2 QUINTIC";
break;
7334 case SEPTIC: approx_str =
"C1 SEPTIC";
break;
7335 case SEPTIC3: approx_str =
"C3 SEPTIC";
break;
7336 case NONIC: approx_str =
"C1 NONIC";
break;
7337 case NONIC4: approx_str =
"C4 NONIC";
break;
7338 case C1HERMITE:approx_str =
"C1 HERMITE";
break;
7339 default: approx_str =
"UNKNOWN";
break;
7342 case TAYLOR2: split_str =
"C2 TAYLOR";
break;
7343 case TAYLOR3: split_str =
"C3 TAYLOR";
break;
7344 case TAYLOR4: split_str =
"C4 TAYLOR";
break;
7345 case TAYLOR5: split_str =
"C5 TAYLOR";
break;
7346 case TAYLOR6: split_str =
"C6 TAYLOR";
break;
7347 case TAYLOR7: split_str =
"C7 TAYLOR";
break;
7348 case TAYLOR8: split_str =
"C8 TAYLOR";
break;
7349 default: split_str =
"UNKNOWN";
break;
7352 <<
"MSM WITH " << approx_str <<
" INTERPOLATION " 7353 <<
"AND " << split_str <<
" SPLITTING\n" 7360 iout <<
iINFO <<
"FAST MULTIPOLE METHOD (FMM) FOR ELECTROSTATICS ACTIVE\n";
7361 iout <<
iINFO <<
"PERFORMING SERIAL FMM CALCULATION\n";
7362 iout <<
iINFO <<
"FMM LEVELS = " << FMMLevels <<
"\n";
7363 iout <<
iINFO <<
"FMM PADDING = " << FMMPadding <<
" ANGSTROMS\n";
7366 NAMD_die(
"Must link to FMM library to use FMM\n");
7370 if ( FMAOn || PMEOn || MSMOn || fullDirectOn || GBISOn || FMMOn )
7372 iout <<
iINFO <<
"FULL ELECTROSTATIC EVALUATION FREQUENCY " 7373 << fullElectFrequency <<
"\n";
7376 if ( ( computeEnergies % fullElectFrequency ) &&
7377 ( fullElectFrequency % computeEnergies ) )
7378 NAMD_die(
"Either computeEnergies must be a multiple of fullElectFrequency or vice versa.\n");
7382 if ( ( outputEnergies % fullDispersionFrequency ) &&
7383 ( fullDispersionFrequency % outputEnergies ) ) {
7384 NAMD_die(
"Either outputEnergies must be a multiple of fullDispersionFrequency or vice versa.\n");
7388 if (MTSAlgorithm ==
NAIVE)
7390 iout <<
iINFO <<
"USING NAIVE (CONSTANT FORCE) MTS SCHEME.\n" <<
endi;
7394 iout <<
iINFO <<
"USING VERLET I (r-RESPA) MTS SCHEME.\n" <<
endi;
7397 if (longSplitting ==
SHARP)
7398 iout <<
iINFO <<
"SHARP SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7399 else if (longSplitting ==
XPLOR)
7400 iout <<
iINFO <<
"XPLOR SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7401 else if (longSplitting ==
C1)
7402 iout <<
iINFO <<
"C1 SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7403 else if (longSplitting ==
C2)
7404 iout <<
iINFO <<
"C2 SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7407 iout <<
iINFO <<
"PLACING ATOMS IN PATCHES BY POSITION\n";
7409 iout <<
iINFO <<
"PLACING ATOMS IN PATCHES BY HYDROGEN GROUPS\n";
7415 iout <<
iINFO <<
"SLOW FORCE MOLLIFICATION : \n";
7416 iout <<
iINFO <<
" ERROR TOLERANCE : " << mollyTol <<
"\n";
7417 iout <<
iINFO <<
" MAX ITERATIONS : " << mollyIter <<
"\n";
7423 iout <<
iINFO <<
"RIGID BONDS TO HYDROGEN : ";
7426 iout <<
iINFO <<
" ERROR TOLERANCE : " << rigidTol <<
"\n";
7427 iout <<
iINFO <<
" MAX ITERATIONS : " << rigidIter <<
"\n";
7428 if (useSettle)
iout <<
iINFO <<
"RIGID WATER USING SETTLE ALGORITHM\n";
7433 if (nonbondedFrequency != 1)
7435 iout <<
iINFO <<
"NONBONDED FORCES EVALUATED EVERY " << nonbondedFrequency <<
" STEPS\n";
7439 << randomSeed <<
"\n";
7443 iout <<
iINFO <<
"USE HYDROGEN BONDS? ";
7447 iout <<
iINFO <<
"USE ANTECEDENT ATOMS? ";
7448 iout << (useAntecedent ?
"YES" :
"NO");
7449 iout <<
"\nHB DIST CUT, ON, OFF ";
7450 iout << daCutoffDist <<
" , " << daOnDist <<
" , " << daOffDist;
7451 iout <<
"\nHB ANGLE CUT, ON, OFF ";
7452 iout << dhaCutoffAngle <<
" , " << dhaOnAngle <<
" , ";
7453 iout << dhaOffAngle;
7454 iout <<
"\nHB ATT, REP exponents ";
7455 iout << distAttExp <<
" , " << distRepExp;
7456 iout <<
"\nHB AA, HA exponents ";
7457 iout << aaAngleExp <<
" , " << haAngleExp;
7468 {
iout <<
iINFO <<
"Using AMBER format force field!\n";
7469 current = config->
find(
"parmfile");
7470 iout <<
iINFO <<
"AMBER PARM FILE " << current->
data <<
'\n';
7471 if (opts.
defined(
"coordinates"))
7472 { current = config->
find(
"coordinates");
7473 iout <<
iINFO <<
"COORDINATE PDB " << current->
data <<
'\n';
7476 { current = config->
find(
"ambercoor");
7477 iout <<
iINFO <<
"AMBER COORDINATE FILE " << current->
data <<
'\n';
7480 iout <<
iINFO <<
"Exclusions will be read from PARM file!\n";
7482 iout <<
iINFO <<
"Exclusions in PARM file will be ignored!\n";
7483 iout <<
iINFO <<
"SCNB (VDW SCALING) " << vdwscale14 <<
"\n" <<
endi;
7487 iout <<
iINFO <<
"Using GROMACS format force field!\n";
7489 current = config->
find(
"grotopfile");
7491 if (current == NULL)
7492 NAMD_die(
"no GROMACS topology file defined!?");
7493 iout <<
iINFO <<
"GROMACS TOPO FILE " << current->
data <<
'\n';
7496 current = config->
find(
"grocoorfile");
7497 if (current == NULL) {
7498 current = config->
find(
"coordinates");
7499 if (current == NULL) {
7500 NAMD_die(
"no coordinate file defined!?");
7503 iout <<
iINFO <<
"GROMACS COOR FILE " << current->
data <<
'\n' 7508 if ( !usePluginIO ) {
7509 if ( current = config->
find(
"coordinates") )
7513 current = config->
find(
"structure");
7520 iout <<
iINFO <<
"COSANGLES ON. SOME ANGLES WILL BE COSINE-BASED\n" <<
endi;
7524 if (paraTypeXplorOn)
7526 iout <<
iINFO <<
"PARAMETER file: XPLOR format! (default) \n" <<
endi;
7528 else if (paraTypeCharmmOn)
7530 iout <<
iINFO <<
"PARAMETER file: CHARMM format! \n" <<
endi;
7534 current = config->
find(
"parameters");
7536 while (current != NULL)
7540 current = current->
next;
7545 ( vdwGeometricSigma ?
"GEOMETRIC" :
"ARITHMETIC" ) <<
7546 " MEAN TO COMBINE L-J SIGMA PARAMETERS\n" <<
endi;
7548 if (opts.
defined(
"bincoordinates"))
7550 current = config->
find(
"bincoordinates");
7553 << current->
data <<
"\n";
7556 #ifdef NAMD_AVXTILES 7557 iout <<
iINFO <<
"MIXED PRECISION AVX-512 TILES OPTIMIZATIONS: ";
7558 if (useAVXTiles)
iout <<
"ENABLED\n";
7559 else iout <<
"DISABLED\n";
7562 #ifdef MEM_OPT_VERSION 7563 if (opts.
defined(
"binrefcoords"))
7565 current = config->
find(
"binrefcoords");
7568 << current->
data <<
"\n";
7575 << firstTimestep <<
"\n" <<
endi;
7587 void SimParameters::parse_mgrid_params(
ConfigList *config)
7591 mgridforcelist.clear();
7592 char *key =
new char[81];
7593 char *valstr =
new char[256];
7596 mgridforceOn =
TRUE;
7599 mgfp = mgridforcelist.find_key(default_key);
7601 iout <<
iINFO <<
"MGRIDFORCEPOTFILE key " 7602 << key <<
" redefined for file " << valstr <<
"\n" <<
endi;
7604 mgfp = mgridforcelist.add(default_key);
7609 parse_mgrid_string_param(config,
"gridforcefile",&(mgfp->
gridforceFile));
7610 parse_mgrid_string_param(config,
"gridforcecol",&(mgfp->
gridforceCol));
7611 parse_mgrid_string_param(config,
"gridforcechargecol",&(mgfp->
gridforceQcol));
7612 parse_mgrid_string_param(config,
"gridforcepotfile",&(mgfp->
gridforceVfile));
7623 current = config->
find(
"mgridforcepotfile");
7624 while (current != NULL) {
7625 int curlen = strlen(current->
data);
7628 sscanf(current->
data,
"%80s%255s",key,valstr);
7631 mgfp = mgridforcelist.find_key(key);
7632 if ( mgfp != NULL) {
7633 iout <<
iINFO <<
"MGRIDFORCEPOTFILE key " 7634 << key <<
" redefined for file " << valstr <<
"\n" <<
endi;
7636 mgfp = mgridforcelist.add(key);
7638 int fnamelen = strlen(valstr);
7648 current = current->
next;
7651 current = config->
find(
"mgridforcefile");
7652 while (current != NULL) {
7653 int curlen = strlen(current->
data);
7656 sscanf(current->
data,
"%80s%255s",key,valstr);
7659 mgfp = mgridforcelist.find_key(key);
7660 if ( mgfp == NULL) {
7661 iout <<
iINFO <<
"MGRIDFORCEFILE no key " 7662 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7664 int fnamelen = strlen(valstr);
7672 current = current->
next;
7675 current = config->
find(
"mgridforcevolts");
7676 while (current != NULL) {
7679 int curlen = strlen(current->
data);
7680 sscanf(current->
data,
"%80s%255s",key,valstr);
7683 mgfp = mgridforcelist.find_key(key);
7684 if ( mgfp == NULL) {
7685 iout <<
iINFO <<
"MGRIDFORCEVOLTS no key " 7686 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7689 if (boolval == -1) {
7691 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7697 current = current->
next;
7700 current = config->
find(
"mgridforcescale");
7701 while (current != NULL) {
7704 int curlen = strlen(current->
data);
7706 sscanf(current->
data,
"%80s%n",key,&nread);
7707 char *val = current->
data + nread + 1;
7710 mgfp = mgridforcelist.find_key(key);
7711 if ( mgfp == NULL) {
7712 iout <<
iINFO <<
"MGRIDFORCESCALE no key " 7713 << key <<
" defined for vector " << val <<
"\n" <<
endi;
7718 current = current->
next;
7721 current = config->
find(
"mgridforcevoff");
7722 while (current != NULL) {
7725 int curlen = strlen(current->
data);
7727 sscanf(current->
data,
"%80s%n",key,&nread);
7728 char *val = current->
data + nread + 1;
7731 mgfp = mgridforcelist.find_key(key);
7732 if ( mgfp == NULL) {
7733 iout <<
iINFO <<
"MGRIDFORCEVOFF no key " 7734 << key <<
" defined for vector " << val <<
"\n" <<
endi;
7739 current = current->
next;
7742 current = config->
find(
"mgridforcecol");
7743 while (current != NULL) {
7746 int curlen = strlen(current->
data);
7747 sscanf(current->
data,
"%80s%255s",key,valstr);
7750 mgfp = mgridforcelist.find_key(key);
7751 if ( mgfp == NULL) {
7752 iout <<
iINFO <<
"MGRIDFORCECOL no key " 7753 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7755 int collen = strlen(valstr);
7763 current = current->
next;
7766 current = config->
find(
"mgridforcechargecol");
7767 while (current != NULL) {
7770 int curlen = strlen(current->
data);
7771 sscanf(current->
data,
"%80s%255s",key,valstr);
7774 mgfp = mgridforcelist.find_key(key);
7775 if ( mgfp == NULL) {
7776 iout <<
iINFO <<
"MGRIDFORCECHARGECOL no key " 7777 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7779 int collen = strlen(valstr);
7787 current = current->
next;
7790 current = config->
find(
"mgridforcecont1");
7791 while (current != NULL) {
7794 int curlen = strlen(current->
data);
7795 sscanf(current->
data,
"%80s%255s",key,valstr);
7798 mgfp = mgridforcelist.find_key(key);
7799 if ( mgfp == NULL) {
7800 iout <<
iINFO <<
"MGRIDFORCECONT1 no key " 7801 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7804 if (boolval == -1) {
7806 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7812 current = current->
next;
7815 current = config->
find(
"mgridforcecont2");
7816 while (current != NULL) {
7819 int curlen = strlen(current->
data);
7820 sscanf(current->
data,
"%80s%255s",key,valstr);
7823 mgfp = mgridforcelist.find_key(key);
7824 if ( mgfp == NULL) {
7825 iout <<
iINFO <<
"MGRIDFORCECONT2 no key " 7826 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7829 if (boolval == -1) {
7831 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7837 current = current->
next;
7839 current = config->
find(
"mgridforcecont3");
7840 while (current != NULL) {
7843 int curlen = strlen(current->
data);
7844 sscanf(current->
data,
"%80s%255s",key,valstr);
7847 mgfp = mgridforcelist.find_key(key);
7848 if ( mgfp == NULL) {
7849 iout <<
iINFO <<
"MGRIDFORCECONT3 no key " 7850 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7854 if (boolval == -1) {
7856 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7862 current = current->
next;
7866 current = config->
find(
"mgridforcechecksize");
7867 while (current != NULL) {
7870 int curlen = strlen(current->
data);
7871 sscanf(current->
data,
"%80s%255s",key,valstr);
7874 mgfp = mgridforcelist.find_key(key);
7875 if ( mgfp == NULL) {
7876 iout <<
iINFO <<
"MGRIDFORCECHECKSIZE no key " 7877 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7880 if (boolval == -1) {
7881 iout <<
iINFO <<
"MGRIDFORCECHECKSIZE key " 7882 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7888 current = current->
next;
7898 while (params != NULL) {
7901 sprintf(errmsg,
"Value undefined for gridforceFile for key %s\n",
7907 sprintf(errmsg,
"Value undefined for gridforceCol for key %s\n",
7911 params = params->
next;
7916 void SimParameters::parse_mgrid_string_param(
ConfigList *cl,
7917 const char *fieldname,
7923 if (vallist != NULL) {
7924 val = vallist->
data;
7937 *dest =
new char[len+1];
7938 strncpy(*dest,val,len+1);
7945 void SimParameters::parse_group_restraints_params(
ConfigList *config)
7952 if (groupRestraintsOn) {
7954 arguments = config->
find(
"group1File");
7955 for ( ; arguments != NULL; arguments = arguments->
next) {
7956 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
7957 groupRestraints.SetGroup1AtomFileIndices(key, strValue);
7959 sprintf(err_msg,
"For group1File, expected a tag and file name, but recieved: %s\n", arguments->
data);
7964 arguments = config->
find(
"group1List");
7965 for ( ; arguments != NULL; arguments = arguments->
next) {
7967 sscanf(arguments->
data,
"%127s%n", key, &nread);
7968 char *val = arguments->
data + nread + 1;
7969 groupRestraints.SetGroup1AtomListIndices(key, val);
7972 arguments = config->
find(
"group1RefPos");
7973 for ( ; arguments != NULL; arguments = arguments->
next) {
7975 sscanf(arguments->
data,
"%127s%n", key, &nread);
7976 char *val = arguments->
data + nread + 1;
7977 groupRestraints.SetGroup1RefPosition(key, val);
7980 arguments = config->
find(
"group2File");
7981 for ( ; arguments != NULL; arguments = arguments->
next) {
7982 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
7983 groupRestraints.SetGroup2AtomFileIndices(key, strValue);
7985 sprintf(err_msg,
"For group2File, expected a tag and file name, but recieved: %s\n", arguments->
data);
7990 arguments = config->
find(
"group2List");
7991 for ( ; arguments != NULL; arguments = arguments->
next) {
7993 sscanf(arguments->
data,
"%127s%n", key, &nread);
7994 char *val = arguments->
data + nread + 1;
7995 groupRestraints.SetGroup2AtomListIndices(key, val);
7998 arguments = config->
find(
"groupResK");
7999 for ( ; arguments != NULL; arguments = arguments->
next) {
8001 if (sscanf(arguments->
data,
"%127s%lf", key, &kForce) == 2) {
8002 groupRestraints.SetForce(key, kForce);
8004 sprintf(err_msg,
"For groupResK, expected a tag and force value, but recieved: %s\n", arguments->
data);
8009 arguments = config->
find(
"groupResExp");
8010 for ( ; arguments != NULL; arguments = arguments->
next) {
8012 if (sscanf(arguments->
data,
"%127s%d", key, &exponent) == 2) {
8013 groupRestraints.SetExponent(key, exponent);
8015 sprintf(err_msg,
"For groupResExp, expected a tag and exponent but recieved: %s\n", arguments->
data);
8020 arguments = config->
find(
"groupResCenter");
8021 for ( ; arguments != NULL; arguments = arguments->
next) {
8023 sscanf(arguments->
data,
"%127s%n", key, &nread);
8024 char *val = arguments->
data + nread + 1;
8025 groupRestraints.SetResCenter(key, val);
8028 arguments = config->
find(
"groupResX");
8029 for ( ; arguments != NULL; arguments = arguments->
next) {
8030 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8031 groupRestraints.SetResDirectionX(key, strValue);
8033 sprintf(err_msg,
"For groupResX, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8038 arguments = config->
find(
"groupResY");
8039 for ( ; arguments != NULL; arguments = arguments->
next) {
8040 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8041 groupRestraints.SetResDirectionY(key, strValue);
8043 sprintf(err_msg,
"For groupResY, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8048 arguments = config->
find(
"groupResZ");
8049 for ( ; arguments != NULL; arguments = arguments->
next) {
8050 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8051 groupRestraints.SetResDirectionZ(key, strValue);
8053 sprintf(err_msg,
"For groupResZ, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8058 arguments = config->
find(
"groupResUseMagnitude");
8059 for ( ; arguments != NULL; arguments = arguments->
next) {
8060 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8061 groupRestraints.SetUseDistMagnitude(key, strValue);
8063 sprintf(err_msg,
"For groupResUseMagnitude, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8073 void SimParameters::create_output_directories(
const char *dirname){
8078 int baselen = strlen(outputFilename);
8079 char *filename =
new char[baselen+32];
8080 memset(filename, 0, baselen+32);
8081 strcpy(filename, outputFilename);
8082 if(access(filename, F_OK)!=0) {
8083 int ret =
MKDIR(filename);
8086 sprintf(errmsg,
"Error in creating top-level directory %s!", filename);
8093 strcat(filename, dirname);
8095 if(access(filename, F_OK)!=0) {
8096 int ret =
MKDIR(filename);
8099 sprintf(errmsg,
"Error in creating middle-level directory %s!", filename);
8106 for(
int i=0; i<numoutputprocs; i++) {
8107 memset(tmpstr, 0, 256);
8108 sprintf(tmpstr,
"%s%s%d", filename,
PATHSEPSTR, i);
8109 if(access(tmpstr, F_OK)!=0) {
8110 int ret =
MKDIR(tmpstr);
8113 sprintf(errmsg,
"Error in creating last-level directory %s!", tmpstr);
8126 #define BoolToString(b) ((b) ? "TRUE" : "FALSE") 8128 void SimParameters::print_mgrid_params()
8132 while (params != NULL) {
8143 const char *qcol_msg =
"Use atom charge";
8147 iout <<
iINFO <<
" ChargeCol " << qcol_msg
8163 iout <<
iINFO <<
" Gridforce-CheckSize " 8166 params = params->
next;
8193 if ( FFTWWisdomString ) {
8194 int fftwlen = strlen(FFTWWisdomString) + 1;
8196 msg->
put(fftwlen,FFTWWisdomString);
8198 if ( tclBCScript ) {
8199 int tcllen = strlen(tclBCScript) + 1;
8201 msg->
put(tcllen,tclBCScript);
8204 #ifdef MEM_OPT_VERSION 8205 int filelen = strlen(binAtomFile)+1;
8207 msg->
put(filelen, binAtomFile);
8209 filelen = strlen(binCoorFile)+1;
8211 msg->
put(filelen, binCoorFile);
8214 filelen = strlen(binVelFile)+1;
8216 msg->
put(filelen, binVelFile);
8220 filelen = strlen(binRefFile)+1;
8222 msg->
put(filelen, binRefFile);
8226 mgridforcelist.pack_data(msg);
8245 if ( FFTWWisdomString ) {
8248 FFTWWisdomString =
new char[fftwlen];
8249 msg->
get(fftwlen,FFTWWisdomString);
8252 fftwf_import_wisdom_from_string(FFTWWisdomString);
8254 fftw_import_wisdom_from_string(FFTWWisdomString);
8258 if ( tclBCScript ) {
8261 tclBCScript =
new char[tcllen];
8262 msg->
get(tcllen,tclBCScript);
8265 #ifdef MEM_OPT_VERSION 8268 binAtomFile =
new char[filelen];
8269 msg->
get(filelen, binAtomFile);
8272 binCoorFile =
new char[filelen];
8273 msg->
get(filelen, binCoorFile);
8277 binVelFile =
new char[filelen];
8278 msg->
get(filelen, binVelFile);
8283 binRefFile =
new char[filelen];
8284 msg->
get(filelen, binRefFile);
8291 mgridforcelist.clear();
8292 mgridforcelist.unpack_data(msg);
8301 if ( alchLambdaIDWS >= 0. ) {
8302 const BigReal lambda2 = ( (step / alchIDWSFreq) % 2 == 1 ) ? alchLambda2 : alchLambdaIDWS;
8311 if (alchLambdaIDWS < 0.)
return 0;
8312 if (alchLambdaIDWS > 1.) {
8313 NAMD_die(
"alchLambdaIDWS should be either in the range [0.0, 1.0], or negative (disabled).\n");
8326 if ( alchOutFreq % nonbondedFrequency != 0 ) {
8327 NAMD_die(
"For IDWS, alchOutFreq must be a multiple of nonBondedFrequency.\n");
8329 if ( fullElectFrequency > 0 ) {
8330 if ( alchOutFreq % fullElectFrequency != 0 ) {
8331 NAMD_die(
"For IDWS, alchOutFreq must be a multiple of fullElectFrequency.\n");
8334 if ( alchOutFreq ) {
8335 alchIDWSFreq = alchOutFreq;
8336 }
else if ( outputEnergies ) {
8337 alchIDWSFreq = outputEnergies;
8339 NAMD_die(
"Either alchOutFreq or outputEnergies should be non-zero.\n");
8341 if ( alchOutFreq && alchOutFreq != outputEnergies) {
8342 iout <<
iWARN <<
"alchOutFreq and outputEnergies do not match. IDWS output" 8343 <<
" to stdout may not be useful!\n" <<
endi;
8370 if ( alchLambdaFreq > 0 && step >= alchEquilSteps ) {
8375 const int timeOrigin = firstTimestep + alchEquilSteps;
8376 const BigReal alchLambdaDelta = getLambdaDelta();
8377 const BigReal increment = (step - timeOrigin) /
BigReal(alchLambdaFreq);
8378 return alchLambda + alchLambdaDelta*(floor(increment) + 1);
8388 return ((alchLambda2 - alchLambda)*alchLambdaFreq
8389 /
BigReal(N - firstTimestep - alchEquilSteps));
8394 return (lambda <= alchElecLambdaStart ? 0.
8395 : (lambda - alchElecLambdaStart) / (1. - alchElecLambdaStart));
8412 if ( lambda < alchRepLambdaEnd || alchRepLambdaEnd == 1.0 ) {
8414 }
else if ( lambda >= alchVdwLambdaEnd ) {
8417 return (lambda - alchRepLambdaEnd) / (alchVdwLambdaEnd - alchRepLambdaEnd);
8420 return (lambda >= alchVdwLambdaEnd ? 1. : lambda / alchVdwLambdaEnd);
8426 return (lambda >= alchRepLambdaEnd ? 1. : lambda / alchRepLambdaEnd);
8431 return (lambda >= alchBondLambdaEnd ? 1. : lambda / alchBondLambdaEnd);
8435 size_t num_max_grids = 1;
8436 if (!alchOn)
return num_max_grids;
8437 if (alchFepOn && !alchThermIntOn) {
8442 if (alchElecLambdaStart > 0) {
8446 if (!alchFepOn && alchThermIntOn) {
8452 return num_max_grids;
std::ostream & iINFO(std::ostream &s)
int istrueinparseopts(const char *name)
BigReal getBondLambda(const BigReal) const
void receive_SimParameters(MIStream *)
NAMD_HOST_DEVICE int c_p() const
Bool defined(const char *name)
Bool units(const char *name, Units units)
int atobool(const char *s)
NAMD_HOST_DEVICE void set(Vector A, Vector B, Vector C)
#define LDBSTRAT_REFINEONLY
std::ostream & endi(std::ostream &s)
#define SCRIPT_PARSE_VECTOR(NAME, VAR)
void scriptSet(const char *, const char *)
__thread DeviceCUDA * deviceCUDA
std::ostream & iWARN(std::ostream &s)
MIStream * get(char &data)
int optionalB(const char *newname, const char *parent, const char *msg, int *ptr, int defalt)
BigReal getElecLambda(const BigReal) const
NAMD_HOST_DEVICE int b_p() const
int require(const char *newname, const char *parent, const char *msg, BigReal *ptr, BigReal defalt)
void initialize_config_data(ConfigList *, char *&cwd)
#define MAX_SCRIPT_PARAM_SIZE
static int atoBool(const char *s)
Bool set(const ConfigList &configlist)
#define SCRIPT_PARSE_STRING(NAME, VAR)
#define SCRIPT_PARSE_INT(NAME, VAR)
void NAMD_bug(const char *err_msg)
#define SPLIT_PATCH_HYDROGEN
static ComputeCUDAMgr * getComputeCUDAMgr()
#define MGRIDFORCEPARAMS_DEFAULTKEY
NAMD_HOST_DEVICE int a_p() const
void readExtendedSystem(const char *filename, Lattice *latptr=0)
void NAMD_die(const char *err_msg)
#define LDBAL_CENTRALIZED
static void nonbonded_select()
char * getfromparseopts(const char *name, char *outbuf)
#define LDBSTRAT_COMPREHENSIVE
BigReal getCurrentLambda2(const int) const
BigReal getCurrentLambda(const int) const
BigReal getLambdaDelta(void) const
int optional(const char *newname, const char *parent, const char *msg, BigReal *ptr, BigReal defalt)
#define CKLOOP_CTRL_PME_FORWARDFFT
#define SCRIPT_PARSE_BOOL(NAME, VAR)
Bool get(const char *name, int *val)
Range range(const char *name)
BigReal getVdwLambda(const BigReal) const
BigReal getRepLambda(const BigReal) const
MOStream * put(char data)
size_t alchGetNumOfPMEGrids() const
#define SPLIT_PATCH_POSITION
Bool check_consistency(void)
StringList * find(const char *name) const
bool one_device_per_node()
#define SCRIPT_PARSE_MOD_FLOAT(NAME, VAR, MOD)
int issetinparseopts(const char *name)
void send_SimParameters(MOStream *)
#define SCRIPT_PARSE_FLOAT(NAME, VAR)