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 &LJPMESerialOn,
FALSE);
1088 opts.
optionalB(
"LJPME",
"LJPMESerialRealSpace",
"LJ-PME use serial test code for real space part",
1089 &LJPMESerialRealSpaceOn,
FALSE);
1093 opts.
optionalB(
"main",
"PME",
"Use particle mesh Ewald for electrostatics?",
1095 opts.
optional(
"PME",
"PMETolerance",
"PME direct space tolerance",
1096 &PMETolerance, 1.e-6);
1097 opts.
optional(
"PME",
"PMEInterpOrder",
"PME interpolation order",
1098 &PMEInterpOrder, 4);
1099 opts.
optional(
"PME",
"PMEGridSizeX",
"PME grid in x dimension",
1101 opts.
optional(
"PME",
"PMEGridSizeY",
"PME grid in y dimension",
1103 opts.
optional(
"PME",
"PMEGridSizeZ",
"PME grid in z dimension",
1105 opts.
optional(
"PME",
"PMEGridSpacing",
"Maximum PME grid spacing (Angstroms)",
1106 &PMEGridSpacing, 0.);
1108 opts.
optional(
"PME",
"PMEProcessors",
1109 "PME FFT and reciprocal sum processor count", &PMEProcessors, 0);
1110 opts.
optional(
"PME",
"PMEMinSlices",
1111 "minimum thickness of PME reciprocal sum slab", &PMEMinSlices, 2);
1114 "PME FFT and reciprocal sum pencil grid size", &PMEPencils, -1);
1115 opts.
optional(
"PME",
"PMEPencilsX",
1116 "PME FFT and reciprocal sum pencil grid size X", &PMEPencilsX, 0);
1117 opts.
optional(
"PME",
"PMEPencilsY",
1118 "PME FFT and reciprocal sum pencil grid size Y", &PMEPencilsY, 0);
1119 opts.
optional(
"PME",
"PMEPencilsZ",
1120 "PME FFT and reciprocal sum pencil grid size Z", &PMEPencilsZ, 0);
1124 opts.
optional(
"PME",
"PMEPencilsYLayout",
1125 "PME FFT and reciprocal sum Y pencil layout strategy", &PMEPencilsYLayout, 0);
1126 opts.
optional(
"PME",
"PMEPencilsXLayout",
1127 "PME FFT and reciprocal sum X pencil layout strategy", &PMEPencilsXLayout, 1);
1130 opts.
optional(
"PME",
"PMESendOrder",
1131 "PME message ordering control", &PMESendOrder, 0);
1133 opts.
optional(
"PME",
"PMEMinPoints",
1134 "minimum points per PME reciprocal sum pencil", &PMEMinPoints, 10000);
1136 opts.
optionalB(
"main",
"PMEBarrier",
"Use barrier in PME?",
1137 &PMEBarrier,
FALSE);
1138 opts.
optionalB(
"main",
"PMEOffload",
"Offload PME to accelerator?",
1141 opts.
optionalB(
"PME",
"usePMECUDA",
"Use the PME CUDA version", &usePMECUDA, CmiNumPhysicalNodes() == 1);
1142 opts.
optionalB(
"PME",
"usePMEGPU",
"Use the PME GPU version", &usePMEGPU);
1145 opts.
optionalB(
"PME",
"useDPME",
"Use old DPME code?", &useDPME,
FALSE);
1149 opts.
optionalB(
"main",
"FFTWPatient",
"Use intensive plan creation to optimize FFTW?",
1151 &FFTWPatient,
TRUE);
1153 &FFTWPatient,
FALSE);
1156 opts.
optionalB(
"main",
"FFTWEstimate",
"Use estimates to optimize FFTW?",
1158 &FFTWEstimate,
TRUE);
1160 &FFTWEstimate,
FALSE);
1162 opts.
optionalB(
"main",
"FFTWUseWisdom",
"Read/save wisdom file for FFTW?",
1164 &FFTWUseWisdom,
FALSE);
1166 &FFTWUseWisdom,
TRUE);
1168 opts.
optional(
"FFTWUseWisdom",
"FFTWWisdomFile",
"File for FFTW wisdom",
1182 "Use \"Tiles\" mode for AVX-512 optimized calculations",
1183 &useAVXTiles,
TRUE);
1184 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 1185 opts.
optionalB(
"main",
"gpuGlobal",
"use GPU global (external) force",
1186 &useCudaGlobal,
FALSE);
1188 opts.
optional(
"gpuGlobal",
"gpuGlobalProfilingFreq",
"Frequency of printing GPU global profiling information", &cudaGlobalProfilingFreq, -1);
1190 useCudaGlobal =
false;
1194 void SimParameters::config_parser_methods(
ParseOptions &opts) {
1197 opts.
optionalB(
"main",
"minimization",
"Should minimization be performed?",
1198 &minimizeCGOn,
FALSE);
1199 opts.
optionalB(
"main",
"minVerbose",
"Print extra minimization diagnostics?",
1200 &minVerbose,
FALSE);
1201 opts.
optional(
"main",
"minTinyStep",
"very first minimization steps",
1202 &minTinyStep, 1.0e-6);
1204 opts.
optional(
"main",
"minBabyStep",
"initial minimization steps",
1205 &minBabyStep, 1.0e-2);
1207 opts.
optional(
"main",
"minLineGoal",
"line minimization gradient reduction",
1208 &minLineGoal, 1.0e-3);
1211 opts.
optionalB(
"main",
"velocityQuenching",
1212 "Should old-style minimization be performed?", &minimizeOn,
FALSE);
1214 opts.
optional(
"main",
"maximumMove",
"Maximum atom movement per step", &maximumMove, 0.0);
1218 opts.
optionalB(
"main",
"Langevin",
"Should Langevin dynamics be performed?",
1219 &langevinOn,
FALSE);
1220 opts.
require(
"Langevin",
"langevinTemp",
"Temperature for heat bath in Langevin " 1221 "dynamics", &langevinTemp);
1224 opts.
optional(
"Langevin",
"langevinDamping",
"Damping coefficient (1/ps)",
1227 opts.
optionalB(
"Langevin",
"langevinHydrogen",
"Should Langevin dynamics be applied to hydrogen atoms?",
1229 opts.
optional(
"Langevin",
"langevinFile",
"PDB file with temperature " 1230 "coupling terms (B(i)) (default is the PDB input file)",
1232 opts.
optional(
"Langevin",
"langevinCol",
"Column in the langevinFile " 1233 "containing the temperature coupling term B(i);\n" 1237 opts.
optionalB(
"Langevin",
"langevinBAOAB",
1238 "Should Langevin dynamics be performed using BAOAB integration?",
1239 &langevin_useBAOAB,
FALSE);
1242 opts.
optionalB(
"main",
"LoweAndersen",
"Should Lowe-Andersen dynamics be performed?",
1243 &loweAndersenOn,
FALSE);
1244 opts.
require(
"LoweAndersen",
"loweAndersenTemp",
"Temperature for heat bath in Lowe-Andersen " 1245 "dynamics", &loweAndersenTemp);
1248 opts.
optional(
"LoweAndersen",
"loweAndersenRate",
"Collision rate (1/ps)",
1249 &loweAndersenRate, 50);
1251 opts.
optional(
"LoweAndersen",
"loweAndersenCutoff",
"Cutoff radius",
1252 &loweAndersenCutoff, 2.7);
1258 opts.
optionalB(
"main",
"alch",
"Is achemical simulation being performed?",
1260 opts.
require(
"alch",
"alchLambda",
"Alchemical coupling parameter value",
1264 opts.
optionalB(
"alch",
"singleTopology",
1265 "Is single topology used for relative free energy?", &singleTopology,
FALSE);
1268 "Is S-D bonded terms scaling for relative free energy?", &sdScaling,
FALSE);
1270 opts.
optional(
"alch",
"alchFile",
"PDB file with perturbation flags " 1272 opts.
optional(
"alch",
"alchCol",
"Column in the alchFile with the " 1275 opts.
optional(
"alch",
"unperturbedBondFile",
"mini psf file with unperturbed bond info" 1277 opts.
optional(
"alch",
"alchOutFreq",
"Frequency of alchemical energy" 1278 "output in timesteps", &alchOutFreq, 5);
1280 opts.
optional(
"alch",
"alchOutFile",
"Alchemical energy output filename",
1284 opts.
optional(
"alch",
"alchVdwShiftCoeff",
"Coeff used for generating" 1285 "the altered alchemical vDW interactions", &alchVdwShiftCoeff, 5.);
1288 opts.
optionalB(
"alch",
"alchWCA",
"Is WCA decomposition being performed?",
1292 opts.
optional(
"alch",
"alchElecLambdaStart",
"Lambda at which electrostatic" 1293 "scaling of exnihilated particles begins", &alchElecLambdaStart, 0.5);
1296 opts.
optional(
"alch",
"alchVdwLambdaEnd",
"Lambda at which vdW" 1297 "scaling of exnihilated particles ends", &alchVdwLambdaEnd, 1.0);
1300 opts.
optional(
"alch",
"alchRepLambdaEnd",
"Lambda at which repulsive vdW" 1301 "scaling of exnihilated particles ends and attractive vdW scaling" 1302 "begins", &alchRepLambdaEnd, 0.5);
1305 opts.
optional(
"alch",
"alchBondLambdaEnd",
"Lambda at which bonded" 1306 "scaling of exnihilated particles begins", &alchBondLambdaEnd, 0.0);
1309 opts.
optionalB(
"alch",
"alchDecouple",
"Enable alchemical decoupling?",
1310 &alchDecouple,
FALSE);
1311 opts.
optionalB(
"alch",
"alchBondDecouple",
"Enable decoupling of purely " 1312 "alchemical bonds?", &alchBondDecouple,
FALSE);
1315 opts.
optional(
"alch",
"alchType",
"Which alchemical method to use?",
1317 opts.
optional(
"alch",
"alchLambda2",
"Alchemical coupling comparison value",
1319 opts.
optional(
"alch",
"alchLambdaIDWS",
"Alchemical coupling comparison value for interleaved double-wide sampling",
1320 &alchLambdaIDWS, -1);
1321 opts.
optional(
"alch",
"alchLambdaFreq",
1322 "Frequency of increasing coupling parameter value", &alchLambdaFreq, 0);
1324 opts.
optional(
"alch",
"alchSwitchType",
"Switching type flag",
1326 opts.
optional(
"alch",
"alchEquilSteps",
"Equilibration steps, before " 1327 "data collection in the alchemical window", &alchEquilSteps, 0);
1330 opts.
optionalB(
"alch",
"alchEnsembleAvg",
"Ensemble Average in use?",
1331 &alchEnsembleAvg,
TRUE);
1334 opts.
optionalB(
"main",
"les",
"Is locally enhanced sampling enabled?",
1336 opts.
require(
"les",
"lesFactor",
"Local enhancement factor", &lesFactor);
1337 opts.
optional(
"les",
"lesFile",
"PDB file with enhancement flags " 1339 opts.
optional(
"les",
"lesCol",
"Column in the lesFile with the " 1341 opts.
optionalB(
"les",
"lesReduceTemp",
"Reduce enhanced atom temperature?",
1342 &lesReduceTemp,
FALSE);
1343 opts.
optionalB(
"les",
"lesReduceMass",
"Reduce enhanced atom mass?",
1344 &lesReduceMass,
FALSE);
1348 "Is replica exchange solute tempering enabled?",
1349 &soluteScalingOn,
FALSE);
1350 opts.
optional(
"soluteScaling",
"soluteScalingFactor",
1351 "Solute scaling factor",
1352 &soluteScalingFactor, 1.0);
1354 opts.
optional(
"soluteScaling",
"soluteScalingFactorCharge",
1355 "Solute scaling factor for electrostatic interactions",
1356 &soluteScalingFactorCharge);
1358 opts.
optional(
"soluteScaling",
"soluteScalingFactorVdw",
1359 "Solute scaling factor for van der Waals interactions",
1360 &soluteScalingFactorVdw);
1362 opts.
optional(
"soluteScaling",
"soluteScalingFile",
1363 "PDB file with scaling flags; if undefined, defaults to main PDB file",
1365 opts.
optional(
"soluteScaling",
"soluteScalingCol",
1366 "Column in the soluteScalingFile providing the scaling flag",
1368 opts.
optionalB(
"main",
"soluteScalingAll",
1369 "Apply scaling also to bond and angle interactions?",
1370 &soluteScalingAll,
FALSE);
1373 opts.
optionalB(
"main",
"drude",
"Perform integration of Drude oscillators?",
1375 opts.
require(
"drude",
"drudeTemp",
"Temperature for freezing " 1376 "Drude oscillators", &drudeTemp);
1379 opts.
optional(
"drude",
"drudeDamping",
"Damping coefficient (1/ps) for " 1380 "Drude oscillators", &drudeDamping);
1382 opts.
optional(
"drude",
"drudeNbtholeCut",
"Nonbonded Thole interactions " 1383 "interaction radius", &drudeNbtholeCut, 5.0);
1385 opts.
optionalB(
"drude",
"drudeHardWall",
"Apply maximum Drude bond length " 1386 "restriction?", &drudeHardWallOn,
TRUE);
1387 opts.
optional(
"drude",
"drudeBondLen",
"Drude oscillator bond length " 1388 "beyond which to apply restraint", &drudeBondLen, 0.25);
1390 opts.
optional(
"drude",
"drudeBondConst",
"Drude oscillator restraining " 1391 "force constant", &drudeBondConst, 40000.0);
1395 opts.
optionalB(
"main",
"pairInteraction",
1396 "Are pair interactions calculated?", &pairInteractionOn,
FALSE);
1397 opts.
optional(
"pairInteraction",
"pairInteractionFile",
1398 "PDB files with interaction flags " "default is the input PDB file",
1400 opts.
optional(
"pairInteraction",
"pairInteractionCol",
1401 "Column in the pairInteractionFile with the interaction flags",
1403 opts.
require(
"pairInteraction",
"pairInteractionGroup1",
1404 "Flag for interaction group 1", &pairInteractionGroup1);
1405 opts.
optional(
"pairInteraction",
"pairInteractionGroup2",
1406 "Flag for interaction group 2", &pairInteractionGroup2, -1);
1407 opts.
optionalB(
"pairInteraction",
"pairInteractionSelf",
1408 "Compute only within-group interactions?", &pairInteractionSelf,
1411 opts.
optionalB(
"main",
"cosAngles",
"Are some angles cosine-based?", &cosAngles,
FALSE);
1415 opts.
optionalB(
"main",
"globalTest",
"Should global integration (for development) be used?",
1417 opts.
optionalB(
"main",
"dihedral",
"Should dihedral angle dynamics be performed?",
1418 &dihedralOn,
FALSE);
1420 opts.
optionalB(
"dihedral",
"COLD",
"Should overdamped Langevin dynamics be performed?",
1422 opts.
require(
"COLD",
"COLDTemp",
"Temperature for heat bath in COLD",
1426 opts.
require(
"COLD",
"COLDRate",
"Damping rate for COLD",
1432 "Should temperature coupling be performed?",
1434 opts.
require(
"tcouple",
"tCoupleTemp",
1435 "Temperature for temperature coupling", &tCoupleTemp);
1438 opts.
optional(
"tCouple",
"tCoupleFile",
"PDB file with temperature " 1439 "coupling terms (B(i)) (default is the PDB input file)",
1441 opts.
optional(
"tCouple",
"tCoupleCol",
"Column in the tCoupleFile " 1442 "containing the temperature coupling term B(i);\n" 1446 "Should stochastic velocity rescaling be performed?",
1447 &stochRescaleOn,
FALSE);
1448 opts.
require(
"stochRescale",
"stochRescaleTemp",
1449 "Temperature for stochastic velocity rescaling",
1453 opts.
require(
"stochRescale",
"stochRescalePeriod",
1454 "Time scale for stochastic velocity rescaling (ps)",
1455 &stochRescalePeriod);
1457 opts.
optional(
"stochRescale",
"stochRescaleFreq",
1458 "Number of steps between stochastic rescalings",
1461 opts.
optionalB(
"stochRescale",
"stochRescaleHeat",
1462 "Should heat transfer and work be computed?", &stochRescaleHeat,
FALSE);
1464 opts.
optional(
"main",
"rescaleFreq",
"Number of steps between " 1465 "velocity rescaling", &rescaleFreq);
1467 opts.
optional(
"main",
"rescaleTemp",
"Target temperature for velocity rescaling",
1472 opts.
optional(
"main",
"reassignFreq",
"Number of steps between " 1473 "velocity reassignment", &reassignFreq);
1475 opts.
optional(
"main",
"reassignTemp",
"Target temperature for velocity reassignment",
1479 opts.
optional(
"main",
"reassignIncr",
"Temperature increment for velocity reassignment",
1482 opts.
optional(
"main",
"reassignHold",
"Final holding temperature for velocity reassignment",
1488 opts.
optionalB(
"main",
"useGroupPressure",
1489 "Use group rather than atomic quantities for pressure control?",
1490 &useGroupPressure,
FALSE);
1493 opts.
optionalB(
"main",
"useFlexibleCell",
1494 "Use anisotropic cell fluctuation for pressure control?",
1495 &useFlexibleCell,
FALSE);
1499 "Fix some cell dimensions?",
1500 &fixCellDims,
FALSE);
1502 opts.
optionalB(
"fixCellDims",
"fixCellDimX",
1503 "Fix the X dimension?",
1504 &fixCellDimX,
FALSE);
1505 opts.
optionalB(
"fixCellDims",
"fixCellDimY",
1506 "Fix the Y dimension?",
1507 &fixCellDimY,
FALSE);
1508 opts.
optionalB(
"fixCellDims",
"fixCellDimZ",
1509 "Fix the Z dimension?",
1510 &fixCellDimZ,
FALSE);
1513 opts.
optionalB(
"main",
"useConstantRatio",
1514 "Use constant X-Y ratio for pressure control?",
1515 &useConstantRatio,
FALSE);
1518 opts.
optionalB(
"main",
"useConstantArea",
1519 "Use constant area for pressure control?",
1520 &useConstantArea,
FALSE);
1523 opts.
optionalB(
"main",
"excludeFromPressure",
1524 "Should some atoms be excluded from pressure rescaling?",
1525 &excludeFromPressure,
FALSE);
1526 opts.
optional(
"excludeFromPressure",
"excludeFromPressureFile",
1527 "PDB file for atoms to be excluded from pressure",
1529 opts.
optional(
"excludeFromPressure",
"excludeFromPressureCol",
1530 "Column in the excludeFromPressureFile" 1531 "containing the flags (nonzero means excluded);\n" 1535 opts.
optionalB(
"main",
"MonteCarloPressure",
1536 "Should Monte Carlo pressure control be used?",
1537 &monteCarloPressureOn,
FALSE);
1538 opts.
require(
"MonteCarloPressure",
"MonteCarloPressureTarget",
1539 "Target pressure for Monte Carlo pressure control",
1540 &monteCarloPressureTarget);
1541 opts.
require(
"MonteCarloPressure",
"MonteCarloTemp",
1542 "Temperature for Monte Carlo pressure control",
1546 opts.
optional(
"MonteCarloPressure",
"MonteCarloAcceptanceRate",
1547 "Acceptance rate for Monte Carlo pressure control",
1548 &monteCarloAcceptanceRate);
1550 opts.
optional(
"MonteCarloPressure",
"MonteCarloMaxVolume",
1551 "Maximum Volume change vector for Monte Carlo pressure control",
1552 &monteCarloMaxVolume);
1553 opts.
optional(
"MonteCarloPressure",
"MonteCarloAdjustmentFreq",
1554 "Number of steps between volume rescaling",
1555 &monteCarloAdjustmentFreq, 30);
1557 opts.
optional(
"MonteCarloPressure",
"MonteCarloPressureFreq",
1558 "Number of steps between volume rescaling",
1559 &monteCarloPressureFreq, 50);
1563 opts.
optionalB(
"main",
"BerendsenPressure",
1564 "Should Berendsen pressure bath coupling be performed?",
1565 &berendsenPressureOn,
FALSE);
1566 opts.
require(
"BerendsenPressure",
"BerendsenPressureTarget",
1567 "Target pressure for pressure coupling",
1568 &berendsenPressureTarget);
1570 opts.
require(
"BerendsenPressure",
"BerendsenPressureCompressibility",
1571 "Isothermal compressibility for pressure coupling",
1572 &berendsenPressureCompressibility);
1574 opts.
require(
"BerendsenPressure",
"BerendsenPressureRelaxationTime",
1575 "Relaxation time for pressure coupling",
1576 &berendsenPressureRelaxationTime);
1578 opts.
units(
"BerendsenPressureRelaxationTime",
N_FSEC);
1579 opts.
optional(
"BerendsenPressure",
"BerendsenPressureFreq",
1580 "Number of steps between volume rescaling",
1581 &berendsenPressureFreq, 1);
1585 opts.
optionalB(
"main",
"LangevinPiston",
1586 "Should Langevin piston pressure control be used?",
1587 &langevinPistonOn,
FALSE);
1588 opts.
optionalB(
"LangevinPiston",
"LangevinPistonBarrier",
1589 "Should Langevin piston barrier be used?",
1590 &langevinPistonBarrier,
TRUE);
1591 opts.
require(
"LangevinPiston",
"LangevinPistonTarget",
1592 "Target pressure for pressure control",
1593 &langevinPistonTarget);
1594 opts.
require(
"LangevinPiston",
"LangevinPistonPeriod",
1595 "Oscillation period for pressure control",
1596 &langevinPistonPeriod);
1599 opts.
require(
"LangevinPiston",
"LangevinPistonDecay",
1600 "Decay time for pressure control",
1601 &langevinPistonDecay);
1604 opts.
require(
"LangevinPiston",
"LangevinPistonTemp",
1605 "Temperature for pressure control piston",
1606 &langevinPistonTemp);
1609 opts.
optional(
"LangevinPiston",
"StrainRate",
1610 "Initial strain rate for pressure control (x y z)",
1615 "Should multigrator temperature and/or pressure control be used?",
1616 &multigratorOn,
FALSE);
1617 opts.
require(
"Multigrator",
"MultigratorPressureTarget",
1618 "Target pressure for pressure coupling",
1619 &multigratorPressureTarget);
1620 opts.
require(
"Multigrator",
"MultigratorTemperatureTarget",
1621 "Target temperature for temperature coupling",
1622 &multigratorTemperatureTarget);
1623 opts.
require(
"Multigrator",
"MultigratorPressureFreq",
1624 "Number of steps between pressure control moves",
1625 &multigratorPressureFreq);
1627 opts.
optional(
"Multigrator",
"MultigratorPressureRelaxationTime",
1628 "Relaxation time for pressure coupling is fs",
1629 &multigratorPressureRelaxationTime, 30000);
1631 opts.
units(
"MultigratorPressureRelaxationTime",
N_FSEC);
1632 opts.
optional(
"Multigrator",
"MultigratorTemperatureRelaxationTime",
1633 "Relaxation time for temperature coupling is fs",
1634 &multigratorTemperatureRelaxationTime, 1000);
1635 opts.
range(
"MultigratorTemperatureRelaxationTime",
POSITIVE);
1636 opts.
units(
"MultigratorTemperatureRelaxationTime",
N_FSEC);
1637 opts.
require(
"Multigrator",
"MultigratorTemperatureFreq",
1638 "Number of steps between temperature control moves",
1639 &multigratorTemperatureFreq);
1641 opts.
optional(
"Multigrator",
"MultigratorNoseHooverChainLength",
1642 "Nose-Hoover chain length",
1643 &multigratorNoseHooverChainLength, 4);
1647 opts.
optional(
"main",
"SurfaceTensionTarget",
1648 "Surface tension in the x-y plane",
1649 &surfaceTensionTarget, 0);
1652 opts.
optionalB(
"main",
"pressureprofile",
"Compute pressure profile?",
1653 &pressureProfileOn,
FALSE);
1654 opts.
require(
"pressureprofile",
"pressureprofileslabs",
1655 "Number of pressure profile slabs", &pressureProfileSlabs, 10);
1656 opts.
optional(
"pressureprofile",
"pressureprofilefreq",
1657 "How often to store profile data", &pressureProfileFreq, 1);
1658 opts.
optional(
"pressureprofile",
"pressureProfileAtomTypes",
1659 "Number of pressure profile atom types", &pressureProfileAtomTypes, 1);
1661 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesFile",
1662 "PDB files with pressure profile atom types" "default is the input PDB file",
1664 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesCol",
1665 "Column in the pressureProfileAtomTypesFile with the atom types ",
1667 opts.
optionalB(
"pressureProfile",
"pressureProfileEwald",
1668 "Compute Ewald contribution to pressure profile",
1669 &pressureProfileEwaldOn,
FALSE);
1670 opts.
optional(
"pressureProfile",
"pressureProfileEwaldX",
1671 "Ewald grid size X", &pressureProfileEwaldX, 10);
1673 opts.
optional(
"pressureProfile",
"pressureProfileEwaldY",
1674 "Ewald grid size Y", &pressureProfileEwaldY, 10);
1676 opts.
optional(
"pressureProfile",
"pressureProfileEwaldZ",
1677 "Ewald grid size Z", &pressureProfileEwaldZ, 10);
1681 opts.
optionalB(
"main",
"accelMD",
"Perform acclerated MD?", &accelMDOn,
FALSE);
1682 opts.
optional(
"accelMD",
"accelMDFirstStep",
"First accelMD step", &accelMDFirstStep, 0);
1684 opts.
optional(
"accelMD",
"accelMDLastStep",
"Last accelMD step", &accelMDLastStep, 0);
1686 opts.
optional(
"accelMD",
"accelMDOutFreq",
"Frequency of accelMD output", &accelMDOutFreq, 1);
1688 opts.
optionalB(
"accelMD",
"accelMDdihe",
"Apply boost to dihedral potential", &accelMDdihe,
TRUE);
1689 opts.
optionalB(
"accelMD",
"accelMDDebugOn",
"Debugging accelMD", &accelMDDebugOn,
FALSE);
1690 opts.
optional(
"accelMD",
"accelMDE",
"E for AMD", &accelMDE);
1692 opts.
optional(
"accelMD",
"accelMDalpha",
"alpha for AMD", &accelMDalpha);
1695 opts.
optionalB(
"accelMD",
"accelMDdual",
"Apply dual boost", &accelMDdual,
FALSE);
1696 opts.
optional(
"accelMDdual",
"accelMDTE",
"E for total potential under accelMDdual mode", &accelMDTE);
1698 opts.
optional(
"accelMDdual",
"accelMDTalpha",
"alpha for total potential under accelMDdual mode", &accelMDTalpha);
1702 opts.
optionalB(
"accelMD",
"accelMDG",
"Perform Gaussian accelMD calculation?", &accelMDG,
FALSE);
1703 opts.
optional(
"accelMDG",
"accelMDGiE",
"Flag to set the mode iE in Gaussian accelMD", &accelMDGiE, 1);
1704 opts.
optional(
"accelMDG",
"accelMDGcMDSteps",
"Number of cMD steps", &accelMDGcMDSteps, 1000000);
1706 opts.
optional(
"accelMDG",
"accelMDGEquiSteps",
"Number of equilibration steps after adding boost potential", &accelMDGEquiSteps, 1000000);
1708 opts.
require(
"accelMDG",
"accelMDGcMDPrepSteps",
"Number of preparation cMD steps", &accelMDGcMDPrepSteps, 200000);
1710 opts.
require(
"accelMDG",
"accelMDGEquiPrepSteps",
"Number of preparation equilibration steps", &accelMDGEquiPrepSteps, 200000);
1712 opts.
optional(
"accelMDG",
"accelMDGStatWindow",
"Number of steps to calculate avg and std", &accelMDGStatWindow, -1);
1713 opts.
optional(
"accelMDG",
"accelMDGSigma0P",
"Upper limit of std of total potential", &accelMDGSigma0P, 6.0);
1716 opts.
optional(
"accelMDG",
"accelMDGSigma0D",
"Upper limit of std of dihedral potential", &accelMDGSigma0D, 6.0);
1719 opts.
optionalB(
"accelMDG",
"accelMDGRestart",
"Flag to set use restart file in Gaussian accelMD", &accelMDGRestart,
FALSE);
1720 opts.
require(
"accelMDGRestart",
"accelMDGRestartFile",
"Restart file name for Gaussian accelMD", accelMDGRestartFile);
1721 opts.
optionalB(
"accelMDG",
"accelMDGresetVaftercmd",
"Flag to reset potential after accelMDGcMDSteps steps",
1722 &accelMDGresetVaftercmd,
FALSE);
1725 opts.
optionalB(
"main",
"adaptTempMD",
"Perform adaptive temperature sampling", &adaptTempOn,
FALSE);
1726 opts.
optional(
"adaptTempMD",
"adaptTempFirstStep",
"First adaptTemp step", &adaptTempFirstStep, 0);
1728 opts.
optional(
"adaptTempMD",
"adaptTempLastStep",
"Last adaptTemp step", &adaptTempLastStep, 0);
1730 opts.
optional(
"adaptTempMD",
"adaptTempOutFreq",
"Frequency of adaptTemp output", &adaptTempOutFreq, 10);
1732 opts.
optional(
"adaptTempMD",
"adaptTempFreq",
"Frequency of writing average energies to adaptTempOutFile", &adaptTempFreq, 10);
1734 opts.
optionalB(
"adaptTempMD",
"adaptTempDebug",
"Print debug output for adaptTemp", &adaptTempDebug,
FALSE);
1735 opts.
optional(
"adaptTempMD",
"adaptTempTmin",
"Minimun temperature for adaptTemp", &adaptTempTmin);
1738 opts.
optional(
"adaptTempMD",
"adaptTempTmax",
"Maximum temperature for adaptTemp", &adaptTempTmax);
1741 opts.
optional(
"adaptTempMD",
"adaptTempBins",
"Number of bins to store average energies", &adaptTempBins,0);
1743 opts.
optional(
"adaptTempMD",
"adaptTempDt",
"Integration timestep for Temp. updates", &adaptTempDt, 0.0001);
1746 opts.
optional(
"adaptTempMD",
"adaptTempAutoDt",
"Average temperature update in percent of temperature range", &adaptTempAutoDt, 0.0);
1748 opts.
optional(
"adaptTempMD",
"adaptTempCgamma",
"Adaptive bin averaging constant", &adaptTempCgamma, 0.1);
1750 opts.
optionalB(
"adaptTempMD",
"adaptTempLangevin",
"Send adaptTemp temperature to langevin thermostat",&adaptTempLangevin,
TRUE);
1751 opts.
optionalB(
"adaptTempMD",
"adaptTempRescaling",
"Send adaptTemp temperature to velocity rescaling thermostat", &adaptTempRescale,
TRUE);
1752 opts.
optional(
"adaptTempMD",
"adaptTempInFile",
"File containing restart information for adaptTemp", adaptTempInFile);
1753 opts.
optional(
"adaptTempMD",
"adaptTempRestartFile",
"File for writing adaptTemp restart information", adaptTempRestartFile);
1754 opts.
require(
"adaptTempRestartFile",
"adaptTempRestartFreq",
"Frequency of writing restart file", &adaptTempRestartFreq,0);
1756 opts.
optionalB(
"adaptTempMD",
"adaptTempRandom",
"Randomly assign a temperature if we step out of range", &adaptTempRandom,
FALSE);
1759 void SimParameters::config_parser_constraints(
ParseOptions &opts) {
1762 opts.
optionalB(
"main",
"fixedatoms",
"Are there fixed atoms?",
1763 &fixedAtomsOn,
FALSE);
1764 opts.
optionalB(
"fixedatoms",
"fixedAtomsForces",
1765 "Calculate forces between fixed atoms? (Required to unfix during run.)",
1766 &fixedAtomsForces,
FALSE);
1767 opts.
optional(
"fixedatoms",
"fixedAtomsFile",
"PDB file with flags for " 1768 "fixed atoms (default is the PDB input file)",
1770 opts.
optional(
"fixedatoms",
"fixedAtomsCol",
"Column in the fixedAtomsFile " 1771 "containing the flags (nonzero means fixed);\n" 1773 opts.
optional(
"fixedatoms",
"fixedAtomListFile",
"the text input file for fixed atoms " 1775 opts.
optionalB(
"fixedatoms",
"fixedAtomsForceOutput",
1776 "Do we write out forces acting on fixed atoms?",
1777 &fixedAtomsForceOutput,
FALSE);
1780 opts.
optionalB(
"main",
"constraints",
"Are harmonic constraints active?",
1781 &constraintsOn,
FALSE);
1782 opts.
require(
"constraints",
"consexp",
"Exponent for harmonic potential",
1785 #ifndef MEM_OPT_VERSION 1786 opts.
require(
"constraints",
"consref",
"PDB file containing reference " 1789 opts.
require(
"constraints",
"conskfile",
"PDB file containing force " 1791 opts.
require(
"constraints",
"conskcol",
"Column of conskfile to use " 1794 opts.
require(
"constraints",
"consAtomListFile",
"the text input file for constrained atoms " 1797 opts.
require(
"constraints",
"constraintScaling",
"constraint scaling factor",
1798 &constraintScaling, 1.0);
1806 opts.
optionalB(
"constraints",
"selectConstraints",
1807 "Restrain only selected Cartesian components of the coordinates?",
1808 &selectConstraintsOn,
FALSE);
1809 opts.
optionalB(
"selectConstraints",
"selectConstrX",
1810 "Restrain X components of coordinates ", &constrXOn,
FALSE);
1811 opts.
optionalB(
"selectConstraints",
"selectConstrY",
1812 "Restrain Y components of coordinates ", &constrYOn,
FALSE);
1813 opts.
optionalB(
"selectConstraints",
"selectConstrZ",
1814 "Restrain Z components of coordinates ", &constrZOn,
FALSE);
1818 opts.
optionalB(
"constraints",
"sphericalConstraints",
1819 "Restrain only radial spherical component of the coordinates?",
1820 &sphericalConstraintsOn,
FALSE);
1821 opts.
optional(
"sphericalConstraints",
"sphericalConstrCenter",
1822 "Center of spherical constraints", &sphericalConstrCenter);
1827 opts.
optionalB(
"constraints",
"movingConstraints",
1828 "Are some of the constraints moving?",
1829 &movingConstraintsOn,
FALSE);
1830 opts.
require(
"movingConstraints",
"movingConsVel",
1831 "Velocity of the movement, A/timestep", &movingConsVel);
1835 opts.
optionalB(
"constraints",
"rotConstraints",
1836 "Are the constraints rotating?",
1837 &rotConstraintsOn,
FALSE);
1838 opts.
require(
"rotConstraints",
"rotConsAxis",
1839 "Axis of rotation", &rotConsAxis);
1840 opts.
require(
"rotConstraints",
"rotConsPivot",
1841 "Pivot point of rotation",
1843 opts.
require(
"rotConstraints",
"rotConsVel",
1844 "Velocity of rotation, deg/timestep", &rotConsVel);
1849 opts.
optionalB(
"main",
"extForces",
"External command forces?",
1850 &extForcesOn,
FALSE);
1851 opts.
require(
"extForces",
"extForcesCommand",
1852 "External forces command", extForcesCommand);
1853 opts.
require(
"extForces",
"extCoordFilename",
1854 "External forces coordinate filename", extCoordFilename);
1855 opts.
require(
"extForces",
"extForceFilename",
1856 "External forces force filename", extForceFilename);
1860 opts.
optionalB(
"main",
"QMForces",
"Apply QM forces?",
1861 &qmForcesOn,
FALSE);
1862 opts.
require(
"QMForces",
"QMSoftware",
1863 "software whose format will be used for input/output", qmSoftware);
1864 opts.
require(
"QMForces",
"QMExecPath",
1865 "path to executable", qmExecPath);
1866 opts.
optional(
"QMForces",
"QMChargeMode",
1867 "type of QM atom charges gathered from the QM software", qmChrgModeS);
1868 opts.
require(
"QMForces",
"QMColumn",
1869 "column defining QM and MM regions", qmColumn);
1870 opts.
require(
"QMForces",
"QMBaseDir",
1871 "base path and name for QM input and output (preferably in memory)", qmBaseDir);
1872 opts.
optional(
"QMForces",
"QMConfigLine",
1873 "Configuration line for QM (multiple inputs allowed)",
PARSE_MULTIPLES);
1874 opts.
optional(
"QMForces",
"QMParamPDB",
1875 "PDB with QM parameters", qmParamPDB);
1876 opts.
optional(
"QMForces",
"QMPrepProc",
1877 "initial preparation executable", qmPrepProc);
1878 opts.
optional(
"QMForces",
"QMSecProc",
1879 "secondary executable", qmSecProc);
1880 opts.
optional(
"QMForces",
"QMCharge",
1882 opts.
optionalB(
"QMForces",
"QMChargeFromPSF",
1883 "gets charge of the QM group form PSF values", &qmChrgFromPSF,
FALSE);
1884 opts.
optional(
"QMForces",
"QMMult",
1886 opts.
optional(
"QMForces",
"QMLinkElement",
1888 opts.
optionalB(
"QMForces",
"QMReplaceAll",
1889 "replace all NAMD forces with QM forces", &qmReplaceAll,
FALSE);
1890 opts.
optional(
"QMForces",
"QMPCStride",
1891 "frequency of selection of point charges", &qmPCSelFreq, 1);
1893 opts.
optionalB(
"QMForces",
"QMNoPntChrg",
1894 "no point charges will be passed to the QM system(s)", &qmNoPC,
FALSE);
1895 opts.
optionalB(
"QMForces",
"QMElecEmbed",
1896 "activates electrostatic embedding", &qmElecEmbed,
TRUE);
1897 opts.
optionalB(
"QMForces",
"QMVdWParams",
1898 "use special VdW parameters for QM atoms", &qmVDW,
FALSE);
1899 opts.
optionalB(
"QMForces",
"QMBondGuess",
1900 "Guess QM-MM bonds from topology and QM atom definitions", &qmBondGuess,
FALSE);
1901 opts.
optional(
"QMForces",
"QMBondColumn",
1902 "column defining QM-MM bonds", qmBondColumn);
1903 opts.
optionalB(
"QMForces",
"QMBondDist",
1904 "values in QMBondColumn defines the distance of new link atom", &qmBondDist,
FALSE);
1905 opts.
optional(
"QMForces",
"QMBondValueType",
1906 "type of value in bond column: len or ratio", qmBondValueTypeS);
1907 opts.
optional(
"QMForces",
"QMBondScheme",
1908 "type of treatment given to QM-MM bonds.", qmBondSchemeS);
1909 opts.
optional(
"QMForces",
"QMenergyStride",
1910 "frequency of QM specific energy output (every x steps)", &qmEnergyOutFreq, 1);
1911 opts.
optional(
"QMForces",
"QMOutStride",
1912 "frequency of QM specific charge output (every x steps)", &qmOutFreq, 0);
1914 opts.
optional(
"QMForces",
"QMPositionOutStride",
1915 "frequency of QM specific position output (every x steps)", &qmPosOutFreq, 0);
1917 opts.
optional(
"QMForces",
"QMSimsPerNode",
1918 "QM executions per node", &qmSimsPerNode, 1);
1920 opts.
optionalB(
"QMForces",
"QMSwitching",
1921 "apply switching to point charges.", &qmPCSwitchOn,
FALSE);
1922 opts.
optional(
"QMForces",
"QMSwitchingType",
1923 "How are charges scaled down to be presented to QM groups.", qmPCSwitchTypeS);
1924 opts.
optional(
"QMForces",
"QMPointChargeScheme",
1925 "type of treatment given to the total sum of point charges.", qmPCSchemeS);
1926 opts.
optionalB(
"QMForces",
"QMCustomPCSelection",
1927 "custom and fixed selection of point charges per QM group.", &qmCustomPCSel,
FALSE);
1928 opts.
optional(
"QMForces",
"QMCustomPCFile",
1929 "file with a selection of point charges for a single QM group",
PARSE_MULTIPLES);
1930 opts.
optionalB(
"QMForces",
"QMLiveSolventSel",
1931 "Continuously update the selection of solvent molecules in QM groups", &qmLSSOn,
FALSE);
1932 opts.
optional(
"QMForces",
"QMLSSFreq",
1933 "frequency of QM water selection update", &qmLSSFreq, 100);
1935 opts.
optional(
"QMForces",
"QMLSSResname",
1936 "residue name for the solvent molecules (TIP3).", qmLSSResname);
1937 opts.
optional(
"QMForces",
"QMLSSMode",
1938 "mode of selection of point solvent molecules", qmLSSModeS);
1939 opts.
optional(
"QMForces",
"QMLSSRef",
1940 "for COM mode, defines reference for COM distance calculation",
PARSE_MULTIPLES);
1942 "Do we use Conditional SMD option?", &qmCSMD,
FALSE);
1943 opts.
optional(
"QMForces",
"QMCSMDFile",
1944 "File for Conditional SMD information",qmCSMDFile);
1947 opts.
optionalB(
"main",
"printBadContacts",
"Print atoms with huge forces?",
1948 &printBadContacts,
FALSE);
1952 opts.
optionalB(
"main",
"GBIS",
"Use GB implicit solvent?",
1954 opts.
optionalB(
"main",
"GBISSer",
"Use GB implicit solvent?",
1957 opts.
optional(
"GBIS",
"solventDielectric",
1958 "Solvent Dielectric", &solvent_dielectric, 78.5);
1959 opts.
optional(
"GBIS",
"intrinsicRadiusOffset",
1960 "Coulomb Radius Offset", &coulomb_radius_offset, 0.09);
1961 opts.
optional(
"GBIS",
"ionConcentration",
1962 "Ion Concentration", &ion_concentration, 0.2);
1964 "delta from GBOBC", &gbis_delta, 1.0);
1966 "beta from GBOBC", &gbis_beta, 0.8);
1968 "gamma from GBOBC", &gbis_gamma, 4.85);
1969 opts.
optional(
"GBIS",
"alphaCutoff",
1970 "cutoff for calculating effective born radius", &alpha_cutoff, 15);
1972 "maximum allowable born radius", &alpha_max, 30);
1974 "maximum screened intrinsic radius", &fsMax, 1.728);
1976 opts.
optionalB(
"main",
"SASA",
"Use Linear Combination of Pairwise Overlaps (LCPO) for calculating SASA",
1978 opts.
optional(
"SASA",
"surfaceTension",
1979 "Surfce Tension for SASA (kcal/mol/Ang^2)", &surface_tension, 0.005);
1985 "Do we use SMD option?",
1988 "Velocity of the movement, A/timestep", &SMDVel);
1991 "Direction of movement", &SMDDir);
1993 "Elastic constant for SMD", &SMDk);
1995 "Transverse elastic constant for SMD", &SMDk2, 0);
1998 opts.
require(
"SMD",
"SMDFile",
1999 "File for SMD information",
2001 opts.
optional(
"SMD",
"SMDOutputFreq",
2002 "Frequency of output",
2009 opts.
optionalB(
"main",
"tabulatedEnergies",
"Do we get energies from a table?", &tabulatedEnergies,
FALSE);
2011 opts.
require(
"tabulatedEnergies",
"tabulatedEnergiesFile",
"File containing energy table", tabulatedEnergiesFile);
2012 opts.
require(
"tabulatedEnergies",
"tableInterpType",
"Cubic or linear interpolation", tableInterpType);
2015 opts.
optionalB(
"main",
"TMD",
"Perform Targeted MD?", &TMDOn,
FALSE);
2016 opts.
optional(
"TMD",
"TMDk",
"Elastic constant for TMD", &TMDk, 0);
2018 opts.
require(
"TMD",
"TMDFile",
"File for TMD information", TMDFile);
2019 opts.
optionalB(
"TMD",
"TMDDiffRMSD",
"Restrain Difference between the RMSD from two structures", &TMDDiffRMSD,
FALSE);
2020 opts.
require(
"TMDDiffRMSD",
"TMDFile2",
"Second file for TMD information", TMDFile2);
2022 opts.
optional(
"TMD",
"TMDOutputFreq",
"Frequency of TMD output",
2025 opts.
require(
"TMD",
"TMDLastStep",
"Last TMD timestep", &TMDLastStep);
2027 opts.
optional(
"TMD",
"TMDFirstStep",
"First TMD step (default 0)", &TMDFirstStep, 0);
2028 opts.
optional(
"TMD",
"TMDInitialRMSD",
"Target RMSD at first TMD step (default -1 to use initial coordinates)", &TMDInitialRMSD);
2029 TMDInitialRMSD = -1;
2030 opts.
optional(
"TMD",
"TMDFinalRMSD",
"Target RMSD at last TMD step (default 0 )", &TMDFinalRMSD, 0);
2035 opts.
optionalB(
"main",
"symmetryRestraints",
"Enable symmetry restraints?", &symmetryOn,
FALSE);
2036 opts.
optional(
"symmetryRestraints",
"symmetryk",
"Elastic constant for symmetry restraints", &symmetryk, 0);
2038 opts.
optional(
"symmetryRestraints",
"symmetrykfile",
"PDB file specifying force contants on a per-atom basis",
PARSE_MULTIPLES);
2039 opts.
optionalB(
"symmetryRestraints",
"symmetryScaleForces",
"Scale applied forces over time?", &symmetryScaleForces,
FALSE);
2041 opts.
optional(
"symmetryRestraints",
"symmetryMatrixFile",
"File(s) for transfromation matrices",
PARSE_MULTIPLES);
2042 opts.
optional(
"symmetryRestraints",
"symmetryLastStep",
"Last symmetry timestep", &symmetryLastStep, -1);
2043 opts.
optional(
"symmetryRestraints",
"symmetryFirstStep",
"First symmetry step (default 0)", &symmetryFirstStep, 0);
2044 opts.
optional(
"symmetryRestraints",
"symmetryLastFullStep",
"Last full force symmetry timestep (default symmetryLastStep)", &symmetryLastFullStep, symmetryLastStep);
2045 opts.
optional(
"symmetryRestraints",
"symmetryFirstFullStep",
"First full force symmetry step (default symmetryFirstStep)", &symmetryFirstFullStep, symmetryFirstStep);
2049 opts.
optionalB(
"main",
"tclForces",
"Are Tcl global forces active?",
2050 &tclForcesOn,
FALSE);
2051 opts.
require(
"tclForces",
"tclForcesScript",
2055 opts.
optionalB(
"main",
"tclBC",
"Are Tcl boundary forces active?",
2057 opts.
require(
"tclBC",
"tclBCScript",
2058 "Tcl script defining calcforces for boundary forces",
PARSE_STRING);
2060 opts.
optional(
"tclBC",
"tclBCArgs",
"Extra args for calcforces command",
2065 opts.
optionalB(
"main",
"miscForces",
"Are misc global forces active?",
2066 &miscForcesOn,
FALSE);
2067 opts.
optional(
"miscForces",
"miscForcesScript",
2071 opts.
optionalB(
"main",
"freeEnergy",
"Perform free energy perturbation?",
2072 &freeEnergyOn,
FALSE);
2073 opts.
require(
"freeEnergy",
"freeEnergyConfig",
2077 opts.
optionalB(
"main",
"constantforce",
"Apply constant force?",
2078 &consForceOn,
FALSE);
2079 opts.
optional(
"constantforce",
"consForceFile",
2080 "Configuration file for constant forces",
PARSE_STRING);
2081 opts.
require(
"constantforce",
"consForceScaling",
2082 "Scaling factor for constant forces", &consForceScaling, 1.0);
2085 opts.
optionalB(
"main",
"colvars",
"Is the colvars module enabled?",
2087 opts.
optional(
"colvars",
"colvarsConfig",
2089 opts.
optional(
"colvars",
"colvarsInput",
2090 "input restart file for the collective variables",
PARSE_STRING);
2093 opts.
optional(
"main",
"globalMasterFrequency",
"Number of steps between globalMaster client calls", &globalMasterFrequency, 1);
2095 opts.
optionalB(
"main",
"globalMasterScaleByFrequency",
"Scale globalmaster forces by frequency?",
2096 &globalMasterScaleByFrequency,
FALSE);
2097 opts.
optionalB(
"main",
"globalMasterStaleForces",
"Use stale forces MTS for globalmaster forces by frequency?",
2098 &globalMasterStaleForces,
FALSE);
2103 #ifdef OPENATOM_VERSION 2104 void SimParameters::config_parser_openatom(
ParseOptions &opts) {
2105 opts.
optionalB(
"main",
"openatom",
"OpenAtom active?", &openatomOn,
FALSE);
2106 opts.
require(
"openatom",
"openatomDriverFile",
"What config file specifies openatom input parameters",
PARSE_STRING);
2107 opts.
require(
"openatom",
"openatomPhysicsFile",
"What structure file specifies openatom input system",
PARSE_STRING);
2108 opts.
require(
"openatom",
"openatomPdbFile",
"NAMD input file defining QM and MM regions",
PARSE_STRING);
2109 opts.
optional(
"openatom",
"openatomCol",
"Column in the openatomPdb with the QM/MM flag",
PARSE_STRING);
2111 #endif // OPENATOM_VERSION 2114 void SimParameters::config_parser_mgridforce(
ParseOptions &opts) {
2116 opts.
optionalB(
"main",
"mgridforce",
"Is Multiple gridforce active?",
2117 &mgridforceOn,
FALSE);
2118 opts.
optional(
"mgridforce",
"mgridforcevolts",
"Is Gridforce using Volts/eV as units?",
2120 opts.
require(
"mgridforce",
"mgridforcescale",
"Scale factor by which to multiply " 2122 opts.
require(
"mgridforce",
"mgridforcefile",
"PDB file containing force " 2124 opts.
require(
"mgridforce",
"mgridforcecol",
"Column of gridforcefile to " 2126 opts.
optional(
"mgridforce",
"mgridforcechargecol",
"Column of gridforcefile to " 2128 opts.
require(
"mgridforce",
"mgridforcepotfile",
"Gridforce potential file",
2130 opts.
optional(
"mgridforce",
"mgridforcecont1",
"Use continuous grid " 2132 opts.
optional(
"mgridforce",
"mgridforcecont2",
"Use continuous grid " 2134 opts.
optional(
"mgridforce",
"mgridforcecont3",
"Use continuous grid " 2136 opts.
optional(
"mgridforce",
"mgridforcevoff",
"Gridforce potential offsets",
2138 opts.
optional(
"mgridforce",
"mgridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
PARSE_MULTIPLES);
2141 void SimParameters::config_parser_gridforce(
ParseOptions &opts) {
2143 opts.
optionalB(
"main",
"gridforce",
"Is Gridforce active?",
2144 &gridforceOn,
FALSE);
2145 opts.
optionalB(
"gridforce",
"gridforcevolts",
"Is Gridforce using Volts/eV as units?",
2146 &gridforceVolts,
FALSE);
2147 opts.
require(
"gridforce",
"gridforcescale",
"Scale factor by which to multiply " 2148 "grid forces", &gridforceScale);
2149 opts.
require(
"gridforce",
"gridforcefile",
"PDB file containing force " 2151 opts.
require(
"gridforce",
"gridforcecol",
"Column of gridforcefile to " 2153 opts.
optional(
"gridforce",
"gridforcechargecol",
"Column of gridforcefile to " 2155 opts.
require(
"gridforce",
"gridforcepotfile",
"Gridforce potential file",
2157 opts.
optionalB(
"gridforce",
"gridforcecont1",
"Use continuous grid " 2158 "in A1 direction?", &gridforceContA1,
FALSE);
2159 opts.
optionalB(
"gridforce",
"gridforcecont2",
"Use continuous grid " 2160 "in A2 direction?", &gridforceContA2,
FALSE);
2161 opts.
optionalB(
"gridforce",
"gridforcecont3",
"Use continuous grid " 2162 "in A3 direction?", &gridforceContA3,
FALSE);
2163 opts.
optional(
"gridforce",
"gridforcevoff",
"Gridforce potential offsets",
2165 opts.
optionalB(
"gridforce",
"gridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
2166 &gridforcechecksize,
TRUE);
2169 void SimParameters::config_parser_dcd_selections(
ParseOptions &opts) {
2171 opts.
optionalB(
"main",
"DcdSelection",
"Selection list DCD trajectory output",
2172 &dcdSelectionOn,
FALSE);
2174 opts.
require(
"DcdSelection",
"DcdSelectionInputFile",
2177 opts.
require(
"DcdSelection",
"DCDSelectionFreq",
2178 "Frequency of selection list DCD trajectory output, in timesteps",
2180 opts.
optional(
"DcdSelection",
"DCDSelectionFile",
2181 "Selection list DCD trajectory output file name",
2185 void SimParameters::config_parser_group_restraints(
ParseOptions &opts) {
2186 opts.
optionalB(
"main",
"groupRestraints",
"Is Group restraints active?",
2187 &groupRestraintsOn,
FALSE);
2188 opts.
require(
"groupRestraints",
"groupResCenter",
"The center or equilibrium " 2190 opts.
require(
"groupRestraints",
"groupResK",
"Restraints force constant",
2192 opts.
optional(
"groupRestraints",
"groupResExp",
"Restraints exponent",
2194 opts.
optional(
"groupRestraints",
"groupResUseMagnitude",
"Should magnitude of " 2196 opts.
optional(
"groupRestraints",
"group1File",
"Text file containing atom indices " 2198 opts.
optional(
"groupRestraints",
"group1List",
"List of atom indices for group 1" 2200 opts.
optional(
"groupRestraints",
"group1RefPos",
"Reference COM position for group 1",
2202 opts.
optional(
"groupRestraints",
"group2File",
"Text file containing atom indices " 2204 opts.
optional(
"groupRestraints",
"group2List",
"List of atom indices for group 2",
2206 opts.
optional(
"groupRestraints",
"groupResX",
"Apply restraints in x direction",
2208 opts.
optional(
"groupRestraints",
"groupResY",
"Apply restraints in y direction",
2210 opts.
optional(
"groupRestraints",
"groupResZ",
"Apply restraints in z direction",
2214 void SimParameters::config_parser_movdrag(
ParseOptions &opts) {
2216 opts.
optionalB(
"main",
"movDragOn",
"Do we apply moving drag?",
2218 opts.
require(
"movDragOn",
"movDragFile",
2219 "Main moving drag PDB file", movDragFile);
2220 opts.
require(
"movDragOn",
"movDragCol",
2222 opts.
require(
"movDragOn",
"movDragGlobVel",
2223 "Global moving drag velocity (A/step)", &movDragGlobVel);
2224 opts.
require(
"movDragOn",
"movDragVelFile",
2225 "Moving drag linear velocity file", movDragVelFile);
2228 void SimParameters::config_parser_rotdrag(
ParseOptions &opts) {
2230 opts.
optionalB(
"main",
"rotDragOn",
"Do we apply rotating drag?",
2232 opts.
require(
"rotDragOn",
"rotDragFile",
2233 "Main rotating drag PDB file", rotDragFile);
2234 opts.
require(
"rotDragOn",
"rotDragCol",
2236 opts.
require(
"rotDragOn",
"rotDragAxisFile",
2237 "Rotating drag axis file", rotDragAxisFile);
2238 opts.
require(
"rotDragOn",
"rotDragPivotFile",
2239 "Rotating drag pivot point file", rotDragPivotFile);
2240 opts.
require(
"rotDragOn",
"rotDragGlobVel",
2241 "Global rotating drag angular velocity (deg/step)", &rotDragGlobVel);
2242 opts.
require(
"rotDragOn",
"rotDragVelFile",
2243 "Rotating drag angular velocity file", rotDragVelFile);
2244 opts.
require(
"rotDragOn",
"rotDragVelCol",
2245 "Rotating drag angular velocity column",
PARSE_STRING);
2248 void SimParameters::config_parser_constorque(
ParseOptions &opts) {
2250 opts.
optionalB(
"main",
"consTorqueOn",
"Do we apply \"constant\" torque?",
2251 &consTorqueOn,
FALSE);
2252 opts.
require(
"consTorqueOn",
"consTorqueFile",
2253 "Main \"constant\" torque PDB file", consTorqueFile);
2254 opts.
require(
"consTorqueOn",
"consTorqueCol",
2256 opts.
require(
"consTorqueOn",
"consTorqueAxisFile",
2257 "\"Constant\" torque axis file", consTorqueAxisFile);
2258 opts.
require(
"consTorqueOn",
"consTorquePivotFile",
2259 "\"Constant\" torque pivot point file", consTorquePivotFile);
2260 opts.
require(
"consTorqueOn",
"consTorqueGlobVal",
2261 "Global \"constant\" torque value (Kcal/(mol*A^2))", &consTorqueGlobVal);
2262 opts.
require(
"consTorqueOn",
"consTorqueValFile",
2263 "\"constant\" torque factors file", consTorqueValFile);
2264 opts.
require(
"consTorqueOn",
"consTorqueValCol",
2268 void SimParameters::config_parser_boundary(
ParseOptions &opts) {
2271 opts.
optionalB(
"main",
"sphericalBC",
"Are spherical boundary counditions " 2272 "active?", &sphericalBCOn,
FALSE);
2273 opts.
require(
"sphericalBC",
"sphericalBCCenter",
2274 "Center of spherical boundaries", &sphericalCenter);
2275 opts.
require(
"sphericalBC",
"sphericalBCr1",
"Radius for first sphere " 2276 "potential", &sphericalBCr1);
2279 opts.
require(
"sphericalBC",
"sphericalBCk1",
"Force constant for first " 2280 "sphere potential (+ is an inward force, - outward)",
2283 opts.
optional(
"sphericalBC",
"sphericalBCexp1",
"Exponent for first " 2284 "sphere potential", &sphericalBCexp1, 2);
2287 opts.
optional(
"sphericalBCr1",
"sphericalBCr2",
"Radius for second sphere " 2288 "potential", &sphericalBCr2);
2291 opts.
require(
"sphericalBCr2",
"sphericalBCk2",
"Force constant for second " 2292 "sphere potential (+ is an inward force, - outward)",
2295 opts.
optional(
"sphericalBCr2",
"sphericalBCexp2",
"Exponent for second " 2296 "sphere potential", &sphericalBCexp2, 2);
2300 opts.
optionalB(
"main",
"cylindricalBC",
"Are cylindrical boundary counditions " 2301 "active?", &cylindricalBCOn,
FALSE);
2302 opts.
require(
"cylindricalBC",
"cylindricalBCr1",
"Radius for first cylinder " 2303 "potential", &cylindricalBCr1);
2306 opts.
require(
"cylindricalBC",
"cylindricalBCk1",
"Force constant for first " 2307 "cylinder potential (+ is an inward force, - outward)",
2310 opts.
optional(
"cylindricalBC",
"cylindricalBCexp1",
"Exponent for first " 2311 "cylinder potential", &cylindricalBCexp1, 2);
2316 opts.
optional(
"cylindricalBC",
"cylindricalBCAxis",
"Cylinder axis (defaults to x)",
2318 opts.
require(
"cylindricalBC",
"cylindricalBCCenter",
2319 "Center of cylindrical boundaries", &cylindricalCenter);
2320 opts.
require (
"cylindricalBC",
"cylindricalBCl1",
"Length of first cylinder",
2324 opts.
optional (
"cylindricalBCl1",
"cylindricalBCl2",
"Length of second cylinder",
2330 opts.
optional(
"cylindricalBCr1",
"cylindricalBCr2",
"Radius for second cylinder " 2331 "potential", &cylindricalBCr2);
2334 opts.
require(
"cylindricalBCr2",
"cylindricalBCk2",
"Force constant for second " 2335 "cylinder potential (+ is an inward force, - outward)",
2338 opts.
optional(
"cylindricalBCr2",
"cylindricalBCexp2",
"Exponent for second " 2339 "cylinder potential", &cylindricalBCexp2, 2);
2343 opts.
optionalB(
"main",
"eFieldOn",
"Should an electric field be applied",
2345 opts.
optionalB(
"eFieldOn",
"eFieldNormalized",
"Is eField vector scaled by cell basis vectors?",
2346 &eFieldNormalized,
FALSE);
2347 opts.
require(
"eFieldOn",
"eField",
"Electric field vector", &eField);
2348 opts.
optional(
"eFieldOn",
"eFieldFreq",
"Electric field frequency", &eFieldFreq);
2349 opts.
optional(
"eFieldOn",
"eFieldPhase",
"Electric field phase", &eFieldPhase);
2352 opts.
optionalB(
"main",
"stirOn",
"Should stirring torque be applied",
2354 opts.
optional(
"stirOn",
"stirFilename",
"PDB file with flags for " 2355 "stirred atoms (default is the PDB input file)",
2357 opts.
optional(
"stirOn",
"stirredAtomsCol",
"Column in the stirredAtomsFile " 2358 "containing the flags (nonzero means fixed);\n" 2360 opts.
require(
"stirOn",
"stirStartingTheta",
"Stir starting theta offset", &stirStartingTheta);
2361 opts.
require(
"stirOn",
"stirK",
"Stir force harmonic spring constant", &stirK);
2363 opts.
require(
"stirOn",
"stirVel",
"Stir angular velocity (deg/timestep)", &stirVel);
2364 opts.
require(
"stirOn",
"stirAxis",
"Stir axis (direction vector)", &stirAxis);
2365 opts.
require(
"stirOn",
"stirPivot",
"Stir pivot point (coordinate)", &stirPivot);
2369 "Should extra bonded forces be applied",
2370 &extraBondsOn,
FALSE);
2371 opts.
optional(
"extraBonds",
"extraBondsFile",
2372 "file with list of extra bonds",
2374 opts.
optionalB(
"extraBonds",
"extraBondsCosAngles",
2375 "Should extra angles be cosine-based to match ancient bug",
2376 &extraBondsCosAngles,
TRUE);
2380 void SimParameters::config_parser_misc(
ParseOptions &opts) {
2383 opts.
optional(
"main",
"ldBalancer",
"Load balancer",
2385 opts.
optional(
"main",
"ldbStrategy",
"Load balancing strategy",
2387 opts.
optional(
"main",
"ldbPeriod",
"steps between load balancing",
2390 opts.
optional(
"main",
"firstLdbStep",
"when to start load balancing",
2393 opts.
optional(
"main",
"lastLdbStep",
"when to stop load balancing",
2396 opts.
optional(
"main",
"hybridGroupSize",
"Hybrid load balancing group size",
2398 opts.
optional(
"main",
"ldbBackgroundScaling",
2399 "background load scaling", &ldbBackgroundScaling);
2401 opts.
optional(
"main",
"ldbPMEBackgroundScaling",
2402 "PME node background load scaling", &ldbPMEBackgroundScaling);
2404 opts.
optional(
"main",
"ldbHomeBackgroundScaling",
2405 "home node background load scaling", &ldbHomeBackgroundScaling);
2407 opts.
optional(
"main",
"ldbRelativeGrainsize",
2408 "fraction of average load per compute", &ldbRelativeGrainsize, 0.);
2411 opts.
optional(
"main",
"traceStartStep",
"when to start tracing", &traceStartStep);
2413 opts.
optional(
"main",
"numTraceSteps",
"the number of timesteps to be traced", &numTraceSteps);
2416 #ifdef MEASURE_NAMD_WITH_PAPI 2417 opts.
optionalB(
"main",
"papiMeasure",
"whether use PAPI to measure performacne", &papiMeasure,
FALSE);
2418 opts.
optional(
"main",
"papiMeasureStartStep",
"when to measure performacne using PAPI", &papiMeasureStartStep);
2420 opts.
optional(
"main",
"numPapiMeasureSteps",
"the number of timesteps to be measured using PAPI", &numPapiMeasureSteps);
2424 opts.
optionalB(
"main",
"outputMaps",
"whether to dump compute map and patch map for analysis just before load balancing", &outputMaps,
FALSE);
2425 opts.
optionalB(
"main",
"benchTimestep",
"whether to do benchmarking timestep in which case final file output is disabled", &benchTimestep,
FALSE);
2426 opts.
optional(
"main",
"useCkLoop",
"whether to use CkLoop library to parallelize a loop in a function like OpenMP", &useCkLoop,
2427 #
if CMK_SMP && USE_CKLOOP
2434 opts.
optionalB(
"main",
"simulateInitialMapping",
"whether to study the initial mapping scheme", &simulateInitialMapping,
FALSE);
2435 opts.
optional(
"main",
"simulatedPEs",
"the number of PEs to be used for studying initial mapping", &simulatedPEs);
2437 opts.
optional(
"main",
"simulatedNodeSize",
"the node size to be used for studying initial mapping", &simulatedNodeSize);
2439 opts.
optionalB(
"main",
"disableTopology",
"ignore torus information during patch placement", &disableTopology,
FALSE);
2440 opts.
optionalB(
"main",
"verboseTopology",
"print torus information during patch placement", &verboseTopology,
FALSE);
2442 opts.
optionalB(
"main",
"ldbUnloadPME",
"no load on PME nodes",
2443 &ldbUnloadPME,
FALSE);
2444 opts.
optionalB(
"main",
"ldbUnloadZero",
"no load on pe zero",
2445 &ldbUnloadZero,
FALSE);
2446 opts.
optionalB(
"main",
"ldbUnloadOne",
"no load on pe one",
2447 &ldbUnloadOne,
FALSE);
2448 opts.
optionalB(
"main",
"ldbUnloadOutputPEs",
"no load on output PEs",
2449 &ldbUnloadOutputPEs,
FALSE);
2450 opts.
optionalB(
"main",
"noPatchesOnZero",
"no patches on pe zero",
2451 &noPatchesOnZero,
FALSE);
2452 opts.
optionalB(
"main",
"noPatchesOnOutputPEs",
"no patches on Output PEs",
2453 &noPatchesOnOutputPEs,
FALSE);
2454 opts.
optionalB(
"main",
"noPatchesOnOne",
"no patches on pe one",
2455 &noPatchesOnOne,
FALSE);
2456 opts.
optionalB(
"main",
"useCompressedPsf",
"The structure file psf is in the compressed format",
2457 &useCompressedPsf,
FALSE);
2458 opts.
optionalB(
"main",
"genCompressedPsf",
"Generate the compressed version of the psf file",
2459 &genCompressedPsf,
FALSE);
2460 opts.
optionalB(
"main",
"usePluginIO",
"Use the plugin I/O to load the molecule system",
2461 &usePluginIO,
FALSE);
2462 opts.
optionalB(
"main",
"mallocTest",
"test how much memory all PEs can allocate",
2463 &mallocTest,
FALSE);
2464 opts.
optionalB(
"main",
"printExclusions",
"print exclusion lists to stdout",
2465 &printExclusions,
FALSE);
2466 opts.
optional(
"main",
"proxySendSpanningTree",
"using spanning tree to send proxies",
2467 &proxySendSpanningTree, -1);
2468 opts.
optional(
"main",
"proxyRecvSpanningTree",
"using spanning tree to receive proxies",
2469 &proxyRecvSpanningTree, 0);
2470 opts.
optional(
"main",
"proxyTreeBranchFactor",
"the branch factor when building a spanning tree",
2471 &proxyTreeBranchFactor, 0);
2472 opts.
optionalB(
"main",
"twoAwayX",
"half-size patches in 1st dimension",
2474 opts.
optionalB(
"main",
"twoAwayY",
"half-size patches in 2nd dimension",
2476 opts.
optionalB(
"main",
"twoAwayZ",
"half-size patches in 3rd dimension",
2478 opts.
optional(
"main",
"maxPatches",
"maximum patch count", &maxPatches, -1);
2481 opts.
optional(
"main",
"firsttimestep",
"Timestep to start simulation at",
2486 opts.
optionalB(
"main",
"test",
"Perform self-tests rather than simulation",
2488 opts.
optionalB(
"main",
"commOnly",
"Do not evaluate forces or integrate",
2491 opts.
optionalB(
"main",
"statsOn",
"counters in machine layer",
2494 opts.
optionalB(
"main",
"hbonds",
"Use explicit hydrogen bond term",
2495 &HydrogenBonds,
FALSE);
2496 opts.
optionalB(
"hbonds",
"hbAntecedents",
"Include Antecedent in hbond term",
2497 &useAntecedent,
TRUE);
2498 opts.
optional(
"hbonds",
"hbAAexp",
"Hbond AA-A-H angle cos exponential",
2500 opts.
optional(
"hbonds",
"hbHAexp",
"Hbond D-H-A angle cos exponential",
2502 opts.
optional(
"hbonds",
"hbDistAexp",
"Hbond A-D dist attractive exponential",
2504 opts.
optional(
"hbonds",
"hbDistRexp",
"Hbond A-D dist repulstive exponential",
2506 opts.
optional(
"hbonds",
"hbCutoffAngle",
"Hbond D-H-A cutoff angle",
2507 &dhaCutoffAngle, 100.0);
2509 opts.
optional(
"hbonds",
"hbOnAngle",
"Hbond D-H-A switch function on angle",
2512 opts.
optional(
"hbonds",
"hbOffAngle",
"Hbond D-H-A switch function off angle",
2513 &dhaOffAngle, 80.0);
2515 opts.
optional(
"hbonds",
"hbCutoffDist",
"Hbond A-D cutoff distance",
2516 &daCutoffDist, 7.5);
2519 opts.
optional(
"hbonds",
"hbOnDist",
"Hbond A-D switch function on distance",
2523 opts.
optional(
"hbonds",
"hbOffDist",
"Hbond A-D switch function off distance",
2529 opts.
optionalB(
"main",
"IMDon",
"Connect using IMD?",&IMDon,
FALSE);
2530 opts.
optional(
"IMDon",
"IMDversion",
"IMD protocol version number",&IMDversion,2);
2532 opts.
require(
"IMDon",
"IMDport",
"Port to which to bind", &IMDport);
2534 opts.
require(
"IMDon",
"IMDfreq",
"Frequency at which to report", &IMDfreq);
2536 opts.
optionalB(
"IMDon",
"IMDwait",
"Pause until IMD connection?",&IMDwait,
2538 opts.
optionalB(
"IMDon",
"IMDignore",
"Ignore any user input?",&IMDignore,
2540 opts.
optionalB(
"IMDon",
"IMDignoreForces",
"Ignore forces ONLY?",&IMDignoreForces,
2542 opts.
optionalB(
"IMDon",
"IMDsendTime",
"Send time information",&IMDsendsettings.time_switch,
2544 opts.
optionalB(
"IMDon",
"IMDsendEnergies",
"Send energies via IMD:",&IMDsendsettings.energies_switch,
2546 opts.
optionalB(
"IMDon",
"IMDsendBoxDimensions",
"Send box dimensions via IMD:",&IMDsendsettings.box_switch,
2548 opts.
optionalB(
"IMDon",
"IMDsendPositions",
"Send positions via IMD:",&IMDsendsettings.fcoords_switch,
2550 opts.
optionalB(
"IMDon",
"IMDwrapPositions",
"Send positions as wrapped:",&IMDsendsettings.wrap_switch,
2552 opts.
optionalB(
"IMDon",
"IMDsendVelocities",
"Send velocities via IMD:",&IMDsendsettings.velocities_switch,
2554 opts.
optionalB(
"IMDon",
"IMDsendForces",
"Send forces via IMD:",&IMDsendsettings.forces_switch,
2557 opts.
optional(
"ldBalancer",
"maxSelfPart",
2558 "maximum number of self partitions in one patch", &maxSelfPart, 20);
2560 opts.
optional(
"ldBalancer",
"maxPairPart",
2561 "maximum number of pair partitions in one patch", &maxPairPart, 8);
2563 opts.
optional(
"ldBalancer",
"numAtomsSelf",
2564 "maximum number of atoms in one self compute distribution",
2565 &numAtomsSelf, 154);
2568 opts.
optional(
"ldBalancer",
"numAtomsSelf2",
2569 "maximum number of atoms in one self compute distribution",
2570 &numAtomsSelf2, 154);
2573 opts.
optional(
"ldBalancer",
"numAtomsPair",
2574 "maximum number of atoms in one pair compute distribution",
2575 &numAtomsPair, 318);
2577 opts.
optional(
"ldBalancer",
"numAtomsPair2",
2578 "maximum number of atoms in one pair compute distribution",
2579 &numAtomsPair2, 637);
2581 opts.
optional(
"main",
"minAtomsPerPatch",
2582 "minimum average atoms per patch",
2583 &minAtomsPerPatch, 40);
2587 opts.
optional(
"main",
"emptyPatchLoad",
2588 "load generated by empty patch, in atoms",
2589 &emptyPatchLoad, 40);
2593 opts.
optional(
"main",
"maxExclusionFlags",
2594 "maximum number of exclusion flags per atom", &maxExclusionFlags, 256);
2599 opts.
optional(
"main",
"bondedGPU",
"Bitmask for calculating bonded interactions on GPU", &bondedGPU);
2604 opts.
optionalB(
"main",
"useCUDAdisable",
"Disable kernels to maintain feature compatibility with CUDA", &useCUDAdisable,
TRUE);
2607 opts.
optional(
"main",
"mic_unloadMICPEs",
"Indicates whether or not the load balancer should unload PEs driving Xeon Phi cards", &mic_unloadMICPEs, 1);
2608 opts.
optional(
"main",
"mic_singleKernel",
"Set to non-zero to have all MIC work to be placed in a single kernel", &mic_singleKernel, 1);
2609 opts.
optional(
"main",
"mic_deviceThreshold",
"Threshold to use for directing computes to Xeon Phi devices", &mic_deviceThreshold, -1);
2610 opts.
optional(
"main",
"mic_hostSplit",
"DMK - reserved", &mic_hostSplit, -1);
2611 opts.
optional(
"main",
"mic_numParts_self_p1",
"MIC-Specific NumParts SELF Parameter 1", &mic_numParts_self_p1, -1);
2612 opts.
optional(
"main",
"mic_numParts_pair_p1",
"MIC-Specific NumParts PAIR Parameter 1", &mic_numParts_pair_p1, -1);
2613 opts.
optional(
"main",
"mic_numParts_pair_p2",
"MIC-Specific NumParts PAIR Parameter 2", &mic_numParts_pair_p2, -1);
2621 iout <<
iINFO <<
"EXTENDED SYSTEM FILE " << filename <<
"\n" <<
endi;
2624 ifstream xscFile(filename);
2625 if ( ! xscFile )
NAMD_die(
"Unable to open extended system file.\n");
2629 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2630 xscFile.getline(labels,1023);
2631 }
while ( strncmp(labels,
"#$LABELS ",9) );
2633 int a_x, a_y, a_z, b_x, b_y, b_z, c_x, c_y, c_z;
2634 a_x = a_y = a_z = b_x = b_y = b_z = c_x = c_y = c_z = -1;
2635 int o_x, o_y, o_z, s_u, s_v, s_w, s_x, s_y, s_z;
2636 o_x = o_y = o_z = s_u = s_v = s_w = s_x = s_y = s_z = -1;
2637 int v_x = -1, v_y = -1 , v_z = -1;
2640 char *l_i = labels + 8;
2642 if ( *l_i ==
' ' ) { ++l_i;
continue; }
2644 for ( l_i2 = l_i; *l_i2 && *l_i2 !=
' '; ++l_i2 );
2645 if ( (l_i2 - l_i) == 3 && (l_i[1] ==
'_') ) {
2646 if (l_i[0] ==
'a' && l_i[2] ==
'x') a_x = pos;
2647 if (l_i[0] ==
'a' && l_i[2] ==
'y') a_y = pos;
2648 if (l_i[0] ==
'a' && l_i[2] ==
'z') a_z = pos;
2649 if (l_i[0] ==
'b' && l_i[2] ==
'x') b_x = pos;
2650 if (l_i[0] ==
'b' && l_i[2] ==
'y') b_y = pos;
2651 if (l_i[0] ==
'b' && l_i[2] ==
'z') b_z = pos;
2652 if (l_i[0] ==
'c' && l_i[2] ==
'x') c_x = pos;
2653 if (l_i[0] ==
'c' && l_i[2] ==
'y') c_y = pos;
2654 if (l_i[0] ==
'c' && l_i[2] ==
'z') c_z = pos;
2655 if (l_i[0] ==
'o' && l_i[2] ==
'x') o_x = pos;
2656 if (l_i[0] ==
'o' && l_i[2] ==
'y') o_y = pos;
2657 if (l_i[0] ==
'o' && l_i[2] ==
'z') o_z = pos;
2658 if (l_i[0] ==
's' && l_i[2] ==
'u') s_u = pos;
2659 if (l_i[0] ==
's' && l_i[2] ==
'v') s_v = pos;
2660 if (l_i[0] ==
's' && l_i[2] ==
'w') s_w = pos;
2661 if (l_i[0] ==
's' && l_i[2] ==
'x') s_x = pos;
2662 if (l_i[0] ==
's' && l_i[2] ==
'y') s_y = pos;
2663 if (l_i[0] ==
's' && l_i[2] ==
'z') s_z = pos;
2664 if (l_i[0] ==
'v' && l_i[2] ==
'x') v_x = pos;
2665 if (l_i[0] ==
'v' && l_i[2] ==
'y') v_y = pos;
2666 if (l_i[0] ==
'v' && l_i[2] ==
'z') v_z = pos;
2673 for ( pos = 0; pos < numpos; ++pos ) {
2676 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2677 if ( pos == a_x ) cellBasisVector1.x = tmp;
2678 if ( pos == a_y ) cellBasisVector1.y = tmp;
2679 if ( pos == a_z ) cellBasisVector1.z = tmp;
2680 if ( pos == b_x ) cellBasisVector2.x = tmp;
2681 if ( pos == b_y ) cellBasisVector2.y = tmp;
2682 if ( pos == b_z ) cellBasisVector2.z = tmp;
2683 if ( pos == c_x ) cellBasisVector3.x = tmp;
2684 if ( pos == c_y ) cellBasisVector3.y = tmp;
2685 if ( pos == c_z ) cellBasisVector3.z = tmp;
2686 if ( pos == o_x ) cellOrigin.x = tmp;
2687 if ( pos == o_y ) cellOrigin.y = tmp;
2688 if ( pos == o_z ) cellOrigin.z = tmp;
2689 if ( pos == s_u ) strainRate2.x = tmp;
2690 if ( pos == s_v ) strainRate2.y = tmp;
2691 if ( pos == s_w ) strainRate2.z = tmp;
2692 if ( pos == s_x ) strainRate.x = tmp;
2693 if ( pos == s_y ) strainRate.y = tmp;
2694 if ( pos == s_z ) strainRate.z = tmp;
2695 if ( pos == v_x ) monteCarloMaxVolume.x = tmp;
2696 if ( pos == v_y ) monteCarloMaxVolume.y = tmp;
2697 if ( pos == v_z ) monteCarloMaxVolume.z = tmp;
2702 test.
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2704 if ( test.
a_p() && ! lattice.a_p() ) {
2705 NAMD_die(
"cellBasisVector1 added during atom reinitialization");
2707 if ( lattice.a_p() && ! test.
a_p() ) {
2708 NAMD_die(
"cellBasisVector1 dropped during atom reinitialization");
2710 if ( test.
b_p() && ! lattice.b_p() ) {
2711 NAMD_die(
"cellBasisVector2 added during atom reinitialization");
2713 if ( lattice.b_p() && ! test.
b_p() ) {
2714 NAMD_die(
"cellBasisVector2 dropped during atom reinitialization");
2716 if ( test.
c_p() && ! lattice.c_p() ) {
2717 NAMD_die(
"cellBasisVector3 added during atom reinitialization");
2719 if ( lattice.c_p() && ! test.
c_p() ) {
2720 NAMD_die(
"cellBasisVector3 dropped during atom reinitialization");
2723 latptr->
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2728 #ifdef MEM_OPT_VERSION 2730 extern char *gWorkDir;
2738 #ifdef MEM_OPT_VERSION 2739 char *namdWorkDir = NULL;
2742 if ( opts.
defined(
"obsolete") ) {
2744 "\"obsolete\" defined, silently ignoring obsolete options\n" <<
endi;
2751 current = config->
find(
"cwd");
2753 len = strlen(current->
data);
2757 NAMD_die(
"chdir() to given cwd failed!");
2765 cwd =
new char[len+1];
2767 strcpy(cwd, current->
data);
2773 #ifdef MEM_OPT_VERSION 2774 if(cwd!=NULL)namdWorkDir = cwd;
2775 else namdWorkDir = gWorkDir;
2776 int dirlen = strlen(namdWorkDir);
2779 if(namdWorkDir[dirlen-1]==
'/'){
2780 tmpDir =
new char[dirlen+1];
2783 tmpDir =
new char[dirlen+2];
2787 memcpy(tmpDir, namdWorkDir, dirlen);
2788 namdWorkDir = tmpDir;
2810 if (opts.
defined(
"oneFourScaling")) {
2812 if (config->
find(
"1-4scaling")) {
2813 NAMD_die(
"Multiple definitions of 1-4scaling using \"1-4scaling\" and \"oneFourScaling\".");
2815 scale14 = scale14alt;
2817 else if (config->
find(
"1-4scaling")) {
2818 iout <<
iWARN <<
"Option \"1-4scaling\" has been deprecated. Instead use \"oneFourScaling\".\n" <<
endi;
2822 if (opts.
defined(
"GPUresident")) {
2824 if (config->
find(
"CUDASOAintegrate")) {
2825 NAMD_die(
"Multiple definitions of GPUresident using \"CUDASOAintegrate\" and \"GPUresident\".");
2827 CUDASOAintegrateMode = GPUresidentMode;
2829 else if (config->
find(
"CUDASOAintegrate")) {
2830 iout <<
iWARN <<
"Option \"CUDASOAintegrate\" has been deprecated. Instead use \"GPUresident\".\n" <<
endi;
2834 if (opts.
defined(
"GPUForceTable")) {
2836 if (config->
find(
"CUDAForceTable")) {
2837 NAMD_die(
"Multiple definitions of GPUForceTable using \"CUDAForceTable\" and \"GPUForceTable\".");
2839 useCUDANonbondedForceTable = useGPUNonbondedForceTable;
2841 else if (config->
find(
"CUDAForceTable")) {
2842 iout <<
iWARN <<
"Option \"CUDAForceTable\" has been deprecated. Instead use \"GPUForceTable\".\n" <<
endi;
2844 if ( ! useCUDANonbondedForceTable) {
2845 iout <<
iWARN <<
"Setting \"GPUForceTable off\" is considered experimental.\n" <<
endi;
2849 if (opts.
defined(
"GPUAtomMigration")) {
2851 if (config->
find(
"DeviceMigration")) {
2852 NAMD_die(
"Multiple definitions of GPUAtomMigration using \"DeviceMigration\" and \"GPUAtomMigration\".");
2854 useDeviceMigration = useGPUAtomMigration;
2856 else if (config->
find(
"DeviceMigration")) {
2857 iout <<
iWARN <<
"Option \"DeviceMigration\" has been deprecated. Instead use \"GPUAtomMigration\".\n" <<
endi;
2859 if (useDeviceMigration) {
2860 iout <<
iWARN <<
"Setting \"GPUAtomMigration on\" is considered experimental.\n" <<
endi;
2864 if (opts.
defined(
"usePMEGPU")) {
2866 if (config->
find(
"usePMECUDA")) {
2867 NAMD_die(
"Multiple definitions of usePMEGPU using \"usePMECUDA\" and \"usePMEGPU\".");
2869 usePMECUDA = usePMEGPU;
2871 else if (config->
find(
"usePMECUDA")) {
2872 iout <<
iWARN <<
"Option \"usePMECUDA\" has been deprecated. Instead use \"usePMEGPU\".\n" <<
endi;
2876 if (opts.
defined(
"bondedGPU")) {
2878 if (config->
find(
"bondedCUDA")) {
2879 NAMD_die(
"Multiple definitions of bondedGPU using \"bondedCUDA\" and \"bondedGPU\".");
2881 bondedCUDA = bondedGPU;
2883 else if (config->
find(
"bondedCUDA")) {
2884 iout <<
iWARN <<
"Option \"bondedCUDA\" has been deprecated. Instead use \"bondedGPU\".\n" <<
endi;
2889 if ( usePluginIO && opts.
defined(
"coordinates") ) {
2890 NAMD_die(
"Separate coordinates file not allowed with plugin IO, coordinates will be taken from structure file.");
2895 if (!amberOn && !gromacsOn) {
2896 #ifndef MEM_OPT_VERSION 2897 if (useCompressedPsf)
2898 NAMD_die(
"useCompressedPsf requires memory-optimized build!");
2899 if (!usePluginIO && !genCompressedPsf && !opts.
defined(
"coordinates"))
2900 NAMD_die(
"coordinates not found in the configuration file!");
2902 if(!usePluginIO && !opts.
defined(
"bincoordinates")) {
2903 NAMD_die(
"bincoordinates not found in the configuration file for the memory optimized version!");
2905 if(!usePluginIO && opts.
defined(
"coordinates")) {
2906 NAMD_die(
"coordinates not allowed in the configuration file for the memory optimized version!");
2909 if (!opts.
defined(
"structure"))
2910 NAMD_die(
"structure not found in the configuration file!");
2911 if (!opts.
defined(
"parameters"))
2912 NAMD_die(
"parameters not found in the configuration file!");
2918 NAMD_die(
"Cannot specify both coordinates and ambercoor!");
2919 #ifndef MEM_OPT_VERSION 2920 if (!genCompressedPsf && !opts.
defined(
"coordinates") && !opts.
defined(
"ambercoor")
2921 && !opts.
defined(
"grocoorfile") && !usePluginIO)
2922 NAMD_die(
"Coordinate file not found!");
2927 if (opts.
defined(
"temperature") &&
2930 NAMD_die(
"Cannot specify both an initial temperature and a velocity file");
2933 #ifdef MEM_OPT_VERSION 2940 char *curfile = NULL;
2941 dirlen = strlen(namdWorkDir);
2942 current = config->
find(
"structure");;
2943 curfile = current->
data;
2944 int filelen = strlen(curfile);
2945 if(*curfile ==
'/' || *curfile==
'~') {
2951 binAtomFile =
new char[filelen+5];
2952 memcpy(binAtomFile, curfile, filelen);
2953 memcpy(binAtomFile+filelen,
".bin", 4);
2954 binAtomFile[filelen+4] = 0;
2956 binAtomFile =
new char[dirlen+filelen+5];
2957 memcpy(binAtomFile, namdWorkDir, dirlen);
2958 memcpy(binAtomFile+dirlen, curfile, filelen);
2959 memcpy(binAtomFile+dirlen+filelen,
".bin", 4);
2960 binAtomFile[dirlen+filelen+4] = 0;
2963 current = config->
find(
"bincoordinates");
2964 curfile = current->
data;
2965 filelen = strlen(curfile);
2966 if(*curfile ==
'/' || *curfile==
'~') {
2967 binCoorFile =
new char[filelen+1];
2968 memcpy(binCoorFile, curfile, filelen);
2969 binCoorFile[filelen] = 0;
2971 binCoorFile =
new char[dirlen+filelen+1];
2972 memcpy(binCoorFile, namdWorkDir, dirlen);
2973 memcpy(binCoorFile+dirlen, curfile, filelen);
2974 binCoorFile[dirlen+filelen] = 0;
2977 if(opts.
defined(
"binvelocities")){
2978 current = config->
find(
"binvelocities");
2979 curfile = current->
data;
2980 filelen = strlen(curfile);
2981 if(*curfile ==
'/' || *curfile==
'~') {
2982 binVelFile =
new char[filelen+1];
2983 memcpy(binVelFile, curfile, filelen);
2984 binVelFile[filelen] = 0;
2986 binVelFile =
new char[dirlen+filelen+1];
2987 memcpy(binVelFile, namdWorkDir, dirlen);
2988 memcpy(binVelFile+dirlen, curfile, filelen);
2989 binVelFile[dirlen+filelen] = 0;
2993 if(opts.
defined(
"binrefcoords")){
2994 current = config->
find(
"binrefcoords");
2995 curfile = current->
data;
2996 filelen = strlen(curfile);
2997 if(*curfile ==
'/' || *curfile==
'~') {
2998 binRefFile =
new char[filelen+1];
2999 memcpy(binRefFile, curfile, filelen);
3000 binRefFile[filelen] = 0;
3002 binRefFile =
new char[dirlen+filelen+1];
3003 memcpy(binRefFile, namdWorkDir, dirlen);
3004 memcpy(binRefFile+dirlen, curfile, filelen);
3005 binRefFile[dirlen+filelen] = 0;
3010 if(outputFilename[0] !=
'/' && outputFilename[0]!=
'~') {
3011 filelen = strlen(outputFilename);
3012 char *tmpout =
new char[filelen];
3013 memcpy(tmpout, outputFilename, filelen);
3014 CmiAssert(filelen+dirlen <= 120);
3015 memcpy(outputFilename, namdWorkDir, dirlen);
3016 memcpy(outputFilename+dirlen, tmpout, filelen);
3017 outputFilename[filelen+dirlen] = 0;
3021 if ( dcdFrequency && opts.
defined(
"dcdfile") &&
3022 dcdFilename[0] !=
'/' && dcdFilename[0]!=
'~' ) {
3023 filelen = strlen(dcdFilename);
3024 char *tmpout =
new char[filelen];
3025 memcpy(tmpout, dcdFilename, filelen);
3026 CmiAssert(filelen+dirlen <= 120);
3027 memcpy(dcdFilename, namdWorkDir, dirlen);
3028 memcpy(dcdFilename+dirlen, tmpout, filelen);
3029 dcdFilename[filelen+dirlen] = 0;
3033 if ( velDcdFrequency && opts.
defined(
"veldcdfile") &&
3034 velDcdFilename[0] !=
'/' && velDcdFilename[0]!=
'~' ) {
3035 filelen = strlen(velDcdFilename);
3036 char *tmpout =
new char[filelen];
3037 memcpy(tmpout, velDcdFilename, filelen);
3038 CmiAssert(filelen+dirlen <= 120);
3039 memcpy(velDcdFilename, namdWorkDir, dirlen);
3040 memcpy(velDcdFilename+dirlen, tmpout, filelen);
3041 velDcdFilename[filelen+dirlen] = 0;
3045 if ( forceDcdFrequency && opts.
defined(
"forcedcdfile") &&
3046 forceDcdFilename[0] !=
'/' && forceDcdFilename[0]!=
'~' ) {
3047 filelen = strlen(forceDcdFilename);
3048 char *tmpout =
new char[filelen];
3049 memcpy(tmpout, forceDcdFilename, filelen);
3050 CmiAssert(filelen+dirlen <= 120);
3051 memcpy(forceDcdFilename, namdWorkDir, dirlen);
3052 memcpy(forceDcdFilename+dirlen, tmpout, filelen);
3053 forceDcdFilename[filelen+dirlen] = 0;
3057 if ( restartFrequency && opts.
defined(
"restartname") &&
3058 restartFilename[0] !=
'/' && restartFilename[0]!=
'~' ) {
3059 filelen = strlen(restartFilename);
3060 char *tmpout =
new char[filelen];
3061 memcpy(tmpout, restartFilename, filelen);
3062 CmiAssert(filelen+dirlen <= 120);
3063 memcpy(restartFilename, namdWorkDir, dirlen);
3064 memcpy(restartFilename+dirlen, tmpout, filelen);
3065 restartFilename[filelen+dirlen] = 0;
3070 crashFilename[0] !=
'/' && crashFilename[0] !=
'~') {
3071 filelen = strlen(crashFilename);
3072 char *tmpout =
new char[filelen];
3073 memcpy(tmpout, crashFilename, filelen);
3074 CmiAssert(filelen+dirlen <= 120);
3075 memcpy(crashFilename, namdWorkDir, dirlen);
3076 memcpy(crashFilename+dirlen, tmpout, filelen);
3077 crashFilename[filelen+dirlen] = 0;
3081 delete [] namdWorkDir;
3083 if (opts.
defined(
"numinputprocs")) {
3084 if(numinputprocs > CkNumPes()) {
3085 iout <<
iWARN <<
"The number of input processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
3086 numinputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
3090 if (opts.
defined(
"numoutputprocs")) {
3091 if(numoutputprocs > CkNumPes()) {
3092 iout <<
iWARN <<
"The number of output processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
3093 numoutputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
3097 #ifndef OUTPUT_SINGLE_FILE 3098 #error OUTPUT_SINGLE_FILE not defined! 3101 #if !OUTPUT_SINGLE_FILE 3103 create_output_directories(
"coor");
3104 create_output_directories(
"vel");
3106 create_output_directories(
"dcd");
3108 iout <<
iWARN <<
"The dcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3111 if (velDcdFrequency) {
3112 create_output_directories(
"veldcd");
3113 if(opts.
defined(
"veldcdfile")){
3114 iout <<
iWARN <<
"The veldcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3117 if (forceDcdFrequency) {
3118 create_output_directories(
"forcedcd");
3119 if(opts.
defined(
"forcedcdfile")){
3120 iout <<
iWARN <<
"The forcedcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3126 if (! opts.
defined(
"auxFile")) {
3127 strcpy(auxFilename,outputFilename);
3128 strcat(auxFilename,
".aux");
3133 if (! opts.
defined(
"dcdfile")) {
3134 strcpy(dcdFilename,outputFilename);
3135 strcat(dcdFilename,
".dcd");
3141 if (velDcdFrequency) {
3142 if (! opts.
defined(
"veldcdfile")) {
3143 strcpy(velDcdFilename,outputFilename);
3144 strcat(velDcdFilename,
".veldcd");
3150 if (forceDcdFrequency) {
3151 if (! opts.
defined(
"forcedcdfile")) {
3152 strcpy(forceDcdFilename,outputFilename);
3153 strcat(forceDcdFilename,
".forcedcd");
3160 if (! opts.
defined(
"xstfile")) {
3161 strcpy(xstFilename,outputFilename);
3162 strcat(xstFilename,
".xst");
3168 if (restartFrequency) {
3169 if (! opts.
defined(
"restartname")) {
3170 strcpy(restartFilename,outputFilename);
3171 if ( ! restartSave ) strcat(restartFilename,
".restart");
3175 restartSave =
FALSE;
3176 binaryRestart =
FALSE;
3180 if (!opts.
defined(
"crashFile")) {
3181 strcpy(crashFilename, outputFilename);
3182 strcat(crashFilename,
".crash.csv");
3188 if (storeComputeMap || loadComputeMap) {
3189 if (! opts.
defined(
"computeMapFile")) {
3190 strcpy(computeMapFilename,
"computeMapFile");
3191 strcat(computeMapFilename,
".txt");
3199 if (!paraTypeXplorOn && !paraTypeCharmmOn)
3201 paraTypeXplorOn =
TRUE;
3204 if (paraTypeXplorOn && paraTypeCharmmOn)
3206 NAMD_die(
"Please specify either XPLOR or CHARMM format for parameters!");
3213 if (!(minimizeOn||minimizeCGOn) && !opts.
defined(
"temperature") &&
3216 NAMD_die(
"Must have either an initial temperature or a velocity file");
3219 if (minimizeOn||minimizeCGOn) { initialTemp = 0.0; }
3220 if (opts.
defined(
"velocities") || opts.
defined(
"binvelocities") )
3225 if (LJcorrection && LJcorrectionAlt) {
3226 NAMD_die(
"Only one method for LJ tail correction must be used.");
3230 if ( opts.
defined(
"extendedSystem") ) readExtendedSystem(config->
find(
"extendedSystem")->
data);
3232 #ifdef MEM_OPT_VERSION 3233 if ( LJcorrection ) {
3234 NAMD_die(
"LJ tail corrections not yet available for memory optimized builds");
3236 if ( LJcorrectionAlt ) {
3237 NAMD_die(
"Alternative LJ tail corrections not yet available for memory optimized builds");
3241 if ( LJcorrection && ! cellBasisVector3.length2() ) {
3242 NAMD_die(
"Can't use LJ tail corrections without periodic boundary conditions!");
3245 if ( LJcorrectionAlt && ! cellBasisVector3.length2() ) {
3246 NAMD_die(
"Can't use alternative LJ tail corrections without periodic boundary conditions!");
3249 if ( cellBasisVector3.length2() && ! cellBasisVector2.length2() ) {
3250 NAMD_die(
"Used cellBasisVector3 without cellBasisVector2!");
3253 if ( cellBasisVector2.length2() && ! cellBasisVector1.length2() ) {
3254 NAMD_die(
"Used cellBasisVector2 without cellBasisVector1!");
3257 if ( cellOrigin.length2() && ! cellBasisVector1.length2() ) {
3258 NAMD_die(
"Used cellOrigin without cellBasisVector1!");
3261 lattice.set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
3263 if (! opts.
defined(
"DCDunitcell")) {
3264 dcdUnitCell = lattice.a_p() && lattice.b_p() && lattice.c_p();
3270 if ( ! opts.
defined(
"cylindricalBCAxis") )
3272 cylindricalBCAxis =
'x';
3276 opts.
get(
"cylindricalBCAxis", s);
3278 if (!strcasecmp(s,
"x"))
3280 cylindricalBCAxis =
'x';
3282 else if (!strcasecmp(s,
"y"))
3284 cylindricalBCAxis =
'y';
3286 else if (!strcasecmp(s,
"z"))
3288 cylindricalBCAxis =
'z';
3294 sprintf(err_msg,
"Illegal value '%s' for 'cylindricalBCAxis' in configuration file", s);
3299 if (!opts.
defined(
"splitPatch"))
3305 opts.
get(
"splitPatch", s);
3306 if (!strcasecmp(s,
"position"))
3308 else if (!strcasecmp(s,
"hydrogen"))
3314 "Illegal value '%s' for 'splitPatch' in configuration file",
3321 opts.
get(
"exclude", s);
3323 if (!strcasecmp(s,
"none"))
3328 else if (!strcasecmp(s,
"1-2"))
3333 else if (!strcasecmp(s,
"1-3"))
3337 else if (!strcasecmp(s,
"1-4"))
3341 else if (!strcasecmp(s,
"scaled1-4"))
3349 sprintf(err_msg,
"Illegal value '%s' for 'exclude' in configuration file",
3354 if (scale14 != 1.0 && exclude !=
SCALED14)
3356 iout <<
iWARN <<
"Exclude is not scaled1-4; 1-4scaling ignored.\n" <<
endi;
3360 if (!opts.
defined(
"waterModel")) {
3363 opts.
get(
"waterModel", s);
3364 if (!strncasecmp(s,
"tip4", 4)) {
3367 }
else if (!strncasecmp(s,
"tip3", 4)) {
3370 }
else if (!strncasecmp(s,
"swm4", 4)) {
3376 "Illegal value %s for 'waterModel' in configuration file", s);
3381 NAMD_die(
"Must have 'drudeOn' enabled to use SWM4-DP water model.");
3386 <<
"Setting water model to 'swm4' (SWM4-DP) for Drude polarization.\n" 3399 int * gomethod = &goMethod;
3400 if (!opts.
defined(
"GoMethod")) {
3404 opts.
get(
"GoMethod",s);
3406 *gomethod = atoi(s);
3408 if (!strcasecmp(s,
"matrix")) {
3411 }
else if (!strcasecmp(s,
"faster")) {
3414 }
else if (!strcasecmp(s,
"lowmem")) {
3421 "Illegal value '%s' for 'GoMethod' in configuration file",
3429 if (!opts.
defined(
"MTSAlgorithm"))
3435 opts.
get(
"MTSAlgorithm", s);
3437 if (!strcasecmp(s,
"naive"))
3439 MTSAlgorithm =
NAIVE;
3441 else if (!strcasecmp(s,
"constant"))
3443 MTSAlgorithm =
NAIVE;
3445 else if (!strcasecmp(s,
"impulse"))
3449 else if (!strcasecmp(s,
"verleti"))
3458 "Illegal value '%s' for 'MTSAlgorithm' in configuration file",
3465 if (!opts.
defined(
"longSplitting"))
3471 opts.
get(
"longSplitting", s);
3472 if (!strcasecmp(s,
"sharp"))
3473 longSplitting =
SHARP;
3474 else if (!strcasecmp(s,
"xplor"))
3475 longSplitting =
XPLOR;
3476 else if (!strcasecmp(s,
"c1"))
3478 else if (!strcasecmp(s,
"c2"))
3485 "Illegal value '%s' for 'longSplitting' in configuration file",
3492 if (!opts.
defined(
"rigidBonds"))
3498 opts.
get(
"rigidBonds", s);
3499 if (!strcasecmp(s,
"all"))
3503 else if (!strcasecmp(s,
"water"))
3507 else if (!strcasecmp(s,
"none"))
3515 "Illegal value '%s' for 'rigidBonds' in configuration file", s);
3525 "Water model %s requires rigidBonds set to \"all\" or \"water\"",
3531 if (switchingActive)
3534 if (!opts.
defined(
"switchDist")) {
3535 NAMD_die(
"switchDist must be defined when switching is enabled");
3538 if ( (switchingDist>cutoff) || (switchingDist<0) )
3543 "switchDist muct be between 0 and cutoff, which is %f", cutoff);
3549 if ( martiniSwitching )
3551 if ( ! switchingActive && ! LJPMEOn)
3553 NAMD_die(
"martiniSwitching requires switching");
3555 if ( vdwForceSwitching )
3557 NAMD_die(
"martiniSwitching and vdwForceSwitching are exclusive to one another. Select only one.");
3559 if ( dielectric != 15.0 && ! martiniDielAllow )
3561 iout <<
iWARN <<
"USE DIELECTRIC OF 15.0 WITH MARTINI.\n";
3562 iout <<
iWARN <<
"SETTING dielectric 15.0\n";
3563 iout <<
iWARN <<
"FOR NON-STANDARD DIELECTRIC WITH MARTINI, SET: martiniDielAllow on\n";
3568 iout <<
iWARN <<
"USE COSINE BASED ANGLES WITH MARTINI.\n";
3569 iout <<
iWARN <<
"SETTING cosAngles on\n";
3574 NAMD_die(
"Do not use Particle Mesh Ewald with Martini. Set: PME off");
3578 NAMD_die(
"Do not use Multilevel Summation Method with Martini. Set: MSM off");
3582 NAMD_die(
"Do not use Fast Multipole Method with Martini. Set: FMM off");
3588 if (!opts.
defined(
"pairlistDist"))
3590 pairlistDist = cutoff;
3592 else if (pairlistDist < cutoff)
3594 NAMD_die(
"pairlistDist must be >= cutoff distance");
3597 patchDimension = pairlistDist;
3600 patchDimension += hgroupCutoff;
3604 if (berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) {
3605 defaultMargin = ( useFlexibleCell ? 0.06 : 0.03 ) * patchDimension;
3608 margin = defaultMargin;
3611 if (CUDASOAintegrateMode) {
3613 <<
"Tuning parameters to improve GPU-resident performance\n" 3620 const double CUDASOA_defaultMargin = 4;
3621 const int CUDASOA_defaultOutputEnergies = 100;
3623 if (! config->
find(
"margin")) {
3624 margin = CUDASOA_defaultMargin;
3626 <<
"Setting margin to " << margin <<
"\n" 3629 else if (margin < CUDASOA_defaultMargin) {
3631 <<
"Keeping margin at user-specified value " << margin <<
"\n" 3633 <<
"Performance might be improved by increasing margin size to >= " 3634 << CUDASOA_defaultMargin <<
"\n" 3638 if (! config->
find(
"outputEnergies")) {
3639 outputEnergies = CUDASOA_defaultOutputEnergies;;
3641 <<
"Setting outputEnergies to " << outputEnergies <<
"\n" 3644 else if (outputEnergies < CUDASOA_defaultOutputEnergies) {
3646 <<
"Keeping outputEnergies at user-specified value " 3647 << outputEnergies <<
"\n" 3649 <<
"Performance might be improved by increasing outputEnergies to >= " 3650 << CUDASOA_defaultOutputEnergies <<
"\n" 3655 if ( defaultMargin != 0.0 && margin == 0.0 ) {
3656 margin = defaultMargin;
3657 iout <<
iWARN <<
"ALWAYS USE NON-ZERO MARGIN WITH CONSTANT PRESSURE!\n";
3658 iout <<
iWARN <<
"CHANGING MARGIN FROM 0 to " << margin <<
"\n" <<
endi;
3661 patchDimension += margin;
3667 NAMD_die(
"GBIS not compatible with FullDirect");
3670 NAMD_die(
"GBIS not compatible with PME");
3673 NAMD_die(
"GBIS not compatible with MSM");
3676 NAMD_die(
"GBIS not compatible with FMM");
3679 NAMD_die(
"GBIS not compatible with Alchemical Transformations");
3682 NAMD_die(
"GBIS not compatible with Locally Enhanced Sampling");
3685 NAMD_die(
"GBIS not compatible with FMA");
3688 NAMD_die(
"GBIS not compatible with Drude Polarization");
3691 if (alpha_cutoff > patchDimension) {
3692 patchDimension = alpha_cutoff;
3695 BigReal tmp = (initialTemp > 0) ? initialTemp : 300;
3696 kappa = 50.29216*sqrt(ion_concentration/solvent_dielectric/tmp);
3701 #ifdef MEM_OPT_VERSION 3702 NAMD_die(
"SASA not yet available for memory optimized builds");
3704 if ( lattice.volume() > 0 ) {
3705 NAMD_die(
"SASA does not yet support periodic boundary conditions.");
3713 if ( dihedralOn ) globalOn =
TRUE;
3715 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 3716 if (loweAndersenOn) {
3717 NAMD_die(
"Lowe-Andersen dynamics not compatible with CUDA at this time");
3723 if (loweAndersenOn && (langevinOn || tCoupleOn))
3725 NAMD_die(
"Lowe-Andersen dynamics, Langevin dynamics and temperature coupling are mutually exclusive dynamics modes");
3729 if (tCoupleOn && opts.
defined(
"rescaleFreq") )
3731 NAMD_die(
"Temperature coupling and temperature rescaling are mutually exclusive");
3734 if (globalOn && CkNumPes() > 1)
3736 NAMD_die(
"Global integration does not run in parallel (yet).");
3739 if (COLDOn && langevinOn)
3741 NAMD_die(
"COLD and Langevin dynamics are mutually exclusive dynamics modes");
3743 if (COLDOn && minimizeOn)
3745 NAMD_die(
"COLD and minimization are mutually exclusive dynamics modes");
3747 if (COLDOn && tCoupleOn)
3749 NAMD_die(
"COLD and temperature coupling are mutually exclusive dynamics modes");
3751 if (COLDOn && opts.
defined(
"rescaleFreq"))
3753 NAMD_die(
"COLD and velocity rescaling are mutually exclusive dynamics modes");
3758 NAMD_die(
"splitPatch hydrogen is required for MOLLY");
3763 NAMD_die(
"splitPatch hydrogen is required for rigidBonds");
3769 if(accelMDGiE < 1 || accelMDGiE > 2){
3770 sprintf(msg,
"accelMDGiE was set to %d but it should be 1 or 2", accelMDGiE);
3773 if(accelMDGStatWindow > 0){
3774 if(accelMDGcMDPrepSteps % accelMDGStatWindow != 0)
3775 NAMD_die(
"'accelMDGcMDPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3776 if(accelMDGcMDSteps % accelMDGStatWindow != 0)
3777 NAMD_die(
"'accelMDGcMDSteps' has to be a multiple of 'accelMDGStatWindow'");
3778 if(accelMDGEquiPrepSteps % accelMDGStatWindow != 0)
3779 NAMD_die(
"'accelMDGEquiPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3780 if(accelMDGEquiSteps % accelMDGStatWindow != 0)
3781 NAMD_die(
"'accelMDGEquiSteps' has to be a multiple of 'accelMDGStatWindow'");
3783 if(accelMDGRestart && accelMDGcMDSteps == 0)
3784 accelMDGcMDPrepSteps = 0;
3785 else if(accelMDGcMDSteps - accelMDGcMDPrepSteps < 2)
3786 NAMD_die(
"'accelMDGcMDSteps' should be larger than 'accelMDGcMDPrepSteps'");
3788 if(accelMDGEquiSteps == 0)
3789 accelMDGEquiPrepSteps = 0;
3790 else if(accelMDGresetVaftercmd){
3791 if(accelMDGEquiPrepSteps <= 0)
3792 NAMD_die(
"'accelMDGEquiPrepSteps' should be non-zero");
3793 if(accelMDGEquiSteps - accelMDGEquiPrepSteps < 1)
3794 NAMD_die(
"'accelMDGEquiSteps' should be larger than 'accelMDGEquiPrepSteps'");
3799 iout <<
iWARN <<
"accelMDE will be ignored with accelMDG on.\n" <<
endi;
3800 if(opts.
defined(
"accelMDalpha"))
3801 iout <<
iWARN <<
"accelMDalpha will be ignored with accelMDG on.\n" <<
endi;
3803 iout <<
iWARN <<
"accelMDTE will be ignored with accelMDG on.\n" <<
endi;
3804 if(opts.
defined(
"accelMDTalpha"))
3805 iout <<
iWARN <<
"accelMDTalpha will be ignored with accelMDG on.\n" <<
endi;
3809 NAMD_die(
"accelMDE and accelMDalpha are required for accelMD with accelMDG off");
3811 if(accelMDdual && (!opts.
defined(
"accelMDTE") || !opts.
defined(
"accelMDTalpha"))){
3812 NAMD_die(
"accelMDTE and accelMDTalpha are required for accelMDdual with accelMDG off");
3819 if (minimizeOn && (maximumMove == 0.0))
3821 maximumMove = 0.75 * pairlistDist/stepsPerCycle;
3824 if (!adaptTempRescale && !adaptTempLangevin)
3825 NAMD_die(
"Adaptive tempering needs to be coupled to either the Langevin thermostat or velocity rescaling.");
3826 if (opts.
defined(
"adaptTempInFile") && (opts.
defined(
"adaptTempTmin") ||
3827 opts.
defined(
"adaptTempTmax") ||
3828 adaptTempBins != 0))
3829 NAMD_die(
"cannot simultaneously specify adaptTempInFile and any of {adaptTempTmin, adaptTempTmax,adaptTempBins} as these are read from the input file");
3830 if (!opts.
defined(
"adaptTempInFile") && !(opts.
defined(
"adaptTempTmin") &&
3831 opts.
defined(
"adaptTempTmax") &&
3832 adaptTempBins != 0 ))
3833 NAMD_die(
"Need to specify either adaptTempInFile or all of {adaptTempTmin, adaptTempTmax,adaptTempBins} if adaptTempMD is on.");
3837 monteCarloPressureOnAtStartup = monteCarloPressureOn;
3839 langevinOnAtStartup = langevinOn;
3841 if ( ! opts.
defined(
"langevinDamping") ) langevinDamping = 0.0;
3842 if ( ! opts.
defined(
"langevinHydrogen") ) langevinHydrogen =
TRUE;
3843 if ( (opts.
defined(
"langevinDamping") || opts.
defined(
"langevinHydrogen"))
3844 && (opts.
defined(
"langevinFile") || opts.
defined(
"langevinCol")) )
3845 NAMD_die(
"To specify Langevin dynamics parameters, use either langevinDamping and langevinHydrogen or langevinFile and langevinCol. Do not combine them.");
3846 if ( opts.
defined(
"langevinHydrogen") && langevinDamping == 0.0 )
3847 NAMD_die(
"langevinHydrogen requires langevinDamping to be set.");
3851 langevinGammasDiffer = ( ! langevinHydrogen ) ||
3852 opts.
defined(
"langevinFile") ||
3853 ( opts.
defined(
"drudeDamping") && drudeDamping != langevinDamping );
3854 if (langevinGammasDiffer) {
3857 <<
"The Langevin gamma parameters differ over the particles,\n" 3859 <<
"requiring extra work per step to constrain rigid bonds.\n" 3865 if (loweAndersenOn) {
3866 if (!opts.
defined(
"loweAndersenRate")) loweAndersenRate = 100;
3867 if (!opts.
defined(
"loweAndersenCutoff")) loweAndersenCutoff = 2.7;
3872 if (stochRescaleOn) {
3873 if (langevinOn || loweAndersenOn || tCoupleOn ||
3875 NAMD_die(
"Stochastic velocity rescaling is incompatible with other temperature control methods");
3877 if (!opts.
defined(
"stochRescaleFreq")) stochRescaleFreq = stepsPerCycle;
3880 if (opts.
defined(
"rescaleFreq"))
3882 if (!opts.
defined(
"rescaleTemp"))
3884 if (opts.
defined(
"temperature"))
3886 rescaleTemp = initialTemp;
3890 NAMD_die(
"Must give a rescale temperature if rescaleFreq is defined");
3900 if (opts.
defined(
"rescaleTemp"))
3902 if (!opts.
defined(
"rescaleFreq"))
3904 NAMD_die(
"Must give a rescale freqency if rescaleTemp is given");
3908 if (opts.
defined(
"reassignFreq"))
3910 if (!opts.
defined(
"reassignTemp"))
3912 if (opts.
defined(
"temperature"))
3914 reassignTemp = initialTemp;
3918 NAMD_die(
"Must give a reassign temperature if reassignFreq is defined");
3928 if (opts.
defined(
"reassignTemp"))
3930 if (!opts.
defined(
"reassignFreq"))
3932 NAMD_die(
"Must give a reassignment freqency if reassignTemp is given");
3936 if (opts.
defined(
"reassignIncr"))
3938 if (!opts.
defined(
"reassignFreq"))
3940 NAMD_die(
"Must give a reassignment freqency if reassignIncr is given");
3948 if (opts.
defined(
"reassignHold"))
3950 if (!opts.
defined(
"reassignIncr"))
3952 NAMD_die(
"Must give a reassignment increment if reassignHold is given");
3962 randomSeed = (
unsigned int) time(NULL) + 31530001 * CmiMyPartition();
3966 if (opts.
defined(
"soluteScaling")) {
3970 if ( ! opts.
defined(
"soluteScalingFactorCharge") ) {
3971 soluteScalingFactorCharge = soluteScalingFactor;
3973 if ( ! opts.
defined(
"soluteScalingFactorVdw") ) {
3974 soluteScalingFactorVdw = soluteScalingFactor;
3979 alchFepOnAtStartup = alchFepOn =
FALSE;
3980 alchThermIntOnAtStartup = alchThermIntOn =
FALSE;
3981 alchOnAtStartup = alchOn;
3984 #if !defined(NAMD_CUDA) && !defined(NAMD_HIP) 3987 if (martiniSwitching) {
3988 iout <<
iWARN <<
"Martini switching disabled for alchemical " 3989 "interactions.\n" <<
endi;
3992 if (!opts.
defined(
"alchType")) {
3993 NAMD_die(
"Must define type of alchemical simulation: fep or ti\n");
3996 opts.
get(
"alchType",s);
3997 if (!strcasecmp(s,
"fep")) {
3998 alchFepOnAtStartup = alchFepOn =
TRUE;
4000 else if (!strcasecmp(s,
"ti")) {
4001 alchThermIntOnAtStartup = alchThermIntOn =
TRUE;
4004 NAMD_die(
"Unknown type of alchemical simulation; choices are fep or ti\n");
4008 if (rescaleFreq > 0) alchTemp = rescaleTemp;
4009 else if (reassignFreq > 0) alchTemp = reassignTemp;
4010 else if (langevinOn) alchTemp = langevinTemp;
4011 else if (stochRescaleOn) alchTemp = stochRescaleTemp;
4012 else if (tCoupleOn) alchTemp = tCoupleTemp;
4013 else NAMD_die(
"Alchemical FEP can be performed only in constant temperature simulations\n");
4015 if (reassignFreq > 0 && reassignIncr != 0)
4016 NAMD_die(
"reassignIncr cannot be used in alchemical simulations\n");
4018 if (alchLambda < 0.0 || alchLambda > 1.0)
4019 NAMD_die(
"alchLambda values should be in the range [0.0, 1.0]\n");
4021 if (alchVdwLambdaEnd > 1.0)
4022 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");
4024 if (alchBondLambdaEnd > 1.0)
4025 NAMD_die(
"alchBondLambdaEnd should be in the range [0.0, 1.0]\n");
4027 if (alchElecLambdaStart > 1.0)
4028 NAMD_die(
"alchElecLambdaStart should be in the range [0.0, 1.0]\n");
4031 if (alchRepLambdaEnd > 1.0)
4032 NAMD_die(
"alchRepLambdaEnd should be in the range [0.0, 1.0]\n");
4033 if (alchVdwLambdaEnd < alchRepLambdaEnd)
4034 NAMD_die(
"alchVdwLambdaEnd should be greater than alchRepLambdaEnd\n");
4035 if (alchVdwShiftCoeff > 0.0) {
4036 iout <<
iWARN <<
"alchVdwShiftCoeff is non-zero but not used when WCA" 4037 <<
" is active. Setting it to zero now.\n" <<
endi;
4038 alchVdwShiftCoeff = 0.0;
4040 if (alchThermIntOn) {
4041 NAMD_die(
"alchWCA is not currently compatible with TI");
4043 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 4044 NAMD_die(
"alchWCA is not currently available with CUDA");
4049 if (alchLambda2 < 0.0 || alchLambda2 > 1.0)
4050 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
4054 if (!opts.
defined(
"alchoutfile")) {
4055 strcpy(alchOutFile, outputFilename);
4056 strcat(alchOutFile,
".fep");
4059 if (!opts.
defined(
"alchLambda") || !opts.
defined(
"alchLambda2")) {
4060 NAMD_die(
"alchFepOn is on, but alchLambda or alchLambda2 is not set.");
4063 else if (alchThermIntOn) {
4065 if (alchLambdaFreq && (alchLambda2 < 0.0 || alchLambda2 > 1.0))
4066 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
4068 if (!opts.
defined(
"alchoutfile")) {
4069 strcpy(alchOutFile, outputFilename);
4070 strcat(alchOutFile,
".ti");
4077 if ( alchOn && alchFepOn && alchThermIntOn )
4078 NAMD_die(
"Sorry, combined TI and FEP is not implemented.\n");
4079 if ( alchOn && lesOn )
4080 NAMD_die(
"Sorry, combined LES with FEP or TI is not implemented.\n");
4081 if ( alchOn && alchThermIntOn && lesOn )
4082 NAMD_die(
"Sorry, combined LES and TI is not implemented.\n");
4083 if ( alchWCAOn && !alchOn ) {
4084 iout <<
iWARN <<
"Alchemical WCA decomposition was requested but \ 4085 alchemical free energy calculation is not active. Setting \ 4086 alchWCA to off.\n" <<
endi;
4089 if ( alchDecouple && !alchOn ) {
4090 iout <<
iWARN <<
"Alchemical decoupling was requested but \ 4091 alchemical free energy calculation is not active. Setting \ 4092 alchDecouple to off.\n" <<
endi;
4093 alchDecouple =
FALSE;
4095 if ( alchBondDecouple && !alchOn ) {
4096 iout <<
iWARN <<
"Alchemical bond decoupling was requested but \ 4097 alchemical free energy calculation is not active. Setting \ 4098 alchBondDecouple to off.\n" <<
endi;
4099 alchBondDecouple =
FALSE;
4102 if ( lesOn && ( lesFactor < 1 || lesFactor > 255 ) ) {
4103 NAMD_die(
"lesFactor must be positive and less than 256");
4105 if ((pairInteractionOn && alchOn) || (pairInteractionOn && lesOn))
4106 NAMD_die(
"Sorry, pair interactions may not be calculated when LES, FEP or TI is enabled.");
4110 if ( ! langevinOn ) {
4111 NAMD_die(
"Drude model requires use of Langevin thermostat.");
4113 if ( ! opts.
defined(
"drudeDamping")) {
4114 drudeDamping = langevinDamping;
4115 iout <<
iWARN <<
"Undefined 'drudeDamping' will be set to " 4116 "value of 'langevinDamping'\n" <<
endi;
4119 NAMD_die(
"Drude implementation is incompatible with alchemical " 4120 "free energy calculation.");
4125 if (opts.
defined(
"ldBalancer")) {
4126 if (strcasecmp(loadBalancer,
"none") == 0)
4128 else if (strcasecmp(loadBalancer,
"hybrid") == 0)
4131 NAMD_die(
"Unknown ldBalancer selected");
4134 #ifdef MEM_OPT_VERSION 4139 if (opts.
defined(
"ldbStrategy")) {
4141 if (strcasecmp(loadStrategy,
"comprehensive") == 0)
4143 else if (strcasecmp(loadStrategy,
"refineonly") == 0)
4145 else if (strcasecmp(loadStrategy,
"old") == 0)
4148 NAMD_die(
"Unknown ldbStrategy selected");
4153 if (!opts.
defined(
"ldbPeriod")) {
4154 ldbPeriod=200*stepsPerCycle;
4158 if (!opts.
defined(
"firstLdbStep")) {
4159 firstLdbStep=5*stepsPerCycle;
4162 if (ldbPeriod <= firstLdbStep) {
4163 NAMD_die(
"ldbPeriod must greater than firstLdbStep.");
4166 if (!opts.
defined(
"lastLdbStep")) {
4170 if (!opts.
defined(
"hybridGroupSize")) {
4171 hybridGroupSize = 512;
4173 if ( hybridGroupSize < CkNumPes() ) {
4175 int groupsize = hybridGroupSize;
4178 CmiGetPesOnPhysicalNode(CmiPhysicalNodeID(0), &rpelist, &nodesize);
4179 if ( CkNumPes() % nodesize ) nodesize = CmiNodeSize(CmiNodeOf(0));
4180 if ( CkNumPes() % nodesize ) nodesize = 1;
4181 groupsize += nodesize - 1;
4182 while ( 2 * groupsize > CkNumPes() ) --groupsize;
4183 if ( groupsize < nodesize ) groupsize = nodesize;
4184 while ( groupsize % nodesize ) --groupsize;
4185 while ( groupsize && CkNumPes() % groupsize ) groupsize -= nodesize;
4186 if ( 2 * groupsize < hybridGroupSize ) {
4187 groupsize += nodesize;
4188 while ( CkNumPes() % groupsize ) groupsize += nodesize;
4190 if ( 2 * groupsize <= CkNumPes() ) hybridGroupSize = groupsize;
4195 bool specialTracing = traceAvailable() && (traceIsOn() == 0);
4197 if(!opts.
defined(
"traceStartStep")) {
4198 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
4200 if(!opts.
defined(
"numTraceSteps")) {
4201 numTraceSteps = 100;
4204 if(specialTracing) {
4205 if (!opts.
defined(
"firstLdbStep")) firstLdbStep = 20;
4206 if (!opts.
defined(
"ldbPeriod")) ldbPeriod = 100;
4208 if(!opts.
defined(
"traceStartStep")) {
4209 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
4212 if(!opts.
defined(
"numTraceSteps")) {
4217 #ifdef MEASURE_NAMD_WITH_PAPI 4219 if(!opts.
defined(
"papiMeasureStartStep")) {
4220 papiMeasureStartStep = 3 * firstLdbStep;
4222 if(!opts.
defined(
"numPapiMeasureSteps")) {
4223 numPapiMeasureSteps = 8;
4228 if(simulateInitialMapping) {
4229 if(!opts.
defined(
"simulatedPEs")){
4230 simulatedPEs = CkNumPes();
4232 if(!opts.
defined(
"simulatedNodeSize")){
4233 simulatedNodeSize = CkMyNodeSize();
4237 #ifdef MEM_OPT_VERSION 4246 if(ldbPeriod%stepsPerCycle!=0 || firstLdbStep%stepsPerCycle!=0) {
4247 iout <<
iWARN <<
"In memory optimized version, the ldbPeriod parameter or firstLdbStep parameter is better set to be a multiple of stepsPerCycle parameter!\n";
4251 if (N < firstTimestep) { N = firstTimestep; }
4253 if ( (firstTimestep%stepsPerCycle) != 0)
4255 NAMD_die(
"First timestep must be a multiple of stepsPerCycle!!");
4265 if ( fullDirectOn ) ++i;
4267 NAMD_die(
"More than one full electrostatics algorithm selected!!!");
4270 if (!opts.
defined(
"ldbBackgroundScaling")) {
4271 ldbBackgroundScaling = 1.0;
4273 if (!opts.
defined(
"ldbPMEBackgroundScaling")) {
4274 ldbPMEBackgroundScaling = ldbBackgroundScaling;
4276 if (!opts.
defined(
"ldbHomeBackgroundScaling")) {
4277 ldbHomeBackgroundScaling = ldbBackgroundScaling;
4282 if ( lattice.volume() == 0. ) {
4283 NAMD_die(
"PME requires periodic boundary conditions.");
4285 if ( PMEGridSpacing == 0. ) {
4286 if ( PMEGridSizeX * PMEGridSizeY * PMEGridSizeZ == 0 )
4287 NAMD_die(
"Either PMEGridSpacing or PMEGridSizeX, PMEGridSizeY, and PMEGridSizeZ must be specified.");
4288 else PMEGridSpacing = 1.5;
4290 #ifndef TEST_PME_GRID 4291 for (
int idim = 0; idim < 3; ++idim ) {
4294 const char *direction;
4296 case 0: direction =
"X";
4297 gridSize = &PMEGridSizeX; cellLength = lattice.a().length();
4299 case 1: direction =
"Y";
4300 gridSize = &PMEGridSizeY; cellLength = lattice.b().length();
4302 case 2: direction =
"Z";
4303 gridSize = &PMEGridSizeZ; cellLength = lattice.c().length();
4306 int minSize = (int) ceil(cellLength/PMEGridSpacing);
4308 for (
int minSize = 1; minSize < 300; ++minSize ) {
4310 int bestSize = 10 * (minSize + 10);
4312 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
4313 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
4317 for (
int i2 = 0; i2 <= max2; ++i2 ) {
4318 for (
int i3 = 0; i3 <= max3; ++i3 ) {
4319 for (
int i5 = 0; i5 <= max5; ++i5 ) {
4320 for (
int i7 = 0; i7 <= max7; ++i7 ) {
4321 for (
int i11 = 0; i11 <= max11; ++i11 ) {
4322 if ( i5 + i7 + i11 > i2 )
continue;
4324 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
4325 if ( testSize > bestSize )
continue;
4326 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
4327 if ( testSize > bestSize )
continue;
4328 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
4329 if ( testSize > bestSize )
continue;
4330 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
4331 if ( testSize > bestSize )
continue;
4332 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
4333 if ( testSize > bestSize )
continue;
4334 if ( testSize >= minSize ) bestSize = testSize;
4336 #ifdef TEST_PME_GRID 4337 iout << minSize <<
" " << bestSize <<
"\n" <<
endi;
4339 if ( ! *gridSize ) {
4340 *gridSize = bestSize;
4342 if ( *gridSize * PMEGridSpacing < cellLength ) {
4344 sprintf(errmsg,
"PMEGridSize%s %d is too small for cell length %f and PMEGridSpacing %f\n",
4345 direction, *gridSize, cellLength, PMEGridSpacing);
4350 if ( PMEGridSizeX < 5 ) {
4351 NAMD_die(
"PMEGridSizeX (number of grid points) is very small.");
4353 if ( PMEGridSizeY < 5 ) {
4354 NAMD_die(
"PMEGridSizeY (number of grid points) is very small.");
4356 if ( PMEGridSizeZ < 5 ) {
4357 NAMD_die(
"PMEGridSizeZ (number of grid points) is very small.");
4359 BigReal tolerance = PMETolerance;
4361 while ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) ewaldcof *= 2.0;
4363 BigReal ewaldcof_hi = ewaldcof;
4364 for (
int i = 0; i < 100; ++i ) {
4365 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
4366 if ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) {
4367 ewaldcof_lo = ewaldcof;
4369 ewaldcof_hi = ewaldcof;
4372 PMEEwaldCoefficient = ewaldcof;
4374 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 4376 if ( ! opts.
defined(
"PMEOffload") ) {
4377 PMEOffload = ( (PMEInterpOrder > 4) && one_device_per_node );
4378 if ( PMEOffload )
iout <<
iINFO <<
"Enabling PMEOffload because PMEInterpOrder > 4.\n" <<
endi;
4379 }
else if ( PMEOffload && ! one_device_per_node ) {
4381 iout <<
iWARN <<
"Disabling PMEOffload because multiple CUDA devices per process are not supported.\n" <<
endi;
4391 PMEGridSpacing = 1000.;
4392 PMEEwaldCoefficient = 0;
4397 if (LJPMESerialRealSpaceOn && ! LJPMESerialOn) {
4398 NAMD_die(
"LJPMESerial must be enabled to use LJPMESerialRealSpace.\n");
4400 else if (LJPMESerialOn && ! LJPMEOn) {
4401 NAMD_die(
"LJPME must be enabled to use LJPMESerial.\n");
4404 #if defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC) 4405 NAMD_die(
"LJ-PME does not yet support special GPU-accelerated NAMD builds.");
4407 if ( lattice.volume() == 0. ) {
4408 NAMD_die(
"LJ-PME requires periodic boundary conditions.");
4413 NAMD_die(
"LJ-PME requires also using PME.");
4415 if (config->
find(
"LJPMEGridSpacing")
4416 && LJPMEGridSpacing != PMEGridSpacing) {
4417 NAMD_die(
"LJ-PME must use same grid spacing as PME.");
4420 LJPMEGridSpacing = PMEGridSpacing;
4422 if ((config->
find(
"LJPMEGridSizeX")
4423 && LJPMEGridSizeX != PMEGridSizeX)
4424 || (config->
find(
"LJPMEGridSizeY")
4425 && LJPMEGridSizeY != PMEGridSizeY)
4426 || (config->
find(
"LJPMEGridSizeZ")
4427 && LJPMEGridSizeZ != PMEGridSizeZ)) {
4428 NAMD_die(
"LJ-PME must use same grid sizes as PME.");
4431 LJPMEGridSizeX = PMEGridSizeX;
4432 LJPMEGridSizeY = PMEGridSizeY;
4433 LJPMEGridSizeZ = PMEGridSizeZ;
4435 if (config->
find(
"LJPMEInterpOrder")
4436 && LJPMEInterpOrder != PMEInterpOrder) {
4437 NAMD_die(
"LJ-PME must use same interpolation order as PME.");
4440 LJPMEInterpOrder = PMEInterpOrder;
4443 if ( LJPMEGridSpacing == 0. ) {
4444 if ( LJPMEGridSizeX * LJPMEGridSizeY * LJPMEGridSizeZ == 0 )
4445 NAMD_die(
"Either LJPMEGridSpacing or LJPMEGridSizeX, LJPMEGridSizeY, and LJPMEGridSizeZ must be specified.");
4446 else LJPMEGridSpacing = 1.5;
4448 #ifndef TEST_PME_GRID 4449 for (
int idim = 0; idim < 3; ++idim ) {
4452 const char *direction;
4454 case 0: direction =
"X";
4455 gridSize = &LJPMEGridSizeX; cellLength = lattice.a().length();
4457 case 1: direction =
"Y";
4458 gridSize = &LJPMEGridSizeY; cellLength = lattice.b().length();
4460 case 2: direction =
"Z";
4461 gridSize = &LJPMEGridSizeZ; cellLength = lattice.c().length();
4464 int minSize = (int) ceil(cellLength/LJPMEGridSpacing);
4466 for (
int minSize = 1; minSize < 300; ++minSize ) {
4468 int bestSize = 10 * (minSize + 10);
4470 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
4471 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
4475 for (
int i2 = 0; i2 <= max2; ++i2 ) {
4476 for (
int i3 = 0; i3 <= max3; ++i3 ) {
4477 for (
int i5 = 0; i5 <= max5; ++i5 ) {
4478 for (
int i7 = 0; i7 <= max7; ++i7 ) {
4479 for (
int i11 = 0; i11 <= max11; ++i11 ) {
4480 if ( i5 + i7 + i11 > i2 )
continue;
4482 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
4483 if ( testSize > bestSize )
continue;
4484 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
4485 if ( testSize > bestSize )
continue;
4486 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
4487 if ( testSize > bestSize )
continue;
4488 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
4489 if ( testSize > bestSize )
continue;
4490 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
4491 if ( testSize > bestSize )
continue;
4492 if ( testSize >= minSize ) bestSize = testSize;
4494 #ifdef TEST_PME_GRID 4495 iout <<
"LJ-PME: " << minSize <<
" " << bestSize <<
"\n" <<
endi;
4497 if ( ! *gridSize ) {
4498 *gridSize = bestSize;
4500 if ( *gridSize * LJPMEGridSpacing < cellLength ) {
4502 sprintf(errmsg,
"LJPMEGridSize%s %d is too small for cell length %f and LJPMEGridSpacing %f\n",
4503 direction, *gridSize, cellLength, LJPMEGridSpacing);
4508 if ( LJPMEGridSizeX < 5 ) {
4509 NAMD_die(
"LJPMEGridSizeX (number of grid points) is very small.");
4511 if ( LJPMEGridSizeY < 5 ) {
4512 NAMD_die(
"LJPMEGridSizeY (number of grid points) is very small.");
4514 if ( LJPMEGridSizeZ < 5 ) {
4515 NAMD_die(
"LJPMEGridSizeZ (number of grid points) is very small.");
4517 BigReal tolerance = LJPMETolerance;
4519 BigReal aRc = ewaldcof*cutoff;
4522 BigReal damping = (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom;
4523 while ( damping >= tolerance ) {
4525 aRc = ewaldcof*cutoff;
4526 damping = (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom;
4529 BigReal ewaldcof_hi = ewaldcof;
4530 for (
int i = 0; i < 100; ++i ) {
4531 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
4532 aRc = ewaldcof*cutoff;
4533 if ( (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom >= tolerance ) {
4534 ewaldcof_lo = ewaldcof;
4536 ewaldcof_hi = ewaldcof;
4539 LJPMEEwaldCoefficient = ewaldcof;
4544 LJPMEGridSpacing = 1000.;
4545 LJPMEEwaldCoefficient = 0;
4561 if (FMAFFTBlock != 4)
4562 NAMD_die(
"FMAFFTBlock: Block length must be 4 for short FFT's");
4563 if (FMAMp % FMAFFTBlock != 0)
4564 NAMD_die(
"FMAMp: multipole term must be multiple of block length (FMAFFTBlock)");
4567 if ( (nonbondedFrequency > stepsPerCycle) || ( (stepsPerCycle % nonbondedFrequency) != 0) )
4569 NAMD_die(
"stepsPerCycle must be a multiple of nonbondedFreq");
4572 if (!LCPOOn && !GBISOn && !GBISserOn && !FMAOn && !PMEOn && !MSMOn && !fullDirectOn && !FMMOn)
4574 fullElectFrequency = 0;
4578 if (!opts.
defined(
"fullElectFrequency"))
4580 if (opts.
defined(
"fmaFrequency")) {
4581 iout <<
iWARN <<
"The parameter fmaFrequency has been renamed fullElectFrequency.\n" <<
endi;
4582 fullElectFrequency = fmaFrequency;
4584 iout <<
iWARN <<
"The parameter fullElectFrequency now defaults to nonbondedFreq (" << nonbondedFrequency <<
") rather than stepsPerCycle.\n" <<
endi;
4585 fullElectFrequency = nonbondedFrequency;
4590 if (opts.
defined(
"fmaFrequency")) {
4591 iout <<
iWARN <<
"Ignoring redundant parameter fmaFrequency in favor of fullElectFrequency.\n" <<
endi;
4593 if ( (fullElectFrequency > stepsPerCycle) || ( (stepsPerCycle % fullElectFrequency) != 0) )
4595 NAMD_die(
"stepsPerCycle must be a multiple of fullElectFrequency");
4599 if ( (nonbondedFrequency > fullElectFrequency) || ( (fullElectFrequency % nonbondedFrequency) != 0) )
4601 NAMD_die(
"fullElectFrequency must be a multiple of nonbondedFreq");
4604 if (singleTopology && fullElectFrequency > 1)
NAMD_die(
"Single topology free energy calculation discourages multiple timesteps to assure accuracy!");
4605 if (singleTopology && alchDecouple)
NAMD_die(
"Single topology free energy calculation can NOT work with alchDecouple on");
4607 if (multigratorOn) {
4608 if ( (multigratorTemperatureFreq > multigratorPressureFreq) || ( (multigratorPressureFreq % multigratorTemperatureFreq) != 0) )
4610 NAMD_die(
"multigratorTemperatureFreq must be a multiple of multigratorPressureFreq");
4612 if ( (fullElectFrequency > multigratorTemperatureFreq) || ( (multigratorTemperatureFreq % fullElectFrequency) != 0) )
4614 NAMD_die(
"fullElectFrequency must be a multiple of multigratorTemperatureFreq");
4616 if (multigratorNoseHooverChainLength <= 2) {
4617 NAMD_die(
"multigratorNoseHooverChainLength must be greater than 2");
4621 if (!opts.
defined(
"fmaTheta"))
4625 if ( lesOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4626 NAMD_die(
"Sorry, LES is only implemented for PME full electrostatics.");
4628 if ( alchFepOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4629 NAMD_die(
"Sorry, FEP is only implemented for PME full electrostatics.");
4631 if ( alchThermIntOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4632 NAMD_die(
"Sorry, TI is only implemented for PME full electrostatics.");
4634 if ( pairInteractionOn && FMAOn ) {
4635 NAMD_die(
"Sorry, pairInteraction not implemented for FMA.");
4637 if ( pairInteractionOn && useDPME ) {
4638 NAMD_die(
"Sorry, pairInteraction not implemented for DPME.");
4640 if ( pairInteractionOn && fullDirectOn ) {
4641 NAMD_die(
"Sorry, pairInteraction not implemented for full direct electrostatics.");
4643 if ( ! pairInteractionOn ) {
4644 pairInteractionSelf = 0;
4646 if ( pairInteractionOn && !pairInteractionSelf && !config->
find(
"pairInteractionGroup2"))
4647 NAMD_die(
"pairInteractionGroup2 must be specified");
4649 if ( ! fixedAtomsOn ) {
4650 fixedAtomsForces = 0;
4653 if ( gridforceOn || mgridforceOn ) {
4654 parse_mgrid_params(config);
4657 if (groupRestraintsOn) {
4658 #ifdef NODEGROUP_FORCE_REGISTER 4659 if (CUDASOAintegrateMode) {
4661 parse_group_restraints_params(config);
4663 groupRestraints.CheckGroupRestraints();
4666 sprintf(msg,
"GroupRestraints requires GPUresident.\n" 4667 " Otherwise, use Colvars for similar functionality.");
4672 sprintf(msg,
"GroupRestraints is not supported on regular multicore builds.\n" 4673 " Please use single-node GPU build with GPUresident on\n" 4674 " or use Colvars for similar functionality.");
4679 if ( extraBondsOn ) {
4680 extraBondsCosAnglesSetByUser = ! ! config->
find(
"extraBondsCosAngles");
4682 extraBondsCosAnglesSetByUser =
false;
4685 if (!opts.
defined(
"constraints"))
4688 constraintScaling = 1.0;
4691 selectConstraintsOn =
FALSE;
4695 movingConstraintsOn =
FALSE;
4698 rotConstraintsOn =
FALSE;
4703 if (rotConstraintsOn) {
4704 rotConsAxis = rotConsAxis.unit();
4707 if(opts.
defined(
"rotConstraints")
4708 && opts.
defined(
"movingConstraints")) {
4709 NAMD_die(
"Rotating and moving constraints are mutually exclusive!");
4714 if(opts.
defined(
"selectConstraints") && !opts.
defined(
"selectConstrX")
4715 && !opts.
defined(
"selectConstrY") && !opts.
defined(
"selectConstrZ")) {
4716 NAMD_die(
"selectConstraints was specified, but no Cartesian components were defined!");
4718 if (!opts.
defined(
"selectConstraints")) {
4734 if (SMDDir.length2() == 0) {
4735 NAMD_die(
"SMD direction vector must be non-zero");
4738 SMDDir = SMDDir.unit();
4741 if (SMDOutputFreq > 0 && SMDOutputFreq < stepsPerCycle
4742 || SMDOutputFreq % stepsPerCycle != 0) {
4743 NAMD_die(
"SMDOutputFreq must be a multiple of stepsPerCycle");
4751 sphericalBCr1 = 0.0;
4752 sphericalBCk1 = 0.0;
4753 sphericalBCexp1 = 0;
4754 sphericalBCr2 = 0.0;
4755 sphericalBCk2 = 0.0;
4756 sphericalBCexp2 = 0;
4758 else if (!opts.
defined(
"sphericalBCr2"))
4760 sphericalBCr2 = -1.0;
4761 sphericalBCk2 = 0.0;
4762 sphericalBCexp2 = 0;
4765 if (!cylindricalBCOn)
4767 cylindricalBCr1 = 0.0;
4768 cylindricalBCk1 = 0.0;
4769 cylindricalBCexp1 = 0;
4770 cylindricalBCr2 = 0.0;
4771 cylindricalBCk2 = 0.0;
4772 cylindricalBCexp2 = 0;
4773 cylindricalBCl1 = 0.0;
4774 cylindricalBCl2 = 0.0;
4776 else if (!opts.
defined(
"cylindricalBCr2"))
4778 cylindricalBCr2 = -1.0;
4779 cylindricalBCk2 = 0.0;
4780 cylindricalBCexp2 = 0;
4781 cylindricalBCl2 = 0.0;
4794 if (!opts.
defined(
"eFieldFreq")) eFieldFreq = 0.0;
4795 if (!opts.
defined(
"eFieldPhase")) eFieldPhase = 0.0;
4801 stirStartingTheta = 0.0;
4812 if (!opts.
defined(
"langevin"))
4818 if (!opts.
defined(
"loweAndersen"))
4820 loweAndersenTemp = 0.0;
4831 if (daCutoffDist > pairlistDist)
4832 NAMD_die(
"Hydrogen bond cutoff distance must be <= pairlist distance");
4839 if (pairInteractionOn) {
4840 if (outputEnergies != 1) {
4841 iout <<
iWARN <<
"Setting outputEnergies to 1 due to\n";
4846 if (pairInteractionOn || pressureProfileOn) {
4847 if (nonbondedFrequency != 1) {
4848 iout <<
iWARN <<
"Setting nonbondedFreq to 1 due to\n";
4849 iout <<
iWARN <<
"pairInteraction or pressure profile calculations\n" <<
endi;
4854 if (!opts.
defined(
"outputTiming"))
4856 outputTiming = firstLdbStep;
4857 int ot2 = 10 * outputEnergies;
4858 if ( outputTiming < ot2 ) outputTiming = ot2;
4867 if (fullElectFrequency > 1)
NAMD_die(
"QM/MM discourages multiple timesteps to assure accuracy!");
4869 if (opts.
defined(
"QMSecProc")){
4873 qmSecProcOn =
false;
4876 if (opts.
defined(
"qmPrepProc")){
4877 qmPrepProcOn =
true;
4880 qmPrepProcOn =
false;
4883 if (opts.
defined(
"QMParamPDB")){
4884 qmParamPDBDefined =
true;
4887 qmParamPDBDefined =
false;
4890 if (opts.
defined(
"QMBondColumn")){
4891 qmBondColumnDefined =
true;
4894 qmBondColumnDefined =
false;
4897 if (qmBondColumnDefined || qmBondGuess){
4904 if ( strcasecmp(qmSoftware,
"orca") != 0 &&
4905 strcasecmp(qmSoftware,
"mopac") != 0 &&
4906 strcasecmp(qmSoftware,
"custom") != 0 ) {
4907 NAMD_die(
"Available QM software options are \'mopac\', \'orca\', or \'custom\'.");
4910 if ( strcasecmp(qmSoftware,
"orca") == 0 )
4912 if ( strcasecmp(qmSoftware,
"mopac") == 0 )
4914 if ( strcasecmp(qmSoftware,
"custom") == 0 )
4919 if (! opts.
defined(
"QMConfigLine"))
4920 NAMD_die(
"If the selected QM software is \'mopac\' or \'orca\'\ 4921 , QMConfigLine needs to be defined.");
4927 if (opts.
defined(
"QMChargeMode")) {
4928 if ( strcasecmp(qmChrgModeS,
"none") != 0 &&
4929 strcasecmp(qmChrgModeS,
"mulliken") != 0 &&
4930 strcasecmp(qmChrgModeS,
"chelpg") != 0) {
4931 NAMD_die(
"Available charge options are \'none\', \'mulliken\' or \'chelpg\'.");
4934 if ( strcasecmp(qmChrgModeS,
"none") == 0 )
4936 if ( strcasecmp(qmChrgModeS,
"mulliken") == 0 )
4938 if ( strcasecmp(qmChrgModeS,
"chelpg") == 0 )
4944 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4947 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4949 if (qmBondOn && (opts.
defined(
"QMBondValueType"))) {
4950 if ( strcasecmp(qmBondValueTypeS,
"len") != 0 &&
4951 strcasecmp(qmBondValueTypeS,
"ratio") != 0 ) {
4952 NAMD_die(
"Available QM bond value type options are \'len\' or \'ratio\'.");
4957 if ( strcasecmp(qmBondValueTypeS,
"len") == 0 )
4959 if ( strcasecmp(qmBondValueTypeS,
"ratio") == 0 )
4963 else if (qmBondOn && ! (opts.
defined(
"QMBondValueType")))
4966 if ( strcmp(qmColumn,
"beta") != 0 &&
4967 strcmp(qmColumn,
"occ") != 0 ) {
4968 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4971 if (qmBondColumnDefined) {
4972 if ( strcmp(qmBondColumn,
"beta") != 0 &&
4973 strcmp(qmBondColumn,
"occ") != 0 ) {
4974 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4977 if (strcmp(qmBondColumn,qmColumn) == 0)
4978 NAMD_die(
"QM column and bond-column must be different!");
4982 if (opts.
defined(
"QMBondScheme")) {
4983 if ( strcasecmp(qmBondSchemeS,
"CS") == 0 )
4985 if ( strcasecmp(qmBondSchemeS,
"RCD") == 0 )
4987 if ( strcasecmp(qmBondSchemeS,
"Z1") == 0 )
4989 if ( strcasecmp(qmBondSchemeS,
"Z2") == 0 )
4991 if ( strcasecmp(qmBondSchemeS,
"Z3") == 0 )
4999 if (opts.
defined(
"QMPointChargeScheme") && qmPCSwitchOn) {
5000 if ( strcasecmp(qmPCSchemeS,
"none") == 0 )
5003 if ( strcasecmp(qmPCSchemeS,
"round") == 0 )
5005 if ( strcasecmp(qmPCSchemeS,
"zero") == 0 )
5008 if ( qmPCScheme > 1 && ! qmPCSwitchOn)
5009 NAMD_die(
"QM Charge Schemes \'round\' or \'zero\' can only be applied with QMswitching set to \'on\'!");
5021 NAMD_die(
"QM Live Solvent Selection cannot be done with QMNoPntChrg set to \'on\'!") ;
5024 NAMD_die(
"QM Live Solvent Selection cannot be done with fixed bonds!") ;
5026 if (qmLSSFreq % qmPCSelFreq != 0)
5027 NAMD_die(
"Frequency of QM solvent update must be a multiple of frequency of point charge selection.");
5029 if (qmLSSFreq % stepsPerCycle != 0)
5030 NAMD_die(
"Frequency of QM solvent update must be a multiple of steps per cycle.");
5032 if (opts.
defined(
"QMLSSMode") ) {
5033 if ( strcasecmp(qmLSSModeS,
"dist") != 0 &&
5034 strcasecmp(qmLSSModeS,
"COM") != 0 ) {
5035 NAMD_die(
"Available LSS mode options are \'dist\' and \'COM\'.");
5037 if ( strcasecmp(qmLSSModeS,
"dist") == 0 )
5039 else if ( strcasecmp(qmLSSModeS,
"COM") == 0 )
5050 if (opts.
defined(
"QMSwitchingType") ) {
5051 if ( strcasecmp(qmPCSwitchTypeS,
"shift") != 0 &&
5052 strcasecmp(qmPCSwitchTypeS,
"switch") != 0 ) {
5053 NAMD_die(
"Available scaling options are \'shift\' and \'switch\'.");
5055 if ( strcasecmp(qmPCSwitchTypeS,
"shift") == 0 )
5057 else if ( strcasecmp(qmPCSwitchTypeS,
"switch") == 0 )
5064 if (qmNoPC && qmPCSelFreq > 1) {
5065 iout <<
iWARN <<
"QMPCStride being IGNORED since QMNoPntChrg is set to \'on\'!\n" <<
endi;
5069 if (qmNoPC && qmPCSwitchOn)
5070 NAMD_die(
"QM PC switching can only be applied with QMNoPntChrg set to \'off\'!");
5075 if (qmPCSelFreq <= 0)
5076 NAMD_die(
"QMPCFreq can only be a positive number! For static point charge selection, see QMCutomPC.");
5078 if (qmCustomPCSel && qmNoPC)
5079 NAMD_die(
"QM Custom PC Selection is incompatible with QMNoPntChrg!");
5084 if (qmCustomPCSel && qmPCSelFreq > 1)
5085 NAMD_die(
"QM Custom PC Selection is incompatible with QMPCStride > 1!");
5087 if (qmCSMD && (! opts.
defined(
"QMCSMDFile") ))
5088 NAMD_die(
"QM Conditional SMD is ON, but no CSMD configuration file was profided!");
5092 if (CUDASOAintegrateMode) {
5094 CUDASOAintegrate =
TRUE;
5095 SOAintegrateOn =
TRUE;
5096 if (CkNumNodes() > 1) {
5097 GPUresidentSingleProcessMode =
FALSE;
5098 NAMD_die(
"GPU Resident mode must be run in single process mode");
5102 CUDASOAintegrate =
FALSE;
5103 GPUresidentSingleProcessMode =
FALSE;
5106 if (CUDASOAintegrateMode && (minimizeOn || minimizeCGOn)) {
5108 "GPUresident does not support \"minimization\" keyword.\n" 5109 "Instead use \"minimize\" available through Tcl scripting interface." 5113 if (SOAintegrateOn) {
5126 if (testOn || commOnly || statsOn ||
5127 minimizeOn || minimizeCGOn ||
5129 pressureProfileOn ||
5135 langevin_useBAOAB ||
5138 zeroMomentum || zeroMomentumAlt ||
5139 (constraintsOn && ! CUDASOAintegrateMode) ||
5140 (monteCarloPressureOn && ! CUDASOAintegrateMode) ||
5142 (tclForcesOn && (TCL_MAJOR_VERSION<=8 && TCL_MINOR_VERSION <6)) ||
5150 berendsenPressureOn ||
5160 tabulatedEnergies ||
5164 pairInteractionOn ||
5165 #ifdef OPENATOM_VERSION
5181 "%s is incompatible with the following options:\n" 5182 " minimization; pressure profiling; multigrator; Lowe-Andersen;\n" 5183 " fixed atoms; GBIS; LCPO; zero momentum;%s\n" 5184 " temperature coupling, rescaling, or reassignment;\n" 5185 " water models other than TIP3 and TIP4; Drude.\n" 5187 "( Bribe us with coffee to get your feature GPU-Resident! :)",
5188 (CUDASOAintegrateMode ?
"GPUresident" :
"SOAintegrate"),
5189 (CUDASOAintegrateMode ?
"" :
" Monte Carlo pressure control;"),
5190 (CUDASOAintegrateMode ?
"" :
" harmonic restraints;")
5192 char featuremsg[1024];
5193 snprintf(featuremsg,1024,
"\nConfiguration could amend the following options to proceeed :\n");
5194 if(testOn) strncat(featuremsg,
" test\n",1023);
5195 if(commOnly) strncat(featuremsg,
" commOnly\n",1023);
5196 if(statsOn) strncat(featuremsg,
" stats\n",1023);
5197 if(minimizeOn) strncat(featuremsg,
" minimize\n",1023);
5198 if(minimizeCGOn) strncat(featuremsg,
" minimizeCG\n",1023);
5199 if(maximumMove != 0) strncat(featuremsg,
" maximumMove\n",1023);
5200 if(pressureProfileOn) strncat(featuremsg,
" pressureProfile\n",1023);
5201 if(accelMDOn) strncat(featuremsg,
" accelMD\n",1023);
5202 if(adaptTempOn) strncat(featuremsg,
" adaptTemp\n",1023);
5203 if(mollyOn) strncat(featuremsg,
" molly\n",1023);
5204 if(multigratorOn) strncat(featuremsg,
" multigrator\n",1023);
5205 if(loweAndersenOn) strncat(featuremsg,
" loweAndersen\n",1023);
5206 if(langevin_useBAOAB) strncat(featuremsg,
" langevin_useBAOAB\n",1023);
5207 if(fixedAtomsOn) strncat(featuremsg,
" fixedAtoms\n",1023);
5208 if(GBISOn) strncat(featuremsg,
" GBIS\n",1023);
5209 if(LCPOOn) strncat(featuremsg,
" LCPO\n",1023);
5210 if(zeroMomentum) strncat(featuremsg,
" zeroMomentum\n",1023);
5211 if(zeroMomentumAlt) strncat(featuremsg,
" zeroMomentumAlt\n",1023);
5212 if(constraintsOn && ! CUDASOAintegrateMode) strncat(featuremsg,
" constraints\n",1023);
5213 if(monteCarloPressureOn && ! CUDASOAintegrateMode) strncat(featuremsg,
" monteCarloPressure\n",1023);
5214 if(tCoupleOn) strncat(featuremsg,
" tCouple\n",1023);
5215 if(rescaleFreq > 0) strncat(featuremsg,
" rescaleFreq\n",1023);
5216 if(watmodel ==
WaterModel::SWM4) strncat(featuremsg,
" watmodel != SWM4\n",1023);
5217 if(lonepairs) strncat(featuremsg,
" lonepairs\n",1023);
5218 if(drudeOn) strncat(featuremsg,
" drude\n",1023);
5220 if(tclForcesOn && (TCL_MAJOR_VERSION<=8 && TCL_MINOR_VERSION <6))
5222 strncat(featuremsg,
" tclForces supported in GPU resident mode only with TCL newer than 8.6, we recommended 8.6.13, your build has ",1023);
5223 strncat(featuremsg, TCL_PATCH_LEVEL,1023);
5226 if(FMAOn) strncat(featuremsg,
" FMAOn\n",1023);
5227 if(fullDirectOn) strncat(featuremsg,
" fullDirectOn\n",1023);
5228 if(MSMOn) strncat(featuremsg,
" MSMon\n",1023);
5229 if(FMMOn) strncat(featuremsg,
" FMMon\n",1023);
5230 if(globalOn) strncat(featuremsg,
" globalOn\n",1023);
5231 if(dihedralOn) strncat(featuremsg,
" dihedralOn\n",1023);
5232 if(berendsenPressureOn) strncat(featuremsg,
" berendsenPressureOn\n",1023);
5233 if(printBadContacts) strncat(featuremsg,
" printBadContacts\n",1023);
5234 if(freeEnergyOn) strncat(featuremsg,
" freeEnergyOn\n",1023);
5235 if(miscForcesOn) strncat(featuremsg,
" miscForcesOn\n",1023);
5236 if(IMDon) strncat(featuremsg,
" IMDOn\n",1023);
5237 if(TMDOn) strncat(featuremsg,
" TMDOn\n",1023);
5238 if(symmetryOn) strncat(featuremsg,
" symmetryOn\n",1023);
5239 if(qmForcesOn) strncat(featuremsg,
" qmForcesOn\n",1023);
5240 if(sphericalBCOn) strncat(featuremsg,
" sphericalBCOn\n",1023);
5241 if(cylindricalBCOn) strncat(featuremsg,
" cylindricalBCOn\n",1023);
5242 if(extForcesOn) strncat(featuremsg,
" extForcesOn\n",1023);
5243 if(tabulatedEnergies) strncat(featuremsg,
" tabulatedEnergies\n",1023);
5244 if(tclBCOn) strncat(featuremsg,
" tclBCOn\n",1023);
5245 if(lesOn) strncat(featuremsg,
" lesOn\n",1023);
5246 if(goForcesOn) strncat(featuremsg,
" goForcesOn\n",1023);
5247 if(pairInteractionOn) strncat(featuremsg,
" pairInteractionOn\n",1023);
5248 #ifdef OPENATOM_VERSION 5249 if(openatomOn) strncat(featuremsg,
" openatomOn\n",1023);
5251 if(movDragOn) strncat(featuremsg,
" movDragOn\n",1023);
5252 if(rotDragOn) strncat(featuremsg,
" rotDragOn\n",1023);
5253 if(consTorqueOn) strncat(featuremsg,
" consTorqueOn\n",1023);
5254 if(stirOn) strncat(featuremsg,
" stirOn\n",1023);
5255 if(HydrogenBonds) strncat(featuremsg,
" HydrogenBonds\n",1023);
5256 strncat(msg,featuremsg,2047);
5257 if (CUDASOAintegrateMode) {
5263 <<
"Falling back on standard integration code path\n" <<
endi;
5265 SOAintegrateOn =
FALSE;
5268 if (CUDASOAintegrateMode) {
5269 #ifndef NODEGROUP_FORCE_REGISTER 5270 NAMD_die(
"GPUresident not supported on regular multicore builds");
5272 if (monteCarloPressureOn && fixedAtomsOn) {
5273 NAMD_die(
"Monte Carlo barostat is not compatible with fixed atoms in GPU-resident mode.\n");
5276 NAMD_die(
"GPUresident does not support QM forces");
5279 NAMD_die(
"GPUresident does not support " 5280 "locally enhanced sampling");
5283 if(CkNumNodes() > 1){
5286 "GPUresident is a shared-memory, single-process mode of execution.\n" 5287 "You're probably not setting the '++ppn' flags accordingly or\n" 5288 "the Charm++ build is not a multicore build and you're spawning\n" 5289 "multiple processes, which is not cool." 5292 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5296 if(monteCarloPressureOn){
5297 NAMD_die(
"Monte Carlo barostat is not compatible with multi-GPU GPUresident");
5303 <<
"Running with GPU-resident mode\n" 5309 NAMD_die(
"SOAintegrate is not fully supported. Please use GPUresident instead.");
5314 if (!CUDASOAintegrateMode && monteCarloPressureOn) {
5315 NAMD_die(
"GPUresident is required for Monte Carlo pressure control. \n");
5318 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5319 if (CUDASOAintegrateMode) {
5328 if ( useCUDAdisable ) {
5332 iout <<
iWARN <<
"Disabling GPU kernel for bonds due to incompatibility with Drude oscillators.\n";
5337 iout <<
iWARN <<
"Disabling GPU kernels for dihedrals and crossterms due to incompatibility with accelerated MD options.\n";
5341 if ( alchOn || !switchingActive || vdwForceSwitching || martiniSwitching || !PMEOn ||
5342 longSplitting!=
C1 || scale14!=1.0 || limitDist > 0.0) {
5343 useCUDANonbondedForceTable =
TRUE;
5344 iout <<
iWARN <<
"Always using force tables for GPU nonbonded kernel due to unsupported config parameters.\n";
5347 if (useDeviceMigration && !CUDASOAintegrateMode) {
5348 useDeviceMigration =
FALSE;
5349 iout <<
iWARN <<
"GPUAtomMigration is only supported for GPUresident. Disabling GPUAtomMigration.\n";
5352 if ( useDeviceMigration ) {
5353 if (constraintsOn || SMDOn || groupRestraintsOn || eFieldOn || fixedAtomsOn || monteCarloPressureOn ||
5354 tclForcesOn || colvarsOn || gridforceOn || mgridforceOn || consForceOn || useCudaGlobal || IMDon) {
5355 updateAtomMap =
TRUE;
5360 NAMD_die(
"Fixed atoms are not supported in GPUAtomMigration.\n");
5363 if ( useDeviceMigration ) {
5364 iout <<
iWARN <<
"GPUAtomMigration is experimental\n";
5366 if ( !GPUresidentSingleProcessMode ) {
5367 if (monteCarloPressureOn) {
5368 NAMD_die(
"MC Pressure is not supported with GPU resident multi-process mode\n");
5372 if (drudeNbtholeCut * drudeNbtholeCut > cutoff * cutoff) {
5373 NAMD_die(
"The GPU implementation of NbThole expects drudeNbtholeCut to be greater than cutoff!\n");
5378 #ifdef NAMD_AVXTILES 5379 if (avxTilesCommandLineDisable) useAVXTiles =
FALSE;
5381 if (alchOn || lesOn || tabulatedEnergies || drudeOn || goForcesOn ||
5382 pressureProfileOn || qmForcesOn || LJPMEOn) {
5383 useAVXTiles =
FALSE;
5384 iout <<
iWARN <<
"Disabling AVX tiles optimizations due to " 5385 <<
"incompatible simulation params.\n";
5389 useAVXTiles =
FALSE;
5401 iout <<
iINFO <<
"SIMULATION PARAMETERS:\n";
5403 iout <<
iINFO <<
"NUMBER OF STEPS " << N <<
"\n";
5404 iout <<
iINFO <<
"STEPS PER CYCLE " << stepsPerCycle <<
"\n";
5407 if ( lattice.a_p() || lattice.b_p() || lattice.c_p() ) {
5408 if ( lattice.a_p() )
5409 iout <<
iINFO <<
"PERIODIC CELL BASIS 1 " << lattice.a() <<
"\n";
5410 if ( lattice.b_p() )
5411 iout <<
iINFO <<
"PERIODIC CELL BASIS 2 " << lattice.b() <<
"\n";
5412 if ( lattice.c_p() )
5413 iout <<
iINFO <<
"PERIODIC CELL BASIS 3 " << lattice.c() <<
"\n";
5414 iout <<
iINFO <<
"PERIODIC CELL CENTER " << lattice.origin() <<
"\n";
5416 iout <<
iINFO <<
"WRAPPING WATERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
5419 iout <<
iINFO <<
"WRAPPING ALL CLUSTERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
5422 iout <<
iINFO <<
"WRAPPING TO IMAGE NEAREST TO PERIODIC CELL CENTER.\n";
5427 if ( CkNumPes() > 512 ) ldbUnloadOne =
TRUE;
5428 if ( ldbUnloadOne || CkNumPes() > 128 ) ldbUnloadZero =
TRUE;
5440 iout <<
iINFO <<
"LOAD BALANCING STRATEGY New Load Balancers -- DEFAULT\n";
5442 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Refinement Only\n";
5444 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Comprehensive\n";
5446 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Old Load Balancers\n";
5449 iout <<
iINFO <<
"LDB PERIOD " << ldbPeriod <<
" steps\n";
5450 iout <<
iINFO <<
"FIRST LDB TIMESTEP " << firstLdbStep <<
"\n";
5452 iout <<
iINFO <<
"HYBRIDLB GROUP SIZE " << hybridGroupSize <<
"\n";
5453 iout <<
iINFO <<
"LAST LDB TIMESTEP " << lastLdbStep <<
"\n";
5454 if ( ldbRelativeGrainsize > 0. )
5455 iout <<
iINFO <<
"LDB RELATIVE GRAINSIZE " << ldbRelativeGrainsize <<
"\n";
5456 iout <<
iINFO <<
"LDB BACKGROUND SCALING " << ldbBackgroundScaling <<
"\n";
5457 iout <<
iINFO <<
"HOM BACKGROUND SCALING " << ldbHomeBackgroundScaling <<
"\n";
5459 iout <<
iINFO <<
"PME BACKGROUND SCALING " 5460 << ldbPMEBackgroundScaling <<
"\n";
5462 iout <<
iINFO <<
"REMOVING LOAD FROM PME NODES" <<
"\n";
5464 if ( ldbUnloadZero )
iout <<
iINFO <<
"REMOVING LOAD FROM NODE 0\n";
5465 if ( ldbUnloadOne )
iout <<
iINFO <<
"REMOVING LOAD FROM NODE 1\n";
5466 if ( ldbUnloadOutputPEs )
iout <<
iINFO <<
"REMOVING LOAD FROM OUTPUT PES\n";
5470 if ( ldbUnloadOne || CkNumPes() > 256 ) noPatchesOnOne =
TRUE;
5471 if ( ldbUnloadZero || noPatchesOnOne ||
5472 CkNumPes() > 64 || ( IMDon && CkNumPes() > 8 ) ) {
5473 noPatchesOnZero =
TRUE;
5475 if ( (noPatchesOnZero || noPatchesOnOne) && CUDASOAintegrateMode ) {
5476 noPatchesOnZero =
FALSE;
5477 noPatchesOnOne =
FALSE;
5478 iout <<
iWARN <<
"OVERRIDING NOPATCH SETTING. Not supported with GPUresident on\n";
5480 if ( noPatchesOnZero )
iout <<
iINFO <<
"REMOVING PATCHES FROM PROCESSOR 0\n";
5481 if ( noPatchesOnOne )
iout <<
iINFO <<
"REMOVING PATCHES FROM PROCESSOR 1\n";
5484 #if defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC) 5485 maxSelfPart = maxPairPart = 1;
5489 iout <<
iINFO <<
"MAX SELF PARTITIONS " << maxSelfPart <<
"\n" 5490 <<
iINFO <<
"MAX PAIR PARTITIONS " << maxPairPart <<
"\n" 5491 <<
iINFO <<
"SELF PARTITION ATOMS " << numAtomsSelf <<
"\n" 5492 <<
iINFO <<
"SELF2 PARTITION ATOMS " << numAtomsSelf2 <<
"\n" 5493 <<
iINFO <<
"PAIR PARTITION ATOMS " << numAtomsPair <<
"\n" 5494 <<
iINFO <<
"PAIR2 PARTITION ATOMS " << numAtomsPair2 <<
"\n";
5496 iout <<
iINFO <<
"MIN ATOMS PER PATCH " << minAtomsPerPatch <<
"\n" 5497 <<
iINFO <<
"EMPTY PATCH LOAD " << emptyPatchLoad <<
" ATOMS\n" 5500 if (initialTemp < 0)
5502 current = config->
find(
"velocities");
5504 if (current == NULL)
5506 current = config->
find(
"binvelocities");
5514 << initialTemp <<
"\n";
5518 iout <<
iINFO <<
"CENTER OF MASS MOVING INITIALLY? ";
5530 if ( zeroMomentum ) {
5531 iout <<
iINFO <<
"REMOVING CENTER OF MASS DRIFT DURING SIMULATION";
5532 if ( zeroMomentumAlt )
iout <<
" (ALT METHOD)";
5537 << dielectric <<
"\n";
5539 if ( nonbondedScaling != 1.0 )
5541 iout <<
iINFO <<
"NONBONDED SCALING " << nonbondedScaling <<
"\n" <<
endi;
5554 iout <<
"ONETHREE\n";
5557 iout <<
"ONE-FOUR\n";
5560 iout <<
"SCALED ONE-FOUR\n";
5567 iout <<
iINFO <<
"1-4 ELECTROSTATICS SCALED BY " << scale14 <<
"\n";
5568 iout <<
iINFO <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE USED\n" <<
endi;
5570 iout <<
iWARN <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE IGNORED\n" <<
endi;
5573 #ifdef SPEC_DISABLED_VERSION 5574 if (dcdFrequency > 0) {
5576 iout <<
iWARN <<
"DCD TRAJECTORY OUTPUT IS DISABLED IN SPEC RELEASE\n";
5580 if (dcdFrequency > 0)
5583 << dcdFilename <<
"\n";
5585 << dcdFrequency <<
"\n";
5587 << ( ((firstTimestep + dcdFrequency)/dcdFrequency)*dcdFrequency ) <<
"\n";
5588 if ( dcdUnitCell ) {
5589 iout <<
iINFO <<
"DCD FILE WILL CONTAIN UNIT CELL DATA\n";
5594 iout <<
iINFO <<
"NO DCD TRAJECTORY OUTPUT\n";
5598 if (xstFrequency > 0)
5601 << xstFilename <<
"\n";
5603 << xstFrequency <<
"\n";
5607 iout <<
iINFO <<
"NO EXTENDED SYSTEM TRAJECTORY OUTPUT\n";
5611 if (velDcdFrequency > 0)
5613 iout <<
iINFO <<
"VELOCITY DCD FILENAME " 5614 << velDcdFilename <<
"\n";
5615 iout <<
iINFO <<
"VELOCITY DCD FREQUENCY " 5616 << velDcdFrequency <<
"\n";
5617 iout <<
iINFO <<
"VELOCITY DCD FIRST STEP " 5618 << ( ((firstTimestep + velDcdFrequency)/velDcdFrequency)*velDcdFrequency ) <<
"\n";
5622 iout <<
iINFO <<
"NO VELOCITY DCD OUTPUT\n";
5626 if (forceDcdFrequency > 0)
5629 << forceDcdFilename <<
"\n";
5631 << forceDcdFrequency <<
"\n";
5632 iout <<
iINFO <<
"FORCE DCD FIRST STEP " 5633 << ( ((firstTimestep + forceDcdFrequency)/forceDcdFrequency)*forceDcdFrequency ) <<
"\n";
5637 iout <<
iINFO <<
"NO FORCE DCD OUTPUT\n";
5642 << outputFilename <<
"\n" <<
endi;
5645 iout <<
iINFO <<
"BINARY OUTPUT FILES WILL BE USED\n" <<
endi;
5647 #ifdef MEM_OPT_VERSION 5649 iout <<
iWARN <<
"SINCE MEMORY OPTIMIZED VERSION IS USED, OUTPUT IN TEXT FORMAT IS DISABLED!\n" <<
endi;
5650 binaryOutput =
TRUE;
5654 if (! restartFrequency)
5661 << restartFilename <<
"\n";
5663 << restartFrequency <<
"\n";
5665 iout <<
iINFO <<
"RESTART FILES WILL NOT BE OVERWRITTEN\n";
5667 if (restartSaveDcd) {
5668 iout <<
iINFO <<
"DCD FILE WILL BE SPLIT WHEN RESTART FILES ARE WRITTEN\n";
5673 iout <<
iINFO <<
"BINARY RESTART FILES WILL BE USED\n";
5679 iout <<
iINFO <<
"NAMD will save positions and velocities to " << crashFilename <<
" when ";
5685 if (switchingActive)
5688 if ( vdwForceSwitching ) {
5689 iout <<
iINFO <<
"VDW FORCE SWITCHING ACTIVE\n";
5691 if ( martiniSwitching ) {
5692 iout <<
iINFO <<
"MARTINI RESIDUE-BASED COARSE-GRAIN SWITCHING ACTIVE\n";
5695 << switchingDist <<
"\n";
5705 iout <<
iINFO <<
"PAIRLIST DISTANCE " << pairlistDist <<
"\n";
5706 iout <<
iINFO <<
"PAIRLIST SHRINK RATE " << pairlistShrink <<
"\n";
5707 iout <<
iINFO <<
"PAIRLIST GROW RATE " << pairlistGrow <<
"\n";
5708 iout <<
iINFO <<
"PAIRLIST TRIGGER " << pairlistTrigger <<
"\n";
5709 iout <<
iINFO <<
"PAIRLISTS PER CYCLE " << pairlistsPerCycle <<
"\n";
5710 if ( outputPairlists )
5711 iout <<
iINFO <<
"PAIRLIST OUTPUT STEPS " << outputPairlists <<
"\n";
5714 if ( pairlistMinProcs > 1 )
5715 iout <<
iINFO <<
"REQUIRING " << pairlistMinProcs <<
" PROCESSORS FOR PAIRLISTS\n";
5716 usePairlists = ( CkNumPes() >= pairlistMinProcs );
5718 #ifdef OPENATOM_VERSION 5721 iout <<
iINFO <<
"OPENATOM QM/MM CAR-PARINELLO ACTIVE\n";
5722 iout <<
iINFO <<
"OPENATOM CONFIG FILE: " << openatomConfig <<
"\n";
5723 iout <<
iINFO <<
"OPENATOM STRUCT FILE: " << openatomStruct <<
"\n";
5724 iout <<
iINFO <<
"OPENATOM PDB FILE: " << openatomPDB <<
"\n";
5726 #endif // OPENATOM_VERSION 5729 if ( (alchOn) && (!usePairlists)) {
5730 NAMD_die(
"Sorry, Alchemical simulations require pairlists to be enabled\n");
5732 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5733 if ( ! usePairlists ) {
5735 iout <<
iINFO <<
"GPU ACCELERATION REQUIRES PAIRLISTS\n";
5739 iout <<
iINFO <<
"PAIRLISTS " << ( usePairlists ?
"ENABLED" :
"DISABLED" )
5742 iout <<
iINFO <<
"MARGIN " << margin <<
"\n";
5743 if ( margin > 4.0 ) {
5744 iout <<
iWARN <<
"MARGIN IS UNUSUALLY LARGE AND WILL LOWER PERFORMANCE\n";
5745 BigReal f = patchDimension/(patchDimension-margin);
5747 iout <<
iWARN <<
"MARGIN INCREASED PATCH VOLUME BY A FACTOR OF " << f <<
"\n";
5751 iout <<
iINFO <<
"HYDROGEN GROUP CUTOFF " << hgroupCutoff <<
"\n";
5755 << patchDimension <<
"\n";
5759 if (outputEnergies != 1)
5762 << outputEnergies <<
"\n";
5766 if (!opts.
defined(
"computeEnergies")) {
5767 computeEnergies = outputEnergies;
5770 if (computeEnergies != 1)
5774 if (outputEnergies % computeEnergies != 0) {
5775 const std::string err_msg = std::string{
"The period of outputting energies (outputEnergies = "}
5776 + std::to_string(outputEnergies)
5777 + std::string{
") is not a multiple of the period of computing energies (computeEnergies = "}
5778 + std::to_string(computeEnergies)
5779 + std::string{
").\n"};
5782 if (alchOn && (alchOutFreq % computeEnergies != 0)) {
5784 const std::string err_msg = std::string{
"The period of outputting energies relating to alchemical transformations (alchOutFreq = "}
5785 + std::to_string(alchOutFreq)
5786 + std::string{
") is not a multiple of the period of computing energies (computeEnergies = "}
5787 + std::to_string(computeEnergies)
5788 + 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"};
5792 iout <<
iINFO <<
"ENERGY EVALUATION STEPS " 5793 << computeEnergies <<
"\n";
5797 iout <<
iINFO <<
"OUTPUT ENERGY PRECISION " << outputEnergiesPrecision <<
"\n";
5799 if (mergeCrossterms) {
5800 iout <<
iINFO <<
"CROSSTERM ENERGY INCLUDED IN DIHEDRAL\n" <<
endi;
5803 if (outputMomenta != 0)
5805 iout <<
iINFO <<
"MOMENTUM OUTPUT STEPS " 5806 << outputMomenta <<
"\n";
5810 if (outputTiming != 0)
5813 << outputTiming <<
"\n";
5817 if (outputCudaTiming != 0)
5819 iout <<
iINFO <<
"GPU TIMING OUTPUT STEPS " 5820 << outputCudaTiming <<
"\n";
5824 if (outputPressure != 0)
5826 iout <<
iINFO <<
"PRESSURE OUTPUT STEPS " 5827 << outputPressure <<
"\n";
5833 iout <<
iINFO <<
"FIXED ATOMS ACTIVE\n";
5834 if ( fixedAtomsForces )
5835 iout <<
iINFO <<
"FORCES BETWEEN FIXED ATOMS ARE CALCULATED\n";
5841 iout <<
iINFO <<
"HARMONIC CONSTRAINTS ACTIVE\n";
5844 << constraintExp <<
"\n";
5846 if (constraintScaling != 1.0) {
5847 iout <<
iINFO <<
"HARMONIC CONS SCALING " 5848 << constraintScaling <<
"\n";
5853 if (selectConstraintsOn) {
5854 iout <<
iINFO <<
"SELECTED CARTESIAN COMPONENTS OF HARMONIC RESTRAINTS ACTIVE\n";
5857 iout <<
iINFO <<
"RESTRAINING X-COMPONENTS OF CARTESIAN COORDINATES!\n";
5860 iout <<
iINFO <<
"RESTRAINING Y-COMPONENTS OF CARTESIAN COORDINATES!\n";
5863 iout <<
iINFO <<
"RESTRAINING Z-COMPONENTS OF CARTESIAN COORDINATES!\n";
5867 if (sphericalConstraintsOn) {
5868 iout <<
iINFO <<
"SPHERICAL HARMONIC CONSTRAINTS ACTIVE\n";
5869 iout <<
iINFO <<
"RESTRAINING DISTANCE TO " << sphericalConstrCenter <<
"\n";
5875 if (movingConstraintsOn) {
5876 iout <<
iINFO <<
"MOVING HARMONIC CONSTRAINTS ACTIVE\n";
5878 iout <<
iINFO <<
"MOVING CONSTRAINT VELOCITY " 5879 << movingConsVel <<
" ANGSTROM/TIMESTEP\n";
5881 iout <<
iINFO <<
"ALL CONSTRAINED ATOMS WILL MOVE\n";
5888 if (rotConstraintsOn) {
5889 iout <<
iINFO <<
"ROTATING HARMONIC CONSTRAINTS ACTIVE\n";
5892 << rotConsAxis <<
"\n";
5895 << rotConsPivot <<
"\n";
5897 iout <<
iINFO <<
"ROTATING CONSTRAINT VELOCITY " 5898 << rotConsVel <<
" DEGREES/TIMESTEP\n";
5906 iout <<
iINFO <<
"MOVING DRAG ACTIVE.\n";
5908 iout <<
iINFO <<
"MOVING DRAG MAIN PDB FILE " 5909 << movDragFile <<
"\n";
5911 iout <<
iINFO <<
"MOVING DRAG GLOBAL VELOCITY (A/step) " 5912 << movDragGlobVel <<
"\n";
5914 iout <<
iINFO <<
"MOVING DRAG LINEAR VELOCITY FILE " 5915 << movDragVelFile <<
"\n";
5922 iout <<
iINFO <<
"ROTATING DRAG ACTIVE.\n";
5924 iout <<
iINFO <<
"ROTATING DRAG MAIN PDB FILE " 5925 << rotDragFile <<
"\n";
5927 iout <<
iINFO <<
"ROTATING DRAG AXIS FILE " 5928 << rotDragAxisFile <<
"\n";
5930 iout <<
iINFO <<
"ROTATING DRAG PIVOT POINT FILE " 5931 << rotDragPivotFile <<
"\n";
5933 iout <<
iINFO <<
"ROTATING DRAG GLOBAL ANGULAR VELOCITY (deg/step) " 5934 << rotDragGlobVel <<
"\n";
5936 iout <<
iINFO <<
"ROTATING DRAG ANGULAR VELOCITY FILE " 5937 << rotDragVelFile <<
"\n";
5945 iout <<
iINFO <<
"\"CONSTANT\" TORQUE ACTIVE.\n";
5947 iout <<
iINFO <<
"\"CONSTANT\" TORQUE MAIN PDB FILE " 5948 << consTorqueFile <<
"\n";
5950 iout <<
iINFO <<
"\"CONSTANT\" TORQUE AXIS FILE " 5951 << consTorqueAxisFile <<
"\n";
5953 iout <<
iINFO <<
"\"CONSTANT\" TORQUE PIVOT POINT FILE " 5954 << consTorquePivotFile <<
"\n";
5956 iout <<
iINFO <<
"\"CONSTANT\" TORQUE GLOBAL VALUE (Kcal/(mol*A^2)) " 5957 << consTorqueGlobVal <<
"\n";
5959 iout <<
iINFO <<
"\"CONSTANT\" TORQUE DACTORS FILE " 5960 << consTorqueValFile <<
"\n";
5967 iout <<
iINFO <<
" Please include this reference in published work using\n";
5968 iout <<
iINFO <<
" the Gridforce module of NAMD: David Wells, Volha Abramkina,\n";
5969 iout <<
iINFO <<
" and Aleksei Aksimentiev, J. Chem. Phys. 127:125101-10 (2007).\n";
5970 print_mgrid_params();
5973 if (groupRestraintsOn) {
5974 iout <<
iINFO <<
"GROUP RESTRAINTS ACTIVE\n";
5975 groupRestraints.PrintGroupRestraints();
5984 << SMDVel <<
" ANGSTROM/TIMESTEP\n";
5995 iout <<
iINFO <<
"SMD OUTPUT FREQUENCY " 5996 << SMDOutputFreq <<
" TIMESTEPS\n";
5998 iout <<
iINFO <<
"SMD FILE " << SMDFile <<
"\n";
6006 iout <<
iINFO <<
"TMD ACTIVE BETWEEN STEPS " << TMDFirstStep
6007 <<
" and " << TMDLastStep <<
"\n";
6008 iout <<
iINFO <<
"TMD K " << TMDk <<
"\n";
6009 iout <<
iINFO <<
"TMD FILE " << TMDFile <<
"\n";
6010 iout <<
iINFO <<
"TMD OUTPUT FREQUENCY " << TMDOutputFreq <<
"\n";
6011 if (TMDInitialRMSD) {
6012 iout <<
iINFO <<
"TMD TARGET RMSD AT FIRST STEP " << TMDInitialRMSD <<
"\n";
6014 iout <<
iINFO <<
"TMD TARGET RMSD AT FIRST STEP COMPUTED FROM INITIAL COORDINATES\n";
6016 iout <<
iINFO <<
"TMD TARGET RMSD AT FINAL STEP " << TMDFinalRMSD <<
"\n";
6021 if (symmetryLastStep == -1){
6022 iout <<
iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " <<
"INFINITY" <<
"\n";
6025 iout <<
iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " << symmetryLastStep <<
"\n";
6029 current = config->
find(
"symmetryFile");
6030 for ( ; current; current = current->
next ) {
6034 current = config->
find(
"symmetryMatrixFile");
6035 for ( ; current; current = current->
next ) {
6036 iout <<
iINFO <<
"SYMMETRY MATRIX FILE " << current->
data <<
"\n";
6038 iout <<
iINFO <<
"SYMMETRY FORCE CONSTANT " << symmetryk <<
"\n";
6039 if (symmetryScaleForces){
6040 iout <<
iINFO <<
"SYMMETRY SCALE FORCES ON\n";
6042 iout <<
iINFO <<
"SYMMETRY FIRST FULL STEP " << symmetryFirstFullStep <<
"\n";
6043 if (symmetryLastFullStep == -1){
6044 iout <<
iINFO <<
"SYMMETRY LAST FULL STEP " <<
"INFINITY" <<
"\n";
6048 iout <<
iINFO <<
"SYMMETRY LAST FULL STEP " << symmetryLastFullStep <<
"\n";
6061 iout <<
iINFO <<
"FEP CURRENT LAMBDA VALUE " 6062 << alchLambda <<
"\n";
6063 iout <<
iINFO <<
"FEP COMPARISON LAMBDA VALUE " 6064 << alchLambda2 <<
"\n";
6065 if (alchLambdaIDWS >= 0.) {
6066 iout <<
iINFO <<
"FEP ALTERNATE COMPARISON LAMBDA VALUE " 6067 << alchLambdaIDWS <<
"\n";
6069 if (alchLambdaFreq > 0) {
6070 iout <<
iINFO <<
"FEP CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY " 6071 << alchLambdaFreq <<
" STEPS\n";
6073 if (!alchDecouple) {
6074 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6077 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6080 if (alchBondDecouple) {
6081 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6084 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6088 iout <<
iINFO <<
"FEP WEEKS-CHANDLER-ANDERSEN (WCA) VDW DECOUPLING " 6091 iout <<
iINFO <<
"FEP VDW SHIFTING COEFFICIENT " 6092 << alchVdwShiftCoeff <<
"\n";
6094 iout <<
iINFO <<
"FEP ELEC. ACTIVE FOR ANNIHILATED " 6095 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6096 << (1 - alchElecLambdaStart) <<
"\n";
6097 iout <<
iINFO <<
"FEP ELEC. ACTIVE FOR EXNIHILATED " 6098 <<
"PARTICLES BETWEEN LAMBDA = " 6099 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
6101 iout <<
iINFO <<
"FEP VDW-REPU. ACTIVE FOR ANNIHILATED PARTICLES " 6102 <<
"BETWEEN LAMBDA = " << (1 - alchRepLambdaEnd) <<
" AND LAMBDA " 6104 iout <<
iINFO <<
"FEP VDW-REPU. ACTIVE FOR EXNIHILATED PARTICLES " 6105 <<
"BETWEEN LAMBDA = 0 AND LAMBDA " << alchRepLambdaEnd <<
"\n";
6106 iout <<
iINFO <<
"FEP VDW-ATTR. ACTIVE FOR ANNIHILATED PARTICLES " 6107 <<
"BETWEEN LAMBDA = " << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = " 6108 << (1 - alchRepLambdaEnd) <<
"\n";
6109 iout <<
iINFO <<
"FEP VDW-ATTR. ACTIVE FOR EXNIHILATED PARTICLES " 6110 <<
"BETWEEN LAMBDA = " << alchRepLambdaEnd <<
" AND LAMBDA = " 6111 << alchVdwLambdaEnd <<
"\n";
6113 iout <<
iINFO <<
"FEP VDW ACTIVE FOR ANNIHILATED " 6114 <<
"PARTICLES BETWEEN LAMBDA = " 6115 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
6116 iout <<
iINFO <<
"FEP VDW ACTIVE FOR EXNIHILATED " 6117 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6118 << alchVdwLambdaEnd <<
"\n";
6120 iout <<
iINFO <<
"FEP BOND ACTIVE FOR ANNIHILATED " 6121 <<
"PARTICLES BETWEEN LAMBDA = " 6122 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
6123 iout <<
iINFO <<
"FEP BOND ACTIVE FOR EXNIHILATED " 6124 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6125 << alchBondLambdaEnd <<
"\n";
6131 iout <<
iINFO <<
"THERMODYNAMIC INTEGRATION (TI) ON\n";
6133 << alchLambda <<
"\n";
6134 if (alchLambdaFreq > 0) {
6135 iout <<
iINFO <<
"TI COMPARISON LAMBDA VALUE " 6136 << alchLambda2 <<
"\n";
6137 iout <<
iINFO <<
"TI CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY " 6138 << alchLambdaFreq <<
" STEPS\n";
6140 if (!alchDecouple) {
6141 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6144 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6147 if (alchBondDecouple) {
6148 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6151 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6154 iout <<
iINFO <<
"TI VDW SHIFTING COEFFICIENT " 6155 << alchVdwShiftCoeff <<
"\n";
6156 iout <<
iINFO <<
"TI ELEC. ACTIVE FOR ANNIHILATED " 6157 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6158 << (1 - alchElecLambdaStart) <<
"\n";
6159 iout <<
iINFO <<
"TI ELEC. ACTIVE FOR EXNIHILATED " 6160 <<
"PARTICLES BETWEEN LAMBDA = " 6161 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
6162 iout <<
iINFO <<
"TI VDW ACTIVE FOR ANNIHILATED " 6163 <<
"PARTICLES BETWEEN LAMBDA = " 6164 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
6165 iout <<
iINFO <<
"TI VDW ACTIVE FOR EXNIHILATED " 6166 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6167 << alchVdwLambdaEnd <<
"\n";
6168 iout <<
iINFO <<
"TI BOND ACTIVE FOR ANNIHILATED " 6169 <<
"PARTICLES BETWEEN LAMBDA = " 6170 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
6171 iout <<
iINFO <<
"TI BOND ACTIVE FOR EXNIHILATED " 6172 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6173 << alchBondLambdaEnd <<
"\n";
6178 iout <<
iINFO <<
"LOCALLY ENHANCED SAMPLING ACTIVE\n";
6179 iout <<
iINFO <<
"LOCAL ENHANCEMENT FACTOR IS " 6180 << lesFactor <<
"\n";
6182 <<
"SCALING ENHANCED ATOM TEMPERATURE BY 1/" << lesFactor <<
"\n";
6184 <<
"SCALING ENHANCED ATOM MASS BY 1/" << lesFactor <<
"\n";
6187 if ( singleTopology ) {
6188 iout <<
iINFO <<
"SINGLE TOPOLOGY IS ON FOR RELATIVE FREE ENERGY CALCULATION\n";
6192 if ( soluteScalingOn ) {
6193 iout <<
iINFO <<
"SOLUTE SCALING IS ACTIVE\n";
6194 if (soluteScalingFactorCharge != soluteScalingFactorVdw) {
6195 iout <<
iINFO <<
"SCALING FOR ELECTROSTATIC INTERACTIONS IS " 6196 << soluteScalingFactorCharge <<
"\n";
6197 iout <<
iINFO <<
"SCALING FOR VAN DER WAALS INTERACTIONS IS " 6198 << soluteScalingFactorVdw <<
"\n";
6199 iout <<
iINFO <<
"SCALING FOR BONDED INTERACTIONS IS " 6200 << soluteScalingFactor <<
"\n";
6203 iout <<
iINFO <<
"SOLUTE SCALING FACTOR IS " 6204 << soluteScalingFactor <<
"\n";
6206 if ( ! soluteScalingAll ) {
6207 iout <<
iINFO <<
"SOLUTE SCALING DISABLED FOR BONDS AND ANGLES\n";
6211 if ( pairInteractionOn ) {
6212 iout <<
iINFO <<
"PAIR INTERACTION CALCULATIONS ACTIVE\n";
6213 iout <<
iINFO <<
"USING FLAG " << pairInteractionGroup1
6214 <<
" FOR GROUP 1\n";
6215 if (pairInteractionSelf) {
6216 iout <<
iINFO <<
"COMPUTING ONLY SELF INTERACTIONS FOR GROUP 1 ATOMS\n";
6218 iout <<
iINFO <<
"USING FLAG " << pairInteractionGroup2
6219 <<
" FOR GROUP 2\n";
6224 iout <<
iINFO <<
"CONSTANT FORCE ACTIVE\n";
6225 if ( consForceScaling != 1.0 ) {
6226 iout <<
iINFO <<
"CONSTANT FORCE SCALING " 6227 << consForceScaling <<
"\n" <<
endi;
6235 iout <<
iINFO <<
"EXTERNAL COMMAND FORCES ACTIVE\n";
6236 iout <<
iINFO <<
"EXT FORCES COMMAND: " << extForcesCommand <<
"\n";
6237 iout <<
iINFO <<
"EXT COORD FILENAME: " << extCoordFilename <<
"\n";
6238 iout <<
iINFO <<
"EXT FORCE FILENAME: " << extForceFilename <<
"\n";
6246 if (qmParamPDBDefined){
6247 iout <<
iINFO <<
"QM PDB PARAMETER FILE: " << qmParamPDB <<
"\n";
6249 iout <<
iINFO <<
"QM SOFTWARE: " << qmSoftware <<
"\n";
6252 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: NONE\n";
6254 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: MULLIKEN\n";
6256 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: CHELPG\n";
6258 iout <<
iINFO <<
"QM EXECUTABLE PATH: " << qmExecPath <<
"\n";
6259 iout <<
iINFO <<
"QM COLUMN: " << qmColumn <<
"\n";
6261 iout <<
iINFO <<
"QM WILL DETECT BONDS BETWEEN QM AND MM ATOMS.\n";
6264 iout <<
iINFO <<
"QM BONDS WILL BE GUESSED FROM TOPOLOGY AND QM REGIONS.\n";
6266 if (qmBondColumnDefined) {
6267 iout <<
iINFO <<
"QM BOND COLUMN: " << qmBondColumn <<
"\n";
6270 iout <<
iINFO <<
"QM BOND COLUMN WILL DEFINE LINK AOTM DISTANCE.\n";
6271 if (qmBondValType == 1)
6272 iout <<
iINFO <<
"QM BOND COLUMN HAS LENGTH INFORMATION.\n";
6273 else if (qmBondValType == 2)
6274 iout <<
iINFO <<
"QM BOND COLUMN HAS RATIO INFORMATION.\n";
6277 iout <<
iINFO <<
"MECHANICHAL EMBEDDING SELECTED." 6278 " BOND SCHEME WILL BE IGNORED!\n" <<
endi;
6283 iout <<
iINFO <<
"QM-MM BOND SCHEME: Charge Shift.\n";
6285 iout <<
iINFO <<
"QM-MM BOND SCHEME: Redistributed Charge and Dipole.\n";
6287 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z1.\n";
6289 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z2.\n";
6291 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z3.\n";
6296 if (qmChrgFromPSF) {
6297 iout <<
iINFO <<
"QM Will use PSF charges.\n";
6300 iout <<
iINFO <<
"QM BASE DIRECTORY: " << qmBaseDir <<
"\n";
6303 iout <<
iINFO <<
"QM PREPARATION PROCESS: " << qmPrepProc <<
"\n";
6306 iout <<
iINFO <<
"QM SECONDARY PROCESS: " << qmSecProc <<
"\n";
6309 current = config->
find(
"QMConfigLine");
6310 for ( ; current; current = current->
next ) {
6312 if ( strstr(current->
data,
"\n") ) {
6313 iout <<
iINFO <<
"QM configuration lines from NADM config file\n";
6317 iout <<
iINFO <<
"QM CONFIG LINE: " << current->
data <<
"\n";
6322 iout <<
iINFO <<
"QM FORCES WILL REPLACE ALL NAMD FORCES!\n";
6326 iout <<
iINFO <<
"QM NO POINT CHARGE: ON.\n";
6329 iout <<
iINFO <<
"QM CUSTOM POINT CHARGE SELECTION IS ACTIVATED\n";
6331 if (! qmNoPC && ! qmCustomPCSel)
6332 iout <<
iINFO <<
"QM POINT CHARGES WILL BE SELECTED EVERY " 6333 << qmPCSelFreq <<
" STEPS.\n";
6336 iout <<
iINFO <<
"QM Point Charge Switching: ON.\n";
6338 if (qmPCScheme == 1)
6339 iout <<
iINFO <<
"QM Point Charge SCHEME: none.\n";
6340 else if (qmPCScheme == 2)
6341 iout <<
iINFO <<
"QM Point Charge SCHEME: round.\n";
6342 else if (qmPCScheme == 3)
6343 iout <<
iINFO <<
"QM Point Charge SCHEME: zero.\n";
6347 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION IS ACTIVE.\n" ;
6348 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION FREQUENCY: " 6349 << qmLSSFreq <<
"\n" <<
endi;
6351 current = config->
find(
"QMLSSSize");
6352 for ( ; current; current = current->
next ) {
6353 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION SIZE (\"qmGrpID numMolecules\"): " << current->
data <<
"\n";
6356 if (! opts.
defined(
"QMLWSResname"))
6357 strcpy(qmLSSResname,
"TIP3");
6358 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION WILL USE RESIDUE TYPE: " << qmLSSResname <<
"\n" <<
endi;
6361 iout <<
iINFO <<
"QM executions per node: " << qmSimsPerNode <<
"\n";
6371 iout <<
iINFO<<
"GBIS GENERALIZED BORN IMPLICIT SOLVENT ACTIVE (SERIAL)\n";
6374 iout <<
iINFO <<
"GBIS GENERALIZED BORN IMPLICIT SOLVENT ACTIVE\n";
6376 if (GBISOn || GBISserOn) {
6377 iout <<
iINFO <<
"GBIS SOLVENT DIELECTRIC: " << solvent_dielectric<<
"\n";
6378 iout <<
iINFO <<
"GBIS PROTEIN DIELECTRIC: " << dielectric<<
"\n";
6379 iout <<
iINFO<<
"GBIS COULOMB RADIUS OFFSET: "<< coulomb_radius_offset<<
" Ang\n";
6380 iout <<
iINFO <<
"GBIS ION CONCENTRATION: " << ion_concentration <<
" M\n";
6381 iout <<
iINFO <<
"GBIS DEBYE SCREENING LENGTH: " << 1.0/kappa <<
" Ang\n";
6382 iout <<
iINFO <<
"GBIS DELTA: " << gbis_delta <<
"\n";
6383 iout <<
iINFO <<
"GBIS BETA: " << gbis_beta <<
"\n";
6384 iout <<
iINFO <<
"GBIS GAMMA: " << gbis_gamma <<
"\n";
6385 iout <<
iINFO <<
"GBIS BORN RADIUS CUTOFF: " << alpha_cutoff <<
" Ang\n";
6386 iout <<
iINFO <<
"GBIS MAX BORN RADIUS: " << alpha_max <<
" Ang\n";
6391 iout <<
iINFO <<
"SASA SURFACE TENSION: " << surface_tension<<
" kcal/mol/Ang^2\n";
6396 iout <<
iINFO <<
"TCL BOUNDARY FORCES ACTIVE\n";
6397 current = config->
find(
"tclBCScript");
6399 tclBCScript = current->
data;
6400 iout <<
iINFO <<
"TCL BOUNDARY FORCES SCRIPT " << current->
data <<
"\n";
6402 iout <<
iINFO <<
"TCL BOUNDARY FORCES ARGS " << tclBCArgs <<
"\n";
6408 globalForcesOn = ( tclForcesOn || freeEnergyOn || miscForcesOn ||
6409 (IMDon && ! (IMDignore || IMDignoreForces)) || (SMDOn && !CUDASOAintegrateMode) || TMDOn ||
6410 colvarsOn || symmetryOn || qmForcesOn );
6412 if (globalForcesOn && monteCarloPressureOn) {
6413 NAMD_die(
"Monte Carlo pressure control is not compatible with " 6414 "global forces computations (Colvars, TclForces, TMD, IMD, " 6415 "symmetryRestraints, and similar features)");
6417 if(globalForcesOn && globalMasterFrequency >1 && !CUDASOAintegrateMode)
6419 NAMD_die(
"GlobalMaster multiple time-stepping is not available in non GPU-resident mode!\n");
6421 if(globalForcesOn && globalMasterFrequency >1 )
6423 iout <<
iINFO <<
"GLOBAL FORCES FREQENCY " << globalMasterFrequency<<
"\n";
6424 iout <<
iINFO <<
"GLOBAL FORCES SCALING " << globalMasterScaleByFrequency<<
"\n";
6425 iout <<
iINFO <<
"GLOBAL FORCES STALE FORCES MTS " << globalMasterStaleForces<<
"\n";
6429 iout <<
iINFO <<
"TCL GLOBAL FORCES ACTIVE\n";
6431 current = config->
find(
"tclForcesScript");
6433 for ( ; current; current = current->
next ) {
6435 if ( strstr(current->
data,
"\n") ) {
6436 iout <<
iINFO <<
"TCL GLOBAL FORCES SCRIPT INLINED IN CONFIG FILE\n";
6440 iout <<
iINFO <<
"TCL GLOBAL FORCES SCRIPT " << current->
data <<
"\n";
6448 iout <<
iINFO <<
"MISC FORCES ACTIVE\n";
6450 current = config->
find(
"miscForcesScript");
6452 for ( ; current; current = current->
next ) {
6454 if ( strstr(current->
data,
"\n") ) {
6455 iout <<
iINFO <<
"MISC FORCES SCRIPT INLINED IN CONFIG FILE\n";
6459 iout <<
iINFO <<
"MISC FORCES SCRIPT " << current->
data <<
"\n";
6467 iout <<
iINFO <<
"FREE ENERGY PERTURBATION ACTIVE\n";
6469 current = config->
find(
"freeEnergyConfig");
6471 for ( ; current; current = current->
next ) {
6473 if ( strstr(current->
data,
"\n") ) {
6474 iout <<
iINFO <<
"FREE ENERGY PERTURBATION SCRIPT INLINED IN CONFIG FILE\n";
6478 iout <<
iINFO <<
"FREE ENERGY PERTURBATION SCRIPT " << current->
data <<
"\n";
6486 iout <<
iINFO <<
"COLLECTIVE VARIABLES CALCULATION REQUESTED\n";
6488 current = config->
find (
"colvarsConfig");
6489 for ( ; current; current = current->
next ) {
6490 if ( strstr(current->
data,
"\n") ) {
6491 iout <<
iINFO <<
"COLLECTIVE VARIABLES CONFIGURATION INLINED IN CONFIG FILE\n";
6494 iout <<
iINFO <<
"COLLECTIVE VARIABLES CONFIGURATION " << current->
data <<
"\n";
6497 current = config->
find (
"colvarsInput");
6498 for ( ; current; current = current->
next ) {
6499 if ( strstr(current->
data,
"\n") ) {
6500 iout <<
iINFO <<
"COLLECTIVE VARIABLES RESTART INFORMATION INLINED IN CONFIG FILE\n";
6503 iout <<
iINFO <<
"COLLECTIVE VARIABLES RESTART INFORMATION " << current->
data <<
"\n";
6511 iout <<
iINFO <<
"INTERACTIVE MD ACTIVE\n";
6512 iout <<
iINFO <<
"INTERACTIVE MD VERSION " <<
static_cast<int>(IMDversion) <<
"\n";
6513 iout <<
iINFO <<
"INTERACTIVE MD PORT " << IMDport <<
"\n";
6514 iout <<
iINFO <<
"INTERACTIVE MD FREQ " << IMDfreq <<
"\n";
6516 iout <<
iINFO <<
"INTERACTIVE MD WILL NOT INFLUENCE SIMULATION\n";
6518 if (IMDignoreForces)
6520 iout <<
iINFO <<
"INTERACTIVE FORCES ARE DISABLED\n";
6521 iout <<
iINFO <<
"PAUSE, RESUME, DETACH AND FINISH INTERACTIVE MD ARE ENABLED\n";
6523 if (IMDwait)
iout <<
iINFO <<
"WILL AWAIT INTERACTIVE MD CONNECTION\n";
6526 iout <<
iINFO <<
"INTERACTIVE MD WILL SEND THE FOLLOWING:\n";
6527 if (IMDsendsettings.time_switch == 1) {
6530 if (IMDsendsettings.energies_switch == 1) {
6532 if (CUDASOAintegrate && (IMDfreq % computeEnergies != 0)) {
6533 iout <<
iWARN <<
"IMDfreq is not a multiple of computeEnergies in GPU-resident mode.\n" <<
endi;
6534 iout <<
iWARN <<
"Energies sent to the IMD client might be incorrect.\n" <<
endi;
6537 if (IMDsendsettings.box_switch == 1) {
6540 if (IMDsendsettings.fcoords_switch == 1) {
6541 if (IMDsendsettings.wrap_switch == 1) {
6542 iout <<
iINFO <<
"WRAPPED COORDINATES\n";
6544 iout <<
iINFO <<
"UNWRAPPED COORDINATES\n";
6547 if (IMDsendsettings.velocities_switch == 1) {
6550 if (IMDsendsettings.forces_switch == 1) {
6557 if (globalOn && !dihedralOn)
6559 iout <<
iINFO <<
"GLOBAL INTEGRATION TEST MODE ACTIVE\n";
6565 iout <<
iINFO <<
"DIHEDRAL ANGLE DYNAMICS ACTIVE\n";
6568 iout <<
iINFO <<
"*** DIHEDRAL ANGLE DYNAMICS IS HIGHLY EXPERIMENTAL ***\n";
6569 iout <<
iINFO <<
"PLEASE CONSIDER USING THE COLD OPTION AS WELL\n";
6582 iout <<
iINFO <<
"COLD (CONSTRAINED OVERDAMPED LANGEVIN DYNAMICS) ACTIVE\n";
6585 << COLDTemp <<
"\n";
6588 << COLDRate <<
"\n";
6591 if (cylindricalBCOn)
6593 iout <<
iINFO <<
"CYLINDRICAL BOUNDARY CONDITIONS ACTIVE\n";
6594 iout <<
iINFO <<
"AXIS " << cylindricalBCAxis <<
"\n";
6595 iout <<
iINFO <<
"RADIUS #1 " << cylindricalBCr1 <<
"\n";
6596 iout <<
iINFO <<
"FORCE CONSTANT #1 " << cylindricalBCk1 <<
"\n";
6597 iout <<
iINFO <<
"EXPONENT #1 " << cylindricalBCexp1 <<
"\n";
6598 iout <<
iINFO <<
"LENGTH #1 " << cylindricalBCl1 <<
"\n";
6599 if (cylindricalBCr2 > 0.0)
6601 iout <<
iINFO <<
"RADIUS #2 " << cylindricalBCr2 <<
"\n";
6602 iout <<
iINFO <<
"FORCE CONSTANT #2 " << cylindricalBCk2 <<
"\n";
6603 iout <<
iINFO <<
"EXPONENT #2 " << cylindricalBCexp2 <<
"\n";
6604 iout <<
iINFO <<
"LENGTH #2 " << cylindricalBCl2 <<
"\n";
6606 iout <<
iINFO <<
"CYLINDER BOUNDARY CENTER(" << cylindricalCenter.x <<
", " 6607 << cylindricalCenter.y <<
", " << cylindricalCenter.z <<
")\n";
6613 iout <<
iINFO <<
"SPHERICAL BOUNDARY CONDITIONS ACTIVE\n";
6616 << sphericalBCr1 <<
"\n";
6618 << sphericalBCk1 <<
"\n";
6620 << sphericalBCexp1 <<
"\n";
6622 if (sphericalBCr2 > 0)
6625 << sphericalBCr2 <<
"\n";
6627 << sphericalBCk2 <<
"\n";
6629 << sphericalBCexp2 <<
"\n";
6632 iout <<
iINFO <<
"SPHERE BOUNDARY CENTER(" << sphericalCenter.x <<
", " 6633 << sphericalCenter.y <<
", " << sphericalCenter.z <<
")\n";
6639 iout <<
iINFO <<
"ELECTRIC FIELD ACTIVE\n";
6642 << eField.x <<
", " << eField.y
6643 <<
", " << eField.z <<
")\n";
6644 if ( eFieldNormalized )
iout <<
iINFO <<
"E-FIELD VECTOR IS SCALED BY CELL BASIS VECTORS\n";
6645 iout <<
iINFO <<
"E-FIELD FREQUENCY IS (1/ps) " << eFieldFreq <<
"\n";
6646 iout <<
iINFO <<
"E-FIELD PHASE IS (deg) " << eFieldPhase <<
"\n";
6653 iout <<
iINFO <<
"STIRRING TORQUES ACTIVE\n";
6655 iout <<
iINFO <<
"STIR STARTING THETA (deg) "<< stirStartingTheta <<
"\n";
6656 iout <<
iINFO <<
"STIR ANGULAR VELOCITY (deg/ts) " << stirVel <<
"\n";
6657 iout <<
iINFO <<
"STIR FORCE HARMONIC SPRING CONSTANT "<< stirK <<
"\n";
6658 iout <<
iINFO <<
"STIR AXIS OF ROTATION (DIRECTION) (" 6659 << stirAxis.x <<
", " << stirAxis.y
6660 <<
", " << stirAxis.z <<
")\n";
6661 iout <<
iINFO <<
"STIR PIVOT POINT (COORDINATE) (" 6662 << stirPivot.x <<
", " << stirPivot.y
6663 <<
", " << stirPivot.z <<
")\n";
6664 current = config->
find(
"stirFilename");
6666 iout <<
iINFO <<
"STIR ATOMS AND ORIGINAL POSITIONS FROM FILE " <<current ->
data <<
'\n';
6667 current = config->
find(
"stirredAtomsCol");
6668 iout <<
iINFO <<
"STIR FILE COLUMN " << current ->
data <<
'\n';
6674 iout <<
iINFO <<
"DRUDE MODEL DUAL THERMOSTAT IS ACTIVE\n";
6675 iout <<
iINFO <<
"DRUDE BOND TEMPERATURE " << drudeTemp <<
"\n";
6676 if (drudeDamping > 0.0) {
6677 iout <<
iINFO <<
"DRUDE DAMPING COEFFICIENT IS " 6678 << drudeDamping <<
" INVERSE PS\n";
6680 if (drudeHardWallOn) {
6681 iout <<
iINFO <<
"DRUDE HARD WALL RESTRAINT IS ACTIVE FOR DRUDE BONDS\n";
6682 iout <<
iINFO <<
"DRUDE MAXIMUM BOND LENGTH BEFORE RESTRAINT IS " 6683 << drudeBondLen <<
"\n";
6684 }
else if (drudeBondConst > 0.0) {
6685 iout <<
iINFO <<
"DRUDE QUARTIC RESTRAINT IS ACTIVE FOR DRUDE BONDS\n";
6686 iout <<
iINFO <<
"DRUDE MAXIMUM BOND LENGTH BEFORE RESTRAINT IS " 6687 << drudeBondLen <<
"\n";
6688 iout <<
iINFO <<
"DRUDE BOND RESTRAINT CONSTANT IS " 6689 << drudeBondConst <<
"\n";
6691 if (drudeNbtholeCut > 0.0) {
6692 iout <<
iINFO <<
"DRUDE NBTHOLE IS ACTIVE\n";
6693 iout <<
iINFO <<
"DRUDE NBTHOLE RADIUS IS " 6694 << drudeNbtholeCut <<
"\n";
6700 iout <<
iINFO <<
"LANGEVIN DYNAMICS ACTIVE\n";
6701 iout <<
iINFO <<
"LANGEVIN TEMPERATURE " 6702 << langevinTemp <<
"\n";
6703 if (! langevin_useBAOAB)
iout <<
iINFO <<
"LANGEVIN USING BBK INTEGRATOR\n";
6704 else iout <<
iINFO <<
"LANGEVIN USING BAOAB INTEGRATOR\n";
6705 if (langevinDamping > 0.0) {
6706 iout <<
iINFO <<
"LANGEVIN DAMPING COEFFICIENT IS " 6707 << langevinDamping <<
" INVERSE PS\n";
6708 if (langevinHydrogen)
6709 iout <<
iINFO <<
"LANGEVIN DYNAMICS APPLIED TO HYDROGENS\n";
6711 iout <<
iINFO <<
"LANGEVIN DYNAMICS NOT APPLIED TO HYDROGENS\n";
6713 iout <<
iINFO <<
"LANGEVIN DAMPING COEFFICIENTS DETERMINED FROM FILES\n";
6714 current = config->
find(
"langevinFile");
6715 if ( current )
iout <<
iINFO <<
"LANGEVIN DAMPING FILE: " <<
6716 current->
data <<
"\n";
6717 else iout <<
iINFO <<
"LANGEVIN DAMPING FILE IS COORDINATE PDB\n";
6718 current = config->
find(
"langevinCol");
6719 if ( current )
iout <<
iINFO <<
"LANGEVIN DAMPING COLUMN: " <<
6720 current->
data <<
"\n";
6721 else iout <<
iINFO <<
"LANGEVIN DAMPING COLUMN: DEFAULT (4TH, O)\n";
6729 iout <<
iINFO <<
"LOWE-ANDERSEN DYNAMICS ACTIVE\n";
6730 iout <<
iINFO <<
"LOWE-ANDERSEN TEMPERATURE " 6731 << loweAndersenTemp <<
" K\n";
6733 << loweAndersenRate <<
" INVERSE PS\n";
6734 iout <<
iINFO <<
"LOWE-ANDERSEN CUTOFF " 6735 << loweAndersenCutoff <<
" ANGSTROMS\n";
6742 iout <<
iINFO <<
"TEMPERATURE COUPLING ACTIVE\n";
6743 iout <<
iINFO <<
"COUPLING TEMPERATURE " 6744 << tCoupleTemp <<
"\n";
6750 iout <<
iINFO <<
"STOCHASTIC RESCALING ACTIVE\n";
6751 iout <<
iINFO <<
"STOCHASTIC RESCALING TEMPERATURE " 6752 << stochRescaleTemp <<
" K\n";
6753 iout <<
iINFO <<
"STOCHASTIC RESCALING PERIOD " 6754 << stochRescalePeriod <<
" PS\n";
6755 iout <<
iINFO <<
"STOCHASTIC RESCALING WILL OCCUR EVERY " 6756 << stochRescaleFreq <<
" STEPS\n";
6762 iout <<
iINFO <<
"OLD STYLE MINIMIZATION ACTIVE\n";
6768 iout <<
iINFO <<
"CONJUGATE GRADIENT MINIMIZATION ACTIVE\n";
6769 iout <<
iINFO <<
"LINE MINIMIZATION GOAL = " << minLineGoal <<
"\n";
6770 iout <<
iINFO <<
"BABY STEP SIZE = " << minBabyStep <<
"\n";
6771 iout <<
iINFO <<
"TINY STEP SIZE = " << minTinyStep <<
"\n";
6778 << maximumMove <<
"\n";
6782 if (rescaleFreq > 0)
6784 iout <<
iINFO <<
"VELOCITY RESCALE FREQ " 6785 << rescaleFreq <<
"\n";
6786 iout <<
iINFO <<
"VELOCITY RESCALE TEMP " 6787 << rescaleTemp <<
"\n";
6791 if (reassignFreq > 0)
6793 iout <<
iINFO <<
"VELOCITY REASSIGNMENT FREQ " 6794 << reassignFreq <<
"\n";
6795 iout <<
iINFO <<
"VELOCITY REASSIGNMENT TEMP " 6796 << reassignTemp <<
"\n";
6797 if ( reassignIncr != 0. )
6798 iout <<
iINFO <<
"VELOCITY REASSIGNMENT INCR " 6799 << reassignIncr <<
"\n";
6800 if ( reassignHold != 0. )
6801 iout <<
iINFO <<
"VELOCITY REASSIGNMENT HOLD " 6802 << reassignHold <<
"\n";
6806 if ((
int)berendsenPressureOn + (
int)langevinPistonOn + (
int)monteCarloPressureOn + (
int)multigratorOn > 1)
6808 NAMD_die(
"Multiple pressure control algorithms selected!\n");
6811 if (excludeFromPressure) {
6812 iout <<
iINFO <<
"EXCLUDE FROM PRESSURE ACTIVE\n";
6814 if (useConstantArea && useConstantRatio) {
6815 NAMD_die(
"useConstantArea and useConstantRatio are mutually exclusive.\n");
6817 if (useConstantRatio && !useFlexibleCell) {
6818 NAMD_die(
"useConstantRatio requires useFlexibleCell.\n");
6820 if (useConstantArea && surfaceTensionTarget) {
6821 NAMD_die(
"surfaceTensionTarget and useConstantArea are mutually exclusive.\n");
6823 if (useConstantArea && !useFlexibleCell) {
6824 NAMD_die(
"useConstantArea requires useFlexibleCell.\n");
6828 if (!useFlexibleCell) {
6829 if (fixCellDimX || fixCellDimY || fixCellDimZ) {
6830 NAMD_die(
"fixCellDims requires useFlexibleCell.\n");
6833 if(useConstantArea && fixCellDimZ) {
6834 NAMD_die(
"fixCellDimZ can not be used with useConstantArea.\n");
6835 }
else if (useConstantRatio && fixCellDimX) {
6836 NAMD_die(
"fixCellDimX can not be used with useConstantRatio.\n");
6837 }
else if (useConstantRatio && fixCellDimY) {
6838 NAMD_die(
"fixCellDimY can not be used with useConstantRatio.\n");
6842 if (fixCellDimX && fixCellDimY && fixCellDimZ) {
6843 NAMD_die(
"Cell dimension can not be fixed in X, Y, and Z axis, simultaneously.\n");
6847 if (berendsenPressureOn || langevinPistonOn) {
6849 useGroupPressure =
TRUE;
6850 iout <<
iWARN <<
"Option useGroupPressure is being enabled " 6851 <<
"due to pressure control with rigidBonds.\n" <<
endi;
6855 if (monteCarloPressureOn) {
6856 if (!opts.
defined(
"MonteCarloAcceptanceRate")) {
6857 monteCarloAcceptanceRate = 0.5;
6858 }
else if (monteCarloAcceptanceRate > 0.8 || monteCarloAcceptanceRate < 0.2) {
6859 NAMD_die(
"Acceptance rate in Monte Carlo pressure control must be between 0.2 and 0.8!\n");
6862 if ( monteCarloAdjustmentFreq < 10 ) {
6863 iout <<
iWARN <<
"Modifying the frequency of adjusting the maximum volume change.\n" <<
endi;
6864 monteCarloAdjustmentFreq = 30;
6867 if (!opts.
defined(
"MonteCarloMaxVolume")) {
6869 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6870 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6871 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6874 if (0.3 < (monteCarloMaxVolume.x / lattice.volume())) {
6875 iout <<
iWARN <<
"Modifying the maximum volume change for x-axis.\n" <<
endi;
6876 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6878 if (0.3 < (monteCarloMaxVolume.y / lattice.volume())) {
6879 iout <<
iWARN <<
"Modifying the maximum volume change for y-axis.\n" <<
endi;
6880 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6882 if (0.3 < (monteCarloMaxVolume.z / lattice.volume())) {
6883 iout <<
iWARN <<
"Modifying the maximum volume change for z-axis.\n" <<
endi;
6884 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6886 if (monteCarloMaxVolume.x < 1.0) {
6887 iout <<
iWARN <<
"Maximum volume change is negative or too small for x-axis.\n" <<
6888 " Modifying the maximum volume change for x-axis.\n" <<
endi;
6889 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6891 if (monteCarloMaxVolume.y < 1.0) {
6892 iout <<
iWARN <<
"Maximum volume change is negative or too small for y-axis.\n" <<
6893 " Modifying the maximum volume change for y-axis.\n" <<
endi;
6894 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6896 if (monteCarloMaxVolume.z < 1.0) {
6897 iout <<
iWARN <<
"Maximum volume change is negative or too small for z-axis.\n" <<
6898 " Modifying the maximum volume change for z-axis.\n" <<
endi;
6899 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6903 if (!opts.
defined(
"MonteCarloPressureFreq")) {
6904 monteCarloPressureFreq = 50 * nonbondedFrequency;
6905 if ( fullElectFrequency ) {
6906 monteCarloPressureFreq = 50 * fullElectFrequency;
6908 }
else if ((monteCarloPressureFreq % nonbondedFrequency) || ( fullElectFrequency
6909 && (monteCarloPressureFreq % fullElectFrequency) )) {
6910 NAMD_die(
"monteCarloPressureFreq must be a multiple of both fullElectFrequency and nonbondedFrequency\n");
6913 iout <<
iINFO <<
"MONTE CARLO PRESSURE CONTROL ACTIVE\n";
6915 << monteCarloPressureTarget <<
" BAR\n";
6916 iout <<
iINFO <<
" TARGET ACCEPTANCE RATE IS " 6917 << monteCarloAcceptanceRate <<
"\n";
6918 iout <<
iINFO <<
" IMPOSED TEMPERATURE IS " 6919 << monteCarloTemp <<
" K\n";
6920 iout <<
iINFO <<
" MAXIMUM VOLUME CHANGE IS (" 6921 << monteCarloMaxVolume.x <<
", " << monteCarloMaxVolume.y <<
", " 6922 << monteCarloMaxVolume.z <<
") A^3 \n";
6923 iout <<
iINFO <<
" ADJUST MAXIMUM VOLUME CHANGE EVERY " 6924 << monteCarloAdjustmentFreq <<
" TRIALS\n";
6926 << monteCarloPressureFreq <<
" STEPS\n";
6927 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6928 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6933 if (berendsenPressureOn)
6935 if ( ! opts.
defined(
"BerendsenPressureFreq") ) {
6936 berendsenPressureFreq = nonbondedFrequency;
6937 if ( fullElectFrequency )
6938 berendsenPressureFreq = fullElectFrequency;
6940 if ( (berendsenPressureFreq % nonbondedFrequency) || ( fullElectFrequency
6941 && (berendsenPressureFreq % fullElectFrequency) ) ) {
6942 NAMD_die(
"berendsenPressureFreq must be a multiple of both fullElectFrequency and nonbondedFrequency\n");
6944 iout <<
iINFO <<
"BERENDSEN PRESSURE COUPLING ACTIVE\n";
6946 << berendsenPressureTarget <<
" BAR\n";
6947 iout <<
iINFO <<
" COMPRESSIBILITY ESTIMATE IS " 6948 << berendsenPressureCompressibility <<
" BAR^(-1)\n";
6950 << berendsenPressureRelaxationTime <<
" FS\n";
6952 << berendsenPressureFreq <<
" STEPS\n";
6953 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6954 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6960 if (langevinPistonOn)
6962 iout <<
iINFO <<
"LANGEVIN PISTON PRESSURE CONTROL ACTIVE\n";
6964 << langevinPistonTarget <<
" BAR\n";
6965 iout <<
iINFO <<
" OSCILLATION PERIOD IS " 6966 << langevinPistonPeriod <<
" FS\n";
6968 << langevinPistonDecay <<
" FS\n";
6969 iout <<
iINFO <<
" PISTON TEMPERATURE IS " 6970 << langevinPistonTemp <<
" K\n";
6971 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6972 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6973 iout <<
iINFO <<
" INITIAL STRAIN RATE IS " 6974 << strainRate <<
"\n";
6979 if (multigratorOn) {
6983 if (berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) {
6984 iout <<
iINFO <<
" CELL FLUCTUATION IS " 6985 << (useFlexibleCell?
"AN":
"") <<
"ISOTROPIC\n";
6986 if (useConstantRatio)
6987 iout <<
iINFO <<
" SHAPE OF CELL IS CONSTRAINED IN X-Y PLANE\n";
6988 if (useConstantArea)
6989 iout <<
iINFO <<
" CONSTANT AREA PRESSURE CONTROL ACTIVE\n";
6992 if (surfaceTensionTarget != 0)
6994 iout <<
iINFO <<
"SURFACE TENSION CONTROL ACTIVE\n";
6995 iout <<
iINFO <<
" TARGET SURFACE TENSION IS " 6996 << surfaceTensionTarget <<
" DYN/CM\n";
7003 if (pressureProfileOn) {
7004 if ((berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) && !dcdUnitCell) {
7006 iout <<
iWARN <<
"Turning on dcdUnitCell so that trajectory files contain unit cell data.\n" <<
endi;
7009 NAMD_die(
"Sorry, pressure profile not implemented for constant pressure.");
7013 if (pressureProfileEwaldOn)
7014 pressureProfileOn = 0;
7016 if (pressureProfileSlabs < 1)
7017 NAMD_die(
"pressureProfileSlabs must be positive.");
7018 iout <<
iINFO <<
"PRESSURE PROFILE CALCULATIONS ACTIVE\n";
7019 iout <<
iINFO <<
" NUMBER OF SLABS: " << pressureProfileSlabs <<
"\n";
7020 iout <<
iINFO <<
" SLAB THICKNESS: " << cellBasisVector3.z / pressureProfileSlabs
7022 iout <<
iINFO <<
" TIMESTEPS BETWEEN DATA OUTPUT: " 7023 << pressureProfileFreq <<
"\n";
7024 iout <<
iINFO <<
" NUMBER OF ATOM TYPES: " << pressureProfileAtomTypes <<
"\n";
7027 pressureProfileEwaldOn = 0;
7028 pressureProfileAtomTypes = 1;
7032 iout <<
iINFO <<
"ACCELERATED MD ACTIVE\n";
7035 accelMDdihe =
FALSE;
7036 iout <<
iINFO <<
"APPLYING DUAL BOOST\n";
7038 else if ( accelMDdihe ) {
7039 iout <<
iINFO <<
"BOOSTING DIHEDRAL POTENTIAL\n";
7041 iout <<
iINFO <<
"BOOSTING TOTAL POTENTIAL\n";
7045 switch(accelMDGiE) {
7047 iout <<
iINFO <<
"accelMDG THRESHOLD ENERGY SET TO LOWER BOUND Vmax\n";
7050 iout <<
iINFO <<
"accelMDG THRESHOLD ENERGY SET TO UPPER BOUND Vmin+(Vmax-Vmin)/k0\n";
7054 iout <<
iINFO <<
"accelMDG USING RESTART FILE " << accelMDGRestartFile <<
"\n";
7055 if(accelMDGresetVaftercmd)
7056 iout <<
iINFO <<
"accelMDG WILL RESET STATISTICS AFTER FIRST CMD STEPS\n";
7058 iout <<
iINFO <<
"accelMDG " << accelMDGcMDSteps <<
" CONVENTIONAL MD STEPS " 7059 <<
"(WITH " << accelMDGcMDPrepSteps <<
" PREPARATION STEPS)\n";
7060 if(accelMDGcMDSteps == 0)
7061 iout <<
iINFO <<
"(accelMDGcMDPrepSteps is set to zero automatically)\n";
7063 iout <<
iINFO <<
"accelMDG " << accelMDGEquiSteps <<
" EQUILIBRATION STEPS " 7064 <<
"(WITH " << accelMDGEquiPrepSteps <<
" PREPARATION STEPS)\n";
7065 if(accelMDGEquiSteps == 0)
7066 iout <<
iINFO <<
"(accelMDGEquiPrepSteps is set to zero automatically)\n";
7068 if(accelMDGStatWindow > 0)
7069 iout <<
iINFO <<
"accelMDG WILL RESET AVERAGE AND STANDARD DEVIATION EVERY " << accelMDGEquiSteps <<
" STEPS\n";
7071 iout <<
iINFO <<
"accelMDG WILL NOT RESET AVERAGE AND STANDARD DEVIATION\n";
7074 iout <<
iINFO <<
"accelMDGSigma0D: " << accelMDGSigma0D <<
" KCAL/MOL\n";
7075 else if(accelMDdual)
7076 iout <<
iINFO <<
"accelMDGSigma0P: " << accelMDGSigma0P <<
" KCAL/MOL, " 7077 <<
"accelMDGSigma0D: " << accelMDGSigma0D <<
" KCAL/MOL\n";
7079 iout <<
iINFO <<
"accelMDGSigma0P: " << accelMDGSigma0P <<
" KCAL/MOL\n";
7082 iout <<
iINFO <<
"accelMDE: " << accelMDE <<
" KCAL/MOL, accelMDalpha: " << accelMDalpha <<
" KCAL/MOL\n";
7084 iout <<
iINFO <<
"accelMDTE: " << accelMDTE <<
" KCAL/MOL, " 7085 <<
"accelMDTalpha: " << accelMDTalpha <<
" KCAL/MOL\n";
7088 if ( accelMDLastStep > 0) {
7089 iout <<
iINFO <<
"accelMD WILL BE DONE FROM STEP " << accelMDFirstStep <<
" TO STEP " << accelMDLastStep <<
"\n";
7091 iout <<
iINFO <<
"accelMD WILL BE DONE FROM STEP " << accelMDFirstStep <<
" TO THE END OF THE SIMULATION \n";
7093 iout <<
iINFO <<
"accelMD OUTPUT FREQUENCY " << accelMDOutFreq <<
"\n";
7098 iout <<
iINFO <<
"ADAPTIVE TEMPERING ACTIVE:\n";
7099 iout <<
iINFO <<
" OUTPUT FREQUENCY: " << adaptTempOutFreq <<
"\n";
7100 iout <<
iINFO <<
" TEMPERATURE UPDATE FREQUENCY: " << adaptTempFreq <<
"\n";
7101 if ( adaptTempLastStep > 0 )
7102 iout <<
iINFO <<
" ADAPTIVE TEMPERING WILL BE DONE FROM STEP " << adaptTempFirstStep <<
" TO " << adaptTempLastStep <<
"\n";
7104 iout <<
iINFO <<
" ADAPTIVE TEMPERING WILL BE DONE FROM STEP " << adaptTempFirstStep <<
"\n";
7105 if ( adaptTempLangevin )
7106 iout <<
iINFO <<
" ADAPTIVE TEMPERING COUPLED TO LANGEVIN THERMOSTAT\n";
7107 if ( adaptTempRescale )
7108 iout <<
iINFO <<
" ADAPTIVE TEMPERING COUPLED TO VELOCITY RESCALING\n";
7109 if (adaptTempRestartFreq > 0) {
7110 iout <<
iINFO <<
" WRITING RESTART INFORMATION TO " << adaptTempRestartFile <<
" EVERY " << adaptTempRestartFreq <<
" STEPS\n";
7119 << fmaTheta <<
"\n";
7124 FFTWWisdomString = 0;
7127 iout <<
iINFO <<
"PARTICLE MESH EWALD (PME) ACTIVE\n";
7129 << PMETolerance <<
"\n";
7130 iout <<
iINFO <<
"PME EWALD COEFFICIENT " 7131 << PMEEwaldCoefficient <<
"\n";
7132 iout <<
iINFO <<
"PME INTERPOLATION ORDER " 7133 << PMEInterpOrder <<
"\n";
7135 << PMEGridSizeX <<
" " 7136 << PMEGridSizeY <<
" " 7137 << PMEGridSizeZ <<
"\n";
7138 iout <<
iINFO <<
"PME MAXIMUM GRID SPACING " 7139 << PMEGridSpacing <<
"\n";
7141 iout <<
iINFO <<
"PME BARRIER ENABLED\n";
7144 iout <<
iINFO <<
"PME RECIPROCAL SUM OFFLOADED TO GPU\n";
7147 if ( useDPME )
iout <<
iINFO <<
"USING OLD DPME CODE\n";
7148 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 7149 else if ( usePMECUDA ) {
7150 iout <<
iINFO <<
"PME CALCULATION WILL BE PERFORMED ON GPU" <<
"\n" 7155 else if ( FFTWUseWisdom ) {
7157 iout <<
iINFO <<
"Attempting to read FFTW data from system" <<
"\n" <<
endi;
7158 fftwf_import_system_wisdom();
7160 if (! opts.
defined(
"FFTWWisdomFile")) {
7161 strcpy(FFTWWisdomFile,
"FFTW_NAMD_");
7162 strcat(FFTWWisdomFile,NAMD_VERSION);
7163 strcat(FFTWWisdomFile,
"_");
7164 strcat(FFTWWisdomFile,NAMD_PLATFORM);
7166 strcat(FFTWWisdomFile,
"_FFTW3");
7168 strcat(FFTWWisdomFile,
".txt");
7171 iout <<
iINFO <<
"Attempting to read FFTW data from " 7172 << FFTWWisdomFile <<
"\n" <<
endi;
7173 FILE *wisdom_file = fopen(FFTWWisdomFile,
"r");
7174 if ( wisdom_file ) {
7176 fftwf_import_wisdom_from_file(wisdom_file);
7178 fftw_import_wisdom_from_file(wisdom_file);
7180 fclose(wisdom_file);
7185 int minslices = PMEMinSlices;
7186 int dimx = PMEGridSizeX;
7187 int nrpx = ( dimx + minslices - 1 ) / minslices;
7188 if ( nrpx > nrp ) nrp = nrpx;
7189 int dimy = PMEGridSizeY;
7190 int nrpy = ( dimy + minslices - 1 ) / minslices;
7191 if ( nrpy > nrp ) nrp = nrpy;
7194 int nrpp = CkNumPes();
7196 if ( nrpp < nrp ) nrp = nrpp;
7199 int nrps = PMEProcessors;
7200 if ( nrps > CkNumPes() ) nrps = CkNumPes();
7201 if ( nrps > 0 ) nrp = nrps;
7204 int bx = ( dimx + nrp - 1 ) / nrp;
7205 int nrpbx = ( dimx + bx - 1 ) / bx;
7206 int by = ( dimy + nrp - 1 ) / nrp;
7207 int nrpby = ( dimy + by - 1 ) / by;
7208 nrp = ( nrpby > nrpbx ? nrpby : nrpbx );
7209 if ( bx != ( dimx + nrp - 1 ) / nrp )
7210 NAMD_bug(
"Error in selecting number of PME processors.");
7211 if ( by != ( dimy + nrp - 1 ) / nrp )
7212 NAMD_bug(
"Error in selecting number of PME processors.");
7217 int block2 = (PMEGridSizeY + nrp - 1) / nrp;
7218 int block2_min = PMEGridSizeY % block2;
7219 if ( ! block2_min ) block2_min = block2;
7220 int dim3 = 2 * (PMEGridSizeZ/2 + 1);
7222 int n[3]; n[0] = PMEGridSizeX; n[1] = PMEGridSizeY; n[2] = PMEGridSizeZ;
7223 fftw_complex *work =
new fftw_complex[n[0]];
7224 float *grid1 = (
float *)
fftwf_malloc(
sizeof(
float) *n[1]*dim3);
7225 float *grid2 = (
float *)
fftwf_malloc(
sizeof(
float) *n[0]*block2*dim3*2);
7228 int fftwFlags = FFTWPatient ? FFTW_PATIENT : FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE ;
7229 int planLineSizes[1];
7230 planLineSizes[0]=n[2];
7233 int sizeLines=nx*ny;
7236 int xStride=block2 * dim3 / 2;
7238 fftwf_plan_many_dft_r2c(1, planLineSizes, sizeLines,
7239 (
float *) grid2, NULL, 1,
7241 (fftwf_complex *) grid2,
7248 fftwf_plan_many_dft_c2r(1, planLineSizes, sizeLines,
7249 (fftwf_complex *) grid2,
7252 (
float *) grid2, NULL, 1,
7257 planLineSizes[0]=block2;
7258 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7259 (fftwf_complex *) grid2, NULL,
7261 (fftwf_complex *) grid2, NULL,
7266 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7267 (fftwf_complex *) grid2, NULL,
7269 (fftwf_complex *) grid2, NULL,
7275 planLineSizes[0]=n[0];
7276 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7277 (fftwf_complex *) grid2, NULL,
7279 (fftwf_complex *) grid2, NULL,
7284 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7285 (fftwf_complex *) grid2, NULL,
7287 (fftwf_complex *) grid2, NULL,
7293 rfftwnd_destroy_plan( rfftwnd_create_plan_specific(
7294 2, n+1, FFTW_REAL_TO_COMPLEX,
7295 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7296 | FFTW_IN_PLACE | FFTW_USE_WISDOM, grid1, 1, 0, 0) );
7298 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_REAL_TO_COMPLEX,
7299 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7300 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7301 block2*dim3/2, work, 1) );
7303 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_REAL_TO_COMPLEX,
7304 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7305 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7306 block2_min*dim3/2, work, 1) );
7308 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_COMPLEX_TO_REAL,
7309 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7310 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7311 block2*dim3/2, work, 1) );
7313 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_COMPLEX_TO_REAL,
7314 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7315 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7316 block2_min*dim3/2, work, 1) );
7318 rfftwnd_destroy_plan( rfftwnd_create_plan_specific(
7319 2, n+1, FFTW_COMPLEX_TO_REAL,
7320 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7321 | FFTW_IN_PLACE | FFTW_USE_WISDOM, grid1, 1, 0, 0) );
7329 FFTWWisdomString = fftwf_export_wisdom_to_string();
7331 FFTWWisdomString = fftw_export_wisdom_to_string();
7334 if ( FFTWWisdomString && (CmiNumPartitions() == 1) ) {
7335 iout <<
iINFO <<
"Writing FFTW data to " 7336 << FFTWWisdomFile <<
"\n" <<
endi;
7337 wisdom_file = fopen(FFTWWisdomFile,
"w");
7338 if ( wisdom_file ) {
7340 fftwf_export_wisdom_to_file(wisdom_file);
7342 fftw_export_wisdom_to_file(wisdom_file);
7344 fclose(wisdom_file);
7356 if (switchingActive) {
7357 NAMD_die(
"Cannot use LJ-PME with switch smoothing function. Select only one. ");
7359 if (vdwForceSwitching) {
7360 NAMD_die(
"Cannot use LJ-PME with VDW Force switch smoothing function. Select only one.");
7363 NAMD_die(
"Cannot use LJ-PME with LJ tail corrections. Select only one.");
7366 NAMD_die(
"Sorry, alchemical transformation is not supported with LJ-PME.");
7368 #ifdef OPENATOM_VERSION 7370 NAMD_die(
"Sorry, open-atom simulation is not supported with LJ-PME.");
7374 #ifdef MEM_OPT_VERSION 7375 NAMD_die(
"Sorry, memory-optimized version of NAMD does not support LJ-PME.");
7378 if(LJPMESerialOn && (fullElectFrequency > 1 || nonbondedFrequency > 1 || fullDispersionFrequency > 1)) {
7379 NAMD_die(
"The serial version of LJ-PME does not support multiple time stepping.");
7383 if((fullElectFrequency > 1 || nonbondedFrequency > 1 || fullDispersionFrequency > 1)) {
7384 NAMD_die(
"LJ-PME does not support multiple time stepping.");
7387 if (fullDispersionFrequency != fullElectFrequency) {
7388 if ( ! config->
find(
"fullDispersionFrequency") ) {
7389 iout <<
iWARN <<
"Setting fullDispersionFrequency to match fullElectFrequency\n";
7390 fullDispersionFrequency = fullElectFrequency;
7393 NAMD_die(
"For LJ-PME, fullDispersionFrequency must equal fullElectFrequency.");
7397 iout <<
iINFO <<
"LJ PARTICLE MESH EWALD (LJ-PME) ACTIVE\n";
7399 << LJPMETolerance <<
"\n";
7400 iout <<
iINFO <<
"LJ-PME EWALD COEFFICIENT " 7401 << LJPMEEwaldCoefficient <<
"\n";
7402 iout <<
iINFO <<
"LJ-PME INTERPOLATION ORDER " 7403 << LJPMEInterpOrder <<
"\n";
7404 iout <<
iINFO <<
"LJ-PME GRID DIMENSIONS " 7405 << LJPMEGridSizeX <<
" " 7406 << LJPMEGridSizeY <<
" " 7407 << LJPMEGridSizeZ <<
"\n";
7408 iout <<
iINFO <<
"LJ-PME MAXIMUM GRID SPACING " 7409 << LJPMEGridSpacing <<
"\n";
7410 iout <<
iINFO <<
"FULL LJ DISPERSION EVALUATION FREQUENCY " 7411 << fullDispersionFrequency <<
"\n";
7416 iout <<
iINFO <<
"DIRECT FULL ELECTROSTATIC CALCULATIONS ACTIVE\n";
7424 enum { LO=0, MEDLO, MED, MEDHI, HI };
7427 enum { CUBIC=0, QUINTIC, QUINTIC2,
7428 SEPTIC, SEPTIC3, NONIC, NONIC4, C1HERMITE, NUM_APPROX };
7431 enum { TAYLOR2=0, TAYLOR3, TAYLOR4,
7432 TAYLOR5, TAYLOR6, TAYLOR7, TAYLOR8, NUM_SPLIT };
7434 if (MSMApprox || MSMSplit) {
7435 if (MSMApprox < 0 || MSMApprox >= NUM_APPROX) {
7436 NAMD_die(
"MSM: unknown approximation requested (MSMApprox)");
7438 if (MSMSplit < 0 || MSMSplit >= NUM_SPLIT) {
7439 NAMD_die(
"MSM: unknown splitting requested (MSMSplit)");
7443 switch (MSMQuality) {
7449 MSMApprox = C1HERMITE;
7453 MSMApprox = QUINTIC;
7465 NAMD_die(
"MSM: unknown quality requested (MSMQuality)");
7470 <<
"MULTILEVEL SUMMATION METHOD (MSM) FOR ELECTROSTATICS ACTIVE\n";
7473 <<
"PERFORMING SERIAL MSM CALCULATION FOR LONG-RANGE PART\n";
7475 const char *approx_str, *split_str;
7476 switch (MSMApprox) {
7477 case CUBIC: approx_str =
"C1 CUBIC";
break;
7478 case QUINTIC: approx_str =
"C1 QUINTIC";
break;
7479 case QUINTIC2: approx_str =
"C2 QUINTIC";
break;
7480 case SEPTIC: approx_str =
"C1 SEPTIC";
break;
7481 case SEPTIC3: approx_str =
"C3 SEPTIC";
break;
7482 case NONIC: approx_str =
"C1 NONIC";
break;
7483 case NONIC4: approx_str =
"C4 NONIC";
break;
7484 case C1HERMITE:approx_str =
"C1 HERMITE";
break;
7485 default: approx_str =
"UNKNOWN";
break;
7488 case TAYLOR2: split_str =
"C2 TAYLOR";
break;
7489 case TAYLOR3: split_str =
"C3 TAYLOR";
break;
7490 case TAYLOR4: split_str =
"C4 TAYLOR";
break;
7491 case TAYLOR5: split_str =
"C5 TAYLOR";
break;
7492 case TAYLOR6: split_str =
"C6 TAYLOR";
break;
7493 case TAYLOR7: split_str =
"C7 TAYLOR";
break;
7494 case TAYLOR8: split_str =
"C8 TAYLOR";
break;
7495 default: split_str =
"UNKNOWN";
break;
7498 <<
"MSM WITH " << approx_str <<
" INTERPOLATION " 7499 <<
"AND " << split_str <<
" SPLITTING\n" 7506 iout <<
iINFO <<
"FAST MULTIPOLE METHOD (FMM) FOR ELECTROSTATICS ACTIVE\n";
7507 iout <<
iINFO <<
"PERFORMING SERIAL FMM CALCULATION\n";
7508 iout <<
iINFO <<
"FMM LEVELS = " << FMMLevels <<
"\n";
7509 iout <<
iINFO <<
"FMM PADDING = " << FMMPadding <<
" ANGSTROMS\n";
7512 NAMD_die(
"Must link to FMM library to use FMM\n");
7516 if ( FMAOn || PMEOn || MSMOn || fullDirectOn || GBISOn || FMMOn )
7518 iout <<
iINFO <<
"FULL ELECTROSTATIC EVALUATION FREQUENCY " 7519 << fullElectFrequency <<
"\n";
7522 if ( ( computeEnergies % fullElectFrequency ) &&
7523 ( fullElectFrequency % computeEnergies ) )
7524 NAMD_die(
"Either computeEnergies must be a multiple of fullElectFrequency or vice versa.\n");
7528 if ( ( outputEnergies % fullDispersionFrequency ) &&
7529 ( fullDispersionFrequency % outputEnergies ) ) {
7530 NAMD_die(
"Either outputEnergies must be a multiple of fullDispersionFrequency or vice versa.\n");
7534 if (MTSAlgorithm ==
NAIVE)
7536 iout <<
iINFO <<
"USING NAIVE (CONSTANT FORCE) MTS SCHEME.\n" <<
endi;
7540 iout <<
iINFO <<
"USING VERLET I (r-RESPA) MTS SCHEME.\n" <<
endi;
7543 if (longSplitting ==
SHARP)
7544 iout <<
iINFO <<
"SHARP SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7545 else if (longSplitting ==
XPLOR)
7546 iout <<
iINFO <<
"XPLOR SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7547 else if (longSplitting ==
C1)
7548 iout <<
iINFO <<
"C1 SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7549 else if (longSplitting ==
C2)
7550 iout <<
iINFO <<
"C2 SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7553 iout <<
iINFO <<
"PLACING ATOMS IN PATCHES BY POSITION\n";
7555 iout <<
iINFO <<
"PLACING ATOMS IN PATCHES BY HYDROGEN GROUPS\n";
7561 iout <<
iINFO <<
"SLOW FORCE MOLLIFICATION : \n";
7562 iout <<
iINFO <<
" ERROR TOLERANCE : " << mollyTol <<
"\n";
7563 iout <<
iINFO <<
" MAX ITERATIONS : " << mollyIter <<
"\n";
7569 iout <<
iINFO <<
"RIGID BONDS TO HYDROGEN : ";
7572 iout <<
iINFO <<
" ERROR TOLERANCE : " << rigidTol <<
"\n";
7573 iout <<
iINFO <<
" MAX ITERATIONS : " << rigidIter <<
"\n";
7574 if (useSettle)
iout <<
iINFO <<
"RIGID WATER USING SETTLE ALGORITHM\n";
7579 if (nonbondedFrequency != 1)
7581 iout <<
iINFO <<
"NONBONDED FORCES EVALUATED EVERY " << nonbondedFrequency <<
" STEPS\n";
7585 << randomSeed <<
"\n";
7589 iout <<
iINFO <<
"USE HYDROGEN BONDS? ";
7593 iout <<
iINFO <<
"USE ANTECEDENT ATOMS? ";
7594 iout << (useAntecedent ?
"YES" :
"NO");
7595 iout <<
"\nHB DIST CUT, ON, OFF ";
7596 iout << daCutoffDist <<
" , " << daOnDist <<
" , " << daOffDist;
7597 iout <<
"\nHB ANGLE CUT, ON, OFF ";
7598 iout << dhaCutoffAngle <<
" , " << dhaOnAngle <<
" , ";
7599 iout << dhaOffAngle;
7600 iout <<
"\nHB ATT, REP exponents ";
7601 iout << distAttExp <<
" , " << distRepExp;
7602 iout <<
"\nHB AA, HA exponents ";
7603 iout << aaAngleExp <<
" , " << haAngleExp;
7614 {
iout <<
iINFO <<
"Using AMBER format force field!\n";
7615 current = config->
find(
"parmfile");
7616 iout <<
iINFO <<
"AMBER PARM FILE " << current->
data <<
'\n';
7617 if (opts.
defined(
"coordinates"))
7618 { current = config->
find(
"coordinates");
7619 iout <<
iINFO <<
"COORDINATE PDB " << current->
data <<
'\n';
7622 { current = config->
find(
"ambercoor");
7623 iout <<
iINFO <<
"AMBER COORDINATE FILE " << current->
data <<
'\n';
7626 iout <<
iINFO <<
"Exclusions will be read from PARM file!\n";
7628 iout <<
iINFO <<
"Exclusions in PARM file will be ignored!\n";
7629 iout <<
iINFO <<
"SCNB (VDW SCALING) " << vdwscale14 <<
"\n" <<
endi;
7633 iout <<
iINFO <<
"Using GROMACS format force field!\n";
7635 current = config->
find(
"grotopfile");
7637 if (current == NULL)
7638 NAMD_die(
"no GROMACS topology file defined!?");
7639 iout <<
iINFO <<
"GROMACS TOPO FILE " << current->
data <<
'\n';
7642 current = config->
find(
"grocoorfile");
7643 if (current == NULL) {
7644 current = config->
find(
"coordinates");
7645 if (current == NULL) {
7646 NAMD_die(
"no coordinate file defined!?");
7649 iout <<
iINFO <<
"GROMACS COOR FILE " << current->
data <<
'\n' 7654 if ( !usePluginIO ) {
7655 if ( current = config->
find(
"coordinates") )
7659 current = config->
find(
"structure");
7666 iout <<
iINFO <<
"COSANGLES ON. SOME ANGLES WILL BE COSINE-BASED\n" <<
endi;
7670 if (paraTypeXplorOn)
7672 iout <<
iINFO <<
"PARAMETER file: XPLOR format! (default) \n" <<
endi;
7674 else if (paraTypeCharmmOn)
7676 iout <<
iINFO <<
"PARAMETER file: CHARMM format! \n" <<
endi;
7680 current = config->
find(
"parameters");
7682 while (current != NULL)
7686 current = current->
next;
7691 ( vdwGeometricSigma ?
"GEOMETRIC" :
"ARITHMETIC" ) <<
7692 " MEAN TO COMBINE L-J SIGMA PARAMETERS\n" <<
endi;
7694 if (opts.
defined(
"bincoordinates"))
7696 current = config->
find(
"bincoordinates");
7699 << current->
data <<
"\n";
7702 #ifdef NAMD_AVXTILES 7703 iout <<
iINFO <<
"MIXED PRECISION AVX-512 TILES OPTIMIZATIONS: ";
7704 if (useAVXTiles)
iout <<
"ENABLED\n";
7705 else iout <<
"DISABLED\n";
7708 #ifdef MEM_OPT_VERSION 7709 if (opts.
defined(
"binrefcoords"))
7711 current = config->
find(
"binrefcoords");
7714 << current->
data <<
"\n";
7721 << firstTimestep <<
"\n" <<
endi;
7733 void SimParameters::parse_mgrid_params(
ConfigList *config)
7737 mgridforcelist.clear();
7738 char *key =
new char[81];
7739 char *valstr =
new char[256];
7742 mgridforceOn =
TRUE;
7745 mgfp = mgridforcelist.find_key(default_key);
7747 iout <<
iINFO <<
"MGRIDFORCEPOTFILE key " 7748 << key <<
" redefined for file " << valstr <<
"\n" <<
endi;
7750 mgfp = mgridforcelist.add(default_key);
7755 parse_mgrid_string_param(config,
"gridforcefile",&(mgfp->
gridforceFile));
7756 parse_mgrid_string_param(config,
"gridforcecol",&(mgfp->
gridforceCol));
7757 parse_mgrid_string_param(config,
"gridforcechargecol",&(mgfp->
gridforceQcol));
7758 parse_mgrid_string_param(config,
"gridforcepotfile",&(mgfp->
gridforceVfile));
7769 current = config->
find(
"mgridforcepotfile");
7770 while (current != NULL) {
7771 int curlen = strlen(current->
data);
7774 sscanf(current->
data,
"%80s%255s",key,valstr);
7777 mgfp = mgridforcelist.find_key(key);
7778 if ( mgfp != NULL) {
7779 iout <<
iINFO <<
"MGRIDFORCEPOTFILE key " 7780 << key <<
" redefined for file " << valstr <<
"\n" <<
endi;
7782 mgfp = mgridforcelist.add(key);
7784 int fnamelen = strlen(valstr);
7794 current = current->
next;
7797 current = config->
find(
"mgridforcefile");
7798 while (current != NULL) {
7799 int curlen = strlen(current->
data);
7802 sscanf(current->
data,
"%80s%255s",key,valstr);
7805 mgfp = mgridforcelist.find_key(key);
7806 if ( mgfp == NULL) {
7807 iout <<
iINFO <<
"MGRIDFORCEFILE no key " 7808 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7810 int fnamelen = strlen(valstr);
7818 current = current->
next;
7821 current = config->
find(
"mgridforcevolts");
7822 while (current != NULL) {
7825 int curlen = strlen(current->
data);
7826 sscanf(current->
data,
"%80s%255s",key,valstr);
7829 mgfp = mgridforcelist.find_key(key);
7830 if ( mgfp == NULL) {
7831 iout <<
iINFO <<
"MGRIDFORCEVOLTS no key " 7832 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7835 if (boolval == -1) {
7837 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7843 current = current->
next;
7846 current = config->
find(
"mgridforcescale");
7847 while (current != NULL) {
7850 int curlen = strlen(current->
data);
7852 sscanf(current->
data,
"%80s%n",key,&nread);
7853 char *val = current->
data + nread + 1;
7856 mgfp = mgridforcelist.find_key(key);
7857 if ( mgfp == NULL) {
7858 iout <<
iINFO <<
"MGRIDFORCESCALE no key " 7859 << key <<
" defined for vector " << val <<
"\n" <<
endi;
7864 current = current->
next;
7867 current = config->
find(
"mgridforcevoff");
7868 while (current != NULL) {
7871 int curlen = strlen(current->
data);
7873 sscanf(current->
data,
"%80s%n",key,&nread);
7874 char *val = current->
data + nread + 1;
7877 mgfp = mgridforcelist.find_key(key);
7878 if ( mgfp == NULL) {
7879 iout <<
iINFO <<
"MGRIDFORCEVOFF no key " 7880 << key <<
" defined for vector " << val <<
"\n" <<
endi;
7885 current = current->
next;
7888 current = config->
find(
"mgridforcecol");
7889 while (current != NULL) {
7892 int curlen = strlen(current->
data);
7893 sscanf(current->
data,
"%80s%255s",key,valstr);
7896 mgfp = mgridforcelist.find_key(key);
7897 if ( mgfp == NULL) {
7898 iout <<
iINFO <<
"MGRIDFORCECOL no key " 7899 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7901 int collen = strlen(valstr);
7909 current = current->
next;
7912 current = config->
find(
"mgridforcechargecol");
7913 while (current != NULL) {
7916 int curlen = strlen(current->
data);
7917 sscanf(current->
data,
"%80s%255s",key,valstr);
7920 mgfp = mgridforcelist.find_key(key);
7921 if ( mgfp == NULL) {
7922 iout <<
iINFO <<
"MGRIDFORCECHARGECOL no key " 7923 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7925 int collen = strlen(valstr);
7933 current = current->
next;
7936 current = config->
find(
"mgridforcecont1");
7937 while (current != NULL) {
7940 int curlen = strlen(current->
data);
7941 sscanf(current->
data,
"%80s%255s",key,valstr);
7944 mgfp = mgridforcelist.find_key(key);
7945 if ( mgfp == NULL) {
7946 iout <<
iINFO <<
"MGRIDFORCECONT1 no key " 7947 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7950 if (boolval == -1) {
7952 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7958 current = current->
next;
7961 current = config->
find(
"mgridforcecont2");
7962 while (current != NULL) {
7965 int curlen = strlen(current->
data);
7966 sscanf(current->
data,
"%80s%255s",key,valstr);
7969 mgfp = mgridforcelist.find_key(key);
7970 if ( mgfp == NULL) {
7971 iout <<
iINFO <<
"MGRIDFORCECONT2 no key " 7972 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7975 if (boolval == -1) {
7977 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7983 current = current->
next;
7985 current = config->
find(
"mgridforcecont3");
7986 while (current != NULL) {
7989 int curlen = strlen(current->
data);
7990 sscanf(current->
data,
"%80s%255s",key,valstr);
7993 mgfp = mgridforcelist.find_key(key);
7994 if ( mgfp == NULL) {
7995 iout <<
iINFO <<
"MGRIDFORCECONT3 no key " 7996 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
8000 if (boolval == -1) {
8002 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
8008 current = current->
next;
8012 current = config->
find(
"mgridforcechecksize");
8013 while (current != NULL) {
8016 int curlen = strlen(current->
data);
8017 sscanf(current->
data,
"%80s%255s",key,valstr);
8020 mgfp = mgridforcelist.find_key(key);
8021 if ( mgfp == NULL) {
8022 iout <<
iINFO <<
"MGRIDFORCECHECKSIZE no key " 8023 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
8026 if (boolval == -1) {
8027 iout <<
iINFO <<
"MGRIDFORCECHECKSIZE key " 8028 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
8034 current = current->
next;
8044 while (params != NULL) {
8047 sprintf(errmsg,
"Value undefined for gridforceFile for key %s\n",
8053 sprintf(errmsg,
"Value undefined for gridforceCol for key %s\n",
8057 params = params->
next;
8062 void SimParameters::parse_mgrid_string_param(
ConfigList *cl,
8063 const char *fieldname,
8069 if (vallist != NULL) {
8070 val = vallist->
data;
8083 *dest =
new char[len+1];
8084 strncpy(*dest,val,len+1);
8091 void SimParameters::parse_group_restraints_params(
ConfigList *config)
8098 if (groupRestraintsOn) {
8100 arguments = config->
find(
"group1File");
8101 for ( ; arguments != NULL; arguments = arguments->
next) {
8102 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8103 groupRestraints.SetGroup1AtomFileIndices(key, strValue);
8105 sprintf(err_msg,
"For group1File, expected a tag and file name, but recieved: %s\n", arguments->
data);
8110 arguments = config->
find(
"group1List");
8111 for ( ; arguments != NULL; arguments = arguments->
next) {
8113 sscanf(arguments->
data,
"%127s%n", key, &nread);
8114 char *val = arguments->
data + nread + 1;
8115 groupRestraints.SetGroup1AtomListIndices(key, val);
8118 arguments = config->
find(
"group1RefPos");
8119 for ( ; arguments != NULL; arguments = arguments->
next) {
8121 sscanf(arguments->
data,
"%127s%n", key, &nread);
8122 char *val = arguments->
data + nread + 1;
8123 groupRestraints.SetGroup1RefPosition(key, val);
8126 arguments = config->
find(
"group2File");
8127 for ( ; arguments != NULL; arguments = arguments->
next) {
8128 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8129 groupRestraints.SetGroup2AtomFileIndices(key, strValue);
8131 sprintf(err_msg,
"For group2File, expected a tag and file name, but recieved: %s\n", arguments->
data);
8136 arguments = config->
find(
"group2List");
8137 for ( ; arguments != NULL; arguments = arguments->
next) {
8139 sscanf(arguments->
data,
"%127s%n", key, &nread);
8140 char *val = arguments->
data + nread + 1;
8141 groupRestraints.SetGroup2AtomListIndices(key, val);
8144 arguments = config->
find(
"groupResK");
8145 for ( ; arguments != NULL; arguments = arguments->
next) {
8147 if (sscanf(arguments->
data,
"%127s%lf", key, &kForce) == 2) {
8148 groupRestraints.SetForce(key, kForce);
8150 sprintf(err_msg,
"For groupResK, expected a tag and force value, but recieved: %s\n", arguments->
data);
8155 arguments = config->
find(
"groupResExp");
8156 for ( ; arguments != NULL; arguments = arguments->
next) {
8158 if (sscanf(arguments->
data,
"%127s%d", key, &exponent) == 2) {
8159 groupRestraints.SetExponent(key, exponent);
8161 sprintf(err_msg,
"For groupResExp, expected a tag and exponent but recieved: %s\n", arguments->
data);
8166 arguments = config->
find(
"groupResCenter");
8167 for ( ; arguments != NULL; arguments = arguments->
next) {
8169 sscanf(arguments->
data,
"%127s%n", key, &nread);
8170 char *val = arguments->
data + nread + 1;
8171 groupRestraints.SetResCenter(key, val);
8174 arguments = config->
find(
"groupResX");
8175 for ( ; arguments != NULL; arguments = arguments->
next) {
8176 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8177 groupRestraints.SetResDirectionX(key, strValue);
8179 sprintf(err_msg,
"For groupResX, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8184 arguments = config->
find(
"groupResY");
8185 for ( ; arguments != NULL; arguments = arguments->
next) {
8186 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8187 groupRestraints.SetResDirectionY(key, strValue);
8189 sprintf(err_msg,
"For groupResY, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8194 arguments = config->
find(
"groupResZ");
8195 for ( ; arguments != NULL; arguments = arguments->
next) {
8196 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8197 groupRestraints.SetResDirectionZ(key, strValue);
8199 sprintf(err_msg,
"For groupResZ, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8204 arguments = config->
find(
"groupResUseMagnitude");
8205 for ( ; arguments != NULL; arguments = arguments->
next) {
8206 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8207 groupRestraints.SetUseDistMagnitude(key, strValue);
8209 sprintf(err_msg,
"For groupResUseMagnitude, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8213 auto grps = groupRestraints.GetGroupResMap();
8214 groupRestraintsCount = grps.size();
8221 void SimParameters::create_output_directories(
const char *dirname){
8226 int baselen = strlen(outputFilename);
8227 char *filename =
new char[baselen+32];
8228 memset(filename, 0, baselen+32);
8229 strcpy(filename, outputFilename);
8230 if(access(filename, F_OK)!=0) {
8231 int ret =
MKDIR(filename);
8234 sprintf(errmsg,
"Error in creating top-level directory %s!", filename);
8241 strcat(filename, dirname);
8243 if(access(filename, F_OK)!=0) {
8244 int ret =
MKDIR(filename);
8247 sprintf(errmsg,
"Error in creating middle-level directory %s!", filename);
8254 for(
int i=0; i<numoutputprocs; i++) {
8255 memset(tmpstr, 0, 256);
8256 sprintf(tmpstr,
"%s%s%d", filename,
PATHSEPSTR, i);
8257 if(access(tmpstr, F_OK)!=0) {
8258 int ret =
MKDIR(tmpstr);
8261 sprintf(errmsg,
"Error in creating last-level directory %s!", tmpstr);
8274 #define BoolToString(b) ((b) ? "TRUE" : "FALSE") 8276 void SimParameters::print_mgrid_params()
8280 while (params != NULL) {
8291 const char *qcol_msg =
"Use atom charge";
8295 iout <<
iINFO <<
" ChargeCol " << qcol_msg
8311 iout <<
iINFO <<
" Gridforce-CheckSize " 8314 params = params->
next;
8341 if ( FFTWWisdomString ) {
8342 int fftwlen = strlen(FFTWWisdomString) + 1;
8344 msg->
put(fftwlen,FFTWWisdomString);
8346 if ( tclBCScript ) {
8347 int tcllen = strlen(tclBCScript) + 1;
8349 msg->
put(tcllen,tclBCScript);
8352 #ifdef MEM_OPT_VERSION 8353 int filelen = strlen(binAtomFile)+1;
8355 msg->
put(filelen, binAtomFile);
8357 filelen = strlen(binCoorFile)+1;
8359 msg->
put(filelen, binCoorFile);
8362 filelen = strlen(binVelFile)+1;
8364 msg->
put(filelen, binVelFile);
8368 filelen = strlen(binRefFile)+1;
8370 msg->
put(filelen, binRefFile);
8374 mgridforcelist.pack_data(msg);
8393 if ( FFTWWisdomString ) {
8396 FFTWWisdomString =
new char[fftwlen];
8397 msg->
get(fftwlen,FFTWWisdomString);
8400 fftwf_import_wisdom_from_string(FFTWWisdomString);
8402 fftw_import_wisdom_from_string(FFTWWisdomString);
8406 if ( tclBCScript ) {
8409 tclBCScript =
new char[tcllen];
8410 msg->
get(tcllen,tclBCScript);
8413 #ifdef MEM_OPT_VERSION 8416 binAtomFile =
new char[filelen];
8417 msg->
get(filelen, binAtomFile);
8420 binCoorFile =
new char[filelen];
8421 msg->
get(filelen, binCoorFile);
8425 binVelFile =
new char[filelen];
8426 msg->
get(filelen, binVelFile);
8431 binRefFile =
new char[filelen];
8432 msg->
get(filelen, binRefFile);
8439 mgridforcelist.clear();
8440 mgridforcelist.unpack_data(msg);
8449 if ( alchLambdaIDWS >= 0. ) {
8450 const BigReal lambda2 = ( (step / alchIDWSFreq) % 2 == 1 ) ? alchLambda2 : alchLambdaIDWS;
8459 if (alchLambdaIDWS < 0.)
return 0;
8460 if (alchLambdaIDWS > 1.) {
8461 NAMD_die(
"alchLambdaIDWS should be either in the range [0.0, 1.0], or negative (disabled).\n");
8474 if ( alchOutFreq % nonbondedFrequency != 0 ) {
8475 NAMD_die(
"For IDWS, alchOutFreq must be a multiple of nonBondedFrequency.\n");
8477 if ( fullElectFrequency > 0 ) {
8478 if ( alchOutFreq % fullElectFrequency != 0 ) {
8479 NAMD_die(
"For IDWS, alchOutFreq must be a multiple of fullElectFrequency.\n");
8482 if ( alchOutFreq ) {
8483 alchIDWSFreq = alchOutFreq;
8484 }
else if ( outputEnergies ) {
8485 alchIDWSFreq = outputEnergies;
8487 NAMD_die(
"Either alchOutFreq or outputEnergies should be non-zero.\n");
8489 if ( alchOutFreq && alchOutFreq != outputEnergies) {
8490 iout <<
iWARN <<
"alchOutFreq and outputEnergies do not match. IDWS output" 8491 <<
" to stdout may not be useful!\n" <<
endi;
8518 if ( alchLambdaFreq > 0 && step >= alchEquilSteps ) {
8523 const int timeOrigin = firstTimestep + alchEquilSteps;
8524 const BigReal alchLambdaDelta = getLambdaDelta();
8525 const BigReal increment = (step - timeOrigin) /
BigReal(alchLambdaFreq);
8526 return alchLambda + alchLambdaDelta*(floor(increment) + 1);
8536 return ((alchLambda2 - alchLambda)*alchLambdaFreq
8537 /
BigReal(N - firstTimestep - alchEquilSteps));
8542 return (lambda <= alchElecLambdaStart ? 0.
8543 : (lambda - alchElecLambdaStart) / (1. - alchElecLambdaStart));
8560 if ( lambda < alchRepLambdaEnd || alchRepLambdaEnd == 1.0 ) {
8562 }
else if ( lambda >= alchVdwLambdaEnd ) {
8565 return (lambda - alchRepLambdaEnd) / (alchVdwLambdaEnd - alchRepLambdaEnd);
8568 return (lambda >= alchVdwLambdaEnd ? 1. : lambda / alchVdwLambdaEnd);
8574 return (lambda >= alchRepLambdaEnd ? 1. : lambda / alchRepLambdaEnd);
8579 return (lambda >= alchBondLambdaEnd ? 1. : lambda / alchBondLambdaEnd);
8583 size_t num_max_grids = 1;
8584 if (!alchOn)
return num_max_grids;
8585 if (alchFepOn && !alchThermIntOn) {
8590 if (alchElecLambdaStart > 0) {
8594 if (!alchFepOn && alchThermIntOn) {
8600 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)
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)