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",
767 opts.
optionalB(
"main",
"GPUresidentSingleProcess",
"Use GPU-resident single-process mode",
768 &GPUresidentSingleProcessMode,
TRUE);
770 opts.
optional(
"main",
"movingAverageWindowSize",
771 "Window size for moving averages of reductions for GPUresident",
772 &movingAverageWindowSize, 20);
773 opts.
optionalB(
"main",
"nsPerDay",
"Prints sampling rate in ns/day instead of days/ns",
775 #ifdef TIMER_COLLECTION 776 opts.
optional(
"main",
"TimerBinWidth",
777 "Bin width of timer histogram collection in microseconds",
778 &timerBinWidth, 1.0);
780 #if defined(NAMD_NVTX_ENABLED) || defined(NAMD_CMK_TRACE_ENABLED) || defined(NAMD_ROCTX_ENABLED) 782 opts.
optional(
"main",
"beginEventPatchID",
"Beginning patch ID for profiling",
783 &beginEventPatchID, 0);
784 opts.
optional(
"main",
"endEventPatchID",
"Ending patch ID for profiling",
785 &endEventPatchID, 5000);
787 opts.
optional(
"main",
"beginEventStep",
"Beginning time step for profiling",
789 opts.
optional(
"main",
"endEventStep",
"Ending time step for profiling",
790 &endEventStep, 1000);
792 opts.
optionalB(
"main",
"mshake",
"Using MSHAKE for rigid bond constraints",
794 opts.
optionalB(
"main",
"lincs",
"Using LINCS for rigid bond constrainsts",
797 opts.
optionalB(
"main",
"CUDAForceTable",
"Always use force table interpolation for nonbonded CUDA kernel",
798 &useCUDANonbondedForceTable,
TRUE);
799 opts.
optionalB(
"main",
"GPUForceTable",
"Always use force table interpolation for nonbonded GPU kernel",
800 &useGPUNonbondedForceTable);
802 opts.
optionalB(
"main",
"DeviceMigration",
"Perform migration on the device",
803 &useDeviceMigration,
FALSE);
804 opts.
optionalB(
"main",
"GPUAtomMigration",
"Perform atom migration on GPU",
805 &useGPUAtomMigration);
806 opts.
optionalB(
"main",
"UpdateAtomMap",
"Update the atom map when using GPU migration",
807 &updateAtomMap,
FALSE);
810 void SimParameters::config_parser_fileio(
ParseOptions &opts) {
822 opts.
optional(
"main",
"coordinates",
"initial PDB coordinate file",
826 "initial velocities, given as a PDB file",
PARSE_STRING);
827 opts.
optional(
"main",
"binvelocities",
828 "initial velocities, given as a binary restart",
PARSE_STRING);
829 opts.
optional(
"main",
"bincoordinates",
830 "initial coordinates in a binary restart file",
PARSE_STRING);
831 #ifdef MEM_OPT_VERSION 832 opts.
optional(
"main",
"binrefcoords",
833 "reference coordinates in a binary restart file",
PARSE_STRING);
838 opts.
optional(
"main",
"structure",
"initial PSF structure file",
845 "CHARMm 19 or CHARMm 22 compatable force field file (multiple " 851 opts.
optionalB(
"parameters",
"paraTypeXplor",
"Parameter file in Xplor format?", ¶TypeXplorOn,
FALSE);
852 opts.
optionalB(
"parameters",
"paraTypeCharmm",
"Parameter file in Charmm format?", ¶TypeCharmmOn,
FALSE);
856 opts.
optionalB(
"main",
"GromacsPair",
"Separately calculate pair interactions", &goGroPair,
FALSE);
857 opts.
optionalB(
"main",
"GoForcesOn",
"Go forces will be calculated", &goForcesOn,
FALSE);
858 opts.
require(
"GoForcesOn",
"GoParameters",
"Go parameter file", goParameters);
859 opts.
require(
"GoForcesOn",
"GoCoordinates",
"target coordinates for Go forces", goCoordinates);
864 opts.
require(
"GoForcesOn",
"GoMethod",
"Which type of matrix should be used to store Go contacts?",
PARSE_STRING);
867 opts.
require(
"main",
"outputname",
868 "prefix for the final PDB position and velocity filenames",
871 opts.
optional(
"main",
"auxFile",
"Filename for data stream output",
874 opts.
optional(
"main",
"numinputprocs",
"Number of pes to use for parallel input",
878 opts.
optional(
"main",
"numoutputprocs",
"Number of pes to use for parallel output",
881 opts.
optional(
"main",
"numoutputwriters",
"Number of output processors that simultaneously write to an output file",
885 opts.
optional(
"main",
"DCDfreq",
"Frequency of DCD trajectory output, in " 886 "timesteps", &dcdFrequency, 0);
888 opts.
optional(
"DCDfreq",
"DCDfile",
"DCD trajectory output file name",
890 opts.
optionalB(
"DCDfreq",
"DCDunitcell",
"Store unit cell in dcd timesteps?",
893 opts.
optional(
"main",
"velDCDfreq",
"Frequency of velocity " 894 "DCD output, in timesteps", &velDcdFrequency, 0);
896 opts.
optional(
"velDCDfreq",
"velDCDfile",
"velocity DCD output file name",
899 opts.
optional(
"main",
"forceDCDfreq",
"Frequency of force" 900 "DCD output, in timesteps", &forceDcdFrequency, 0);
902 opts.
optional(
"forceDCDfreq",
"forceDCDfile",
"force DCD output file name",
905 opts.
optional(
"main",
"XSTfreq",
"Frequency of XST trajectory output, in " 906 "timesteps", &xstFrequency, 0);
908 opts.
optional(
"XSTfreq",
"XSTfile",
"Extended sytem trajectory output " 909 "file name", xstFilename);
911 opts.
optional(
"main",
"restartfreq",
"Frequency of restart file " 912 "generation", &restartFrequency, 0);
914 opts.
optional(
"restartfreq",
"restartname",
"Prefix for the position and " 915 "velocity PDB files used for restarting", restartFilename);
916 opts.
optionalB(
"restartfreq",
"restartsave",
"Save restart files with " 917 "unique filenames rather than overwriting", &restartSave,
FALSE);
918 opts.
optionalB(
"restartfreq",
"restartsavedcd",
"Save DCD files with " 919 "unique filenames at each restart", &restartSaveDcd,
FALSE);
921 opts.
optionalB(
"restartfreq",
"binaryrestart",
"Specify use of binary restart files ",
922 &binaryRestart,
TRUE);
924 opts.
optional(
"main",
"crashOutputFlag",
925 "Flag of saving atom positions and velocities in case of crashing", &crashOutputFlag,
NAMD_CRASH_ALL);
926 opts.
optional(
"crashOutputFlag",
"crashFile",
927 "Positions and velocities output file when crashing", crashFilename);
929 opts.
optionalB(
"outputname",
"binaryoutput",
"Specify use of binary output files ",
930 &binaryOutput,
TRUE);
932 opts.
optionalB(
"main",
"amber",
"Is it AMBER force field?",
934 opts.
optionalB(
"amber",
"oldParmReader",
"Use the old AMBER parm/parm7 reader?", &oldParmReader,
FALSE);
935 opts.
optionalB(
"amber",
"readexclusions",
"Read exclusions from parm file?",
936 &readExclusions,
TRUE);
937 opts.
require(
"amber",
"scnb",
"1-4 VDW interactions are divided by scnb",
943 opts.
optionalB(
"main",
"gromacs",
"Use GROMACS-like force field?",
945 opts.
require(
"gromacs",
"grotopfile",
"GROMACS topology file",
947 opts.
optional(
"gromacs",
"grocoorfile",
"GROMACS coordinate file",
951 opts.
optionalB(
"main",
"vdwGeometricSigma",
952 "Use geometric mean to combine L-J sigmas, as for OPLS",
953 &vdwGeometricSigma,
FALSE);
956 opts.
optional(
"main",
"computeMapFile",
"Filename for computeMap",
958 opts.
optionalB(
"main",
"storeComputeMap",
"store computeMap?",
959 &storeComputeMap,
FALSE);
960 opts.
optionalB(
"main",
"loadComputeMap",
"load computeMap?",
961 &loadComputeMap,
FALSE);
964 void SimParameters::config_parser_fullelect(
ParseOptions &opts) {
968 DebugM(1,
"DPMTA setup start\n");
970 opts.
optionalB(
"main",
"FMA",
"Should FMA be used?", &FMAOn,
FALSE);
971 opts.
optional(
"FMA",
"FMALevels",
"Tree levels to use in FMA", &FMALevels,
974 opts.
optional(
"FMA",
"FMAMp",
"Number of FMA multipoles", &FMAMp, 8);
976 opts.
optionalB(
"FMA",
"FMAFFT",
"Use FFT enhancement in FMA?", &FMAFFTOn,
TRUE);
977 opts.
optional(
"FMAFFT",
"FMAFFTBlock",
"FFT blocking factor",
980 DebugM(1,
"DPMTA setup end\n");
990 opts.
optional(
"main",
"fullElectFrequency",
991 "Number of steps between full electrostatic executions",
992 &fullElectFrequency);
995 opts.
optional(
"main",
"fullDispersionFrequency",
996 "Number of steps between full LJ dispersion executions",
997 &fullDispersionFrequency, 1);
1001 opts.
optional(
"main",
"fmaFrequency",
1002 "Number of steps between full electrostatic executions",
1007 "FMA theta parameter value",
1011 opts.
optionalB(
"main",
"FullDirect",
"Should direct calculations of full electrostatics be performed?",
1012 &fullDirectOn,
FALSE);
1018 "Use multilevel summation method for electrostatics?",
1020 opts.
optional(
"MSM",
"MSMQuality",
"MSM quality",
1022 opts.
optional(
"MSM",
"MSMApprox",
"MSM approximation",
1024 opts.
optional(
"MSM",
"MSMSplit",
"MSM splitting",
1026 opts.
optional(
"MSM",
"MSMLevels",
"MSM maximum number of levels",
1028 opts.
optional(
"MSM",
"MSMGridSpacing",
"MSM grid spacing (Angstroms)",
1029 &MSMGridSpacing, 2.5);
1030 opts.
optional(
"MSM",
"MSMPadding",
"MSM padding (Angstroms)",
1032 opts.
optional(
"MSM",
"MSMxmin",
"MSM x minimum (Angstroms)", &MSMxmin, 0);
1033 opts.
optional(
"MSM",
"MSMxmax",
"MSM x maximum (Angstroms)", &MSMxmax, 0);
1034 opts.
optional(
"MSM",
"MSMymin",
"MSM y minimum (Angstroms)", &MSMymin, 0);
1035 opts.
optional(
"MSM",
"MSMymax",
"MSM y maximum (Angstroms)", &MSMymax, 0);
1036 opts.
optional(
"MSM",
"MSMzmin",
"MSM z minimum (Angstroms)", &MSMzmin, 0);
1037 opts.
optional(
"MSM",
"MSMzmax",
"MSM z maximum (Angstroms)", &MSMzmax, 0);
1038 opts.
optional(
"MSM",
"MSMBlockSizeX",
1039 "MSM grid block size along X direction (for decomposing parallel work)",
1041 opts.
optional(
"MSM",
"MSMBlockSizeY",
1042 "MSM grid block size along Y direction (for decomposing parallel work)",
1044 opts.
optional(
"MSM",
"MSMBlockSizeZ",
1045 "MSM grid block size along Z direction (for decomposing parallel work)",
1049 "Use MSM serial version for long-range calculation?",
1050 &MsmSerialOn,
FALSE);
1056 "Use fast multipole method for electrostatics?",
1058 opts.
optional(
"FMM",
"FMMLevels",
"FMM number of levels",
1060 opts.
optional(
"FMM",
"FMMPadding",
"FMM padding margin (Angstroms)",
1065 opts.
optionalB(
"main",
"LJPME",
"Use particle mesh Ewald for LJ dispersion?",
1067 opts.
optional(
"LJPME",
"LJPMETolerance",
"LJ-PME direct space tolerance",
1068 &LJPMETolerance, 1.e-6);
1069 opts.
optional(
"LJPME",
"LJPMEInterpOrder",
"LJ-PME interpolation order",
1070 &LJPMEInterpOrder, 4);
1071 opts.
optional(
"LJPME",
"LJPMEGridSizeX",
"LJ-PME grid in x dimension",
1072 &LJPMEGridSizeX, 0);
1073 opts.
optional(
"LJPME",
"LJPMEGridSizeY",
"LJ-PME grid in y dimension",
1074 &LJPMEGridSizeY, 0);
1075 opts.
optional(
"LJPME",
"LJPMEGridSizeZ",
"LJ-PME grid in z dimension",
1076 &LJPMEGridSizeZ, 0);
1077 opts.
optional(
"LJPME",
"LJPMEGridSpacing",
"Maximum LJ-PME grid spacing (Angstroms)",
1078 &LJPMEGridSpacing, 0.);
1086 opts.
optionalB(
"LJPME",
"LJPMESerial",
"LJ-PME use serial implementation",
1087 &LJPMESerial,
FALSE);
1091 opts.
optionalB(
"main",
"PME",
"Use particle mesh Ewald for electrostatics?",
1093 opts.
optional(
"PME",
"PMETolerance",
"PME direct space tolerance",
1094 &PMETolerance, 1.e-6);
1095 opts.
optional(
"PME",
"PMEInterpOrder",
"PME interpolation order",
1096 &PMEInterpOrder, 4);
1097 opts.
optional(
"PME",
"PMEGridSizeX",
"PME grid in x dimension",
1099 opts.
optional(
"PME",
"PMEGridSizeY",
"PME grid in y dimension",
1101 opts.
optional(
"PME",
"PMEGridSizeZ",
"PME grid in z dimension",
1103 opts.
optional(
"PME",
"PMEGridSpacing",
"Maximum PME grid spacing (Angstroms)",
1104 &PMEGridSpacing, 0.);
1106 opts.
optional(
"PME",
"PMEProcessors",
1107 "PME FFT and reciprocal sum processor count", &PMEProcessors, 0);
1108 opts.
optional(
"PME",
"PMEMinSlices",
1109 "minimum thickness of PME reciprocal sum slab", &PMEMinSlices, 2);
1112 "PME FFT and reciprocal sum pencil grid size", &PMEPencils, -1);
1113 opts.
optional(
"PME",
"PMEPencilsX",
1114 "PME FFT and reciprocal sum pencil grid size X", &PMEPencilsX, 0);
1115 opts.
optional(
"PME",
"PMEPencilsY",
1116 "PME FFT and reciprocal sum pencil grid size Y", &PMEPencilsY, 0);
1117 opts.
optional(
"PME",
"PMEPencilsZ",
1118 "PME FFT and reciprocal sum pencil grid size Z", &PMEPencilsZ, 0);
1122 opts.
optional(
"PME",
"PMEPencilsYLayout",
1123 "PME FFT and reciprocal sum Y pencil layout strategy", &PMEPencilsYLayout, 0);
1124 opts.
optional(
"PME",
"PMEPencilsXLayout",
1125 "PME FFT and reciprocal sum X pencil layout strategy", &PMEPencilsXLayout, 1);
1128 opts.
optional(
"PME",
"PMESendOrder",
1129 "PME message ordering control", &PMESendOrder, 0);
1131 opts.
optional(
"PME",
"PMEMinPoints",
1132 "minimum points per PME reciprocal sum pencil", &PMEMinPoints, 10000);
1134 opts.
optionalB(
"main",
"PMEBarrier",
"Use barrier in PME?",
1135 &PMEBarrier,
FALSE);
1136 opts.
optionalB(
"main",
"PMEOffload",
"Offload PME to accelerator?",
1139 opts.
optionalB(
"PME",
"usePMECUDA",
"Use the PME CUDA version", &usePMECUDA, CmiNumPhysicalNodes() == 1);
1140 opts.
optionalB(
"PME",
"usePMEGPU",
"Use the PME GPU version", &usePMEGPU);
1143 opts.
optionalB(
"PME",
"useDPME",
"Use old DPME code?", &useDPME,
FALSE);
1147 opts.
optionalB(
"main",
"FFTWPatient",
"Use intensive plan creation to optimize FFTW?",
1149 &FFTWPatient,
TRUE);
1151 &FFTWPatient,
FALSE);
1154 opts.
optionalB(
"main",
"FFTWEstimate",
"Use estimates to optimize FFTW?",
1156 &FFTWEstimate,
TRUE);
1158 &FFTWEstimate,
FALSE);
1160 opts.
optionalB(
"main",
"FFTWUseWisdom",
"Read/save wisdom file for FFTW?",
1162 &FFTWUseWisdom,
FALSE);
1164 &FFTWUseWisdom,
TRUE);
1166 opts.
optional(
"FFTWUseWisdom",
"FFTWWisdomFile",
"File for FFTW wisdom",
1180 "Use \"Tiles\" mode for AVX-512 optimized calculations",
1181 &useAVXTiles,
TRUE);
1182 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 1183 opts.
optionalB(
"main",
"gpuGlobal",
"use GPU global (external) force",
1184 &useCudaGlobal,
FALSE);
1186 opts.
optional(
"gpuGlobal",
"gpuGlobalProfilingFreq",
"Frequency of printing GPU global profiling information", &cudaGlobalProfilingFreq, -1);
1188 useCudaGlobal =
false;
1192 void SimParameters::config_parser_methods(
ParseOptions &opts) {
1195 opts.
optionalB(
"main",
"minimization",
"Should minimization be performed?",
1196 &minimizeCGOn,
FALSE);
1197 opts.
optionalB(
"main",
"minVerbose",
"Print extra minimization diagnostics?",
1198 &minVerbose,
FALSE);
1199 opts.
optional(
"main",
"minTinyStep",
"very first minimization steps",
1200 &minTinyStep, 1.0e-6);
1202 opts.
optional(
"main",
"minBabyStep",
"initial minimization steps",
1203 &minBabyStep, 1.0e-2);
1205 opts.
optional(
"main",
"minLineGoal",
"line minimization gradient reduction",
1206 &minLineGoal, 1.0e-3);
1209 opts.
optionalB(
"main",
"velocityQuenching",
1210 "Should old-style minimization be performed?", &minimizeOn,
FALSE);
1212 opts.
optional(
"main",
"maximumMove",
"Maximum atom movement per step", &maximumMove, 0.0);
1216 opts.
optionalB(
"main",
"Langevin",
"Should Langevin dynamics be performed?",
1217 &langevinOn,
FALSE);
1218 opts.
require(
"Langevin",
"langevinTemp",
"Temperature for heat bath in Langevin " 1219 "dynamics", &langevinTemp);
1222 opts.
optional(
"Langevin",
"langevinDamping",
"Damping coefficient (1/ps)",
1225 opts.
optionalB(
"Langevin",
"langevinHydrogen",
"Should Langevin dynamics be applied to hydrogen atoms?",
1227 opts.
optional(
"Langevin",
"langevinFile",
"PDB file with temperature " 1228 "coupling terms (B(i)) (default is the PDB input file)",
1230 opts.
optional(
"Langevin",
"langevinCol",
"Column in the langevinFile " 1231 "containing the temperature coupling term B(i);\n" 1235 opts.
optionalB(
"Langevin",
"langevinBAOAB",
1236 "Should Langevin dynamics be performed using BAOAB integration?",
1237 &langevin_useBAOAB,
FALSE);
1240 opts.
optionalB(
"main",
"LoweAndersen",
"Should Lowe-Andersen dynamics be performed?",
1241 &loweAndersenOn,
FALSE);
1242 opts.
require(
"LoweAndersen",
"loweAndersenTemp",
"Temperature for heat bath in Lowe-Andersen " 1243 "dynamics", &loweAndersenTemp);
1246 opts.
optional(
"LoweAndersen",
"loweAndersenRate",
"Collision rate (1/ps)",
1247 &loweAndersenRate, 50);
1249 opts.
optional(
"LoweAndersen",
"loweAndersenCutoff",
"Cutoff radius",
1250 &loweAndersenCutoff, 2.7);
1256 opts.
optionalB(
"main",
"alch",
"Is achemical simulation being performed?",
1258 opts.
require(
"alch",
"alchLambda",
"Alchemical coupling parameter value",
1262 opts.
optionalB(
"alch",
"singleTopology",
1263 "Is single topology used for relative free energy?", &singleTopology,
FALSE);
1266 "Is S-D bonded terms scaling for relative free energy?", &sdScaling,
FALSE);
1268 opts.
optional(
"alch",
"alchFile",
"PDB file with perturbation flags " 1270 opts.
optional(
"alch",
"alchCol",
"Column in the alchFile with the " 1273 opts.
optional(
"alch",
"unperturbedBondFile",
"mini psf file with unperturbed bond info" 1275 opts.
optional(
"alch",
"alchOutFreq",
"Frequency of alchemical energy" 1276 "output in timesteps", &alchOutFreq, 5);
1278 opts.
optional(
"alch",
"alchOutFile",
"Alchemical energy output filename",
1282 opts.
optional(
"alch",
"alchVdwShiftCoeff",
"Coeff used for generating" 1283 "the altered alchemical vDW interactions", &alchVdwShiftCoeff, 5.);
1286 opts.
optionalB(
"alch",
"alchWCA",
"Is WCA decomposition being performed?",
1290 opts.
optional(
"alch",
"alchElecLambdaStart",
"Lambda at which electrostatic" 1291 "scaling of exnihilated particles begins", &alchElecLambdaStart, 0.5);
1294 opts.
optional(
"alch",
"alchVdwLambdaEnd",
"Lambda at which vdW" 1295 "scaling of exnihilated particles ends", &alchVdwLambdaEnd, 1.0);
1298 opts.
optional(
"alch",
"alchRepLambdaEnd",
"Lambda at which repulsive vdW" 1299 "scaling of exnihilated particles ends and attractive vdW scaling" 1300 "begins", &alchRepLambdaEnd, 0.5);
1303 opts.
optional(
"alch",
"alchBondLambdaEnd",
"Lambda at which bonded" 1304 "scaling of exnihilated particles begins", &alchBondLambdaEnd, 0.0);
1307 opts.
optionalB(
"alch",
"alchDecouple",
"Enable alchemical decoupling?",
1308 &alchDecouple,
FALSE);
1309 opts.
optionalB(
"alch",
"alchBondDecouple",
"Enable decoupling of purely " 1310 "alchemical bonds?", &alchBondDecouple,
FALSE);
1313 opts.
optional(
"alch",
"alchType",
"Which alchemical method to use?",
1315 opts.
optional(
"alch",
"alchLambda2",
"Alchemical coupling comparison value",
1317 opts.
optional(
"alch",
"alchLambdaIDWS",
"Alchemical coupling comparison value for interleaved double-wide sampling",
1318 &alchLambdaIDWS, -1);
1319 opts.
optional(
"alch",
"alchLambdaFreq",
1320 "Frequency of increasing coupling parameter value", &alchLambdaFreq, 0);
1322 opts.
optional(
"alch",
"alchSwitchType",
"Switching type flag",
1324 opts.
optional(
"alch",
"alchEquilSteps",
"Equilibration steps, before " 1325 "data collection in the alchemical window", &alchEquilSteps, 0);
1328 opts.
optionalB(
"alch",
"alchEnsembleAvg",
"Ensemble Average in use?",
1329 &alchEnsembleAvg,
TRUE);
1332 opts.
optionalB(
"main",
"les",
"Is locally enhanced sampling enabled?",
1334 opts.
require(
"les",
"lesFactor",
"Local enhancement factor", &lesFactor);
1335 opts.
optional(
"les",
"lesFile",
"PDB file with enhancement flags " 1337 opts.
optional(
"les",
"lesCol",
"Column in the lesFile with the " 1339 opts.
optionalB(
"les",
"lesReduceTemp",
"Reduce enhanced atom temperature?",
1340 &lesReduceTemp,
FALSE);
1341 opts.
optionalB(
"les",
"lesReduceMass",
"Reduce enhanced atom mass?",
1342 &lesReduceMass,
FALSE);
1346 "Is replica exchange solute tempering enabled?",
1347 &soluteScalingOn,
FALSE);
1348 opts.
optional(
"soluteScaling",
"soluteScalingFactor",
1349 "Solute scaling factor",
1350 &soluteScalingFactor, 1.0);
1352 opts.
optional(
"soluteScaling",
"soluteScalingFactorCharge",
1353 "Solute scaling factor for electrostatic interactions",
1354 &soluteScalingFactorCharge);
1356 opts.
optional(
"soluteScaling",
"soluteScalingFactorVdw",
1357 "Solute scaling factor for van der Waals interactions",
1358 &soluteScalingFactorVdw);
1360 opts.
optional(
"soluteScaling",
"soluteScalingFile",
1361 "PDB file with scaling flags; if undefined, defaults to main PDB file",
1363 opts.
optional(
"soluteScaling",
"soluteScalingCol",
1364 "Column in the soluteScalingFile providing the scaling flag",
1366 opts.
optionalB(
"main",
"soluteScalingAll",
1367 "Apply scaling also to bond and angle interactions?",
1368 &soluteScalingAll,
FALSE);
1371 opts.
optionalB(
"main",
"drude",
"Perform integration of Drude oscillators?",
1373 opts.
require(
"drude",
"drudeTemp",
"Temperature for freezing " 1374 "Drude oscillators", &drudeTemp);
1377 opts.
optional(
"drude",
"drudeDamping",
"Damping coefficient (1/ps) for " 1378 "Drude oscillators", &drudeDamping);
1380 opts.
optional(
"drude",
"drudeNbtholeCut",
"Nonbonded Thole interactions " 1381 "interaction radius", &drudeNbtholeCut, 5.0);
1383 opts.
optionalB(
"drude",
"drudeHardWall",
"Apply maximum Drude bond length " 1384 "restriction?", &drudeHardWallOn,
TRUE);
1385 opts.
optional(
"drude",
"drudeBondLen",
"Drude oscillator bond length " 1386 "beyond which to apply restraint", &drudeBondLen, 0.25);
1388 opts.
optional(
"drude",
"drudeBondConst",
"Drude oscillator restraining " 1389 "force constant", &drudeBondConst, 40000.0);
1393 opts.
optionalB(
"main",
"pairInteraction",
1394 "Are pair interactions calculated?", &pairInteractionOn,
FALSE);
1395 opts.
optional(
"pairInteraction",
"pairInteractionFile",
1396 "PDB files with interaction flags " "default is the input PDB file",
1398 opts.
optional(
"pairInteraction",
"pairInteractionCol",
1399 "Column in the pairInteractionFile with the interaction flags",
1401 opts.
require(
"pairInteraction",
"pairInteractionGroup1",
1402 "Flag for interaction group 1", &pairInteractionGroup1);
1403 opts.
optional(
"pairInteraction",
"pairInteractionGroup2",
1404 "Flag for interaction group 2", &pairInteractionGroup2, -1);
1405 opts.
optionalB(
"pairInteraction",
"pairInteractionSelf",
1406 "Compute only within-group interactions?", &pairInteractionSelf,
1409 opts.
optionalB(
"main",
"cosAngles",
"Are some angles cosine-based?", &cosAngles,
FALSE);
1413 opts.
optionalB(
"main",
"globalTest",
"Should global integration (for development) be used?",
1415 opts.
optionalB(
"main",
"dihedral",
"Should dihedral angle dynamics be performed?",
1416 &dihedralOn,
FALSE);
1418 opts.
optionalB(
"dihedral",
"COLD",
"Should overdamped Langevin dynamics be performed?",
1420 opts.
require(
"COLD",
"COLDTemp",
"Temperature for heat bath in COLD",
1424 opts.
require(
"COLD",
"COLDRate",
"Damping rate for COLD",
1430 "Should temperature coupling be performed?",
1432 opts.
require(
"tcouple",
"tCoupleTemp",
1433 "Temperature for temperature coupling", &tCoupleTemp);
1436 opts.
optional(
"tCouple",
"tCoupleFile",
"PDB file with temperature " 1437 "coupling terms (B(i)) (default is the PDB input file)",
1439 opts.
optional(
"tCouple",
"tCoupleCol",
"Column in the tCoupleFile " 1440 "containing the temperature coupling term B(i);\n" 1444 "Should stochastic velocity rescaling be performed?",
1445 &stochRescaleOn,
FALSE);
1446 opts.
require(
"stochRescale",
"stochRescaleTemp",
1447 "Temperature for stochastic velocity rescaling",
1451 opts.
require(
"stochRescale",
"stochRescalePeriod",
1452 "Time scale for stochastic velocity rescaling (ps)",
1453 &stochRescalePeriod);
1455 opts.
optional(
"stochRescale",
"stochRescaleFreq",
1456 "Number of steps between stochastic rescalings",
1459 opts.
optionalB(
"stochRescale",
"stochRescaleHeat",
1460 "Should heat transfer and work be computed?", &stochRescaleHeat,
FALSE);
1462 opts.
optional(
"main",
"rescaleFreq",
"Number of steps between " 1463 "velocity rescaling", &rescaleFreq);
1465 opts.
optional(
"main",
"rescaleTemp",
"Target temperature for velocity rescaling",
1470 opts.
optional(
"main",
"reassignFreq",
"Number of steps between " 1471 "velocity reassignment", &reassignFreq);
1473 opts.
optional(
"main",
"reassignTemp",
"Target temperature for velocity reassignment",
1477 opts.
optional(
"main",
"reassignIncr",
"Temperature increment for velocity reassignment",
1480 opts.
optional(
"main",
"reassignHold",
"Final holding temperature for velocity reassignment",
1486 opts.
optionalB(
"main",
"useGroupPressure",
1487 "Use group rather than atomic quantities for pressure control?",
1488 &useGroupPressure,
FALSE);
1491 opts.
optionalB(
"main",
"useFlexibleCell",
1492 "Use anisotropic cell fluctuation for pressure control?",
1493 &useFlexibleCell,
FALSE);
1497 "Fix some cell dimensions?",
1498 &fixCellDims,
FALSE);
1500 opts.
optionalB(
"fixCellDims",
"fixCellDimX",
1501 "Fix the X dimension?",
1502 &fixCellDimX,
FALSE);
1503 opts.
optionalB(
"fixCellDims",
"fixCellDimY",
1504 "Fix the Y dimension?",
1505 &fixCellDimY,
FALSE);
1506 opts.
optionalB(
"fixCellDims",
"fixCellDimZ",
1507 "Fix the Z dimension?",
1508 &fixCellDimZ,
FALSE);
1511 opts.
optionalB(
"main",
"useConstantRatio",
1512 "Use constant X-Y ratio for pressure control?",
1513 &useConstantRatio,
FALSE);
1516 opts.
optionalB(
"main",
"useConstantArea",
1517 "Use constant area for pressure control?",
1518 &useConstantArea,
FALSE);
1521 opts.
optionalB(
"main",
"excludeFromPressure",
1522 "Should some atoms be excluded from pressure rescaling?",
1523 &excludeFromPressure,
FALSE);
1524 opts.
optional(
"excludeFromPressure",
"excludeFromPressureFile",
1525 "PDB file for atoms to be excluded from pressure",
1527 opts.
optional(
"excludeFromPressure",
"excludeFromPressureCol",
1528 "Column in the excludeFromPressureFile" 1529 "containing the flags (nonzero means excluded);\n" 1533 opts.
optionalB(
"main",
"MonteCarloPressure",
1534 "Should Monte Carlo pressure control be used?",
1535 &monteCarloPressureOn,
FALSE);
1536 opts.
require(
"MonteCarloPressure",
"MonteCarloPressureTarget",
1537 "Target pressure for Monte Carlo pressure control",
1538 &monteCarloPressureTarget);
1539 opts.
require(
"MonteCarloPressure",
"MonteCarloTemp",
1540 "Temperature for Monte Carlo pressure control",
1544 opts.
optional(
"MonteCarloPressure",
"MonteCarloAcceptanceRate",
1545 "Acceptance rate for Monte Carlo pressure control",
1546 &monteCarloAcceptanceRate);
1548 opts.
optional(
"MonteCarloPressure",
"MonteCarloMaxVolume",
1549 "Maximum Volume change vector for Monte Carlo pressure control",
1550 &monteCarloMaxVolume);
1551 opts.
optional(
"MonteCarloPressure",
"MonteCarloAdjustmentFreq",
1552 "Number of steps between volume rescaling",
1553 &monteCarloAdjustmentFreq, 30);
1555 opts.
optional(
"MonteCarloPressure",
"MonteCarloPressureFreq",
1556 "Number of steps between volume rescaling",
1557 &monteCarloPressureFreq, 50);
1561 opts.
optionalB(
"main",
"BerendsenPressure",
1562 "Should Berendsen pressure bath coupling be performed?",
1563 &berendsenPressureOn,
FALSE);
1564 opts.
require(
"BerendsenPressure",
"BerendsenPressureTarget",
1565 "Target pressure for pressure coupling",
1566 &berendsenPressureTarget);
1568 opts.
require(
"BerendsenPressure",
"BerendsenPressureCompressibility",
1569 "Isothermal compressibility for pressure coupling",
1570 &berendsenPressureCompressibility);
1572 opts.
require(
"BerendsenPressure",
"BerendsenPressureRelaxationTime",
1573 "Relaxation time for pressure coupling",
1574 &berendsenPressureRelaxationTime);
1576 opts.
units(
"BerendsenPressureRelaxationTime",
N_FSEC);
1577 opts.
optional(
"BerendsenPressure",
"BerendsenPressureFreq",
1578 "Number of steps between volume rescaling",
1579 &berendsenPressureFreq, 1);
1583 opts.
optionalB(
"main",
"LangevinPiston",
1584 "Should Langevin piston pressure control be used?",
1585 &langevinPistonOn,
FALSE);
1586 opts.
optionalB(
"LangevinPiston",
"LangevinPistonBarrier",
1587 "Should Langevin piston barrier be used?",
1588 &langevinPistonBarrier,
TRUE);
1589 opts.
require(
"LangevinPiston",
"LangevinPistonTarget",
1590 "Target pressure for pressure control",
1591 &langevinPistonTarget);
1592 opts.
require(
"LangevinPiston",
"LangevinPistonPeriod",
1593 "Oscillation period for pressure control",
1594 &langevinPistonPeriod);
1597 opts.
require(
"LangevinPiston",
"LangevinPistonDecay",
1598 "Decay time for pressure control",
1599 &langevinPistonDecay);
1602 opts.
require(
"LangevinPiston",
"LangevinPistonTemp",
1603 "Temperature for pressure control piston",
1604 &langevinPistonTemp);
1607 opts.
optional(
"LangevinPiston",
"StrainRate",
1608 "Initial strain rate for pressure control (x y z)",
1613 "Should multigrator temperature and/or pressure control be used?",
1614 &multigratorOn,
FALSE);
1615 opts.
require(
"Multigrator",
"MultigratorPressureTarget",
1616 "Target pressure for pressure coupling",
1617 &multigratorPressureTarget);
1618 opts.
require(
"Multigrator",
"MultigratorTemperatureTarget",
1619 "Target temperature for temperature coupling",
1620 &multigratorTemperatureTarget);
1621 opts.
require(
"Multigrator",
"MultigratorPressureFreq",
1622 "Number of steps between pressure control moves",
1623 &multigratorPressureFreq);
1625 opts.
optional(
"Multigrator",
"MultigratorPressureRelaxationTime",
1626 "Relaxation time for pressure coupling is fs",
1627 &multigratorPressureRelaxationTime, 30000);
1629 opts.
units(
"MultigratorPressureRelaxationTime",
N_FSEC);
1630 opts.
optional(
"Multigrator",
"MultigratorTemperatureRelaxationTime",
1631 "Relaxation time for temperature coupling is fs",
1632 &multigratorTemperatureRelaxationTime, 1000);
1633 opts.
range(
"MultigratorTemperatureRelaxationTime",
POSITIVE);
1634 opts.
units(
"MultigratorTemperatureRelaxationTime",
N_FSEC);
1635 opts.
require(
"Multigrator",
"MultigratorTemperatureFreq",
1636 "Number of steps between temperature control moves",
1637 &multigratorTemperatureFreq);
1639 opts.
optional(
"Multigrator",
"MultigratorNoseHooverChainLength",
1640 "Nose-Hoover chain length",
1641 &multigratorNoseHooverChainLength, 4);
1645 opts.
optional(
"main",
"SurfaceTensionTarget",
1646 "Surface tension in the x-y plane",
1647 &surfaceTensionTarget, 0);
1650 opts.
optionalB(
"main",
"pressureprofile",
"Compute pressure profile?",
1651 &pressureProfileOn,
FALSE);
1652 opts.
require(
"pressureprofile",
"pressureprofileslabs",
1653 "Number of pressure profile slabs", &pressureProfileSlabs, 10);
1654 opts.
optional(
"pressureprofile",
"pressureprofilefreq",
1655 "How often to store profile data", &pressureProfileFreq, 1);
1656 opts.
optional(
"pressureprofile",
"pressureProfileAtomTypes",
1657 "Number of pressure profile atom types", &pressureProfileAtomTypes, 1);
1659 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesFile",
1660 "PDB files with pressure profile atom types" "default is the input PDB file",
1662 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesCol",
1663 "Column in the pressureProfileAtomTypesFile with the atom types ",
1665 opts.
optionalB(
"pressureProfile",
"pressureProfileEwald",
1666 "Compute Ewald contribution to pressure profile",
1667 &pressureProfileEwaldOn,
FALSE);
1668 opts.
optional(
"pressureProfile",
"pressureProfileEwaldX",
1669 "Ewald grid size X", &pressureProfileEwaldX, 10);
1671 opts.
optional(
"pressureProfile",
"pressureProfileEwaldY",
1672 "Ewald grid size Y", &pressureProfileEwaldY, 10);
1674 opts.
optional(
"pressureProfile",
"pressureProfileEwaldZ",
1675 "Ewald grid size Z", &pressureProfileEwaldZ, 10);
1679 opts.
optionalB(
"main",
"accelMD",
"Perform acclerated MD?", &accelMDOn,
FALSE);
1680 opts.
optional(
"accelMD",
"accelMDFirstStep",
"First accelMD step", &accelMDFirstStep, 0);
1682 opts.
optional(
"accelMD",
"accelMDLastStep",
"Last accelMD step", &accelMDLastStep, 0);
1684 opts.
optional(
"accelMD",
"accelMDOutFreq",
"Frequency of accelMD output", &accelMDOutFreq, 1);
1686 opts.
optionalB(
"accelMD",
"accelMDdihe",
"Apply boost to dihedral potential", &accelMDdihe,
TRUE);
1687 opts.
optionalB(
"accelMD",
"accelMDDebugOn",
"Debugging accelMD", &accelMDDebugOn,
FALSE);
1688 opts.
optional(
"accelMD",
"accelMDE",
"E for AMD", &accelMDE);
1690 opts.
optional(
"accelMD",
"accelMDalpha",
"alpha for AMD", &accelMDalpha);
1693 opts.
optionalB(
"accelMD",
"accelMDdual",
"Apply dual boost", &accelMDdual,
FALSE);
1694 opts.
optional(
"accelMDdual",
"accelMDTE",
"E for total potential under accelMDdual mode", &accelMDTE);
1696 opts.
optional(
"accelMDdual",
"accelMDTalpha",
"alpha for total potential under accelMDdual mode", &accelMDTalpha);
1700 opts.
optionalB(
"accelMD",
"accelMDG",
"Perform Gaussian accelMD calculation?", &accelMDG,
FALSE);
1701 opts.
optional(
"accelMDG",
"accelMDGiE",
"Flag to set the mode iE in Gaussian accelMD", &accelMDGiE, 1);
1702 opts.
optional(
"accelMDG",
"accelMDGcMDSteps",
"Number of cMD steps", &accelMDGcMDSteps, 1000000);
1704 opts.
optional(
"accelMDG",
"accelMDGEquiSteps",
"Number of equilibration steps after adding boost potential", &accelMDGEquiSteps, 1000000);
1706 opts.
require(
"accelMDG",
"accelMDGcMDPrepSteps",
"Number of preparation cMD steps", &accelMDGcMDPrepSteps, 200000);
1708 opts.
require(
"accelMDG",
"accelMDGEquiPrepSteps",
"Number of preparation equilibration steps", &accelMDGEquiPrepSteps, 200000);
1710 opts.
optional(
"accelMDG",
"accelMDGStatWindow",
"Number of steps to calculate avg and std", &accelMDGStatWindow, -1);
1711 opts.
optional(
"accelMDG",
"accelMDGSigma0P",
"Upper limit of std of total potential", &accelMDGSigma0P, 6.0);
1714 opts.
optional(
"accelMDG",
"accelMDGSigma0D",
"Upper limit of std of dihedral potential", &accelMDGSigma0D, 6.0);
1717 opts.
optionalB(
"accelMDG",
"accelMDGRestart",
"Flag to set use restart file in Gaussian accelMD", &accelMDGRestart,
FALSE);
1718 opts.
require(
"accelMDGRestart",
"accelMDGRestartFile",
"Restart file name for Gaussian accelMD", accelMDGRestartFile);
1719 opts.
optionalB(
"accelMDG",
"accelMDGresetVaftercmd",
"Flag to reset potential after accelMDGcMDSteps steps",
1720 &accelMDGresetVaftercmd,
FALSE);
1723 opts.
optionalB(
"main",
"adaptTempMD",
"Perform adaptive temperature sampling", &adaptTempOn,
FALSE);
1724 opts.
optional(
"adaptTempMD",
"adaptTempFirstStep",
"First adaptTemp step", &adaptTempFirstStep, 0);
1726 opts.
optional(
"adaptTempMD",
"adaptTempLastStep",
"Last adaptTemp step", &adaptTempLastStep, 0);
1728 opts.
optional(
"adaptTempMD",
"adaptTempOutFreq",
"Frequency of adaptTemp output", &adaptTempOutFreq, 10);
1730 opts.
optional(
"adaptTempMD",
"adaptTempFreq",
"Frequency of writing average energies to adaptTempOutFile", &adaptTempFreq, 10);
1732 opts.
optionalB(
"adaptTempMD",
"adaptTempDebug",
"Print debug output for adaptTemp", &adaptTempDebug,
FALSE);
1733 opts.
optional(
"adaptTempMD",
"adaptTempTmin",
"Minimun temperature for adaptTemp", &adaptTempTmin);
1736 opts.
optional(
"adaptTempMD",
"adaptTempTmax",
"Maximum temperature for adaptTemp", &adaptTempTmax);
1739 opts.
optional(
"adaptTempMD",
"adaptTempBins",
"Number of bins to store average energies", &adaptTempBins,0);
1741 opts.
optional(
"adaptTempMD",
"adaptTempDt",
"Integration timestep for Temp. updates", &adaptTempDt, 0.0001);
1744 opts.
optional(
"adaptTempMD",
"adaptTempAutoDt",
"Average temperature update in percent of temperature range", &adaptTempAutoDt, 0.0);
1746 opts.
optional(
"adaptTempMD",
"adaptTempCgamma",
"Adaptive bin averaging constant", &adaptTempCgamma, 0.1);
1748 opts.
optionalB(
"adaptTempMD",
"adaptTempLangevin",
"Send adaptTemp temperature to langevin thermostat",&adaptTempLangevin,
TRUE);
1749 opts.
optionalB(
"adaptTempMD",
"adaptTempRescaling",
"Send adaptTemp temperature to velocity rescaling thermostat", &adaptTempRescale,
TRUE);
1750 opts.
optional(
"adaptTempMD",
"adaptTempInFile",
"File containing restart information for adaptTemp", adaptTempInFile);
1751 opts.
optional(
"adaptTempMD",
"adaptTempRestartFile",
"File for writing adaptTemp restart information", adaptTempRestartFile);
1752 opts.
require(
"adaptTempRestartFile",
"adaptTempRestartFreq",
"Frequency of writing restart file", &adaptTempRestartFreq,0);
1754 opts.
optionalB(
"adaptTempMD",
"adaptTempRandom",
"Randomly assign a temperature if we step out of range", &adaptTempRandom,
FALSE);
1757 void SimParameters::config_parser_constraints(
ParseOptions &opts) {
1760 opts.
optionalB(
"main",
"fixedatoms",
"Are there fixed atoms?",
1761 &fixedAtomsOn,
FALSE);
1762 opts.
optionalB(
"fixedatoms",
"fixedAtomsForces",
1763 "Calculate forces between fixed atoms? (Required to unfix during run.)",
1764 &fixedAtomsForces,
FALSE);
1765 opts.
optional(
"fixedatoms",
"fixedAtomsFile",
"PDB file with flags for " 1766 "fixed atoms (default is the PDB input file)",
1768 opts.
optional(
"fixedatoms",
"fixedAtomsCol",
"Column in the fixedAtomsFile " 1769 "containing the flags (nonzero means fixed);\n" 1771 opts.
optional(
"fixedatoms",
"fixedAtomListFile",
"the text input file for fixed atoms " 1773 opts.
optionalB(
"fixedatoms",
"fixedAtomsForceOutput",
1774 "Do we write out forces acting on fixed atoms?",
1775 &fixedAtomsForceOutput,
FALSE);
1778 opts.
optionalB(
"main",
"constraints",
"Are harmonic constraints active?",
1779 &constraintsOn,
FALSE);
1780 opts.
require(
"constraints",
"consexp",
"Exponent for harmonic potential",
1783 #ifndef MEM_OPT_VERSION 1784 opts.
require(
"constraints",
"consref",
"PDB file containing reference " 1787 opts.
require(
"constraints",
"conskfile",
"PDB file containing force " 1789 opts.
require(
"constraints",
"conskcol",
"Column of conskfile to use " 1792 opts.
require(
"constraints",
"consAtomListFile",
"the text input file for constrained atoms " 1795 opts.
require(
"constraints",
"constraintScaling",
"constraint scaling factor",
1796 &constraintScaling, 1.0);
1804 opts.
optionalB(
"constraints",
"selectConstraints",
1805 "Restrain only selected Cartesian components of the coordinates?",
1806 &selectConstraintsOn,
FALSE);
1807 opts.
optionalB(
"selectConstraints",
"selectConstrX",
1808 "Restrain X components of coordinates ", &constrXOn,
FALSE);
1809 opts.
optionalB(
"selectConstraints",
"selectConstrY",
1810 "Restrain Y components of coordinates ", &constrYOn,
FALSE);
1811 opts.
optionalB(
"selectConstraints",
"selectConstrZ",
1812 "Restrain Z components of coordinates ", &constrZOn,
FALSE);
1816 opts.
optionalB(
"constraints",
"sphericalConstraints",
1817 "Restrain only radial spherical component of the coordinates?",
1818 &sphericalConstraintsOn,
FALSE);
1819 opts.
optional(
"sphericalConstraints",
"sphericalConstrCenter",
1820 "Center of spherical constraints", &sphericalConstrCenter);
1825 opts.
optionalB(
"constraints",
"movingConstraints",
1826 "Are some of the constraints moving?",
1827 &movingConstraintsOn,
FALSE);
1828 opts.
require(
"movingConstraints",
"movingConsVel",
1829 "Velocity of the movement, A/timestep", &movingConsVel);
1833 opts.
optionalB(
"constraints",
"rotConstraints",
1834 "Are the constraints rotating?",
1835 &rotConstraintsOn,
FALSE);
1836 opts.
require(
"rotConstraints",
"rotConsAxis",
1837 "Axis of rotation", &rotConsAxis);
1838 opts.
require(
"rotConstraints",
"rotConsPivot",
1839 "Pivot point of rotation",
1841 opts.
require(
"rotConstraints",
"rotConsVel",
1842 "Velocity of rotation, deg/timestep", &rotConsVel);
1847 opts.
optionalB(
"main",
"extForces",
"External command forces?",
1848 &extForcesOn,
FALSE);
1849 opts.
require(
"extForces",
"extForcesCommand",
1850 "External forces command", extForcesCommand);
1851 opts.
require(
"extForces",
"extCoordFilename",
1852 "External forces coordinate filename", extCoordFilename);
1853 opts.
require(
"extForces",
"extForceFilename",
1854 "External forces force filename", extForceFilename);
1858 opts.
optionalB(
"main",
"QMForces",
"Apply QM forces?",
1859 &qmForcesOn,
FALSE);
1860 opts.
require(
"QMForces",
"QMSoftware",
1861 "software whose format will be used for input/output", qmSoftware);
1862 opts.
require(
"QMForces",
"QMExecPath",
1863 "path to executable", qmExecPath);
1864 opts.
optional(
"QMForces",
"QMChargeMode",
1865 "type of QM atom charges gathered from the QM software", qmChrgModeS);
1866 opts.
require(
"QMForces",
"QMColumn",
1867 "column defining QM and MM regions", qmColumn);
1868 opts.
require(
"QMForces",
"QMBaseDir",
1869 "base path and name for QM input and output (preferably in memory)", qmBaseDir);
1870 opts.
optional(
"QMForces",
"QMConfigLine",
1871 "Configuration line for QM (multiple inputs allowed)",
PARSE_MULTIPLES);
1872 opts.
optional(
"QMForces",
"QMParamPDB",
1873 "PDB with QM parameters", qmParamPDB);
1874 opts.
optional(
"QMForces",
"QMPrepProc",
1875 "initial preparation executable", qmPrepProc);
1876 opts.
optional(
"QMForces",
"QMSecProc",
1877 "secondary executable", qmSecProc);
1878 opts.
optional(
"QMForces",
"QMCharge",
1880 opts.
optionalB(
"QMForces",
"QMChargeFromPSF",
1881 "gets charge of the QM group form PSF values", &qmChrgFromPSF,
FALSE);
1882 opts.
optional(
"QMForces",
"QMMult",
1884 opts.
optional(
"QMForces",
"QMLinkElement",
1886 opts.
optionalB(
"QMForces",
"QMReplaceAll",
1887 "replace all NAMD forces with QM forces", &qmReplaceAll,
FALSE);
1888 opts.
optional(
"QMForces",
"QMPCStride",
1889 "frequency of selection of point charges", &qmPCSelFreq, 1);
1891 opts.
optionalB(
"QMForces",
"QMNoPntChrg",
1892 "no point charges will be passed to the QM system(s)", &qmNoPC,
FALSE);
1893 opts.
optionalB(
"QMForces",
"QMElecEmbed",
1894 "activates electrostatic embedding", &qmElecEmbed,
TRUE);
1895 opts.
optionalB(
"QMForces",
"QMVdWParams",
1896 "use special VdW parameters for QM atoms", &qmVDW,
FALSE);
1897 opts.
optionalB(
"QMForces",
"QMBondGuess",
1898 "Guess QM-MM bonds from topology and QM atom definitions", &qmBondGuess,
FALSE);
1899 opts.
optional(
"QMForces",
"QMBondColumn",
1900 "column defining QM-MM bonds", qmBondColumn);
1901 opts.
optionalB(
"QMForces",
"QMBondDist",
1902 "values in QMBondColumn defines the distance of new link atom", &qmBondDist,
FALSE);
1903 opts.
optional(
"QMForces",
"QMBondValueType",
1904 "type of value in bond column: len or ratio", qmBondValueTypeS);
1905 opts.
optional(
"QMForces",
"QMBondScheme",
1906 "type of treatment given to QM-MM bonds.", qmBondSchemeS);
1907 opts.
optional(
"QMForces",
"QMenergyStride",
1908 "frequency of QM specific energy output (every x steps)", &qmEnergyOutFreq, 1);
1909 opts.
optional(
"QMForces",
"QMOutStride",
1910 "frequency of QM specific charge output (every x steps)", &qmOutFreq, 0);
1912 opts.
optional(
"QMForces",
"QMPositionOutStride",
1913 "frequency of QM specific position output (every x steps)", &qmPosOutFreq, 0);
1915 opts.
optional(
"QMForces",
"QMSimsPerNode",
1916 "QM executions per node", &qmSimsPerNode, 1);
1918 opts.
optionalB(
"QMForces",
"QMSwitching",
1919 "apply switching to point charges.", &qmPCSwitchOn,
FALSE);
1920 opts.
optional(
"QMForces",
"QMSwitchingType",
1921 "How are charges scaled down to be presented to QM groups.", qmPCSwitchTypeS);
1922 opts.
optional(
"QMForces",
"QMPointChargeScheme",
1923 "type of treatment given to the total sum of point charges.", qmPCSchemeS);
1924 opts.
optionalB(
"QMForces",
"QMCustomPCSelection",
1925 "custom and fixed selection of point charges per QM group.", &qmCustomPCSel,
FALSE);
1926 opts.
optional(
"QMForces",
"QMCustomPCFile",
1927 "file with a selection of point charges for a single QM group",
PARSE_MULTIPLES);
1928 opts.
optionalB(
"QMForces",
"QMLiveSolventSel",
1929 "Continuously update the selection of solvent molecules in QM groups", &qmLSSOn,
FALSE);
1930 opts.
optional(
"QMForces",
"QMLSSFreq",
1931 "frequency of QM water selection update", &qmLSSFreq, 100);
1933 opts.
optional(
"QMForces",
"QMLSSResname",
1934 "residue name for the solvent molecules (TIP3).", qmLSSResname);
1935 opts.
optional(
"QMForces",
"QMLSSMode",
1936 "mode of selection of point solvent molecules", qmLSSModeS);
1937 opts.
optional(
"QMForces",
"QMLSSRef",
1938 "for COM mode, defines reference for COM distance calculation",
PARSE_MULTIPLES);
1940 "Do we use Conditional SMD option?", &qmCSMD,
FALSE);
1941 opts.
optional(
"QMForces",
"QMCSMDFile",
1942 "File for Conditional SMD information",qmCSMDFile);
1945 opts.
optionalB(
"main",
"printBadContacts",
"Print atoms with huge forces?",
1946 &printBadContacts,
FALSE);
1950 opts.
optionalB(
"main",
"GBIS",
"Use GB implicit solvent?",
1952 opts.
optionalB(
"main",
"GBISSer",
"Use GB implicit solvent?",
1955 opts.
optional(
"GBIS",
"solventDielectric",
1956 "Solvent Dielectric", &solvent_dielectric, 78.5);
1957 opts.
optional(
"GBIS",
"intrinsicRadiusOffset",
1958 "Coulomb Radius Offset", &coulomb_radius_offset, 0.09);
1959 opts.
optional(
"GBIS",
"ionConcentration",
1960 "Ion Concentration", &ion_concentration, 0.2);
1962 "delta from GBOBC", &gbis_delta, 1.0);
1964 "beta from GBOBC", &gbis_beta, 0.8);
1966 "gamma from GBOBC", &gbis_gamma, 4.85);
1967 opts.
optional(
"GBIS",
"alphaCutoff",
1968 "cutoff for calculating effective born radius", &alpha_cutoff, 15);
1970 "maximum allowable born radius", &alpha_max, 30);
1972 "maximum screened intrinsic radius", &fsMax, 1.728);
1974 opts.
optionalB(
"main",
"SASA",
"Use Linear Combination of Pairwise Overlaps (LCPO) for calculating SASA",
1976 opts.
optional(
"SASA",
"surfaceTension",
1977 "Surfce Tension for SASA (kcal/mol/Ang^2)", &surface_tension, 0.005);
1983 "Do we use SMD option?",
1986 "Velocity of the movement, A/timestep", &SMDVel);
1989 "Direction of movement", &SMDDir);
1991 "Elastic constant for SMD", &SMDk);
1993 "Transverse elastic constant for SMD", &SMDk2, 0);
1996 opts.
require(
"SMD",
"SMDFile",
1997 "File for SMD information",
1999 opts.
optional(
"SMD",
"SMDOutputFreq",
2000 "Frequency of output",
2007 opts.
optionalB(
"main",
"tabulatedEnergies",
"Do we get energies from a table?", &tabulatedEnergies,
FALSE);
2009 opts.
require(
"tabulatedEnergies",
"tabulatedEnergiesFile",
"File containing energy table", tabulatedEnergiesFile);
2010 opts.
require(
"tabulatedEnergies",
"tableInterpType",
"Cubic or linear interpolation", tableInterpType);
2013 opts.
optionalB(
"main",
"TMD",
"Perform Targeted MD?", &TMDOn,
FALSE);
2014 opts.
optional(
"TMD",
"TMDk",
"Elastic constant for TMD", &TMDk, 0);
2016 opts.
require(
"TMD",
"TMDFile",
"File for TMD information", TMDFile);
2017 opts.
optionalB(
"TMD",
"TMDDiffRMSD",
"Restrain Difference between the RMSD from two structures", &TMDDiffRMSD,
FALSE);
2018 opts.
require(
"TMDDiffRMSD",
"TMDFile2",
"Second file for TMD information", TMDFile2);
2020 opts.
optional(
"TMD",
"TMDOutputFreq",
"Frequency of TMD output",
2023 opts.
require(
"TMD",
"TMDLastStep",
"Last TMD timestep", &TMDLastStep);
2025 opts.
optional(
"TMD",
"TMDFirstStep",
"First TMD step (default 0)", &TMDFirstStep, 0);
2026 opts.
optional(
"TMD",
"TMDInitialRMSD",
"Target RMSD at first TMD step (default -1 to use initial coordinates)", &TMDInitialRMSD);
2027 TMDInitialRMSD = -1;
2028 opts.
optional(
"TMD",
"TMDFinalRMSD",
"Target RMSD at last TMD step (default 0 )", &TMDFinalRMSD, 0);
2033 opts.
optionalB(
"main",
"symmetryRestraints",
"Enable symmetry restraints?", &symmetryOn,
FALSE);
2034 opts.
optional(
"symmetryRestraints",
"symmetryk",
"Elastic constant for symmetry restraints", &symmetryk, 0);
2036 opts.
optional(
"symmetryRestraints",
"symmetrykfile",
"PDB file specifying force contants on a per-atom basis",
PARSE_MULTIPLES);
2037 opts.
optionalB(
"symmetryRestraints",
"symmetryScaleForces",
"Scale applied forces over time?", &symmetryScaleForces,
FALSE);
2039 opts.
optional(
"symmetryRestraints",
"symmetryMatrixFile",
"File(s) for transfromation matrices",
PARSE_MULTIPLES);
2040 opts.
optional(
"symmetryRestraints",
"symmetryLastStep",
"Last symmetry timestep", &symmetryLastStep, -1);
2041 opts.
optional(
"symmetryRestraints",
"symmetryFirstStep",
"First symmetry step (default 0)", &symmetryFirstStep, 0);
2042 opts.
optional(
"symmetryRestraints",
"symmetryLastFullStep",
"Last full force symmetry timestep (default symmetryLastStep)", &symmetryLastFullStep, symmetryLastStep);
2043 opts.
optional(
"symmetryRestraints",
"symmetryFirstFullStep",
"First full force symmetry step (default symmetryFirstStep)", &symmetryFirstFullStep, symmetryFirstStep);
2047 opts.
optionalB(
"main",
"tclForces",
"Are Tcl global forces active?",
2048 &tclForcesOn,
FALSE);
2049 opts.
require(
"tclForces",
"tclForcesScript",
2053 opts.
optionalB(
"main",
"tclBC",
"Are Tcl boundary forces active?",
2055 opts.
require(
"tclBC",
"tclBCScript",
2056 "Tcl script defining calcforces for boundary forces",
PARSE_STRING);
2058 opts.
optional(
"tclBC",
"tclBCArgs",
"Extra args for calcforces command",
2063 opts.
optionalB(
"main",
"miscForces",
"Are misc global forces active?",
2064 &miscForcesOn,
FALSE);
2065 opts.
optional(
"miscForces",
"miscForcesScript",
2069 opts.
optionalB(
"main",
"freeEnergy",
"Perform free energy perturbation?",
2070 &freeEnergyOn,
FALSE);
2071 opts.
require(
"freeEnergy",
"freeEnergyConfig",
2075 opts.
optionalB(
"main",
"constantforce",
"Apply constant force?",
2076 &consForceOn,
FALSE);
2077 opts.
optional(
"constantforce",
"consForceFile",
2078 "Configuration file for constant forces",
PARSE_STRING);
2079 opts.
require(
"constantforce",
"consForceScaling",
2080 "Scaling factor for constant forces", &consForceScaling, 1.0);
2083 opts.
optionalB(
"main",
"colvars",
"Is the colvars module enabled?",
2085 opts.
optional(
"colvars",
"colvarsConfig",
2087 opts.
optional(
"colvars",
"colvarsInput",
2088 "input restart file for the collective variables",
PARSE_STRING);
2091 opts.
optional(
"main",
"globalMasterFrequency",
"Number of steps between globalMaster client calls", &globalMasterFrequency, 1);
2093 opts.
optionalB(
"main",
"globalMasterScaleByFrequency",
"Scale globalmaster forces by frequency?",
2094 &globalMasterScaleByFrequency,
FALSE);
2095 opts.
optionalB(
"main",
"globalMasterStaleForces",
"Use stale forces MTS for globalmaster forces by frequency?",
2096 &globalMasterStaleForces,
FALSE);
2101 #ifdef OPENATOM_VERSION 2102 void SimParameters::config_parser_openatom(
ParseOptions &opts) {
2103 opts.
optionalB(
"main",
"openatom",
"OpenAtom active?", &openatomOn,
FALSE);
2104 opts.
require(
"openatom",
"openatomDriverFile",
"What config file specifies openatom input parameters",
PARSE_STRING);
2105 opts.
require(
"openatom",
"openatomPhysicsFile",
"What structure file specifies openatom input system",
PARSE_STRING);
2106 opts.
require(
"openatom",
"openatomPdbFile",
"NAMD input file defining QM and MM regions",
PARSE_STRING);
2107 opts.
optional(
"openatom",
"openatomCol",
"Column in the openatomPdb with the QM/MM flag",
PARSE_STRING);
2109 #endif // OPENATOM_VERSION 2112 void SimParameters::config_parser_mgridforce(
ParseOptions &opts) {
2114 opts.
optionalB(
"main",
"mgridforce",
"Is Multiple gridforce active?",
2115 &mgridforceOn,
FALSE);
2116 opts.
optional(
"mgridforce",
"mgridforcevolts",
"Is Gridforce using Volts/eV as units?",
2118 opts.
require(
"mgridforce",
"mgridforcescale",
"Scale factor by which to multiply " 2120 opts.
require(
"mgridforce",
"mgridforcefile",
"PDB file containing force " 2122 opts.
require(
"mgridforce",
"mgridforcecol",
"Column of gridforcefile to " 2124 opts.
optional(
"mgridforce",
"mgridforcechargecol",
"Column of gridforcefile to " 2126 opts.
require(
"mgridforce",
"mgridforcepotfile",
"Gridforce potential file",
2128 opts.
optional(
"mgridforce",
"mgridforcecont1",
"Use continuous grid " 2130 opts.
optional(
"mgridforce",
"mgridforcecont2",
"Use continuous grid " 2132 opts.
optional(
"mgridforce",
"mgridforcecont3",
"Use continuous grid " 2134 opts.
optional(
"mgridforce",
"mgridforcevoff",
"Gridforce potential offsets",
2136 opts.
optional(
"mgridforce",
"mgridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
PARSE_MULTIPLES);
2139 void SimParameters::config_parser_gridforce(
ParseOptions &opts) {
2141 opts.
optionalB(
"main",
"gridforce",
"Is Gridforce active?",
2142 &gridforceOn,
FALSE);
2143 opts.
optionalB(
"gridforce",
"gridforcevolts",
"Is Gridforce using Volts/eV as units?",
2144 &gridforceVolts,
FALSE);
2145 opts.
require(
"gridforce",
"gridforcescale",
"Scale factor by which to multiply " 2146 "grid forces", &gridforceScale);
2147 opts.
require(
"gridforce",
"gridforcefile",
"PDB file containing force " 2149 opts.
require(
"gridforce",
"gridforcecol",
"Column of gridforcefile to " 2151 opts.
optional(
"gridforce",
"gridforcechargecol",
"Column of gridforcefile to " 2153 opts.
require(
"gridforce",
"gridforcepotfile",
"Gridforce potential file",
2155 opts.
optionalB(
"gridforce",
"gridforcecont1",
"Use continuous grid " 2156 "in A1 direction?", &gridforceContA1,
FALSE);
2157 opts.
optionalB(
"gridforce",
"gridforcecont2",
"Use continuous grid " 2158 "in A2 direction?", &gridforceContA2,
FALSE);
2159 opts.
optionalB(
"gridforce",
"gridforcecont3",
"Use continuous grid " 2160 "in A3 direction?", &gridforceContA3,
FALSE);
2161 opts.
optional(
"gridforce",
"gridforcevoff",
"Gridforce potential offsets",
2163 opts.
optionalB(
"gridforce",
"gridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
2164 &gridforcechecksize,
TRUE);
2167 void SimParameters::config_parser_dcd_selections(
ParseOptions &opts) {
2169 opts.
optionalB(
"main",
"DcdSelection",
"Selection list DCD trajectory output",
2170 &dcdSelectionOn,
FALSE);
2172 opts.
require(
"DcdSelection",
"DcdSelectionInputFile",
2175 opts.
require(
"DcdSelection",
"DCDSelectionFreq",
2176 "Frequency of selection list DCD trajectory output, in timesteps",
2178 opts.
optional(
"DcdSelection",
"DCDSelectionFile",
2179 "Selection list DCD trajectory output file name",
2183 void SimParameters::config_parser_group_restraints(
ParseOptions &opts) {
2184 opts.
optionalB(
"main",
"groupRestraints",
"Is Group restraints active?",
2185 &groupRestraintsOn,
FALSE);
2186 opts.
require(
"groupRestraints",
"groupResCenter",
"The center or equilibrium " 2188 opts.
require(
"groupRestraints",
"groupResK",
"Restraints force constant",
2190 opts.
optional(
"groupRestraints",
"groupResExp",
"Restraints exponent",
2192 opts.
optional(
"groupRestraints",
"groupResUseMagnitude",
"Should magnitude of " 2194 opts.
optional(
"groupRestraints",
"group1File",
"Text file containing atom indices " 2196 opts.
optional(
"groupRestraints",
"group1List",
"List of atom indices for group 1" 2198 opts.
optional(
"groupRestraints",
"group1RefPos",
"Reference COM position for group 1",
2200 opts.
optional(
"groupRestraints",
"group2File",
"Text file containing atom indices " 2202 opts.
optional(
"groupRestraints",
"group2List",
"List of atom indices for group 2",
2204 opts.
optional(
"groupRestraints",
"groupResX",
"Apply restraints in x direction",
2206 opts.
optional(
"groupRestraints",
"groupResY",
"Apply restraints in y direction",
2208 opts.
optional(
"groupRestraints",
"groupResZ",
"Apply restraints in z direction",
2212 void SimParameters::config_parser_movdrag(
ParseOptions &opts) {
2214 opts.
optionalB(
"main",
"movDragOn",
"Do we apply moving drag?",
2216 opts.
require(
"movDragOn",
"movDragFile",
2217 "Main moving drag PDB file", movDragFile);
2218 opts.
require(
"movDragOn",
"movDragCol",
2220 opts.
require(
"movDragOn",
"movDragGlobVel",
2221 "Global moving drag velocity (A/step)", &movDragGlobVel);
2222 opts.
require(
"movDragOn",
"movDragVelFile",
2223 "Moving drag linear velocity file", movDragVelFile);
2226 void SimParameters::config_parser_rotdrag(
ParseOptions &opts) {
2228 opts.
optionalB(
"main",
"rotDragOn",
"Do we apply rotating drag?",
2230 opts.
require(
"rotDragOn",
"rotDragFile",
2231 "Main rotating drag PDB file", rotDragFile);
2232 opts.
require(
"rotDragOn",
"rotDragCol",
2234 opts.
require(
"rotDragOn",
"rotDragAxisFile",
2235 "Rotating drag axis file", rotDragAxisFile);
2236 opts.
require(
"rotDragOn",
"rotDragPivotFile",
2237 "Rotating drag pivot point file", rotDragPivotFile);
2238 opts.
require(
"rotDragOn",
"rotDragGlobVel",
2239 "Global rotating drag angular velocity (deg/step)", &rotDragGlobVel);
2240 opts.
require(
"rotDragOn",
"rotDragVelFile",
2241 "Rotating drag angular velocity file", rotDragVelFile);
2242 opts.
require(
"rotDragOn",
"rotDragVelCol",
2243 "Rotating drag angular velocity column",
PARSE_STRING);
2246 void SimParameters::config_parser_constorque(
ParseOptions &opts) {
2248 opts.
optionalB(
"main",
"consTorqueOn",
"Do we apply \"constant\" torque?",
2249 &consTorqueOn,
FALSE);
2250 opts.
require(
"consTorqueOn",
"consTorqueFile",
2251 "Main \"constant\" torque PDB file", consTorqueFile);
2252 opts.
require(
"consTorqueOn",
"consTorqueCol",
2254 opts.
require(
"consTorqueOn",
"consTorqueAxisFile",
2255 "\"Constant\" torque axis file", consTorqueAxisFile);
2256 opts.
require(
"consTorqueOn",
"consTorquePivotFile",
2257 "\"Constant\" torque pivot point file", consTorquePivotFile);
2258 opts.
require(
"consTorqueOn",
"consTorqueGlobVal",
2259 "Global \"constant\" torque value (Kcal/(mol*A^2))", &consTorqueGlobVal);
2260 opts.
require(
"consTorqueOn",
"consTorqueValFile",
2261 "\"constant\" torque factors file", consTorqueValFile);
2262 opts.
require(
"consTorqueOn",
"consTorqueValCol",
2266 void SimParameters::config_parser_boundary(
ParseOptions &opts) {
2269 opts.
optionalB(
"main",
"sphericalBC",
"Are spherical boundary counditions " 2270 "active?", &sphericalBCOn,
FALSE);
2271 opts.
require(
"sphericalBC",
"sphericalBCCenter",
2272 "Center of spherical boundaries", &sphericalCenter);
2273 opts.
require(
"sphericalBC",
"sphericalBCr1",
"Radius for first sphere " 2274 "potential", &sphericalBCr1);
2277 opts.
require(
"sphericalBC",
"sphericalBCk1",
"Force constant for first " 2278 "sphere potential (+ is an inward force, - outward)",
2281 opts.
optional(
"sphericalBC",
"sphericalBCexp1",
"Exponent for first " 2282 "sphere potential", &sphericalBCexp1, 2);
2285 opts.
optional(
"sphericalBCr1",
"sphericalBCr2",
"Radius for second sphere " 2286 "potential", &sphericalBCr2);
2289 opts.
require(
"sphericalBCr2",
"sphericalBCk2",
"Force constant for second " 2290 "sphere potential (+ is an inward force, - outward)",
2293 opts.
optional(
"sphericalBCr2",
"sphericalBCexp2",
"Exponent for second " 2294 "sphere potential", &sphericalBCexp2, 2);
2298 opts.
optionalB(
"main",
"cylindricalBC",
"Are cylindrical boundary counditions " 2299 "active?", &cylindricalBCOn,
FALSE);
2300 opts.
require(
"cylindricalBC",
"cylindricalBCr1",
"Radius for first cylinder " 2301 "potential", &cylindricalBCr1);
2304 opts.
require(
"cylindricalBC",
"cylindricalBCk1",
"Force constant for first " 2305 "cylinder potential (+ is an inward force, - outward)",
2308 opts.
optional(
"cylindricalBC",
"cylindricalBCexp1",
"Exponent for first " 2309 "cylinder potential", &cylindricalBCexp1, 2);
2314 opts.
optional(
"cylindricalBC",
"cylindricalBCAxis",
"Cylinder axis (defaults to x)",
2316 opts.
require(
"cylindricalBC",
"cylindricalBCCenter",
2317 "Center of cylindrical boundaries", &cylindricalCenter);
2318 opts.
require (
"cylindricalBC",
"cylindricalBCl1",
"Length of first cylinder",
2322 opts.
optional (
"cylindricalBCl1",
"cylindricalBCl2",
"Length of second cylinder",
2328 opts.
optional(
"cylindricalBCr1",
"cylindricalBCr2",
"Radius for second cylinder " 2329 "potential", &cylindricalBCr2);
2332 opts.
require(
"cylindricalBCr2",
"cylindricalBCk2",
"Force constant for second " 2333 "cylinder potential (+ is an inward force, - outward)",
2336 opts.
optional(
"cylindricalBCr2",
"cylindricalBCexp2",
"Exponent for second " 2337 "cylinder potential", &cylindricalBCexp2, 2);
2341 opts.
optionalB(
"main",
"eFieldOn",
"Should an electric field be applied",
2343 opts.
optionalB(
"eFieldOn",
"eFieldNormalized",
"Is eField vector scaled by cell basis vectors?",
2344 &eFieldNormalized,
FALSE);
2345 opts.
require(
"eFieldOn",
"eField",
"Electric field vector", &eField);
2346 opts.
optional(
"eFieldOn",
"eFieldFreq",
"Electric field frequency", &eFieldFreq);
2347 opts.
optional(
"eFieldOn",
"eFieldPhase",
"Electric field phase", &eFieldPhase);
2350 opts.
optionalB(
"main",
"stirOn",
"Should stirring torque be applied",
2352 opts.
optional(
"stirOn",
"stirFilename",
"PDB file with flags for " 2353 "stirred atoms (default is the PDB input file)",
2355 opts.
optional(
"stirOn",
"stirredAtomsCol",
"Column in the stirredAtomsFile " 2356 "containing the flags (nonzero means fixed);\n" 2358 opts.
require(
"stirOn",
"stirStartingTheta",
"Stir starting theta offset", &stirStartingTheta);
2359 opts.
require(
"stirOn",
"stirK",
"Stir force harmonic spring constant", &stirK);
2361 opts.
require(
"stirOn",
"stirVel",
"Stir angular velocity (deg/timestep)", &stirVel);
2362 opts.
require(
"stirOn",
"stirAxis",
"Stir axis (direction vector)", &stirAxis);
2363 opts.
require(
"stirOn",
"stirPivot",
"Stir pivot point (coordinate)", &stirPivot);
2367 "Should extra bonded forces be applied",
2368 &extraBondsOn,
FALSE);
2369 opts.
optional(
"extraBonds",
"extraBondsFile",
2370 "file with list of extra bonds",
2372 opts.
optionalB(
"extraBonds",
"extraBondsCosAngles",
2373 "Should extra angles be cosine-based to match ancient bug",
2374 &extraBondsCosAngles,
TRUE);
2378 void SimParameters::config_parser_misc(
ParseOptions &opts) {
2381 opts.
optional(
"main",
"ldBalancer",
"Load balancer",
2383 opts.
optional(
"main",
"ldbStrategy",
"Load balancing strategy",
2385 opts.
optional(
"main",
"ldbPeriod",
"steps between load balancing",
2388 opts.
optional(
"main",
"firstLdbStep",
"when to start load balancing",
2391 opts.
optional(
"main",
"lastLdbStep",
"when to stop load balancing",
2394 opts.
optional(
"main",
"hybridGroupSize",
"Hybrid load balancing group size",
2396 opts.
optional(
"main",
"ldbBackgroundScaling",
2397 "background load scaling", &ldbBackgroundScaling);
2399 opts.
optional(
"main",
"ldbPMEBackgroundScaling",
2400 "PME node background load scaling", &ldbPMEBackgroundScaling);
2402 opts.
optional(
"main",
"ldbHomeBackgroundScaling",
2403 "home node background load scaling", &ldbHomeBackgroundScaling);
2405 opts.
optional(
"main",
"ldbRelativeGrainsize",
2406 "fraction of average load per compute", &ldbRelativeGrainsize, 0.);
2409 opts.
optional(
"main",
"traceStartStep",
"when to start tracing", &traceStartStep);
2411 opts.
optional(
"main",
"numTraceSteps",
"the number of timesteps to be traced", &numTraceSteps);
2414 #ifdef MEASURE_NAMD_WITH_PAPI 2415 opts.
optionalB(
"main",
"papiMeasure",
"whether use PAPI to measure performacne", &papiMeasure,
FALSE);
2416 opts.
optional(
"main",
"papiMeasureStartStep",
"when to measure performacne using PAPI", &papiMeasureStartStep);
2418 opts.
optional(
"main",
"numPapiMeasureSteps",
"the number of timesteps to be measured using PAPI", &numPapiMeasureSteps);
2422 opts.
optionalB(
"main",
"outputMaps",
"whether to dump compute map and patch map for analysis just before load balancing", &outputMaps,
FALSE);
2423 opts.
optionalB(
"main",
"benchTimestep",
"whether to do benchmarking timestep in which case final file output is disabled", &benchTimestep,
FALSE);
2424 opts.
optional(
"main",
"useCkLoop",
"whether to use CkLoop library to parallelize a loop in a function like OpenMP", &useCkLoop,
2425 #
if CMK_SMP && USE_CKLOOP
2432 opts.
optionalB(
"main",
"simulateInitialMapping",
"whether to study the initial mapping scheme", &simulateInitialMapping,
FALSE);
2433 opts.
optional(
"main",
"simulatedPEs",
"the number of PEs to be used for studying initial mapping", &simulatedPEs);
2435 opts.
optional(
"main",
"simulatedNodeSize",
"the node size to be used for studying initial mapping", &simulatedNodeSize);
2437 opts.
optionalB(
"main",
"disableTopology",
"ignore torus information during patch placement", &disableTopology,
FALSE);
2438 opts.
optionalB(
"main",
"verboseTopology",
"print torus information during patch placement", &verboseTopology,
FALSE);
2440 opts.
optionalB(
"main",
"ldbUnloadPME",
"no load on PME nodes",
2441 &ldbUnloadPME,
FALSE);
2442 opts.
optionalB(
"main",
"ldbUnloadZero",
"no load on pe zero",
2443 &ldbUnloadZero,
FALSE);
2444 opts.
optionalB(
"main",
"ldbUnloadOne",
"no load on pe one",
2445 &ldbUnloadOne,
FALSE);
2446 opts.
optionalB(
"main",
"ldbUnloadOutputPEs",
"no load on output PEs",
2447 &ldbUnloadOutputPEs,
FALSE);
2448 opts.
optionalB(
"main",
"noPatchesOnZero",
"no patches on pe zero",
2449 &noPatchesOnZero,
FALSE);
2450 opts.
optionalB(
"main",
"noPatchesOnOutputPEs",
"no patches on Output PEs",
2451 &noPatchesOnOutputPEs,
FALSE);
2452 opts.
optionalB(
"main",
"noPatchesOnOne",
"no patches on pe one",
2453 &noPatchesOnOne,
FALSE);
2454 opts.
optionalB(
"main",
"useCompressedPsf",
"The structure file psf is in the compressed format",
2455 &useCompressedPsf,
FALSE);
2456 opts.
optionalB(
"main",
"genCompressedPsf",
"Generate the compressed version of the psf file",
2457 &genCompressedPsf,
FALSE);
2458 opts.
optionalB(
"main",
"usePluginIO",
"Use the plugin I/O to load the molecule system",
2459 &usePluginIO,
FALSE);
2460 opts.
optionalB(
"main",
"mallocTest",
"test how much memory all PEs can allocate",
2461 &mallocTest,
FALSE);
2462 opts.
optionalB(
"main",
"printExclusions",
"print exclusion lists to stdout",
2463 &printExclusions,
FALSE);
2464 opts.
optional(
"main",
"proxySendSpanningTree",
"using spanning tree to send proxies",
2465 &proxySendSpanningTree, -1);
2466 opts.
optional(
"main",
"proxyRecvSpanningTree",
"using spanning tree to receive proxies",
2467 &proxyRecvSpanningTree, 0);
2468 opts.
optional(
"main",
"proxyTreeBranchFactor",
"the branch factor when building a spanning tree",
2469 &proxyTreeBranchFactor, 0);
2470 opts.
optionalB(
"main",
"twoAwayX",
"half-size patches in 1st dimension",
2472 opts.
optionalB(
"main",
"twoAwayY",
"half-size patches in 2nd dimension",
2474 opts.
optionalB(
"main",
"twoAwayZ",
"half-size patches in 3rd dimension",
2476 opts.
optional(
"main",
"maxPatches",
"maximum patch count", &maxPatches, -1);
2479 opts.
optional(
"main",
"firsttimestep",
"Timestep to start simulation at",
2484 opts.
optionalB(
"main",
"test",
"Perform self-tests rather than simulation",
2486 opts.
optionalB(
"main",
"commOnly",
"Do not evaluate forces or integrate",
2489 opts.
optionalB(
"main",
"statsOn",
"counters in machine layer",
2492 opts.
optionalB(
"main",
"hbonds",
"Use explicit hydrogen bond term",
2493 &HydrogenBonds,
FALSE);
2494 opts.
optionalB(
"hbonds",
"hbAntecedents",
"Include Antecedent in hbond term",
2495 &useAntecedent,
TRUE);
2496 opts.
optional(
"hbonds",
"hbAAexp",
"Hbond AA-A-H angle cos exponential",
2498 opts.
optional(
"hbonds",
"hbHAexp",
"Hbond D-H-A angle cos exponential",
2500 opts.
optional(
"hbonds",
"hbDistAexp",
"Hbond A-D dist attractive exponential",
2502 opts.
optional(
"hbonds",
"hbDistRexp",
"Hbond A-D dist repulstive exponential",
2504 opts.
optional(
"hbonds",
"hbCutoffAngle",
"Hbond D-H-A cutoff angle",
2505 &dhaCutoffAngle, 100.0);
2507 opts.
optional(
"hbonds",
"hbOnAngle",
"Hbond D-H-A switch function on angle",
2510 opts.
optional(
"hbonds",
"hbOffAngle",
"Hbond D-H-A switch function off angle",
2511 &dhaOffAngle, 80.0);
2513 opts.
optional(
"hbonds",
"hbCutoffDist",
"Hbond A-D cutoff distance",
2514 &daCutoffDist, 7.5);
2517 opts.
optional(
"hbonds",
"hbOnDist",
"Hbond A-D switch function on distance",
2521 opts.
optional(
"hbonds",
"hbOffDist",
"Hbond A-D switch function off distance",
2527 opts.
optionalB(
"main",
"IMDon",
"Connect using IMD?",&IMDon,
FALSE);
2528 opts.
optional(
"IMDon",
"IMDversion",
"IMD protocol version number",&IMDversion,2);
2530 opts.
require(
"IMDon",
"IMDport",
"Port to which to bind", &IMDport);
2532 opts.
require(
"IMDon",
"IMDfreq",
"Frequency at which to report", &IMDfreq);
2534 opts.
optionalB(
"IMDon",
"IMDwait",
"Pause until IMD connection?",&IMDwait,
2536 opts.
optionalB(
"IMDon",
"IMDignore",
"Ignore any user input?",&IMDignore,
2538 opts.
optionalB(
"IMDon",
"IMDignoreForces",
"Ignore forces ONLY?",&IMDignoreForces,
2540 opts.
optionalB(
"IMDon",
"IMDsendTime",
"Send time information",&IMDsendsettings.time_switch,
2542 opts.
optionalB(
"IMDon",
"IMDsendEnergies",
"Send energies via IMD:",&IMDsendsettings.energies_switch,
2544 opts.
optionalB(
"IMDon",
"IMDsendBoxDimensions",
"Send box dimensions via IMD:",&IMDsendsettings.box_switch,
2546 opts.
optionalB(
"IMDon",
"IMDsendPositions",
"Send positions via IMD:",&IMDsendsettings.fcoords_switch,
2548 opts.
optionalB(
"IMDon",
"IMDwrapPositions",
"Send positions as wrapped:",&IMDsendsettings.wrap_switch,
2550 opts.
optionalB(
"IMDon",
"IMDsendVelocities",
"Send velocities via IMD:",&IMDsendsettings.velocities_switch,
2552 opts.
optionalB(
"IMDon",
"IMDsendForces",
"Send forces via IMD:",&IMDsendsettings.forces_switch,
2555 opts.
optional(
"ldBalancer",
"maxSelfPart",
2556 "maximum number of self partitions in one patch", &maxSelfPart, 20);
2558 opts.
optional(
"ldBalancer",
"maxPairPart",
2559 "maximum number of pair partitions in one patch", &maxPairPart, 8);
2561 opts.
optional(
"ldBalancer",
"numAtomsSelf",
2562 "maximum number of atoms in one self compute distribution",
2563 &numAtomsSelf, 154);
2566 opts.
optional(
"ldBalancer",
"numAtomsSelf2",
2567 "maximum number of atoms in one self compute distribution",
2568 &numAtomsSelf2, 154);
2571 opts.
optional(
"ldBalancer",
"numAtomsPair",
2572 "maximum number of atoms in one pair compute distribution",
2573 &numAtomsPair, 318);
2575 opts.
optional(
"ldBalancer",
"numAtomsPair2",
2576 "maximum number of atoms in one pair compute distribution",
2577 &numAtomsPair2, 637);
2579 opts.
optional(
"main",
"minAtomsPerPatch",
2580 "minimum average atoms per patch",
2581 &minAtomsPerPatch, 40);
2585 opts.
optional(
"main",
"emptyPatchLoad",
2586 "load generated by empty patch, in atoms",
2587 &emptyPatchLoad, 40);
2591 opts.
optional(
"main",
"maxExclusionFlags",
2592 "maximum number of exclusion flags per atom", &maxExclusionFlags, 256);
2597 opts.
optional(
"main",
"bondedGPU",
"Bitmask for calculating bonded interactions on GPU", &bondedGPU);
2602 opts.
optionalB(
"main",
"useCUDAdisable",
"Disable kernels to maintain feature compatibility with CUDA", &useCUDAdisable,
TRUE);
2605 opts.
optional(
"main",
"mic_unloadMICPEs",
"Indicates whether or not the load balancer should unload PEs driving Xeon Phi cards", &mic_unloadMICPEs, 1);
2606 opts.
optional(
"main",
"mic_singleKernel",
"Set to non-zero to have all MIC work to be placed in a single kernel", &mic_singleKernel, 1);
2607 opts.
optional(
"main",
"mic_deviceThreshold",
"Threshold to use for directing computes to Xeon Phi devices", &mic_deviceThreshold, -1);
2608 opts.
optional(
"main",
"mic_hostSplit",
"DMK - reserved", &mic_hostSplit, -1);
2609 opts.
optional(
"main",
"mic_numParts_self_p1",
"MIC-Specific NumParts SELF Parameter 1", &mic_numParts_self_p1, -1);
2610 opts.
optional(
"main",
"mic_numParts_pair_p1",
"MIC-Specific NumParts PAIR Parameter 1", &mic_numParts_pair_p1, -1);
2611 opts.
optional(
"main",
"mic_numParts_pair_p2",
"MIC-Specific NumParts PAIR Parameter 2", &mic_numParts_pair_p2, -1);
2619 iout <<
iINFO <<
"EXTENDED SYSTEM FILE " << filename <<
"\n" <<
endi;
2622 ifstream xscFile(filename);
2623 if ( ! xscFile )
NAMD_die(
"Unable to open extended system file.\n");
2627 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2628 xscFile.getline(labels,1023);
2629 }
while ( strncmp(labels,
"#$LABELS ",9) );
2631 int a_x, a_y, a_z, b_x, b_y, b_z, c_x, c_y, c_z;
2632 a_x = a_y = a_z = b_x = b_y = b_z = c_x = c_y = c_z = -1;
2633 int o_x, o_y, o_z, s_u, s_v, s_w, s_x, s_y, s_z;
2634 o_x = o_y = o_z = s_u = s_v = s_w = s_x = s_y = s_z = -1;
2635 int v_x = -1, v_y = -1 , v_z = -1;
2638 char *l_i = labels + 8;
2640 if ( *l_i ==
' ' ) { ++l_i;
continue; }
2642 for ( l_i2 = l_i; *l_i2 && *l_i2 !=
' '; ++l_i2 );
2643 if ( (l_i2 - l_i) == 3 && (l_i[1] ==
'_') ) {
2644 if (l_i[0] ==
'a' && l_i[2] ==
'x') a_x = pos;
2645 if (l_i[0] ==
'a' && l_i[2] ==
'y') a_y = pos;
2646 if (l_i[0] ==
'a' && l_i[2] ==
'z') a_z = pos;
2647 if (l_i[0] ==
'b' && l_i[2] ==
'x') b_x = pos;
2648 if (l_i[0] ==
'b' && l_i[2] ==
'y') b_y = pos;
2649 if (l_i[0] ==
'b' && l_i[2] ==
'z') b_z = pos;
2650 if (l_i[0] ==
'c' && l_i[2] ==
'x') c_x = pos;
2651 if (l_i[0] ==
'c' && l_i[2] ==
'y') c_y = pos;
2652 if (l_i[0] ==
'c' && l_i[2] ==
'z') c_z = pos;
2653 if (l_i[0] ==
'o' && l_i[2] ==
'x') o_x = pos;
2654 if (l_i[0] ==
'o' && l_i[2] ==
'y') o_y = pos;
2655 if (l_i[0] ==
'o' && l_i[2] ==
'z') o_z = pos;
2656 if (l_i[0] ==
's' && l_i[2] ==
'u') s_u = pos;
2657 if (l_i[0] ==
's' && l_i[2] ==
'v') s_v = pos;
2658 if (l_i[0] ==
's' && l_i[2] ==
'w') s_w = pos;
2659 if (l_i[0] ==
's' && l_i[2] ==
'x') s_x = pos;
2660 if (l_i[0] ==
's' && l_i[2] ==
'y') s_y = pos;
2661 if (l_i[0] ==
's' && l_i[2] ==
'z') s_z = pos;
2662 if (l_i[0] ==
'v' && l_i[2] ==
'x') v_x = pos;
2663 if (l_i[0] ==
'v' && l_i[2] ==
'y') v_y = pos;
2664 if (l_i[0] ==
'v' && l_i[2] ==
'z') v_z = pos;
2671 for ( pos = 0; pos < numpos; ++pos ) {
2674 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2675 if ( pos == a_x ) cellBasisVector1.x = tmp;
2676 if ( pos == a_y ) cellBasisVector1.y = tmp;
2677 if ( pos == a_z ) cellBasisVector1.z = tmp;
2678 if ( pos == b_x ) cellBasisVector2.x = tmp;
2679 if ( pos == b_y ) cellBasisVector2.y = tmp;
2680 if ( pos == b_z ) cellBasisVector2.z = tmp;
2681 if ( pos == c_x ) cellBasisVector3.x = tmp;
2682 if ( pos == c_y ) cellBasisVector3.y = tmp;
2683 if ( pos == c_z ) cellBasisVector3.z = tmp;
2684 if ( pos == o_x ) cellOrigin.x = tmp;
2685 if ( pos == o_y ) cellOrigin.y = tmp;
2686 if ( pos == o_z ) cellOrigin.z = tmp;
2687 if ( pos == s_u ) strainRate2.x = tmp;
2688 if ( pos == s_v ) strainRate2.y = tmp;
2689 if ( pos == s_w ) strainRate2.z = tmp;
2690 if ( pos == s_x ) strainRate.x = tmp;
2691 if ( pos == s_y ) strainRate.y = tmp;
2692 if ( pos == s_z ) strainRate.z = tmp;
2693 if ( pos == v_x ) monteCarloMaxVolume.x = tmp;
2694 if ( pos == v_y ) monteCarloMaxVolume.y = tmp;
2695 if ( pos == v_z ) monteCarloMaxVolume.z = tmp;
2700 test.
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2702 if ( test.
a_p() && ! lattice.a_p() ) {
2703 NAMD_die(
"cellBasisVector1 added during atom reinitialization");
2705 if ( lattice.a_p() && ! test.
a_p() ) {
2706 NAMD_die(
"cellBasisVector1 dropped during atom reinitialization");
2708 if ( test.
b_p() && ! lattice.b_p() ) {
2709 NAMD_die(
"cellBasisVector2 added during atom reinitialization");
2711 if ( lattice.b_p() && ! test.
b_p() ) {
2712 NAMD_die(
"cellBasisVector2 dropped during atom reinitialization");
2714 if ( test.
c_p() && ! lattice.c_p() ) {
2715 NAMD_die(
"cellBasisVector3 added during atom reinitialization");
2717 if ( lattice.c_p() && ! test.
c_p() ) {
2718 NAMD_die(
"cellBasisVector3 dropped during atom reinitialization");
2721 latptr->
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2726 #ifdef MEM_OPT_VERSION 2728 extern char *gWorkDir;
2736 #ifdef MEM_OPT_VERSION 2737 char *namdWorkDir = NULL;
2740 if ( opts.
defined(
"obsolete") ) {
2742 "\"obsolete\" defined, silently ignoring obsolete options\n" <<
endi;
2749 current = config->
find(
"cwd");
2751 len = strlen(current->
data);
2755 NAMD_die(
"chdir() to given cwd failed!");
2763 cwd =
new char[len+1];
2765 strcpy(cwd, current->
data);
2771 #ifdef MEM_OPT_VERSION 2772 if(cwd!=NULL)namdWorkDir = cwd;
2773 else namdWorkDir = gWorkDir;
2774 int dirlen = strlen(namdWorkDir);
2777 if(namdWorkDir[dirlen-1]==
'/'){
2778 tmpDir =
new char[dirlen+1];
2781 tmpDir =
new char[dirlen+2];
2785 memcpy(tmpDir, namdWorkDir, dirlen);
2786 namdWorkDir = tmpDir;
2808 if (opts.
defined(
"oneFourScaling")) {
2810 if (config->
find(
"1-4scaling")) {
2811 NAMD_die(
"Multiple definitions of 1-4scaling using \"1-4scaling\" and \"oneFourScaling\".");
2813 scale14 = scale14alt;
2815 else if (config->
find(
"1-4scaling")) {
2816 iout <<
iWARN <<
"Option \"1-4scaling\" has been deprecated. Instead use \"oneFourScaling\".\n" <<
endi;
2820 if (opts.
defined(
"GPUresident")) {
2822 if (config->
find(
"CUDASOAintegrate")) {
2823 NAMD_die(
"Multiple definitions of GPUresident using \"CUDASOAintegrate\" and \"GPUresident\".");
2825 CUDASOAintegrateMode = GPUresidentMode;
2827 else if (config->
find(
"CUDASOAintegrate")) {
2828 iout <<
iWARN <<
"Option \"CUDASOAintegrate\" has been deprecated. Instead use \"GPUresident\".\n" <<
endi;
2832 if (opts.
defined(
"GPUForceTable")) {
2834 if (config->
find(
"CUDAForceTable")) {
2835 NAMD_die(
"Multiple definitions of GPUForceTable using \"CUDAForceTable\" and \"GPUForceTable\".");
2837 useCUDANonbondedForceTable = useGPUNonbondedForceTable;
2839 else if (config->
find(
"CUDAForceTable")) {
2840 iout <<
iWARN <<
"Option \"CUDAForceTable\" has been deprecated. Instead use \"GPUForceTable\".\n" <<
endi;
2842 if ( ! useCUDANonbondedForceTable) {
2843 iout <<
iWARN <<
"Setting \"GPUForceTable off\" is considered experimental.\n" <<
endi;
2847 if (opts.
defined(
"GPUAtomMigration")) {
2849 if (config->
find(
"DeviceMigration")) {
2850 NAMD_die(
"Multiple definitions of GPUAtomMigration using \"DeviceMigration\" and \"GPUAtomMigration\".");
2852 useDeviceMigration = useGPUAtomMigration;
2854 else if (config->
find(
"DeviceMigration")) {
2855 iout <<
iWARN <<
"Option \"DeviceMigration\" has been deprecated. Instead use \"GPUAtomMigration\".\n" <<
endi;
2857 if (useDeviceMigration) {
2858 iout <<
iWARN <<
"Setting \"GPUAtomMigration on\" is considered experimental.\n" <<
endi;
2862 if (opts.
defined(
"usePMEGPU")) {
2864 if (config->
find(
"usePMECUDA")) {
2865 NAMD_die(
"Multiple definitions of usePMEGPU using \"usePMECUDA\" and \"usePMEGPU\".");
2867 usePMECUDA = usePMEGPU;
2869 else if (config->
find(
"usePMECUDA")) {
2870 iout <<
iWARN <<
"Option \"usePMECUDA\" has been deprecated. Instead use \"usePMEGPU\".\n" <<
endi;
2874 if (opts.
defined(
"bondedGPU")) {
2876 if (config->
find(
"bondedCUDA")) {
2877 NAMD_die(
"Multiple definitions of bondedGPU using \"bondedCUDA\" and \"bondedGPU\".");
2879 bondedCUDA = bondedGPU;
2881 else if (config->
find(
"bondedCUDA")) {
2882 iout <<
iWARN <<
"Option \"bondedCUDA\" has been deprecated. Instead use \"bondedGPU\".\n" <<
endi;
2887 if ( usePluginIO && opts.
defined(
"coordinates") ) {
2888 NAMD_die(
"Separate coordinates file not allowed with plugin IO, coordinates will be taken from structure file.");
2893 if (!amberOn && !gromacsOn) {
2894 #ifndef MEM_OPT_VERSION 2895 if (useCompressedPsf)
2896 NAMD_die(
"useCompressedPsf requires memory-optimized build!");
2897 if (!usePluginIO && !genCompressedPsf && !opts.
defined(
"coordinates"))
2898 NAMD_die(
"coordinates not found in the configuration file!");
2900 if(!usePluginIO && !opts.
defined(
"bincoordinates")) {
2901 NAMD_die(
"bincoordinates not found in the configuration file for the memory optimized version!");
2903 if(!usePluginIO && opts.
defined(
"coordinates")) {
2904 NAMD_die(
"coordinates not allowed in the configuration file for the memory optimized version!");
2907 if (!opts.
defined(
"structure"))
2908 NAMD_die(
"structure not found in the configuration file!");
2909 if (!opts.
defined(
"parameters"))
2910 NAMD_die(
"parameters not found in the configuration file!");
2916 NAMD_die(
"Cannot specify both coordinates and ambercoor!");
2917 #ifndef MEM_OPT_VERSION 2918 if (!genCompressedPsf && !opts.
defined(
"coordinates") && !opts.
defined(
"ambercoor")
2919 && !opts.
defined(
"grocoorfile") && !usePluginIO)
2920 NAMD_die(
"Coordinate file not found!");
2925 if (opts.
defined(
"temperature") &&
2928 NAMD_die(
"Cannot specify both an initial temperature and a velocity file");
2931 #ifdef MEM_OPT_VERSION 2938 char *curfile = NULL;
2939 dirlen = strlen(namdWorkDir);
2940 current = config->
find(
"structure");;
2941 curfile = current->
data;
2942 int filelen = strlen(curfile);
2943 if(*curfile ==
'/' || *curfile==
'~') {
2949 binAtomFile =
new char[filelen+5];
2950 memcpy(binAtomFile, curfile, filelen);
2951 memcpy(binAtomFile+filelen,
".bin", 4);
2952 binAtomFile[filelen+4] = 0;
2954 binAtomFile =
new char[dirlen+filelen+5];
2955 memcpy(binAtomFile, namdWorkDir, dirlen);
2956 memcpy(binAtomFile+dirlen, curfile, filelen);
2957 memcpy(binAtomFile+dirlen+filelen,
".bin", 4);
2958 binAtomFile[dirlen+filelen+4] = 0;
2961 current = config->
find(
"bincoordinates");
2962 curfile = current->
data;
2963 filelen = strlen(curfile);
2964 if(*curfile ==
'/' || *curfile==
'~') {
2965 binCoorFile =
new char[filelen+1];
2966 memcpy(binCoorFile, curfile, filelen);
2967 binCoorFile[filelen] = 0;
2969 binCoorFile =
new char[dirlen+filelen+1];
2970 memcpy(binCoorFile, namdWorkDir, dirlen);
2971 memcpy(binCoorFile+dirlen, curfile, filelen);
2972 binCoorFile[dirlen+filelen] = 0;
2975 if(opts.
defined(
"binvelocities")){
2976 current = config->
find(
"binvelocities");
2977 curfile = current->
data;
2978 filelen = strlen(curfile);
2979 if(*curfile ==
'/' || *curfile==
'~') {
2980 binVelFile =
new char[filelen+1];
2981 memcpy(binVelFile, curfile, filelen);
2982 binVelFile[filelen] = 0;
2984 binVelFile =
new char[dirlen+filelen+1];
2985 memcpy(binVelFile, namdWorkDir, dirlen);
2986 memcpy(binVelFile+dirlen, curfile, filelen);
2987 binVelFile[dirlen+filelen] = 0;
2991 if(opts.
defined(
"binrefcoords")){
2992 current = config->
find(
"binrefcoords");
2993 curfile = current->
data;
2994 filelen = strlen(curfile);
2995 if(*curfile ==
'/' || *curfile==
'~') {
2996 binRefFile =
new char[filelen+1];
2997 memcpy(binRefFile, curfile, filelen);
2998 binRefFile[filelen] = 0;
3000 binRefFile =
new char[dirlen+filelen+1];
3001 memcpy(binRefFile, namdWorkDir, dirlen);
3002 memcpy(binRefFile+dirlen, curfile, filelen);
3003 binRefFile[dirlen+filelen] = 0;
3008 if(outputFilename[0] !=
'/' && outputFilename[0]!=
'~') {
3009 filelen = strlen(outputFilename);
3010 char *tmpout =
new char[filelen];
3011 memcpy(tmpout, outputFilename, filelen);
3012 CmiAssert(filelen+dirlen <= 120);
3013 memcpy(outputFilename, namdWorkDir, dirlen);
3014 memcpy(outputFilename+dirlen, tmpout, filelen);
3015 outputFilename[filelen+dirlen] = 0;
3019 if ( dcdFrequency && opts.
defined(
"dcdfile") &&
3020 dcdFilename[0] !=
'/' && dcdFilename[0]!=
'~' ) {
3021 filelen = strlen(dcdFilename);
3022 char *tmpout =
new char[filelen];
3023 memcpy(tmpout, dcdFilename, filelen);
3024 CmiAssert(filelen+dirlen <= 120);
3025 memcpy(dcdFilename, namdWorkDir, dirlen);
3026 memcpy(dcdFilename+dirlen, tmpout, filelen);
3027 dcdFilename[filelen+dirlen] = 0;
3031 if ( velDcdFrequency && opts.
defined(
"veldcdfile") &&
3032 velDcdFilename[0] !=
'/' && velDcdFilename[0]!=
'~' ) {
3033 filelen = strlen(velDcdFilename);
3034 char *tmpout =
new char[filelen];
3035 memcpy(tmpout, velDcdFilename, filelen);
3036 CmiAssert(filelen+dirlen <= 120);
3037 memcpy(velDcdFilename, namdWorkDir, dirlen);
3038 memcpy(velDcdFilename+dirlen, tmpout, filelen);
3039 velDcdFilename[filelen+dirlen] = 0;
3043 if ( forceDcdFrequency && opts.
defined(
"forcedcdfile") &&
3044 forceDcdFilename[0] !=
'/' && forceDcdFilename[0]!=
'~' ) {
3045 filelen = strlen(forceDcdFilename);
3046 char *tmpout =
new char[filelen];
3047 memcpy(tmpout, forceDcdFilename, filelen);
3048 CmiAssert(filelen+dirlen <= 120);
3049 memcpy(forceDcdFilename, namdWorkDir, dirlen);
3050 memcpy(forceDcdFilename+dirlen, tmpout, filelen);
3051 forceDcdFilename[filelen+dirlen] = 0;
3055 if ( restartFrequency && opts.
defined(
"restartname") &&
3056 restartFilename[0] !=
'/' && restartFilename[0]!=
'~' ) {
3057 filelen = strlen(restartFilename);
3058 char *tmpout =
new char[filelen];
3059 memcpy(tmpout, restartFilename, filelen);
3060 CmiAssert(filelen+dirlen <= 120);
3061 memcpy(restartFilename, namdWorkDir, dirlen);
3062 memcpy(restartFilename+dirlen, tmpout, filelen);
3063 restartFilename[filelen+dirlen] = 0;
3068 crashFilename[0] !=
'/' && crashFilename[0] !=
'~') {
3069 filelen = strlen(crashFilename);
3070 char *tmpout =
new char[filelen];
3071 memcpy(tmpout, crashFilename, filelen);
3072 CmiAssert(filelen+dirlen <= 120);
3073 memcpy(crashFilename, namdWorkDir, dirlen);
3074 memcpy(crashFilename+dirlen, tmpout, filelen);
3075 crashFilename[filelen+dirlen] = 0;
3079 delete [] namdWorkDir;
3081 if (opts.
defined(
"numinputprocs")) {
3082 if(numinputprocs > CkNumPes()) {
3083 iout <<
iWARN <<
"The number of input processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
3084 numinputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
3088 if (opts.
defined(
"numoutputprocs")) {
3089 if(numoutputprocs > CkNumPes()) {
3090 iout <<
iWARN <<
"The number of output processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
3091 numoutputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
3095 #ifndef OUTPUT_SINGLE_FILE 3096 #error OUTPUT_SINGLE_FILE not defined! 3099 #if !OUTPUT_SINGLE_FILE 3101 create_output_directories(
"coor");
3102 create_output_directories(
"vel");
3104 create_output_directories(
"dcd");
3106 iout <<
iWARN <<
"The dcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3109 if (velDcdFrequency) {
3110 create_output_directories(
"veldcd");
3111 if(opts.
defined(
"veldcdfile")){
3112 iout <<
iWARN <<
"The veldcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3115 if (forceDcdFrequency) {
3116 create_output_directories(
"forcedcd");
3117 if(opts.
defined(
"forcedcdfile")){
3118 iout <<
iWARN <<
"The forcedcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3124 if (! opts.
defined(
"auxFile")) {
3125 strcpy(auxFilename,outputFilename);
3126 strcat(auxFilename,
".aux");
3131 if (! opts.
defined(
"dcdfile")) {
3132 strcpy(dcdFilename,outputFilename);
3133 strcat(dcdFilename,
".dcd");
3139 if (velDcdFrequency) {
3140 if (! opts.
defined(
"veldcdfile")) {
3141 strcpy(velDcdFilename,outputFilename);
3142 strcat(velDcdFilename,
".veldcd");
3148 if (forceDcdFrequency) {
3149 if (! opts.
defined(
"forcedcdfile")) {
3150 strcpy(forceDcdFilename,outputFilename);
3151 strcat(forceDcdFilename,
".forcedcd");
3158 if (! opts.
defined(
"xstfile")) {
3159 strcpy(xstFilename,outputFilename);
3160 strcat(xstFilename,
".xst");
3166 if (restartFrequency) {
3167 if (! opts.
defined(
"restartname")) {
3168 strcpy(restartFilename,outputFilename);
3169 if ( ! restartSave ) strcat(restartFilename,
".restart");
3173 restartSave =
FALSE;
3174 binaryRestart =
FALSE;
3178 if (!opts.
defined(
"crashFile")) {
3179 strcpy(crashFilename, outputFilename);
3180 strcat(crashFilename,
".crash.csv");
3186 if (storeComputeMap || loadComputeMap) {
3187 if (! opts.
defined(
"computeMapFile")) {
3188 strcpy(computeMapFilename,
"computeMapFile");
3189 strcat(computeMapFilename,
".txt");
3197 if (!paraTypeXplorOn && !paraTypeCharmmOn)
3199 paraTypeXplorOn =
TRUE;
3202 if (paraTypeXplorOn && paraTypeCharmmOn)
3204 NAMD_die(
"Please specify either XPLOR or CHARMM format for parameters!");
3211 if (!(minimizeOn||minimizeCGOn) && !opts.
defined(
"temperature") &&
3214 NAMD_die(
"Must have either an initial temperature or a velocity file");
3217 if (minimizeOn||minimizeCGOn) { initialTemp = 0.0; }
3218 if (opts.
defined(
"velocities") || opts.
defined(
"binvelocities") )
3223 if (LJcorrection && LJcorrectionAlt) {
3224 NAMD_die(
"Only one method for LJ tail correction must be used.");
3228 if ( opts.
defined(
"extendedSystem") ) readExtendedSystem(config->
find(
"extendedSystem")->
data);
3230 #ifdef MEM_OPT_VERSION 3231 if ( LJcorrection ) {
3232 NAMD_die(
"LJ tail corrections not yet available for memory optimized builds");
3234 if ( LJcorrectionAlt ) {
3235 NAMD_die(
"Alternative LJ tail corrections not yet available for memory optimized builds");
3239 if ( LJcorrection && ! cellBasisVector3.length2() ) {
3240 NAMD_die(
"Can't use LJ tail corrections without periodic boundary conditions!");
3243 if ( LJcorrectionAlt && ! cellBasisVector3.length2() ) {
3244 NAMD_die(
"Can't use alternative LJ tail corrections without periodic boundary conditions!");
3247 if ( cellBasisVector3.length2() && ! cellBasisVector2.length2() ) {
3248 NAMD_die(
"Used cellBasisVector3 without cellBasisVector2!");
3251 if ( cellBasisVector2.length2() && ! cellBasisVector1.length2() ) {
3252 NAMD_die(
"Used cellBasisVector2 without cellBasisVector1!");
3255 if ( cellOrigin.length2() && ! cellBasisVector1.length2() ) {
3256 NAMD_die(
"Used cellOrigin without cellBasisVector1!");
3259 lattice.set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
3261 if (! opts.
defined(
"DCDunitcell")) {
3262 dcdUnitCell = lattice.a_p() && lattice.b_p() && lattice.c_p();
3268 if ( ! opts.
defined(
"cylindricalBCAxis") )
3270 cylindricalBCAxis =
'x';
3274 opts.
get(
"cylindricalBCAxis", s);
3276 if (!strcasecmp(s,
"x"))
3278 cylindricalBCAxis =
'x';
3280 else if (!strcasecmp(s,
"y"))
3282 cylindricalBCAxis =
'y';
3284 else if (!strcasecmp(s,
"z"))
3286 cylindricalBCAxis =
'z';
3292 sprintf(err_msg,
"Illegal value '%s' for 'cylindricalBCAxis' in configuration file", s);
3297 if (!opts.
defined(
"splitPatch"))
3303 opts.
get(
"splitPatch", s);
3304 if (!strcasecmp(s,
"position"))
3306 else if (!strcasecmp(s,
"hydrogen"))
3312 "Illegal value '%s' for 'splitPatch' in configuration file",
3319 opts.
get(
"exclude", s);
3321 if (!strcasecmp(s,
"none"))
3326 else if (!strcasecmp(s,
"1-2"))
3331 else if (!strcasecmp(s,
"1-3"))
3335 else if (!strcasecmp(s,
"1-4"))
3339 else if (!strcasecmp(s,
"scaled1-4"))
3347 sprintf(err_msg,
"Illegal value '%s' for 'exclude' in configuration file",
3352 if (scale14 != 1.0 && exclude !=
SCALED14)
3354 iout <<
iWARN <<
"Exclude is not scaled1-4; 1-4scaling ignored.\n" <<
endi;
3358 if (!opts.
defined(
"waterModel")) {
3361 opts.
get(
"waterModel", s);
3362 if (!strncasecmp(s,
"tip4", 4)) {
3365 }
else if (!strncasecmp(s,
"tip3", 4)) {
3368 }
else if (!strncasecmp(s,
"swm4", 4)) {
3374 "Illegal value %s for 'waterModel' in configuration file", s);
3379 NAMD_die(
"Must have 'drudeOn' enabled to use SWM4-DP water model.");
3384 <<
"Setting water model to 'swm4' (SWM4-DP) for Drude polarization.\n" 3397 int * gomethod = &goMethod;
3398 if (!opts.
defined(
"GoMethod")) {
3402 opts.
get(
"GoMethod",s);
3404 *gomethod = atoi(s);
3406 if (!strcasecmp(s,
"matrix")) {
3409 }
else if (!strcasecmp(s,
"faster")) {
3412 }
else if (!strcasecmp(s,
"lowmem")) {
3419 "Illegal value '%s' for 'GoMethod' in configuration file",
3427 if (!opts.
defined(
"MTSAlgorithm"))
3433 opts.
get(
"MTSAlgorithm", s);
3435 if (!strcasecmp(s,
"naive"))
3437 MTSAlgorithm =
NAIVE;
3439 else if (!strcasecmp(s,
"constant"))
3441 MTSAlgorithm =
NAIVE;
3443 else if (!strcasecmp(s,
"impulse"))
3447 else if (!strcasecmp(s,
"verleti"))
3456 "Illegal value '%s' for 'MTSAlgorithm' in configuration file",
3463 if (!opts.
defined(
"longSplitting"))
3469 opts.
get(
"longSplitting", s);
3470 if (!strcasecmp(s,
"sharp"))
3471 longSplitting =
SHARP;
3472 else if (!strcasecmp(s,
"xplor"))
3473 longSplitting =
XPLOR;
3474 else if (!strcasecmp(s,
"c1"))
3476 else if (!strcasecmp(s,
"c2"))
3483 "Illegal value '%s' for 'longSplitting' in configuration file",
3490 if (!opts.
defined(
"rigidBonds"))
3496 opts.
get(
"rigidBonds", s);
3497 if (!strcasecmp(s,
"all"))
3501 else if (!strcasecmp(s,
"water"))
3505 else if (!strcasecmp(s,
"none"))
3513 "Illegal value '%s' for 'rigidBonds' in configuration file", s);
3523 "Water model %s requires rigidBonds set to \"all\" or \"water\"",
3529 if (switchingActive)
3532 if (!opts.
defined(
"switchDist")) {
3533 NAMD_die(
"switchDist must be defined when switching is enabled");
3536 if ( (switchingDist>cutoff) || (switchingDist<0) )
3541 "switchDist muct be between 0 and cutoff, which is %f", cutoff);
3547 if ( martiniSwitching )
3549 if ( ! switchingActive && ! LJPMEOn)
3551 NAMD_die(
"martiniSwitching requires switching");
3553 if ( vdwForceSwitching )
3555 NAMD_die(
"martiniSwitching and vdwForceSwitching are exclusive to one another. Select only one.");
3557 if ( dielectric != 15.0 && ! martiniDielAllow )
3559 iout <<
iWARN <<
"USE DIELECTRIC OF 15.0 WITH MARTINI.\n";
3560 iout <<
iWARN <<
"SETTING dielectric 15.0\n";
3561 iout <<
iWARN <<
"FOR NON-STANDARD DIELECTRIC WITH MARTINI, SET: martiniDielAllow on\n";
3566 iout <<
iWARN <<
"USE COSINE BASED ANGLES WITH MARTINI.\n";
3567 iout <<
iWARN <<
"SETTING cosAngles on\n";
3572 NAMD_die(
"Do not use Particle Mesh Ewald with Martini. Set: PME off");
3576 NAMD_die(
"Do not use Multilevel Summation Method with Martini. Set: MSM off");
3580 NAMD_die(
"Do not use Fast Multipole Method with Martini. Set: FMM off");
3586 if (!opts.
defined(
"pairlistDist"))
3588 pairlistDist = cutoff;
3590 else if (pairlistDist < cutoff)
3592 NAMD_die(
"pairlistDist must be >= cutoff distance");
3595 patchDimension = pairlistDist;
3598 patchDimension += hgroupCutoff;
3602 if (berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) {
3603 defaultMargin = ( useFlexibleCell ? 0.06 : 0.03 ) * patchDimension;
3606 margin = defaultMargin;
3609 if (CUDASOAintegrateMode) {
3611 <<
"Tuning parameters to improve GPU-resident performance\n" 3618 const double CUDASOA_defaultMargin = 4;
3619 const int CUDASOA_defaultOutputEnergies = 100;
3621 if (! config->
find(
"margin")) {
3622 margin = CUDASOA_defaultMargin;
3624 <<
"Setting margin to " << margin <<
"\n" 3627 else if (margin < CUDASOA_defaultMargin) {
3629 <<
"Keeping margin at user-specified value " << margin <<
"\n" 3631 <<
"Performance might be improved by increasing margin size to >= " 3632 << CUDASOA_defaultMargin <<
"\n" 3636 if (! config->
find(
"outputEnergies")) {
3637 outputEnergies = CUDASOA_defaultOutputEnergies;;
3639 <<
"Setting outputEnergies to " << outputEnergies <<
"\n" 3642 else if (outputEnergies < CUDASOA_defaultOutputEnergies) {
3644 <<
"Keeping outputEnergies at user-specified value " 3645 << outputEnergies <<
"\n" 3647 <<
"Performance might be improved by increasing outputEnergies to >= " 3648 << CUDASOA_defaultOutputEnergies <<
"\n" 3653 if ( defaultMargin != 0.0 && margin == 0.0 ) {
3654 margin = defaultMargin;
3655 iout <<
iWARN <<
"ALWAYS USE NON-ZERO MARGIN WITH CONSTANT PRESSURE!\n";
3656 iout <<
iWARN <<
"CHANGING MARGIN FROM 0 to " << margin <<
"\n" <<
endi;
3659 patchDimension += margin;
3665 NAMD_die(
"GBIS not compatible with FullDirect");
3668 NAMD_die(
"GBIS not compatible with PME");
3671 NAMD_die(
"GBIS not compatible with MSM");
3674 NAMD_die(
"GBIS not compatible with FMM");
3677 NAMD_die(
"GBIS not compatible with Alchemical Transformations");
3680 NAMD_die(
"GBIS not compatible with Locally Enhanced Sampling");
3683 NAMD_die(
"GBIS not compatible with FMA");
3686 NAMD_die(
"GBIS not compatible with Drude Polarization");
3689 if (alpha_cutoff > patchDimension) {
3690 patchDimension = alpha_cutoff;
3693 BigReal tmp = (initialTemp > 0) ? initialTemp : 300;
3694 kappa = 50.29216*sqrt(ion_concentration/solvent_dielectric/tmp);
3699 #ifdef MEM_OPT_VERSION 3700 NAMD_die(
"SASA not yet available for memory optimized builds");
3702 if ( lattice.volume() > 0 ) {
3703 NAMD_die(
"SASA does not yet support periodic boundary conditions.");
3711 if ( dihedralOn ) globalOn =
TRUE;
3713 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 3714 if (loweAndersenOn) {
3715 NAMD_die(
"Lowe-Andersen dynamics not compatible with CUDA at this time");
3721 if (loweAndersenOn && (langevinOn || tCoupleOn))
3723 NAMD_die(
"Lowe-Andersen dynamics, Langevin dynamics and temperature coupling are mutually exclusive dynamics modes");
3727 if (tCoupleOn && opts.
defined(
"rescaleFreq") )
3729 NAMD_die(
"Temperature coupling and temperature rescaling are mutually exclusive");
3732 if (globalOn && CkNumPes() > 1)
3734 NAMD_die(
"Global integration does not run in parallel (yet).");
3737 if (COLDOn && langevinOn)
3739 NAMD_die(
"COLD and Langevin dynamics are mutually exclusive dynamics modes");
3741 if (COLDOn && minimizeOn)
3743 NAMD_die(
"COLD and minimization are mutually exclusive dynamics modes");
3745 if (COLDOn && tCoupleOn)
3747 NAMD_die(
"COLD and temperature coupling are mutually exclusive dynamics modes");
3749 if (COLDOn && opts.
defined(
"rescaleFreq"))
3751 NAMD_die(
"COLD and velocity rescaling are mutually exclusive dynamics modes");
3756 NAMD_die(
"splitPatch hydrogen is required for MOLLY");
3761 NAMD_die(
"splitPatch hydrogen is required for rigidBonds");
3767 if(accelMDGiE < 1 || accelMDGiE > 2){
3768 sprintf(msg,
"accelMDGiE was set to %d but it should be 1 or 2", accelMDGiE);
3771 if(accelMDGStatWindow > 0){
3772 if(accelMDGcMDPrepSteps % accelMDGStatWindow != 0)
3773 NAMD_die(
"'accelMDGcMDPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3774 if(accelMDGcMDSteps % accelMDGStatWindow != 0)
3775 NAMD_die(
"'accelMDGcMDSteps' has to be a multiple of 'accelMDGStatWindow'");
3776 if(accelMDGEquiPrepSteps % accelMDGStatWindow != 0)
3777 NAMD_die(
"'accelMDGEquiPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3778 if(accelMDGEquiSteps % accelMDGStatWindow != 0)
3779 NAMD_die(
"'accelMDGEquiSteps' has to be a multiple of 'accelMDGStatWindow'");
3781 if(accelMDGRestart && accelMDGcMDSteps == 0)
3782 accelMDGcMDPrepSteps = 0;
3783 else if(accelMDGcMDSteps - accelMDGcMDPrepSteps < 2)
3784 NAMD_die(
"'accelMDGcMDSteps' should be larger than 'accelMDGcMDPrepSteps'");
3786 if(accelMDGEquiSteps == 0)
3787 accelMDGEquiPrepSteps = 0;
3788 else if(accelMDGresetVaftercmd){
3789 if(accelMDGEquiPrepSteps <= 0)
3790 NAMD_die(
"'accelMDGEquiPrepSteps' should be non-zero");
3791 if(accelMDGEquiSteps - accelMDGEquiPrepSteps < 1)
3792 NAMD_die(
"'accelMDGEquiSteps' should be larger than 'accelMDGEquiPrepSteps'");
3797 iout <<
iWARN <<
"accelMDE will be ignored with accelMDG on.\n" <<
endi;
3798 if(opts.
defined(
"accelMDalpha"))
3799 iout <<
iWARN <<
"accelMDalpha will be ignored with accelMDG on.\n" <<
endi;
3801 iout <<
iWARN <<
"accelMDTE will be ignored with accelMDG on.\n" <<
endi;
3802 if(opts.
defined(
"accelMDTalpha"))
3803 iout <<
iWARN <<
"accelMDTalpha will be ignored with accelMDG on.\n" <<
endi;
3807 NAMD_die(
"accelMDE and accelMDalpha are required for accelMD with accelMDG off");
3809 if(accelMDdual && (!opts.
defined(
"accelMDTE") || !opts.
defined(
"accelMDTalpha"))){
3810 NAMD_die(
"accelMDTE and accelMDTalpha are required for accelMDdual with accelMDG off");
3817 if (minimizeOn && (maximumMove == 0.0))
3819 maximumMove = 0.75 * pairlistDist/stepsPerCycle;
3822 if (!adaptTempRescale && !adaptTempLangevin)
3823 NAMD_die(
"Adaptive tempering needs to be coupled to either the Langevin thermostat or velocity rescaling.");
3824 if (opts.
defined(
"adaptTempInFile") && (opts.
defined(
"adaptTempTmin") ||
3825 opts.
defined(
"adaptTempTmax") ||
3826 adaptTempBins != 0))
3827 NAMD_die(
"cannot simultaneously specify adaptTempInFile and any of {adaptTempTmin, adaptTempTmax,adaptTempBins} as these are read from the input file");
3828 if (!opts.
defined(
"adaptTempInFile") && !(opts.
defined(
"adaptTempTmin") &&
3829 opts.
defined(
"adaptTempTmax") &&
3830 adaptTempBins != 0 ))
3831 NAMD_die(
"Need to specify either adaptTempInFile or all of {adaptTempTmin, adaptTempTmax,adaptTempBins} if adaptTempMD is on.");
3835 monteCarloPressureOnAtStartup = monteCarloPressureOn;
3837 langevinOnAtStartup = langevinOn;
3839 if ( ! opts.
defined(
"langevinDamping") ) langevinDamping = 0.0;
3840 if ( ! opts.
defined(
"langevinHydrogen") ) langevinHydrogen =
TRUE;
3841 if ( (opts.
defined(
"langevinDamping") || opts.
defined(
"langevinHydrogen"))
3842 && (opts.
defined(
"langevinFile") || opts.
defined(
"langevinCol")) )
3843 NAMD_die(
"To specify Langevin dynamics parameters, use either langevinDamping and langevinHydrogen or langevinFile and langevinCol. Do not combine them.");
3844 if ( opts.
defined(
"langevinHydrogen") && langevinDamping == 0.0 )
3845 NAMD_die(
"langevinHydrogen requires langevinDamping to be set.");
3849 langevinGammasDiffer = ( ! langevinHydrogen ) ||
3850 opts.
defined(
"langevinFile") ||
3851 ( opts.
defined(
"drudeDamping") && drudeDamping != langevinDamping );
3852 if (langevinGammasDiffer) {
3855 <<
"The Langevin gamma parameters differ over the particles,\n" 3857 <<
"requiring extra work per step to constrain rigid bonds.\n" 3863 if (loweAndersenOn) {
3864 if (!opts.
defined(
"loweAndersenRate")) loweAndersenRate = 100;
3865 if (!opts.
defined(
"loweAndersenCutoff")) loweAndersenCutoff = 2.7;
3870 if (stochRescaleOn) {
3871 if (langevinOn || loweAndersenOn || tCoupleOn ||
3873 NAMD_die(
"Stochastic velocity rescaling is incompatible with other temperature control methods");
3875 if (!opts.
defined(
"stochRescaleFreq")) stochRescaleFreq = stepsPerCycle;
3878 if (opts.
defined(
"rescaleFreq"))
3880 if (!opts.
defined(
"rescaleTemp"))
3882 if (opts.
defined(
"temperature"))
3884 rescaleTemp = initialTemp;
3888 NAMD_die(
"Must give a rescale temperature if rescaleFreq is defined");
3898 if (opts.
defined(
"rescaleTemp"))
3900 if (!opts.
defined(
"rescaleFreq"))
3902 NAMD_die(
"Must give a rescale freqency if rescaleTemp is given");
3906 if (opts.
defined(
"reassignFreq"))
3908 if (!opts.
defined(
"reassignTemp"))
3910 if (opts.
defined(
"temperature"))
3912 reassignTemp = initialTemp;
3916 NAMD_die(
"Must give a reassign temperature if reassignFreq is defined");
3926 if (opts.
defined(
"reassignTemp"))
3928 if (!opts.
defined(
"reassignFreq"))
3930 NAMD_die(
"Must give a reassignment freqency if reassignTemp is given");
3934 if (opts.
defined(
"reassignIncr"))
3936 if (!opts.
defined(
"reassignFreq"))
3938 NAMD_die(
"Must give a reassignment freqency if reassignIncr is given");
3946 if (opts.
defined(
"reassignHold"))
3948 if (!opts.
defined(
"reassignIncr"))
3950 NAMD_die(
"Must give a reassignment increment if reassignHold is given");
3960 randomSeed = (
unsigned int) time(NULL) + 31530001 * CmiMyPartition();
3964 if (opts.
defined(
"soluteScaling")) {
3968 if ( ! opts.
defined(
"soluteScalingFactorCharge") ) {
3969 soluteScalingFactorCharge = soluteScalingFactor;
3971 if ( ! opts.
defined(
"soluteScalingFactorVdw") ) {
3972 soluteScalingFactorVdw = soluteScalingFactor;
3977 alchFepOnAtStartup = alchFepOn =
FALSE;
3978 alchThermIntOnAtStartup = alchThermIntOn =
FALSE;
3979 alchOnAtStartup = alchOn;
3982 #if !defined(NAMD_CUDA) && !defined(NAMD_HIP) 3985 if (martiniSwitching) {
3986 iout <<
iWARN <<
"Martini switching disabled for alchemical " 3987 "interactions.\n" <<
endi;
3990 if (!opts.
defined(
"alchType")) {
3991 NAMD_die(
"Must define type of alchemical simulation: fep or ti\n");
3994 opts.
get(
"alchType",s);
3995 if (!strcasecmp(s,
"fep")) {
3996 alchFepOnAtStartup = alchFepOn =
TRUE;
3998 else if (!strcasecmp(s,
"ti")) {
3999 alchThermIntOnAtStartup = alchThermIntOn =
TRUE;
4002 NAMD_die(
"Unknown type of alchemical simulation; choices are fep or ti\n");
4006 if (rescaleFreq > 0) alchTemp = rescaleTemp;
4007 else if (reassignFreq > 0) alchTemp = reassignTemp;
4008 else if (langevinOn) alchTemp = langevinTemp;
4009 else if (stochRescaleOn) alchTemp = stochRescaleTemp;
4010 else if (tCoupleOn) alchTemp = tCoupleTemp;
4011 else NAMD_die(
"Alchemical FEP can be performed only in constant temperature simulations\n");
4013 if (reassignFreq > 0 && reassignIncr != 0)
4014 NAMD_die(
"reassignIncr cannot be used in alchemical simulations\n");
4016 if (alchLambda < 0.0 || alchLambda > 1.0)
4017 NAMD_die(
"alchLambda values should be in the range [0.0, 1.0]\n");
4019 if (alchVdwLambdaEnd > 1.0)
4020 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");
4022 if (alchBondLambdaEnd > 1.0)
4023 NAMD_die(
"alchBondLambdaEnd should be in the range [0.0, 1.0]\n");
4025 if (alchElecLambdaStart > 1.0)
4026 NAMD_die(
"alchElecLambdaStart should be in the range [0.0, 1.0]\n");
4029 if (alchRepLambdaEnd > 1.0)
4030 NAMD_die(
"alchRepLambdaEnd should be in the range [0.0, 1.0]\n");
4031 if (alchVdwLambdaEnd < alchRepLambdaEnd)
4032 NAMD_die(
"alchVdwLambdaEnd should be greater than alchRepLambdaEnd\n");
4033 if (alchVdwShiftCoeff > 0.0) {
4034 iout <<
iWARN <<
"alchVdwShiftCoeff is non-zero but not used when WCA" 4035 <<
" is active. Setting it to zero now.\n" <<
endi;
4036 alchVdwShiftCoeff = 0.0;
4038 if (alchThermIntOn) {
4039 NAMD_die(
"alchWCA is not currently compatible with TI");
4041 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 4042 NAMD_die(
"alchWCA is not currently available with CUDA");
4047 if (alchLambda2 < 0.0 || alchLambda2 > 1.0)
4048 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
4052 if (!opts.
defined(
"alchoutfile")) {
4053 strcpy(alchOutFile, outputFilename);
4054 strcat(alchOutFile,
".fep");
4057 if (!opts.
defined(
"alchLambda") || !opts.
defined(
"alchLambda2")) {
4058 NAMD_die(
"alchFepOn is on, but alchLambda or alchLambda2 is not set.");
4061 else if (alchThermIntOn) {
4063 if (alchLambdaFreq && (alchLambda2 < 0.0 || alchLambda2 > 1.0))
4064 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
4066 if (!opts.
defined(
"alchoutfile")) {
4067 strcpy(alchOutFile, outputFilename);
4068 strcat(alchOutFile,
".ti");
4075 if ( alchOn && alchFepOn && alchThermIntOn )
4076 NAMD_die(
"Sorry, combined TI and FEP is not implemented.\n");
4077 if ( alchOn && lesOn )
4078 NAMD_die(
"Sorry, combined LES with FEP or TI is not implemented.\n");
4079 if ( alchOn && alchThermIntOn && lesOn )
4080 NAMD_die(
"Sorry, combined LES and TI is not implemented.\n");
4081 if ( alchWCAOn && !alchOn ) {
4082 iout <<
iWARN <<
"Alchemical WCA decomposition was requested but \ 4083 alchemical free energy calculation is not active. Setting \ 4084 alchWCA to off.\n" <<
endi;
4087 if ( alchDecouple && !alchOn ) {
4088 iout <<
iWARN <<
"Alchemical decoupling was requested but \ 4089 alchemical free energy calculation is not active. Setting \ 4090 alchDecouple to off.\n" <<
endi;
4091 alchDecouple =
FALSE;
4093 if ( alchBondDecouple && !alchOn ) {
4094 iout <<
iWARN <<
"Alchemical bond decoupling was requested but \ 4095 alchemical free energy calculation is not active. Setting \ 4096 alchBondDecouple to off.\n" <<
endi;
4097 alchBondDecouple =
FALSE;
4100 if ( lesOn && ( lesFactor < 1 || lesFactor > 255 ) ) {
4101 NAMD_die(
"lesFactor must be positive and less than 256");
4103 if ((pairInteractionOn && alchOn) || (pairInteractionOn && lesOn))
4104 NAMD_die(
"Sorry, pair interactions may not be calculated when LES, FEP or TI is enabled.");
4108 if ( ! langevinOn ) {
4109 NAMD_die(
"Drude model requires use of Langevin thermostat.");
4111 if ( ! opts.
defined(
"drudeDamping")) {
4112 drudeDamping = langevinDamping;
4113 iout <<
iWARN <<
"Undefined 'drudeDamping' will be set to " 4114 "value of 'langevinDamping'\n" <<
endi;
4117 NAMD_die(
"Drude implementation is incompatible with alchemical " 4118 "free energy calculation.");
4123 if (opts.
defined(
"ldBalancer")) {
4124 if (strcasecmp(loadBalancer,
"none") == 0)
4126 else if (strcasecmp(loadBalancer,
"hybrid") == 0)
4129 NAMD_die(
"Unknown ldBalancer selected");
4132 #ifdef MEM_OPT_VERSION 4137 if (opts.
defined(
"ldbStrategy")) {
4139 if (strcasecmp(loadStrategy,
"comprehensive") == 0)
4141 else if (strcasecmp(loadStrategy,
"refineonly") == 0)
4143 else if (strcasecmp(loadStrategy,
"old") == 0)
4146 NAMD_die(
"Unknown ldbStrategy selected");
4151 if (!opts.
defined(
"ldbPeriod")) {
4152 ldbPeriod=200*stepsPerCycle;
4156 if (!opts.
defined(
"firstLdbStep")) {
4157 firstLdbStep=5*stepsPerCycle;
4160 if (ldbPeriod <= firstLdbStep) {
4161 NAMD_die(
"ldbPeriod must greater than firstLdbStep.");
4164 if (!opts.
defined(
"lastLdbStep")) {
4168 if (!opts.
defined(
"hybridGroupSize")) {
4169 hybridGroupSize = 512;
4171 if ( hybridGroupSize < CkNumPes() ) {
4173 int groupsize = hybridGroupSize;
4176 CmiGetPesOnPhysicalNode(CmiPhysicalNodeID(0), &rpelist, &nodesize);
4177 if ( CkNumPes() % nodesize ) nodesize = CmiNodeSize(CmiNodeOf(0));
4178 if ( CkNumPes() % nodesize ) nodesize = 1;
4179 groupsize += nodesize - 1;
4180 while ( 2 * groupsize > CkNumPes() ) --groupsize;
4181 if ( groupsize < nodesize ) groupsize = nodesize;
4182 while ( groupsize % nodesize ) --groupsize;
4183 while ( groupsize && CkNumPes() % groupsize ) groupsize -= nodesize;
4184 if ( 2 * groupsize < hybridGroupSize ) {
4185 groupsize += nodesize;
4186 while ( CkNumPes() % groupsize ) groupsize += nodesize;
4188 if ( 2 * groupsize <= CkNumPes() ) hybridGroupSize = groupsize;
4193 bool specialTracing = traceAvailable() && (traceIsOn() == 0);
4195 if(!opts.
defined(
"traceStartStep")) {
4196 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
4198 if(!opts.
defined(
"numTraceSteps")) {
4199 numTraceSteps = 100;
4202 if(specialTracing) {
4203 if (!opts.
defined(
"firstLdbStep")) firstLdbStep = 20;
4204 if (!opts.
defined(
"ldbPeriod")) ldbPeriod = 100;
4206 if(!opts.
defined(
"traceStartStep")) {
4207 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
4210 if(!opts.
defined(
"numTraceSteps")) {
4215 #ifdef MEASURE_NAMD_WITH_PAPI 4217 if(!opts.
defined(
"papiMeasureStartStep")) {
4218 papiMeasureStartStep = 3 * firstLdbStep;
4220 if(!opts.
defined(
"numPapiMeasureSteps")) {
4221 numPapiMeasureSteps = 8;
4226 if(simulateInitialMapping) {
4227 if(!opts.
defined(
"simulatedPEs")){
4228 simulatedPEs = CkNumPes();
4230 if(!opts.
defined(
"simulatedNodeSize")){
4231 simulatedNodeSize = CkMyNodeSize();
4235 #ifdef MEM_OPT_VERSION 4244 if(ldbPeriod%stepsPerCycle!=0 || firstLdbStep%stepsPerCycle!=0) {
4245 iout <<
iWARN <<
"In memory optimized version, the ldbPeriod parameter or firstLdbStep parameter is better set to be a multiple of stepsPerCycle parameter!\n";
4249 if (N < firstTimestep) { N = firstTimestep; }
4251 if ( (firstTimestep%stepsPerCycle) != 0)
4253 NAMD_die(
"First timestep must be a multiple of stepsPerCycle!!");
4263 if ( fullDirectOn ) ++i;
4265 NAMD_die(
"More than one full electrostatics algorithm selected!!!");
4268 if (!opts.
defined(
"ldbBackgroundScaling")) {
4269 ldbBackgroundScaling = 1.0;
4271 if (!opts.
defined(
"ldbPMEBackgroundScaling")) {
4272 ldbPMEBackgroundScaling = ldbBackgroundScaling;
4274 if (!opts.
defined(
"ldbHomeBackgroundScaling")) {
4275 ldbHomeBackgroundScaling = ldbBackgroundScaling;
4280 if ( lattice.volume() == 0. ) {
4281 NAMD_die(
"PME requires periodic boundary conditions.");
4283 if ( PMEGridSpacing == 0. ) {
4284 if ( PMEGridSizeX * PMEGridSizeY * PMEGridSizeZ == 0 )
4285 NAMD_die(
"Either PMEGridSpacing or PMEGridSizeX, PMEGridSizeY, and PMEGridSizeZ must be specified.");
4286 else PMEGridSpacing = 1.5;
4288 #ifndef TEST_PME_GRID 4289 for (
int idim = 0; idim < 3; ++idim ) {
4292 const char *direction;
4294 case 0: direction =
"X";
4295 gridSize = &PMEGridSizeX; cellLength = lattice.a().length();
4297 case 1: direction =
"Y";
4298 gridSize = &PMEGridSizeY; cellLength = lattice.b().length();
4300 case 2: direction =
"Z";
4301 gridSize = &PMEGridSizeZ; cellLength = lattice.c().length();
4304 int minSize = (int) ceil(cellLength/PMEGridSpacing);
4306 for (
int minSize = 1; minSize < 300; ++minSize ) {
4308 int bestSize = 10 * (minSize + 10);
4310 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
4311 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
4315 for (
int i2 = 0; i2 <= max2; ++i2 ) {
4316 for (
int i3 = 0; i3 <= max3; ++i3 ) {
4317 for (
int i5 = 0; i5 <= max5; ++i5 ) {
4318 for (
int i7 = 0; i7 <= max7; ++i7 ) {
4319 for (
int i11 = 0; i11 <= max11; ++i11 ) {
4320 if ( i5 + i7 + i11 > i2 )
continue;
4322 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
4323 if ( testSize > bestSize )
continue;
4324 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
4325 if ( testSize > bestSize )
continue;
4326 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
4327 if ( testSize > bestSize )
continue;
4328 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
4329 if ( testSize > bestSize )
continue;
4330 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
4331 if ( testSize > bestSize )
continue;
4332 if ( testSize >= minSize ) bestSize = testSize;
4334 #ifdef TEST_PME_GRID 4335 iout << minSize <<
" " << bestSize <<
"\n" <<
endi;
4337 if ( ! *gridSize ) {
4338 *gridSize = bestSize;
4340 if ( *gridSize * PMEGridSpacing < cellLength ) {
4342 sprintf(errmsg,
"PMEGridSize%s %d is too small for cell length %f and PMEGridSpacing %f\n",
4343 direction, *gridSize, cellLength, PMEGridSpacing);
4348 if ( PMEGridSizeX < 5 ) {
4349 NAMD_die(
"PMEGridSizeX (number of grid points) is very small.");
4351 if ( PMEGridSizeY < 5 ) {
4352 NAMD_die(
"PMEGridSizeY (number of grid points) is very small.");
4354 if ( PMEGridSizeZ < 5 ) {
4355 NAMD_die(
"PMEGridSizeZ (number of grid points) is very small.");
4357 BigReal tolerance = PMETolerance;
4359 while ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) ewaldcof *= 2.0;
4361 BigReal ewaldcof_hi = ewaldcof;
4362 for (
int i = 0; i < 100; ++i ) {
4363 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
4364 if ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) {
4365 ewaldcof_lo = ewaldcof;
4367 ewaldcof_hi = ewaldcof;
4370 PMEEwaldCoefficient = ewaldcof;
4372 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 4374 if ( ! opts.
defined(
"PMEOffload") ) {
4375 PMEOffload = ( (PMEInterpOrder > 4) && one_device_per_node );
4376 if ( PMEOffload )
iout <<
iINFO <<
"Enabling PMEOffload because PMEInterpOrder > 4.\n" <<
endi;
4377 }
else if ( PMEOffload && ! one_device_per_node ) {
4379 iout <<
iWARN <<
"Disabling PMEOffload because multiple CUDA devices per process are not supported.\n" <<
endi;
4389 PMEGridSpacing = 1000.;
4390 PMEEwaldCoefficient = 0;
4396 #if defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC) 4397 NAMD_die(
"LJ-PME does not yet support special GPU-accelerated NAMD builds.");
4399 if ( lattice.volume() == 0. ) {
4400 NAMD_die(
"LJ-PME requires periodic boundary conditions.");
4404 if (config->
find(
"LJPMEGridSpacing")
4405 && LJPMEGridSpacing != PMEGridSpacing) {
4406 NAMD_die(
"LJ-PME must use same grid spacing as PME.");
4409 LJPMEGridSpacing = PMEGridSpacing;
4411 if ((config->
find(
"LJPMEGridSizeX")
4412 && LJPMEGridSizeX != PMEGridSizeX)
4413 || (config->
find(
"LJPMEGridSizeY")
4414 && LJPMEGridSizeY != PMEGridSizeY)
4415 || (config->
find(
"LJPMEGridSizeZ")
4416 && LJPMEGridSizeZ != PMEGridSizeZ)) {
4417 NAMD_die(
"LJ-PME must use same grid sizes as PME.");
4420 LJPMEGridSizeX = PMEGridSizeX;
4421 LJPMEGridSizeY = PMEGridSizeY;
4422 LJPMEGridSizeZ = PMEGridSizeZ;
4424 if (config->
find(
"LJPMEInterpOrder")
4425 && LJPMEInterpOrder != PMEInterpOrder) {
4426 NAMD_die(
"LJ-PME must use same interpolation order as PME.");
4429 LJPMEInterpOrder = PMEInterpOrder;
4432 if ( LJPMEGridSpacing == 0. ) {
4433 if ( LJPMEGridSizeX * LJPMEGridSizeY * LJPMEGridSizeZ == 0 )
4434 NAMD_die(
"Either LJPMEGridSpacing or LJPMEGridSizeX, LJPMEGridSizeY, and LJPMEGridSizeZ must be specified.");
4435 else LJPMEGridSpacing = 1.5;
4437 #ifndef TEST_PME_GRID 4438 for (
int idim = 0; idim < 3; ++idim ) {
4441 const char *direction;
4443 case 0: direction =
"X";
4444 gridSize = &LJPMEGridSizeX; cellLength = lattice.a().length();
4446 case 1: direction =
"Y";
4447 gridSize = &LJPMEGridSizeY; cellLength = lattice.b().length();
4449 case 2: direction =
"Z";
4450 gridSize = &LJPMEGridSizeZ; cellLength = lattice.c().length();
4453 int minSize = (int) ceil(cellLength/LJPMEGridSpacing);
4455 for (
int minSize = 1; minSize < 300; ++minSize ) {
4457 int bestSize = 10 * (minSize + 10);
4459 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
4460 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
4464 for (
int i2 = 0; i2 <= max2; ++i2 ) {
4465 for (
int i3 = 0; i3 <= max3; ++i3 ) {
4466 for (
int i5 = 0; i5 <= max5; ++i5 ) {
4467 for (
int i7 = 0; i7 <= max7; ++i7 ) {
4468 for (
int i11 = 0; i11 <= max11; ++i11 ) {
4469 if ( i5 + i7 + i11 > i2 )
continue;
4471 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
4472 if ( testSize > bestSize )
continue;
4473 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
4474 if ( testSize > bestSize )
continue;
4475 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
4476 if ( testSize > bestSize )
continue;
4477 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
4478 if ( testSize > bestSize )
continue;
4479 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
4480 if ( testSize > bestSize )
continue;
4481 if ( testSize >= minSize ) bestSize = testSize;
4483 #ifdef TEST_PME_GRID 4484 iout <<
"LJ-PME: " << minSize <<
" " << bestSize <<
"\n" <<
endi;
4486 if ( ! *gridSize ) {
4487 *gridSize = bestSize;
4489 if ( *gridSize * LJPMEGridSpacing < cellLength ) {
4491 sprintf(errmsg,
"LJPMEGridSize%s %d is too small for cell length %f and LJPMEGridSpacing %f\n",
4492 direction, *gridSize, cellLength, LJPMEGridSpacing);
4497 if ( LJPMEGridSizeX < 5 ) {
4498 NAMD_die(
"LJPMEGridSizeX (number of grid points) is very small.");
4500 if ( LJPMEGridSizeY < 5 ) {
4501 NAMD_die(
"LJPMEGridSizeY (number of grid points) is very small.");
4503 if ( LJPMEGridSizeZ < 5 ) {
4504 NAMD_die(
"LJPMEGridSizeZ (number of grid points) is very small.");
4506 BigReal tolerance = LJPMETolerance;
4508 BigReal aRc = ewaldcof*cutoff;
4511 BigReal damping = (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom;
4512 while ( damping >= tolerance ) {
4514 aRc = ewaldcof*cutoff;
4515 damping = (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom;
4518 BigReal ewaldcof_hi = ewaldcof;
4519 for (
int i = 0; i < 100; ++i ) {
4520 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
4521 aRc = ewaldcof*cutoff;
4522 if ( (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom >= tolerance ) {
4523 ewaldcof_lo = ewaldcof;
4525 ewaldcof_hi = ewaldcof;
4528 LJPMEEwaldCoefficient = ewaldcof;
4533 LJPMEGridSpacing = 1000.;
4534 LJPMEEwaldCoefficient = 0;
4550 if (FMAFFTBlock != 4)
4551 NAMD_die(
"FMAFFTBlock: Block length must be 4 for short FFT's");
4552 if (FMAMp % FMAFFTBlock != 0)
4553 NAMD_die(
"FMAMp: multipole term must be multiple of block length (FMAFFTBlock)");
4556 if ( (nonbondedFrequency > stepsPerCycle) || ( (stepsPerCycle % nonbondedFrequency) != 0) )
4558 NAMD_die(
"stepsPerCycle must be a multiple of nonbondedFreq");
4561 if (!LCPOOn && !GBISOn && !GBISserOn && !FMAOn && !PMEOn && !MSMOn && !fullDirectOn && !FMMOn)
4563 fullElectFrequency = 0;
4567 if (!opts.
defined(
"fullElectFrequency"))
4569 if (opts.
defined(
"fmaFrequency")) {
4570 iout <<
iWARN <<
"The parameter fmaFrequency has been renamed fullElectFrequency.\n" <<
endi;
4571 fullElectFrequency = fmaFrequency;
4573 iout <<
iWARN <<
"The parameter fullElectFrequency now defaults to nonbondedFreq (" << nonbondedFrequency <<
") rather than stepsPerCycle.\n" <<
endi;
4574 fullElectFrequency = nonbondedFrequency;
4579 if (opts.
defined(
"fmaFrequency")) {
4580 iout <<
iWARN <<
"Ignoring redundant parameter fmaFrequency in favor of fullElectFrequency.\n" <<
endi;
4582 if ( (fullElectFrequency > stepsPerCycle) || ( (stepsPerCycle % fullElectFrequency) != 0) )
4584 NAMD_die(
"stepsPerCycle must be a multiple of fullElectFrequency");
4588 if ( (nonbondedFrequency > fullElectFrequency) || ( (fullElectFrequency % nonbondedFrequency) != 0) )
4590 NAMD_die(
"fullElectFrequency must be a multiple of nonbondedFreq");
4593 if (singleTopology && fullElectFrequency > 1)
NAMD_die(
"Single topology free energy calculation discourages multiple timesteps to assure accuracy!");
4594 if (singleTopology && alchDecouple)
NAMD_die(
"Single topology free energy calculation can NOT work with alchDecouple on");
4596 if (multigratorOn) {
4597 if ( (multigratorTemperatureFreq > multigratorPressureFreq) || ( (multigratorPressureFreq % multigratorTemperatureFreq) != 0) )
4599 NAMD_die(
"multigratorTemperatureFreq must be a multiple of multigratorPressureFreq");
4601 if ( (fullElectFrequency > multigratorTemperatureFreq) || ( (multigratorTemperatureFreq % fullElectFrequency) != 0) )
4603 NAMD_die(
"fullElectFrequency must be a multiple of multigratorTemperatureFreq");
4605 if (multigratorNoseHooverChainLength <= 2) {
4606 NAMD_die(
"multigratorNoseHooverChainLength must be greater than 2");
4610 if (!opts.
defined(
"fmaTheta"))
4614 if ( lesOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4615 NAMD_die(
"Sorry, LES is only implemented for PME full electrostatics.");
4617 if ( alchFepOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4618 NAMD_die(
"Sorry, FEP is only implemented for PME full electrostatics.");
4620 if ( alchThermIntOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4621 NAMD_die(
"Sorry, TI is only implemented for PME full electrostatics.");
4623 if ( pairInteractionOn && FMAOn ) {
4624 NAMD_die(
"Sorry, pairInteraction not implemented for FMA.");
4626 if ( pairInteractionOn && useDPME ) {
4627 NAMD_die(
"Sorry, pairInteraction not implemented for DPME.");
4629 if ( pairInteractionOn && fullDirectOn ) {
4630 NAMD_die(
"Sorry, pairInteraction not implemented for full direct electrostatics.");
4632 if ( ! pairInteractionOn ) {
4633 pairInteractionSelf = 0;
4635 if ( pairInteractionOn && !pairInteractionSelf && !config->
find(
"pairInteractionGroup2"))
4636 NAMD_die(
"pairInteractionGroup2 must be specified");
4638 if ( ! fixedAtomsOn ) {
4639 fixedAtomsForces = 0;
4642 if ( gridforceOn || mgridforceOn ) {
4643 parse_mgrid_params(config);
4646 if (groupRestraintsOn) {
4647 #ifdef NODEGROUP_FORCE_REGISTER 4648 if (CUDASOAintegrateMode) {
4650 parse_group_restraints_params(config);
4652 groupRestraints.CheckGroupRestraints();
4655 sprintf(msg,
"GroupRestraints requires GPUresident.\n" 4656 " Otherwise, use Colvars for similar functionality.");
4661 sprintf(msg,
"GroupRestraints is not supported on regular multicore builds.\n" 4662 " Please use single-node GPU build with GPUresident on\n" 4663 " or use Colvars for similar functionality.");
4668 if ( extraBondsOn ) {
4669 extraBondsCosAnglesSetByUser = ! ! config->
find(
"extraBondsCosAngles");
4671 extraBondsCosAnglesSetByUser =
false;
4674 if (!opts.
defined(
"constraints"))
4677 constraintScaling = 1.0;
4680 selectConstraintsOn =
FALSE;
4684 movingConstraintsOn =
FALSE;
4687 rotConstraintsOn =
FALSE;
4692 if (rotConstraintsOn) {
4693 rotConsAxis = rotConsAxis.unit();
4696 if(opts.
defined(
"rotConstraints")
4697 && opts.
defined(
"movingConstraints")) {
4698 NAMD_die(
"Rotating and moving constraints are mutually exclusive!");
4703 if(opts.
defined(
"selectConstraints") && !opts.
defined(
"selectConstrX")
4704 && !opts.
defined(
"selectConstrY") && !opts.
defined(
"selectConstrZ")) {
4705 NAMD_die(
"selectConstraints was specified, but no Cartesian components were defined!");
4707 if (!opts.
defined(
"selectConstraints")) {
4723 if (SMDDir.length2() == 0) {
4724 NAMD_die(
"SMD direction vector must be non-zero");
4727 SMDDir = SMDDir.unit();
4730 if (SMDOutputFreq > 0 && SMDOutputFreq < stepsPerCycle
4731 || SMDOutputFreq % stepsPerCycle != 0) {
4732 NAMD_die(
"SMDOutputFreq must be a multiple of stepsPerCycle");
4740 sphericalBCr1 = 0.0;
4741 sphericalBCk1 = 0.0;
4742 sphericalBCexp1 = 0;
4743 sphericalBCr2 = 0.0;
4744 sphericalBCk2 = 0.0;
4745 sphericalBCexp2 = 0;
4747 else if (!opts.
defined(
"sphericalBCr2"))
4749 sphericalBCr2 = -1.0;
4750 sphericalBCk2 = 0.0;
4751 sphericalBCexp2 = 0;
4754 if (!cylindricalBCOn)
4756 cylindricalBCr1 = 0.0;
4757 cylindricalBCk1 = 0.0;
4758 cylindricalBCexp1 = 0;
4759 cylindricalBCr2 = 0.0;
4760 cylindricalBCk2 = 0.0;
4761 cylindricalBCexp2 = 0;
4762 cylindricalBCl1 = 0.0;
4763 cylindricalBCl2 = 0.0;
4765 else if (!opts.
defined(
"cylindricalBCr2"))
4767 cylindricalBCr2 = -1.0;
4768 cylindricalBCk2 = 0.0;
4769 cylindricalBCexp2 = 0;
4770 cylindricalBCl2 = 0.0;
4783 if (!opts.
defined(
"eFieldFreq")) eFieldFreq = 0.0;
4784 if (!opts.
defined(
"eFieldPhase")) eFieldPhase = 0.0;
4790 stirStartingTheta = 0.0;
4801 if (!opts.
defined(
"langevin"))
4807 if (!opts.
defined(
"loweAndersen"))
4809 loweAndersenTemp = 0.0;
4820 if (daCutoffDist > pairlistDist)
4821 NAMD_die(
"Hydrogen bond cutoff distance must be <= pairlist distance");
4828 if (pairInteractionOn) {
4829 if (outputEnergies != 1) {
4830 iout <<
iWARN <<
"Setting outputEnergies to 1 due to\n";
4835 if (pairInteractionOn || pressureProfileOn) {
4836 if (nonbondedFrequency != 1) {
4837 iout <<
iWARN <<
"Setting nonbondedFreq to 1 due to\n";
4838 iout <<
iWARN <<
"pairInteraction or pressure profile calculations\n" <<
endi;
4843 if (!opts.
defined(
"outputTiming"))
4845 outputTiming = firstLdbStep;
4846 int ot2 = 10 * outputEnergies;
4847 if ( outputTiming < ot2 ) outputTiming = ot2;
4856 if (fullElectFrequency > 1)
NAMD_die(
"QM/MM discourages multiple timesteps to assure accuracy!");
4858 if (opts.
defined(
"QMSecProc")){
4862 qmSecProcOn =
false;
4865 if (opts.
defined(
"qmPrepProc")){
4866 qmPrepProcOn =
true;
4869 qmPrepProcOn =
false;
4872 if (opts.
defined(
"QMParamPDB")){
4873 qmParamPDBDefined =
true;
4876 qmParamPDBDefined =
false;
4879 if (opts.
defined(
"QMBondColumn")){
4880 qmBondColumnDefined =
true;
4883 qmBondColumnDefined =
false;
4886 if (qmBondColumnDefined || qmBondGuess){
4893 if ( strcasecmp(qmSoftware,
"orca") != 0 &&
4894 strcasecmp(qmSoftware,
"mopac") != 0 &&
4895 strcasecmp(qmSoftware,
"custom") != 0 ) {
4896 NAMD_die(
"Available QM software options are \'mopac\', \'orca\', or \'custom\'.");
4899 if ( strcasecmp(qmSoftware,
"orca") == 0 )
4901 if ( strcasecmp(qmSoftware,
"mopac") == 0 )
4903 if ( strcasecmp(qmSoftware,
"custom") == 0 )
4908 if (! opts.
defined(
"QMConfigLine"))
4909 NAMD_die(
"If the selected QM software is \'mopac\' or \'orca\'\ 4910 , QMConfigLine needs to be defined.");
4916 if (opts.
defined(
"QMChargeMode")) {
4917 if ( strcasecmp(qmChrgModeS,
"none") != 0 &&
4918 strcasecmp(qmChrgModeS,
"mulliken") != 0 &&
4919 strcasecmp(qmChrgModeS,
"chelpg") != 0) {
4920 NAMD_die(
"Available charge options are \'none\', \'mulliken\' or \'chelpg\'.");
4923 if ( strcasecmp(qmChrgModeS,
"none") == 0 )
4925 if ( strcasecmp(qmChrgModeS,
"mulliken") == 0 )
4927 if ( strcasecmp(qmChrgModeS,
"chelpg") == 0 )
4933 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4936 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4938 if (qmBondOn && (opts.
defined(
"QMBondValueType"))) {
4939 if ( strcasecmp(qmBondValueTypeS,
"len") != 0 &&
4940 strcasecmp(qmBondValueTypeS,
"ratio") != 0 ) {
4941 NAMD_die(
"Available QM bond value type options are \'len\' or \'ratio\'.");
4946 if ( strcasecmp(qmBondValueTypeS,
"len") == 0 )
4948 if ( strcasecmp(qmBondValueTypeS,
"ratio") == 0 )
4952 else if (qmBondOn && ! (opts.
defined(
"QMBondValueType")))
4955 if ( strcmp(qmColumn,
"beta") != 0 &&
4956 strcmp(qmColumn,
"occ") != 0 ) {
4957 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4960 if (qmBondColumnDefined) {
4961 if ( strcmp(qmBondColumn,
"beta") != 0 &&
4962 strcmp(qmBondColumn,
"occ") != 0 ) {
4963 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4966 if (strcmp(qmBondColumn,qmColumn) == 0)
4967 NAMD_die(
"QM column and bond-column must be different!");
4971 if (opts.
defined(
"QMBondScheme")) {
4972 if ( strcasecmp(qmBondSchemeS,
"CS") == 0 )
4974 if ( strcasecmp(qmBondSchemeS,
"RCD") == 0 )
4976 if ( strcasecmp(qmBondSchemeS,
"Z1") == 0 )
4978 if ( strcasecmp(qmBondSchemeS,
"Z2") == 0 )
4980 if ( strcasecmp(qmBondSchemeS,
"Z3") == 0 )
4988 if (opts.
defined(
"QMPointChargeScheme") && qmPCSwitchOn) {
4989 if ( strcasecmp(qmPCSchemeS,
"none") == 0 )
4992 if ( strcasecmp(qmPCSchemeS,
"round") == 0 )
4994 if ( strcasecmp(qmPCSchemeS,
"zero") == 0 )
4997 if ( qmPCScheme > 1 && ! qmPCSwitchOn)
4998 NAMD_die(
"QM Charge Schemes \'round\' or \'zero\' can only be applied with QMswitching set to \'on\'!");
5010 NAMD_die(
"QM Live Solvent Selection cannot be done with QMNoPntChrg set to \'on\'!") ;
5013 NAMD_die(
"QM Live Solvent Selection cannot be done with fixed bonds!") ;
5015 if (qmLSSFreq % qmPCSelFreq != 0)
5016 NAMD_die(
"Frequency of QM solvent update must be a multiple of frequency of point charge selection.");
5018 if (qmLSSFreq % stepsPerCycle != 0)
5019 NAMD_die(
"Frequency of QM solvent update must be a multiple of steps per cycle.");
5021 if (opts.
defined(
"QMLSSMode") ) {
5022 if ( strcasecmp(qmLSSModeS,
"dist") != 0 &&
5023 strcasecmp(qmLSSModeS,
"COM") != 0 ) {
5024 NAMD_die(
"Available LSS mode options are \'dist\' and \'COM\'.");
5026 if ( strcasecmp(qmLSSModeS,
"dist") == 0 )
5028 else if ( strcasecmp(qmLSSModeS,
"COM") == 0 )
5039 if (opts.
defined(
"QMSwitchingType") ) {
5040 if ( strcasecmp(qmPCSwitchTypeS,
"shift") != 0 &&
5041 strcasecmp(qmPCSwitchTypeS,
"switch") != 0 ) {
5042 NAMD_die(
"Available scaling options are \'shift\' and \'switch\'.");
5044 if ( strcasecmp(qmPCSwitchTypeS,
"shift") == 0 )
5046 else if ( strcasecmp(qmPCSwitchTypeS,
"switch") == 0 )
5053 if (qmNoPC && qmPCSelFreq > 1) {
5054 iout <<
iWARN <<
"QMPCStride being IGNORED since QMNoPntChrg is set to \'on\'!\n" <<
endi;
5058 if (qmNoPC && qmPCSwitchOn)
5059 NAMD_die(
"QM PC switching can only be applied with QMNoPntChrg set to \'off\'!");
5064 if (qmPCSelFreq <= 0)
5065 NAMD_die(
"QMPCFreq can only be a positive number! For static point charge selection, see QMCutomPC.");
5067 if (qmCustomPCSel && qmNoPC)
5068 NAMD_die(
"QM Custom PC Selection is incompatible with QMNoPntChrg!");
5073 if (qmCustomPCSel && qmPCSelFreq > 1)
5074 NAMD_die(
"QM Custom PC Selection is incompatible with QMPCStride > 1!");
5076 if (qmCSMD && (! opts.
defined(
"QMCSMDFile") ))
5077 NAMD_die(
"QM Conditional SMD is ON, but no CSMD configuration file was profided!");
5081 if (CUDASOAintegrateMode) {
5083 CUDASOAintegrate =
TRUE;
5084 SOAintegrateOn =
TRUE;
5085 if (CkNumNodes() > 1) {
5086 GPUresidentSingleProcessMode =
FALSE;
5087 NAMD_die(
"GPU Resident mode must be run in single process mode");
5091 CUDASOAintegrate =
FALSE;
5092 GPUresidentSingleProcessMode =
FALSE;
5095 if (CUDASOAintegrateMode && (minimizeOn || minimizeCGOn)) {
5097 "GPUresident does not support \"minimization\" keyword.\n" 5098 "Instead use \"minimize\" available through Tcl scripting interface." 5102 if (SOAintegrateOn) {
5115 if (testOn || commOnly || statsOn ||
5116 minimizeOn || minimizeCGOn ||
5118 pressureProfileOn ||
5124 langevin_useBAOAB ||
5127 zeroMomentum || zeroMomentumAlt ||
5128 (constraintsOn && ! CUDASOAintegrateMode) ||
5129 (monteCarloPressureOn && ! CUDASOAintegrateMode) ||
5131 (tclForcesOn && (TCL_MAJOR_VERSION<=8 && TCL_MINOR_VERSION <6)) ||
5139 berendsenPressureOn ||
5149 tabulatedEnergies ||
5153 pairInteractionOn ||
5154 #ifdef OPENATOM_VERSION
5170 "%s is incompatible with the following options:\n" 5171 " minimization; pressure profiling; multigrator; Lowe-Andersen;\n" 5172 " fixed atoms; GBIS; LCPO; zero momentum;%s\n" 5173 " temperature coupling, rescaling, or reassignment;\n" 5174 " water models other than TIP3 and TIP4; Drude.\n" 5176 "( Bribe us with coffee to get your feature GPU-Resident! :)",
5177 (CUDASOAintegrateMode ?
"GPUresident" :
"SOAintegrate"),
5178 (CUDASOAintegrateMode ?
"" :
" Monte Carlo pressure control;"),
5179 (CUDASOAintegrateMode ?
"" :
" harmonic restraints;")
5181 char featuremsg[1024];
5182 snprintf(featuremsg,1024,
"\nConfiguration could amend the following options to proceeed :\n");
5183 if(testOn) strncat(featuremsg,
" test\n",1023);
5184 if(commOnly) strncat(featuremsg,
" commOnly\n",1023);
5185 if(statsOn) strncat(featuremsg,
" stats\n",1023);
5186 if(minimizeOn) strncat(featuremsg,
" minimize\n",1023);
5187 if(minimizeCGOn) strncat(featuremsg,
" minimizeCG\n",1023);
5188 if(maximumMove != 0) strncat(featuremsg,
" maximumMove\n",1023);
5189 if(pressureProfileOn) strncat(featuremsg,
" pressureProfile\n",1023);
5190 if(accelMDOn) strncat(featuremsg,
" accelMD\n",1023);
5191 if(adaptTempOn) strncat(featuremsg,
" adaptTemp\n",1023);
5192 if(mollyOn) strncat(featuremsg,
" molly\n",1023);
5193 if(multigratorOn) strncat(featuremsg,
" multigrator\n",1023);
5194 if(loweAndersenOn) strncat(featuremsg,
" loweAndersen\n",1023);
5195 if(langevin_useBAOAB) strncat(featuremsg,
" langevin_useBAOAB\n",1023);
5196 if(fixedAtomsOn) strncat(featuremsg,
" fixedAtoms\n",1023);
5197 if(GBISOn) strncat(featuremsg,
" GBIS\n",1023);
5198 if(LCPOOn) strncat(featuremsg,
" LCPO\n",1023);
5199 if(zeroMomentum) strncat(featuremsg,
" zeroMomentum\n",1023);
5200 if(zeroMomentumAlt) strncat(featuremsg,
" zeroMomentumAlt\n",1023);
5201 if(constraintsOn && ! CUDASOAintegrateMode) strncat(featuremsg,
" constraints\n",1023);
5202 if(monteCarloPressureOn && ! CUDASOAintegrateMode) strncat(featuremsg,
" monteCarloPressure\n",1023);
5203 if(tCoupleOn) strncat(featuremsg,
" tCouple\n",1023);
5204 if(rescaleFreq > 0) strncat(featuremsg,
" rescaleFreq\n",1023);
5205 if(watmodel ==
WaterModel::SWM4) strncat(featuremsg,
" watmodel != SWM4\n",1023);
5206 if(lonepairs) strncat(featuremsg,
" lonepairs\n",1023);
5207 if(drudeOn) strncat(featuremsg,
" drude\n",1023);
5209 if(tclForcesOn && (TCL_MAJOR_VERSION<=8 && TCL_MINOR_VERSION <6))
5211 strncat(featuremsg,
" tclForces supported in GPU resident mode only with TCL newer than 8.6, we recommended 8.6.13, your build has ",1023);
5212 strncat(featuremsg, TCL_PATCH_LEVEL,1023);
5215 if(FMAOn) strncat(featuremsg,
" FMAOn\n",1023);
5216 if(fullDirectOn) strncat(featuremsg,
" fullDirectOn\n",1023);
5217 if(MSMOn) strncat(featuremsg,
" MSMon\n",1023);
5218 if(FMMOn) strncat(featuremsg,
" FMMon\n",1023);
5219 if(globalOn) strncat(featuremsg,
" globalOn\n",1023);
5220 if(dihedralOn) strncat(featuremsg,
" dihedralOn\n",1023);
5221 if(berendsenPressureOn) strncat(featuremsg,
" berendsenPressureOn\n",1023);
5222 if(printBadContacts) strncat(featuremsg,
" printBadContacts\n",1023);
5223 if(freeEnergyOn) strncat(featuremsg,
" freeEnergyOn\n",1023);
5224 if(miscForcesOn) strncat(featuremsg,
" miscForcesOn\n",1023);
5225 if(IMDon) strncat(featuremsg,
" IMDOn\n",1023);
5226 if(TMDOn) strncat(featuremsg,
" TMDOn\n",1023);
5227 if(symmetryOn) strncat(featuremsg,
" symmetryOn\n",1023);
5228 if(qmForcesOn) strncat(featuremsg,
" qmForcesOn\n",1023);
5229 if(sphericalBCOn) strncat(featuremsg,
" sphericalBCOn\n",1023);
5230 if(cylindricalBCOn) strncat(featuremsg,
" cylindricalBCOn\n",1023);
5231 if(extForcesOn) strncat(featuremsg,
" extForcesOn\n",1023);
5232 if(tabulatedEnergies) strncat(featuremsg,
" tabulatedEnergies\n",1023);
5233 if(tclBCOn) strncat(featuremsg,
" tclBCOn\n",1023);
5234 if(lesOn) strncat(featuremsg,
" lesOn\n",1023);
5235 if(goForcesOn) strncat(featuremsg,
" goForcesOn\n",1023);
5236 if(pairInteractionOn) strncat(featuremsg,
" pairInteractionOn\n",1023);
5237 #ifdef OPENATOM_VERSION 5238 if(openatomOn) strncat(featuremsg,
" openatomOn\n",1023);
5240 if(movDragOn) strncat(featuremsg,
" movDragOn\n",1023);
5241 if(rotDragOn) strncat(featuremsg,
" rotDragOn\n",1023);
5242 if(consTorqueOn) strncat(featuremsg,
" consTorqueOn\n",1023);
5243 if(stirOn) strncat(featuremsg,
" stirOn\n",1023);
5244 if(HydrogenBonds) strncat(featuremsg,
" HydrogenBonds\n",1023);
5245 strncat(msg,featuremsg,2047);
5246 if (CUDASOAintegrateMode) {
5252 <<
"Falling back on standard integration code path\n" <<
endi;
5254 SOAintegrateOn =
FALSE;
5257 if (CUDASOAintegrateMode) {
5258 #ifndef NODEGROUP_FORCE_REGISTER 5259 NAMD_die(
"GPUresident not supported on regular multicore builds");
5261 if (monteCarloPressureOn && fixedAtomsOn) {
5262 NAMD_die(
"Monte Carlo barostat is not compatible with fixed atoms in GPU-resident mode.\n");
5265 NAMD_die(
"GPUresident does not support QM forces");
5268 NAMD_die(
"GPUresident does not support " 5269 "locally enhanced sampling");
5272 if(CkNumNodes() > 1){
5275 "GPUresident is a shared-memory, single-process mode of execution.\n" 5276 "You're probably not setting the '++ppn' flags accordingly or\n" 5277 "the Charm++ build is not a multicore build and you're spawning\n" 5278 "multiple processes, which is not cool." 5281 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5285 if(monteCarloPressureOn){
5286 NAMD_die(
"Monte Carlo barostat is not compatible with multi-GPU GPUresident");
5292 <<
"Running with GPU-resident mode\n" 5298 NAMD_die(
"SOAintegrate is not fully supported. Please use GPUresident instead.");
5303 if (!CUDASOAintegrateMode && monteCarloPressureOn) {
5304 NAMD_die(
"GPUresident is required for Monte Carlo pressure control. \n");
5307 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5308 if (CUDASOAintegrateMode) {
5317 if ( useCUDAdisable ) {
5321 iout <<
iWARN <<
"Disabling GPU kernel for bonds due to incompatibility with Drude oscillators.\n";
5325 iout <<
iWARN <<
"1-4 NbThole has no GPU kernel implementation yet.\n";
5330 iout <<
iWARN <<
"Disabling GPU kernels for dihedrals and crossterms due to incompatibility with accelerated MD options.\n";
5334 if ( alchOn || !switchingActive || vdwForceSwitching || martiniSwitching || !PMEOn ||
5335 longSplitting!=
C1 || scale14!=1.0 || limitDist > 0.0) {
5336 useCUDANonbondedForceTable =
TRUE;
5337 iout <<
iWARN <<
"Always using force tables for GPU nonbonded kernel due to unsupported config parameters.\n";
5340 if (useDeviceMigration && !CUDASOAintegrateMode) {
5341 useDeviceMigration =
FALSE;
5342 iout <<
iWARN <<
"GPUAtomMigration is only supported for GPUresident. Disabling GPUAtomMigration.\n";
5345 if ( useDeviceMigration ) {
5346 if (constraintsOn || SMDOn || groupRestraintsOn || eFieldOn || fixedAtomsOn || monteCarloPressureOn ||
5347 tclForcesOn || colvarsOn || gridforceOn || mgridforceOn || consForceOn || useCudaGlobal || IMDon) {
5348 updateAtomMap =
TRUE;
5353 NAMD_die(
"Fixed atoms are not supported in GPUAtomMigration.\n");
5356 if ( useDeviceMigration ) {
5357 iout <<
iWARN <<
"GPUAtomMigration is experimental\n";
5359 if ( !GPUresidentSingleProcessMode ) {
5360 if (monteCarloPressureOn) {
5361 NAMD_die(
"MC Pressure is not supported with GPU resident multi-process mode\n");
5365 if (drudeNbtholeCut * drudeNbtholeCut > cutoff * cutoff) {
5366 NAMD_die(
"The GPU implementation of NbThole expects drudeNbtholeCut to be greater than cutoff!\n");
5371 #ifdef NAMD_AVXTILES 5372 if (avxTilesCommandLineDisable) useAVXTiles =
FALSE;
5374 if (alchOn || lesOn || tabulatedEnergies || drudeOn || goForcesOn ||
5375 pressureProfileOn || qmForcesOn || LJPMEOn) {
5376 useAVXTiles =
FALSE;
5377 iout <<
iWARN <<
"Disabling AVX tiles optimizations due to " 5378 <<
"incompatible simulation params.\n";
5382 useAVXTiles =
FALSE;
5394 iout <<
iINFO <<
"SIMULATION PARAMETERS:\n";
5396 iout <<
iINFO <<
"NUMBER OF STEPS " << N <<
"\n";
5397 iout <<
iINFO <<
"STEPS PER CYCLE " << stepsPerCycle <<
"\n";
5400 if ( lattice.a_p() || lattice.b_p() || lattice.c_p() ) {
5401 if ( lattice.a_p() )
5402 iout <<
iINFO <<
"PERIODIC CELL BASIS 1 " << lattice.a() <<
"\n";
5403 if ( lattice.b_p() )
5404 iout <<
iINFO <<
"PERIODIC CELL BASIS 2 " << lattice.b() <<
"\n";
5405 if ( lattice.c_p() )
5406 iout <<
iINFO <<
"PERIODIC CELL BASIS 3 " << lattice.c() <<
"\n";
5407 iout <<
iINFO <<
"PERIODIC CELL CENTER " << lattice.origin() <<
"\n";
5409 iout <<
iINFO <<
"WRAPPING WATERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
5412 iout <<
iINFO <<
"WRAPPING ALL CLUSTERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
5415 iout <<
iINFO <<
"WRAPPING TO IMAGE NEAREST TO PERIODIC CELL CENTER.\n";
5420 if ( CkNumPes() > 512 ) ldbUnloadOne =
TRUE;
5421 if ( ldbUnloadOne || CkNumPes() > 128 ) ldbUnloadZero =
TRUE;
5433 iout <<
iINFO <<
"LOAD BALANCING STRATEGY New Load Balancers -- DEFAULT\n";
5435 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Refinement Only\n";
5437 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Comprehensive\n";
5439 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Old Load Balancers\n";
5442 iout <<
iINFO <<
"LDB PERIOD " << ldbPeriod <<
" steps\n";
5443 iout <<
iINFO <<
"FIRST LDB TIMESTEP " << firstLdbStep <<
"\n";
5445 iout <<
iINFO <<
"HYBRIDLB GROUP SIZE " << hybridGroupSize <<
"\n";
5446 iout <<
iINFO <<
"LAST LDB TIMESTEP " << lastLdbStep <<
"\n";
5447 if ( ldbRelativeGrainsize > 0. )
5448 iout <<
iINFO <<
"LDB RELATIVE GRAINSIZE " << ldbRelativeGrainsize <<
"\n";
5449 iout <<
iINFO <<
"LDB BACKGROUND SCALING " << ldbBackgroundScaling <<
"\n";
5450 iout <<
iINFO <<
"HOM BACKGROUND SCALING " << ldbHomeBackgroundScaling <<
"\n";
5452 iout <<
iINFO <<
"PME BACKGROUND SCALING " 5453 << ldbPMEBackgroundScaling <<
"\n";
5455 iout <<
iINFO <<
"REMOVING LOAD FROM PME NODES" <<
"\n";
5457 if ( ldbUnloadZero )
iout <<
iINFO <<
"REMOVING LOAD FROM NODE 0\n";
5458 if ( ldbUnloadOne )
iout <<
iINFO <<
"REMOVING LOAD FROM NODE 1\n";
5459 if ( ldbUnloadOutputPEs )
iout <<
iINFO <<
"REMOVING LOAD FROM OUTPUT PES\n";
5463 if ( ldbUnloadOne || CkNumPes() > 256 ) noPatchesOnOne =
TRUE;
5464 if ( ldbUnloadZero || noPatchesOnOne ||
5465 CkNumPes() > 64 || ( IMDon && CkNumPes() > 8 ) ) {
5466 noPatchesOnZero =
TRUE;
5468 if ( (noPatchesOnZero || noPatchesOnOne) && CUDASOAintegrateMode ) {
5469 noPatchesOnZero =
FALSE;
5470 noPatchesOnOne =
FALSE;
5471 iout <<
iWARN <<
"OVERRIDING NOPATCH SETTING. Not supported with GPUresident on\n";
5473 if ( noPatchesOnZero )
iout <<
iINFO <<
"REMOVING PATCHES FROM PROCESSOR 0\n";
5474 if ( noPatchesOnOne )
iout <<
iINFO <<
"REMOVING PATCHES FROM PROCESSOR 1\n";
5477 #if defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC) 5478 maxSelfPart = maxPairPart = 1;
5482 iout <<
iINFO <<
"MAX SELF PARTITIONS " << maxSelfPart <<
"\n" 5483 <<
iINFO <<
"MAX PAIR PARTITIONS " << maxPairPart <<
"\n" 5484 <<
iINFO <<
"SELF PARTITION ATOMS " << numAtomsSelf <<
"\n" 5485 <<
iINFO <<
"SELF2 PARTITION ATOMS " << numAtomsSelf2 <<
"\n" 5486 <<
iINFO <<
"PAIR PARTITION ATOMS " << numAtomsPair <<
"\n" 5487 <<
iINFO <<
"PAIR2 PARTITION ATOMS " << numAtomsPair2 <<
"\n";
5489 iout <<
iINFO <<
"MIN ATOMS PER PATCH " << minAtomsPerPatch <<
"\n" 5490 <<
iINFO <<
"EMPTY PATCH LOAD " << emptyPatchLoad <<
" ATOMS\n" 5493 if (initialTemp < 0)
5495 current = config->
find(
"velocities");
5497 if (current == NULL)
5499 current = config->
find(
"binvelocities");
5507 << initialTemp <<
"\n";
5511 iout <<
iINFO <<
"CENTER OF MASS MOVING INITIALLY? ";
5523 if ( zeroMomentum ) {
5524 iout <<
iINFO <<
"REMOVING CENTER OF MASS DRIFT DURING SIMULATION";
5525 if ( zeroMomentumAlt )
iout <<
" (ALT METHOD)";
5530 << dielectric <<
"\n";
5532 if ( nonbondedScaling != 1.0 )
5534 iout <<
iINFO <<
"NONBONDED SCALING " << nonbondedScaling <<
"\n" <<
endi;
5547 iout <<
"ONETHREE\n";
5550 iout <<
"ONE-FOUR\n";
5553 iout <<
"SCALED ONE-FOUR\n";
5560 iout <<
iINFO <<
"1-4 ELECTROSTATICS SCALED BY " << scale14 <<
"\n";
5561 iout <<
iINFO <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE USED\n" <<
endi;
5563 iout <<
iWARN <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE IGNORED\n" <<
endi;
5566 #ifdef SPEC_DISABLED_VERSION 5567 if (dcdFrequency > 0) {
5569 iout <<
iWARN <<
"DCD TRAJECTORY OUTPUT IS DISABLED IN SPEC RELEASE\n";
5573 if (dcdFrequency > 0)
5576 << dcdFilename <<
"\n";
5578 << dcdFrequency <<
"\n";
5580 << ( ((firstTimestep + dcdFrequency)/dcdFrequency)*dcdFrequency ) <<
"\n";
5581 if ( dcdUnitCell ) {
5582 iout <<
iINFO <<
"DCD FILE WILL CONTAIN UNIT CELL DATA\n";
5587 iout <<
iINFO <<
"NO DCD TRAJECTORY OUTPUT\n";
5591 if (xstFrequency > 0)
5594 << xstFilename <<
"\n";
5596 << xstFrequency <<
"\n";
5600 iout <<
iINFO <<
"NO EXTENDED SYSTEM TRAJECTORY OUTPUT\n";
5604 if (velDcdFrequency > 0)
5606 iout <<
iINFO <<
"VELOCITY DCD FILENAME " 5607 << velDcdFilename <<
"\n";
5608 iout <<
iINFO <<
"VELOCITY DCD FREQUENCY " 5609 << velDcdFrequency <<
"\n";
5610 iout <<
iINFO <<
"VELOCITY DCD FIRST STEP " 5611 << ( ((firstTimestep + velDcdFrequency)/velDcdFrequency)*velDcdFrequency ) <<
"\n";
5615 iout <<
iINFO <<
"NO VELOCITY DCD OUTPUT\n";
5619 if (forceDcdFrequency > 0)
5622 << forceDcdFilename <<
"\n";
5624 << forceDcdFrequency <<
"\n";
5625 iout <<
iINFO <<
"FORCE DCD FIRST STEP " 5626 << ( ((firstTimestep + forceDcdFrequency)/forceDcdFrequency)*forceDcdFrequency ) <<
"\n";
5630 iout <<
iINFO <<
"NO FORCE DCD OUTPUT\n";
5635 << outputFilename <<
"\n" <<
endi;
5638 iout <<
iINFO <<
"BINARY OUTPUT FILES WILL BE USED\n" <<
endi;
5640 #ifdef MEM_OPT_VERSION 5642 iout <<
iWARN <<
"SINCE MEMORY OPTIMIZED VERSION IS USED, OUTPUT IN TEXT FORMAT IS DISABLED!\n" <<
endi;
5643 binaryOutput =
TRUE;
5647 if (! restartFrequency)
5654 << restartFilename <<
"\n";
5656 << restartFrequency <<
"\n";
5658 iout <<
iINFO <<
"RESTART FILES WILL NOT BE OVERWRITTEN\n";
5660 if (restartSaveDcd) {
5661 iout <<
iINFO <<
"DCD FILE WILL BE SPLIT WHEN RESTART FILES ARE WRITTEN\n";
5666 iout <<
iINFO <<
"BINARY RESTART FILES WILL BE USED\n";
5672 iout <<
iINFO <<
"NAMD will save positions and velocities to " << crashFilename <<
" when ";
5678 if (switchingActive)
5681 if ( vdwForceSwitching ) {
5682 iout <<
iINFO <<
"VDW FORCE SWITCHING ACTIVE\n";
5684 if ( martiniSwitching ) {
5685 iout <<
iINFO <<
"MARTINI RESIDUE-BASED COARSE-GRAIN SWITCHING ACTIVE\n";
5688 << switchingDist <<
"\n";
5698 iout <<
iINFO <<
"PAIRLIST DISTANCE " << pairlistDist <<
"\n";
5699 iout <<
iINFO <<
"PAIRLIST SHRINK RATE " << pairlistShrink <<
"\n";
5700 iout <<
iINFO <<
"PAIRLIST GROW RATE " << pairlistGrow <<
"\n";
5701 iout <<
iINFO <<
"PAIRLIST TRIGGER " << pairlistTrigger <<
"\n";
5702 iout <<
iINFO <<
"PAIRLISTS PER CYCLE " << pairlistsPerCycle <<
"\n";
5703 if ( outputPairlists )
5704 iout <<
iINFO <<
"PAIRLIST OUTPUT STEPS " << outputPairlists <<
"\n";
5707 if ( pairlistMinProcs > 1 )
5708 iout <<
iINFO <<
"REQUIRING " << pairlistMinProcs <<
" PROCESSORS FOR PAIRLISTS\n";
5709 usePairlists = ( CkNumPes() >= pairlistMinProcs );
5711 #ifdef OPENATOM_VERSION 5714 iout <<
iINFO <<
"OPENATOM QM/MM CAR-PARINELLO ACTIVE\n";
5715 iout <<
iINFO <<
"OPENATOM CONFIG FILE: " << openatomConfig <<
"\n";
5716 iout <<
iINFO <<
"OPENATOM STRUCT FILE: " << openatomStruct <<
"\n";
5717 iout <<
iINFO <<
"OPENATOM PDB FILE: " << openatomPDB <<
"\n";
5719 #endif // OPENATOM_VERSION 5722 if ( (alchOn) && (!usePairlists)) {
5723 NAMD_die(
"Sorry, Alchemical simulations require pairlists to be enabled\n");
5725 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5726 if ( ! usePairlists ) {
5728 iout <<
iINFO <<
"GPU ACCELERATION REQUIRES PAIRLISTS\n";
5732 iout <<
iINFO <<
"PAIRLISTS " << ( usePairlists ?
"ENABLED" :
"DISABLED" )
5735 iout <<
iINFO <<
"MARGIN " << margin <<
"\n";
5736 if ( margin > 4.0 ) {
5737 iout <<
iWARN <<
"MARGIN IS UNUSUALLY LARGE AND WILL LOWER PERFORMANCE\n";
5738 BigReal f = patchDimension/(patchDimension-margin);
5740 iout <<
iWARN <<
"MARGIN INCREASED PATCH VOLUME BY A FACTOR OF " << f <<
"\n";
5744 iout <<
iINFO <<
"HYDROGEN GROUP CUTOFF " << hgroupCutoff <<
"\n";
5748 << patchDimension <<
"\n";
5752 if (outputEnergies != 1)
5755 << outputEnergies <<
"\n";
5759 if (!opts.
defined(
"computeEnergies")) {
5760 computeEnergies = outputEnergies;
5763 if (computeEnergies != 1)
5767 if (outputEnergies % computeEnergies != 0) {
5768 const std::string err_msg = std::string{
"The period of outputting energies (outputEnergies = "}
5769 + std::to_string(outputEnergies)
5770 + std::string{
") is not a multiple of the period of computing energies (computeEnergies = "}
5771 + std::to_string(computeEnergies)
5772 + std::string{
").\n"};
5775 if (alchOn && (alchOutFreq % computeEnergies != 0)) {
5777 const std::string err_msg = std::string{
"The period of outputting energies relating to alchemical transformations (alchOutFreq = "}
5778 + std::to_string(alchOutFreq)
5779 + std::string{
") is not a multiple of the period of computing energies (computeEnergies = "}
5780 + std::to_string(computeEnergies)
5781 + 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"};
5785 iout <<
iINFO <<
"ENERGY EVALUATION STEPS " 5786 << computeEnergies <<
"\n";
5790 iout <<
iINFO <<
"OUTPUT ENERGY PRECISION " << outputEnergiesPrecision <<
"\n";
5792 if (mergeCrossterms) {
5793 iout <<
iINFO <<
"CROSSTERM ENERGY INCLUDED IN DIHEDRAL\n" <<
endi;
5796 if (outputMomenta != 0)
5798 iout <<
iINFO <<
"MOMENTUM OUTPUT STEPS " 5799 << outputMomenta <<
"\n";
5803 if (outputTiming != 0)
5806 << outputTiming <<
"\n";
5810 if (outputCudaTiming != 0)
5812 iout <<
iINFO <<
"GPU TIMING OUTPUT STEPS " 5813 << outputCudaTiming <<
"\n";
5817 if (outputPressure != 0)
5819 iout <<
iINFO <<
"PRESSURE OUTPUT STEPS " 5820 << outputPressure <<
"\n";
5826 iout <<
iINFO <<
"FIXED ATOMS ACTIVE\n";
5827 if ( fixedAtomsForces )
5828 iout <<
iINFO <<
"FORCES BETWEEN FIXED ATOMS ARE CALCULATED\n";
5834 iout <<
iINFO <<
"HARMONIC CONSTRAINTS ACTIVE\n";
5837 << constraintExp <<
"\n";
5839 if (constraintScaling != 1.0) {
5840 iout <<
iINFO <<
"HARMONIC CONS SCALING " 5841 << constraintScaling <<
"\n";
5846 if (selectConstraintsOn) {
5847 iout <<
iINFO <<
"SELECTED CARTESIAN COMPONENTS OF HARMONIC RESTRAINTS ACTIVE\n";
5850 iout <<
iINFO <<
"RESTRAINING X-COMPONENTS OF CARTESIAN COORDINATES!\n";
5853 iout <<
iINFO <<
"RESTRAINING Y-COMPONENTS OF CARTESIAN COORDINATES!\n";
5856 iout <<
iINFO <<
"RESTRAINING Z-COMPONENTS OF CARTESIAN COORDINATES!\n";
5860 if (sphericalConstraintsOn) {
5861 iout <<
iINFO <<
"SPHERICAL HARMONIC CONSTRAINTS ACTIVE\n";
5862 iout <<
iINFO <<
"RESTRAINING DISTANCE TO " << sphericalConstrCenter <<
"\n";
5868 if (movingConstraintsOn) {
5869 iout <<
iINFO <<
"MOVING HARMONIC CONSTRAINTS ACTIVE\n";
5871 iout <<
iINFO <<
"MOVING CONSTRAINT VELOCITY " 5872 << movingConsVel <<
" ANGSTROM/TIMESTEP\n";
5874 iout <<
iINFO <<
"ALL CONSTRAINED ATOMS WILL MOVE\n";
5881 if (rotConstraintsOn) {
5882 iout <<
iINFO <<
"ROTATING HARMONIC CONSTRAINTS ACTIVE\n";
5885 << rotConsAxis <<
"\n";
5888 << rotConsPivot <<
"\n";
5890 iout <<
iINFO <<
"ROTATING CONSTRAINT VELOCITY " 5891 << rotConsVel <<
" DEGREES/TIMESTEP\n";
5899 iout <<
iINFO <<
"MOVING DRAG ACTIVE.\n";
5901 iout <<
iINFO <<
"MOVING DRAG MAIN PDB FILE " 5902 << movDragFile <<
"\n";
5904 iout <<
iINFO <<
"MOVING DRAG GLOBAL VELOCITY (A/step) " 5905 << movDragGlobVel <<
"\n";
5907 iout <<
iINFO <<
"MOVING DRAG LINEAR VELOCITY FILE " 5908 << movDragVelFile <<
"\n";
5915 iout <<
iINFO <<
"ROTATING DRAG ACTIVE.\n";
5917 iout <<
iINFO <<
"ROTATING DRAG MAIN PDB FILE " 5918 << rotDragFile <<
"\n";
5920 iout <<
iINFO <<
"ROTATING DRAG AXIS FILE " 5921 << rotDragAxisFile <<
"\n";
5923 iout <<
iINFO <<
"ROTATING DRAG PIVOT POINT FILE " 5924 << rotDragPivotFile <<
"\n";
5926 iout <<
iINFO <<
"ROTATING DRAG GLOBAL ANGULAR VELOCITY (deg/step) " 5927 << rotDragGlobVel <<
"\n";
5929 iout <<
iINFO <<
"ROTATING DRAG ANGULAR VELOCITY FILE " 5930 << rotDragVelFile <<
"\n";
5938 iout <<
iINFO <<
"\"CONSTANT\" TORQUE ACTIVE.\n";
5940 iout <<
iINFO <<
"\"CONSTANT\" TORQUE MAIN PDB FILE " 5941 << consTorqueFile <<
"\n";
5943 iout <<
iINFO <<
"\"CONSTANT\" TORQUE AXIS FILE " 5944 << consTorqueAxisFile <<
"\n";
5946 iout <<
iINFO <<
"\"CONSTANT\" TORQUE PIVOT POINT FILE " 5947 << consTorquePivotFile <<
"\n";
5949 iout <<
iINFO <<
"\"CONSTANT\" TORQUE GLOBAL VALUE (Kcal/(mol*A^2)) " 5950 << consTorqueGlobVal <<
"\n";
5952 iout <<
iINFO <<
"\"CONSTANT\" TORQUE DACTORS FILE " 5953 << consTorqueValFile <<
"\n";
5960 iout <<
iINFO <<
" Please include this reference in published work using\n";
5961 iout <<
iINFO <<
" the Gridforce module of NAMD: David Wells, Volha Abramkina,\n";
5962 iout <<
iINFO <<
" and Aleksei Aksimentiev, J. Chem. Phys. 127:125101-10 (2007).\n";
5963 print_mgrid_params();
5966 if (groupRestraintsOn) {
5967 iout <<
iINFO <<
"GROUP RESTRAINTS ACTIVE\n";
5968 groupRestraints.PrintGroupRestraints();
5977 << SMDVel <<
" ANGSTROM/TIMESTEP\n";
5988 iout <<
iINFO <<
"SMD OUTPUT FREQUENCY " 5989 << SMDOutputFreq <<
" TIMESTEPS\n";
5991 iout <<
iINFO <<
"SMD FILE " << SMDFile <<
"\n";
5999 iout <<
iINFO <<
"TMD ACTIVE BETWEEN STEPS " << TMDFirstStep
6000 <<
" and " << TMDLastStep <<
"\n";
6001 iout <<
iINFO <<
"TMD K " << TMDk <<
"\n";
6002 iout <<
iINFO <<
"TMD FILE " << TMDFile <<
"\n";
6003 iout <<
iINFO <<
"TMD OUTPUT FREQUENCY " << TMDOutputFreq <<
"\n";
6004 if (TMDInitialRMSD) {
6005 iout <<
iINFO <<
"TMD TARGET RMSD AT FIRST STEP " << TMDInitialRMSD <<
"\n";
6007 iout <<
iINFO <<
"TMD TARGET RMSD AT FIRST STEP COMPUTED FROM INITIAL COORDINATES\n";
6009 iout <<
iINFO <<
"TMD TARGET RMSD AT FINAL STEP " << TMDFinalRMSD <<
"\n";
6014 if (symmetryLastStep == -1){
6015 iout <<
iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " <<
"INFINITY" <<
"\n";
6018 iout <<
iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " << symmetryLastStep <<
"\n";
6022 current = config->
find(
"symmetryFile");
6023 for ( ; current; current = current->
next ) {
6027 current = config->
find(
"symmetryMatrixFile");
6028 for ( ; current; current = current->
next ) {
6029 iout <<
iINFO <<
"SYMMETRY MATRIX FILE " << current->
data <<
"\n";
6031 iout <<
iINFO <<
"SYMMETRY FORCE CONSTANT " << symmetryk <<
"\n";
6032 if (symmetryScaleForces){
6033 iout <<
iINFO <<
"SYMMETRY SCALE FORCES ON\n";
6035 iout <<
iINFO <<
"SYMMETRY FIRST FULL STEP " << symmetryFirstFullStep <<
"\n";
6036 if (symmetryLastFullStep == -1){
6037 iout <<
iINFO <<
"SYMMETRY LAST FULL STEP " <<
"INFINITY" <<
"\n";
6041 iout <<
iINFO <<
"SYMMETRY LAST FULL STEP " << symmetryLastFullStep <<
"\n";
6054 iout <<
iINFO <<
"FEP CURRENT LAMBDA VALUE " 6055 << alchLambda <<
"\n";
6056 iout <<
iINFO <<
"FEP COMPARISON LAMBDA VALUE " 6057 << alchLambda2 <<
"\n";
6058 if (alchLambdaIDWS >= 0.) {
6059 iout <<
iINFO <<
"FEP ALTERNATE COMPARISON LAMBDA VALUE " 6060 << alchLambdaIDWS <<
"\n";
6062 if (alchLambdaFreq > 0) {
6063 iout <<
iINFO <<
"FEP CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY " 6064 << alchLambdaFreq <<
" STEPS\n";
6066 if (!alchDecouple) {
6067 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6070 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6073 if (alchBondDecouple) {
6074 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6077 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6081 iout <<
iINFO <<
"FEP WEEKS-CHANDLER-ANDERSEN (WCA) VDW DECOUPLING " 6084 iout <<
iINFO <<
"FEP VDW SHIFTING COEFFICIENT " 6085 << alchVdwShiftCoeff <<
"\n";
6087 iout <<
iINFO <<
"FEP ELEC. ACTIVE FOR ANNIHILATED " 6088 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6089 << (1 - alchElecLambdaStart) <<
"\n";
6090 iout <<
iINFO <<
"FEP ELEC. ACTIVE FOR EXNIHILATED " 6091 <<
"PARTICLES BETWEEN LAMBDA = " 6092 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
6094 iout <<
iINFO <<
"FEP VDW-REPU. ACTIVE FOR ANNIHILATED PARTICLES " 6095 <<
"BETWEEN LAMBDA = " << (1 - alchRepLambdaEnd) <<
" AND LAMBDA " 6097 iout <<
iINFO <<
"FEP VDW-REPU. ACTIVE FOR EXNIHILATED PARTICLES " 6098 <<
"BETWEEN LAMBDA = 0 AND LAMBDA " << alchRepLambdaEnd <<
"\n";
6099 iout <<
iINFO <<
"FEP VDW-ATTR. ACTIVE FOR ANNIHILATED PARTICLES " 6100 <<
"BETWEEN LAMBDA = " << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = " 6101 << (1 - alchRepLambdaEnd) <<
"\n";
6102 iout <<
iINFO <<
"FEP VDW-ATTR. ACTIVE FOR EXNIHILATED PARTICLES " 6103 <<
"BETWEEN LAMBDA = " << alchRepLambdaEnd <<
" AND LAMBDA = " 6104 << alchVdwLambdaEnd <<
"\n";
6106 iout <<
iINFO <<
"FEP VDW ACTIVE FOR ANNIHILATED " 6107 <<
"PARTICLES BETWEEN LAMBDA = " 6108 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
6109 iout <<
iINFO <<
"FEP VDW ACTIVE FOR EXNIHILATED " 6110 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6111 << alchVdwLambdaEnd <<
"\n";
6113 iout <<
iINFO <<
"FEP BOND ACTIVE FOR ANNIHILATED " 6114 <<
"PARTICLES BETWEEN LAMBDA = " 6115 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
6116 iout <<
iINFO <<
"FEP BOND ACTIVE FOR EXNIHILATED " 6117 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6118 << alchBondLambdaEnd <<
"\n";
6124 iout <<
iINFO <<
"THERMODYNAMIC INTEGRATION (TI) ON\n";
6126 << alchLambda <<
"\n";
6127 if (alchLambdaFreq > 0) {
6128 iout <<
iINFO <<
"TI COMPARISON LAMBDA VALUE " 6129 << alchLambda2 <<
"\n";
6130 iout <<
iINFO <<
"TI CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY " 6131 << alchLambdaFreq <<
" STEPS\n";
6133 if (!alchDecouple) {
6134 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6137 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6140 if (alchBondDecouple) {
6141 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6144 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6147 iout <<
iINFO <<
"TI VDW SHIFTING COEFFICIENT " 6148 << alchVdwShiftCoeff <<
"\n";
6149 iout <<
iINFO <<
"TI ELEC. ACTIVE FOR ANNIHILATED " 6150 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6151 << (1 - alchElecLambdaStart) <<
"\n";
6152 iout <<
iINFO <<
"TI ELEC. ACTIVE FOR EXNIHILATED " 6153 <<
"PARTICLES BETWEEN LAMBDA = " 6154 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
6155 iout <<
iINFO <<
"TI VDW ACTIVE FOR ANNIHILATED " 6156 <<
"PARTICLES BETWEEN LAMBDA = " 6157 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
6158 iout <<
iINFO <<
"TI VDW ACTIVE FOR EXNIHILATED " 6159 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6160 << alchVdwLambdaEnd <<
"\n";
6161 iout <<
iINFO <<
"TI BOND ACTIVE FOR ANNIHILATED " 6162 <<
"PARTICLES BETWEEN LAMBDA = " 6163 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
6164 iout <<
iINFO <<
"TI BOND ACTIVE FOR EXNIHILATED " 6165 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6166 << alchBondLambdaEnd <<
"\n";
6171 iout <<
iINFO <<
"LOCALLY ENHANCED SAMPLING ACTIVE\n";
6172 iout <<
iINFO <<
"LOCAL ENHANCEMENT FACTOR IS " 6173 << lesFactor <<
"\n";
6175 <<
"SCALING ENHANCED ATOM TEMPERATURE BY 1/" << lesFactor <<
"\n";
6177 <<
"SCALING ENHANCED ATOM MASS BY 1/" << lesFactor <<
"\n";
6180 if ( singleTopology ) {
6181 iout <<
iINFO <<
"SINGLE TOPOLOGY IS ON FOR RELATIVE FREE ENERGY CALCULATION\n";
6185 if ( soluteScalingOn ) {
6186 iout <<
iINFO <<
"SOLUTE SCALING IS ACTIVE\n";
6187 if (soluteScalingFactorCharge != soluteScalingFactorVdw) {
6188 iout <<
iINFO <<
"SCALING FOR ELECTROSTATIC INTERACTIONS IS " 6189 << soluteScalingFactorCharge <<
"\n";
6190 iout <<
iINFO <<
"SCALING FOR VAN DER WAALS INTERACTIONS IS " 6191 << soluteScalingFactorVdw <<
"\n";
6192 iout <<
iINFO <<
"SCALING FOR BONDED INTERACTIONS IS " 6193 << soluteScalingFactor <<
"\n";
6196 iout <<
iINFO <<
"SOLUTE SCALING FACTOR IS " 6197 << soluteScalingFactor <<
"\n";
6199 if ( ! soluteScalingAll ) {
6200 iout <<
iINFO <<
"SOLUTE SCALING DISABLED FOR BONDS AND ANGLES\n";
6204 if ( pairInteractionOn ) {
6205 iout <<
iINFO <<
"PAIR INTERACTION CALCULATIONS ACTIVE\n";
6206 iout <<
iINFO <<
"USING FLAG " << pairInteractionGroup1
6207 <<
" FOR GROUP 1\n";
6208 if (pairInteractionSelf) {
6209 iout <<
iINFO <<
"COMPUTING ONLY SELF INTERACTIONS FOR GROUP 1 ATOMS\n";
6211 iout <<
iINFO <<
"USING FLAG " << pairInteractionGroup2
6212 <<
" FOR GROUP 2\n";
6217 iout <<
iINFO <<
"CONSTANT FORCE ACTIVE\n";
6218 if ( consForceScaling != 1.0 ) {
6219 iout <<
iINFO <<
"CONSTANT FORCE SCALING " 6220 << consForceScaling <<
"\n" <<
endi;
6228 iout <<
iINFO <<
"EXTERNAL COMMAND FORCES ACTIVE\n";
6229 iout <<
iINFO <<
"EXT FORCES COMMAND: " << extForcesCommand <<
"\n";
6230 iout <<
iINFO <<
"EXT COORD FILENAME: " << extCoordFilename <<
"\n";
6231 iout <<
iINFO <<
"EXT FORCE FILENAME: " << extForceFilename <<
"\n";
6239 if (qmParamPDBDefined){
6240 iout <<
iINFO <<
"QM PDB PARAMETER FILE: " << qmParamPDB <<
"\n";
6242 iout <<
iINFO <<
"QM SOFTWARE: " << qmSoftware <<
"\n";
6245 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: NONE\n";
6247 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: MULLIKEN\n";
6249 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: CHELPG\n";
6251 iout <<
iINFO <<
"QM EXECUTABLE PATH: " << qmExecPath <<
"\n";
6252 iout <<
iINFO <<
"QM COLUMN: " << qmColumn <<
"\n";
6254 iout <<
iINFO <<
"QM WILL DETECT BONDS BETWEEN QM AND MM ATOMS.\n";
6257 iout <<
iINFO <<
"QM BONDS WILL BE GUESSED FROM TOPOLOGY AND QM REGIONS.\n";
6259 if (qmBondColumnDefined) {
6260 iout <<
iINFO <<
"QM BOND COLUMN: " << qmBondColumn <<
"\n";
6263 iout <<
iINFO <<
"QM BOND COLUMN WILL DEFINE LINK AOTM DISTANCE.\n";
6264 if (qmBondValType == 1)
6265 iout <<
iINFO <<
"QM BOND COLUMN HAS LENGTH INFORMATION.\n";
6266 else if (qmBondValType == 2)
6267 iout <<
iINFO <<
"QM BOND COLUMN HAS RATIO INFORMATION.\n";
6270 iout <<
iINFO <<
"MECHANICHAL EMBEDDING SELECTED." 6271 " BOND SCHEME WILL BE IGNORED!\n" <<
endi;
6276 iout <<
iINFO <<
"QM-MM BOND SCHEME: Charge Shift.\n";
6278 iout <<
iINFO <<
"QM-MM BOND SCHEME: Redistributed Charge and Dipole.\n";
6280 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z1.\n";
6282 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z2.\n";
6284 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z3.\n";
6289 if (qmChrgFromPSF) {
6290 iout <<
iINFO <<
"QM Will use PSF charges.\n";
6293 iout <<
iINFO <<
"QM BASE DIRECTORY: " << qmBaseDir <<
"\n";
6296 iout <<
iINFO <<
"QM PREPARATION PROCESS: " << qmPrepProc <<
"\n";
6299 iout <<
iINFO <<
"QM SECONDARY PROCESS: " << qmSecProc <<
"\n";
6302 current = config->
find(
"QMConfigLine");
6303 for ( ; current; current = current->
next ) {
6305 if ( strstr(current->
data,
"\n") ) {
6306 iout <<
iINFO <<
"QM configuration lines from NADM config file\n";
6310 iout <<
iINFO <<
"QM CONFIG LINE: " << current->
data <<
"\n";
6315 iout <<
iINFO <<
"QM FORCES WILL REPLACE ALL NAMD FORCES!\n";
6319 iout <<
iINFO <<
"QM NO POINT CHARGE: ON.\n";
6322 iout <<
iINFO <<
"QM CUSTOM POINT CHARGE SELECTION IS ACTIVATED\n";
6324 if (! qmNoPC && ! qmCustomPCSel)
6325 iout <<
iINFO <<
"QM POINT CHARGES WILL BE SELECTED EVERY " 6326 << qmPCSelFreq <<
" STEPS.\n";
6329 iout <<
iINFO <<
"QM Point Charge Switching: ON.\n";
6331 if (qmPCScheme == 1)
6332 iout <<
iINFO <<
"QM Point Charge SCHEME: none.\n";
6333 else if (qmPCScheme == 2)
6334 iout <<
iINFO <<
"QM Point Charge SCHEME: round.\n";
6335 else if (qmPCScheme == 3)
6336 iout <<
iINFO <<
"QM Point Charge SCHEME: zero.\n";
6340 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION IS ACTIVE.\n" ;
6341 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION FREQUENCY: " 6342 << qmLSSFreq <<
"\n" <<
endi;
6344 current = config->
find(
"QMLSSSize");
6345 for ( ; current; current = current->
next ) {
6346 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION SIZE (\"qmGrpID numMolecules\"): " << current->
data <<
"\n";
6349 if (! opts.
defined(
"QMLWSResname"))
6350 strcpy(qmLSSResname,
"TIP3");
6351 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION WILL USE RESIDUE TYPE: " << qmLSSResname <<
"\n" <<
endi;
6354 iout <<
iINFO <<
"QM executions per node: " << qmSimsPerNode <<
"\n";
6364 iout <<
iINFO<<
"GBIS GENERALIZED BORN IMPLICIT SOLVENT ACTIVE (SERIAL)\n";
6367 iout <<
iINFO <<
"GBIS GENERALIZED BORN IMPLICIT SOLVENT ACTIVE\n";
6369 if (GBISOn || GBISserOn) {
6370 iout <<
iINFO <<
"GBIS SOLVENT DIELECTRIC: " << solvent_dielectric<<
"\n";
6371 iout <<
iINFO <<
"GBIS PROTEIN DIELECTRIC: " << dielectric<<
"\n";
6372 iout <<
iINFO<<
"GBIS COULOMB RADIUS OFFSET: "<< coulomb_radius_offset<<
" Ang\n";
6373 iout <<
iINFO <<
"GBIS ION CONCENTRATION: " << ion_concentration <<
" M\n";
6374 iout <<
iINFO <<
"GBIS DEBYE SCREENING LENGTH: " << 1.0/kappa <<
" Ang\n";
6375 iout <<
iINFO <<
"GBIS DELTA: " << gbis_delta <<
"\n";
6376 iout <<
iINFO <<
"GBIS BETA: " << gbis_beta <<
"\n";
6377 iout <<
iINFO <<
"GBIS GAMMA: " << gbis_gamma <<
"\n";
6378 iout <<
iINFO <<
"GBIS BORN RADIUS CUTOFF: " << alpha_cutoff <<
" Ang\n";
6379 iout <<
iINFO <<
"GBIS MAX BORN RADIUS: " << alpha_max <<
" Ang\n";
6384 iout <<
iINFO <<
"SASA SURFACE TENSION: " << surface_tension<<
" kcal/mol/Ang^2\n";
6389 iout <<
iINFO <<
"TCL BOUNDARY FORCES ACTIVE\n";
6390 current = config->
find(
"tclBCScript");
6392 tclBCScript = current->
data;
6393 iout <<
iINFO <<
"TCL BOUNDARY FORCES SCRIPT " << current->
data <<
"\n";
6395 iout <<
iINFO <<
"TCL BOUNDARY FORCES ARGS " << tclBCArgs <<
"\n";
6401 globalForcesOn = ( tclForcesOn || freeEnergyOn || miscForcesOn ||
6402 (IMDon && ! (IMDignore || IMDignoreForces)) || (SMDOn && !CUDASOAintegrateMode) || TMDOn ||
6403 colvarsOn || symmetryOn || qmForcesOn );
6405 if (globalForcesOn && monteCarloPressureOn) {
6406 NAMD_die(
"Monte Carlo pressure control is not compatible with " 6407 "global forces computations (Colvars, TclForces, TMD, IMD, " 6408 "symmetryRestraints, and similar features)");
6410 if(globalForcesOn && globalMasterFrequency >1 && !CUDASOAintegrateMode)
6412 NAMD_die(
"GlobalMaster multiple time-stepping is not available in non GPU-resident mode!\n");
6414 if(globalForcesOn && globalMasterFrequency >1 )
6416 iout <<
iINFO <<
"GLOBAL FORCES FREQENCY " << globalMasterFrequency<<
"\n";
6417 iout <<
iINFO <<
"GLOBAL FORCES SCALING " << globalMasterScaleByFrequency<<
"\n";
6418 iout <<
iINFO <<
"GLOBAL FORCES STALE FORCES MTS " << globalMasterStaleForces<<
"\n";
6422 iout <<
iINFO <<
"TCL GLOBAL FORCES ACTIVE\n";
6424 current = config->
find(
"tclForcesScript");
6426 for ( ; current; current = current->
next ) {
6428 if ( strstr(current->
data,
"\n") ) {
6429 iout <<
iINFO <<
"TCL GLOBAL FORCES SCRIPT INLINED IN CONFIG FILE\n";
6433 iout <<
iINFO <<
"TCL GLOBAL FORCES SCRIPT " << current->
data <<
"\n";
6441 iout <<
iINFO <<
"MISC FORCES ACTIVE\n";
6443 current = config->
find(
"miscForcesScript");
6445 for ( ; current; current = current->
next ) {
6447 if ( strstr(current->
data,
"\n") ) {
6448 iout <<
iINFO <<
"MISC FORCES SCRIPT INLINED IN CONFIG FILE\n";
6452 iout <<
iINFO <<
"MISC FORCES SCRIPT " << current->
data <<
"\n";
6460 iout <<
iINFO <<
"FREE ENERGY PERTURBATION ACTIVE\n";
6462 current = config->
find(
"freeEnergyConfig");
6464 for ( ; current; current = current->
next ) {
6466 if ( strstr(current->
data,
"\n") ) {
6467 iout <<
iINFO <<
"FREE ENERGY PERTURBATION SCRIPT INLINED IN CONFIG FILE\n";
6471 iout <<
iINFO <<
"FREE ENERGY PERTURBATION SCRIPT " << current->
data <<
"\n";
6479 iout <<
iINFO <<
"COLLECTIVE VARIABLES CALCULATION REQUESTED\n";
6481 current = config->
find (
"colvarsConfig");
6482 for ( ; current; current = current->
next ) {
6483 if ( strstr(current->
data,
"\n") ) {
6484 iout <<
iINFO <<
"COLLECTIVE VARIABLES CONFIGURATION INLINED IN CONFIG FILE\n";
6487 iout <<
iINFO <<
"COLLECTIVE VARIABLES CONFIGURATION " << current->
data <<
"\n";
6490 current = config->
find (
"colvarsInput");
6491 for ( ; current; current = current->
next ) {
6492 if ( strstr(current->
data,
"\n") ) {
6493 iout <<
iINFO <<
"COLLECTIVE VARIABLES RESTART INFORMATION INLINED IN CONFIG FILE\n";
6496 iout <<
iINFO <<
"COLLECTIVE VARIABLES RESTART INFORMATION " << current->
data <<
"\n";
6504 iout <<
iINFO <<
"INTERACTIVE MD ACTIVE\n";
6505 iout <<
iINFO <<
"INTERACTIVE MD VERSION " <<
static_cast<int>(IMDversion) <<
"\n";
6506 iout <<
iINFO <<
"INTERACTIVE MD PORT " << IMDport <<
"\n";
6507 iout <<
iINFO <<
"INTERACTIVE MD FREQ " << IMDfreq <<
"\n";
6509 iout <<
iINFO <<
"INTERACTIVE MD WILL NOT INFLUENCE SIMULATION\n";
6511 if (IMDignoreForces)
6513 iout <<
iINFO <<
"INTERACTIVE FORCES ARE DISABLED\n";
6514 iout <<
iINFO <<
"PAUSE, RESUME, DETACH AND FINISH INTERACTIVE MD ARE ENABLED\n";
6516 if (IMDwait)
iout <<
iINFO <<
"WILL AWAIT INTERACTIVE MD CONNECTION\n";
6519 iout <<
iINFO <<
"INTERACTIVE MD WILL SEND THE FOLLOWING:\n";
6520 if (IMDsendsettings.time_switch == 1) {
6523 if (IMDsendsettings.box_switch == 1) {
6526 if (IMDsendsettings.fcoords_switch == 1) {
6527 if (IMDsendsettings.wrap_switch == 1) {
6528 iout <<
iINFO <<
"WRAPPED COORDINATES\n";
6530 iout <<
iINFO <<
"UNWRAPPED COORDINATES\n";
6533 if (IMDsendsettings.velocities_switch == 1) {
6536 if (IMDsendsettings.forces_switch == 1) {
6539 if (IMDsendsettings.energies_switch == 1) {
6541 if (CUDASOAintegrate && (IMDfreq % computeEnergies != 0)) {
6542 iout <<
iWARN <<
"IMDfreq is not a multiple of computeEnergies in GPU-resident mode.\n" <<
endi;
6543 iout <<
iWARN <<
"Energies sent to the IMD client might be incorrect.\n" <<
endi;
6550 if (globalOn && !dihedralOn)
6552 iout <<
iINFO <<
"GLOBAL INTEGRATION TEST MODE ACTIVE\n";
6558 iout <<
iINFO <<
"DIHEDRAL ANGLE DYNAMICS ACTIVE\n";
6561 iout <<
iINFO <<
"*** DIHEDRAL ANGLE DYNAMICS IS HIGHLY EXPERIMENTAL ***\n";
6562 iout <<
iINFO <<
"PLEASE CONSIDER USING THE COLD OPTION AS WELL\n";
6575 iout <<
iINFO <<
"COLD (CONSTRAINED OVERDAMPED LANGEVIN DYNAMICS) ACTIVE\n";
6578 << COLDTemp <<
"\n";
6581 << COLDRate <<
"\n";
6584 if (cylindricalBCOn)
6586 iout <<
iINFO <<
"CYLINDRICAL BOUNDARY CONDITIONS ACTIVE\n";
6587 iout <<
iINFO <<
"AXIS " << cylindricalBCAxis <<
"\n";
6588 iout <<
iINFO <<
"RADIUS #1 " << cylindricalBCr1 <<
"\n";
6589 iout <<
iINFO <<
"FORCE CONSTANT #1 " << cylindricalBCk1 <<
"\n";
6590 iout <<
iINFO <<
"EXPONENT #1 " << cylindricalBCexp1 <<
"\n";
6591 iout <<
iINFO <<
"LENGTH #1 " << cylindricalBCl1 <<
"\n";
6592 if (cylindricalBCr2 > 0.0)
6594 iout <<
iINFO <<
"RADIUS #2 " << cylindricalBCr2 <<
"\n";
6595 iout <<
iINFO <<
"FORCE CONSTANT #2 " << cylindricalBCk2 <<
"\n";
6596 iout <<
iINFO <<
"EXPONENT #2 " << cylindricalBCexp2 <<
"\n";
6597 iout <<
iINFO <<
"LENGTH #2 " << cylindricalBCl2 <<
"\n";
6599 iout <<
iINFO <<
"CYLINDER BOUNDARY CENTER(" << cylindricalCenter.x <<
", " 6600 << cylindricalCenter.y <<
", " << cylindricalCenter.z <<
")\n";
6606 iout <<
iINFO <<
"SPHERICAL BOUNDARY CONDITIONS ACTIVE\n";
6609 << sphericalBCr1 <<
"\n";
6611 << sphericalBCk1 <<
"\n";
6613 << sphericalBCexp1 <<
"\n";
6615 if (sphericalBCr2 > 0)
6618 << sphericalBCr2 <<
"\n";
6620 << sphericalBCk2 <<
"\n";
6622 << sphericalBCexp2 <<
"\n";
6625 iout <<
iINFO <<
"SPHERE BOUNDARY CENTER(" << sphericalCenter.x <<
", " 6626 << sphericalCenter.y <<
", " << sphericalCenter.z <<
")\n";
6632 iout <<
iINFO <<
"ELECTRIC FIELD ACTIVE\n";
6635 << eField.x <<
", " << eField.y
6636 <<
", " << eField.z <<
")\n";
6637 if ( eFieldNormalized )
iout <<
iINFO <<
"E-FIELD VECTOR IS SCALED BY CELL BASIS VECTORS\n";
6638 iout <<
iINFO <<
"E-FIELD FREQUENCY IS (1/ps) " << eFieldFreq <<
"\n";
6639 iout <<
iINFO <<
"E-FIELD PHASE IS (deg) " << eFieldPhase <<
"\n";
6646 iout <<
iINFO <<
"STIRRING TORQUES ACTIVE\n";
6648 iout <<
iINFO <<
"STIR STARTING THETA (deg) "<< stirStartingTheta <<
"\n";
6649 iout <<
iINFO <<
"STIR ANGULAR VELOCITY (deg/ts) " << stirVel <<
"\n";
6650 iout <<
iINFO <<
"STIR FORCE HARMONIC SPRING CONSTANT "<< stirK <<
"\n";
6651 iout <<
iINFO <<
"STIR AXIS OF ROTATION (DIRECTION) (" 6652 << stirAxis.x <<
", " << stirAxis.y
6653 <<
", " << stirAxis.z <<
")\n";
6654 iout <<
iINFO <<
"STIR PIVOT POINT (COORDINATE) (" 6655 << stirPivot.x <<
", " << stirPivot.y
6656 <<
", " << stirPivot.z <<
")\n";
6657 current = config->
find(
"stirFilename");
6659 iout <<
iINFO <<
"STIR ATOMS AND ORIGINAL POSITIONS FROM FILE " <<current ->
data <<
'\n';
6660 current = config->
find(
"stirredAtomsCol");
6661 iout <<
iINFO <<
"STIR FILE COLUMN " << current ->
data <<
'\n';
6667 iout <<
iINFO <<
"DRUDE MODEL DUAL THERMOSTAT IS ACTIVE\n";
6668 iout <<
iINFO <<
"DRUDE BOND TEMPERATURE " << drudeTemp <<
"\n";
6669 if (drudeDamping > 0.0) {
6670 iout <<
iINFO <<
"DRUDE DAMPING COEFFICIENT IS " 6671 << drudeDamping <<
" INVERSE PS\n";
6673 if (drudeHardWallOn) {
6674 iout <<
iINFO <<
"DRUDE HARD WALL RESTRAINT IS ACTIVE FOR DRUDE BONDS\n";
6675 iout <<
iINFO <<
"DRUDE MAXIMUM BOND LENGTH BEFORE RESTRAINT IS " 6676 << drudeBondLen <<
"\n";
6677 }
else if (drudeBondConst > 0.0) {
6678 iout <<
iINFO <<
"DRUDE QUARTIC RESTRAINT IS ACTIVE FOR DRUDE BONDS\n";
6679 iout <<
iINFO <<
"DRUDE MAXIMUM BOND LENGTH BEFORE RESTRAINT IS " 6680 << drudeBondLen <<
"\n";
6681 iout <<
iINFO <<
"DRUDE BOND RESTRAINT CONSTANT IS " 6682 << drudeBondConst <<
"\n";
6684 if (drudeNbtholeCut > 0.0) {
6685 iout <<
iINFO <<
"DRUDE NBTHOLE IS ACTIVE\n";
6686 iout <<
iINFO <<
"DRUDE NBTHOLE RADIUS IS " 6687 << drudeNbtholeCut <<
"\n";
6693 iout <<
iINFO <<
"LANGEVIN DYNAMICS ACTIVE\n";
6694 iout <<
iINFO <<
"LANGEVIN TEMPERATURE " 6695 << langevinTemp <<
"\n";
6696 if (! langevin_useBAOAB)
iout <<
iINFO <<
"LANGEVIN USING BBK INTEGRATOR\n";
6697 else iout <<
iINFO <<
"LANGEVIN USING BAOAB INTEGRATOR\n";
6698 if (langevinDamping > 0.0) {
6699 iout <<
iINFO <<
"LANGEVIN DAMPING COEFFICIENT IS " 6700 << langevinDamping <<
" INVERSE PS\n";
6701 if (langevinHydrogen)
6702 iout <<
iINFO <<
"LANGEVIN DYNAMICS APPLIED TO HYDROGENS\n";
6704 iout <<
iINFO <<
"LANGEVIN DYNAMICS NOT APPLIED TO HYDROGENS\n";
6706 iout <<
iINFO <<
"LANGEVIN DAMPING COEFFICIENTS DETERMINED FROM FILES\n";
6707 current = config->
find(
"langevinFile");
6708 if ( current )
iout <<
iINFO <<
"LANGEVIN DAMPING FILE: " <<
6709 current->
data <<
"\n";
6710 else iout <<
iINFO <<
"LANGEVIN DAMPING FILE IS COORDINATE PDB\n";
6711 current = config->
find(
"langevinCol");
6712 if ( current )
iout <<
iINFO <<
"LANGEVIN DAMPING COLUMN: " <<
6713 current->
data <<
"\n";
6714 else iout <<
iINFO <<
"LANGEVIN DAMPING COLUMN: DEFAULT (4TH, O)\n";
6722 iout <<
iINFO <<
"LOWE-ANDERSEN DYNAMICS ACTIVE\n";
6723 iout <<
iINFO <<
"LOWE-ANDERSEN TEMPERATURE " 6724 << loweAndersenTemp <<
" K\n";
6726 << loweAndersenRate <<
" INVERSE PS\n";
6727 iout <<
iINFO <<
"LOWE-ANDERSEN CUTOFF " 6728 << loweAndersenCutoff <<
" ANGSTROMS\n";
6735 iout <<
iINFO <<
"TEMPERATURE COUPLING ACTIVE\n";
6736 iout <<
iINFO <<
"COUPLING TEMPERATURE " 6737 << tCoupleTemp <<
"\n";
6743 iout <<
iINFO <<
"STOCHASTIC RESCALING ACTIVE\n";
6744 iout <<
iINFO <<
"STOCHASTIC RESCALING TEMPERATURE " 6745 << stochRescaleTemp <<
" K\n";
6746 iout <<
iINFO <<
"STOCHASTIC RESCALING PERIOD " 6747 << stochRescalePeriod <<
" PS\n";
6748 iout <<
iINFO <<
"STOCHASTIC RESCALING WILL OCCUR EVERY " 6749 << stochRescaleFreq <<
" STEPS\n";
6755 iout <<
iINFO <<
"OLD STYLE MINIMIZATION ACTIVE\n";
6761 iout <<
iINFO <<
"CONJUGATE GRADIENT MINIMIZATION ACTIVE\n";
6762 iout <<
iINFO <<
"LINE MINIMIZATION GOAL = " << minLineGoal <<
"\n";
6763 iout <<
iINFO <<
"BABY STEP SIZE = " << minBabyStep <<
"\n";
6764 iout <<
iINFO <<
"TINY STEP SIZE = " << minTinyStep <<
"\n";
6771 << maximumMove <<
"\n";
6775 if (rescaleFreq > 0)
6777 iout <<
iINFO <<
"VELOCITY RESCALE FREQ " 6778 << rescaleFreq <<
"\n";
6779 iout <<
iINFO <<
"VELOCITY RESCALE TEMP " 6780 << rescaleTemp <<
"\n";
6784 if (reassignFreq > 0)
6786 iout <<
iINFO <<
"VELOCITY REASSIGNMENT FREQ " 6787 << reassignFreq <<
"\n";
6788 iout <<
iINFO <<
"VELOCITY REASSIGNMENT TEMP " 6789 << reassignTemp <<
"\n";
6790 if ( reassignIncr != 0. )
6791 iout <<
iINFO <<
"VELOCITY REASSIGNMENT INCR " 6792 << reassignIncr <<
"\n";
6793 if ( reassignHold != 0. )
6794 iout <<
iINFO <<
"VELOCITY REASSIGNMENT HOLD " 6795 << reassignHold <<
"\n";
6799 if ((
int)berendsenPressureOn + (
int)langevinPistonOn + (
int)monteCarloPressureOn + (
int)multigratorOn > 1)
6801 NAMD_die(
"Multiple pressure control algorithms selected!\n");
6804 if (excludeFromPressure) {
6805 iout <<
iINFO <<
"EXCLUDE FROM PRESSURE ACTIVE\n";
6807 if (useConstantArea && useConstantRatio) {
6808 NAMD_die(
"useConstantArea and useConstantRatio are mutually exclusive.\n");
6810 if (useConstantRatio && !useFlexibleCell) {
6811 NAMD_die(
"useConstantRatio requires useFlexibleCell.\n");
6813 if (useConstantArea && surfaceTensionTarget) {
6814 NAMD_die(
"surfaceTensionTarget and useConstantArea are mutually exclusive.\n");
6816 if (useConstantArea && !useFlexibleCell) {
6817 NAMD_die(
"useConstantArea requires useFlexibleCell.\n");
6821 if (!useFlexibleCell) {
6822 if (fixCellDimX || fixCellDimY || fixCellDimZ) {
6823 NAMD_die(
"fixCellDims requires useFlexibleCell.\n");
6826 if(useConstantArea && fixCellDimZ) {
6827 NAMD_die(
"fixCellDimZ can not be used with useConstantArea.\n");
6828 }
else if (useConstantRatio && fixCellDimX) {
6829 NAMD_die(
"fixCellDimX can not be used with useConstantRatio.\n");
6830 }
else if (useConstantRatio && fixCellDimY) {
6831 NAMD_die(
"fixCellDimY can not be used with useConstantRatio.\n");
6835 if (fixCellDimX && fixCellDimY && fixCellDimZ) {
6836 NAMD_die(
"Cell dimension can not be fixed in X, Y, and Z axis, simultaneously.\n");
6840 if (berendsenPressureOn || langevinPistonOn) {
6842 useGroupPressure =
TRUE;
6843 iout <<
iWARN <<
"Option useGroupPressure is being enabled " 6844 <<
"due to pressure control with rigidBonds.\n" <<
endi;
6848 if (monteCarloPressureOn) {
6849 if (!opts.
defined(
"MonteCarloAcceptanceRate")) {
6850 monteCarloAcceptanceRate = 0.5;
6851 }
else if (monteCarloAcceptanceRate > 0.8 || monteCarloAcceptanceRate < 0.2) {
6852 NAMD_die(
"Acceptance rate in Monte Carlo pressure control must be between 0.2 and 0.8!\n");
6855 if ( monteCarloAdjustmentFreq < 10 ) {
6856 iout <<
iWARN <<
"Modifying the frequency of adjusting the maximum volume change.\n" <<
endi;
6857 monteCarloAdjustmentFreq = 30;
6860 if (!opts.
defined(
"MonteCarloMaxVolume")) {
6862 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6863 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6864 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6867 if (0.3 < (monteCarloMaxVolume.x / lattice.volume())) {
6868 iout <<
iWARN <<
"Modifying the maximum volume change for x-axis.\n" <<
endi;
6869 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6871 if (0.3 < (monteCarloMaxVolume.y / lattice.volume())) {
6872 iout <<
iWARN <<
"Modifying the maximum volume change for y-axis.\n" <<
endi;
6873 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6875 if (0.3 < (monteCarloMaxVolume.z / lattice.volume())) {
6876 iout <<
iWARN <<
"Modifying the maximum volume change for z-axis.\n" <<
endi;
6877 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6879 if (monteCarloMaxVolume.x < 1.0) {
6880 iout <<
iWARN <<
"Maximum volume change is negative or too small for x-axis.\n" <<
6881 " Modifying the maximum volume change for x-axis.\n" <<
endi;
6882 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6884 if (monteCarloMaxVolume.y < 1.0) {
6885 iout <<
iWARN <<
"Maximum volume change is negative or too small for y-axis.\n" <<
6886 " Modifying the maximum volume change for y-axis.\n" <<
endi;
6887 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6889 if (monteCarloMaxVolume.z < 1.0) {
6890 iout <<
iWARN <<
"Maximum volume change is negative or too small for z-axis.\n" <<
6891 " Modifying the maximum volume change for z-axis.\n" <<
endi;
6892 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6896 if (!opts.
defined(
"MonteCarloPressureFreq")) {
6897 monteCarloPressureFreq = 50 * nonbondedFrequency;
6898 if ( fullElectFrequency ) {
6899 monteCarloPressureFreq = 50 * fullElectFrequency;
6901 }
else if ((monteCarloPressureFreq % nonbondedFrequency) || ( fullElectFrequency
6902 && (monteCarloPressureFreq % fullElectFrequency) )) {
6903 NAMD_die(
"monteCarloPressureFreq must be a multiple of both fullElectFrequency and nonbondedFrequency\n");
6906 iout <<
iINFO <<
"MONTE CARLO PRESSURE CONTROL ACTIVE\n";
6908 << monteCarloPressureTarget <<
" BAR\n";
6909 iout <<
iINFO <<
" TARGET ACCEPTANCE RATE IS " 6910 << monteCarloAcceptanceRate <<
"\n";
6911 iout <<
iINFO <<
" IMPOSED TEMPERATURE IS " 6912 << monteCarloTemp <<
" K\n";
6913 iout <<
iINFO <<
" MAXIMUM VOLUME CHANGE IS (" 6914 << monteCarloMaxVolume.x <<
", " << monteCarloMaxVolume.y <<
", " 6915 << monteCarloMaxVolume.z <<
") A^3 \n";
6916 iout <<
iINFO <<
" ADJUST MAXIMUM VOLUME CHANGE EVERY " 6917 << monteCarloAdjustmentFreq <<
" TRIALS\n";
6919 << monteCarloPressureFreq <<
" STEPS\n";
6920 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6921 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6926 if (berendsenPressureOn)
6928 if ( ! opts.
defined(
"BerendsenPressureFreq") ) {
6929 berendsenPressureFreq = nonbondedFrequency;
6930 if ( fullElectFrequency )
6931 berendsenPressureFreq = fullElectFrequency;
6933 if ( (berendsenPressureFreq % nonbondedFrequency) || ( fullElectFrequency
6934 && (berendsenPressureFreq % fullElectFrequency) ) ) {
6935 NAMD_die(
"berendsenPressureFreq must be a multiple of both fullElectFrequency and nonbondedFrequency\n");
6937 iout <<
iINFO <<
"BERENDSEN PRESSURE COUPLING ACTIVE\n";
6939 << berendsenPressureTarget <<
" BAR\n";
6940 iout <<
iINFO <<
" COMPRESSIBILITY ESTIMATE IS " 6941 << berendsenPressureCompressibility <<
" BAR^(-1)\n";
6943 << berendsenPressureRelaxationTime <<
" FS\n";
6945 << berendsenPressureFreq <<
" STEPS\n";
6946 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6947 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6953 if (langevinPistonOn)
6955 iout <<
iINFO <<
"LANGEVIN PISTON PRESSURE CONTROL ACTIVE\n";
6957 << langevinPistonTarget <<
" BAR\n";
6958 iout <<
iINFO <<
" OSCILLATION PERIOD IS " 6959 << langevinPistonPeriod <<
" FS\n";
6961 << langevinPistonDecay <<
" FS\n";
6962 iout <<
iINFO <<
" PISTON TEMPERATURE IS " 6963 << langevinPistonTemp <<
" K\n";
6964 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6965 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6966 iout <<
iINFO <<
" INITIAL STRAIN RATE IS " 6967 << strainRate <<
"\n";
6972 if (multigratorOn) {
6976 if (berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) {
6977 iout <<
iINFO <<
" CELL FLUCTUATION IS " 6978 << (useFlexibleCell?
"AN":
"") <<
"ISOTROPIC\n";
6979 if (useConstantRatio)
6980 iout <<
iINFO <<
" SHAPE OF CELL IS CONSTRAINED IN X-Y PLANE\n";
6981 if (useConstantArea)
6982 iout <<
iINFO <<
" CONSTANT AREA PRESSURE CONTROL ACTIVE\n";
6985 if (surfaceTensionTarget != 0)
6987 iout <<
iINFO <<
"SURFACE TENSION CONTROL ACTIVE\n";
6988 iout <<
iINFO <<
" TARGET SURFACE TENSION IS " 6989 << surfaceTensionTarget <<
" DYN/CM\n";
6996 if (pressureProfileOn) {
6997 if ((berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) && !dcdUnitCell) {
6999 iout <<
iWARN <<
"Turning on dcdUnitCell so that trajectory files contain unit cell data.\n" <<
endi;
7002 NAMD_die(
"Sorry, pressure profile not implemented for constant pressure.");
7006 if (pressureProfileEwaldOn)
7007 pressureProfileOn = 0;
7009 if (pressureProfileSlabs < 1)
7010 NAMD_die(
"pressureProfileSlabs must be positive.");
7011 iout <<
iINFO <<
"PRESSURE PROFILE CALCULATIONS ACTIVE\n";
7012 iout <<
iINFO <<
" NUMBER OF SLABS: " << pressureProfileSlabs <<
"\n";
7013 iout <<
iINFO <<
" SLAB THICKNESS: " << cellBasisVector3.z / pressureProfileSlabs
7015 iout <<
iINFO <<
" TIMESTEPS BETWEEN DATA OUTPUT: " 7016 << pressureProfileFreq <<
"\n";
7017 iout <<
iINFO <<
" NUMBER OF ATOM TYPES: " << pressureProfileAtomTypes <<
"\n";
7020 pressureProfileEwaldOn = 0;
7021 pressureProfileAtomTypes = 1;
7025 iout <<
iINFO <<
"ACCELERATED MD ACTIVE\n";
7028 accelMDdihe =
FALSE;
7029 iout <<
iINFO <<
"APPLYING DUAL BOOST\n";
7031 else if ( accelMDdihe ) {
7032 iout <<
iINFO <<
"BOOSTING DIHEDRAL POTENTIAL\n";
7034 iout <<
iINFO <<
"BOOSTING TOTAL POTENTIAL\n";
7038 switch(accelMDGiE) {
7040 iout <<
iINFO <<
"accelMDG THRESHOLD ENERGY SET TO LOWER BOUND Vmax\n";
7043 iout <<
iINFO <<
"accelMDG THRESHOLD ENERGY SET TO UPPER BOUND Vmin+(Vmax-Vmin)/k0\n";
7047 iout <<
iINFO <<
"accelMDG USING RESTART FILE " << accelMDGRestartFile <<
"\n";
7048 if(accelMDGresetVaftercmd)
7049 iout <<
iINFO <<
"accelMDG WILL RESET STATISTICS AFTER FIRST CMD STEPS\n";
7051 iout <<
iINFO <<
"accelMDG " << accelMDGcMDSteps <<
" CONVENTIONAL MD STEPS " 7052 <<
"(WITH " << accelMDGcMDPrepSteps <<
" PREPARATION STEPS)\n";
7053 if(accelMDGcMDSteps == 0)
7054 iout <<
iINFO <<
"(accelMDGcMDPrepSteps is set to zero automatically)\n";
7056 iout <<
iINFO <<
"accelMDG " << accelMDGEquiSteps <<
" EQUILIBRATION STEPS " 7057 <<
"(WITH " << accelMDGEquiPrepSteps <<
" PREPARATION STEPS)\n";
7058 if(accelMDGEquiSteps == 0)
7059 iout <<
iINFO <<
"(accelMDGEquiPrepSteps is set to zero automatically)\n";
7061 if(accelMDGStatWindow > 0)
7062 iout <<
iINFO <<
"accelMDG WILL RESET AVERAGE AND STANDARD DEVIATION EVERY " << accelMDGEquiSteps <<
" STEPS\n";
7064 iout <<
iINFO <<
"accelMDG WILL NOT RESET AVERAGE AND STANDARD DEVIATION\n";
7067 iout <<
iINFO <<
"accelMDGSigma0D: " << accelMDGSigma0D <<
" KCAL/MOL\n";
7068 else if(accelMDdual)
7069 iout <<
iINFO <<
"accelMDGSigma0P: " << accelMDGSigma0P <<
" KCAL/MOL, " 7070 <<
"accelMDGSigma0D: " << accelMDGSigma0D <<
" KCAL/MOL\n";
7072 iout <<
iINFO <<
"accelMDGSigma0P: " << accelMDGSigma0P <<
" KCAL/MOL\n";
7075 iout <<
iINFO <<
"accelMDE: " << accelMDE <<
" KCAL/MOL, accelMDalpha: " << accelMDalpha <<
" KCAL/MOL\n";
7077 iout <<
iINFO <<
"accelMDTE: " << accelMDTE <<
" KCAL/MOL, " 7078 <<
"accelMDTalpha: " << accelMDTalpha <<
" KCAL/MOL\n";
7081 if ( accelMDLastStep > 0) {
7082 iout <<
iINFO <<
"accelMD WILL BE DONE FROM STEP " << accelMDFirstStep <<
" TO STEP " << accelMDLastStep <<
"\n";
7084 iout <<
iINFO <<
"accelMD WILL BE DONE FROM STEP " << accelMDFirstStep <<
" TO THE END OF THE SIMULATION \n";
7086 iout <<
iINFO <<
"accelMD OUTPUT FREQUENCY " << accelMDOutFreq <<
"\n";
7091 iout <<
iINFO <<
"ADAPTIVE TEMPERING ACTIVE:\n";
7092 iout <<
iINFO <<
" OUTPUT FREQUENCY: " << adaptTempOutFreq <<
"\n";
7093 iout <<
iINFO <<
" TEMPERATURE UPDATE FREQUENCY: " << adaptTempFreq <<
"\n";
7094 if ( adaptTempLastStep > 0 )
7095 iout <<
iINFO <<
" ADAPTIVE TEMPERING WILL BE DONE FROM STEP " << adaptTempFirstStep <<
" TO " << adaptTempLastStep <<
"\n";
7097 iout <<
iINFO <<
" ADAPTIVE TEMPERING WILL BE DONE FROM STEP " << adaptTempFirstStep <<
"\n";
7098 if ( adaptTempLangevin )
7099 iout <<
iINFO <<
" ADAPTIVE TEMPERING COUPLED TO LANGEVIN THERMOSTAT\n";
7100 if ( adaptTempRescale )
7101 iout <<
iINFO <<
" ADAPTIVE TEMPERING COUPLED TO VELOCITY RESCALING\n";
7102 if (adaptTempRestartFreq > 0) {
7103 iout <<
iINFO <<
" WRITING RESTART INFORMATION TO " << adaptTempRestartFile <<
" EVERY " << adaptTempRestartFreq <<
" STEPS\n";
7112 << fmaTheta <<
"\n";
7117 FFTWWisdomString = 0;
7120 iout <<
iINFO <<
"PARTICLE MESH EWALD (PME) ACTIVE\n";
7122 << PMETolerance <<
"\n";
7123 iout <<
iINFO <<
"PME EWALD COEFFICIENT " 7124 << PMEEwaldCoefficient <<
"\n";
7125 iout <<
iINFO <<
"PME INTERPOLATION ORDER " 7126 << PMEInterpOrder <<
"\n";
7128 << PMEGridSizeX <<
" " 7129 << PMEGridSizeY <<
" " 7130 << PMEGridSizeZ <<
"\n";
7131 iout <<
iINFO <<
"PME MAXIMUM GRID SPACING " 7132 << PMEGridSpacing <<
"\n";
7134 iout <<
iINFO <<
"PME BARRIER ENABLED\n";
7137 iout <<
iINFO <<
"PME RECIPROCAL SUM OFFLOADED TO GPU\n";
7140 if ( useDPME )
iout <<
iINFO <<
"USING OLD DPME CODE\n";
7141 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 7142 else if ( usePMECUDA ) {
7143 iout <<
iINFO <<
"PME CALCULATION WILL BE PERFORMED ON GPU" <<
"\n" 7148 else if ( FFTWUseWisdom ) {
7150 iout <<
iINFO <<
"Attempting to read FFTW data from system" <<
"\n" <<
endi;
7151 fftwf_import_system_wisdom();
7153 if (! opts.
defined(
"FFTWWisdomFile")) {
7154 strcpy(FFTWWisdomFile,
"FFTW_NAMD_");
7155 strcat(FFTWWisdomFile,NAMD_VERSION);
7156 strcat(FFTWWisdomFile,
"_");
7157 strcat(FFTWWisdomFile,NAMD_PLATFORM);
7159 strcat(FFTWWisdomFile,
"_FFTW3");
7161 strcat(FFTWWisdomFile,
".txt");
7164 iout <<
iINFO <<
"Attempting to read FFTW data from " 7165 << FFTWWisdomFile <<
"\n" <<
endi;
7166 FILE *wisdom_file = fopen(FFTWWisdomFile,
"r");
7167 if ( wisdom_file ) {
7169 fftwf_import_wisdom_from_file(wisdom_file);
7171 fftw_import_wisdom_from_file(wisdom_file);
7173 fclose(wisdom_file);
7178 int minslices = PMEMinSlices;
7179 int dimx = PMEGridSizeX;
7180 int nrpx = ( dimx + minslices - 1 ) / minslices;
7181 if ( nrpx > nrp ) nrp = nrpx;
7182 int dimy = PMEGridSizeY;
7183 int nrpy = ( dimy + minslices - 1 ) / minslices;
7184 if ( nrpy > nrp ) nrp = nrpy;
7187 int nrpp = CkNumPes();
7189 if ( nrpp < nrp ) nrp = nrpp;
7192 int nrps = PMEProcessors;
7193 if ( nrps > CkNumPes() ) nrps = CkNumPes();
7194 if ( nrps > 0 ) nrp = nrps;
7197 int bx = ( dimx + nrp - 1 ) / nrp;
7198 int nrpbx = ( dimx + bx - 1 ) / bx;
7199 int by = ( dimy + nrp - 1 ) / nrp;
7200 int nrpby = ( dimy + by - 1 ) / by;
7201 nrp = ( nrpby > nrpbx ? nrpby : nrpbx );
7202 if ( bx != ( dimx + nrp - 1 ) / nrp )
7203 NAMD_bug(
"Error in selecting number of PME processors.");
7204 if ( by != ( dimy + nrp - 1 ) / nrp )
7205 NAMD_bug(
"Error in selecting number of PME processors.");
7210 int block2 = (PMEGridSizeY + nrp - 1) / nrp;
7211 int block2_min = PMEGridSizeY % block2;
7212 if ( ! block2_min ) block2_min = block2;
7213 int dim3 = 2 * (PMEGridSizeZ/2 + 1);
7215 int n[3]; n[0] = PMEGridSizeX; n[1] = PMEGridSizeY; n[2] = PMEGridSizeZ;
7216 fftw_complex *work =
new fftw_complex[n[0]];
7217 float *grid1 = (
float *)
fftwf_malloc(
sizeof(
float) *n[1]*dim3);
7218 float *grid2 = (
float *)
fftwf_malloc(
sizeof(
float) *n[0]*block2*dim3*2);
7221 int fftwFlags = FFTWPatient ? FFTW_PATIENT : FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE ;
7222 int planLineSizes[1];
7223 planLineSizes[0]=n[2];
7226 int sizeLines=nx*ny;
7229 int xStride=block2 * dim3 / 2;
7231 fftwf_plan_many_dft_r2c(1, planLineSizes, sizeLines,
7232 (
float *) grid2, NULL, 1,
7234 (fftwf_complex *) grid2,
7241 fftwf_plan_many_dft_c2r(1, planLineSizes, sizeLines,
7242 (fftwf_complex *) grid2,
7245 (
float *) grid2, NULL, 1,
7250 planLineSizes[0]=block2;
7251 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7252 (fftwf_complex *) grid2, NULL,
7254 (fftwf_complex *) grid2, NULL,
7259 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7260 (fftwf_complex *) grid2, NULL,
7262 (fftwf_complex *) grid2, NULL,
7268 planLineSizes[0]=n[0];
7269 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7270 (fftwf_complex *) grid2, NULL,
7272 (fftwf_complex *) grid2, NULL,
7277 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7278 (fftwf_complex *) grid2, NULL,
7280 (fftwf_complex *) grid2, NULL,
7286 rfftwnd_destroy_plan( rfftwnd_create_plan_specific(
7287 2, n+1, FFTW_REAL_TO_COMPLEX,
7288 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7289 | FFTW_IN_PLACE | FFTW_USE_WISDOM, grid1, 1, 0, 0) );
7291 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_REAL_TO_COMPLEX,
7292 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7293 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7294 block2*dim3/2, work, 1) );
7296 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_REAL_TO_COMPLEX,
7297 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7298 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7299 block2_min*dim3/2, work, 1) );
7301 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_COMPLEX_TO_REAL,
7302 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7303 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7304 block2*dim3/2, work, 1) );
7306 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_COMPLEX_TO_REAL,
7307 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7308 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7309 block2_min*dim3/2, work, 1) );
7311 rfftwnd_destroy_plan( rfftwnd_create_plan_specific(
7312 2, n+1, FFTW_COMPLEX_TO_REAL,
7313 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7314 | FFTW_IN_PLACE | FFTW_USE_WISDOM, grid1, 1, 0, 0) );
7322 FFTWWisdomString = fftwf_export_wisdom_to_string();
7324 FFTWWisdomString = fftw_export_wisdom_to_string();
7327 if ( FFTWWisdomString && (CmiNumPartitions() == 1) ) {
7328 iout <<
iINFO <<
"Writing FFTW data to " 7329 << FFTWWisdomFile <<
"\n" <<
endi;
7330 wisdom_file = fopen(FFTWWisdomFile,
"w");
7331 if ( wisdom_file ) {
7333 fftwf_export_wisdom_to_file(wisdom_file);
7335 fftw_export_wisdom_to_file(wisdom_file);
7337 fclose(wisdom_file);
7349 if (switchingActive) {
7350 NAMD_die(
"Cannot use LJ-PME with switch smoothing function. Select only one. ");
7352 if (vdwForceSwitching) {
7353 NAMD_die(
"Cannot use LJ-PME with VDW Force switch smoothing function. Select only one.");
7356 NAMD_die(
"Cannot use LJ-PME with LJ tail corrections. Select only one.");
7359 NAMD_die(
"Sorry, alchemical transformation is not supported with LJ-PME.");
7361 if (!fullElectFrequency) {
7362 NAMD_die(
"To use LJ-PME, a full-range electrostatic method must be activated.");
7364 #ifdef OPENATOM_VERSION 7366 NAMD_die(
"Sorry, open-atom simulation is not supported with LJ-PME.");
7370 #ifdef MEM_OPT_VERSION 7371 NAMD_die(
"Sorry, memory-optimized version of NAMD does not support LJ-PME.");
7373 if(fullElectFrequency > 1 || nonbondedFrequency > 1 || fullDispersionFrequency > 1) {
7374 NAMD_die(
"The LJ-PME method does not support multiple time steps.");
7379 iout <<
iINFO <<
"LJ PARTICLE MESH EWALD (LJ-PME) ACTIVE\n";
7381 << LJPMETolerance <<
"\n";
7382 iout <<
iINFO <<
"LJ-PME EWALD COEFFICIENT " 7383 << LJPMEEwaldCoefficient <<
"\n";
7384 iout <<
iINFO <<
"LJ-PME INTERPOLATION ORDER " 7385 << LJPMEInterpOrder <<
"\n";
7386 iout <<
iINFO <<
"LJ-PME GRID DIMENSIONS " 7387 << LJPMEGridSizeX <<
" " 7388 << LJPMEGridSizeY <<
" " 7389 << LJPMEGridSizeZ <<
"\n";
7390 iout <<
iINFO <<
"LJ-PME MAXIMUM GRID SPACING " 7391 << LJPMEGridSpacing <<
"\n";
7392 iout <<
iINFO <<
"FULL LJ DISPERSION EVALUATION FREQUENCY " 7393 << fullDispersionFrequency <<
"\n";
7398 iout <<
iINFO <<
"DIRECT FULL ELECTROSTATIC CALCULATIONS ACTIVE\n";
7406 enum { LO=0, MEDLO, MED, MEDHI, HI };
7409 enum { CUBIC=0, QUINTIC, QUINTIC2,
7410 SEPTIC, SEPTIC3, NONIC, NONIC4, C1HERMITE, NUM_APPROX };
7413 enum { TAYLOR2=0, TAYLOR3, TAYLOR4,
7414 TAYLOR5, TAYLOR6, TAYLOR7, TAYLOR8, NUM_SPLIT };
7416 if (MSMApprox || MSMSplit) {
7417 if (MSMApprox < 0 || MSMApprox >= NUM_APPROX) {
7418 NAMD_die(
"MSM: unknown approximation requested (MSMApprox)");
7420 if (MSMSplit < 0 || MSMSplit >= NUM_SPLIT) {
7421 NAMD_die(
"MSM: unknown splitting requested (MSMSplit)");
7425 switch (MSMQuality) {
7431 MSMApprox = C1HERMITE;
7435 MSMApprox = QUINTIC;
7447 NAMD_die(
"MSM: unknown quality requested (MSMQuality)");
7452 <<
"MULTILEVEL SUMMATION METHOD (MSM) FOR ELECTROSTATICS ACTIVE\n";
7455 <<
"PERFORMING SERIAL MSM CALCULATION FOR LONG-RANGE PART\n";
7457 const char *approx_str, *split_str;
7458 switch (MSMApprox) {
7459 case CUBIC: approx_str =
"C1 CUBIC";
break;
7460 case QUINTIC: approx_str =
"C1 QUINTIC";
break;
7461 case QUINTIC2: approx_str =
"C2 QUINTIC";
break;
7462 case SEPTIC: approx_str =
"C1 SEPTIC";
break;
7463 case SEPTIC3: approx_str =
"C3 SEPTIC";
break;
7464 case NONIC: approx_str =
"C1 NONIC";
break;
7465 case NONIC4: approx_str =
"C4 NONIC";
break;
7466 case C1HERMITE:approx_str =
"C1 HERMITE";
break;
7467 default: approx_str =
"UNKNOWN";
break;
7470 case TAYLOR2: split_str =
"C2 TAYLOR";
break;
7471 case TAYLOR3: split_str =
"C3 TAYLOR";
break;
7472 case TAYLOR4: split_str =
"C4 TAYLOR";
break;
7473 case TAYLOR5: split_str =
"C5 TAYLOR";
break;
7474 case TAYLOR6: split_str =
"C6 TAYLOR";
break;
7475 case TAYLOR7: split_str =
"C7 TAYLOR";
break;
7476 case TAYLOR8: split_str =
"C8 TAYLOR";
break;
7477 default: split_str =
"UNKNOWN";
break;
7480 <<
"MSM WITH " << approx_str <<
" INTERPOLATION " 7481 <<
"AND " << split_str <<
" SPLITTING\n" 7488 iout <<
iINFO <<
"FAST MULTIPOLE METHOD (FMM) FOR ELECTROSTATICS ACTIVE\n";
7489 iout <<
iINFO <<
"PERFORMING SERIAL FMM CALCULATION\n";
7490 iout <<
iINFO <<
"FMM LEVELS = " << FMMLevels <<
"\n";
7491 iout <<
iINFO <<
"FMM PADDING = " << FMMPadding <<
" ANGSTROMS\n";
7494 NAMD_die(
"Must link to FMM library to use FMM\n");
7498 if ( FMAOn || PMEOn || MSMOn || fullDirectOn || GBISOn || FMMOn )
7500 iout <<
iINFO <<
"FULL ELECTROSTATIC EVALUATION FREQUENCY " 7501 << fullElectFrequency <<
"\n";
7504 if ( ( computeEnergies % fullElectFrequency ) &&
7505 ( fullElectFrequency % computeEnergies ) )
7506 NAMD_die(
"Either computeEnergies must be a multiple of fullElectFrequency or vice versa.\n");
7510 if ( ( outputEnergies % fullDispersionFrequency ) &&
7511 ( fullDispersionFrequency % outputEnergies ) ) {
7512 NAMD_die(
"Either outputEnergies must be a multiple of fullDispersionFrequency or vice versa.\n");
7516 if (MTSAlgorithm ==
NAIVE)
7518 iout <<
iINFO <<
"USING NAIVE (CONSTANT FORCE) MTS SCHEME.\n" <<
endi;
7522 iout <<
iINFO <<
"USING VERLET I (r-RESPA) MTS SCHEME.\n" <<
endi;
7525 if (longSplitting ==
SHARP)
7526 iout <<
iINFO <<
"SHARP SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7527 else if (longSplitting ==
XPLOR)
7528 iout <<
iINFO <<
"XPLOR SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7529 else if (longSplitting ==
C1)
7530 iout <<
iINFO <<
"C1 SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7531 else if (longSplitting ==
C2)
7532 iout <<
iINFO <<
"C2 SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7535 iout <<
iINFO <<
"PLACING ATOMS IN PATCHES BY POSITION\n";
7537 iout <<
iINFO <<
"PLACING ATOMS IN PATCHES BY HYDROGEN GROUPS\n";
7543 iout <<
iINFO <<
"SLOW FORCE MOLLIFICATION : \n";
7544 iout <<
iINFO <<
" ERROR TOLERANCE : " << mollyTol <<
"\n";
7545 iout <<
iINFO <<
" MAX ITERATIONS : " << mollyIter <<
"\n";
7551 iout <<
iINFO <<
"RIGID BONDS TO HYDROGEN : ";
7554 iout <<
iINFO <<
" ERROR TOLERANCE : " << rigidTol <<
"\n";
7555 iout <<
iINFO <<
" MAX ITERATIONS : " << rigidIter <<
"\n";
7556 if (useSettle)
iout <<
iINFO <<
"RIGID WATER USING SETTLE ALGORITHM\n";
7561 if (nonbondedFrequency != 1)
7563 iout <<
iINFO <<
"NONBONDED FORCES EVALUATED EVERY " << nonbondedFrequency <<
" STEPS\n";
7567 << randomSeed <<
"\n";
7571 iout <<
iINFO <<
"USE HYDROGEN BONDS? ";
7575 iout <<
iINFO <<
"USE ANTECEDENT ATOMS? ";
7576 iout << (useAntecedent ?
"YES" :
"NO");
7577 iout <<
"\nHB DIST CUT, ON, OFF ";
7578 iout << daCutoffDist <<
" , " << daOnDist <<
" , " << daOffDist;
7579 iout <<
"\nHB ANGLE CUT, ON, OFF ";
7580 iout << dhaCutoffAngle <<
" , " << dhaOnAngle <<
" , ";
7581 iout << dhaOffAngle;
7582 iout <<
"\nHB ATT, REP exponents ";
7583 iout << distAttExp <<
" , " << distRepExp;
7584 iout <<
"\nHB AA, HA exponents ";
7585 iout << aaAngleExp <<
" , " << haAngleExp;
7596 {
iout <<
iINFO <<
"Using AMBER format force field!\n";
7597 current = config->
find(
"parmfile");
7598 iout <<
iINFO <<
"AMBER PARM FILE " << current->
data <<
'\n';
7599 if (opts.
defined(
"coordinates"))
7600 { current = config->
find(
"coordinates");
7601 iout <<
iINFO <<
"COORDINATE PDB " << current->
data <<
'\n';
7604 { current = config->
find(
"ambercoor");
7605 iout <<
iINFO <<
"AMBER COORDINATE FILE " << current->
data <<
'\n';
7608 iout <<
iINFO <<
"Exclusions will be read from PARM file!\n";
7610 iout <<
iINFO <<
"Exclusions in PARM file will be ignored!\n";
7611 iout <<
iINFO <<
"SCNB (VDW SCALING) " << vdwscale14 <<
"\n" <<
endi;
7615 iout <<
iINFO <<
"Using GROMACS format force field!\n";
7617 current = config->
find(
"grotopfile");
7619 if (current == NULL)
7620 NAMD_die(
"no GROMACS topology file defined!?");
7621 iout <<
iINFO <<
"GROMACS TOPO FILE " << current->
data <<
'\n';
7624 current = config->
find(
"grocoorfile");
7625 if (current == NULL) {
7626 current = config->
find(
"coordinates");
7627 if (current == NULL) {
7628 NAMD_die(
"no coordinate file defined!?");
7631 iout <<
iINFO <<
"GROMACS COOR FILE " << current->
data <<
'\n' 7636 if ( !usePluginIO ) {
7637 if ( current = config->
find(
"coordinates") )
7641 current = config->
find(
"structure");
7648 iout <<
iINFO <<
"COSANGLES ON. SOME ANGLES WILL BE COSINE-BASED\n" <<
endi;
7652 if (paraTypeXplorOn)
7654 iout <<
iINFO <<
"PARAMETER file: XPLOR format! (default) \n" <<
endi;
7656 else if (paraTypeCharmmOn)
7658 iout <<
iINFO <<
"PARAMETER file: CHARMM format! \n" <<
endi;
7662 current = config->
find(
"parameters");
7664 while (current != NULL)
7668 current = current->
next;
7673 ( vdwGeometricSigma ?
"GEOMETRIC" :
"ARITHMETIC" ) <<
7674 " MEAN TO COMBINE L-J SIGMA PARAMETERS\n" <<
endi;
7676 if (opts.
defined(
"bincoordinates"))
7678 current = config->
find(
"bincoordinates");
7681 << current->
data <<
"\n";
7684 #ifdef NAMD_AVXTILES 7685 iout <<
iINFO <<
"MIXED PRECISION AVX-512 TILES OPTIMIZATIONS: ";
7686 if (useAVXTiles)
iout <<
"ENABLED\n";
7687 else iout <<
"DISABLED\n";
7690 #ifdef MEM_OPT_VERSION 7691 if (opts.
defined(
"binrefcoords"))
7693 current = config->
find(
"binrefcoords");
7696 << current->
data <<
"\n";
7703 << firstTimestep <<
"\n" <<
endi;
7715 void SimParameters::parse_mgrid_params(
ConfigList *config)
7719 mgridforcelist.clear();
7720 char *key =
new char[81];
7721 char *valstr =
new char[256];
7724 mgridforceOn =
TRUE;
7727 mgfp = mgridforcelist.find_key(default_key);
7729 iout <<
iINFO <<
"MGRIDFORCEPOTFILE key " 7730 << key <<
" redefined for file " << valstr <<
"\n" <<
endi;
7732 mgfp = mgridforcelist.add(default_key);
7737 parse_mgrid_string_param(config,
"gridforcefile",&(mgfp->
gridforceFile));
7738 parse_mgrid_string_param(config,
"gridforcecol",&(mgfp->
gridforceCol));
7739 parse_mgrid_string_param(config,
"gridforcechargecol",&(mgfp->
gridforceQcol));
7740 parse_mgrid_string_param(config,
"gridforcepotfile",&(mgfp->
gridforceVfile));
7751 current = config->
find(
"mgridforcepotfile");
7752 while (current != NULL) {
7753 int curlen = strlen(current->
data);
7756 sscanf(current->
data,
"%80s%255s",key,valstr);
7759 mgfp = mgridforcelist.find_key(key);
7760 if ( mgfp != NULL) {
7761 iout <<
iINFO <<
"MGRIDFORCEPOTFILE key " 7762 << key <<
" redefined for file " << valstr <<
"\n" <<
endi;
7764 mgfp = mgridforcelist.add(key);
7766 int fnamelen = strlen(valstr);
7776 current = current->
next;
7779 current = config->
find(
"mgridforcefile");
7780 while (current != NULL) {
7781 int curlen = strlen(current->
data);
7784 sscanf(current->
data,
"%80s%255s",key,valstr);
7787 mgfp = mgridforcelist.find_key(key);
7788 if ( mgfp == NULL) {
7789 iout <<
iINFO <<
"MGRIDFORCEFILE no key " 7790 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7792 int fnamelen = strlen(valstr);
7800 current = current->
next;
7803 current = config->
find(
"mgridforcevolts");
7804 while (current != NULL) {
7807 int curlen = strlen(current->
data);
7808 sscanf(current->
data,
"%80s%255s",key,valstr);
7811 mgfp = mgridforcelist.find_key(key);
7812 if ( mgfp == NULL) {
7813 iout <<
iINFO <<
"MGRIDFORCEVOLTS no key " 7814 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7817 if (boolval == -1) {
7819 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7825 current = current->
next;
7828 current = config->
find(
"mgridforcescale");
7829 while (current != NULL) {
7832 int curlen = strlen(current->
data);
7834 sscanf(current->
data,
"%80s%n",key,&nread);
7835 char *val = current->
data + nread + 1;
7838 mgfp = mgridforcelist.find_key(key);
7839 if ( mgfp == NULL) {
7840 iout <<
iINFO <<
"MGRIDFORCESCALE no key " 7841 << key <<
" defined for vector " << val <<
"\n" <<
endi;
7846 current = current->
next;
7849 current = config->
find(
"mgridforcevoff");
7850 while (current != NULL) {
7853 int curlen = strlen(current->
data);
7855 sscanf(current->
data,
"%80s%n",key,&nread);
7856 char *val = current->
data + nread + 1;
7859 mgfp = mgridforcelist.find_key(key);
7860 if ( mgfp == NULL) {
7861 iout <<
iINFO <<
"MGRIDFORCEVOFF no key " 7862 << key <<
" defined for vector " << val <<
"\n" <<
endi;
7867 current = current->
next;
7870 current = config->
find(
"mgridforcecol");
7871 while (current != NULL) {
7874 int curlen = strlen(current->
data);
7875 sscanf(current->
data,
"%80s%255s",key,valstr);
7878 mgfp = mgridforcelist.find_key(key);
7879 if ( mgfp == NULL) {
7880 iout <<
iINFO <<
"MGRIDFORCECOL no key " 7881 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7883 int collen = strlen(valstr);
7891 current = current->
next;
7894 current = config->
find(
"mgridforcechargecol");
7895 while (current != NULL) {
7898 int curlen = strlen(current->
data);
7899 sscanf(current->
data,
"%80s%255s",key,valstr);
7902 mgfp = mgridforcelist.find_key(key);
7903 if ( mgfp == NULL) {
7904 iout <<
iINFO <<
"MGRIDFORCECHARGECOL no key " 7905 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7907 int collen = strlen(valstr);
7915 current = current->
next;
7918 current = config->
find(
"mgridforcecont1");
7919 while (current != NULL) {
7922 int curlen = strlen(current->
data);
7923 sscanf(current->
data,
"%80s%255s",key,valstr);
7926 mgfp = mgridforcelist.find_key(key);
7927 if ( mgfp == NULL) {
7928 iout <<
iINFO <<
"MGRIDFORCECONT1 no key " 7929 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7932 if (boolval == -1) {
7934 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7940 current = current->
next;
7943 current = config->
find(
"mgridforcecont2");
7944 while (current != NULL) {
7947 int curlen = strlen(current->
data);
7948 sscanf(current->
data,
"%80s%255s",key,valstr);
7951 mgfp = mgridforcelist.find_key(key);
7952 if ( mgfp == NULL) {
7953 iout <<
iINFO <<
"MGRIDFORCECONT2 no key " 7954 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7957 if (boolval == -1) {
7959 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7965 current = current->
next;
7967 current = config->
find(
"mgridforcecont3");
7968 while (current != NULL) {
7971 int curlen = strlen(current->
data);
7972 sscanf(current->
data,
"%80s%255s",key,valstr);
7975 mgfp = mgridforcelist.find_key(key);
7976 if ( mgfp == NULL) {
7977 iout <<
iINFO <<
"MGRIDFORCECONT3 no key " 7978 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7982 if (boolval == -1) {
7984 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7990 current = current->
next;
7994 current = config->
find(
"mgridforcechecksize");
7995 while (current != NULL) {
7998 int curlen = strlen(current->
data);
7999 sscanf(current->
data,
"%80s%255s",key,valstr);
8002 mgfp = mgridforcelist.find_key(key);
8003 if ( mgfp == NULL) {
8004 iout <<
iINFO <<
"MGRIDFORCECHECKSIZE no key " 8005 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
8008 if (boolval == -1) {
8009 iout <<
iINFO <<
"MGRIDFORCECHECKSIZE key " 8010 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
8016 current = current->
next;
8026 while (params != NULL) {
8029 sprintf(errmsg,
"Value undefined for gridforceFile for key %s\n",
8035 sprintf(errmsg,
"Value undefined for gridforceCol for key %s\n",
8039 params = params->
next;
8044 void SimParameters::parse_mgrid_string_param(
ConfigList *cl,
8045 const char *fieldname,
8051 if (vallist != NULL) {
8052 val = vallist->
data;
8065 *dest =
new char[len+1];
8066 strncpy(*dest,val,len+1);
8073 void SimParameters::parse_group_restraints_params(
ConfigList *config)
8080 if (groupRestraintsOn) {
8082 arguments = config->
find(
"group1File");
8083 for ( ; arguments != NULL; arguments = arguments->
next) {
8084 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8085 groupRestraints.SetGroup1AtomFileIndices(key, strValue);
8087 sprintf(err_msg,
"For group1File, expected a tag and file name, but recieved: %s\n", arguments->
data);
8092 arguments = config->
find(
"group1List");
8093 for ( ; arguments != NULL; arguments = arguments->
next) {
8095 sscanf(arguments->
data,
"%127s%n", key, &nread);
8096 char *val = arguments->
data + nread + 1;
8097 groupRestraints.SetGroup1AtomListIndices(key, val);
8100 arguments = config->
find(
"group1RefPos");
8101 for ( ; arguments != NULL; arguments = arguments->
next) {
8103 sscanf(arguments->
data,
"%127s%n", key, &nread);
8104 char *val = arguments->
data + nread + 1;
8105 groupRestraints.SetGroup1RefPosition(key, val);
8108 arguments = config->
find(
"group2File");
8109 for ( ; arguments != NULL; arguments = arguments->
next) {
8110 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8111 groupRestraints.SetGroup2AtomFileIndices(key, strValue);
8113 sprintf(err_msg,
"For group2File, expected a tag and file name, but recieved: %s\n", arguments->
data);
8118 arguments = config->
find(
"group2List");
8119 for ( ; arguments != NULL; arguments = arguments->
next) {
8121 sscanf(arguments->
data,
"%127s%n", key, &nread);
8122 char *val = arguments->
data + nread + 1;
8123 groupRestraints.SetGroup2AtomListIndices(key, val);
8126 arguments = config->
find(
"groupResK");
8127 for ( ; arguments != NULL; arguments = arguments->
next) {
8129 if (sscanf(arguments->
data,
"%127s%lf", key, &kForce) == 2) {
8130 groupRestraints.SetForce(key, kForce);
8132 sprintf(err_msg,
"For groupResK, expected a tag and force value, but recieved: %s\n", arguments->
data);
8137 arguments = config->
find(
"groupResExp");
8138 for ( ; arguments != NULL; arguments = arguments->
next) {
8140 if (sscanf(arguments->
data,
"%127s%d", key, &exponent) == 2) {
8141 groupRestraints.SetExponent(key, exponent);
8143 sprintf(err_msg,
"For groupResExp, expected a tag and exponent but recieved: %s\n", arguments->
data);
8148 arguments = config->
find(
"groupResCenter");
8149 for ( ; arguments != NULL; arguments = arguments->
next) {
8151 sscanf(arguments->
data,
"%127s%n", key, &nread);
8152 char *val = arguments->
data + nread + 1;
8153 groupRestraints.SetResCenter(key, val);
8156 arguments = config->
find(
"groupResX");
8157 for ( ; arguments != NULL; arguments = arguments->
next) {
8158 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8159 groupRestraints.SetResDirectionX(key, strValue);
8161 sprintf(err_msg,
"For groupResX, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8166 arguments = config->
find(
"groupResY");
8167 for ( ; arguments != NULL; arguments = arguments->
next) {
8168 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8169 groupRestraints.SetResDirectionY(key, strValue);
8171 sprintf(err_msg,
"For groupResY, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8176 arguments = config->
find(
"groupResZ");
8177 for ( ; arguments != NULL; arguments = arguments->
next) {
8178 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8179 groupRestraints.SetResDirectionZ(key, strValue);
8181 sprintf(err_msg,
"For groupResZ, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8186 arguments = config->
find(
"groupResUseMagnitude");
8187 for ( ; arguments != NULL; arguments = arguments->
next) {
8188 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8189 groupRestraints.SetUseDistMagnitude(key, strValue);
8191 sprintf(err_msg,
"For groupResUseMagnitude, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8195 auto grps = groupRestraints.GetGroupResMap();
8196 groupRestraintsCount = grps.size();
8203 void SimParameters::create_output_directories(
const char *dirname){
8208 int baselen = strlen(outputFilename);
8209 char *filename =
new char[baselen+32];
8210 memset(filename, 0, baselen+32);
8211 strcpy(filename, outputFilename);
8212 if(access(filename, F_OK)!=0) {
8213 int ret =
MKDIR(filename);
8216 sprintf(errmsg,
"Error in creating top-level directory %s!", filename);
8223 strcat(filename, dirname);
8225 if(access(filename, F_OK)!=0) {
8226 int ret =
MKDIR(filename);
8229 sprintf(errmsg,
"Error in creating middle-level directory %s!", filename);
8236 for(
int i=0; i<numoutputprocs; i++) {
8237 memset(tmpstr, 0, 256);
8238 sprintf(tmpstr,
"%s%s%d", filename,
PATHSEPSTR, i);
8239 if(access(tmpstr, F_OK)!=0) {
8240 int ret =
MKDIR(tmpstr);
8243 sprintf(errmsg,
"Error in creating last-level directory %s!", tmpstr);
8256 #define BoolToString(b) ((b) ? "TRUE" : "FALSE") 8258 void SimParameters::print_mgrid_params()
8262 while (params != NULL) {
8273 const char *qcol_msg =
"Use atom charge";
8277 iout <<
iINFO <<
" ChargeCol " << qcol_msg
8293 iout <<
iINFO <<
" Gridforce-CheckSize " 8296 params = params->
next;
8323 if ( FFTWWisdomString ) {
8324 int fftwlen = strlen(FFTWWisdomString) + 1;
8326 msg->
put(fftwlen,FFTWWisdomString);
8328 if ( tclBCScript ) {
8329 int tcllen = strlen(tclBCScript) + 1;
8331 msg->
put(tcllen,tclBCScript);
8334 #ifdef MEM_OPT_VERSION 8335 int filelen = strlen(binAtomFile)+1;
8337 msg->
put(filelen, binAtomFile);
8339 filelen = strlen(binCoorFile)+1;
8341 msg->
put(filelen, binCoorFile);
8344 filelen = strlen(binVelFile)+1;
8346 msg->
put(filelen, binVelFile);
8350 filelen = strlen(binRefFile)+1;
8352 msg->
put(filelen, binRefFile);
8356 mgridforcelist.pack_data(msg);
8375 if ( FFTWWisdomString ) {
8378 FFTWWisdomString =
new char[fftwlen];
8379 msg->
get(fftwlen,FFTWWisdomString);
8382 fftwf_import_wisdom_from_string(FFTWWisdomString);
8384 fftw_import_wisdom_from_string(FFTWWisdomString);
8388 if ( tclBCScript ) {
8391 tclBCScript =
new char[tcllen];
8392 msg->
get(tcllen,tclBCScript);
8395 #ifdef MEM_OPT_VERSION 8398 binAtomFile =
new char[filelen];
8399 msg->
get(filelen, binAtomFile);
8402 binCoorFile =
new char[filelen];
8403 msg->
get(filelen, binCoorFile);
8407 binVelFile =
new char[filelen];
8408 msg->
get(filelen, binVelFile);
8413 binRefFile =
new char[filelen];
8414 msg->
get(filelen, binRefFile);
8421 mgridforcelist.clear();
8422 mgridforcelist.unpack_data(msg);
8431 if ( alchLambdaIDWS >= 0. ) {
8432 const BigReal lambda2 = ( (step / alchIDWSFreq) % 2 == 1 ) ? alchLambda2 : alchLambdaIDWS;
8441 if (alchLambdaIDWS < 0.)
return 0;
8442 if (alchLambdaIDWS > 1.) {
8443 NAMD_die(
"alchLambdaIDWS should be either in the range [0.0, 1.0], or negative (disabled).\n");
8456 if ( alchOutFreq % nonbondedFrequency != 0 ) {
8457 NAMD_die(
"For IDWS, alchOutFreq must be a multiple of nonBondedFrequency.\n");
8459 if ( fullElectFrequency > 0 ) {
8460 if ( alchOutFreq % fullElectFrequency != 0 ) {
8461 NAMD_die(
"For IDWS, alchOutFreq must be a multiple of fullElectFrequency.\n");
8464 if ( alchOutFreq ) {
8465 alchIDWSFreq = alchOutFreq;
8466 }
else if ( outputEnergies ) {
8467 alchIDWSFreq = outputEnergies;
8469 NAMD_die(
"Either alchOutFreq or outputEnergies should be non-zero.\n");
8471 if ( alchOutFreq && alchOutFreq != outputEnergies) {
8472 iout <<
iWARN <<
"alchOutFreq and outputEnergies do not match. IDWS output" 8473 <<
" to stdout may not be useful!\n" <<
endi;
8500 if ( alchLambdaFreq > 0 && step >= alchEquilSteps ) {
8505 const int timeOrigin = firstTimestep + alchEquilSteps;
8506 const BigReal alchLambdaDelta = getLambdaDelta();
8507 const BigReal increment = (step - timeOrigin) /
BigReal(alchLambdaFreq);
8508 return alchLambda + alchLambdaDelta*(floor(increment) + 1);
8518 return ((alchLambda2 - alchLambda)*alchLambdaFreq
8519 /
BigReal(N - firstTimestep - alchEquilSteps));
8524 return (lambda <= alchElecLambdaStart ? 0.
8525 : (lambda - alchElecLambdaStart) / (1. - alchElecLambdaStart));
8542 if ( lambda < alchRepLambdaEnd || alchRepLambdaEnd == 1.0 ) {
8544 }
else if ( lambda >= alchVdwLambdaEnd ) {
8547 return (lambda - alchRepLambdaEnd) / (alchVdwLambdaEnd - alchRepLambdaEnd);
8550 return (lambda >= alchVdwLambdaEnd ? 1. : lambda / alchVdwLambdaEnd);
8556 return (lambda >= alchRepLambdaEnd ? 1. : lambda / alchRepLambdaEnd);
8561 return (lambda >= alchBondLambdaEnd ? 1. : lambda / alchBondLambdaEnd);
8565 size_t num_max_grids = 1;
8566 if (!alchOn)
return num_max_grids;
8567 if (alchFepOn && !alchThermIntOn) {
8572 if (alchElecLambdaStart > 0) {
8576 if (!alchFepOn && alchThermIntOn) {
8582 return num_max_grids;
std::ostream & iINFO(std::ostream &s)
#define NAMD_BONDEDGPU_CROSSTERMS
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)
#define NAMD_BONDEDGPU_ONEFOURENBTHOLES
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
#define NAMD_BONDEDGPU_DIHEDRALS
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
#define NAMD_BONDEDGPU_ALL
#define NAMD_CRASH_ATOM_TOO_FAST
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)
#define NAMD_BONDEDGPU_BONDS
void send_SimParameters(MOStream *)
#define SCRIPT_PARSE_FLOAT(NAME, VAR)