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 "/" 70 #if defined(WIN32) && !defined(__CYGWIN__) 72 #define access(PATH,MODE) _access(PATH,00) 77 #if defined(WIN32) && !defined(__CYGWIN__) 89 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 90 #if defined(WIN32) && !defined(__CYGWIN__) 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);
757 opts.
optionalB(
"main",
"ignoreExclusionChecksum",
758 "Ignore exclusion checksum mismatch for explicitly defined " 759 "exclusions between atoms that might exceed the cutoff distance",
760 &ignoreExclusionChecksum,
FALSE);
762 opts.
optionalB(
"main",
"LJcorrection",
"Apply analytical tail corrections for energy and virial", &LJcorrection,
FALSE);
763 opts.
optionalB(
"main",
"LJcorrectionAlt",
"Apply alternative analytical tail corrections for energy and virial", &LJcorrectionAlt,
FALSE);
766 opts.
optionalB(
"main",
"SOAintegrate",
"Use SOA integration routine",
767 &SOAintegrateOn,
FALSE);
769 opts.
optionalB(
"main",
"CUDASOAintegrate",
"Use CUDA SOA integration routine",
770 &CUDASOAintegrateMode,
FALSE);
772 opts.
optionalB(
"main",
"GPUresident",
"Use GPU-resident mode",
774 opts.
optionalB(
"main",
"GPUresidentSingleProcess",
"Use GPU-resident single-process mode",
775 &GPUresidentSingleProcessMode,
TRUE);
777 opts.
optional(
"main",
"movingAverageWindowSize",
778 "Window size for moving averages of reductions for GPUresident",
779 &movingAverageWindowSize, 20);
780 opts.
optionalB(
"main",
"nsPerDay",
"Prints sampling rate in ns/day instead of days/ns",
782 #ifdef TIMER_COLLECTION 783 opts.
optional(
"main",
"TimerBinWidth",
784 "Bin width of timer histogram collection in microseconds",
785 &timerBinWidth, 1.0);
787 #if defined(NAMD_NVTX_ENABLED) || defined(NAMD_CMK_TRACE_ENABLED) || defined(NAMD_ROCTX_ENABLED) 789 opts.
optional(
"main",
"beginEventPatchID",
"Beginning patch ID for profiling",
790 &beginEventPatchID, 0);
791 opts.
optional(
"main",
"endEventPatchID",
"Ending patch ID for profiling",
792 &endEventPatchID, 5000);
794 opts.
optional(
"main",
"beginEventStep",
"Beginning time step for profiling",
796 opts.
optional(
"main",
"endEventStep",
"Ending time step for profiling",
797 &endEventStep, 1000);
799 opts.
optionalB(
"main",
"mshake",
"Using MSHAKE for rigid bond constraints",
801 opts.
optionalB(
"main",
"lincs",
"Using LINCS for rigid bond constrainsts",
804 opts.
optionalB(
"main",
"CUDAForceTable",
"Always use force table interpolation for nonbonded CUDA kernel",
805 &useCUDANonbondedForceTable,
TRUE);
806 opts.
optionalB(
"main",
"GPUForceTable",
"Always use force table interpolation for nonbonded GPU kernel",
807 &useGPUNonbondedForceTable);
809 opts.
optionalB(
"main",
"DeviceMigration",
"Perform migration on the device",
810 &useDeviceMigration,
FALSE);
811 opts.
optionalB(
"main",
"GPUAtomMigration",
"Perform atom migration on GPU",
812 &useGPUAtomMigration);
813 opts.
optionalB(
"main",
"UpdateAtomMap",
"Update the atom map when using GPU migration",
814 &updateAtomMap,
FALSE);
817 void SimParameters::config_parser_fileio(
ParseOptions &opts) {
829 opts.
optional(
"main",
"coordinates",
"initial PDB coordinate file",
833 "initial velocities, given as a PDB file",
PARSE_STRING);
834 opts.
optional(
"main",
"binvelocities",
835 "initial velocities, given as a binary restart",
PARSE_STRING);
836 opts.
optional(
"main",
"bincoordinates",
837 "initial coordinates in a binary restart file",
PARSE_STRING);
838 #ifdef MEM_OPT_VERSION 839 opts.
optional(
"main",
"binrefcoords",
840 "reference coordinates in a binary restart file",
PARSE_STRING);
845 opts.
optional(
"main",
"structure",
"initial PSF structure file",
852 "CHARMm 19 or CHARMm 22 compatable force field file (multiple " 858 opts.
optionalB(
"parameters",
"paraTypeXplor",
"Parameter file in Xplor format?", ¶TypeXplorOn,
FALSE);
859 opts.
optionalB(
"parameters",
"paraTypeCharmm",
"Parameter file in Charmm format?", ¶TypeCharmmOn,
FALSE);
863 opts.
optionalB(
"main",
"GromacsPair",
"Separately calculate pair interactions", &goGroPair,
FALSE);
864 opts.
optionalB(
"main",
"GoForcesOn",
"Go forces will be calculated", &goForcesOn,
FALSE);
865 opts.
require(
"GoForcesOn",
"GoParameters",
"Go parameter file", goParameters);
866 opts.
require(
"GoForcesOn",
"GoCoordinates",
"target coordinates for Go forces", goCoordinates);
871 opts.
require(
"GoForcesOn",
"GoMethod",
"Which type of matrix should be used to store Go contacts?",
PARSE_STRING);
874 opts.
require(
"main",
"outputname",
875 "prefix for the final PDB position and velocity filenames",
878 opts.
optional(
"main",
"auxFile",
"Filename for data stream output",
881 opts.
optional(
"main",
"numinputprocs",
"Number of pes to use for parallel input",
885 opts.
optional(
"main",
"numoutputprocs",
"Number of pes to use for parallel output",
888 opts.
optional(
"main",
"numoutputwriters",
"Number of output processors that simultaneously write to an output file",
892 opts.
optional(
"main",
"DCDfreq",
"Frequency of DCD trajectory output, in " 893 "timesteps", &dcdFrequency, 0);
895 opts.
optional(
"DCDfreq",
"DCDfile",
"DCD trajectory output file name",
897 opts.
optionalB(
"DCDfreq",
"DCDunitcell",
"Store unit cell in dcd timesteps?",
900 opts.
optional(
"main",
"velDCDfreq",
"Frequency of velocity " 901 "DCD output, in timesteps", &velDcdFrequency, 0);
903 opts.
optional(
"velDCDfreq",
"velDCDfile",
"velocity DCD output file name",
906 opts.
optional(
"main",
"forceDCDfreq",
"Frequency of force" 907 "DCD output, in timesteps", &forceDcdFrequency, 0);
909 opts.
optional(
"forceDCDfreq",
"forceDCDfile",
"force DCD output file name",
912 opts.
optional(
"main",
"XSTfreq",
"Frequency of XST trajectory output, in " 913 "timesteps", &xstFrequency, 0);
915 opts.
optional(
"XSTfreq",
"XSTfile",
"Extended sytem trajectory output " 916 "file name", xstFilename);
918 opts.
optional(
"main",
"restartfreq",
"Frequency of restart file " 919 "generation", &restartFrequency, 0);
921 opts.
optional(
"restartfreq",
"restartname",
"Prefix for the position and " 922 "velocity PDB files used for restarting", restartFilename);
923 opts.
optionalB(
"restartfreq",
"restartsave",
"Save restart files with " 924 "unique filenames rather than overwriting", &restartSave,
FALSE);
925 opts.
optionalB(
"restartfreq",
"restartsavedcd",
"Save DCD files with " 926 "unique filenames at each restart", &restartSaveDcd,
FALSE);
928 opts.
optionalB(
"restartfreq",
"binaryrestart",
"Specify use of binary restart files ",
929 &binaryRestart,
TRUE);
931 opts.
optional(
"main",
"crashOutputFlag",
932 "Flag of saving atom positions and velocities in case of crashing", &crashOutputFlag,
NAMD_CRASH_ALL);
933 opts.
optional(
"crashOutputFlag",
"crashFile",
934 "Positions and velocities output file when crashing", crashFilename);
936 opts.
optionalB(
"outputname",
"binaryoutput",
"Specify use of binary output files ",
937 &binaryOutput,
TRUE);
939 opts.
optionalB(
"main",
"amber",
"Is it AMBER force field?",
941 opts.
optionalB(
"amber",
"oldParmReader",
"Use the old AMBER parm/parm7 reader?", &oldParmReader,
FALSE);
942 opts.
optionalB(
"amber",
"readexclusions",
"Read exclusions from parm file?",
943 &readExclusions,
TRUE);
944 opts.
require(
"amber",
"scnb",
"1-4 VDW interactions are divided by scnb",
950 opts.
optionalB(
"main",
"gromacs",
"Use GROMACS-like force field?",
952 opts.
require(
"gromacs",
"grotopfile",
"GROMACS topology file",
954 opts.
optional(
"gromacs",
"grocoorfile",
"GROMACS coordinate file",
958 opts.
optionalB(
"main",
"vdwGeometricSigma",
959 "Use geometric mean to combine L-J sigmas, as for OPLS",
960 &vdwGeometricSigma,
FALSE);
963 opts.
optional(
"main",
"computeMapFile",
"Filename for computeMap",
965 opts.
optionalB(
"main",
"storeComputeMap",
"store computeMap?",
966 &storeComputeMap,
FALSE);
967 opts.
optionalB(
"main",
"loadComputeMap",
"load computeMap?",
968 &loadComputeMap,
FALSE);
971 void SimParameters::config_parser_fullelect(
ParseOptions &opts) {
975 DebugM(1,
"DPMTA setup start\n");
977 opts.
optionalB(
"main",
"FMA",
"Should FMA be used?", &FMAOn,
FALSE);
978 opts.
optional(
"FMA",
"FMALevels",
"Tree levels to use in FMA", &FMALevels,
981 opts.
optional(
"FMA",
"FMAMp",
"Number of FMA multipoles", &FMAMp, 8);
983 opts.
optionalB(
"FMA",
"FMAFFT",
"Use FFT enhancement in FMA?", &FMAFFTOn,
TRUE);
984 opts.
optional(
"FMAFFT",
"FMAFFTBlock",
"FFT blocking factor",
987 DebugM(1,
"DPMTA setup end\n");
997 opts.
optional(
"main",
"fullElectFrequency",
998 "Number of steps between full electrostatic executions",
999 &fullElectFrequency);
1002 opts.
optional(
"main",
"fullDispersionFrequency",
1003 "Number of steps between full LJ dispersion executions",
1004 &fullDispersionFrequency, 1);
1008 opts.
optional(
"main",
"fmaFrequency",
1009 "Number of steps between full electrostatic executions",
1014 "FMA theta parameter value",
1018 opts.
optionalB(
"main",
"FullDirect",
"Should direct calculations of full electrostatics be performed?",
1019 &fullDirectOn,
FALSE);
1025 "Use multilevel summation method for electrostatics?",
1027 opts.
optional(
"MSM",
"MSMQuality",
"MSM quality",
1029 opts.
optional(
"MSM",
"MSMApprox",
"MSM approximation",
1031 opts.
optional(
"MSM",
"MSMSplit",
"MSM splitting",
1033 opts.
optional(
"MSM",
"MSMLevels",
"MSM maximum number of levels",
1035 opts.
optional(
"MSM",
"MSMGridSpacing",
"MSM grid spacing (Angstroms)",
1036 &MSMGridSpacing, 2.5);
1037 opts.
optional(
"MSM",
"MSMPadding",
"MSM padding (Angstroms)",
1039 opts.
optional(
"MSM",
"MSMxmin",
"MSM x minimum (Angstroms)", &MSMxmin, 0);
1040 opts.
optional(
"MSM",
"MSMxmax",
"MSM x maximum (Angstroms)", &MSMxmax, 0);
1041 opts.
optional(
"MSM",
"MSMymin",
"MSM y minimum (Angstroms)", &MSMymin, 0);
1042 opts.
optional(
"MSM",
"MSMymax",
"MSM y maximum (Angstroms)", &MSMymax, 0);
1043 opts.
optional(
"MSM",
"MSMzmin",
"MSM z minimum (Angstroms)", &MSMzmin, 0);
1044 opts.
optional(
"MSM",
"MSMzmax",
"MSM z maximum (Angstroms)", &MSMzmax, 0);
1045 opts.
optional(
"MSM",
"MSMBlockSizeX",
1046 "MSM grid block size along X direction (for decomposing parallel work)",
1048 opts.
optional(
"MSM",
"MSMBlockSizeY",
1049 "MSM grid block size along Y direction (for decomposing parallel work)",
1051 opts.
optional(
"MSM",
"MSMBlockSizeZ",
1052 "MSM grid block size along Z direction (for decomposing parallel work)",
1056 "Use MSM serial version for long-range calculation?",
1057 &MsmSerialOn,
FALSE);
1063 "Use fast multipole method for electrostatics?",
1065 opts.
optional(
"FMM",
"FMMLevels",
"FMM number of levels",
1067 opts.
optional(
"FMM",
"FMMPadding",
"FMM padding margin (Angstroms)",
1072 opts.
optionalB(
"main",
"LJPME",
"Use particle mesh Ewald for LJ dispersion?",
1074 opts.
optional(
"LJPME",
"LJPMETolerance",
"LJ-PME direct space tolerance",
1075 &LJPMETolerance, 1.e-6);
1076 opts.
optional(
"LJPME",
"LJPMEInterpOrder",
"LJ-PME interpolation order",
1077 &LJPMEInterpOrder, 4);
1078 opts.
optional(
"LJPME",
"LJPMEGridSizeX",
"LJ-PME grid in x dimension",
1079 &LJPMEGridSizeX, 0);
1080 opts.
optional(
"LJPME",
"LJPMEGridSizeY",
"LJ-PME grid in y dimension",
1081 &LJPMEGridSizeY, 0);
1082 opts.
optional(
"LJPME",
"LJPMEGridSizeZ",
"LJ-PME grid in z dimension",
1083 &LJPMEGridSizeZ, 0);
1084 opts.
optional(
"LJPME",
"LJPMEGridSpacing",
"Maximum LJ-PME grid spacing (Angstroms)",
1085 &LJPMEGridSpacing, 0.);
1093 opts.
optionalB(
"LJPME",
"LJPMESerial",
"LJ-PME use serial implementation",
1094 &LJPMESerialOn,
FALSE);
1095 opts.
optionalB(
"LJPME",
"LJPMESerialRealSpace",
"LJ-PME use serial test code for real space part",
1096 &LJPMESerialRealSpaceOn,
FALSE);
1100 opts.
optionalB(
"main",
"PME",
"Use particle mesh Ewald for electrostatics?",
1102 opts.
optional(
"PME",
"PMETolerance",
"PME direct space tolerance",
1103 &PMETolerance, 1.e-6);
1104 opts.
optional(
"PME",
"PMEInterpOrder",
"PME interpolation order",
1105 &PMEInterpOrder, 4);
1106 opts.
optional(
"PME",
"PMEGridSizeX",
"PME grid in x dimension",
1108 opts.
optional(
"PME",
"PMEGridSizeY",
"PME grid in y dimension",
1110 opts.
optional(
"PME",
"PMEGridSizeZ",
"PME grid in z dimension",
1112 opts.
optional(
"PME",
"PMEGridSpacing",
"Maximum PME grid spacing (Angstroms)",
1113 &PMEGridSpacing, 0.);
1115 opts.
optional(
"PME",
"PMEProcessors",
1116 "PME FFT and reciprocal sum processor count", &PMEProcessors, 0);
1117 opts.
optional(
"PME",
"PMEMinSlices",
1118 "minimum thickness of PME reciprocal sum slab", &PMEMinSlices, 2);
1121 "PME FFT and reciprocal sum pencil grid size", &PMEPencils, -1);
1122 opts.
optional(
"PME",
"PMEPencilsX",
1123 "PME FFT and reciprocal sum pencil grid size X", &PMEPencilsX, 0);
1124 opts.
optional(
"PME",
"PMEPencilsY",
1125 "PME FFT and reciprocal sum pencil grid size Y", &PMEPencilsY, 0);
1126 opts.
optional(
"PME",
"PMEPencilsZ",
1127 "PME FFT and reciprocal sum pencil grid size Z", &PMEPencilsZ, 0);
1131 opts.
optional(
"PME",
"PMEPencilsYLayout",
1132 "PME FFT and reciprocal sum Y pencil layout strategy", &PMEPencilsYLayout, 0);
1133 opts.
optional(
"PME",
"PMEPencilsXLayout",
1134 "PME FFT and reciprocal sum X pencil layout strategy", &PMEPencilsXLayout, 1);
1137 opts.
optional(
"PME",
"PMESendOrder",
1138 "PME message ordering control", &PMESendOrder, 0);
1140 opts.
optional(
"PME",
"PMEMinPoints",
1141 "minimum points per PME reciprocal sum pencil", &PMEMinPoints, 10000);
1143 opts.
optionalB(
"main",
"PMEBarrier",
"Use barrier in PME?",
1144 &PMEBarrier,
FALSE);
1145 opts.
optionalB(
"main",
"PMEOffload",
"Offload PME to accelerator?",
1148 opts.
optionalB(
"PME",
"usePMECUDA",
"Use the PME CUDA version", &usePMECUDA, CmiNumPhysicalNodes() == 1);
1149 opts.
optionalB(
"PME",
"usePMEGPU",
"Use the PME GPU version", &usePMEGPU);
1152 opts.
optionalB(
"PME",
"useDPME",
"Use old DPME code?", &useDPME,
FALSE);
1156 opts.
optionalB(
"main",
"FFTWPatient",
"Use intensive plan creation to optimize FFTW?",
1158 &FFTWPatient,
TRUE);
1160 &FFTWPatient,
FALSE);
1163 opts.
optionalB(
"main",
"FFTWEstimate",
"Use estimates to optimize FFTW?",
1165 &FFTWEstimate,
TRUE);
1167 &FFTWEstimate,
FALSE);
1169 opts.
optionalB(
"main",
"FFTWUseWisdom",
"Read/save wisdom file for FFTW?",
1171 &FFTWUseWisdom,
FALSE);
1173 &FFTWUseWisdom,
TRUE);
1175 opts.
optional(
"FFTWUseWisdom",
"FFTWWisdomFile",
"File for FFTW wisdom",
1189 "Use \"Tiles\" mode for AVX-512 optimized calculations",
1190 &useAVXTiles,
TRUE);
1191 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 1192 opts.
optionalB(
"main",
"gpuGlobal",
"use GPU global (external) force",
1193 &useCudaGlobal,
FALSE);
1195 opts.
optional(
"gpuGlobal",
"gpuGlobalProfilingFreq",
"Frequency of printing GPU global profiling information", &cudaGlobalProfilingFreq, -1);
1197 useCudaGlobal =
false;
1201 void SimParameters::config_parser_methods(
ParseOptions &opts) {
1204 opts.
optionalB(
"main",
"minimization",
"Should minimization be performed?",
1205 &minimizeCGOn,
FALSE);
1206 opts.
optionalB(
"main",
"minVerbose",
"Print extra minimization diagnostics?",
1207 &minVerbose,
FALSE);
1208 opts.
optional(
"main",
"minTinyStep",
"very first minimization steps",
1209 &minTinyStep, 1.0e-6);
1211 opts.
optional(
"main",
"minBabyStep",
"initial minimization steps",
1212 &minBabyStep, 1.0e-2);
1214 opts.
optional(
"main",
"minLineGoal",
"line minimization gradient reduction",
1215 &minLineGoal, 1.0e-3);
1218 opts.
optionalB(
"main",
"velocityQuenching",
1219 "Should old-style minimization be performed?", &minimizeOn,
FALSE);
1221 opts.
optional(
"main",
"maximumMove",
"Maximum atom movement per step", &maximumMove, 0.0);
1225 opts.
optionalB(
"main",
"Langevin",
"Should Langevin dynamics be performed?",
1226 &langevinOn,
FALSE);
1227 opts.
require(
"Langevin",
"langevinTemp",
"Temperature for heat bath in Langevin " 1228 "dynamics", &langevinTemp);
1231 opts.
optional(
"Langevin",
"langevinDamping",
"Damping coefficient (1/ps)",
1234 opts.
optionalB(
"Langevin",
"langevinHydrogen",
"Should Langevin dynamics be applied to hydrogen atoms?",
1236 opts.
optional(
"Langevin",
"langevinFile",
"PDB file with temperature " 1237 "coupling terms (B(i)) (default is the PDB input file)",
1239 opts.
optional(
"Langevin",
"langevinCol",
"Column in the langevinFile " 1240 "containing the temperature coupling term B(i);\n" 1244 opts.
optionalB(
"Langevin",
"langevinBAOAB",
1245 "Should Langevin dynamics be performed using BAOAB integration?",
1246 &langevin_useBAOAB,
FALSE);
1249 opts.
optionalB(
"main",
"LoweAndersen",
"Should Lowe-Andersen dynamics be performed?",
1250 &loweAndersenOn,
FALSE);
1251 opts.
require(
"LoweAndersen",
"loweAndersenTemp",
"Temperature for heat bath in Lowe-Andersen " 1252 "dynamics", &loweAndersenTemp);
1255 opts.
optional(
"LoweAndersen",
"loweAndersenRate",
"Collision rate (1/ps)",
1256 &loweAndersenRate, 50);
1258 opts.
optional(
"LoweAndersen",
"loweAndersenCutoff",
"Cutoff radius",
1259 &loweAndersenCutoff, 2.7);
1265 opts.
optionalB(
"main",
"alch",
"Is achemical simulation being performed?",
1267 opts.
require(
"alch",
"alchLambda",
"Alchemical coupling parameter value",
1271 opts.
optionalB(
"alch",
"singleTopology",
1272 "Is single topology used for relative free energy?", &singleTopology,
FALSE);
1275 "Is S-D bonded terms scaling for relative free energy?", &sdScaling,
FALSE);
1277 opts.
optional(
"alch",
"alchFile",
"PDB file with perturbation flags " 1279 opts.
optional(
"alch",
"alchCol",
"Column in the alchFile with the " 1282 opts.
optional(
"alch",
"unperturbedBondFile",
"mini psf file with unperturbed bond info" 1284 opts.
optional(
"alch",
"alchOutFreq",
"Frequency of alchemical energy" 1285 "output in timesteps", &alchOutFreq, 5);
1287 opts.
optional(
"alch",
"alchOutFile",
"Alchemical energy output filename",
1291 opts.
optional(
"alch",
"alchVdwShiftCoeff",
"Coeff used for generating" 1292 "the altered alchemical vDW interactions", &alchVdwShiftCoeff, 5.);
1295 opts.
optionalB(
"alch",
"alchWCA",
"Is WCA decomposition being performed?",
1299 opts.
optional(
"alch",
"alchElecLambdaStart",
"Lambda at which electrostatic" 1300 "scaling of exnihilated particles begins", &alchElecLambdaStart, 0.5);
1303 opts.
optional(
"alch",
"alchVdwLambdaEnd",
"Lambda at which vdW" 1304 "scaling of exnihilated particles ends", &alchVdwLambdaEnd, 1.0);
1307 opts.
optional(
"alch",
"alchRepLambdaEnd",
"Lambda at which repulsive vdW" 1308 "scaling of exnihilated particles ends and attractive vdW scaling" 1309 "begins", &alchRepLambdaEnd, 0.5);
1312 opts.
optional(
"alch",
"alchBondLambdaEnd",
"Lambda at which bonded" 1313 "scaling of exnihilated particles begins", &alchBondLambdaEnd, 0.0);
1316 opts.
optionalB(
"alch",
"alchDecouple",
"Enable alchemical decoupling?",
1317 &alchDecouple,
FALSE);
1318 opts.
optionalB(
"alch",
"alchBondDecouple",
"Enable decoupling of purely " 1319 "alchemical bonds?", &alchBondDecouple,
FALSE);
1322 opts.
optional(
"alch",
"alchType",
"Which alchemical method to use?",
1324 opts.
optional(
"alch",
"alchLambda2",
"Alchemical coupling comparison value",
1326 opts.
optional(
"alch",
"alchLambdaIDWS",
"Alchemical coupling comparison value for interleaved double-wide sampling",
1327 &alchLambdaIDWS, -1);
1328 opts.
optional(
"alch",
"alchLambdaFreq",
1329 "Frequency of increasing coupling parameter value", &alchLambdaFreq, 0);
1331 opts.
optional(
"alch",
"alchSwitchType",
"Switching type flag",
1333 opts.
optional(
"alch",
"alchEquilSteps",
"Equilibration steps, before " 1334 "data collection in the alchemical window", &alchEquilSteps, 0);
1337 opts.
optionalB(
"alch",
"alchEnsembleAvg",
"Ensemble Average in use?",
1338 &alchEnsembleAvg,
TRUE);
1341 opts.
optionalB(
"main",
"les",
"Is locally enhanced sampling enabled?",
1343 opts.
require(
"les",
"lesFactor",
"Local enhancement factor", &lesFactor);
1344 opts.
optional(
"les",
"lesFile",
"PDB file with enhancement flags " 1346 opts.
optional(
"les",
"lesCol",
"Column in the lesFile with the " 1348 opts.
optionalB(
"les",
"lesReduceTemp",
"Reduce enhanced atom temperature?",
1349 &lesReduceTemp,
FALSE);
1350 opts.
optionalB(
"les",
"lesReduceMass",
"Reduce enhanced atom mass?",
1351 &lesReduceMass,
FALSE);
1355 "Is replica exchange solute tempering enabled?",
1356 &soluteScalingOn,
FALSE);
1357 opts.
optional(
"soluteScaling",
"soluteScalingFactor",
1358 "Solute scaling factor",
1359 &soluteScalingFactor, 1.0);
1361 opts.
optional(
"soluteScaling",
"soluteScalingFactorCharge",
1362 "Solute scaling factor for electrostatic interactions",
1363 &soluteScalingFactorCharge);
1365 opts.
optional(
"soluteScaling",
"soluteScalingFactorVdw",
1366 "Solute scaling factor for van der Waals interactions",
1367 &soluteScalingFactorVdw);
1369 opts.
optional(
"soluteScaling",
"soluteScalingFile",
1370 "PDB file with scaling flags; if undefined, defaults to main PDB file",
1372 opts.
optional(
"soluteScaling",
"soluteScalingCol",
1373 "Column in the soluteScalingFile providing the scaling flag",
1375 opts.
optionalB(
"main",
"soluteScalingAll",
1376 "Apply scaling also to bond and angle interactions?",
1377 &soluteScalingAll,
FALSE);
1380 opts.
optionalB(
"main",
"drude",
"Perform integration of Drude oscillators?",
1382 opts.
require(
"drude",
"drudeTemp",
"Temperature for freezing " 1383 "Drude oscillators", &drudeTemp);
1386 opts.
optional(
"drude",
"drudeDamping",
"Damping coefficient (1/ps) for " 1387 "Drude oscillators", &drudeDamping);
1389 opts.
optional(
"drude",
"drudeNbtholeCut",
"Nonbonded Thole interactions " 1390 "interaction radius", &drudeNbtholeCut, 5.0);
1392 opts.
optionalB(
"drude",
"drudeHardWall",
"Apply maximum Drude bond length " 1393 "restriction?", &drudeHardWallOn,
TRUE);
1394 opts.
optional(
"drude",
"drudeBondLen",
"Drude oscillator bond length " 1395 "beyond which to apply restraint", &drudeBondLen, 0.25);
1397 opts.
optional(
"drude",
"drudeBondConst",
"Drude oscillator restraining " 1398 "force constant", &drudeBondConst, 40000.0);
1402 opts.
optionalB(
"main",
"pairInteraction",
1403 "Are pair interactions calculated?", &pairInteractionOn,
FALSE);
1404 opts.
optional(
"pairInteraction",
"pairInteractionFile",
1405 "PDB files with interaction flags " "default is the input PDB file",
1407 opts.
optional(
"pairInteraction",
"pairInteractionCol",
1408 "Column in the pairInteractionFile with the interaction flags",
1410 opts.
require(
"pairInteraction",
"pairInteractionGroup1",
1411 "Flag for interaction group 1", &pairInteractionGroup1);
1412 opts.
optional(
"pairInteraction",
"pairInteractionGroup2",
1413 "Flag for interaction group 2", &pairInteractionGroup2, -1);
1414 opts.
optionalB(
"pairInteraction",
"pairInteractionSelf",
1415 "Compute only within-group interactions?", &pairInteractionSelf,
1418 opts.
optionalB(
"main",
"cosAngles",
"Are some angles cosine-based?", &cosAngles,
FALSE);
1422 opts.
optionalB(
"main",
"globalTest",
"Should global integration (for development) be used?",
1424 opts.
optionalB(
"main",
"dihedral",
"Should dihedral angle dynamics be performed?",
1425 &dihedralOn,
FALSE);
1427 opts.
optionalB(
"dihedral",
"COLD",
"Should overdamped Langevin dynamics be performed?",
1429 opts.
require(
"COLD",
"COLDTemp",
"Temperature for heat bath in COLD",
1433 opts.
require(
"COLD",
"COLDRate",
"Damping rate for COLD",
1439 "Should temperature coupling be performed?",
1441 opts.
require(
"tcouple",
"tCoupleTemp",
1442 "Temperature for temperature coupling", &tCoupleTemp);
1445 opts.
optional(
"tCouple",
"tCoupleFile",
"PDB file with temperature " 1446 "coupling terms (B(i)) (default is the PDB input file)",
1448 opts.
optional(
"tCouple",
"tCoupleCol",
"Column in the tCoupleFile " 1449 "containing the temperature coupling term B(i);\n" 1453 "Should stochastic velocity rescaling be performed?",
1454 &stochRescaleOn,
FALSE);
1455 opts.
require(
"stochRescale",
"stochRescaleTemp",
1456 "Temperature for stochastic velocity rescaling",
1460 opts.
require(
"stochRescale",
"stochRescalePeriod",
1461 "Time scale for stochastic velocity rescaling (ps)",
1462 &stochRescalePeriod);
1464 opts.
optional(
"stochRescale",
"stochRescaleFreq",
1465 "Number of steps between stochastic rescalings",
1468 opts.
optionalB(
"stochRescale",
"stochRescaleHeat",
1469 "Should heat transfer and work be computed?", &stochRescaleHeat,
FALSE);
1471 opts.
optional(
"main",
"rescaleFreq",
"Number of steps between " 1472 "velocity rescaling", &rescaleFreq);
1474 opts.
optional(
"main",
"rescaleTemp",
"Target temperature for velocity rescaling",
1479 opts.
optional(
"main",
"reassignFreq",
"Number of steps between " 1480 "velocity reassignment", &reassignFreq);
1482 opts.
optional(
"main",
"reassignTemp",
"Target temperature for velocity reassignment",
1486 opts.
optional(
"main",
"reassignIncr",
"Temperature increment for velocity reassignment",
1489 opts.
optional(
"main",
"reassignHold",
"Final holding temperature for velocity reassignment",
1495 opts.
optionalB(
"main",
"useGroupPressure",
1496 "Use group rather than atomic quantities for pressure control?",
1497 &useGroupPressure,
FALSE);
1500 opts.
optionalB(
"main",
"useFlexibleCell",
1501 "Use anisotropic cell fluctuation for pressure control?",
1502 &useFlexibleCell,
FALSE);
1506 "Fix some cell dimensions?",
1507 &fixCellDims,
FALSE);
1509 opts.
optionalB(
"fixCellDims",
"fixCellDimX",
1510 "Fix the X dimension?",
1511 &fixCellDimX,
FALSE);
1512 opts.
optionalB(
"fixCellDims",
"fixCellDimY",
1513 "Fix the Y dimension?",
1514 &fixCellDimY,
FALSE);
1515 opts.
optionalB(
"fixCellDims",
"fixCellDimZ",
1516 "Fix the Z dimension?",
1517 &fixCellDimZ,
FALSE);
1520 opts.
optionalB(
"main",
"useConstantRatio",
1521 "Use constant X-Y ratio for pressure control?",
1522 &useConstantRatio,
FALSE);
1525 opts.
optionalB(
"main",
"useConstantArea",
1526 "Use constant area for pressure control?",
1527 &useConstantArea,
FALSE);
1530 opts.
optionalB(
"main",
"excludeFromPressure",
1531 "Should some atoms be excluded from pressure rescaling?",
1532 &excludeFromPressure,
FALSE);
1533 opts.
optional(
"excludeFromPressure",
"excludeFromPressureFile",
1534 "PDB file for atoms to be excluded from pressure",
1536 opts.
optional(
"excludeFromPressure",
"excludeFromPressureCol",
1537 "Column in the excludeFromPressureFile" 1538 "containing the flags (nonzero means excluded);\n" 1542 opts.
optionalB(
"main",
"MonteCarloPressure",
1543 "Should Monte Carlo pressure control be used?",
1544 &monteCarloPressureOn,
FALSE);
1545 opts.
require(
"MonteCarloPressure",
"MonteCarloPressureTarget",
1546 "Target pressure for Monte Carlo pressure control",
1547 &monteCarloPressureTarget);
1548 opts.
require(
"MonteCarloPressure",
"MonteCarloTemp",
1549 "Temperature for Monte Carlo pressure control",
1553 opts.
optional(
"MonteCarloPressure",
"MonteCarloAcceptanceRate",
1554 "Acceptance rate for Monte Carlo pressure control",
1555 &monteCarloAcceptanceRate);
1557 opts.
optional(
"MonteCarloPressure",
"MonteCarloMaxVolume",
1558 "Maximum Volume change vector for Monte Carlo pressure control",
1559 &monteCarloMaxVolume);
1560 opts.
optional(
"MonteCarloPressure",
"MonteCarloAdjustmentFreq",
1561 "Number of steps between volume rescaling",
1562 &monteCarloAdjustmentFreq, 30);
1564 opts.
optional(
"MonteCarloPressure",
"MonteCarloPressureFreq",
1565 "Number of steps between volume rescaling",
1566 &monteCarloPressureFreq, 50);
1570 opts.
optionalB(
"main",
"BerendsenPressure",
1571 "Should Berendsen pressure bath coupling be performed?",
1572 &berendsenPressureOn,
FALSE);
1573 opts.
require(
"BerendsenPressure",
"BerendsenPressureTarget",
1574 "Target pressure for pressure coupling",
1575 &berendsenPressureTarget);
1577 opts.
require(
"BerendsenPressure",
"BerendsenPressureCompressibility",
1578 "Isothermal compressibility for pressure coupling",
1579 &berendsenPressureCompressibility);
1581 opts.
require(
"BerendsenPressure",
"BerendsenPressureRelaxationTime",
1582 "Relaxation time for pressure coupling",
1583 &berendsenPressureRelaxationTime);
1585 opts.
units(
"BerendsenPressureRelaxationTime",
N_FSEC);
1586 opts.
optional(
"BerendsenPressure",
"BerendsenPressureFreq",
1587 "Number of steps between volume rescaling",
1588 &berendsenPressureFreq, 1);
1592 opts.
optionalB(
"main",
"LangevinPiston",
1593 "Should Langevin piston pressure control be used?",
1594 &langevinPistonOn,
FALSE);
1595 opts.
optionalB(
"LangevinPiston",
"LangevinPistonBarrier",
1596 "Should Langevin piston barrier be used?",
1597 &langevinPistonBarrier,
TRUE);
1598 opts.
require(
"LangevinPiston",
"LangevinPistonTarget",
1599 "Target pressure for pressure control",
1600 &langevinPistonTarget);
1601 opts.
require(
"LangevinPiston",
"LangevinPistonPeriod",
1602 "Oscillation period for pressure control",
1603 &langevinPistonPeriod);
1606 opts.
require(
"LangevinPiston",
"LangevinPistonDecay",
1607 "Decay time for pressure control",
1608 &langevinPistonDecay);
1611 opts.
require(
"LangevinPiston",
"LangevinPistonTemp",
1612 "Temperature for pressure control piston",
1613 &langevinPistonTemp);
1616 opts.
optional(
"LangevinPiston",
"StrainRate",
1617 "Initial strain rate for pressure control (x y z)",
1622 "Should multigrator temperature and/or pressure control be used?",
1623 &multigratorOn,
FALSE);
1624 opts.
require(
"Multigrator",
"MultigratorPressureTarget",
1625 "Target pressure for pressure coupling",
1626 &multigratorPressureTarget);
1627 opts.
require(
"Multigrator",
"MultigratorTemperatureTarget",
1628 "Target temperature for temperature coupling",
1629 &multigratorTemperatureTarget);
1630 opts.
require(
"Multigrator",
"MultigratorPressureFreq",
1631 "Number of steps between pressure control moves",
1632 &multigratorPressureFreq);
1634 opts.
optional(
"Multigrator",
"MultigratorPressureRelaxationTime",
1635 "Relaxation time for pressure coupling is fs",
1636 &multigratorPressureRelaxationTime, 30000);
1638 opts.
units(
"MultigratorPressureRelaxationTime",
N_FSEC);
1639 opts.
optional(
"Multigrator",
"MultigratorTemperatureRelaxationTime",
1640 "Relaxation time for temperature coupling is fs",
1641 &multigratorTemperatureRelaxationTime, 1000);
1642 opts.
range(
"MultigratorTemperatureRelaxationTime",
POSITIVE);
1643 opts.
units(
"MultigratorTemperatureRelaxationTime",
N_FSEC);
1644 opts.
require(
"Multigrator",
"MultigratorTemperatureFreq",
1645 "Number of steps between temperature control moves",
1646 &multigratorTemperatureFreq);
1648 opts.
optional(
"Multigrator",
"MultigratorNoseHooverChainLength",
1649 "Nose-Hoover chain length",
1650 &multigratorNoseHooverChainLength, 4);
1654 opts.
optional(
"main",
"SurfaceTensionTarget",
1655 "Surface tension in the x-y plane",
1656 &surfaceTensionTarget, 0);
1659 opts.
optionalB(
"main",
"pressureprofile",
"Compute pressure profile?",
1660 &pressureProfileOn,
FALSE);
1661 opts.
require(
"pressureprofile",
"pressureprofileslabs",
1662 "Number of pressure profile slabs", &pressureProfileSlabs, 10);
1663 opts.
optional(
"pressureprofile",
"pressureprofilefreq",
1664 "How often to store profile data", &pressureProfileFreq, 1);
1665 opts.
optional(
"pressureprofile",
"pressureProfileAtomTypes",
1666 "Number of pressure profile atom types", &pressureProfileAtomTypes, 1);
1668 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesFile",
1669 "PDB files with pressure profile atom types" "default is the input PDB file",
1671 opts.
optional(
"pressureProfile",
"pressureProfileAtomTypesCol",
1672 "Column in the pressureProfileAtomTypesFile with the atom types ",
1674 opts.
optionalB(
"pressureProfile",
"pressureProfileEwald",
1675 "Compute Ewald contribution to pressure profile",
1676 &pressureProfileEwaldOn,
FALSE);
1677 opts.
optional(
"pressureProfile",
"pressureProfileEwaldX",
1678 "Ewald grid size X", &pressureProfileEwaldX, 10);
1680 opts.
optional(
"pressureProfile",
"pressureProfileEwaldY",
1681 "Ewald grid size Y", &pressureProfileEwaldY, 10);
1683 opts.
optional(
"pressureProfile",
"pressureProfileEwaldZ",
1684 "Ewald grid size Z", &pressureProfileEwaldZ, 10);
1688 opts.
optionalB(
"main",
"accelMD",
"Perform acclerated MD?", &accelMDOn,
FALSE);
1689 opts.
optional(
"accelMD",
"accelMDFirstStep",
"First accelMD step", &accelMDFirstStep, 0);
1691 opts.
optional(
"accelMD",
"accelMDLastStep",
"Last accelMD step", &accelMDLastStep, 0);
1693 opts.
optional(
"accelMD",
"accelMDOutFreq",
"Frequency of accelMD output", &accelMDOutFreq, 1);
1695 opts.
optionalB(
"accelMD",
"accelMDdihe",
"Apply boost to dihedral potential", &accelMDdihe,
TRUE);
1696 opts.
optionalB(
"accelMD",
"accelMDDebugOn",
"Debugging accelMD", &accelMDDebugOn,
FALSE);
1697 opts.
optional(
"accelMD",
"accelMDE",
"E for AMD", &accelMDE);
1699 opts.
optional(
"accelMD",
"accelMDalpha",
"alpha for AMD", &accelMDalpha);
1702 opts.
optionalB(
"accelMD",
"accelMDdual",
"Apply dual boost", &accelMDdual,
FALSE);
1703 opts.
optional(
"accelMDdual",
"accelMDTE",
"E for total potential under accelMDdual mode", &accelMDTE);
1705 opts.
optional(
"accelMDdual",
"accelMDTalpha",
"alpha for total potential under accelMDdual mode", &accelMDTalpha);
1709 opts.
optionalB(
"accelMD",
"accelMDG",
"Perform Gaussian accelMD calculation?", &accelMDG,
FALSE);
1710 opts.
optional(
"accelMDG",
"accelMDGiE",
"Flag to set the mode iE in Gaussian accelMD", &accelMDGiE, 1);
1711 opts.
optional(
"accelMDG",
"accelMDGcMDSteps",
"Number of cMD steps", &accelMDGcMDSteps, 1000000);
1713 opts.
optional(
"accelMDG",
"accelMDGEquiSteps",
"Number of equilibration steps after adding boost potential", &accelMDGEquiSteps, 1000000);
1715 opts.
require(
"accelMDG",
"accelMDGcMDPrepSteps",
"Number of preparation cMD steps", &accelMDGcMDPrepSteps, 200000);
1717 opts.
require(
"accelMDG",
"accelMDGEquiPrepSteps",
"Number of preparation equilibration steps", &accelMDGEquiPrepSteps, 200000);
1719 opts.
optional(
"accelMDG",
"accelMDGStatWindow",
"Number of steps to calculate avg and std", &accelMDGStatWindow, -1);
1720 opts.
optional(
"accelMDG",
"accelMDGSigma0P",
"Upper limit of std of total potential", &accelMDGSigma0P, 6.0);
1723 opts.
optional(
"accelMDG",
"accelMDGSigma0D",
"Upper limit of std of dihedral potential", &accelMDGSigma0D, 6.0);
1726 opts.
optionalB(
"accelMDG",
"accelMDGRestart",
"Flag to set use restart file in Gaussian accelMD", &accelMDGRestart,
FALSE);
1727 opts.
require(
"accelMDGRestart",
"accelMDGRestartFile",
"Restart file name for Gaussian accelMD", accelMDGRestartFile);
1728 opts.
optionalB(
"accelMDG",
"accelMDGresetVaftercmd",
"Flag to reset potential after accelMDGcMDSteps steps",
1729 &accelMDGresetVaftercmd,
FALSE);
1732 opts.
optionalB(
"main",
"adaptTempMD",
"Perform adaptive temperature sampling", &adaptTempOn,
FALSE);
1733 opts.
optional(
"adaptTempMD",
"adaptTempFirstStep",
"First adaptTemp step", &adaptTempFirstStep, 0);
1735 opts.
optional(
"adaptTempMD",
"adaptTempLastStep",
"Last adaptTemp step", &adaptTempLastStep, 0);
1737 opts.
optional(
"adaptTempMD",
"adaptTempOutFreq",
"Frequency of adaptTemp output", &adaptTempOutFreq, 10);
1739 opts.
optional(
"adaptTempMD",
"adaptTempFreq",
"Frequency of writing average energies to adaptTempOutFile", &adaptTempFreq, 10);
1741 opts.
optionalB(
"adaptTempMD",
"adaptTempDebug",
"Print debug output for adaptTemp", &adaptTempDebug,
FALSE);
1742 opts.
optional(
"adaptTempMD",
"adaptTempTmin",
"Minimun temperature for adaptTemp", &adaptTempTmin);
1745 opts.
optional(
"adaptTempMD",
"adaptTempTmax",
"Maximum temperature for adaptTemp", &adaptTempTmax);
1748 opts.
optional(
"adaptTempMD",
"adaptTempBins",
"Number of bins to store average energies", &adaptTempBins,0);
1750 opts.
optional(
"adaptTempMD",
"adaptTempDt",
"Integration timestep for Temp. updates", &adaptTempDt, 0.0001);
1753 opts.
optional(
"adaptTempMD",
"adaptTempAutoDt",
"Average temperature update in percent of temperature range", &adaptTempAutoDt, 0.0);
1755 opts.
optional(
"adaptTempMD",
"adaptTempCgamma",
"Adaptive bin averaging constant", &adaptTempCgamma, 0.1);
1757 opts.
optionalB(
"adaptTempMD",
"adaptTempLangevin",
"Send adaptTemp temperature to langevin thermostat",&adaptTempLangevin,
TRUE);
1758 opts.
optionalB(
"adaptTempMD",
"adaptTempRescaling",
"Send adaptTemp temperature to velocity rescaling thermostat", &adaptTempRescale,
TRUE);
1759 opts.
optional(
"adaptTempMD",
"adaptTempInFile",
"File containing restart information for adaptTemp", adaptTempInFile);
1760 opts.
optional(
"adaptTempMD",
"adaptTempRestartFile",
"File for writing adaptTemp restart information", adaptTempRestartFile);
1761 opts.
require(
"adaptTempRestartFile",
"adaptTempRestartFreq",
"Frequency of writing restart file", &adaptTempRestartFreq,0);
1763 opts.
optionalB(
"adaptTempMD",
"adaptTempRandom",
"Randomly assign a temperature if we step out of range", &adaptTempRandom,
FALSE);
1766 void SimParameters::config_parser_constraints(
ParseOptions &opts) {
1769 opts.
optionalB(
"main",
"fixedatoms",
"Are there fixed atoms?",
1770 &fixedAtomsOn,
FALSE);
1771 opts.
optionalB(
"fixedatoms",
"fixedAtomsForces",
1772 "Calculate forces between fixed atoms? (Required to unfix during run.)",
1773 &fixedAtomsForces,
FALSE);
1774 opts.
optional(
"fixedatoms",
"fixedAtomsFile",
"PDB file with flags for " 1775 "fixed atoms (default is the PDB input file)",
1777 opts.
optional(
"fixedatoms",
"fixedAtomsCol",
"Column in the fixedAtomsFile " 1778 "containing the flags (nonzero means fixed);\n" 1780 opts.
optional(
"fixedatoms",
"fixedAtomListFile",
"the text input file for fixed atoms " 1782 opts.
optionalB(
"fixedatoms",
"fixedAtomsForceOutput",
1783 "Do we write out forces acting on fixed atoms?",
1784 &fixedAtomsForceOutput,
FALSE);
1787 opts.
optionalB(
"main",
"constraints",
"Are harmonic constraints active?",
1788 &constraintsOn,
FALSE);
1789 opts.
require(
"constraints",
"consexp",
"Exponent for harmonic potential",
1792 #ifndef MEM_OPT_VERSION 1793 opts.
require(
"constraints",
"consref",
"PDB file containing reference " 1796 opts.
require(
"constraints",
"conskfile",
"PDB file containing force " 1798 opts.
require(
"constraints",
"conskcol",
"Column of conskfile to use " 1801 opts.
require(
"constraints",
"consAtomListFile",
"the text input file for constrained atoms " 1804 opts.
require(
"constraints",
"constraintScaling",
"constraint scaling factor",
1805 &constraintScaling, 1.0);
1813 opts.
optionalB(
"constraints",
"selectConstraints",
1814 "Restrain only selected Cartesian components of the coordinates?",
1815 &selectConstraintsOn,
FALSE);
1816 opts.
optionalB(
"selectConstraints",
"selectConstrX",
1817 "Restrain X components of coordinates ", &constrXOn,
FALSE);
1818 opts.
optionalB(
"selectConstraints",
"selectConstrY",
1819 "Restrain Y components of coordinates ", &constrYOn,
FALSE);
1820 opts.
optionalB(
"selectConstraints",
"selectConstrZ",
1821 "Restrain Z components of coordinates ", &constrZOn,
FALSE);
1825 opts.
optionalB(
"constraints",
"sphericalConstraints",
1826 "Restrain only radial spherical component of the coordinates?",
1827 &sphericalConstraintsOn,
FALSE);
1828 opts.
optional(
"sphericalConstraints",
"sphericalConstrCenter",
1829 "Center of spherical constraints", &sphericalConstrCenter);
1834 opts.
optionalB(
"constraints",
"movingConstraints",
1835 "Are some of the constraints moving?",
1836 &movingConstraintsOn,
FALSE);
1837 opts.
require(
"movingConstraints",
"movingConsVel",
1838 "Velocity of the movement, A/timestep", &movingConsVel);
1842 opts.
optionalB(
"constraints",
"rotConstraints",
1843 "Are the constraints rotating?",
1844 &rotConstraintsOn,
FALSE);
1845 opts.
require(
"rotConstraints",
"rotConsAxis",
1846 "Axis of rotation", &rotConsAxis);
1847 opts.
require(
"rotConstraints",
"rotConsPivot",
1848 "Pivot point of rotation",
1850 opts.
require(
"rotConstraints",
"rotConsVel",
1851 "Velocity of rotation, deg/timestep", &rotConsVel);
1856 opts.
optionalB(
"main",
"extForces",
"External command forces?",
1857 &extForcesOn,
FALSE);
1858 opts.
require(
"extForces",
"extForcesCommand",
1859 "External forces command", extForcesCommand);
1860 opts.
require(
"extForces",
"extCoordFilename",
1861 "External forces coordinate filename", extCoordFilename);
1862 opts.
require(
"extForces",
"extForceFilename",
1863 "External forces force filename", extForceFilename);
1867 opts.
optionalB(
"main",
"QMForces",
"Apply QM forces?",
1868 &qmForcesOn,
FALSE);
1869 opts.
require(
"QMForces",
"QMSoftware",
1870 "software whose format will be used for input/output", qmSoftware);
1871 opts.
require(
"QMForces",
"QMExecPath",
1872 "path to executable", qmExecPath);
1873 opts.
optional(
"QMForces",
"QMChargeMode",
1874 "type of QM atom charges gathered from the QM software", qmChrgModeS);
1875 opts.
require(
"QMForces",
"QMColumn",
1876 "column defining QM and MM regions", qmColumn);
1877 opts.
require(
"QMForces",
"QMBaseDir",
1878 "base path and name for QM input and output (preferably in memory)", qmBaseDir);
1879 opts.
optional(
"QMForces",
"QMConfigLine",
1880 "Configuration line for QM (multiple inputs allowed)",
PARSE_MULTIPLES);
1881 opts.
optional(
"QMForces",
"QMParamPDB",
1882 "PDB with QM parameters", qmParamPDB);
1883 opts.
optional(
"QMForces",
"QMPrepProc",
1884 "initial preparation executable", qmPrepProc);
1885 opts.
optional(
"QMForces",
"QMSecProc",
1886 "secondary executable", qmSecProc);
1887 opts.
optional(
"QMForces",
"QMCharge",
1889 opts.
optionalB(
"QMForces",
"QMChargeFromPSF",
1890 "gets charge of the QM group form PSF values", &qmChrgFromPSF,
FALSE);
1891 opts.
optional(
"QMForces",
"QMMult",
1893 opts.
optional(
"QMForces",
"QMLinkElement",
1895 opts.
optionalB(
"QMForces",
"QMReplaceAll",
1896 "replace all NAMD forces with QM forces", &qmReplaceAll,
FALSE);
1897 opts.
optional(
"QMForces",
"QMPCStride",
1898 "frequency of selection of point charges", &qmPCSelFreq, 1);
1900 opts.
optionalB(
"QMForces",
"QMNoPntChrg",
1901 "no point charges will be passed to the QM system(s)", &qmNoPC,
FALSE);
1902 opts.
optionalB(
"QMForces",
"QMElecEmbed",
1903 "activates electrostatic embedding", &qmElecEmbed,
TRUE);
1904 opts.
optionalB(
"QMForces",
"QMVdWParams",
1905 "use special VdW parameters for QM atoms", &qmVDW,
FALSE);
1906 opts.
optionalB(
"QMForces",
"QMBondGuess",
1907 "Guess QM-MM bonds from topology and QM atom definitions", &qmBondGuess,
FALSE);
1908 opts.
optional(
"QMForces",
"QMBondColumn",
1909 "column defining QM-MM bonds", qmBondColumn);
1910 opts.
optionalB(
"QMForces",
"QMBondDist",
1911 "values in QMBondColumn defines the distance of new link atom", &qmBondDist,
FALSE);
1912 opts.
optional(
"QMForces",
"QMBondValueType",
1913 "type of value in bond column: len or ratio", qmBondValueTypeS);
1914 opts.
optional(
"QMForces",
"QMBondScheme",
1915 "type of treatment given to QM-MM bonds.", qmBondSchemeS);
1916 opts.
optional(
"QMForces",
"QMenergyStride",
1917 "frequency of QM specific energy output (every x steps)", &qmEnergyOutFreq, 1);
1918 opts.
optional(
"QMForces",
"QMOutStride",
1919 "frequency of QM specific charge output (every x steps)", &qmOutFreq, 0);
1921 opts.
optional(
"QMForces",
"QMPositionOutStride",
1922 "frequency of QM specific position output (every x steps)", &qmPosOutFreq, 0);
1924 opts.
optional(
"QMForces",
"QMSimsPerNode",
1925 "QM executions per node", &qmSimsPerNode, 1);
1927 opts.
optionalB(
"QMForces",
"QMSwitching",
1928 "apply switching to point charges.", &qmPCSwitchOn,
FALSE);
1929 opts.
optional(
"QMForces",
"QMSwitchingType",
1930 "How are charges scaled down to be presented to QM groups.", qmPCSwitchTypeS);
1931 opts.
optional(
"QMForces",
"QMPointChargeScheme",
1932 "type of treatment given to the total sum of point charges.", qmPCSchemeS);
1933 opts.
optionalB(
"QMForces",
"QMCustomPCSelection",
1934 "custom and fixed selection of point charges per QM group.", &qmCustomPCSel,
FALSE);
1935 opts.
optional(
"QMForces",
"QMCustomPCFile",
1936 "file with a selection of point charges for a single QM group",
PARSE_MULTIPLES);
1937 opts.
optionalB(
"QMForces",
"QMLiveSolventSel",
1938 "Continuously update the selection of solvent molecules in QM groups", &qmLSSOn,
FALSE);
1939 opts.
optional(
"QMForces",
"QMLSSFreq",
1940 "frequency of QM water selection update", &qmLSSFreq, 100);
1942 opts.
optional(
"QMForces",
"QMLSSResname",
1943 "residue name for the solvent molecules (TIP3).", qmLSSResname);
1944 opts.
optional(
"QMForces",
"QMLSSMode",
1945 "mode of selection of point solvent molecules", qmLSSModeS);
1946 opts.
optional(
"QMForces",
"QMLSSRef",
1947 "for COM mode, defines reference for COM distance calculation",
PARSE_MULTIPLES);
1949 "Do we use Conditional SMD option?", &qmCSMD,
FALSE);
1950 opts.
optional(
"QMForces",
"QMCSMDFile",
1951 "File for Conditional SMD information",qmCSMDFile);
1954 opts.
optionalB(
"main",
"printBadContacts",
"Print atoms with huge forces?",
1955 &printBadContacts,
FALSE);
1959 opts.
optionalB(
"main",
"GBIS",
"Use GB implicit solvent?",
1961 opts.
optionalB(
"main",
"GBISSer",
"Use GB implicit solvent?",
1964 opts.
optional(
"GBIS",
"solventDielectric",
1965 "Solvent Dielectric", &solvent_dielectric, 78.5);
1966 opts.
optional(
"GBIS",
"intrinsicRadiusOffset",
1967 "Coulomb Radius Offset", &coulomb_radius_offset, 0.09);
1968 opts.
optional(
"GBIS",
"ionConcentration",
1969 "Ion Concentration", &ion_concentration, 0.2);
1971 "delta from GBOBC", &gbis_delta, 1.0);
1973 "beta from GBOBC", &gbis_beta, 0.8);
1975 "gamma from GBOBC", &gbis_gamma, 4.85);
1976 opts.
optional(
"GBIS",
"alphaCutoff",
1977 "cutoff for calculating effective born radius", &alpha_cutoff, 15);
1979 "maximum allowable born radius", &alpha_max, 30);
1981 "maximum screened intrinsic radius", &fsMax, 1.728);
1983 opts.
optionalB(
"main",
"SASA",
"Use Linear Combination of Pairwise Overlaps (LCPO) for calculating SASA",
1985 opts.
optional(
"SASA",
"surfaceTension",
1986 "Surfce Tension for SASA (kcal/mol/Ang^2)", &surface_tension, 0.005);
1992 "Do we use SMD option?",
1995 "Velocity of the movement, A/timestep", &SMDVel);
1998 "Direction of movement", &SMDDir);
2000 "Elastic constant for SMD", &SMDk);
2002 "Transverse elastic constant for SMD", &SMDk2, 0);
2005 opts.
require(
"SMD",
"SMDFile",
2006 "File for SMD information",
2008 opts.
optional(
"SMD",
"SMDOutputFreq",
2009 "Frequency of output",
2016 opts.
optionalB(
"main",
"tabulatedEnergies",
"Do we get energies from a table?", &tabulatedEnergies,
FALSE);
2018 opts.
require(
"tabulatedEnergies",
"tabulatedEnergiesFile",
"File containing energy table", tabulatedEnergiesFile);
2019 opts.
require(
"tabulatedEnergies",
"tableInterpType",
"Cubic or linear interpolation", tableInterpType);
2022 opts.
optionalB(
"main",
"TMD",
"Perform Targeted MD?", &TMDOn,
FALSE);
2023 opts.
optional(
"TMD",
"TMDk",
"Elastic constant for TMD", &TMDk, 0);
2025 opts.
require(
"TMD",
"TMDFile",
"File for TMD information", TMDFile);
2026 opts.
optionalB(
"TMD",
"TMDDiffRMSD",
"Restrain Difference between the RMSD from two structures", &TMDDiffRMSD,
FALSE);
2027 opts.
require(
"TMDDiffRMSD",
"TMDFile2",
"Second file for TMD information", TMDFile2);
2029 opts.
optional(
"TMD",
"TMDOutputFreq",
"Frequency of TMD output",
2032 opts.
require(
"TMD",
"TMDLastStep",
"Last TMD timestep", &TMDLastStep);
2034 opts.
optional(
"TMD",
"TMDFirstStep",
"First TMD step (default 0)", &TMDFirstStep, 0);
2035 opts.
optional(
"TMD",
"TMDInitialRMSD",
"Target RMSD at first TMD step (default -1 to use initial coordinates)", &TMDInitialRMSD);
2036 TMDInitialRMSD = -1;
2037 opts.
optional(
"TMD",
"TMDFinalRMSD",
"Target RMSD at last TMD step (default 0 )", &TMDFinalRMSD, 0);
2042 opts.
optionalB(
"main",
"symmetryRestraints",
"Enable symmetry restraints?", &symmetryOn,
FALSE);
2043 opts.
optional(
"symmetryRestraints",
"symmetryk",
"Elastic constant for symmetry restraints", &symmetryk, 0);
2045 opts.
optional(
"symmetryRestraints",
"symmetrykfile",
"PDB file specifying force contants on a per-atom basis",
PARSE_MULTIPLES);
2046 opts.
optionalB(
"symmetryRestraints",
"symmetryScaleForces",
"Scale applied forces over time?", &symmetryScaleForces,
FALSE);
2048 opts.
optional(
"symmetryRestraints",
"symmetryMatrixFile",
"File(s) for transfromation matrices",
PARSE_MULTIPLES);
2049 opts.
optional(
"symmetryRestraints",
"symmetryLastStep",
"Last symmetry timestep", &symmetryLastStep, -1);
2050 opts.
optional(
"symmetryRestraints",
"symmetryFirstStep",
"First symmetry step (default 0)", &symmetryFirstStep, 0);
2051 opts.
optional(
"symmetryRestraints",
"symmetryLastFullStep",
"Last full force symmetry timestep (default symmetryLastStep)", &symmetryLastFullStep, symmetryLastStep);
2052 opts.
optional(
"symmetryRestraints",
"symmetryFirstFullStep",
"First full force symmetry step (default symmetryFirstStep)", &symmetryFirstFullStep, symmetryFirstStep);
2056 opts.
optionalB(
"main",
"tclForces",
"Are Tcl global forces active?",
2057 &tclForcesOn,
FALSE);
2058 opts.
require(
"tclForces",
"tclForcesScript",
2062 opts.
optionalB(
"main",
"tclBC",
"Are Tcl boundary forces active?",
2064 opts.
require(
"tclBC",
"tclBCScript",
2065 "Tcl script defining calcforces for boundary forces",
PARSE_STRING);
2067 opts.
optional(
"tclBC",
"tclBCArgs",
"Extra args for calcforces command",
2072 opts.
optionalB(
"main",
"miscForces",
"Are misc global forces active?",
2073 &miscForcesOn,
FALSE);
2074 opts.
optional(
"miscForces",
"miscForcesScript",
2078 opts.
optionalB(
"main",
"freeEnergy",
"Perform free energy perturbation?",
2079 &freeEnergyOn,
FALSE);
2080 opts.
require(
"freeEnergy",
"freeEnergyConfig",
2084 opts.
optionalB(
"main",
"constantforce",
"Apply constant force?",
2085 &consForceOn,
FALSE);
2086 opts.
optional(
"constantforce",
"consForceFile",
2087 "Configuration file for constant forces",
PARSE_STRING);
2088 opts.
require(
"constantforce",
"consForceScaling",
2089 "Scaling factor for constant forces", &consForceScaling, 1.0);
2092 opts.
optionalB(
"main",
"colvars",
"Is the colvars module enabled?",
2094 opts.
optional(
"colvars",
"colvarsConfig",
2096 opts.
optional(
"colvars",
"colvarsInput",
2097 "input restart file for the collective variables",
PARSE_STRING);
2100 opts.
optional(
"main",
"globalMasterFrequency",
"Number of steps between globalMaster client calls", &globalMasterFrequency, 1);
2102 opts.
optionalB(
"main",
"globalMasterScaleByFrequency",
"Scale globalmaster forces by frequency?",
2103 &globalMasterScaleByFrequency,
FALSE);
2104 opts.
optionalB(
"main",
"globalMasterStaleForces",
"Use stale forces MTS for globalmaster forces by frequency?",
2105 &globalMasterStaleForces,
FALSE);
2110 #ifdef OPENATOM_VERSION 2111 void SimParameters::config_parser_openatom(
ParseOptions &opts) {
2112 opts.
optionalB(
"main",
"openatom",
"OpenAtom active?", &openatomOn,
FALSE);
2113 opts.
require(
"openatom",
"openatomDriverFile",
"What config file specifies openatom input parameters",
PARSE_STRING);
2114 opts.
require(
"openatom",
"openatomPhysicsFile",
"What structure file specifies openatom input system",
PARSE_STRING);
2115 opts.
require(
"openatom",
"openatomPdbFile",
"NAMD input file defining QM and MM regions",
PARSE_STRING);
2116 opts.
optional(
"openatom",
"openatomCol",
"Column in the openatomPdb with the QM/MM flag",
PARSE_STRING);
2118 #endif // OPENATOM_VERSION 2121 void SimParameters::config_parser_mgridforce(
ParseOptions &opts) {
2123 opts.
optionalB(
"main",
"mgridforce",
"Is Multiple gridforce active?",
2124 &mgridforceOn,
FALSE);
2125 opts.
optional(
"mgridforce",
"mgridforcevolts",
"Is Gridforce using Volts/eV as units?",
2127 opts.
require(
"mgridforce",
"mgridforcescale",
"Scale factor by which to multiply " 2129 opts.
require(
"mgridforce",
"mgridforcefile",
"PDB file containing force " 2131 opts.
require(
"mgridforce",
"mgridforcecol",
"Column of gridforcefile to " 2133 opts.
optional(
"mgridforce",
"mgridforcechargecol",
"Column of gridforcefile to " 2135 opts.
require(
"mgridforce",
"mgridforcepotfile",
"Gridforce potential file",
2137 opts.
optional(
"mgridforce",
"mgridforcecont1",
"Use continuous grid " 2139 opts.
optional(
"mgridforce",
"mgridforcecont2",
"Use continuous grid " 2141 opts.
optional(
"mgridforce",
"mgridforcecont3",
"Use continuous grid " 2143 opts.
optional(
"mgridforce",
"mgridforcevoff",
"Gridforce potential offsets",
2145 opts.
optional(
"mgridforce",
"mgridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
PARSE_MULTIPLES);
2148 void SimParameters::config_parser_gridforce(
ParseOptions &opts) {
2150 opts.
optionalB(
"main",
"gridforce",
"Is Gridforce active?",
2151 &gridforceOn,
FALSE);
2152 opts.
optionalB(
"gridforce",
"gridforcevolts",
"Is Gridforce using Volts/eV as units?",
2153 &gridforceVolts,
FALSE);
2154 opts.
require(
"gridforce",
"gridforcescale",
"Scale factor by which to multiply " 2155 "grid forces", &gridforceScale);
2156 opts.
require(
"gridforce",
"gridforcefile",
"PDB file containing force " 2158 opts.
require(
"gridforce",
"gridforcecol",
"Column of gridforcefile to " 2160 opts.
optional(
"gridforce",
"gridforcechargecol",
"Column of gridforcefile to " 2162 opts.
require(
"gridforce",
"gridforcepotfile",
"Gridforce potential file",
2164 opts.
optionalB(
"gridforce",
"gridforcecont1",
"Use continuous grid " 2165 "in A1 direction?", &gridforceContA1,
FALSE);
2166 opts.
optionalB(
"gridforce",
"gridforcecont2",
"Use continuous grid " 2167 "in A2 direction?", &gridforceContA2,
FALSE);
2168 opts.
optionalB(
"gridforce",
"gridforcecont3",
"Use continuous grid " 2169 "in A3 direction?", &gridforceContA3,
FALSE);
2170 opts.
optional(
"gridforce",
"gridforcevoff",
"Gridforce potential offsets",
2172 opts.
optionalB(
"gridforce",
"gridforcechecksize",
"Check if grid exceeds PBC cell dimensions?",
2173 &gridforcechecksize,
TRUE);
2176 void SimParameters::config_parser_dcd_selections(
ParseOptions &opts) {
2178 opts.
optionalB(
"main",
"DcdSelection",
"Selection list DCD trajectory output",
2179 &dcdSelectionOn,
FALSE);
2181 opts.
require(
"DcdSelection",
"DcdSelectionInputFile",
2184 opts.
require(
"DcdSelection",
"DCDSelectionFreq",
2185 "Frequency of selection list DCD trajectory output, in timesteps",
2187 opts.
optional(
"DcdSelection",
"DCDSelectionFile",
2188 "Selection list DCD trajectory output file name",
2192 void SimParameters::config_parser_group_restraints(
ParseOptions &opts) {
2193 opts.
optionalB(
"main",
"groupRestraints",
"Is Group restraints active?",
2194 &groupRestraintsOn,
FALSE);
2195 opts.
require(
"groupRestraints",
"groupResCenter",
"The center or equilibrium " 2197 opts.
require(
"groupRestraints",
"groupResK",
"Restraints force constant",
2199 opts.
optional(
"groupRestraints",
"groupResExp",
"Restraints exponent",
2201 opts.
optional(
"groupRestraints",
"groupResUseMagnitude",
"Should magnitude of " 2203 opts.
optional(
"groupRestraints",
"group1File",
"Text file containing atom indices " 2205 opts.
optional(
"groupRestraints",
"group1List",
"List of atom indices for group 1" 2207 opts.
optional(
"groupRestraints",
"group1RefPos",
"Reference COM position for group 1",
2209 opts.
optional(
"groupRestraints",
"group2File",
"Text file containing atom indices " 2211 opts.
optional(
"groupRestraints",
"group2List",
"List of atom indices for group 2",
2213 opts.
optional(
"groupRestraints",
"groupResX",
"Apply restraints in x direction",
2215 opts.
optional(
"groupRestraints",
"groupResY",
"Apply restraints in y direction",
2217 opts.
optional(
"groupRestraints",
"groupResZ",
"Apply restraints in z direction",
2221 void SimParameters::config_parser_movdrag(
ParseOptions &opts) {
2223 opts.
optionalB(
"main",
"movDragOn",
"Do we apply moving drag?",
2225 opts.
require(
"movDragOn",
"movDragFile",
2226 "Main moving drag PDB file", movDragFile);
2227 opts.
require(
"movDragOn",
"movDragCol",
2229 opts.
require(
"movDragOn",
"movDragGlobVel",
2230 "Global moving drag velocity (A/step)", &movDragGlobVel);
2231 opts.
require(
"movDragOn",
"movDragVelFile",
2232 "Moving drag linear velocity file", movDragVelFile);
2235 void SimParameters::config_parser_rotdrag(
ParseOptions &opts) {
2237 opts.
optionalB(
"main",
"rotDragOn",
"Do we apply rotating drag?",
2239 opts.
require(
"rotDragOn",
"rotDragFile",
2240 "Main rotating drag PDB file", rotDragFile);
2241 opts.
require(
"rotDragOn",
"rotDragCol",
2243 opts.
require(
"rotDragOn",
"rotDragAxisFile",
2244 "Rotating drag axis file", rotDragAxisFile);
2245 opts.
require(
"rotDragOn",
"rotDragPivotFile",
2246 "Rotating drag pivot point file", rotDragPivotFile);
2247 opts.
require(
"rotDragOn",
"rotDragGlobVel",
2248 "Global rotating drag angular velocity (deg/step)", &rotDragGlobVel);
2249 opts.
require(
"rotDragOn",
"rotDragVelFile",
2250 "Rotating drag angular velocity file", rotDragVelFile);
2251 opts.
require(
"rotDragOn",
"rotDragVelCol",
2252 "Rotating drag angular velocity column",
PARSE_STRING);
2255 void SimParameters::config_parser_constorque(
ParseOptions &opts) {
2257 opts.
optionalB(
"main",
"consTorqueOn",
"Do we apply \"constant\" torque?",
2258 &consTorqueOn,
FALSE);
2259 opts.
require(
"consTorqueOn",
"consTorqueFile",
2260 "Main \"constant\" torque PDB file", consTorqueFile);
2261 opts.
require(
"consTorqueOn",
"consTorqueCol",
2263 opts.
require(
"consTorqueOn",
"consTorqueAxisFile",
2264 "\"Constant\" torque axis file", consTorqueAxisFile);
2265 opts.
require(
"consTorqueOn",
"consTorquePivotFile",
2266 "\"Constant\" torque pivot point file", consTorquePivotFile);
2267 opts.
require(
"consTorqueOn",
"consTorqueGlobVal",
2268 "Global \"constant\" torque value (Kcal/(mol*A^2))", &consTorqueGlobVal);
2269 opts.
require(
"consTorqueOn",
"consTorqueValFile",
2270 "\"constant\" torque factors file", consTorqueValFile);
2271 opts.
require(
"consTorqueOn",
"consTorqueValCol",
2275 void SimParameters::config_parser_boundary(
ParseOptions &opts) {
2278 opts.
optionalB(
"main",
"sphericalBC",
"Are spherical boundary counditions " 2279 "active?", &sphericalBCOn,
FALSE);
2280 opts.
require(
"sphericalBC",
"sphericalBCCenter",
2281 "Center of spherical boundaries", &sphericalCenter);
2282 opts.
require(
"sphericalBC",
"sphericalBCr1",
"Radius for first sphere " 2283 "potential", &sphericalBCr1);
2286 opts.
require(
"sphericalBC",
"sphericalBCk1",
"Force constant for first " 2287 "sphere potential (+ is an inward force, - outward)",
2290 opts.
optional(
"sphericalBC",
"sphericalBCexp1",
"Exponent for first " 2291 "sphere potential", &sphericalBCexp1, 2);
2294 opts.
optional(
"sphericalBCr1",
"sphericalBCr2",
"Radius for second sphere " 2295 "potential", &sphericalBCr2);
2298 opts.
require(
"sphericalBCr2",
"sphericalBCk2",
"Force constant for second " 2299 "sphere potential (+ is an inward force, - outward)",
2302 opts.
optional(
"sphericalBCr2",
"sphericalBCexp2",
"Exponent for second " 2303 "sphere potential", &sphericalBCexp2, 2);
2307 opts.
optionalB(
"main",
"cylindricalBC",
"Are cylindrical boundary counditions " 2308 "active?", &cylindricalBCOn,
FALSE);
2309 opts.
require(
"cylindricalBC",
"cylindricalBCr1",
"Radius for first cylinder " 2310 "potential", &cylindricalBCr1);
2313 opts.
require(
"cylindricalBC",
"cylindricalBCk1",
"Force constant for first " 2314 "cylinder potential (+ is an inward force, - outward)",
2317 opts.
optional(
"cylindricalBC",
"cylindricalBCexp1",
"Exponent for first " 2318 "cylinder potential", &cylindricalBCexp1, 2);
2323 opts.
optional(
"cylindricalBC",
"cylindricalBCAxis",
"Cylinder axis (defaults to x)",
2325 opts.
require(
"cylindricalBC",
"cylindricalBCCenter",
2326 "Center of cylindrical boundaries", &cylindricalCenter);
2327 opts.
require (
"cylindricalBC",
"cylindricalBCl1",
"Length of first cylinder",
2331 opts.
optional (
"cylindricalBCl1",
"cylindricalBCl2",
"Length of second cylinder",
2337 opts.
optional(
"cylindricalBCr1",
"cylindricalBCr2",
"Radius for second cylinder " 2338 "potential", &cylindricalBCr2);
2341 opts.
require(
"cylindricalBCr2",
"cylindricalBCk2",
"Force constant for second " 2342 "cylinder potential (+ is an inward force, - outward)",
2345 opts.
optional(
"cylindricalBCr2",
"cylindricalBCexp2",
"Exponent for second " 2346 "cylinder potential", &cylindricalBCexp2, 2);
2350 opts.
optionalB(
"main",
"eFieldOn",
"Should an electric field be applied",
2352 opts.
optionalB(
"eFieldOn",
"eFieldNormalized",
"Is eField vector scaled by cell basis vectors?",
2353 &eFieldNormalized,
FALSE);
2354 opts.
require(
"eFieldOn",
"eField",
"Electric field vector", &eField);
2355 opts.
optional(
"eFieldOn",
"eFieldFreq",
"Electric field frequency", &eFieldFreq);
2356 opts.
optional(
"eFieldOn",
"eFieldPhase",
"Electric field phase", &eFieldPhase);
2359 opts.
optionalB(
"main",
"stirOn",
"Should stirring torque be applied",
2361 opts.
optional(
"stirOn",
"stirFilename",
"PDB file with flags for " 2362 "stirred atoms (default is the PDB input file)",
2364 opts.
optional(
"stirOn",
"stirredAtomsCol",
"Column in the stirredAtomsFile " 2365 "containing the flags (nonzero means fixed);\n" 2367 opts.
require(
"stirOn",
"stirStartingTheta",
"Stir starting theta offset", &stirStartingTheta);
2368 opts.
require(
"stirOn",
"stirK",
"Stir force harmonic spring constant", &stirK);
2370 opts.
require(
"stirOn",
"stirVel",
"Stir angular velocity (deg/timestep)", &stirVel);
2371 opts.
require(
"stirOn",
"stirAxis",
"Stir axis (direction vector)", &stirAxis);
2372 opts.
require(
"stirOn",
"stirPivot",
"Stir pivot point (coordinate)", &stirPivot);
2376 "Should extra bonded forces be applied",
2377 &extraBondsOn,
FALSE);
2378 opts.
optional(
"extraBonds",
"extraBondsFile",
2379 "file with list of extra bonds",
2381 opts.
optionalB(
"extraBonds",
"extraBondsCosAngles",
2382 "Should extra angles be cosine-based to match ancient bug",
2383 &extraBondsCosAngles,
TRUE);
2387 void SimParameters::config_parser_misc(
ParseOptions &opts) {
2390 opts.
optional(
"main",
"ldBalancer",
"Load balancer",
2392 opts.
optional(
"main",
"ldbStrategy",
"Load balancing strategy",
2394 opts.
optional(
"main",
"ldbPeriod",
"steps between load balancing",
2397 opts.
optional(
"main",
"firstLdbStep",
"when to start load balancing",
2400 opts.
optional(
"main",
"lastLdbStep",
"when to stop load balancing",
2403 opts.
optional(
"main",
"hybridGroupSize",
"Hybrid load balancing group size",
2405 opts.
optional(
"main",
"ldbBackgroundScaling",
2406 "background load scaling", &ldbBackgroundScaling);
2408 opts.
optional(
"main",
"ldbPMEBackgroundScaling",
2409 "PME node background load scaling", &ldbPMEBackgroundScaling);
2411 opts.
optional(
"main",
"ldbHomeBackgroundScaling",
2412 "home node background load scaling", &ldbHomeBackgroundScaling);
2414 opts.
optional(
"main",
"ldbRelativeGrainsize",
2415 "fraction of average load per compute", &ldbRelativeGrainsize, 0.);
2418 opts.
optional(
"main",
"traceStartStep",
"when to start tracing", &traceStartStep);
2420 opts.
optional(
"main",
"numTraceSteps",
"the number of timesteps to be traced", &numTraceSteps);
2423 #ifdef MEASURE_NAMD_WITH_PAPI 2424 opts.
optionalB(
"main",
"papiMeasure",
"whether use PAPI to measure performacne", &papiMeasure,
FALSE);
2425 opts.
optional(
"main",
"papiMeasureStartStep",
"when to measure performacne using PAPI", &papiMeasureStartStep);
2427 opts.
optional(
"main",
"numPapiMeasureSteps",
"the number of timesteps to be measured using PAPI", &numPapiMeasureSteps);
2431 opts.
optionalB(
"main",
"outputMaps",
"whether to dump compute map and patch map for analysis just before load balancing", &outputMaps,
FALSE);
2432 opts.
optionalB(
"main",
"benchTimestep",
"whether to do benchmarking timestep in which case final file output is disabled", &benchTimestep,
FALSE);
2433 opts.
optional(
"main",
"useCkLoop",
"whether to use CkLoop library to parallelize a loop in a function like OpenMP", &useCkLoop,
2434 #
if CMK_SMP && USE_CKLOOP
2441 opts.
optionalB(
"main",
"simulateInitialMapping",
"whether to study the initial mapping scheme", &simulateInitialMapping,
FALSE);
2442 opts.
optional(
"main",
"simulatedPEs",
"the number of PEs to be used for studying initial mapping", &simulatedPEs);
2444 opts.
optional(
"main",
"simulatedNodeSize",
"the node size to be used for studying initial mapping", &simulatedNodeSize);
2446 opts.
optionalB(
"main",
"disableTopology",
"ignore torus information during patch placement", &disableTopology,
FALSE);
2447 opts.
optionalB(
"main",
"verboseTopology",
"print torus information during patch placement", &verboseTopology,
FALSE);
2449 opts.
optionalB(
"main",
"ldbUnloadPME",
"no load on PME nodes",
2450 &ldbUnloadPME,
FALSE);
2451 opts.
optionalB(
"main",
"ldbUnloadZero",
"no load on pe zero",
2452 &ldbUnloadZero,
FALSE);
2453 opts.
optionalB(
"main",
"ldbUnloadOne",
"no load on pe one",
2454 &ldbUnloadOne,
FALSE);
2455 opts.
optionalB(
"main",
"ldbUnloadOutputPEs",
"no load on output PEs",
2456 &ldbUnloadOutputPEs,
FALSE);
2457 opts.
optionalB(
"main",
"noPatchesOnZero",
"no patches on pe zero",
2458 &noPatchesOnZero,
FALSE);
2459 opts.
optionalB(
"main",
"noPatchesOnOutputPEs",
"no patches on Output PEs",
2460 &noPatchesOnOutputPEs,
FALSE);
2461 opts.
optionalB(
"main",
"noPatchesOnOne",
"no patches on pe one",
2462 &noPatchesOnOne,
FALSE);
2463 opts.
optionalB(
"main",
"useCompressedPsf",
"The structure file psf is in the compressed format",
2464 &useCompressedPsf,
FALSE);
2465 opts.
optionalB(
"main",
"genCompressedPsf",
"Generate the compressed version of the psf file",
2466 &genCompressedPsf,
FALSE);
2467 opts.
optionalB(
"main",
"usePluginIO",
"Use the plugin I/O to load the molecule system",
2468 &usePluginIO,
FALSE);
2469 opts.
optionalB(
"main",
"mallocTest",
"test how much memory all PEs can allocate",
2470 &mallocTest,
FALSE);
2471 opts.
optionalB(
"main",
"printExclusions",
"print exclusion lists to stdout",
2472 &printExclusions,
FALSE);
2473 opts.
optional(
"main",
"proxySendSpanningTree",
"using spanning tree to send proxies",
2474 &proxySendSpanningTree, -1);
2475 opts.
optional(
"main",
"proxyRecvSpanningTree",
"using spanning tree to receive proxies",
2476 &proxyRecvSpanningTree, 0);
2477 opts.
optional(
"main",
"proxyTreeBranchFactor",
"the branch factor when building a spanning tree",
2478 &proxyTreeBranchFactor, 0);
2479 opts.
optionalB(
"main",
"twoAwayX",
"half-size patches in 1st dimension",
2481 opts.
optionalB(
"main",
"twoAwayY",
"half-size patches in 2nd dimension",
2483 opts.
optionalB(
"main",
"twoAwayZ",
"half-size patches in 3rd dimension",
2485 opts.
optional(
"main",
"maxPatches",
"maximum patch count", &maxPatches, -1);
2488 opts.
optional(
"main",
"firsttimestep",
"Timestep to start simulation at",
2493 opts.
optionalB(
"main",
"test",
"Perform self-tests rather than simulation",
2495 opts.
optionalB(
"main",
"commOnly",
"Do not evaluate forces or integrate",
2498 opts.
optionalB(
"main",
"statsOn",
"counters in machine layer",
2501 opts.
optionalB(
"main",
"hbonds",
"Use explicit hydrogen bond term",
2502 &HydrogenBonds,
FALSE);
2503 opts.
optionalB(
"hbonds",
"hbAntecedents",
"Include Antecedent in hbond term",
2504 &useAntecedent,
TRUE);
2505 opts.
optional(
"hbonds",
"hbAAexp",
"Hbond AA-A-H angle cos exponential",
2507 opts.
optional(
"hbonds",
"hbHAexp",
"Hbond D-H-A angle cos exponential",
2509 opts.
optional(
"hbonds",
"hbDistAexp",
"Hbond A-D dist attractive exponential",
2511 opts.
optional(
"hbonds",
"hbDistRexp",
"Hbond A-D dist repulstive exponential",
2513 opts.
optional(
"hbonds",
"hbCutoffAngle",
"Hbond D-H-A cutoff angle",
2514 &dhaCutoffAngle, 100.0);
2516 opts.
optional(
"hbonds",
"hbOnAngle",
"Hbond D-H-A switch function on angle",
2519 opts.
optional(
"hbonds",
"hbOffAngle",
"Hbond D-H-A switch function off angle",
2520 &dhaOffAngle, 80.0);
2522 opts.
optional(
"hbonds",
"hbCutoffDist",
"Hbond A-D cutoff distance",
2523 &daCutoffDist, 7.5);
2526 opts.
optional(
"hbonds",
"hbOnDist",
"Hbond A-D switch function on distance",
2530 opts.
optional(
"hbonds",
"hbOffDist",
"Hbond A-D switch function off distance",
2536 opts.
optionalB(
"main",
"IMDon",
"Connect using IMD?",&IMDon,
FALSE);
2537 opts.
optional(
"IMDon",
"IMDversion",
"IMD protocol version number",&IMDversion,2);
2539 opts.
require(
"IMDon",
"IMDport",
"Port to which to bind", &IMDport);
2541 opts.
require(
"IMDon",
"IMDfreq",
"Frequency at which to report", &IMDfreq);
2543 opts.
optionalB(
"IMDon",
"IMDwait",
"Pause until IMD connection?",&IMDwait,
2545 opts.
optionalB(
"IMDon",
"IMDignore",
"Ignore any user input?",&IMDignore,
2547 opts.
optionalB(
"IMDon",
"IMDignoreForces",
"Ignore forces ONLY?",&IMDignoreForces,
2549 opts.
optionalB(
"IMDon",
"IMDsendTime",
"Send time information",&IMDsendsettings.time_switch,
2551 opts.
optionalB(
"IMDon",
"IMDsendEnergies",
"Send energies via IMD:",&IMDsendsettings.energies_switch,
2553 opts.
optionalB(
"IMDon",
"IMDsendBoxDimensions",
"Send box dimensions via IMD:",&IMDsendsettings.box_switch,
2555 opts.
optionalB(
"IMDon",
"IMDsendPositions",
"Send positions via IMD:",&IMDsendsettings.fcoords_switch,
2557 opts.
optionalB(
"IMDon",
"IMDwrapPositions",
"Send positions as wrapped:",&IMDsendsettings.wrap_switch,
2559 opts.
optionalB(
"IMDon",
"IMDsendVelocities",
"Send velocities via IMD:",&IMDsendsettings.velocities_switch,
2561 opts.
optionalB(
"IMDon",
"IMDsendForces",
"Send forces via IMD:",&IMDsendsettings.forces_switch,
2564 opts.
optional(
"ldBalancer",
"maxSelfPart",
2565 "maximum number of self partitions in one patch", &maxSelfPart, 20);
2567 opts.
optional(
"ldBalancer",
"maxPairPart",
2568 "maximum number of pair partitions in one patch", &maxPairPart, 8);
2570 opts.
optional(
"ldBalancer",
"numAtomsSelf",
2571 "maximum number of atoms in one self compute distribution",
2572 &numAtomsSelf, 154);
2575 opts.
optional(
"ldBalancer",
"numAtomsSelf2",
2576 "maximum number of atoms in one self compute distribution",
2577 &numAtomsSelf2, 154);
2580 opts.
optional(
"ldBalancer",
"numAtomsPair",
2581 "maximum number of atoms in one pair compute distribution",
2582 &numAtomsPair, 318);
2584 opts.
optional(
"ldBalancer",
"numAtomsPair2",
2585 "maximum number of atoms in one pair compute distribution",
2586 &numAtomsPair2, 637);
2588 opts.
optional(
"main",
"minAtomsPerPatch",
2589 "minimum average atoms per patch",
2590 &minAtomsPerPatch, 40);
2594 opts.
optional(
"main",
"emptyPatchLoad",
2595 "load generated by empty patch, in atoms",
2596 &emptyPatchLoad, 40);
2600 opts.
optional(
"main",
"maxExclusionFlags",
2601 "maximum number of exclusion flags per atom", &maxExclusionFlags, 256);
2606 opts.
optional(
"main",
"bondedGPU",
"Bitmask for calculating bonded interactions on GPU", &bondedGPU);
2611 opts.
optionalB(
"main",
"useCUDAdisable",
"Disable kernels to maintain feature compatibility with CUDA", &useCUDAdisable,
TRUE);
2614 opts.
optional(
"main",
"mic_unloadMICPEs",
"Indicates whether or not the load balancer should unload PEs driving Xeon Phi cards", &mic_unloadMICPEs, 1);
2615 opts.
optional(
"main",
"mic_singleKernel",
"Set to non-zero to have all MIC work to be placed in a single kernel", &mic_singleKernel, 1);
2616 opts.
optional(
"main",
"mic_deviceThreshold",
"Threshold to use for directing computes to Xeon Phi devices", &mic_deviceThreshold, -1);
2617 opts.
optional(
"main",
"mic_hostSplit",
"DMK - reserved", &mic_hostSplit, -1);
2618 opts.
optional(
"main",
"mic_numParts_self_p1",
"MIC-Specific NumParts SELF Parameter 1", &mic_numParts_self_p1, -1);
2619 opts.
optional(
"main",
"mic_numParts_pair_p1",
"MIC-Specific NumParts PAIR Parameter 1", &mic_numParts_pair_p1, -1);
2620 opts.
optional(
"main",
"mic_numParts_pair_p2",
"MIC-Specific NumParts PAIR Parameter 2", &mic_numParts_pair_p2, -1);
2628 iout <<
iINFO <<
"EXTENDED SYSTEM FILE " << filename <<
"\n" <<
endi;
2631 ifstream xscFile(filename);
2632 if ( ! xscFile )
NAMD_die(
"Unable to open extended system file.\n");
2636 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2637 xscFile.getline(labels,1023);
2638 }
while ( strncmp(labels,
"#$LABELS ",9) );
2640 int a_x, a_y, a_z, b_x, b_y, b_z, c_x, c_y, c_z;
2641 a_x = a_y = a_z = b_x = b_y = b_z = c_x = c_y = c_z = -1;
2642 int o_x, o_y, o_z, s_u, s_v, s_w, s_x, s_y, s_z;
2643 o_x = o_y = o_z = s_u = s_v = s_w = s_x = s_y = s_z = -1;
2644 int v_x = -1, v_y = -1 , v_z = -1;
2647 char *l_i = labels + 8;
2649 if ( *l_i ==
' ' ) { ++l_i;
continue; }
2651 for ( l_i2 = l_i; *l_i2 && *l_i2 !=
' '; ++l_i2 );
2652 if ( (l_i2 - l_i) == 3 && (l_i[1] ==
'_') ) {
2653 if (l_i[0] ==
'a' && l_i[2] ==
'x') a_x = pos;
2654 if (l_i[0] ==
'a' && l_i[2] ==
'y') a_y = pos;
2655 if (l_i[0] ==
'a' && l_i[2] ==
'z') a_z = pos;
2656 if (l_i[0] ==
'b' && l_i[2] ==
'x') b_x = pos;
2657 if (l_i[0] ==
'b' && l_i[2] ==
'y') b_y = pos;
2658 if (l_i[0] ==
'b' && l_i[2] ==
'z') b_z = pos;
2659 if (l_i[0] ==
'c' && l_i[2] ==
'x') c_x = pos;
2660 if (l_i[0] ==
'c' && l_i[2] ==
'y') c_y = pos;
2661 if (l_i[0] ==
'c' && l_i[2] ==
'z') c_z = pos;
2662 if (l_i[0] ==
'o' && l_i[2] ==
'x') o_x = pos;
2663 if (l_i[0] ==
'o' && l_i[2] ==
'y') o_y = pos;
2664 if (l_i[0] ==
'o' && l_i[2] ==
'z') o_z = pos;
2665 if (l_i[0] ==
's' && l_i[2] ==
'u') s_u = pos;
2666 if (l_i[0] ==
's' && l_i[2] ==
'v') s_v = pos;
2667 if (l_i[0] ==
's' && l_i[2] ==
'w') s_w = pos;
2668 if (l_i[0] ==
's' && l_i[2] ==
'x') s_x = pos;
2669 if (l_i[0] ==
's' && l_i[2] ==
'y') s_y = pos;
2670 if (l_i[0] ==
's' && l_i[2] ==
'z') s_z = pos;
2671 if (l_i[0] ==
'v' && l_i[2] ==
'x') v_x = pos;
2672 if (l_i[0] ==
'v' && l_i[2] ==
'y') v_y = pos;
2673 if (l_i[0] ==
'v' && l_i[2] ==
'z') v_z = pos;
2680 for ( pos = 0; pos < numpos; ++pos ) {
2683 if ( ! xscFile )
NAMD_die(
"Error reading extended system file.\n");
2684 if ( pos == a_x ) cellBasisVector1.x = tmp;
2685 if ( pos == a_y ) cellBasisVector1.y = tmp;
2686 if ( pos == a_z ) cellBasisVector1.z = tmp;
2687 if ( pos == b_x ) cellBasisVector2.x = tmp;
2688 if ( pos == b_y ) cellBasisVector2.y = tmp;
2689 if ( pos == b_z ) cellBasisVector2.z = tmp;
2690 if ( pos == c_x ) cellBasisVector3.x = tmp;
2691 if ( pos == c_y ) cellBasisVector3.y = tmp;
2692 if ( pos == c_z ) cellBasisVector3.z = tmp;
2693 if ( pos == o_x ) cellOrigin.x = tmp;
2694 if ( pos == o_y ) cellOrigin.y = tmp;
2695 if ( pos == o_z ) cellOrigin.z = tmp;
2696 if ( pos == s_u ) strainRate2.x = tmp;
2697 if ( pos == s_v ) strainRate2.y = tmp;
2698 if ( pos == s_w ) strainRate2.z = tmp;
2699 if ( pos == s_x ) strainRate.x = tmp;
2700 if ( pos == s_y ) strainRate.y = tmp;
2701 if ( pos == s_z ) strainRate.z = tmp;
2702 if ( pos == v_x ) monteCarloMaxVolume.x = tmp;
2703 if ( pos == v_y ) monteCarloMaxVolume.y = tmp;
2704 if ( pos == v_z ) monteCarloMaxVolume.z = tmp;
2709 test.
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2711 if ( test.
a_p() && ! lattice.a_p() ) {
2712 NAMD_die(
"cellBasisVector1 added during atom reinitialization");
2714 if ( lattice.a_p() && ! test.
a_p() ) {
2715 NAMD_die(
"cellBasisVector1 dropped during atom reinitialization");
2717 if ( test.
b_p() && ! lattice.b_p() ) {
2718 NAMD_die(
"cellBasisVector2 added during atom reinitialization");
2720 if ( lattice.b_p() && ! test.
b_p() ) {
2721 NAMD_die(
"cellBasisVector2 dropped during atom reinitialization");
2723 if ( test.
c_p() && ! lattice.c_p() ) {
2724 NAMD_die(
"cellBasisVector3 added during atom reinitialization");
2726 if ( lattice.c_p() && ! test.
c_p() ) {
2727 NAMD_die(
"cellBasisVector3 dropped during atom reinitialization");
2730 latptr->
set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
2735 #ifdef MEM_OPT_VERSION 2737 extern char *gWorkDir;
2745 #ifdef MEM_OPT_VERSION 2746 char *namdWorkDir = NULL;
2749 if ( opts.
defined(
"obsolete") ) {
2751 "\"obsolete\" defined, silently ignoring obsolete options\n" <<
endi;
2758 current = config->
find(
"cwd");
2760 len = strlen(current->
data);
2764 NAMD_die(
"chdir() to given cwd failed!");
2772 cwd =
new char[len+1];
2774 strcpy(cwd, current->
data);
2780 #ifdef MEM_OPT_VERSION 2781 if(cwd!=NULL)namdWorkDir = cwd;
2782 else namdWorkDir = gWorkDir;
2783 int dirlen = strlen(namdWorkDir);
2786 if(namdWorkDir[dirlen-1]==
'/'){
2787 tmpDir =
new char[dirlen+1];
2790 tmpDir =
new char[dirlen+2];
2794 memcpy(tmpDir, namdWorkDir, dirlen);
2795 namdWorkDir = tmpDir;
2817 if (opts.
defined(
"oneFourScaling")) {
2819 if (config->
find(
"1-4scaling")) {
2820 NAMD_die(
"Multiple definitions of 1-4scaling using \"1-4scaling\" and \"oneFourScaling\".");
2822 scale14 = scale14alt;
2824 else if (config->
find(
"1-4scaling")) {
2825 iout <<
iWARN <<
"Option \"1-4scaling\" has been deprecated. Instead use \"oneFourScaling\".\n" <<
endi;
2829 if (opts.
defined(
"GPUresident")) {
2831 if (config->
find(
"CUDASOAintegrate")) {
2832 NAMD_die(
"Multiple definitions of GPUresident using \"CUDASOAintegrate\" and \"GPUresident\".");
2834 CUDASOAintegrateMode = GPUresidentMode;
2836 else if (config->
find(
"CUDASOAintegrate")) {
2837 iout <<
iWARN <<
"Option \"CUDASOAintegrate\" has been deprecated. Instead use \"GPUresident\".\n" <<
endi;
2841 if (opts.
defined(
"GPUForceTable")) {
2843 if (config->
find(
"CUDAForceTable")) {
2844 NAMD_die(
"Multiple definitions of GPUForceTable using \"CUDAForceTable\" and \"GPUForceTable\".");
2846 useCUDANonbondedForceTable = useGPUNonbondedForceTable;
2848 else if (config->
find(
"CUDAForceTable")) {
2849 iout <<
iWARN <<
"Option \"CUDAForceTable\" has been deprecated. Instead use \"GPUForceTable\".\n" <<
endi;
2851 if ( ! useCUDANonbondedForceTable) {
2852 iout <<
iWARN <<
"Setting \"GPUForceTable off\" is considered experimental.\n" <<
endi;
2856 if (opts.
defined(
"GPUAtomMigration")) {
2858 if (config->
find(
"DeviceMigration")) {
2859 NAMD_die(
"Multiple definitions of GPUAtomMigration using \"DeviceMigration\" and \"GPUAtomMigration\".");
2861 useDeviceMigration = useGPUAtomMigration;
2863 else if (config->
find(
"DeviceMigration")) {
2864 iout <<
iWARN <<
"Option \"DeviceMigration\" has been deprecated. Instead use \"GPUAtomMigration\".\n" <<
endi;
2866 if (useDeviceMigration) {
2867 iout <<
iWARN <<
"Setting \"GPUAtomMigration on\" is considered experimental.\n" <<
endi;
2871 if (opts.
defined(
"usePMEGPU")) {
2873 if (config->
find(
"usePMECUDA")) {
2874 NAMD_die(
"Multiple definitions of usePMEGPU using \"usePMECUDA\" and \"usePMEGPU\".");
2876 usePMECUDA = usePMEGPU;
2878 else if (config->
find(
"usePMECUDA")) {
2879 iout <<
iWARN <<
"Option \"usePMECUDA\" has been deprecated. Instead use \"usePMEGPU\".\n" <<
endi;
2883 if (opts.
defined(
"bondedGPU")) {
2885 if (config->
find(
"bondedCUDA")) {
2886 NAMD_die(
"Multiple definitions of bondedGPU using \"bondedCUDA\" and \"bondedGPU\".");
2888 bondedCUDA = bondedGPU;
2890 else if (config->
find(
"bondedCUDA")) {
2891 iout <<
iWARN <<
"Option \"bondedCUDA\" has been deprecated. Instead use \"bondedGPU\".\n" <<
endi;
2896 if ( usePluginIO && opts.
defined(
"coordinates") ) {
2897 NAMD_die(
"Separate coordinates file not allowed with plugin IO, coordinates will be taken from structure file.");
2902 if (!amberOn && !gromacsOn) {
2903 #ifndef MEM_OPT_VERSION 2904 if (useCompressedPsf)
2905 NAMD_die(
"useCompressedPsf requires memory-optimized build!");
2906 if (!usePluginIO && !genCompressedPsf && !opts.
defined(
"coordinates"))
2907 NAMD_die(
"coordinates not found in the configuration file!");
2909 if(!usePluginIO && !opts.
defined(
"bincoordinates")) {
2910 NAMD_die(
"bincoordinates not found in the configuration file for the memory optimized version!");
2912 if(!usePluginIO && opts.
defined(
"coordinates")) {
2913 NAMD_die(
"coordinates not allowed in the configuration file for the memory optimized version!");
2916 if (!opts.
defined(
"structure"))
2917 NAMD_die(
"structure not found in the configuration file!");
2918 if (!opts.
defined(
"parameters"))
2919 NAMD_die(
"parameters not found in the configuration file!");
2925 NAMD_die(
"Cannot specify both coordinates and ambercoor!");
2926 #ifndef MEM_OPT_VERSION 2927 if (!genCompressedPsf && !opts.
defined(
"coordinates") && !opts.
defined(
"ambercoor")
2928 && !opts.
defined(
"grocoorfile") && !usePluginIO)
2929 NAMD_die(
"Coordinate file not found!");
2934 if (opts.
defined(
"temperature") &&
2937 NAMD_die(
"Cannot specify both an initial temperature and a velocity file");
2940 #ifdef MEM_OPT_VERSION 2947 char *curfile = NULL;
2948 dirlen = strlen(namdWorkDir);
2949 current = config->
find(
"structure");;
2950 curfile = current->
data;
2951 int filelen = strlen(curfile);
2952 if(*curfile ==
'/' || *curfile==
'~') {
2958 binAtomFile =
new char[filelen+5];
2959 memcpy(binAtomFile, curfile, filelen);
2960 memcpy(binAtomFile+filelen,
".bin", 4);
2961 binAtomFile[filelen+4] = 0;
2963 binAtomFile =
new char[dirlen+filelen+5];
2964 memcpy(binAtomFile, namdWorkDir, dirlen);
2965 memcpy(binAtomFile+dirlen, curfile, filelen);
2966 memcpy(binAtomFile+dirlen+filelen,
".bin", 4);
2967 binAtomFile[dirlen+filelen+4] = 0;
2970 current = config->
find(
"bincoordinates");
2971 curfile = current->
data;
2972 filelen = strlen(curfile);
2973 if(*curfile ==
'/' || *curfile==
'~') {
2974 binCoorFile =
new char[filelen+1];
2975 memcpy(binCoorFile, curfile, filelen);
2976 binCoorFile[filelen] = 0;
2978 binCoorFile =
new char[dirlen+filelen+1];
2979 memcpy(binCoorFile, namdWorkDir, dirlen);
2980 memcpy(binCoorFile+dirlen, curfile, filelen);
2981 binCoorFile[dirlen+filelen] = 0;
2984 if(opts.
defined(
"binvelocities")){
2985 current = config->
find(
"binvelocities");
2986 curfile = current->
data;
2987 filelen = strlen(curfile);
2988 if(*curfile ==
'/' || *curfile==
'~') {
2989 binVelFile =
new char[filelen+1];
2990 memcpy(binVelFile, curfile, filelen);
2991 binVelFile[filelen] = 0;
2993 binVelFile =
new char[dirlen+filelen+1];
2994 memcpy(binVelFile, namdWorkDir, dirlen);
2995 memcpy(binVelFile+dirlen, curfile, filelen);
2996 binVelFile[dirlen+filelen] = 0;
3000 if(opts.
defined(
"binrefcoords")){
3001 current = config->
find(
"binrefcoords");
3002 curfile = current->
data;
3003 filelen = strlen(curfile);
3004 if(*curfile ==
'/' || *curfile==
'~') {
3005 binRefFile =
new char[filelen+1];
3006 memcpy(binRefFile, curfile, filelen);
3007 binRefFile[filelen] = 0;
3009 binRefFile =
new char[dirlen+filelen+1];
3010 memcpy(binRefFile, namdWorkDir, dirlen);
3011 memcpy(binRefFile+dirlen, curfile, filelen);
3012 binRefFile[dirlen+filelen] = 0;
3017 if(outputFilename[0] !=
'/' && outputFilename[0]!=
'~') {
3018 filelen = strlen(outputFilename);
3019 char *tmpout =
new char[filelen];
3020 memcpy(tmpout, outputFilename, filelen);
3021 CmiAssert(filelen+dirlen <= 120);
3022 memcpy(outputFilename, namdWorkDir, dirlen);
3023 memcpy(outputFilename+dirlen, tmpout, filelen);
3024 outputFilename[filelen+dirlen] = 0;
3028 if ( dcdFrequency && opts.
defined(
"dcdfile") &&
3029 dcdFilename[0] !=
'/' && dcdFilename[0]!=
'~' ) {
3030 filelen = strlen(dcdFilename);
3031 char *tmpout =
new char[filelen];
3032 memcpy(tmpout, dcdFilename, filelen);
3033 CmiAssert(filelen+dirlen <= 120);
3034 memcpy(dcdFilename, namdWorkDir, dirlen);
3035 memcpy(dcdFilename+dirlen, tmpout, filelen);
3036 dcdFilename[filelen+dirlen] = 0;
3040 if ( velDcdFrequency && opts.
defined(
"veldcdfile") &&
3041 velDcdFilename[0] !=
'/' && velDcdFilename[0]!=
'~' ) {
3042 filelen = strlen(velDcdFilename);
3043 char *tmpout =
new char[filelen];
3044 memcpy(tmpout, velDcdFilename, filelen);
3045 CmiAssert(filelen+dirlen <= 120);
3046 memcpy(velDcdFilename, namdWorkDir, dirlen);
3047 memcpy(velDcdFilename+dirlen, tmpout, filelen);
3048 velDcdFilename[filelen+dirlen] = 0;
3052 if ( forceDcdFrequency && opts.
defined(
"forcedcdfile") &&
3053 forceDcdFilename[0] !=
'/' && forceDcdFilename[0]!=
'~' ) {
3054 filelen = strlen(forceDcdFilename);
3055 char *tmpout =
new char[filelen];
3056 memcpy(tmpout, forceDcdFilename, filelen);
3057 CmiAssert(filelen+dirlen <= 120);
3058 memcpy(forceDcdFilename, namdWorkDir, dirlen);
3059 memcpy(forceDcdFilename+dirlen, tmpout, filelen);
3060 forceDcdFilename[filelen+dirlen] = 0;
3064 if ( restartFrequency && opts.
defined(
"restartname") &&
3065 restartFilename[0] !=
'/' && restartFilename[0]!=
'~' ) {
3066 filelen = strlen(restartFilename);
3067 char *tmpout =
new char[filelen];
3068 memcpy(tmpout, restartFilename, filelen);
3069 CmiAssert(filelen+dirlen <= 120);
3070 memcpy(restartFilename, namdWorkDir, dirlen);
3071 memcpy(restartFilename+dirlen, tmpout, filelen);
3072 restartFilename[filelen+dirlen] = 0;
3077 crashFilename[0] !=
'/' && crashFilename[0] !=
'~') {
3078 filelen = strlen(crashFilename);
3079 char *tmpout =
new char[filelen];
3080 memcpy(tmpout, crashFilename, filelen);
3081 CmiAssert(filelen+dirlen <= 120);
3082 memcpy(crashFilename, namdWorkDir, dirlen);
3083 memcpy(crashFilename+dirlen, tmpout, filelen);
3084 crashFilename[filelen+dirlen] = 0;
3088 delete [] namdWorkDir;
3090 if (opts.
defined(
"numinputprocs")) {
3091 if(numinputprocs > CkNumPes()) {
3092 iout <<
iWARN <<
"The number of input processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
3093 numinputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
3097 if (opts.
defined(
"numoutputprocs")) {
3098 if(numoutputprocs > CkNumPes()) {
3099 iout <<
iWARN <<
"The number of output processors exceeds the total number of processors. Resetting to half of the number of total processors.\n" <<
endi;
3100 numoutputprocs = (CkNumPes()>>1)+(CkNumPes()&1);
3104 #ifndef OUTPUT_SINGLE_FILE 3105 #error OUTPUT_SINGLE_FILE not defined! 3108 #if !OUTPUT_SINGLE_FILE 3110 create_output_directories(
"coor");
3111 create_output_directories(
"vel");
3113 create_output_directories(
"dcd");
3115 iout <<
iWARN <<
"The dcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3118 if (velDcdFrequency) {
3119 create_output_directories(
"veldcd");
3120 if(opts.
defined(
"veldcdfile")){
3121 iout <<
iWARN <<
"The veldcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3124 if (forceDcdFrequency) {
3125 create_output_directories(
"forcedcd");
3126 if(opts.
defined(
"forcedcdfile")){
3127 iout <<
iWARN <<
"The forcedcd file output has been changed to directory: " << outputFilename <<
".\n" <<
endi;
3133 if (! opts.
defined(
"auxFile")) {
3134 strcpy(auxFilename,outputFilename);
3135 strcat(auxFilename,
".aux");
3140 if (! opts.
defined(
"dcdfile")) {
3141 strcpy(dcdFilename,outputFilename);
3142 strcat(dcdFilename,
".dcd");
3148 if (velDcdFrequency) {
3149 if (! opts.
defined(
"veldcdfile")) {
3150 strcpy(velDcdFilename,outputFilename);
3151 strcat(velDcdFilename,
".veldcd");
3157 if (forceDcdFrequency) {
3158 if (! opts.
defined(
"forcedcdfile")) {
3159 strcpy(forceDcdFilename,outputFilename);
3160 strcat(forceDcdFilename,
".forcedcd");
3167 if (! opts.
defined(
"xstfile")) {
3168 strcpy(xstFilename,outputFilename);
3169 strcat(xstFilename,
".xst");
3175 if (restartFrequency) {
3176 if (! opts.
defined(
"restartname")) {
3177 strcpy(restartFilename,outputFilename);
3178 if ( ! restartSave ) strcat(restartFilename,
".restart");
3182 restartSave =
FALSE;
3183 binaryRestart =
FALSE;
3187 if (!opts.
defined(
"crashFile")) {
3188 strcpy(crashFilename, outputFilename);
3189 strcat(crashFilename,
".crash.csv");
3195 if (storeComputeMap || loadComputeMap) {
3196 if (! opts.
defined(
"computeMapFile")) {
3197 strcpy(computeMapFilename,
"computeMapFile");
3198 strcat(computeMapFilename,
".txt");
3206 if (!paraTypeXplorOn && !paraTypeCharmmOn)
3208 paraTypeXplorOn =
TRUE;
3211 if (paraTypeXplorOn && paraTypeCharmmOn)
3213 NAMD_die(
"Please specify either XPLOR or CHARMM format for parameters!");
3220 if (!(minimizeOn||minimizeCGOn) && !opts.
defined(
"temperature") &&
3223 NAMD_die(
"Must have either an initial temperature or a velocity file");
3226 if (minimizeOn||minimizeCGOn) { initialTemp = 0.0; }
3227 if (opts.
defined(
"velocities") || opts.
defined(
"binvelocities") )
3232 if (LJcorrection && LJcorrectionAlt) {
3233 NAMD_die(
"Only one method for LJ tail correction must be used.");
3237 if ( opts.
defined(
"extendedSystem") ) readExtendedSystem(config->
find(
"extendedSystem")->
data);
3239 #ifdef MEM_OPT_VERSION 3240 if ( LJcorrection ) {
3241 NAMD_die(
"LJ tail corrections not yet available for memory optimized builds");
3243 if ( LJcorrectionAlt ) {
3244 NAMD_die(
"Alternative LJ tail corrections not yet available for memory optimized builds");
3248 if ( LJcorrection && ! cellBasisVector3.length2() ) {
3249 NAMD_die(
"Can't use LJ tail corrections without periodic boundary conditions!");
3252 if ( LJcorrectionAlt && ! cellBasisVector3.length2() ) {
3253 NAMD_die(
"Can't use alternative LJ tail corrections without periodic boundary conditions!");
3256 if ( cellBasisVector3.length2() && ! cellBasisVector2.length2() ) {
3257 NAMD_die(
"Used cellBasisVector3 without cellBasisVector2!");
3260 if ( cellBasisVector2.length2() && ! cellBasisVector1.length2() ) {
3261 NAMD_die(
"Used cellBasisVector2 without cellBasisVector1!");
3264 if ( cellOrigin.length2() && ! cellBasisVector1.length2() ) {
3265 NAMD_die(
"Used cellOrigin without cellBasisVector1!");
3268 lattice.set(cellBasisVector1,cellBasisVector2,cellBasisVector3,cellOrigin);
3270 if (! opts.
defined(
"DCDunitcell")) {
3271 dcdUnitCell = lattice.a_p() && lattice.b_p() && lattice.c_p();
3277 if ( ! opts.
defined(
"cylindricalBCAxis") )
3279 cylindricalBCAxis =
'x';
3283 opts.
get(
"cylindricalBCAxis", s);
3285 if (!strcasecmp(s,
"x"))
3287 cylindricalBCAxis =
'x';
3289 else if (!strcasecmp(s,
"y"))
3291 cylindricalBCAxis =
'y';
3293 else if (!strcasecmp(s,
"z"))
3295 cylindricalBCAxis =
'z';
3301 sprintf(err_msg,
"Illegal value '%s' for 'cylindricalBCAxis' in configuration file", s);
3306 if (!opts.
defined(
"splitPatch"))
3312 opts.
get(
"splitPatch", s);
3313 if (!strcasecmp(s,
"position"))
3315 else if (!strcasecmp(s,
"hydrogen"))
3321 "Illegal value '%s' for 'splitPatch' in configuration file",
3328 opts.
get(
"exclude", s);
3330 if (!strcasecmp(s,
"none"))
3335 else if (!strcasecmp(s,
"1-2"))
3340 else if (!strcasecmp(s,
"1-3"))
3344 else if (!strcasecmp(s,
"1-4"))
3348 else if (!strcasecmp(s,
"scaled1-4"))
3356 sprintf(err_msg,
"Illegal value '%s' for 'exclude' in configuration file",
3361 if (scale14 != 1.0 && exclude !=
SCALED14)
3363 iout <<
iWARN <<
"Exclude is not scaled1-4; 1-4scaling ignored.\n" <<
endi;
3367 if (!opts.
defined(
"waterModel")) {
3370 opts.
get(
"waterModel", s);
3371 if (!strncasecmp(s,
"tip4", 4)) {
3374 }
else if (!strncasecmp(s,
"tip3", 4)) {
3377 }
else if (!strncasecmp(s,
"swm4", 4)) {
3383 "Illegal value %s for 'waterModel' in configuration file", s);
3388 NAMD_die(
"Must have 'drudeOn' enabled to use SWM4-DP water model.");
3393 <<
"Setting water model to 'swm4' (SWM4-DP) for Drude polarization.\n" 3406 int * gomethod = &goMethod;
3407 if (!opts.
defined(
"GoMethod")) {
3411 opts.
get(
"GoMethod",s);
3413 *gomethod = atoi(s);
3415 if (!strcasecmp(s,
"matrix")) {
3418 }
else if (!strcasecmp(s,
"faster")) {
3421 }
else if (!strcasecmp(s,
"lowmem")) {
3428 "Illegal value '%s' for 'GoMethod' in configuration file",
3436 if (!opts.
defined(
"MTSAlgorithm"))
3442 opts.
get(
"MTSAlgorithm", s);
3444 if (!strcasecmp(s,
"naive"))
3446 MTSAlgorithm =
NAIVE;
3448 else if (!strcasecmp(s,
"constant"))
3450 MTSAlgorithm =
NAIVE;
3452 else if (!strcasecmp(s,
"impulse"))
3456 else if (!strcasecmp(s,
"verleti"))
3465 "Illegal value '%s' for 'MTSAlgorithm' in configuration file",
3472 if (!opts.
defined(
"longSplitting"))
3478 opts.
get(
"longSplitting", s);
3479 if (!strcasecmp(s,
"sharp"))
3480 longSplitting =
SHARP;
3481 else if (!strcasecmp(s,
"xplor"))
3482 longSplitting =
XPLOR;
3483 else if (!strcasecmp(s,
"c1"))
3485 else if (!strcasecmp(s,
"c2"))
3492 "Illegal value '%s' for 'longSplitting' in configuration file",
3499 if (!opts.
defined(
"rigidBonds"))
3505 opts.
get(
"rigidBonds", s);
3506 if (!strcasecmp(s,
"all"))
3510 else if (!strcasecmp(s,
"water"))
3514 else if (!strcasecmp(s,
"none"))
3522 "Illegal value '%s' for 'rigidBonds' in configuration file", s);
3532 "Water model %s requires rigidBonds set to \"all\" or \"water\"",
3538 if (switchingActive)
3541 if (!opts.
defined(
"switchDist")) {
3542 NAMD_die(
"switchDist must be defined when switching is enabled");
3545 if ( (switchingDist>cutoff) || (switchingDist<0) )
3550 "switchDist muct be between 0 and cutoff, which is %f", cutoff);
3556 if ( martiniSwitching )
3558 if ( ! switchingActive && ! LJPMEOn)
3560 NAMD_die(
"martiniSwitching requires switching");
3562 if ( vdwForceSwitching )
3564 NAMD_die(
"martiniSwitching and vdwForceSwitching are exclusive to one another. Select only one.");
3566 if ( dielectric != 15.0 && ! martiniDielAllow )
3568 iout <<
iWARN <<
"USE DIELECTRIC OF 15.0 WITH MARTINI.\n";
3569 iout <<
iWARN <<
"SETTING dielectric 15.0\n";
3570 iout <<
iWARN <<
"FOR NON-STANDARD DIELECTRIC WITH MARTINI, SET: martiniDielAllow on\n";
3575 iout <<
iWARN <<
"USE COSINE BASED ANGLES WITH MARTINI.\n";
3576 iout <<
iWARN <<
"SETTING cosAngles on\n";
3581 NAMD_die(
"Do not use Particle Mesh Ewald with Martini. Set: PME off");
3585 NAMD_die(
"Do not use Multilevel Summation Method with Martini. Set: MSM off");
3589 NAMD_die(
"Do not use Fast Multipole Method with Martini. Set: FMM off");
3595 if (!opts.
defined(
"pairlistDist"))
3597 pairlistDist = cutoff;
3599 else if (pairlistDist < cutoff)
3601 NAMD_die(
"pairlistDist must be >= cutoff distance");
3604 patchDimension = pairlistDist;
3607 patchDimension += hgroupCutoff;
3611 if (berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) {
3612 defaultMargin = ( useFlexibleCell ? 0.06 : 0.03 ) * patchDimension;
3615 margin = defaultMargin;
3618 if (CUDASOAintegrateMode) {
3620 <<
"Tuning parameters to improve GPU-resident performance\n" 3627 const double CUDASOA_defaultMargin = 4;
3628 const int CUDASOA_defaultOutputEnergies = 100;
3630 if (! config->
find(
"margin")) {
3631 margin = CUDASOA_defaultMargin;
3633 <<
"Setting margin to " << margin <<
"\n" 3636 else if (margin < CUDASOA_defaultMargin) {
3638 <<
"Keeping margin at user-specified value " << margin <<
"\n" 3640 <<
"Performance might be improved by increasing margin size to >= " 3641 << CUDASOA_defaultMargin <<
"\n" 3645 if (! config->
find(
"outputEnergies")) {
3646 outputEnergies = CUDASOA_defaultOutputEnergies;;
3648 <<
"Setting outputEnergies to " << outputEnergies <<
"\n" 3651 else if (outputEnergies < CUDASOA_defaultOutputEnergies) {
3653 <<
"Keeping outputEnergies at user-specified value " 3654 << outputEnergies <<
"\n" 3656 <<
"Performance might be improved by increasing outputEnergies to >= " 3657 << CUDASOA_defaultOutputEnergies <<
"\n" 3662 if ( defaultMargin != 0.0 && margin == 0.0 ) {
3663 margin = defaultMargin;
3664 iout <<
iWARN <<
"ALWAYS USE NON-ZERO MARGIN WITH CONSTANT PRESSURE!\n";
3665 iout <<
iWARN <<
"CHANGING MARGIN FROM 0 to " << margin <<
"\n" <<
endi;
3668 patchDimension += margin;
3674 NAMD_die(
"GBIS not compatible with FullDirect");
3677 NAMD_die(
"GBIS not compatible with PME");
3680 NAMD_die(
"GBIS not compatible with MSM");
3683 NAMD_die(
"GBIS not compatible with FMM");
3686 NAMD_die(
"GBIS not compatible with Alchemical Transformations");
3689 NAMD_die(
"GBIS not compatible with Locally Enhanced Sampling");
3692 NAMD_die(
"GBIS not compatible with FMA");
3695 NAMD_die(
"GBIS not compatible with Drude Polarization");
3698 if (alpha_cutoff > patchDimension) {
3699 patchDimension = alpha_cutoff;
3702 BigReal tmp = (initialTemp > 0) ? initialTemp : 300;
3703 kappa = 50.29216*sqrt(ion_concentration/solvent_dielectric/tmp);
3708 #ifdef MEM_OPT_VERSION 3709 NAMD_die(
"SASA not yet available for memory optimized builds");
3711 if ( lattice.volume() > 0 ) {
3712 NAMD_die(
"SASA does not yet support periodic boundary conditions.");
3720 if ( dihedralOn ) globalOn =
TRUE;
3722 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 3723 if (loweAndersenOn) {
3724 NAMD_die(
"Lowe-Andersen dynamics not compatible with CUDA at this time");
3730 if (loweAndersenOn && (langevinOn || tCoupleOn))
3732 NAMD_die(
"Lowe-Andersen dynamics, Langevin dynamics and temperature coupling are mutually exclusive dynamics modes");
3736 if (tCoupleOn && opts.
defined(
"rescaleFreq") )
3738 NAMD_die(
"Temperature coupling and temperature rescaling are mutually exclusive");
3741 if (globalOn && CkNumPes() > 1)
3743 NAMD_die(
"Global integration does not run in parallel (yet).");
3746 if (COLDOn && langevinOn)
3748 NAMD_die(
"COLD and Langevin dynamics are mutually exclusive dynamics modes");
3750 if (COLDOn && minimizeOn)
3752 NAMD_die(
"COLD and minimization are mutually exclusive dynamics modes");
3754 if (COLDOn && tCoupleOn)
3756 NAMD_die(
"COLD and temperature coupling are mutually exclusive dynamics modes");
3758 if (COLDOn && opts.
defined(
"rescaleFreq"))
3760 NAMD_die(
"COLD and velocity rescaling are mutually exclusive dynamics modes");
3765 NAMD_die(
"splitPatch hydrogen is required for MOLLY");
3770 NAMD_die(
"splitPatch hydrogen is required for rigidBonds");
3776 if(accelMDGiE < 1 || accelMDGiE > 2){
3777 sprintf(msg,
"accelMDGiE was set to %d but it should be 1 or 2", accelMDGiE);
3780 if(accelMDGStatWindow > 0){
3781 if(accelMDGcMDPrepSteps % accelMDGStatWindow != 0)
3782 NAMD_die(
"'accelMDGcMDPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3783 if(accelMDGcMDSteps % accelMDGStatWindow != 0)
3784 NAMD_die(
"'accelMDGcMDSteps' has to be a multiple of 'accelMDGStatWindow'");
3785 if(accelMDGEquiPrepSteps % accelMDGStatWindow != 0)
3786 NAMD_die(
"'accelMDGEquiPrepSteps' has to be a multiple of 'accelMDGStatWindow'");
3787 if(accelMDGEquiSteps % accelMDGStatWindow != 0)
3788 NAMD_die(
"'accelMDGEquiSteps' has to be a multiple of 'accelMDGStatWindow'");
3790 if(accelMDGRestart && accelMDGcMDSteps == 0)
3791 accelMDGcMDPrepSteps = 0;
3792 else if(accelMDGcMDSteps - accelMDGcMDPrepSteps < 2)
3793 NAMD_die(
"'accelMDGcMDSteps' should be larger than 'accelMDGcMDPrepSteps'");
3795 if(accelMDGEquiSteps == 0)
3796 accelMDGEquiPrepSteps = 0;
3797 else if(accelMDGresetVaftercmd){
3798 if(accelMDGEquiPrepSteps <= 0)
3799 NAMD_die(
"'accelMDGEquiPrepSteps' should be non-zero");
3800 if(accelMDGEquiSteps - accelMDGEquiPrepSteps < 1)
3801 NAMD_die(
"'accelMDGEquiSteps' should be larger than 'accelMDGEquiPrepSteps'");
3806 iout <<
iWARN <<
"accelMDE will be ignored with accelMDG on.\n" <<
endi;
3807 if(opts.
defined(
"accelMDalpha"))
3808 iout <<
iWARN <<
"accelMDalpha will be ignored with accelMDG on.\n" <<
endi;
3810 iout <<
iWARN <<
"accelMDTE will be ignored with accelMDG on.\n" <<
endi;
3811 if(opts.
defined(
"accelMDTalpha"))
3812 iout <<
iWARN <<
"accelMDTalpha will be ignored with accelMDG on.\n" <<
endi;
3816 NAMD_die(
"accelMDE and accelMDalpha are required for accelMD with accelMDG off");
3818 if(accelMDdual && (!opts.
defined(
"accelMDTE") || !opts.
defined(
"accelMDTalpha"))){
3819 NAMD_die(
"accelMDTE and accelMDTalpha are required for accelMDdual with accelMDG off");
3826 if (minimizeOn && (maximumMove == 0.0))
3828 maximumMove = 0.75 * pairlistDist/stepsPerCycle;
3831 if (!adaptTempRescale && !adaptTempLangevin)
3832 NAMD_die(
"Adaptive tempering needs to be coupled to either the Langevin thermostat or velocity rescaling.");
3833 if (opts.
defined(
"adaptTempInFile") && (opts.
defined(
"adaptTempTmin") ||
3834 opts.
defined(
"adaptTempTmax") ||
3835 adaptTempBins != 0))
3836 NAMD_die(
"cannot simultaneously specify adaptTempInFile and any of {adaptTempTmin, adaptTempTmax,adaptTempBins} as these are read from the input file");
3837 if (!opts.
defined(
"adaptTempInFile") && !(opts.
defined(
"adaptTempTmin") &&
3838 opts.
defined(
"adaptTempTmax") &&
3839 adaptTempBins != 0 ))
3840 NAMD_die(
"Need to specify either adaptTempInFile or all of {adaptTempTmin, adaptTempTmax,adaptTempBins} if adaptTempMD is on.");
3844 monteCarloPressureOnAtStartup = monteCarloPressureOn;
3846 langevinOnAtStartup = langevinOn;
3848 if ( ! opts.
defined(
"langevinDamping") ) langevinDamping = 0.0;
3849 if ( ! opts.
defined(
"langevinHydrogen") ) langevinHydrogen =
TRUE;
3850 if ( (opts.
defined(
"langevinDamping") || opts.
defined(
"langevinHydrogen"))
3851 && (opts.
defined(
"langevinFile") || opts.
defined(
"langevinCol")) )
3852 NAMD_die(
"To specify Langevin dynamics parameters, use either langevinDamping and langevinHydrogen or langevinFile and langevinCol. Do not combine them.");
3853 if ( opts.
defined(
"langevinHydrogen") && langevinDamping == 0.0 )
3854 NAMD_die(
"langevinHydrogen requires langevinDamping to be set.");
3858 langevinGammasDiffer = ( ! langevinHydrogen ) ||
3859 opts.
defined(
"langevinFile") ||
3860 ( opts.
defined(
"drudeDamping") && drudeDamping != langevinDamping );
3861 if (langevinGammasDiffer) {
3864 <<
"The Langevin gamma parameters differ over the particles,\n" 3866 <<
"requiring extra work per step to constrain rigid bonds.\n" 3872 if (loweAndersenOn) {
3873 if (!opts.
defined(
"loweAndersenRate")) loweAndersenRate = 100;
3874 if (!opts.
defined(
"loweAndersenCutoff")) loweAndersenCutoff = 2.7;
3879 if (stochRescaleOn) {
3880 if (langevinOn || loweAndersenOn || tCoupleOn ||
3882 NAMD_die(
"Stochastic velocity rescaling is incompatible with other temperature control methods");
3884 if (!opts.
defined(
"stochRescaleFreq")) stochRescaleFreq = stepsPerCycle;
3887 if (opts.
defined(
"rescaleFreq"))
3889 if (!opts.
defined(
"rescaleTemp"))
3891 if (opts.
defined(
"temperature"))
3893 rescaleTemp = initialTemp;
3897 NAMD_die(
"Must give a rescale temperature if rescaleFreq is defined");
3907 if (opts.
defined(
"rescaleTemp"))
3909 if (!opts.
defined(
"rescaleFreq"))
3911 NAMD_die(
"Must give a rescale freqency if rescaleTemp is given");
3915 if (opts.
defined(
"reassignFreq"))
3917 if (!opts.
defined(
"reassignTemp"))
3919 if (opts.
defined(
"temperature"))
3921 reassignTemp = initialTemp;
3925 NAMD_die(
"Must give a reassign temperature if reassignFreq is defined");
3935 if (opts.
defined(
"reassignTemp"))
3937 if (!opts.
defined(
"reassignFreq"))
3939 NAMD_die(
"Must give a reassignment freqency if reassignTemp is given");
3943 if (opts.
defined(
"reassignIncr"))
3945 if (!opts.
defined(
"reassignFreq"))
3947 NAMD_die(
"Must give a reassignment freqency if reassignIncr is given");
3955 if (opts.
defined(
"reassignHold"))
3957 if (!opts.
defined(
"reassignIncr"))
3959 NAMD_die(
"Must give a reassignment increment if reassignHold is given");
3969 randomSeed = (
unsigned int) time(NULL) + 31530001 * CmiMyPartition();
3973 if (opts.
defined(
"soluteScaling")) {
3977 if ( ! opts.
defined(
"soluteScalingFactorCharge") ) {
3978 soluteScalingFactorCharge = soluteScalingFactor;
3980 if ( ! opts.
defined(
"soluteScalingFactorVdw") ) {
3981 soluteScalingFactorVdw = soluteScalingFactor;
3986 alchFepOnAtStartup = alchFepOn =
FALSE;
3987 alchThermIntOnAtStartup = alchThermIntOn =
FALSE;
3988 alchOnAtStartup = alchOn;
3991 #if !defined(NAMD_CUDA) && !defined(NAMD_HIP) 3994 if (martiniSwitching) {
3995 iout <<
iWARN <<
"Martini switching disabled for alchemical " 3996 "interactions.\n" <<
endi;
3999 if (!opts.
defined(
"alchType")) {
4000 NAMD_die(
"Must define type of alchemical simulation: fep or ti\n");
4003 opts.
get(
"alchType",s);
4004 if (!strcasecmp(s,
"fep")) {
4005 alchFepOnAtStartup = alchFepOn =
TRUE;
4007 else if (!strcasecmp(s,
"ti")) {
4008 alchThermIntOnAtStartup = alchThermIntOn =
TRUE;
4011 NAMD_die(
"Unknown type of alchemical simulation; choices are fep or ti\n");
4015 if (rescaleFreq > 0) alchTemp = rescaleTemp;
4016 else if (reassignFreq > 0) alchTemp = reassignTemp;
4017 else if (langevinOn) alchTemp = langevinTemp;
4018 else if (stochRescaleOn) alchTemp = stochRescaleTemp;
4019 else if (tCoupleOn) alchTemp = tCoupleTemp;
4020 else NAMD_die(
"Alchemical FEP can be performed only in constant temperature simulations\n");
4022 if (reassignFreq > 0 && reassignIncr != 0)
4023 NAMD_die(
"reassignIncr cannot be used in alchemical simulations\n");
4025 if (alchLambda < 0.0 || alchLambda > 1.0)
4026 NAMD_die(
"alchLambda values should be in the range [0.0, 1.0]\n");
4028 if (alchVdwLambdaEnd > 1.0)
4029 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");
4031 if (alchBondLambdaEnd > 1.0)
4032 NAMD_die(
"alchBondLambdaEnd should be in the range [0.0, 1.0]\n");
4034 if (alchElecLambdaStart > 1.0)
4035 NAMD_die(
"alchElecLambdaStart should be in the range [0.0, 1.0]\n");
4038 if (alchRepLambdaEnd > 1.0)
4039 NAMD_die(
"alchRepLambdaEnd should be in the range [0.0, 1.0]\n");
4040 if (alchVdwLambdaEnd < alchRepLambdaEnd)
4041 NAMD_die(
"alchVdwLambdaEnd should be greater than alchRepLambdaEnd\n");
4042 if (alchVdwShiftCoeff > 0.0) {
4043 iout <<
iWARN <<
"alchVdwShiftCoeff is non-zero but not used when WCA" 4044 <<
" is active. Setting it to zero now.\n" <<
endi;
4045 alchVdwShiftCoeff = 0.0;
4047 if (alchThermIntOn) {
4048 NAMD_die(
"alchWCA is not currently compatible with TI");
4050 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 4051 NAMD_die(
"alchWCA is not currently available with CUDA");
4056 if (alchLambda2 < 0.0 || alchLambda2 > 1.0)
4057 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
4061 if (!opts.
defined(
"alchoutfile")) {
4062 strcpy(alchOutFile, outputFilename);
4063 strcat(alchOutFile,
".fep");
4066 if (!opts.
defined(
"alchLambda") || !opts.
defined(
"alchLambda2")) {
4067 NAMD_die(
"alchFepOn is on, but alchLambda or alchLambda2 is not set.");
4070 else if (alchThermIntOn) {
4072 if (alchLambdaFreq && (alchLambda2 < 0.0 || alchLambda2 > 1.0))
4073 NAMD_die(
"alchLambda2 values should be in the range [0.0, 1.0]\n");
4075 if (!opts.
defined(
"alchoutfile")) {
4076 strcpy(alchOutFile, outputFilename);
4077 strcat(alchOutFile,
".ti");
4084 if ( alchOn && alchFepOn && alchThermIntOn )
4085 NAMD_die(
"Sorry, combined TI and FEP is not implemented.\n");
4086 if ( alchOn && lesOn )
4087 NAMD_die(
"Sorry, combined LES with FEP or TI is not implemented.\n");
4088 if ( alchOn && alchThermIntOn && lesOn )
4089 NAMD_die(
"Sorry, combined LES and TI is not implemented.\n");
4090 if ( alchWCAOn && !alchOn ) {
4091 iout <<
iWARN <<
"Alchemical WCA decomposition was requested but \ 4092 alchemical free energy calculation is not active. Setting \ 4093 alchWCA to off.\n" <<
endi;
4096 if ( alchDecouple && !alchOn ) {
4097 iout <<
iWARN <<
"Alchemical decoupling was requested but \ 4098 alchemical free energy calculation is not active. Setting \ 4099 alchDecouple to off.\n" <<
endi;
4100 alchDecouple =
FALSE;
4102 if ( alchBondDecouple && !alchOn ) {
4103 iout <<
iWARN <<
"Alchemical bond decoupling was requested but \ 4104 alchemical free energy calculation is not active. Setting \ 4105 alchBondDecouple to off.\n" <<
endi;
4106 alchBondDecouple =
FALSE;
4109 if ( lesOn && ( lesFactor < 1 || lesFactor > 255 ) ) {
4110 NAMD_die(
"lesFactor must be positive and less than 256");
4112 if ((pairInteractionOn && alchOn) || (pairInteractionOn && lesOn))
4113 NAMD_die(
"Sorry, pair interactions may not be calculated when LES, FEP or TI is enabled.");
4117 if ( ! langevinOn ) {
4118 NAMD_die(
"Drude model requires use of Langevin thermostat.");
4120 if ( ! opts.
defined(
"drudeDamping")) {
4121 drudeDamping = langevinDamping;
4122 iout <<
iWARN <<
"Undefined 'drudeDamping' will be set to " 4123 "value of 'langevinDamping'\n" <<
endi;
4126 NAMD_die(
"Drude implementation is incompatible with alchemical " 4127 "free energy calculation.");
4132 if (opts.
defined(
"ldBalancer")) {
4133 if (strcasecmp(loadBalancer,
"none") == 0)
4135 else if (strcasecmp(loadBalancer,
"hybrid") == 0)
4138 NAMD_die(
"Unknown ldBalancer selected");
4141 #ifdef MEM_OPT_VERSION 4146 if (opts.
defined(
"ldbStrategy")) {
4148 if (strcasecmp(loadStrategy,
"comprehensive") == 0)
4150 else if (strcasecmp(loadStrategy,
"refineonly") == 0)
4152 else if (strcasecmp(loadStrategy,
"old") == 0)
4155 NAMD_die(
"Unknown ldbStrategy selected");
4160 if (!opts.
defined(
"ldbPeriod")) {
4161 ldbPeriod=200*stepsPerCycle;
4165 if (!opts.
defined(
"firstLdbStep")) {
4166 firstLdbStep=5*stepsPerCycle;
4169 if (ldbPeriod <= firstLdbStep) {
4170 NAMD_die(
"ldbPeriod must greater than firstLdbStep.");
4173 if (!opts.
defined(
"lastLdbStep")) {
4177 if (!opts.
defined(
"hybridGroupSize")) {
4178 hybridGroupSize = 512;
4180 if ( hybridGroupSize < CkNumPes() ) {
4182 int groupsize = hybridGroupSize;
4185 CmiGetPesOnPhysicalNode(CmiPhysicalNodeID(0), &rpelist, &nodesize);
4186 if ( CkNumPes() % nodesize ) nodesize = CmiNodeSize(CmiNodeOf(0));
4187 if ( CkNumPes() % nodesize ) nodesize = 1;
4188 groupsize += nodesize - 1;
4189 while ( 2 * groupsize > CkNumPes() ) --groupsize;
4190 if ( groupsize < nodesize ) groupsize = nodesize;
4191 while ( groupsize % nodesize ) --groupsize;
4192 while ( groupsize && CkNumPes() % groupsize ) groupsize -= nodesize;
4193 if ( 2 * groupsize < hybridGroupSize ) {
4194 groupsize += nodesize;
4195 while ( CkNumPes() % groupsize ) groupsize += nodesize;
4197 if ( 2 * groupsize <= CkNumPes() ) hybridGroupSize = groupsize;
4202 bool specialTracing = traceAvailable() && (traceIsOn() == 0);
4204 if(!opts.
defined(
"traceStartStep")) {
4205 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
4207 if(!opts.
defined(
"numTraceSteps")) {
4208 numTraceSteps = 100;
4211 if(specialTracing) {
4212 if (!opts.
defined(
"firstLdbStep")) firstLdbStep = 20;
4213 if (!opts.
defined(
"ldbPeriod")) ldbPeriod = 100;
4215 if(!opts.
defined(
"traceStartStep")) {
4216 traceStartStep = 4 * firstLdbStep + 2 * ldbPeriod;
4219 if(!opts.
defined(
"numTraceSteps")) {
4224 #ifdef MEASURE_NAMD_WITH_PAPI 4226 if(!opts.
defined(
"papiMeasureStartStep")) {
4227 papiMeasureStartStep = 3 * firstLdbStep;
4229 if(!opts.
defined(
"numPapiMeasureSteps")) {
4230 numPapiMeasureSteps = 8;
4235 if(simulateInitialMapping) {
4236 if(!opts.
defined(
"simulatedPEs")){
4237 simulatedPEs = CkNumPes();
4239 if(!opts.
defined(
"simulatedNodeSize")){
4240 simulatedNodeSize = CkMyNodeSize();
4244 #ifdef MEM_OPT_VERSION 4253 if(ldbPeriod%stepsPerCycle!=0 || firstLdbStep%stepsPerCycle!=0) {
4254 iout <<
iWARN <<
"In memory optimized version, the ldbPeriod parameter or firstLdbStep parameter is better set to be a multiple of stepsPerCycle parameter!\n";
4258 if (N < firstTimestep) { N = firstTimestep; }
4260 if ( (firstTimestep%stepsPerCycle) != 0)
4262 NAMD_die(
"First timestep must be a multiple of stepsPerCycle!!");
4272 if ( fullDirectOn ) ++i;
4274 NAMD_die(
"More than one full electrostatics algorithm selected!!!");
4277 if (!opts.
defined(
"ldbBackgroundScaling")) {
4278 ldbBackgroundScaling = 1.0;
4280 if (!opts.
defined(
"ldbPMEBackgroundScaling")) {
4281 ldbPMEBackgroundScaling = ldbBackgroundScaling;
4283 if (!opts.
defined(
"ldbHomeBackgroundScaling")) {
4284 ldbHomeBackgroundScaling = ldbBackgroundScaling;
4289 if ( lattice.volume() == 0. ) {
4290 NAMD_die(
"PME requires periodic boundary conditions.");
4292 if ( PMEGridSpacing == 0. ) {
4293 if ( PMEGridSizeX * PMEGridSizeY * PMEGridSizeZ == 0 )
4294 NAMD_die(
"Either PMEGridSpacing or PMEGridSizeX, PMEGridSizeY, and PMEGridSizeZ must be specified.");
4295 else PMEGridSpacing = 1.5;
4297 #ifndef TEST_PME_GRID 4298 for (
int idim = 0; idim < 3; ++idim ) {
4301 const char *direction;
4303 case 0: direction =
"X";
4304 gridSize = &PMEGridSizeX; cellLength = lattice.a().length();
4306 case 1: direction =
"Y";
4307 gridSize = &PMEGridSizeY; cellLength = lattice.b().length();
4309 case 2: direction =
"Z";
4310 gridSize = &PMEGridSizeZ; cellLength = lattice.c().length();
4313 int minSize = (int) ceil(cellLength/PMEGridSpacing);
4315 for (
int minSize = 1; minSize < 300; ++minSize ) {
4317 int bestSize = 10 * (minSize + 10);
4319 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
4320 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
4324 for (
int i2 = 0; i2 <= max2; ++i2 ) {
4325 for (
int i3 = 0; i3 <= max3; ++i3 ) {
4326 for (
int i5 = 0; i5 <= max5; ++i5 ) {
4327 for (
int i7 = 0; i7 <= max7; ++i7 ) {
4328 for (
int i11 = 0; i11 <= max11; ++i11 ) {
4329 if ( i5 + i7 + i11 > i2 )
continue;
4331 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
4332 if ( testSize > bestSize )
continue;
4333 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
4334 if ( testSize > bestSize )
continue;
4335 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
4336 if ( testSize > bestSize )
continue;
4337 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
4338 if ( testSize > bestSize )
continue;
4339 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
4340 if ( testSize > bestSize )
continue;
4341 if ( testSize >= minSize ) bestSize = testSize;
4343 #ifdef TEST_PME_GRID 4344 iout << minSize <<
" " << bestSize <<
"\n" <<
endi;
4346 if ( ! *gridSize ) {
4347 *gridSize = bestSize;
4349 if ( *gridSize * PMEGridSpacing < cellLength ) {
4351 sprintf(errmsg,
"PMEGridSize%s %d is too small for cell length %f and PMEGridSpacing %f\n",
4352 direction, *gridSize, cellLength, PMEGridSpacing);
4357 if ( PMEGridSizeX < 5 ) {
4358 NAMD_die(
"PMEGridSizeX (number of grid points) is very small.");
4360 if ( PMEGridSizeY < 5 ) {
4361 NAMD_die(
"PMEGridSizeY (number of grid points) is very small.");
4363 if ( PMEGridSizeZ < 5 ) {
4364 NAMD_die(
"PMEGridSizeZ (number of grid points) is very small.");
4366 BigReal tolerance = PMETolerance;
4368 while ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) ewaldcof *= 2.0;
4370 BigReal ewaldcof_hi = ewaldcof;
4371 for (
int i = 0; i < 100; ++i ) {
4372 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
4373 if ( erfc(ewaldcof*cutoff)/cutoff >= tolerance ) {
4374 ewaldcof_lo = ewaldcof;
4376 ewaldcof_hi = ewaldcof;
4379 PMEEwaldCoefficient = ewaldcof;
4381 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 4383 if ( ! opts.
defined(
"PMEOffload") ) {
4384 PMEOffload = ( (PMEInterpOrder > 4) && one_device_per_node );
4385 if ( PMEOffload )
iout <<
iINFO <<
"Enabling PMEOffload because PMEInterpOrder > 4.\n" <<
endi;
4386 }
else if ( PMEOffload && ! one_device_per_node ) {
4388 iout <<
iWARN <<
"Disabling PMEOffload because multiple CUDA devices per process are not supported.\n" <<
endi;
4398 PMEGridSpacing = 1000.;
4399 PMEEwaldCoefficient = 0;
4404 if (LJPMESerialRealSpaceOn && ! LJPMESerialOn) {
4405 NAMD_die(
"LJPMESerial must be enabled to use LJPMESerialRealSpace.\n");
4407 else if (LJPMESerialOn && ! LJPMEOn) {
4408 NAMD_die(
"LJPME must be enabled to use LJPMESerial.\n");
4411 #if defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC) 4412 NAMD_die(
"LJ-PME does not yet support special GPU-accelerated NAMD builds.");
4414 if ( lattice.volume() == 0. ) {
4415 NAMD_die(
"LJ-PME requires periodic boundary conditions.");
4420 NAMD_die(
"LJ-PME requires also using PME.");
4422 if (config->
find(
"LJPMEGridSpacing")
4423 && LJPMEGridSpacing != PMEGridSpacing) {
4424 NAMD_die(
"LJ-PME must use same grid spacing as PME.");
4427 LJPMEGridSpacing = PMEGridSpacing;
4429 if ((config->
find(
"LJPMEGridSizeX")
4430 && LJPMEGridSizeX != PMEGridSizeX)
4431 || (config->
find(
"LJPMEGridSizeY")
4432 && LJPMEGridSizeY != PMEGridSizeY)
4433 || (config->
find(
"LJPMEGridSizeZ")
4434 && LJPMEGridSizeZ != PMEGridSizeZ)) {
4435 NAMD_die(
"LJ-PME must use same grid sizes as PME.");
4438 LJPMEGridSizeX = PMEGridSizeX;
4439 LJPMEGridSizeY = PMEGridSizeY;
4440 LJPMEGridSizeZ = PMEGridSizeZ;
4442 if (config->
find(
"LJPMEInterpOrder")
4443 && LJPMEInterpOrder != PMEInterpOrder) {
4444 NAMD_die(
"LJ-PME must use same interpolation order as PME.");
4447 LJPMEInterpOrder = PMEInterpOrder;
4450 if ( LJPMEGridSpacing == 0. ) {
4451 if ( LJPMEGridSizeX * LJPMEGridSizeY * LJPMEGridSizeZ == 0 )
4452 NAMD_die(
"Either LJPMEGridSpacing or LJPMEGridSizeX, LJPMEGridSizeY, and LJPMEGridSizeZ must be specified.");
4453 else LJPMEGridSpacing = 1.5;
4455 #ifndef TEST_PME_GRID 4456 for (
int idim = 0; idim < 3; ++idim ) {
4459 const char *direction;
4461 case 0: direction =
"X";
4462 gridSize = &LJPMEGridSizeX; cellLength = lattice.a().length();
4464 case 1: direction =
"Y";
4465 gridSize = &LJPMEGridSizeY; cellLength = lattice.b().length();
4467 case 2: direction =
"Z";
4468 gridSize = &LJPMEGridSizeZ; cellLength = lattice.c().length();
4471 int minSize = (int) ceil(cellLength/LJPMEGridSpacing);
4473 for (
int minSize = 1; minSize < 300; ++minSize ) {
4475 int bestSize = 10 * (minSize + 10);
4477 for ( max2=2, ts=1; ts < minSize; ++max2 ) ts *= 2;
4478 for ( max3=2, ts=1; ts < minSize; ++max3 ) ts *= 3;
4482 for (
int i2 = 0; i2 <= max2; ++i2 ) {
4483 for (
int i3 = 0; i3 <= max3; ++i3 ) {
4484 for (
int i5 = 0; i5 <= max5; ++i5 ) {
4485 for (
int i7 = 0; i7 <= max7; ++i7 ) {
4486 for (
int i11 = 0; i11 <= max11; ++i11 ) {
4487 if ( i5 + i7 + i11 > i2 )
continue;
4489 for (
int j2 = 0; j2 < i2; ++j2 ) testSize *= 2;
4490 if ( testSize > bestSize )
continue;
4491 for (
int j3 = 0; j3 < i3; ++j3 ) testSize *= 3;
4492 if ( testSize > bestSize )
continue;
4493 for (
int j5 = 0; j5 < i5; ++j5 ) testSize *= 5;
4494 if ( testSize > bestSize )
continue;
4495 for (
int j7 = 0; j7 < i7; ++j7 ) testSize *= 7;
4496 if ( testSize > bestSize )
continue;
4497 for (
int j11 = 0; j11 < i11; ++j11 ) testSize *= 11;
4498 if ( testSize > bestSize )
continue;
4499 if ( testSize >= minSize ) bestSize = testSize;
4501 #ifdef TEST_PME_GRID 4502 iout <<
"LJ-PME: " << minSize <<
" " << bestSize <<
"\n" <<
endi;
4504 if ( ! *gridSize ) {
4505 *gridSize = bestSize;
4507 if ( *gridSize * LJPMEGridSpacing < cellLength ) {
4509 sprintf(errmsg,
"LJPMEGridSize%s %d is too small for cell length %f and LJPMEGridSpacing %f\n",
4510 direction, *gridSize, cellLength, LJPMEGridSpacing);
4515 if ( LJPMEGridSizeX < 5 ) {
4516 NAMD_die(
"LJPMEGridSizeX (number of grid points) is very small.");
4518 if ( LJPMEGridSizeY < 5 ) {
4519 NAMD_die(
"LJPMEGridSizeY (number of grid points) is very small.");
4521 if ( LJPMEGridSizeZ < 5 ) {
4522 NAMD_die(
"LJPMEGridSizeZ (number of grid points) is very small.");
4524 BigReal tolerance = LJPMETolerance;
4526 BigReal aRc = ewaldcof*cutoff;
4529 BigReal damping = (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom;
4530 while ( damping >= tolerance ) {
4532 aRc = ewaldcof*cutoff;
4533 damping = (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom;
4536 BigReal ewaldcof_hi = ewaldcof;
4537 for (
int i = 0; i < 100; ++i ) {
4538 ewaldcof = 0.5 * ( ewaldcof_lo + ewaldcof_hi );
4539 aRc = ewaldcof*cutoff;
4540 if ( (1 + (aRc*aRc) + 0.5*(aRc*aRc*aRc*aRc))*exp(-aRc*aRc)/denom >= tolerance ) {
4541 ewaldcof_lo = ewaldcof;
4543 ewaldcof_hi = ewaldcof;
4546 LJPMEEwaldCoefficient = ewaldcof;
4551 LJPMEGridSpacing = 1000.;
4552 LJPMEEwaldCoefficient = 0;
4568 if (FMAFFTBlock != 4)
4569 NAMD_die(
"FMAFFTBlock: Block length must be 4 for short FFT's");
4570 if (FMAMp % FMAFFTBlock != 0)
4571 NAMD_die(
"FMAMp: multipole term must be multiple of block length (FMAFFTBlock)");
4574 if ( (nonbondedFrequency > stepsPerCycle) || ( (stepsPerCycle % nonbondedFrequency) != 0) )
4576 NAMD_die(
"stepsPerCycle must be a multiple of nonbondedFreq");
4579 if (!LCPOOn && !GBISOn && !GBISserOn && !FMAOn && !PMEOn && !MSMOn && !fullDirectOn && !FMMOn)
4581 fullElectFrequency = 0;
4585 if (!opts.
defined(
"fullElectFrequency"))
4587 if (opts.
defined(
"fmaFrequency")) {
4588 iout <<
iWARN <<
"The parameter fmaFrequency has been renamed fullElectFrequency.\n" <<
endi;
4589 fullElectFrequency = fmaFrequency;
4591 iout <<
iWARN <<
"The parameter fullElectFrequency now defaults to nonbondedFreq (" << nonbondedFrequency <<
") rather than stepsPerCycle.\n" <<
endi;
4592 fullElectFrequency = nonbondedFrequency;
4597 if (opts.
defined(
"fmaFrequency")) {
4598 iout <<
iWARN <<
"Ignoring redundant parameter fmaFrequency in favor of fullElectFrequency.\n" <<
endi;
4600 if ( (fullElectFrequency > stepsPerCycle) || ( (stepsPerCycle % fullElectFrequency) != 0) )
4602 NAMD_die(
"stepsPerCycle must be a multiple of fullElectFrequency");
4606 if ( (nonbondedFrequency > fullElectFrequency) || ( (fullElectFrequency % nonbondedFrequency) != 0) )
4608 NAMD_die(
"fullElectFrequency must be a multiple of nonbondedFreq");
4611 if (singleTopology && fullElectFrequency > 1)
NAMD_die(
"Single topology free energy calculation discourages multiple timesteps to assure accuracy!");
4612 if (singleTopology && alchDecouple)
NAMD_die(
"Single topology free energy calculation can NOT work with alchDecouple on");
4614 if (multigratorOn) {
4615 if ( (multigratorTemperatureFreq > multigratorPressureFreq) || ( (multigratorPressureFreq % multigratorTemperatureFreq) != 0) )
4617 NAMD_die(
"multigratorTemperatureFreq must be a multiple of multigratorPressureFreq");
4619 if ( (fullElectFrequency > multigratorTemperatureFreq) || ( (multigratorTemperatureFreq % fullElectFrequency) != 0) )
4621 NAMD_die(
"fullElectFrequency must be a multiple of multigratorTemperatureFreq");
4623 if (multigratorNoseHooverChainLength <= 2) {
4624 NAMD_die(
"multigratorNoseHooverChainLength must be greater than 2");
4628 if (!opts.
defined(
"fmaTheta"))
4632 if ( lesOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4633 NAMD_die(
"Sorry, LES is only implemented for PME full electrostatics.");
4635 if ( alchFepOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4636 NAMD_die(
"Sorry, FEP is only implemented for PME full electrostatics.");
4638 if ( alchThermIntOn && ( FMAOn || useDPME || fullDirectOn ) ) {
4639 NAMD_die(
"Sorry, TI is only implemented for PME full electrostatics.");
4641 if ( pairInteractionOn && FMAOn ) {
4642 NAMD_die(
"Sorry, pairInteraction not implemented for FMA.");
4644 if ( pairInteractionOn && useDPME ) {
4645 NAMD_die(
"Sorry, pairInteraction not implemented for DPME.");
4647 if ( pairInteractionOn && fullDirectOn ) {
4648 NAMD_die(
"Sorry, pairInteraction not implemented for full direct electrostatics.");
4650 if ( ! pairInteractionOn ) {
4651 pairInteractionSelf = 0;
4653 if ( pairInteractionOn && !pairInteractionSelf && !config->
find(
"pairInteractionGroup2"))
4654 NAMD_die(
"pairInteractionGroup2 must be specified");
4656 if ( ! fixedAtomsOn ) {
4657 fixedAtomsForces = 0;
4660 if ( gridforceOn || mgridforceOn ) {
4661 parse_mgrid_params(config);
4664 if (groupRestraintsOn) {
4665 #ifdef NODEGROUP_FORCE_REGISTER 4666 if (CUDASOAintegrateMode) {
4668 parse_group_restraints_params(config);
4670 groupRestraints.CheckGroupRestraints();
4673 sprintf(msg,
"GroupRestraints requires GPUresident.\n" 4674 " Otherwise, use Colvars for similar functionality.");
4679 sprintf(msg,
"GroupRestraints is not supported on regular multicore builds.\n" 4680 " Please use single-node GPU build with GPUresident on\n" 4681 " or use Colvars for similar functionality.");
4686 if ( extraBondsOn ) {
4687 extraBondsCosAnglesSetByUser = ! ! config->
find(
"extraBondsCosAngles");
4689 extraBondsCosAnglesSetByUser =
false;
4692 if (!opts.
defined(
"constraints"))
4695 constraintScaling = 1.0;
4698 selectConstraintsOn =
FALSE;
4702 movingConstraintsOn =
FALSE;
4705 rotConstraintsOn =
FALSE;
4710 if (rotConstraintsOn) {
4711 rotConsAxis = rotConsAxis.unit();
4714 if(opts.
defined(
"rotConstraints")
4715 && opts.
defined(
"movingConstraints")) {
4716 NAMD_die(
"Rotating and moving constraints are mutually exclusive!");
4721 if(opts.
defined(
"selectConstraints") && !opts.
defined(
"selectConstrX")
4722 && !opts.
defined(
"selectConstrY") && !opts.
defined(
"selectConstrZ")) {
4723 NAMD_die(
"selectConstraints was specified, but no Cartesian components were defined!");
4725 if (!opts.
defined(
"selectConstraints")) {
4741 if (SMDDir.length2() == 0) {
4742 NAMD_die(
"SMD direction vector must be non-zero");
4745 SMDDir = SMDDir.unit();
4748 if (SMDOutputFreq > 0 && SMDOutputFreq < stepsPerCycle
4749 || SMDOutputFreq % stepsPerCycle != 0) {
4750 NAMD_die(
"SMDOutputFreq must be a multiple of stepsPerCycle");
4758 sphericalBCr1 = 0.0;
4759 sphericalBCk1 = 0.0;
4760 sphericalBCexp1 = 0;
4761 sphericalBCr2 = 0.0;
4762 sphericalBCk2 = 0.0;
4763 sphericalBCexp2 = 0;
4765 else if (!opts.
defined(
"sphericalBCr2"))
4767 sphericalBCr2 = -1.0;
4768 sphericalBCk2 = 0.0;
4769 sphericalBCexp2 = 0;
4772 if (!cylindricalBCOn)
4774 cylindricalBCr1 = 0.0;
4775 cylindricalBCk1 = 0.0;
4776 cylindricalBCexp1 = 0;
4777 cylindricalBCr2 = 0.0;
4778 cylindricalBCk2 = 0.0;
4779 cylindricalBCexp2 = 0;
4780 cylindricalBCl1 = 0.0;
4781 cylindricalBCl2 = 0.0;
4783 else if (!opts.
defined(
"cylindricalBCr2"))
4785 cylindricalBCr2 = -1.0;
4786 cylindricalBCk2 = 0.0;
4787 cylindricalBCexp2 = 0;
4788 cylindricalBCl2 = 0.0;
4801 if (!opts.
defined(
"eFieldFreq")) eFieldFreq = 0.0;
4802 if (!opts.
defined(
"eFieldPhase")) eFieldPhase = 0.0;
4808 stirStartingTheta = 0.0;
4819 if (!opts.
defined(
"langevin"))
4825 if (!opts.
defined(
"loweAndersen"))
4827 loweAndersenTemp = 0.0;
4838 if (daCutoffDist > pairlistDist)
4839 NAMD_die(
"Hydrogen bond cutoff distance must be <= pairlist distance");
4846 if (pairInteractionOn) {
4847 if (outputEnergies != 1) {
4848 iout <<
iWARN <<
"Setting outputEnergies to 1 due to\n";
4853 if (pairInteractionOn || pressureProfileOn) {
4854 if (nonbondedFrequency != 1) {
4855 iout <<
iWARN <<
"Setting nonbondedFreq to 1 due to\n";
4856 iout <<
iWARN <<
"pairInteraction or pressure profile calculations\n" <<
endi;
4861 if (!opts.
defined(
"outputTiming"))
4863 outputTiming = firstLdbStep;
4864 int ot2 = 10 * outputEnergies;
4865 if ( outputTiming < ot2 ) outputTiming = ot2;
4874 if (fullElectFrequency > 1)
NAMD_die(
"QM/MM discourages multiple timesteps to assure accuracy!");
4876 if (opts.
defined(
"QMSecProc")){
4880 qmSecProcOn =
false;
4883 if (opts.
defined(
"qmPrepProc")){
4884 qmPrepProcOn =
true;
4887 qmPrepProcOn =
false;
4890 if (opts.
defined(
"QMParamPDB")){
4891 qmParamPDBDefined =
true;
4894 qmParamPDBDefined =
false;
4897 if (opts.
defined(
"QMBondColumn")){
4898 qmBondColumnDefined =
true;
4901 qmBondColumnDefined =
false;
4904 if (qmBondColumnDefined || qmBondGuess){
4911 if ( strcasecmp(qmSoftware,
"orca") != 0 &&
4912 strcasecmp(qmSoftware,
"mopac") != 0 &&
4913 strcasecmp(qmSoftware,
"custom") != 0 ) {
4914 NAMD_die(
"Available QM software options are \'mopac\', \'orca\', or \'custom\'.");
4917 if ( strcasecmp(qmSoftware,
"orca") == 0 )
4919 if ( strcasecmp(qmSoftware,
"mopac") == 0 )
4921 if ( strcasecmp(qmSoftware,
"custom") == 0 )
4926 if (! opts.
defined(
"QMConfigLine"))
4927 NAMD_die(
"If the selected QM software is \'mopac\' or \'orca\'\ 4928 , QMConfigLine needs to be defined.");
4934 if (opts.
defined(
"QMChargeMode")) {
4935 if ( strcasecmp(qmChrgModeS,
"none") != 0 &&
4936 strcasecmp(qmChrgModeS,
"mulliken") != 0 &&
4937 strcasecmp(qmChrgModeS,
"chelpg") != 0) {
4938 NAMD_die(
"Available charge options are \'none\', \'mulliken\' or \'chelpg\'.");
4941 if ( strcasecmp(qmChrgModeS,
"none") == 0 )
4943 if ( strcasecmp(qmChrgModeS,
"mulliken") == 0 )
4945 if ( strcasecmp(qmChrgModeS,
"chelpg") == 0 )
4951 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4954 NAMD_die(
"Available charge options for MOPAC are \'none\' and \'mulliken\'.");
4956 if (qmBondOn && (opts.
defined(
"QMBondValueType"))) {
4957 if ( strcasecmp(qmBondValueTypeS,
"len") != 0 &&
4958 strcasecmp(qmBondValueTypeS,
"ratio") != 0 ) {
4959 NAMD_die(
"Available QM bond value type options are \'len\' or \'ratio\'.");
4964 if ( strcasecmp(qmBondValueTypeS,
"len") == 0 )
4966 if ( strcasecmp(qmBondValueTypeS,
"ratio") == 0 )
4970 else if (qmBondOn && ! (opts.
defined(
"QMBondValueType")))
4973 if ( strcmp(qmColumn,
"beta") != 0 &&
4974 strcmp(qmColumn,
"occ") != 0 ) {
4975 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4978 if (qmBondColumnDefined) {
4979 if ( strcmp(qmBondColumn,
"beta") != 0 &&
4980 strcmp(qmBondColumn,
"occ") != 0 ) {
4981 NAMD_die(
"Available column options are \'beta\' and \'occ\'.");
4984 if (strcmp(qmBondColumn,qmColumn) == 0)
4985 NAMD_die(
"QM column and bond-column must be different!");
4989 if (opts.
defined(
"QMBondScheme")) {
4990 if ( strcasecmp(qmBondSchemeS,
"CS") == 0 )
4992 if ( strcasecmp(qmBondSchemeS,
"RCD") == 0 )
4994 if ( strcasecmp(qmBondSchemeS,
"Z1") == 0 )
4996 if ( strcasecmp(qmBondSchemeS,
"Z2") == 0 )
4998 if ( strcasecmp(qmBondSchemeS,
"Z3") == 0 )
5006 if (opts.
defined(
"QMPointChargeScheme") && qmPCSwitchOn) {
5007 if ( strcasecmp(qmPCSchemeS,
"none") == 0 )
5010 if ( strcasecmp(qmPCSchemeS,
"round") == 0 )
5012 if ( strcasecmp(qmPCSchemeS,
"zero") == 0 )
5015 if ( qmPCScheme > 1 && ! qmPCSwitchOn)
5016 NAMD_die(
"QM Charge Schemes \'round\' or \'zero\' can only be applied with QMswitching set to \'on\'!");
5028 NAMD_die(
"QM Live Solvent Selection cannot be done with QMNoPntChrg set to \'on\'!") ;
5031 NAMD_die(
"QM Live Solvent Selection cannot be done with fixed bonds!") ;
5033 if (qmLSSFreq % qmPCSelFreq != 0)
5034 NAMD_die(
"Frequency of QM solvent update must be a multiple of frequency of point charge selection.");
5036 if (qmLSSFreq % stepsPerCycle != 0)
5037 NAMD_die(
"Frequency of QM solvent update must be a multiple of steps per cycle.");
5039 if (opts.
defined(
"QMLSSMode") ) {
5040 if ( strcasecmp(qmLSSModeS,
"dist") != 0 &&
5041 strcasecmp(qmLSSModeS,
"COM") != 0 ) {
5042 NAMD_die(
"Available LSS mode options are \'dist\' and \'COM\'.");
5044 if ( strcasecmp(qmLSSModeS,
"dist") == 0 )
5046 else if ( strcasecmp(qmLSSModeS,
"COM") == 0 )
5057 if (opts.
defined(
"QMSwitchingType") ) {
5058 if ( strcasecmp(qmPCSwitchTypeS,
"shift") != 0 &&
5059 strcasecmp(qmPCSwitchTypeS,
"switch") != 0 ) {
5060 NAMD_die(
"Available scaling options are \'shift\' and \'switch\'.");
5062 if ( strcasecmp(qmPCSwitchTypeS,
"shift") == 0 )
5064 else if ( strcasecmp(qmPCSwitchTypeS,
"switch") == 0 )
5071 if (qmNoPC && qmPCSelFreq > 1) {
5072 iout <<
iWARN <<
"QMPCStride being IGNORED since QMNoPntChrg is set to \'on\'!\n" <<
endi;
5076 if (qmNoPC && qmPCSwitchOn)
5077 NAMD_die(
"QM PC switching can only be applied with QMNoPntChrg set to \'off\'!");
5082 if (qmPCSelFreq <= 0)
5083 NAMD_die(
"QMPCFreq can only be a positive number! For static point charge selection, see QMCutomPC.");
5085 if (qmCustomPCSel && qmNoPC)
5086 NAMD_die(
"QM Custom PC Selection is incompatible with QMNoPntChrg!");
5091 if (qmCustomPCSel && qmPCSelFreq > 1)
5092 NAMD_die(
"QM Custom PC Selection is incompatible with QMPCStride > 1!");
5094 if (qmCSMD && (! opts.
defined(
"QMCSMDFile") ))
5095 NAMD_die(
"QM Conditional SMD is ON, but no CSMD configuration file was profided!");
5099 if (CUDASOAintegrateMode) {
5101 CUDASOAintegrate =
TRUE;
5102 SOAintegrateOn =
TRUE;
5103 if (!GPUresidentSingleProcessMode && CkNumNodes() > 0) {
5105 NAMD_die(
"GPU Resident mode must be run in single process mode");
5109 CUDASOAintegrate =
FALSE;
5110 GPUresidentSingleProcessMode =
FALSE;
5113 if (CUDASOAintegrateMode && (minimizeOn || minimizeCGOn)) {
5115 "GPUresident does not support \"minimization\" keyword.\n" 5116 "Instead use \"minimize\" available through Tcl scripting interface." 5120 if (SOAintegrateOn) {
5133 if (testOn || commOnly || statsOn ||
5134 minimizeOn || minimizeCGOn ||
5136 pressureProfileOn ||
5142 langevin_useBAOAB ||
5145 zeroMomentum || zeroMomentumAlt ||
5146 (constraintsOn && ! CUDASOAintegrateMode) ||
5147 (monteCarloPressureOn && ! CUDASOAintegrateMode) ||
5149 (tclForcesOn && (TCL_MAJOR_VERSION<=8 && TCL_MINOR_VERSION <6)) ||
5157 berendsenPressureOn ||
5167 tabulatedEnergies ||
5171 pairInteractionOn ||
5172 #ifdef OPENATOM_VERSION
5188 "%s is incompatible with the following options:\n" 5189 " minimization; pressure profiling; multigrator; Lowe-Andersen;\n" 5190 " fixed atoms; GBIS; LCPO; zero momentum;%s\n" 5191 " temperature coupling, rescaling, or reassignment;\n" 5192 " water models other than TIP3 and TIP4; Drude.\n" 5194 "( Bribe us with coffee to get your feature GPU-Resident! :)",
5195 (CUDASOAintegrateMode ?
"GPUresident" :
"SOAintegrate"),
5196 (CUDASOAintegrateMode ?
"" :
" Monte Carlo pressure control;"),
5197 (CUDASOAintegrateMode ?
"" :
" harmonic restraints;")
5199 char featuremsg[1024];
5200 snprintf(featuremsg,1024,
"\nConfiguration could amend the following options to proceeed :\n");
5201 if(testOn) strncat(featuremsg,
" test\n",1023);
5202 if(commOnly) strncat(featuremsg,
" commOnly\n",1023);
5203 if(statsOn) strncat(featuremsg,
" stats\n",1023);
5204 if(minimizeOn) strncat(featuremsg,
" minimize\n",1023);
5205 if(minimizeCGOn) strncat(featuremsg,
" minimizeCG\n",1023);
5206 if(maximumMove != 0) strncat(featuremsg,
" maximumMove\n",1023);
5207 if(pressureProfileOn) strncat(featuremsg,
" pressureProfile\n",1023);
5208 if(accelMDOn) strncat(featuremsg,
" accelMD\n",1023);
5209 if(adaptTempOn) strncat(featuremsg,
" adaptTemp\n",1023);
5210 if(mollyOn) strncat(featuremsg,
" molly\n",1023);
5211 if(multigratorOn) strncat(featuremsg,
" multigrator\n",1023);
5212 if(loweAndersenOn) strncat(featuremsg,
" loweAndersen\n",1023);
5213 if(langevin_useBAOAB) strncat(featuremsg,
" langevin_useBAOAB\n",1023);
5214 if(fixedAtomsOn) strncat(featuremsg,
" fixedAtoms\n",1023);
5215 if(GBISOn) strncat(featuremsg,
" GBIS\n",1023);
5216 if(LCPOOn) strncat(featuremsg,
" LCPO\n",1023);
5217 if(zeroMomentum) strncat(featuremsg,
" zeroMomentum\n",1023);
5218 if(zeroMomentumAlt) strncat(featuremsg,
" zeroMomentumAlt\n",1023);
5219 if(constraintsOn && ! CUDASOAintegrateMode) strncat(featuremsg,
" constraints\n",1023);
5220 if(monteCarloPressureOn && ! CUDASOAintegrateMode) strncat(featuremsg,
" monteCarloPressure\n",1023);
5221 if(tCoupleOn) strncat(featuremsg,
" tCouple\n",1023);
5222 if(rescaleFreq > 0) strncat(featuremsg,
" rescaleFreq\n",1023);
5223 if(watmodel ==
WaterModel::SWM4) strncat(featuremsg,
" watmodel != SWM4\n",1023);
5224 if(lonepairs) strncat(featuremsg,
" lonepairs\n",1023);
5225 if(drudeOn) strncat(featuremsg,
" drude\n",1023);
5227 if(tclForcesOn && (TCL_MAJOR_VERSION<=8 && TCL_MINOR_VERSION <6))
5229 strncat(featuremsg,
" tclForces supported in GPU resident mode only with TCL newer than 8.6, we recommended 8.6.13, your build has ",1023);
5230 strncat(featuremsg, TCL_PATCH_LEVEL,1023);
5233 if(FMAOn) strncat(featuremsg,
" FMAOn\n",1023);
5234 if(fullDirectOn) strncat(featuremsg,
" fullDirectOn\n",1023);
5235 if(MSMOn) strncat(featuremsg,
" MSMon\n",1023);
5236 if(FMMOn) strncat(featuremsg,
" FMMon\n",1023);
5237 if(globalOn) strncat(featuremsg,
" globalOn\n",1023);
5238 if(dihedralOn) strncat(featuremsg,
" dihedralOn\n",1023);
5239 if(berendsenPressureOn) strncat(featuremsg,
" berendsenPressureOn\n",1023);
5240 if(printBadContacts) strncat(featuremsg,
" printBadContacts\n",1023);
5241 if(freeEnergyOn) strncat(featuremsg,
" freeEnergyOn\n",1023);
5242 if(miscForcesOn) strncat(featuremsg,
" miscForcesOn\n",1023);
5243 if(IMDon) strncat(featuremsg,
" IMDOn\n",1023);
5244 if(TMDOn) strncat(featuremsg,
" TMDOn\n",1023);
5245 if(symmetryOn) strncat(featuremsg,
" symmetryOn\n",1023);
5246 if(qmForcesOn) strncat(featuremsg,
" qmForcesOn\n",1023);
5247 if(sphericalBCOn) strncat(featuremsg,
" sphericalBCOn\n",1023);
5248 if(cylindricalBCOn) strncat(featuremsg,
" cylindricalBCOn\n",1023);
5249 if(extForcesOn) strncat(featuremsg,
" extForcesOn\n",1023);
5250 if(tabulatedEnergies) strncat(featuremsg,
" tabulatedEnergies\n",1023);
5251 if(tclBCOn) strncat(featuremsg,
" tclBCOn\n",1023);
5252 if(lesOn) strncat(featuremsg,
" lesOn\n",1023);
5253 if(goForcesOn) strncat(featuremsg,
" goForcesOn\n",1023);
5254 if(pairInteractionOn) strncat(featuremsg,
" pairInteractionOn\n",1023);
5255 #ifdef OPENATOM_VERSION 5256 if(openatomOn) strncat(featuremsg,
" openatomOn\n",1023);
5258 if(movDragOn) strncat(featuremsg,
" movDragOn\n",1023);
5259 if(rotDragOn) strncat(featuremsg,
" rotDragOn\n",1023);
5260 if(consTorqueOn) strncat(featuremsg,
" consTorqueOn\n",1023);
5261 if(stirOn) strncat(featuremsg,
" stirOn\n",1023);
5262 if(HydrogenBonds) strncat(featuremsg,
" HydrogenBonds\n",1023);
5263 strncat(msg,featuremsg,2047);
5264 if (CUDASOAintegrateMode) {
5270 <<
"Falling back on standard integration code path\n" <<
endi;
5272 SOAintegrateOn =
FALSE;
5275 if (CUDASOAintegrateMode) {
5276 #ifndef NODEGROUP_FORCE_REGISTER 5277 NAMD_die(
"GPUresident not supported on regular multicore builds");
5279 if (monteCarloPressureOn && fixedAtomsOn) {
5280 NAMD_die(
"Monte Carlo barostat is not compatible with fixed atoms in GPU-resident mode.\n");
5283 NAMD_die(
"GPUresident does not support QM forces");
5286 NAMD_die(
"GPUresident does not support " 5287 "locally enhanced sampling");
5290 if(CkNumNodes() > 1){
5293 "GPUresident is a shared-memory, single-process mode of execution.\n" 5294 "You're probably not setting the '++ppn' flags accordingly or\n" 5295 "the Charm++ build is not a multicore build and you're spawning\n" 5296 "multiple processes, which is not cool." 5299 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5303 if(monteCarloPressureOn){
5304 NAMD_die(
"Monte Carlo barostat is not compatible with multi-GPU GPUresident");
5310 <<
"Running with GPU-resident mode\n" 5316 NAMD_die(
"SOAintegrate is not fully supported. Please use GPUresident instead.");
5321 if (!CUDASOAintegrateMode && monteCarloPressureOn) {
5322 NAMD_die(
"GPUresident is required for Monte Carlo pressure control. \n");
5325 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5326 if (CUDASOAintegrateMode) {
5335 if ( useCUDAdisable ) {
5339 iout <<
iWARN <<
"Disabling GPU kernel for bonds due to incompatibility with Drude oscillators.\n";
5344 iout <<
iWARN <<
"Disabling GPU kernels for dihedrals and crossterms due to incompatibility with accelerated MD options.\n";
5348 if ( alchOn || !switchingActive || vdwForceSwitching || martiniSwitching || !PMEOn ||
5349 longSplitting!=
C1 || scale14!=1.0 || limitDist > 0.0) {
5350 useCUDANonbondedForceTable =
TRUE;
5351 iout <<
iWARN <<
"Always using force tables for GPU nonbonded kernel due to unsupported config parameters.\n";
5354 if (useDeviceMigration && !CUDASOAintegrateMode) {
5355 useDeviceMigration =
FALSE;
5356 iout <<
iWARN <<
"GPUAtomMigration is only supported for GPUresident. Disabling GPUAtomMigration.\n";
5359 if ( useDeviceMigration ) {
5360 if (constraintsOn || SMDOn || groupRestraintsOn || eFieldOn || fixedAtomsOn || monteCarloPressureOn ||
5361 tclForcesOn || colvarsOn || gridforceOn || mgridforceOn || consForceOn || useCudaGlobal || IMDon) {
5362 updateAtomMap =
TRUE;
5367 NAMD_die(
"Fixed atoms are not supported in GPUAtomMigration.\n");
5370 if ( useDeviceMigration ) {
5371 iout <<
iWARN <<
"GPUAtomMigration is experimental\n";
5373 if ( !GPUresidentSingleProcessMode ) {
5374 if (monteCarloPressureOn) {
5375 NAMD_die(
"MC Pressure is not supported with GPU resident multi-process mode\n");
5379 if (drudeNbtholeCut * drudeNbtholeCut > cutoff * cutoff) {
5380 NAMD_die(
"The GPU implementation of NbThole expects drudeNbtholeCut to be greater than cutoff!\n");
5385 #ifdef NAMD_AVXTILES 5386 if (avxTilesCommandLineDisable) useAVXTiles =
FALSE;
5388 if (alchOn || lesOn || tabulatedEnergies || drudeOn || goForcesOn ||
5389 pressureProfileOn || qmForcesOn || LJPMEOn) {
5390 useAVXTiles =
FALSE;
5391 iout <<
iWARN <<
"Disabling AVX tiles optimizations due to " 5392 <<
"incompatible simulation params.\n";
5396 useAVXTiles =
FALSE;
5399 if (ignoreExclusionChecksum) {
5400 iout <<
iWARN <<
"Error checking will ignore exclusion checksum\n";
5412 iout <<
iINFO <<
"SIMULATION PARAMETERS:\n";
5414 iout <<
iINFO <<
"NUMBER OF STEPS " << N <<
"\n";
5415 iout <<
iINFO <<
"STEPS PER CYCLE " << stepsPerCycle <<
"\n";
5418 if ( lattice.a_p() || lattice.b_p() || lattice.c_p() ) {
5419 if ( lattice.a_p() )
5420 iout <<
iINFO <<
"PERIODIC CELL BASIS 1 " << lattice.a() <<
"\n";
5421 if ( lattice.b_p() )
5422 iout <<
iINFO <<
"PERIODIC CELL BASIS 2 " << lattice.b() <<
"\n";
5423 if ( lattice.c_p() )
5424 iout <<
iINFO <<
"PERIODIC CELL BASIS 3 " << lattice.c() <<
"\n";
5425 iout <<
iINFO <<
"PERIODIC CELL CENTER " << lattice.origin() <<
"\n";
5427 iout <<
iINFO <<
"WRAPPING WATERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
5430 iout <<
iINFO <<
"WRAPPING ALL CLUSTERS AROUND PERIODIC BOUNDARIES ON OUTPUT.\n";
5433 iout <<
iINFO <<
"WRAPPING TO IMAGE NEAREST TO PERIODIC CELL CENTER.\n";
5438 if ( CkNumPes() > 512 ) ldbUnloadOne =
TRUE;
5439 if ( ldbUnloadOne || CkNumPes() > 128 ) ldbUnloadZero =
TRUE;
5451 iout <<
iINFO <<
"LOAD BALANCING STRATEGY New Load Balancers -- DEFAULT\n";
5453 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Refinement Only\n";
5455 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Comprehensive\n";
5457 iout <<
iINFO <<
"LOAD BALANCING STRATEGY Old Load Balancers\n";
5460 iout <<
iINFO <<
"LDB PERIOD " << ldbPeriod <<
" steps\n";
5461 iout <<
iINFO <<
"FIRST LDB TIMESTEP " << firstLdbStep <<
"\n";
5463 iout <<
iINFO <<
"HYBRIDLB GROUP SIZE " << hybridGroupSize <<
"\n";
5464 iout <<
iINFO <<
"LAST LDB TIMESTEP " << lastLdbStep <<
"\n";
5465 if ( ldbRelativeGrainsize > 0. )
5466 iout <<
iINFO <<
"LDB RELATIVE GRAINSIZE " << ldbRelativeGrainsize <<
"\n";
5467 iout <<
iINFO <<
"LDB BACKGROUND SCALING " << ldbBackgroundScaling <<
"\n";
5468 iout <<
iINFO <<
"HOM BACKGROUND SCALING " << ldbHomeBackgroundScaling <<
"\n";
5470 iout <<
iINFO <<
"PME BACKGROUND SCALING " 5471 << ldbPMEBackgroundScaling <<
"\n";
5473 iout <<
iINFO <<
"REMOVING LOAD FROM PME NODES" <<
"\n";
5475 if ( ldbUnloadZero )
iout <<
iINFO <<
"REMOVING LOAD FROM NODE 0\n";
5476 if ( ldbUnloadOne )
iout <<
iINFO <<
"REMOVING LOAD FROM NODE 1\n";
5477 if ( ldbUnloadOutputPEs )
iout <<
iINFO <<
"REMOVING LOAD FROM OUTPUT PES\n";
5481 if ( ldbUnloadOne || CkNumPes() > 256 ) noPatchesOnOne =
TRUE;
5482 if ( ldbUnloadZero || noPatchesOnOne ||
5483 CkNumPes() > 64 || ( IMDon && CkNumPes() > 8 ) ) {
5484 noPatchesOnZero =
TRUE;
5486 if ( (noPatchesOnZero || noPatchesOnOne) && CUDASOAintegrateMode ) {
5487 noPatchesOnZero =
FALSE;
5488 noPatchesOnOne =
FALSE;
5489 iout <<
iWARN <<
"OVERRIDING NOPATCH SETTING. Not supported with GPUresident on\n";
5491 if ( noPatchesOnZero )
iout <<
iINFO <<
"REMOVING PATCHES FROM PROCESSOR 0\n";
5492 if ( noPatchesOnOne )
iout <<
iINFO <<
"REMOVING PATCHES FROM PROCESSOR 1\n";
5495 #if defined(NAMD_CUDA) || defined(NAMD_HIP) || defined(NAMD_MIC) 5496 maxSelfPart = maxPairPart = 1;
5500 iout <<
iINFO <<
"MAX SELF PARTITIONS " << maxSelfPart <<
"\n" 5501 <<
iINFO <<
"MAX PAIR PARTITIONS " << maxPairPart <<
"\n" 5502 <<
iINFO <<
"SELF PARTITION ATOMS " << numAtomsSelf <<
"\n" 5503 <<
iINFO <<
"SELF2 PARTITION ATOMS " << numAtomsSelf2 <<
"\n" 5504 <<
iINFO <<
"PAIR PARTITION ATOMS " << numAtomsPair <<
"\n" 5505 <<
iINFO <<
"PAIR2 PARTITION ATOMS " << numAtomsPair2 <<
"\n";
5507 iout <<
iINFO <<
"MIN ATOMS PER PATCH " << minAtomsPerPatch <<
"\n" 5508 <<
iINFO <<
"EMPTY PATCH LOAD " << emptyPatchLoad <<
" ATOMS\n" 5511 if (initialTemp < 0)
5513 current = config->
find(
"velocities");
5515 if (current == NULL)
5517 current = config->
find(
"binvelocities");
5525 << initialTemp <<
"\n";
5529 iout <<
iINFO <<
"CENTER OF MASS MOVING INITIALLY? ";
5541 if ( zeroMomentum ) {
5542 iout <<
iINFO <<
"REMOVING CENTER OF MASS DRIFT DURING SIMULATION";
5543 if ( zeroMomentumAlt )
iout <<
" (ALT METHOD)";
5548 << dielectric <<
"\n";
5550 if ( nonbondedScaling != 1.0 )
5552 iout <<
iINFO <<
"NONBONDED SCALING " << nonbondedScaling <<
"\n" <<
endi;
5565 iout <<
"ONETHREE\n";
5568 iout <<
"ONE-FOUR\n";
5571 iout <<
"SCALED ONE-FOUR\n";
5578 iout <<
iINFO <<
"1-4 ELECTROSTATICS SCALED BY " << scale14 <<
"\n";
5579 iout <<
iINFO <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE USED\n" <<
endi;
5581 iout <<
iWARN <<
"MODIFIED 1-4 VDW PARAMETERS WILL BE IGNORED\n" <<
endi;
5584 #ifdef SPEC_DISABLED_VERSION 5585 if (dcdFrequency > 0) {
5587 iout <<
iWARN <<
"DCD TRAJECTORY OUTPUT IS DISABLED IN SPEC RELEASE\n";
5591 if (dcdFrequency > 0)
5594 << dcdFilename <<
"\n";
5596 << dcdFrequency <<
"\n";
5598 << ( ((firstTimestep + dcdFrequency)/dcdFrequency)*dcdFrequency ) <<
"\n";
5599 if ( dcdUnitCell ) {
5600 iout <<
iINFO <<
"DCD FILE WILL CONTAIN UNIT CELL DATA\n";
5605 iout <<
iINFO <<
"NO DCD TRAJECTORY OUTPUT\n";
5609 if (xstFrequency > 0)
5612 << xstFilename <<
"\n";
5614 << xstFrequency <<
"\n";
5618 iout <<
iINFO <<
"NO EXTENDED SYSTEM TRAJECTORY OUTPUT\n";
5622 if (velDcdFrequency > 0)
5624 iout <<
iINFO <<
"VELOCITY DCD FILENAME " 5625 << velDcdFilename <<
"\n";
5626 iout <<
iINFO <<
"VELOCITY DCD FREQUENCY " 5627 << velDcdFrequency <<
"\n";
5628 iout <<
iINFO <<
"VELOCITY DCD FIRST STEP " 5629 << ( ((firstTimestep + velDcdFrequency)/velDcdFrequency)*velDcdFrequency ) <<
"\n";
5633 iout <<
iINFO <<
"NO VELOCITY DCD OUTPUT\n";
5637 if (forceDcdFrequency > 0)
5640 << forceDcdFilename <<
"\n";
5642 << forceDcdFrequency <<
"\n";
5643 iout <<
iINFO <<
"FORCE DCD FIRST STEP " 5644 << ( ((firstTimestep + forceDcdFrequency)/forceDcdFrequency)*forceDcdFrequency ) <<
"\n";
5648 iout <<
iINFO <<
"NO FORCE DCD OUTPUT\n";
5653 << outputFilename <<
"\n" <<
endi;
5656 iout <<
iINFO <<
"BINARY OUTPUT FILES WILL BE USED\n" <<
endi;
5658 #ifdef MEM_OPT_VERSION 5660 iout <<
iWARN <<
"SINCE MEMORY OPTIMIZED VERSION IS USED, OUTPUT IN TEXT FORMAT IS DISABLED!\n" <<
endi;
5661 binaryOutput =
TRUE;
5665 if (! restartFrequency)
5672 << restartFilename <<
"\n";
5674 << restartFrequency <<
"\n";
5676 iout <<
iINFO <<
"RESTART FILES WILL NOT BE OVERWRITTEN\n";
5678 if (restartSaveDcd) {
5679 iout <<
iINFO <<
"DCD FILE WILL BE SPLIT WHEN RESTART FILES ARE WRITTEN\n";
5684 iout <<
iINFO <<
"BINARY RESTART FILES WILL BE USED\n";
5690 iout <<
iINFO <<
"NAMD will save positions and velocities to " << crashFilename <<
" when ";
5696 if (switchingActive)
5699 if ( vdwForceSwitching ) {
5700 iout <<
iINFO <<
"VDW FORCE SWITCHING ACTIVE\n";
5702 if ( martiniSwitching ) {
5703 iout <<
iINFO <<
"MARTINI RESIDUE-BASED COARSE-GRAIN SWITCHING ACTIVE\n";
5706 << switchingDist <<
"\n";
5716 iout <<
iINFO <<
"PAIRLIST DISTANCE " << pairlistDist <<
"\n";
5717 iout <<
iINFO <<
"PAIRLIST SHRINK RATE " << pairlistShrink <<
"\n";
5718 iout <<
iINFO <<
"PAIRLIST GROW RATE " << pairlistGrow <<
"\n";
5719 iout <<
iINFO <<
"PAIRLIST TRIGGER " << pairlistTrigger <<
"\n";
5720 iout <<
iINFO <<
"PAIRLISTS PER CYCLE " << pairlistsPerCycle <<
"\n";
5721 if ( outputPairlists )
5722 iout <<
iINFO <<
"PAIRLIST OUTPUT STEPS " << outputPairlists <<
"\n";
5725 if ( pairlistMinProcs > 1 )
5726 iout <<
iINFO <<
"REQUIRING " << pairlistMinProcs <<
" PROCESSORS FOR PAIRLISTS\n";
5727 usePairlists = ( CkNumPes() >= pairlistMinProcs );
5729 #ifdef OPENATOM_VERSION 5732 iout <<
iINFO <<
"OPENATOM QM/MM CAR-PARINELLO ACTIVE\n";
5733 iout <<
iINFO <<
"OPENATOM CONFIG FILE: " << openatomConfig <<
"\n";
5734 iout <<
iINFO <<
"OPENATOM STRUCT FILE: " << openatomStruct <<
"\n";
5735 iout <<
iINFO <<
"OPENATOM PDB FILE: " << openatomPDB <<
"\n";
5737 #endif // OPENATOM_VERSION 5740 if ( (alchOn) && (!usePairlists)) {
5741 NAMD_die(
"Sorry, Alchemical simulations require pairlists to be enabled\n");
5743 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 5744 if ( ! usePairlists ) {
5746 iout <<
iINFO <<
"GPU ACCELERATION REQUIRES PAIRLISTS\n";
5750 iout <<
iINFO <<
"PAIRLISTS " << ( usePairlists ?
"ENABLED" :
"DISABLED" )
5753 iout <<
iINFO <<
"MARGIN " << margin <<
"\n";
5754 if ( margin > 4.0 ) {
5755 iout <<
iWARN <<
"MARGIN IS UNUSUALLY LARGE AND WILL LOWER PERFORMANCE\n";
5756 BigReal f = patchDimension/(patchDimension-margin);
5758 iout <<
iWARN <<
"MARGIN INCREASED PATCH VOLUME BY A FACTOR OF " << f <<
"\n";
5762 iout <<
iINFO <<
"HYDROGEN GROUP CUTOFF " << hgroupCutoff <<
"\n";
5766 << patchDimension <<
"\n";
5770 if (outputEnergies != 1)
5773 << outputEnergies <<
"\n";
5777 if (!opts.
defined(
"computeEnergies")) {
5778 computeEnergies = outputEnergies;
5781 if (computeEnergies != 1)
5785 if (outputEnergies % computeEnergies != 0) {
5786 const std::string err_msg = std::string{
"The period of outputting energies (outputEnergies = "}
5787 + std::to_string(outputEnergies)
5788 + std::string{
") is not a multiple of the period of computing energies (computeEnergies = "}
5789 + std::to_string(computeEnergies)
5790 + std::string{
").\n"};
5793 if (alchOn && (alchOutFreq % computeEnergies != 0)) {
5795 const std::string err_msg = std::string{
"The period of outputting energies relating to alchemical transformations (alchOutFreq = "}
5796 + std::to_string(alchOutFreq)
5797 + std::string{
") is not a multiple of the period of computing energies (computeEnergies = "}
5798 + std::to_string(computeEnergies)
5799 + 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"};
5803 iout <<
iINFO <<
"ENERGY EVALUATION STEPS " 5804 << computeEnergies <<
"\n";
5808 iout <<
iINFO <<
"OUTPUT ENERGY PRECISION " << outputEnergiesPrecision <<
"\n";
5810 if (mergeCrossterms) {
5811 iout <<
iINFO <<
"CROSSTERM ENERGY INCLUDED IN DIHEDRAL\n" <<
endi;
5814 if (outputMomenta != 0)
5816 iout <<
iINFO <<
"MOMENTUM OUTPUT STEPS " 5817 << outputMomenta <<
"\n";
5821 if (outputTiming != 0)
5824 << outputTiming <<
"\n";
5828 if (outputCudaTiming != 0)
5830 iout <<
iINFO <<
"GPU TIMING OUTPUT STEPS " 5831 << outputCudaTiming <<
"\n";
5835 if (outputPressure != 0)
5837 iout <<
iINFO <<
"PRESSURE OUTPUT STEPS " 5838 << outputPressure <<
"\n";
5844 iout <<
iINFO <<
"FIXED ATOMS ACTIVE\n";
5845 if ( fixedAtomsForces )
5846 iout <<
iINFO <<
"FORCES BETWEEN FIXED ATOMS ARE CALCULATED\n";
5852 iout <<
iINFO <<
"HARMONIC CONSTRAINTS ACTIVE\n";
5855 << constraintExp <<
"\n";
5857 if (constraintScaling != 1.0) {
5858 iout <<
iINFO <<
"HARMONIC CONS SCALING " 5859 << constraintScaling <<
"\n";
5864 if (selectConstraintsOn) {
5865 iout <<
iINFO <<
"SELECTED CARTESIAN COMPONENTS OF HARMONIC RESTRAINTS ACTIVE\n";
5868 iout <<
iINFO <<
"RESTRAINING X-COMPONENTS OF CARTESIAN COORDINATES!\n";
5871 iout <<
iINFO <<
"RESTRAINING Y-COMPONENTS OF CARTESIAN COORDINATES!\n";
5874 iout <<
iINFO <<
"RESTRAINING Z-COMPONENTS OF CARTESIAN COORDINATES!\n";
5878 if (sphericalConstraintsOn) {
5879 iout <<
iINFO <<
"SPHERICAL HARMONIC CONSTRAINTS ACTIVE\n";
5880 iout <<
iINFO <<
"RESTRAINING DISTANCE TO " << sphericalConstrCenter <<
"\n";
5886 if (movingConstraintsOn) {
5887 iout <<
iINFO <<
"MOVING HARMONIC CONSTRAINTS ACTIVE\n";
5889 iout <<
iINFO <<
"MOVING CONSTRAINT VELOCITY " 5890 << movingConsVel <<
" ANGSTROM/TIMESTEP\n";
5892 iout <<
iINFO <<
"ALL CONSTRAINED ATOMS WILL MOVE\n";
5899 if (rotConstraintsOn) {
5900 iout <<
iINFO <<
"ROTATING HARMONIC CONSTRAINTS ACTIVE\n";
5903 << rotConsAxis <<
"\n";
5906 << rotConsPivot <<
"\n";
5908 iout <<
iINFO <<
"ROTATING CONSTRAINT VELOCITY " 5909 << rotConsVel <<
" DEGREES/TIMESTEP\n";
5917 iout <<
iINFO <<
"MOVING DRAG ACTIVE.\n";
5919 iout <<
iINFO <<
"MOVING DRAG MAIN PDB FILE " 5920 << movDragFile <<
"\n";
5922 iout <<
iINFO <<
"MOVING DRAG GLOBAL VELOCITY (A/step) " 5923 << movDragGlobVel <<
"\n";
5925 iout <<
iINFO <<
"MOVING DRAG LINEAR VELOCITY FILE " 5926 << movDragVelFile <<
"\n";
5933 iout <<
iINFO <<
"ROTATING DRAG ACTIVE.\n";
5935 iout <<
iINFO <<
"ROTATING DRAG MAIN PDB FILE " 5936 << rotDragFile <<
"\n";
5938 iout <<
iINFO <<
"ROTATING DRAG AXIS FILE " 5939 << rotDragAxisFile <<
"\n";
5941 iout <<
iINFO <<
"ROTATING DRAG PIVOT POINT FILE " 5942 << rotDragPivotFile <<
"\n";
5944 iout <<
iINFO <<
"ROTATING DRAG GLOBAL ANGULAR VELOCITY (deg/step) " 5945 << rotDragGlobVel <<
"\n";
5947 iout <<
iINFO <<
"ROTATING DRAG ANGULAR VELOCITY FILE " 5948 << rotDragVelFile <<
"\n";
5956 iout <<
iINFO <<
"\"CONSTANT\" TORQUE ACTIVE.\n";
5958 iout <<
iINFO <<
"\"CONSTANT\" TORQUE MAIN PDB FILE " 5959 << consTorqueFile <<
"\n";
5961 iout <<
iINFO <<
"\"CONSTANT\" TORQUE AXIS FILE " 5962 << consTorqueAxisFile <<
"\n";
5964 iout <<
iINFO <<
"\"CONSTANT\" TORQUE PIVOT POINT FILE " 5965 << consTorquePivotFile <<
"\n";
5967 iout <<
iINFO <<
"\"CONSTANT\" TORQUE GLOBAL VALUE (Kcal/(mol*A^2)) " 5968 << consTorqueGlobVal <<
"\n";
5970 iout <<
iINFO <<
"\"CONSTANT\" TORQUE DACTORS FILE " 5971 << consTorqueValFile <<
"\n";
5978 iout <<
iINFO <<
" Please include this reference in published work using\n";
5979 iout <<
iINFO <<
" the Gridforce module of NAMD: David Wells, Volha Abramkina,\n";
5980 iout <<
iINFO <<
" and Aleksei Aksimentiev, J. Chem. Phys. 127:125101-10 (2007).\n";
5981 print_mgrid_params();
5984 if (groupRestraintsOn) {
5985 iout <<
iINFO <<
"GROUP RESTRAINTS ACTIVE\n";
5986 groupRestraints.PrintGroupRestraints();
5995 << SMDVel <<
" ANGSTROM/TIMESTEP\n";
6006 iout <<
iINFO <<
"SMD OUTPUT FREQUENCY " 6007 << SMDOutputFreq <<
" TIMESTEPS\n";
6009 iout <<
iINFO <<
"SMD FILE " << SMDFile <<
"\n";
6017 iout <<
iINFO <<
"TMD ACTIVE BETWEEN STEPS " << TMDFirstStep
6018 <<
" and " << TMDLastStep <<
"\n";
6019 iout <<
iINFO <<
"TMD K " << TMDk <<
"\n";
6020 iout <<
iINFO <<
"TMD FILE " << TMDFile <<
"\n";
6021 iout <<
iINFO <<
"TMD OUTPUT FREQUENCY " << TMDOutputFreq <<
"\n";
6022 if (TMDInitialRMSD) {
6023 iout <<
iINFO <<
"TMD TARGET RMSD AT FIRST STEP " << TMDInitialRMSD <<
"\n";
6025 iout <<
iINFO <<
"TMD TARGET RMSD AT FIRST STEP COMPUTED FROM INITIAL COORDINATES\n";
6027 iout <<
iINFO <<
"TMD TARGET RMSD AT FINAL STEP " << TMDFinalRMSD <<
"\n";
6032 if (symmetryLastStep == -1){
6033 iout <<
iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " <<
"INFINITY" <<
"\n";
6036 iout <<
iINFO <<
"SYMMETRY RESTRAINTS ACTIVE BETWEEN STEPS " << symmetryFirstStep <<
" and " << symmetryLastStep <<
"\n";
6040 current = config->
find(
"symmetryFile");
6041 for ( ; current; current = current->
next ) {
6045 current = config->
find(
"symmetryMatrixFile");
6046 for ( ; current; current = current->
next ) {
6047 iout <<
iINFO <<
"SYMMETRY MATRIX FILE " << current->
data <<
"\n";
6049 iout <<
iINFO <<
"SYMMETRY FORCE CONSTANT " << symmetryk <<
"\n";
6050 if (symmetryScaleForces){
6051 iout <<
iINFO <<
"SYMMETRY SCALE FORCES ON\n";
6053 iout <<
iINFO <<
"SYMMETRY FIRST FULL STEP " << symmetryFirstFullStep <<
"\n";
6054 if (symmetryLastFullStep == -1){
6055 iout <<
iINFO <<
"SYMMETRY LAST FULL STEP " <<
"INFINITY" <<
"\n";
6059 iout <<
iINFO <<
"SYMMETRY LAST FULL STEP " << symmetryLastFullStep <<
"\n";
6072 iout <<
iINFO <<
"FEP CURRENT LAMBDA VALUE " 6073 << alchLambda <<
"\n";
6074 iout <<
iINFO <<
"FEP COMPARISON LAMBDA VALUE " 6075 << alchLambda2 <<
"\n";
6076 if (alchLambdaIDWS >= 0.) {
6077 iout <<
iINFO <<
"FEP ALTERNATE COMPARISON LAMBDA VALUE " 6078 << alchLambdaIDWS <<
"\n";
6080 if (alchLambdaFreq > 0) {
6081 iout <<
iINFO <<
"FEP CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY " 6082 << alchLambdaFreq <<
" STEPS\n";
6084 if (!alchDecouple) {
6085 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6088 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6091 if (alchBondDecouple) {
6092 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6095 iout <<
iINFO <<
"FEP INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6099 iout <<
iINFO <<
"FEP WEEKS-CHANDLER-ANDERSEN (WCA) VDW DECOUPLING " 6102 iout <<
iINFO <<
"FEP VDW SHIFTING COEFFICIENT " 6103 << alchVdwShiftCoeff <<
"\n";
6105 iout <<
iINFO <<
"FEP ELEC. ACTIVE FOR ANNIHILATED " 6106 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6107 << (1 - alchElecLambdaStart) <<
"\n";
6108 iout <<
iINFO <<
"FEP ELEC. ACTIVE FOR EXNIHILATED " 6109 <<
"PARTICLES BETWEEN LAMBDA = " 6110 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
6112 iout <<
iINFO <<
"FEP VDW-REPU. ACTIVE FOR ANNIHILATED PARTICLES " 6113 <<
"BETWEEN LAMBDA = " << (1 - alchRepLambdaEnd) <<
" AND LAMBDA " 6115 iout <<
iINFO <<
"FEP VDW-REPU. ACTIVE FOR EXNIHILATED PARTICLES " 6116 <<
"BETWEEN LAMBDA = 0 AND LAMBDA " << alchRepLambdaEnd <<
"\n";
6117 iout <<
iINFO <<
"FEP VDW-ATTR. ACTIVE FOR ANNIHILATED PARTICLES " 6118 <<
"BETWEEN LAMBDA = " << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = " 6119 << (1 - alchRepLambdaEnd) <<
"\n";
6120 iout <<
iINFO <<
"FEP VDW-ATTR. ACTIVE FOR EXNIHILATED PARTICLES " 6121 <<
"BETWEEN LAMBDA = " << alchRepLambdaEnd <<
" AND LAMBDA = " 6122 << alchVdwLambdaEnd <<
"\n";
6124 iout <<
iINFO <<
"FEP VDW ACTIVE FOR ANNIHILATED " 6125 <<
"PARTICLES BETWEEN LAMBDA = " 6126 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
6127 iout <<
iINFO <<
"FEP VDW ACTIVE FOR EXNIHILATED " 6128 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6129 << alchVdwLambdaEnd <<
"\n";
6131 iout <<
iINFO <<
"FEP BOND ACTIVE FOR ANNIHILATED " 6132 <<
"PARTICLES BETWEEN LAMBDA = " 6133 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
6134 iout <<
iINFO <<
"FEP BOND ACTIVE FOR EXNIHILATED " 6135 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6136 << alchBondLambdaEnd <<
"\n";
6142 iout <<
iINFO <<
"THERMODYNAMIC INTEGRATION (TI) ON\n";
6144 << alchLambda <<
"\n";
6145 if (alchLambdaFreq > 0) {
6146 iout <<
iINFO <<
"TI COMPARISON LAMBDA VALUE " 6147 << alchLambda2 <<
"\n";
6148 iout <<
iINFO <<
"TI CURRENT LAMBDA VALUE SET TO INCREASE IN EVERY " 6149 << alchLambdaFreq <<
" STEPS\n";
6151 if (!alchDecouple) {
6152 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6155 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL NON-BONDED INTERACTIONS WILL BE " 6158 if (alchBondDecouple) {
6159 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6162 iout <<
iINFO <<
"TI INTRA-ALCHEMICAL BONDED INTERACTIONS WILL BE " 6165 iout <<
iINFO <<
"TI VDW SHIFTING COEFFICIENT " 6166 << alchVdwShiftCoeff <<
"\n";
6167 iout <<
iINFO <<
"TI ELEC. ACTIVE FOR ANNIHILATED " 6168 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6169 << (1 - alchElecLambdaStart) <<
"\n";
6170 iout <<
iINFO <<
"TI ELEC. ACTIVE FOR EXNIHILATED " 6171 <<
"PARTICLES BETWEEN LAMBDA = " 6172 << alchElecLambdaStart <<
" AND LAMBDA = 1\n";
6173 iout <<
iINFO <<
"TI VDW ACTIVE FOR ANNIHILATED " 6174 <<
"PARTICLES BETWEEN LAMBDA = " 6175 << (1 - alchVdwLambdaEnd) <<
" AND LAMBDA = 1\n";
6176 iout <<
iINFO <<
"TI VDW ACTIVE FOR EXNIHILATED " 6177 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6178 << alchVdwLambdaEnd <<
"\n";
6179 iout <<
iINFO <<
"TI BOND ACTIVE FOR ANNIHILATED " 6180 <<
"PARTICLES BETWEEN LAMBDA = " 6181 << (1 - alchBondLambdaEnd) <<
" AND LAMBDA = 1\n";
6182 iout <<
iINFO <<
"TI BOND ACTIVE FOR EXNIHILATED " 6183 <<
"PARTICLES BETWEEN LAMBDA = 0 AND LAMBDA = " 6184 << alchBondLambdaEnd <<
"\n";
6189 iout <<
iINFO <<
"LOCALLY ENHANCED SAMPLING ACTIVE\n";
6190 iout <<
iINFO <<
"LOCAL ENHANCEMENT FACTOR IS " 6191 << lesFactor <<
"\n";
6193 <<
"SCALING ENHANCED ATOM TEMPERATURE BY 1/" << lesFactor <<
"\n";
6195 <<
"SCALING ENHANCED ATOM MASS BY 1/" << lesFactor <<
"\n";
6198 if ( singleTopology ) {
6199 iout <<
iINFO <<
"SINGLE TOPOLOGY IS ON FOR RELATIVE FREE ENERGY CALCULATION\n";
6203 if ( soluteScalingOn ) {
6204 iout <<
iINFO <<
"SOLUTE SCALING IS ACTIVE\n";
6205 if (soluteScalingFactorCharge != soluteScalingFactorVdw) {
6206 iout <<
iINFO <<
"SCALING FOR ELECTROSTATIC INTERACTIONS IS " 6207 << soluteScalingFactorCharge <<
"\n";
6208 iout <<
iINFO <<
"SCALING FOR VAN DER WAALS INTERACTIONS IS " 6209 << soluteScalingFactorVdw <<
"\n";
6210 iout <<
iINFO <<
"SCALING FOR BONDED INTERACTIONS IS " 6211 << soluteScalingFactor <<
"\n";
6214 iout <<
iINFO <<
"SOLUTE SCALING FACTOR IS " 6215 << soluteScalingFactor <<
"\n";
6217 if ( ! soluteScalingAll ) {
6218 iout <<
iINFO <<
"SOLUTE SCALING DISABLED FOR BONDS AND ANGLES\n";
6222 if ( pairInteractionOn ) {
6223 iout <<
iINFO <<
"PAIR INTERACTION CALCULATIONS ACTIVE\n";
6224 iout <<
iINFO <<
"USING FLAG " << pairInteractionGroup1
6225 <<
" FOR GROUP 1\n";
6226 if (pairInteractionSelf) {
6227 iout <<
iINFO <<
"COMPUTING ONLY SELF INTERACTIONS FOR GROUP 1 ATOMS\n";
6229 iout <<
iINFO <<
"USING FLAG " << pairInteractionGroup2
6230 <<
" FOR GROUP 2\n";
6235 iout <<
iINFO <<
"CONSTANT FORCE ACTIVE\n";
6236 if ( consForceScaling != 1.0 ) {
6237 iout <<
iINFO <<
"CONSTANT FORCE SCALING " 6238 << consForceScaling <<
"\n" <<
endi;
6246 iout <<
iINFO <<
"EXTERNAL COMMAND FORCES ACTIVE\n";
6247 iout <<
iINFO <<
"EXT FORCES COMMAND: " << extForcesCommand <<
"\n";
6248 iout <<
iINFO <<
"EXT COORD FILENAME: " << extCoordFilename <<
"\n";
6249 iout <<
iINFO <<
"EXT FORCE FILENAME: " << extForceFilename <<
"\n";
6257 if (qmParamPDBDefined){
6258 iout <<
iINFO <<
"QM PDB PARAMETER FILE: " << qmParamPDB <<
"\n";
6260 iout <<
iINFO <<
"QM SOFTWARE: " << qmSoftware <<
"\n";
6263 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: NONE\n";
6265 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: MULLIKEN\n";
6267 iout <<
iINFO <<
"QM ATOM CHARGES FROM QM SOFTWARE: CHELPG\n";
6269 iout <<
iINFO <<
"QM EXECUTABLE PATH: " << qmExecPath <<
"\n";
6270 iout <<
iINFO <<
"QM COLUMN: " << qmColumn <<
"\n";
6272 iout <<
iINFO <<
"QM WILL DETECT BONDS BETWEEN QM AND MM ATOMS.\n";
6275 iout <<
iINFO <<
"QM BONDS WILL BE GUESSED FROM TOPOLOGY AND QM REGIONS.\n";
6277 if (qmBondColumnDefined) {
6278 iout <<
iINFO <<
"QM BOND COLUMN: " << qmBondColumn <<
"\n";
6281 iout <<
iINFO <<
"QM BOND COLUMN WILL DEFINE LINK AOTM DISTANCE.\n";
6282 if (qmBondValType == 1)
6283 iout <<
iINFO <<
"QM BOND COLUMN HAS LENGTH INFORMATION.\n";
6284 else if (qmBondValType == 2)
6285 iout <<
iINFO <<
"QM BOND COLUMN HAS RATIO INFORMATION.\n";
6288 iout <<
iINFO <<
"MECHANICHAL EMBEDDING SELECTED." 6289 " BOND SCHEME WILL BE IGNORED!\n" <<
endi;
6294 iout <<
iINFO <<
"QM-MM BOND SCHEME: Charge Shift.\n";
6296 iout <<
iINFO <<
"QM-MM BOND SCHEME: Redistributed Charge and Dipole.\n";
6298 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z1.\n";
6300 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z2.\n";
6302 iout <<
iINFO <<
"QM-MM BOND SCHEME: Z3.\n";
6307 if (qmChrgFromPSF) {
6308 iout <<
iINFO <<
"QM Will use PSF charges.\n";
6311 iout <<
iINFO <<
"QM BASE DIRECTORY: " << qmBaseDir <<
"\n";
6314 iout <<
iINFO <<
"QM PREPARATION PROCESS: " << qmPrepProc <<
"\n";
6317 iout <<
iINFO <<
"QM SECONDARY PROCESS: " << qmSecProc <<
"\n";
6320 current = config->
find(
"QMConfigLine");
6321 for ( ; current; current = current->
next ) {
6323 if ( strstr(current->
data,
"\n") ) {
6324 iout <<
iINFO <<
"QM configuration lines from NADM config file\n";
6328 iout <<
iINFO <<
"QM CONFIG LINE: " << current->
data <<
"\n";
6333 iout <<
iINFO <<
"QM FORCES WILL REPLACE ALL NAMD FORCES!\n";
6337 iout <<
iINFO <<
"QM NO POINT CHARGE: ON.\n";
6340 iout <<
iINFO <<
"QM CUSTOM POINT CHARGE SELECTION IS ACTIVATED\n";
6342 if (! qmNoPC && ! qmCustomPCSel)
6343 iout <<
iINFO <<
"QM POINT CHARGES WILL BE SELECTED EVERY " 6344 << qmPCSelFreq <<
" STEPS.\n";
6347 iout <<
iINFO <<
"QM Point Charge Switching: ON.\n";
6349 if (qmPCScheme == 1)
6350 iout <<
iINFO <<
"QM Point Charge SCHEME: none.\n";
6351 else if (qmPCScheme == 2)
6352 iout <<
iINFO <<
"QM Point Charge SCHEME: round.\n";
6353 else if (qmPCScheme == 3)
6354 iout <<
iINFO <<
"QM Point Charge SCHEME: zero.\n";
6358 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION IS ACTIVE.\n" ;
6359 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION FREQUENCY: " 6360 << qmLSSFreq <<
"\n" <<
endi;
6362 current = config->
find(
"QMLSSSize");
6363 for ( ; current; current = current->
next ) {
6364 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION SIZE (\"qmGrpID numMolecules\"): " << current->
data <<
"\n";
6367 if (! opts.
defined(
"QMLWSResname"))
6368 strcpy(qmLSSResname,
"TIP3");
6369 iout <<
iINFO <<
"QM LIVE SOLVENT SELECTION WILL USE RESIDUE TYPE: " << qmLSSResname <<
"\n" <<
endi;
6372 iout <<
iINFO <<
"QM executions per node: " << qmSimsPerNode <<
"\n";
6382 iout <<
iINFO<<
"GBIS GENERALIZED BORN IMPLICIT SOLVENT ACTIVE (SERIAL)\n";
6385 iout <<
iINFO <<
"GBIS GENERALIZED BORN IMPLICIT SOLVENT ACTIVE\n";
6387 if (GBISOn || GBISserOn) {
6388 iout <<
iINFO <<
"GBIS SOLVENT DIELECTRIC: " << solvent_dielectric<<
"\n";
6389 iout <<
iINFO <<
"GBIS PROTEIN DIELECTRIC: " << dielectric<<
"\n";
6390 iout <<
iINFO<<
"GBIS COULOMB RADIUS OFFSET: "<< coulomb_radius_offset<<
" Ang\n";
6391 iout <<
iINFO <<
"GBIS ION CONCENTRATION: " << ion_concentration <<
" M\n";
6392 iout <<
iINFO <<
"GBIS DEBYE SCREENING LENGTH: " << 1.0/kappa <<
" Ang\n";
6393 iout <<
iINFO <<
"GBIS DELTA: " << gbis_delta <<
"\n";
6394 iout <<
iINFO <<
"GBIS BETA: " << gbis_beta <<
"\n";
6395 iout <<
iINFO <<
"GBIS GAMMA: " << gbis_gamma <<
"\n";
6396 iout <<
iINFO <<
"GBIS BORN RADIUS CUTOFF: " << alpha_cutoff <<
" Ang\n";
6397 iout <<
iINFO <<
"GBIS MAX BORN RADIUS: " << alpha_max <<
" Ang\n";
6402 iout <<
iINFO <<
"SASA SURFACE TENSION: " << surface_tension<<
" kcal/mol/Ang^2\n";
6407 iout <<
iINFO <<
"TCL BOUNDARY FORCES ACTIVE\n";
6408 current = config->
find(
"tclBCScript");
6410 tclBCScript = current->
data;
6411 iout <<
iINFO <<
"TCL BOUNDARY FORCES SCRIPT " << current->
data <<
"\n";
6413 iout <<
iINFO <<
"TCL BOUNDARY FORCES ARGS " << tclBCArgs <<
"\n";
6419 globalForcesOn = ( tclForcesOn || freeEnergyOn || miscForcesOn ||
6420 (IMDon && ! (IMDignore || IMDignoreForces)) || (SMDOn && !CUDASOAintegrateMode) || TMDOn ||
6421 colvarsOn || symmetryOn || qmForcesOn );
6423 if (globalForcesOn && monteCarloPressureOn) {
6424 NAMD_die(
"Monte Carlo pressure control is not compatible with " 6425 "global forces computations (Colvars, TclForces, TMD, IMD, " 6426 "symmetryRestraints, and similar features)");
6428 if(globalForcesOn && globalMasterFrequency >1 && !CUDASOAintegrateMode)
6430 NAMD_die(
"GlobalMaster multiple time-stepping is not available in non GPU-resident mode!\n");
6432 if(globalForcesOn && globalMasterFrequency >1 )
6434 iout <<
iINFO <<
"GLOBAL FORCES FREQENCY " << globalMasterFrequency<<
"\n";
6435 iout <<
iINFO <<
"GLOBAL FORCES SCALING " << globalMasterScaleByFrequency<<
"\n";
6436 iout <<
iINFO <<
"GLOBAL FORCES STALE FORCES MTS " << globalMasterStaleForces<<
"\n";
6440 iout <<
iINFO <<
"TCL GLOBAL FORCES ACTIVE\n";
6442 current = config->
find(
"tclForcesScript");
6444 for ( ; current; current = current->
next ) {
6446 if ( strstr(current->
data,
"\n") ) {
6447 iout <<
iINFO <<
"TCL GLOBAL FORCES SCRIPT INLINED IN CONFIG FILE\n";
6451 iout <<
iINFO <<
"TCL GLOBAL FORCES SCRIPT " << current->
data <<
"\n";
6459 iout <<
iINFO <<
"MISC FORCES ACTIVE\n";
6461 current = config->
find(
"miscForcesScript");
6463 for ( ; current; current = current->
next ) {
6465 if ( strstr(current->
data,
"\n") ) {
6466 iout <<
iINFO <<
"MISC FORCES SCRIPT INLINED IN CONFIG FILE\n";
6470 iout <<
iINFO <<
"MISC FORCES SCRIPT " << current->
data <<
"\n";
6478 iout <<
iINFO <<
"FREE ENERGY PERTURBATION ACTIVE\n";
6480 current = config->
find(
"freeEnergyConfig");
6482 for ( ; current; current = current->
next ) {
6484 if ( strstr(current->
data,
"\n") ) {
6485 iout <<
iINFO <<
"FREE ENERGY PERTURBATION SCRIPT INLINED IN CONFIG FILE\n";
6489 iout <<
iINFO <<
"FREE ENERGY PERTURBATION SCRIPT " << current->
data <<
"\n";
6497 iout <<
iINFO <<
"COLLECTIVE VARIABLES CALCULATION REQUESTED\n";
6499 current = config->
find (
"colvarsConfig");
6500 for ( ; current; current = current->
next ) {
6501 if ( strstr(current->
data,
"\n") ) {
6502 iout <<
iINFO <<
"COLLECTIVE VARIABLES CONFIGURATION INLINED IN CONFIG FILE\n";
6505 iout <<
iINFO <<
"COLLECTIVE VARIABLES CONFIGURATION " << current->
data <<
"\n";
6508 current = config->
find (
"colvarsInput");
6509 for ( ; current; current = current->
next ) {
6510 if ( strstr(current->
data,
"\n") ) {
6511 iout <<
iINFO <<
"COLLECTIVE VARIABLES RESTART INFORMATION INLINED IN CONFIG FILE\n";
6514 iout <<
iINFO <<
"COLLECTIVE VARIABLES RESTART INFORMATION " << current->
data <<
"\n";
6522 iout <<
iINFO <<
"INTERACTIVE MD ACTIVE\n";
6523 iout <<
iINFO <<
"INTERACTIVE MD VERSION " <<
static_cast<int>(IMDversion) <<
"\n";
6524 iout <<
iINFO <<
"INTERACTIVE MD PORT " << IMDport <<
"\n";
6525 iout <<
iINFO <<
"INTERACTIVE MD FREQ " << IMDfreq <<
"\n";
6527 iout <<
iINFO <<
"INTERACTIVE MD WILL NOT INFLUENCE SIMULATION\n";
6529 if (IMDignoreForces)
6531 iout <<
iINFO <<
"INTERACTIVE FORCES ARE DISABLED\n";
6532 iout <<
iINFO <<
"PAUSE, RESUME, DETACH AND FINISH INTERACTIVE MD ARE ENABLED\n";
6534 if (IMDwait)
iout <<
iINFO <<
"WILL AWAIT INTERACTIVE MD CONNECTION\n";
6537 iout <<
iINFO <<
"INTERACTIVE MD WILL SEND THE FOLLOWING:\n";
6538 if (IMDsendsettings.time_switch == 1) {
6541 if (IMDsendsettings.energies_switch == 1) {
6543 if (CUDASOAintegrate && (IMDfreq % computeEnergies != 0)) {
6544 iout <<
iWARN <<
"IMDfreq is not a multiple of computeEnergies in GPU-resident mode.\n" <<
endi;
6545 iout <<
iWARN <<
"Energies sent to the IMD client might be incorrect.\n" <<
endi;
6548 if (IMDsendsettings.box_switch == 1) {
6551 if (IMDsendsettings.fcoords_switch == 1) {
6552 if (IMDsendsettings.wrap_switch == 1) {
6553 iout <<
iINFO <<
"WRAPPED COORDINATES\n";
6555 iout <<
iINFO <<
"UNWRAPPED COORDINATES\n";
6558 if (IMDsendsettings.velocities_switch == 1) {
6561 if (IMDsendsettings.forces_switch == 1) {
6568 if (globalOn && !dihedralOn)
6570 iout <<
iINFO <<
"GLOBAL INTEGRATION TEST MODE ACTIVE\n";
6576 iout <<
iINFO <<
"DIHEDRAL ANGLE DYNAMICS ACTIVE\n";
6579 iout <<
iINFO <<
"*** DIHEDRAL ANGLE DYNAMICS IS HIGHLY EXPERIMENTAL ***\n";
6580 iout <<
iINFO <<
"PLEASE CONSIDER USING THE COLD OPTION AS WELL\n";
6593 iout <<
iINFO <<
"COLD (CONSTRAINED OVERDAMPED LANGEVIN DYNAMICS) ACTIVE\n";
6596 << COLDTemp <<
"\n";
6599 << COLDRate <<
"\n";
6602 if (cylindricalBCOn)
6604 iout <<
iINFO <<
"CYLINDRICAL BOUNDARY CONDITIONS ACTIVE\n";
6605 iout <<
iINFO <<
"AXIS " << cylindricalBCAxis <<
"\n";
6606 iout <<
iINFO <<
"RADIUS #1 " << cylindricalBCr1 <<
"\n";
6607 iout <<
iINFO <<
"FORCE CONSTANT #1 " << cylindricalBCk1 <<
"\n";
6608 iout <<
iINFO <<
"EXPONENT #1 " << cylindricalBCexp1 <<
"\n";
6609 iout <<
iINFO <<
"LENGTH #1 " << cylindricalBCl1 <<
"\n";
6610 if (cylindricalBCr2 > 0.0)
6612 iout <<
iINFO <<
"RADIUS #2 " << cylindricalBCr2 <<
"\n";
6613 iout <<
iINFO <<
"FORCE CONSTANT #2 " << cylindricalBCk2 <<
"\n";
6614 iout <<
iINFO <<
"EXPONENT #2 " << cylindricalBCexp2 <<
"\n";
6615 iout <<
iINFO <<
"LENGTH #2 " << cylindricalBCl2 <<
"\n";
6617 iout <<
iINFO <<
"CYLINDER BOUNDARY CENTER(" << cylindricalCenter.x <<
", " 6618 << cylindricalCenter.y <<
", " << cylindricalCenter.z <<
")\n";
6624 iout <<
iINFO <<
"SPHERICAL BOUNDARY CONDITIONS ACTIVE\n";
6627 << sphericalBCr1 <<
"\n";
6629 << sphericalBCk1 <<
"\n";
6631 << sphericalBCexp1 <<
"\n";
6633 if (sphericalBCr2 > 0)
6636 << sphericalBCr2 <<
"\n";
6638 << sphericalBCk2 <<
"\n";
6640 << sphericalBCexp2 <<
"\n";
6643 iout <<
iINFO <<
"SPHERE BOUNDARY CENTER(" << sphericalCenter.x <<
", " 6644 << sphericalCenter.y <<
", " << sphericalCenter.z <<
")\n";
6650 iout <<
iINFO <<
"ELECTRIC FIELD ACTIVE\n";
6653 << eField.x <<
", " << eField.y
6654 <<
", " << eField.z <<
")\n";
6655 if ( eFieldNormalized )
iout <<
iINFO <<
"E-FIELD VECTOR IS SCALED BY CELL BASIS VECTORS\n";
6656 iout <<
iINFO <<
"E-FIELD FREQUENCY IS (1/ps) " << eFieldFreq <<
"\n";
6657 iout <<
iINFO <<
"E-FIELD PHASE IS (deg) " << eFieldPhase <<
"\n";
6664 iout <<
iINFO <<
"STIRRING TORQUES ACTIVE\n";
6666 iout <<
iINFO <<
"STIR STARTING THETA (deg) "<< stirStartingTheta <<
"\n";
6667 iout <<
iINFO <<
"STIR ANGULAR VELOCITY (deg/ts) " << stirVel <<
"\n";
6668 iout <<
iINFO <<
"STIR FORCE HARMONIC SPRING CONSTANT "<< stirK <<
"\n";
6669 iout <<
iINFO <<
"STIR AXIS OF ROTATION (DIRECTION) (" 6670 << stirAxis.x <<
", " << stirAxis.y
6671 <<
", " << stirAxis.z <<
")\n";
6672 iout <<
iINFO <<
"STIR PIVOT POINT (COORDINATE) (" 6673 << stirPivot.x <<
", " << stirPivot.y
6674 <<
", " << stirPivot.z <<
")\n";
6675 current = config->
find(
"stirFilename");
6677 iout <<
iINFO <<
"STIR ATOMS AND ORIGINAL POSITIONS FROM FILE " <<current ->
data <<
'\n';
6678 current = config->
find(
"stirredAtomsCol");
6679 iout <<
iINFO <<
"STIR FILE COLUMN " << current ->
data <<
'\n';
6685 iout <<
iINFO <<
"DRUDE MODEL DUAL THERMOSTAT IS ACTIVE\n";
6686 iout <<
iINFO <<
"DRUDE BOND TEMPERATURE " << drudeTemp <<
"\n";
6687 if (drudeDamping > 0.0) {
6688 iout <<
iINFO <<
"DRUDE DAMPING COEFFICIENT IS " 6689 << drudeDamping <<
" INVERSE PS\n";
6691 if (drudeHardWallOn) {
6692 iout <<
iINFO <<
"DRUDE HARD WALL RESTRAINT IS ACTIVE FOR DRUDE BONDS\n";
6693 iout <<
iINFO <<
"DRUDE MAXIMUM BOND LENGTH BEFORE RESTRAINT IS " 6694 << drudeBondLen <<
"\n";
6695 }
else if (drudeBondConst > 0.0) {
6696 iout <<
iINFO <<
"DRUDE QUARTIC RESTRAINT IS ACTIVE FOR DRUDE BONDS\n";
6697 iout <<
iINFO <<
"DRUDE MAXIMUM BOND LENGTH BEFORE RESTRAINT IS " 6698 << drudeBondLen <<
"\n";
6699 iout <<
iINFO <<
"DRUDE BOND RESTRAINT CONSTANT IS " 6700 << drudeBondConst <<
"\n";
6702 if (drudeNbtholeCut > 0.0) {
6703 iout <<
iINFO <<
"DRUDE NBTHOLE IS ACTIVE\n";
6704 iout <<
iINFO <<
"DRUDE NBTHOLE RADIUS IS " 6705 << drudeNbtholeCut <<
"\n";
6711 iout <<
iINFO <<
"LANGEVIN DYNAMICS ACTIVE\n";
6712 iout <<
iINFO <<
"LANGEVIN TEMPERATURE " 6713 << langevinTemp <<
"\n";
6714 if (! langevin_useBAOAB)
iout <<
iINFO <<
"LANGEVIN USING BBK INTEGRATOR\n";
6715 else iout <<
iINFO <<
"LANGEVIN USING BAOAB INTEGRATOR\n";
6716 if (langevinDamping > 0.0) {
6717 iout <<
iINFO <<
"LANGEVIN DAMPING COEFFICIENT IS " 6718 << langevinDamping <<
" INVERSE PS\n";
6719 if (langevinHydrogen)
6720 iout <<
iINFO <<
"LANGEVIN DYNAMICS APPLIED TO HYDROGENS\n";
6722 iout <<
iINFO <<
"LANGEVIN DYNAMICS NOT APPLIED TO HYDROGENS\n";
6724 iout <<
iINFO <<
"LANGEVIN DAMPING COEFFICIENTS DETERMINED FROM FILES\n";
6725 current = config->
find(
"langevinFile");
6726 if ( current )
iout <<
iINFO <<
"LANGEVIN DAMPING FILE: " <<
6727 current->
data <<
"\n";
6728 else iout <<
iINFO <<
"LANGEVIN DAMPING FILE IS COORDINATE PDB\n";
6729 current = config->
find(
"langevinCol");
6730 if ( current )
iout <<
iINFO <<
"LANGEVIN DAMPING COLUMN: " <<
6731 current->
data <<
"\n";
6732 else iout <<
iINFO <<
"LANGEVIN DAMPING COLUMN: DEFAULT (4TH, O)\n";
6740 iout <<
iINFO <<
"LOWE-ANDERSEN DYNAMICS ACTIVE\n";
6741 iout <<
iINFO <<
"LOWE-ANDERSEN TEMPERATURE " 6742 << loweAndersenTemp <<
" K\n";
6744 << loweAndersenRate <<
" INVERSE PS\n";
6745 iout <<
iINFO <<
"LOWE-ANDERSEN CUTOFF " 6746 << loweAndersenCutoff <<
" ANGSTROMS\n";
6753 iout <<
iINFO <<
"TEMPERATURE COUPLING ACTIVE\n";
6754 iout <<
iINFO <<
"COUPLING TEMPERATURE " 6755 << tCoupleTemp <<
"\n";
6761 iout <<
iINFO <<
"STOCHASTIC RESCALING ACTIVE\n";
6762 iout <<
iINFO <<
"STOCHASTIC RESCALING TEMPERATURE " 6763 << stochRescaleTemp <<
" K\n";
6764 iout <<
iINFO <<
"STOCHASTIC RESCALING PERIOD " 6765 << stochRescalePeriod <<
" PS\n";
6766 iout <<
iINFO <<
"STOCHASTIC RESCALING WILL OCCUR EVERY " 6767 << stochRescaleFreq <<
" STEPS\n";
6773 iout <<
iINFO <<
"OLD STYLE MINIMIZATION ACTIVE\n";
6779 iout <<
iINFO <<
"CONJUGATE GRADIENT MINIMIZATION ACTIVE\n";
6780 iout <<
iINFO <<
"LINE MINIMIZATION GOAL = " << minLineGoal <<
"\n";
6781 iout <<
iINFO <<
"BABY STEP SIZE = " << minBabyStep <<
"\n";
6782 iout <<
iINFO <<
"TINY STEP SIZE = " << minTinyStep <<
"\n";
6789 << maximumMove <<
"\n";
6793 if (rescaleFreq > 0)
6795 iout <<
iINFO <<
"VELOCITY RESCALE FREQ " 6796 << rescaleFreq <<
"\n";
6797 iout <<
iINFO <<
"VELOCITY RESCALE TEMP " 6798 << rescaleTemp <<
"\n";
6802 if (reassignFreq > 0)
6804 iout <<
iINFO <<
"VELOCITY REASSIGNMENT FREQ " 6805 << reassignFreq <<
"\n";
6806 iout <<
iINFO <<
"VELOCITY REASSIGNMENT TEMP " 6807 << reassignTemp <<
"\n";
6808 if ( reassignIncr != 0. )
6809 iout <<
iINFO <<
"VELOCITY REASSIGNMENT INCR " 6810 << reassignIncr <<
"\n";
6811 if ( reassignHold != 0. )
6812 iout <<
iINFO <<
"VELOCITY REASSIGNMENT HOLD " 6813 << reassignHold <<
"\n";
6817 if ((
int)berendsenPressureOn + (
int)langevinPistonOn + (
int)monteCarloPressureOn + (
int)multigratorOn > 1)
6819 NAMD_die(
"Multiple pressure control algorithms selected!\n");
6822 if (excludeFromPressure) {
6823 iout <<
iINFO <<
"EXCLUDE FROM PRESSURE ACTIVE\n";
6825 if (useConstantArea && useConstantRatio) {
6826 NAMD_die(
"useConstantArea and useConstantRatio are mutually exclusive.\n");
6828 if (useConstantRatio && !useFlexibleCell) {
6829 NAMD_die(
"useConstantRatio requires useFlexibleCell.\n");
6831 if (useConstantArea && surfaceTensionTarget) {
6832 NAMD_die(
"surfaceTensionTarget and useConstantArea are mutually exclusive.\n");
6834 if (useConstantArea && !useFlexibleCell) {
6835 NAMD_die(
"useConstantArea requires useFlexibleCell.\n");
6839 if (!useFlexibleCell) {
6840 if (fixCellDimX || fixCellDimY || fixCellDimZ) {
6841 NAMD_die(
"fixCellDims requires useFlexibleCell.\n");
6844 if(useConstantArea && fixCellDimZ) {
6845 NAMD_die(
"fixCellDimZ can not be used with useConstantArea.\n");
6846 }
else if (useConstantRatio && fixCellDimX) {
6847 NAMD_die(
"fixCellDimX can not be used with useConstantRatio.\n");
6848 }
else if (useConstantRatio && fixCellDimY) {
6849 NAMD_die(
"fixCellDimY can not be used with useConstantRatio.\n");
6853 if (fixCellDimX && fixCellDimY && fixCellDimZ) {
6854 NAMD_die(
"Cell dimension can not be fixed in X, Y, and Z axis, simultaneously.\n");
6858 if (berendsenPressureOn || langevinPistonOn) {
6860 useGroupPressure =
TRUE;
6861 iout <<
iWARN <<
"Option useGroupPressure is being enabled " 6862 <<
"due to pressure control with rigidBonds.\n" <<
endi;
6866 if (monteCarloPressureOn) {
6867 if (!opts.
defined(
"MonteCarloAcceptanceRate")) {
6868 monteCarloAcceptanceRate = 0.5;
6869 }
else if (monteCarloAcceptanceRate > 0.8 || monteCarloAcceptanceRate < 0.2) {
6870 NAMD_die(
"Acceptance rate in Monte Carlo pressure control must be between 0.2 and 0.8!\n");
6873 if ( monteCarloAdjustmentFreq < 10 ) {
6874 iout <<
iWARN <<
"Modifying the frequency of adjusting the maximum volume change.\n" <<
endi;
6875 monteCarloAdjustmentFreq = 30;
6878 if (!opts.
defined(
"MonteCarloMaxVolume")) {
6880 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6881 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6882 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6885 if (0.3 < (monteCarloMaxVolume.x / lattice.volume())) {
6886 iout <<
iWARN <<
"Modifying the maximum volume change for x-axis.\n" <<
endi;
6887 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6889 if (0.3 < (monteCarloMaxVolume.y / lattice.volume())) {
6890 iout <<
iWARN <<
"Modifying the maximum volume change for y-axis.\n" <<
endi;
6891 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6893 if (0.3 < (monteCarloMaxVolume.z / lattice.volume())) {
6894 iout <<
iWARN <<
"Modifying the maximum volume change for z-axis.\n" <<
endi;
6895 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6897 if (monteCarloMaxVolume.x < 1.0) {
6898 iout <<
iWARN <<
"Maximum volume change is negative or too small for x-axis.\n" <<
6899 " Modifying the maximum volume change for x-axis.\n" <<
endi;
6900 monteCarloMaxVolume.x = 0.01 * lattice.volume();
6902 if (monteCarloMaxVolume.y < 1.0) {
6903 iout <<
iWARN <<
"Maximum volume change is negative or too small for y-axis.\n" <<
6904 " Modifying the maximum volume change for y-axis.\n" <<
endi;
6905 monteCarloMaxVolume.y = 0.01 * lattice.volume();
6907 if (monteCarloMaxVolume.z < 1.0) {
6908 iout <<
iWARN <<
"Maximum volume change is negative or too small for z-axis.\n" <<
6909 " Modifying the maximum volume change for z-axis.\n" <<
endi;
6910 monteCarloMaxVolume.z = 0.01 * lattice.volume();
6914 if (!opts.
defined(
"MonteCarloPressureFreq")) {
6915 monteCarloPressureFreq = 50 * nonbondedFrequency;
6916 if ( fullElectFrequency ) {
6917 monteCarloPressureFreq = 50 * fullElectFrequency;
6919 }
else if ((monteCarloPressureFreq % nonbondedFrequency) || ( fullElectFrequency
6920 && (monteCarloPressureFreq % fullElectFrequency) )) {
6921 NAMD_die(
"monteCarloPressureFreq must be a multiple of both fullElectFrequency and nonbondedFrequency\n");
6924 iout <<
iINFO <<
"MONTE CARLO PRESSURE CONTROL ACTIVE\n";
6926 << monteCarloPressureTarget <<
" BAR\n";
6927 iout <<
iINFO <<
" TARGET ACCEPTANCE RATE IS " 6928 << monteCarloAcceptanceRate <<
"\n";
6929 iout <<
iINFO <<
" IMPOSED TEMPERATURE IS " 6930 << monteCarloTemp <<
" K\n";
6931 iout <<
iINFO <<
" MAXIMUM VOLUME CHANGE IS (" 6932 << monteCarloMaxVolume.x <<
", " << monteCarloMaxVolume.y <<
", " 6933 << monteCarloMaxVolume.z <<
") A^3 \n";
6934 iout <<
iINFO <<
" ADJUST MAXIMUM VOLUME CHANGE EVERY " 6935 << monteCarloAdjustmentFreq <<
" TRIALS\n";
6937 << monteCarloPressureFreq <<
" STEPS\n";
6938 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6939 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6944 if (berendsenPressureOn)
6946 if ( ! opts.
defined(
"BerendsenPressureFreq") ) {
6947 berendsenPressureFreq = nonbondedFrequency;
6948 if ( fullElectFrequency )
6949 berendsenPressureFreq = fullElectFrequency;
6951 if ( (berendsenPressureFreq % nonbondedFrequency) || ( fullElectFrequency
6952 && (berendsenPressureFreq % fullElectFrequency) ) ) {
6953 NAMD_die(
"berendsenPressureFreq must be a multiple of both fullElectFrequency and nonbondedFrequency\n");
6955 iout <<
iINFO <<
"BERENDSEN PRESSURE COUPLING ACTIVE\n";
6957 << berendsenPressureTarget <<
" BAR\n";
6958 iout <<
iINFO <<
" COMPRESSIBILITY ESTIMATE IS " 6959 << berendsenPressureCompressibility <<
" BAR^(-1)\n";
6961 << berendsenPressureRelaxationTime <<
" FS\n";
6963 << berendsenPressureFreq <<
" STEPS\n";
6964 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6965 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6971 if (langevinPistonOn)
6973 iout <<
iINFO <<
"LANGEVIN PISTON PRESSURE CONTROL ACTIVE\n";
6975 << langevinPistonTarget <<
" BAR\n";
6976 iout <<
iINFO <<
" OSCILLATION PERIOD IS " 6977 << langevinPistonPeriod <<
" FS\n";
6979 << langevinPistonDecay <<
" FS\n";
6980 iout <<
iINFO <<
" PISTON TEMPERATURE IS " 6981 << langevinPistonTemp <<
" K\n";
6982 iout <<
iINFO <<
" PRESSURE CONTROL IS " 6983 << (useGroupPressure?
"GROUP":
"ATOM") <<
"-BASED\n";
6984 iout <<
iINFO <<
" INITIAL STRAIN RATE IS " 6985 << strainRate <<
"\n";
6990 if (multigratorOn) {
6994 if (berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) {
6995 iout <<
iINFO <<
" CELL FLUCTUATION IS " 6996 << (useFlexibleCell?
"AN":
"") <<
"ISOTROPIC\n";
6997 if (useConstantRatio)
6998 iout <<
iINFO <<
" SHAPE OF CELL IS CONSTRAINED IN X-Y PLANE\n";
6999 if (useConstantArea)
7000 iout <<
iINFO <<
" CONSTANT AREA PRESSURE CONTROL ACTIVE\n";
7003 if (surfaceTensionTarget != 0)
7005 iout <<
iINFO <<
"SURFACE TENSION CONTROL ACTIVE\n";
7006 iout <<
iINFO <<
" TARGET SURFACE TENSION IS " 7007 << surfaceTensionTarget <<
" DYN/CM\n";
7014 if (pressureProfileOn) {
7015 if ((berendsenPressureOn || langevinPistonOn || monteCarloPressureOn) && !dcdUnitCell) {
7017 iout <<
iWARN <<
"Turning on dcdUnitCell so that trajectory files contain unit cell data.\n" <<
endi;
7020 NAMD_die(
"Sorry, pressure profile not implemented for constant pressure.");
7024 if (pressureProfileEwaldOn)
7025 pressureProfileOn = 0;
7027 if (pressureProfileSlabs < 1)
7028 NAMD_die(
"pressureProfileSlabs must be positive.");
7029 iout <<
iINFO <<
"PRESSURE PROFILE CALCULATIONS ACTIVE\n";
7030 iout <<
iINFO <<
" NUMBER OF SLABS: " << pressureProfileSlabs <<
"\n";
7031 iout <<
iINFO <<
" SLAB THICKNESS: " << cellBasisVector3.z / pressureProfileSlabs
7033 iout <<
iINFO <<
" TIMESTEPS BETWEEN DATA OUTPUT: " 7034 << pressureProfileFreq <<
"\n";
7035 iout <<
iINFO <<
" NUMBER OF ATOM TYPES: " << pressureProfileAtomTypes <<
"\n";
7038 pressureProfileEwaldOn = 0;
7039 pressureProfileAtomTypes = 1;
7043 iout <<
iINFO <<
"ACCELERATED MD ACTIVE\n";
7046 accelMDdihe =
FALSE;
7047 iout <<
iINFO <<
"APPLYING DUAL BOOST\n";
7049 else if ( accelMDdihe ) {
7050 iout <<
iINFO <<
"BOOSTING DIHEDRAL POTENTIAL\n";
7052 iout <<
iINFO <<
"BOOSTING TOTAL POTENTIAL\n";
7056 switch(accelMDGiE) {
7058 iout <<
iINFO <<
"accelMDG THRESHOLD ENERGY SET TO LOWER BOUND Vmax\n";
7061 iout <<
iINFO <<
"accelMDG THRESHOLD ENERGY SET TO UPPER BOUND Vmin+(Vmax-Vmin)/k0\n";
7065 iout <<
iINFO <<
"accelMDG USING RESTART FILE " << accelMDGRestartFile <<
"\n";
7066 if(accelMDGresetVaftercmd)
7067 iout <<
iINFO <<
"accelMDG WILL RESET STATISTICS AFTER FIRST CMD STEPS\n";
7069 iout <<
iINFO <<
"accelMDG " << accelMDGcMDSteps <<
" CONVENTIONAL MD STEPS " 7070 <<
"(WITH " << accelMDGcMDPrepSteps <<
" PREPARATION STEPS)\n";
7071 if(accelMDGcMDSteps == 0)
7072 iout <<
iINFO <<
"(accelMDGcMDPrepSteps is set to zero automatically)\n";
7074 iout <<
iINFO <<
"accelMDG " << accelMDGEquiSteps <<
" EQUILIBRATION STEPS " 7075 <<
"(WITH " << accelMDGEquiPrepSteps <<
" PREPARATION STEPS)\n";
7076 if(accelMDGEquiSteps == 0)
7077 iout <<
iINFO <<
"(accelMDGEquiPrepSteps is set to zero automatically)\n";
7079 if(accelMDGStatWindow > 0)
7080 iout <<
iINFO <<
"accelMDG WILL RESET AVERAGE AND STANDARD DEVIATION EVERY " << accelMDGEquiSteps <<
" STEPS\n";
7082 iout <<
iINFO <<
"accelMDG WILL NOT RESET AVERAGE AND STANDARD DEVIATION\n";
7085 iout <<
iINFO <<
"accelMDGSigma0D: " << accelMDGSigma0D <<
" KCAL/MOL\n";
7086 else if(accelMDdual)
7087 iout <<
iINFO <<
"accelMDGSigma0P: " << accelMDGSigma0P <<
" KCAL/MOL, " 7088 <<
"accelMDGSigma0D: " << accelMDGSigma0D <<
" KCAL/MOL\n";
7090 iout <<
iINFO <<
"accelMDGSigma0P: " << accelMDGSigma0P <<
" KCAL/MOL\n";
7093 iout <<
iINFO <<
"accelMDE: " << accelMDE <<
" KCAL/MOL, accelMDalpha: " << accelMDalpha <<
" KCAL/MOL\n";
7095 iout <<
iINFO <<
"accelMDTE: " << accelMDTE <<
" KCAL/MOL, " 7096 <<
"accelMDTalpha: " << accelMDTalpha <<
" KCAL/MOL\n";
7099 if ( accelMDLastStep > 0) {
7100 iout <<
iINFO <<
"accelMD WILL BE DONE FROM STEP " << accelMDFirstStep <<
" TO STEP " << accelMDLastStep <<
"\n";
7102 iout <<
iINFO <<
"accelMD WILL BE DONE FROM STEP " << accelMDFirstStep <<
" TO THE END OF THE SIMULATION \n";
7104 iout <<
iINFO <<
"accelMD OUTPUT FREQUENCY " << accelMDOutFreq <<
"\n";
7109 iout <<
iINFO <<
"ADAPTIVE TEMPERING ACTIVE:\n";
7110 iout <<
iINFO <<
" OUTPUT FREQUENCY: " << adaptTempOutFreq <<
"\n";
7111 iout <<
iINFO <<
" TEMPERATURE UPDATE FREQUENCY: " << adaptTempFreq <<
"\n";
7112 if ( adaptTempLastStep > 0 )
7113 iout <<
iINFO <<
" ADAPTIVE TEMPERING WILL BE DONE FROM STEP " << adaptTempFirstStep <<
" TO " << adaptTempLastStep <<
"\n";
7115 iout <<
iINFO <<
" ADAPTIVE TEMPERING WILL BE DONE FROM STEP " << adaptTempFirstStep <<
"\n";
7116 if ( adaptTempLangevin )
7117 iout <<
iINFO <<
" ADAPTIVE TEMPERING COUPLED TO LANGEVIN THERMOSTAT\n";
7118 if ( adaptTempRescale )
7119 iout <<
iINFO <<
" ADAPTIVE TEMPERING COUPLED TO VELOCITY RESCALING\n";
7120 if (adaptTempRestartFreq > 0) {
7121 iout <<
iINFO <<
" WRITING RESTART INFORMATION TO " << adaptTempRestartFile <<
" EVERY " << adaptTempRestartFreq <<
" STEPS\n";
7130 << fmaTheta <<
"\n";
7135 FFTWWisdomString = 0;
7138 iout <<
iINFO <<
"PARTICLE MESH EWALD (PME) ACTIVE\n";
7140 << PMETolerance <<
"\n";
7141 iout <<
iINFO <<
"PME EWALD COEFFICIENT " 7142 << PMEEwaldCoefficient <<
"\n";
7143 iout <<
iINFO <<
"PME INTERPOLATION ORDER " 7144 << PMEInterpOrder <<
"\n";
7146 << PMEGridSizeX <<
" " 7147 << PMEGridSizeY <<
" " 7148 << PMEGridSizeZ <<
"\n";
7149 iout <<
iINFO <<
"PME MAXIMUM GRID SPACING " 7150 << PMEGridSpacing <<
"\n";
7152 iout <<
iINFO <<
"PME BARRIER ENABLED\n";
7155 iout <<
iINFO <<
"PME RECIPROCAL SUM OFFLOADED TO GPU\n";
7158 if ( useDPME )
iout <<
iINFO <<
"USING OLD DPME CODE\n";
7159 #if defined(NAMD_CUDA) || defined(NAMD_HIP) 7160 else if ( usePMECUDA ) {
7161 iout <<
iINFO <<
"PME CALCULATION WILL BE PERFORMED ON GPU" <<
"\n" 7166 else if ( FFTWUseWisdom ) {
7168 iout <<
iINFO <<
"Attempting to read FFTW data from system" <<
"\n" <<
endi;
7169 fftwf_import_system_wisdom();
7171 if (! opts.
defined(
"FFTWWisdomFile")) {
7172 strcpy(FFTWWisdomFile,
"FFTW_NAMD_");
7173 strcat(FFTWWisdomFile,NAMD_VERSION);
7174 strcat(FFTWWisdomFile,
"_");
7175 strcat(FFTWWisdomFile,NAMD_PLATFORM);
7177 strcat(FFTWWisdomFile,
"_FFTW3");
7179 strcat(FFTWWisdomFile,
".txt");
7182 iout <<
iINFO <<
"Attempting to read FFTW data from " 7183 << FFTWWisdomFile <<
"\n" <<
endi;
7184 FILE *wisdom_file = fopen(FFTWWisdomFile,
"r");
7185 if ( wisdom_file ) {
7187 fftwf_import_wisdom_from_file(wisdom_file);
7189 fftw_import_wisdom_from_file(wisdom_file);
7191 fclose(wisdom_file);
7196 int minslices = PMEMinSlices;
7197 int dimx = PMEGridSizeX;
7198 int nrpx = ( dimx + minslices - 1 ) / minslices;
7199 if ( nrpx > nrp ) nrp = nrpx;
7200 int dimy = PMEGridSizeY;
7201 int nrpy = ( dimy + minslices - 1 ) / minslices;
7202 if ( nrpy > nrp ) nrp = nrpy;
7205 int nrpp = CkNumPes();
7207 if ( nrpp < nrp ) nrp = nrpp;
7210 int nrps = PMEProcessors;
7211 if ( nrps > CkNumPes() ) nrps = CkNumPes();
7212 if ( nrps > 0 ) nrp = nrps;
7215 int bx = ( dimx + nrp - 1 ) / nrp;
7216 int nrpbx = ( dimx + bx - 1 ) / bx;
7217 int by = ( dimy + nrp - 1 ) / nrp;
7218 int nrpby = ( dimy + by - 1 ) / by;
7219 nrp = ( nrpby > nrpbx ? nrpby : nrpbx );
7220 if ( bx != ( dimx + nrp - 1 ) / nrp )
7221 NAMD_bug(
"Error in selecting number of PME processors.");
7222 if ( by != ( dimy + nrp - 1 ) / nrp )
7223 NAMD_bug(
"Error in selecting number of PME processors.");
7228 int block2 = (PMEGridSizeY + nrp - 1) / nrp;
7229 int block2_min = PMEGridSizeY % block2;
7230 if ( ! block2_min ) block2_min = block2;
7231 int dim3 = 2 * (PMEGridSizeZ/2 + 1);
7233 int n[3]; n[0] = PMEGridSizeX; n[1] = PMEGridSizeY; n[2] = PMEGridSizeZ;
7234 fftw_complex *work =
new fftw_complex[n[0]];
7235 float *grid1 = (
float *)
fftwf_malloc(
sizeof(
float) *n[1]*dim3);
7236 float *grid2 = (
float *)
fftwf_malloc(
sizeof(
float) *n[0]*block2*dim3*2);
7239 int fftwFlags = FFTWPatient ? FFTW_PATIENT : FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE ;
7240 int planLineSizes[1];
7241 planLineSizes[0]=n[2];
7244 int sizeLines=nx*ny;
7247 int xStride=block2 * dim3 / 2;
7249 fftwf_plan_many_dft_r2c(1, planLineSizes, sizeLines,
7250 (
float *) grid2, NULL, 1,
7252 (fftwf_complex *) grid2,
7259 fftwf_plan_many_dft_c2r(1, planLineSizes, sizeLines,
7260 (fftwf_complex *) grid2,
7263 (
float *) grid2, NULL, 1,
7268 planLineSizes[0]=block2;
7269 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7270 (fftwf_complex *) grid2, NULL,
7272 (fftwf_complex *) grid2, NULL,
7277 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7278 (fftwf_complex *) grid2, NULL,
7280 (fftwf_complex *) grid2, NULL,
7286 planLineSizes[0]=n[0];
7287 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7288 (fftwf_complex *) grid2, NULL,
7290 (fftwf_complex *) grid2, NULL,
7295 fftwf_destroy_plan(fftwf_plan_many_dft(1, planLineSizes, sizeLines,
7296 (fftwf_complex *) grid2, NULL,
7298 (fftwf_complex *) grid2, NULL,
7304 rfftwnd_destroy_plan( rfftwnd_create_plan_specific(
7305 2, n+1, FFTW_REAL_TO_COMPLEX,
7306 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7307 | FFTW_IN_PLACE | FFTW_USE_WISDOM, grid1, 1, 0, 0) );
7309 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_REAL_TO_COMPLEX,
7310 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7311 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7312 block2*dim3/2, work, 1) );
7314 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_REAL_TO_COMPLEX,
7315 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7316 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7317 block2_min*dim3/2, work, 1) );
7319 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_COMPLEX_TO_REAL,
7320 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7321 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7322 block2*dim3/2, work, 1) );
7324 fftw_destroy_plan( fftw_create_plan_specific(n[0], FFTW_COMPLEX_TO_REAL,
7325 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7326 | FFTW_IN_PLACE | FFTW_USE_WISDOM, (fftw_complex *) grid2,
7327 block2_min*dim3/2, work, 1) );
7329 rfftwnd_destroy_plan( rfftwnd_create_plan_specific(
7330 2, n+1, FFTW_COMPLEX_TO_REAL,
7331 ( FFTWEstimate ? FFTW_ESTIMATE : FFTW_MEASURE )
7332 | FFTW_IN_PLACE | FFTW_USE_WISDOM, grid1, 1, 0, 0) );
7340 FFTWWisdomString = fftwf_export_wisdom_to_string();
7342 FFTWWisdomString = fftw_export_wisdom_to_string();
7345 if ( FFTWWisdomString && (CmiNumPartitions() == 1) ) {
7346 iout <<
iINFO <<
"Writing FFTW data to " 7347 << FFTWWisdomFile <<
"\n" <<
endi;
7348 wisdom_file = fopen(FFTWWisdomFile,
"w");
7349 if ( wisdom_file ) {
7351 fftwf_export_wisdom_to_file(wisdom_file);
7353 fftw_export_wisdom_to_file(wisdom_file);
7355 fclose(wisdom_file);
7367 if (switchingActive || vdwForceSwitching) {
7368 if (LJPMESerialOn) {
7369 NAMD_die(
"The serial version of LJ-PME does not support LJ switching functions.");
7371 iout <<
iWARN <<
"LJ switching function is not intended for use with LJ-PME\n";
7375 NAMD_die(
"Cannot use LJ-PME with LJ tail corrections. Select only one.");
7378 NAMD_die(
"Sorry, alchemical transformation is not supported with LJ-PME.");
7380 #ifdef OPENATOM_VERSION 7382 NAMD_die(
"Sorry, open-atom simulation is not supported with LJ-PME.");
7386 #ifdef MEM_OPT_VERSION 7387 NAMD_die(
"Sorry, memory-optimized version of NAMD does not support LJ-PME.");
7389 if(LJPMESerialOn && (fullElectFrequency > 1 || nonbondedFrequency > 1 || fullDispersionFrequency > 1)) {
7390 NAMD_die(
"The serial version of LJ-PME does not support multiple time stepping.");
7392 if (fullDispersionFrequency != fullElectFrequency) {
7393 if ( ! config->
find(
"fullDispersionFrequency") ) {
7394 iout <<
iWARN <<
"Setting fullDispersionFrequency to match fullElectFrequency\n";
7395 fullDispersionFrequency = fullElectFrequency;
7398 NAMD_die(
"For LJ-PME, fullDispersionFrequency must equal fullElectFrequency.");
7402 iout <<
iINFO <<
"LJ PARTICLE MESH EWALD (LJ-PME) ACTIVE\n";
7404 << LJPMETolerance <<
"\n";
7405 iout <<
iINFO <<
"LJ-PME EWALD COEFFICIENT " 7406 << LJPMEEwaldCoefficient <<
"\n";
7407 iout <<
iINFO <<
"LJ-PME INTERPOLATION ORDER " 7408 << LJPMEInterpOrder <<
"\n";
7409 iout <<
iINFO <<
"LJ-PME GRID DIMENSIONS " 7410 << LJPMEGridSizeX <<
" " 7411 << LJPMEGridSizeY <<
" " 7412 << LJPMEGridSizeZ <<
"\n";
7413 iout <<
iINFO <<
"LJ-PME MAXIMUM GRID SPACING " 7414 << LJPMEGridSpacing <<
"\n";
7415 iout <<
iINFO <<
"FULL LJ DISPERSION EVALUATION FREQUENCY " 7416 << fullDispersionFrequency <<
"\n";
7421 iout <<
iINFO <<
"DIRECT FULL ELECTROSTATIC CALCULATIONS ACTIVE\n";
7429 enum { LO=0, MEDLO, MED, MEDHI, HI };
7432 enum { CUBIC=0, QUINTIC, QUINTIC2,
7433 SEPTIC, SEPTIC3, NONIC, NONIC4, C1HERMITE, NUM_APPROX };
7436 enum { TAYLOR2=0, TAYLOR3, TAYLOR4,
7437 TAYLOR5, TAYLOR6, TAYLOR7, TAYLOR8, NUM_SPLIT };
7439 if (MSMApprox || MSMSplit) {
7440 if (MSMApprox < 0 || MSMApprox >= NUM_APPROX) {
7441 NAMD_die(
"MSM: unknown approximation requested (MSMApprox)");
7443 if (MSMSplit < 0 || MSMSplit >= NUM_SPLIT) {
7444 NAMD_die(
"MSM: unknown splitting requested (MSMSplit)");
7448 switch (MSMQuality) {
7454 MSMApprox = C1HERMITE;
7458 MSMApprox = QUINTIC;
7470 NAMD_die(
"MSM: unknown quality requested (MSMQuality)");
7475 <<
"MULTILEVEL SUMMATION METHOD (MSM) FOR ELECTROSTATICS ACTIVE\n";
7478 <<
"PERFORMING SERIAL MSM CALCULATION FOR LONG-RANGE PART\n";
7480 const char *approx_str, *split_str;
7481 switch (MSMApprox) {
7482 case CUBIC: approx_str =
"C1 CUBIC";
break;
7483 case QUINTIC: approx_str =
"C1 QUINTIC";
break;
7484 case QUINTIC2: approx_str =
"C2 QUINTIC";
break;
7485 case SEPTIC: approx_str =
"C1 SEPTIC";
break;
7486 case SEPTIC3: approx_str =
"C3 SEPTIC";
break;
7487 case NONIC: approx_str =
"C1 NONIC";
break;
7488 case NONIC4: approx_str =
"C4 NONIC";
break;
7489 case C1HERMITE:approx_str =
"C1 HERMITE";
break;
7490 default: approx_str =
"UNKNOWN";
break;
7493 case TAYLOR2: split_str =
"C2 TAYLOR";
break;
7494 case TAYLOR3: split_str =
"C3 TAYLOR";
break;
7495 case TAYLOR4: split_str =
"C4 TAYLOR";
break;
7496 case TAYLOR5: split_str =
"C5 TAYLOR";
break;
7497 case TAYLOR6: split_str =
"C6 TAYLOR";
break;
7498 case TAYLOR7: split_str =
"C7 TAYLOR";
break;
7499 case TAYLOR8: split_str =
"C8 TAYLOR";
break;
7500 default: split_str =
"UNKNOWN";
break;
7503 <<
"MSM WITH " << approx_str <<
" INTERPOLATION " 7504 <<
"AND " << split_str <<
" SPLITTING\n" 7511 iout <<
iINFO <<
"FAST MULTIPOLE METHOD (FMM) FOR ELECTROSTATICS ACTIVE\n";
7512 iout <<
iINFO <<
"PERFORMING SERIAL FMM CALCULATION\n";
7513 iout <<
iINFO <<
"FMM LEVELS = " << FMMLevels <<
"\n";
7514 iout <<
iINFO <<
"FMM PADDING = " << FMMPadding <<
" ANGSTROMS\n";
7517 NAMD_die(
"Must link to FMM library to use FMM\n");
7521 if ( FMAOn || PMEOn || MSMOn || fullDirectOn || GBISOn || FMMOn )
7523 iout <<
iINFO <<
"FULL ELECTROSTATIC EVALUATION FREQUENCY " 7524 << fullElectFrequency <<
"\n";
7527 if ( ( computeEnergies % fullElectFrequency ) &&
7528 ( fullElectFrequency % computeEnergies ) )
7529 NAMD_die(
"Either computeEnergies must be a multiple of fullElectFrequency or vice versa.\n");
7533 if ( ( outputEnergies % fullDispersionFrequency ) &&
7534 ( fullDispersionFrequency % outputEnergies ) ) {
7535 NAMD_die(
"Either outputEnergies must be a multiple of fullDispersionFrequency or vice versa.\n");
7539 if (MTSAlgorithm ==
NAIVE)
7541 iout <<
iINFO <<
"USING NAIVE (CONSTANT FORCE) MTS SCHEME.\n" <<
endi;
7545 iout <<
iINFO <<
"USING VERLET I (r-RESPA) MTS SCHEME.\n" <<
endi;
7548 if (longSplitting ==
SHARP)
7549 iout <<
iINFO <<
"SHARP SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7550 else if (longSplitting ==
XPLOR)
7551 iout <<
iINFO <<
"XPLOR SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7552 else if (longSplitting ==
C1)
7553 iout <<
iINFO <<
"C1 SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7554 else if (longSplitting ==
C2)
7555 iout <<
iINFO <<
"C2 SPLITTING OF LONG RANGE ELECTROSTATICS\n";
7558 iout <<
iINFO <<
"PLACING ATOMS IN PATCHES BY POSITION\n";
7560 iout <<
iINFO <<
"PLACING ATOMS IN PATCHES BY HYDROGEN GROUPS\n";
7566 iout <<
iINFO <<
"SLOW FORCE MOLLIFICATION : \n";
7567 iout <<
iINFO <<
" ERROR TOLERANCE : " << mollyTol <<
"\n";
7568 iout <<
iINFO <<
" MAX ITERATIONS : " << mollyIter <<
"\n";
7574 iout <<
iINFO <<
"RIGID BONDS TO HYDROGEN : ";
7577 iout <<
iINFO <<
" ERROR TOLERANCE : " << rigidTol <<
"\n";
7578 iout <<
iINFO <<
" MAX ITERATIONS : " << rigidIter <<
"\n";
7579 if (useSettle)
iout <<
iINFO <<
"RIGID WATER USING SETTLE ALGORITHM\n";
7584 if (nonbondedFrequency != 1)
7586 iout <<
iINFO <<
"NONBONDED FORCES EVALUATED EVERY " << nonbondedFrequency <<
" STEPS\n";
7590 << randomSeed <<
"\n";
7594 iout <<
iINFO <<
"USE HYDROGEN BONDS? ";
7598 iout <<
iINFO <<
"USE ANTECEDENT ATOMS? ";
7599 iout << (useAntecedent ?
"YES" :
"NO");
7600 iout <<
"\nHB DIST CUT, ON, OFF ";
7601 iout << daCutoffDist <<
" , " << daOnDist <<
" , " << daOffDist;
7602 iout <<
"\nHB ANGLE CUT, ON, OFF ";
7603 iout << dhaCutoffAngle <<
" , " << dhaOnAngle <<
" , ";
7604 iout << dhaOffAngle;
7605 iout <<
"\nHB ATT, REP exponents ";
7606 iout << distAttExp <<
" , " << distRepExp;
7607 iout <<
"\nHB AA, HA exponents ";
7608 iout << aaAngleExp <<
" , " << haAngleExp;
7619 {
iout <<
iINFO <<
"Using AMBER format force field!\n";
7620 current = config->
find(
"parmfile");
7621 iout <<
iINFO <<
"AMBER PARM FILE " << current->
data <<
'\n';
7622 if (opts.
defined(
"coordinates"))
7623 { current = config->
find(
"coordinates");
7624 iout <<
iINFO <<
"COORDINATE PDB " << current->
data <<
'\n';
7627 { current = config->
find(
"ambercoor");
7628 iout <<
iINFO <<
"AMBER COORDINATE FILE " << current->
data <<
'\n';
7631 iout <<
iINFO <<
"Exclusions will be read from PARM file!\n";
7633 iout <<
iINFO <<
"Exclusions in PARM file will be ignored!\n";
7634 iout <<
iINFO <<
"SCNB (VDW SCALING) " << vdwscale14 <<
"\n" <<
endi;
7638 iout <<
iINFO <<
"Using GROMACS format force field!\n";
7640 current = config->
find(
"grotopfile");
7642 if (current == NULL)
7643 NAMD_die(
"no GROMACS topology file defined!?");
7644 iout <<
iINFO <<
"GROMACS TOPO FILE " << current->
data <<
'\n';
7647 current = config->
find(
"grocoorfile");
7648 if (current == NULL) {
7649 current = config->
find(
"coordinates");
7650 if (current == NULL) {
7651 NAMD_die(
"no coordinate file defined!?");
7654 iout <<
iINFO <<
"GROMACS COOR FILE " << current->
data <<
'\n' 7659 if ( !usePluginIO ) {
7660 if ( current = config->
find(
"coordinates") )
7664 current = config->
find(
"structure");
7671 iout <<
iINFO <<
"COSANGLES ON. SOME ANGLES WILL BE COSINE-BASED\n" <<
endi;
7675 if (paraTypeXplorOn)
7677 iout <<
iINFO <<
"PARAMETER file: XPLOR format! (default) \n" <<
endi;
7679 else if (paraTypeCharmmOn)
7681 iout <<
iINFO <<
"PARAMETER file: CHARMM format! \n" <<
endi;
7685 current = config->
find(
"parameters");
7687 while (current != NULL)
7691 current = current->
next;
7696 ( vdwGeometricSigma ?
"GEOMETRIC" :
"ARITHMETIC" ) <<
7697 " MEAN TO COMBINE L-J SIGMA PARAMETERS\n" <<
endi;
7699 if (opts.
defined(
"bincoordinates"))
7701 current = config->
find(
"bincoordinates");
7704 << current->
data <<
"\n";
7707 #ifdef NAMD_AVXTILES 7708 iout <<
iINFO <<
"MIXED PRECISION AVX-512 TILES OPTIMIZATIONS: ";
7709 if (useAVXTiles)
iout <<
"ENABLED\n";
7710 else iout <<
"DISABLED\n";
7713 #ifdef MEM_OPT_VERSION 7714 if (opts.
defined(
"binrefcoords"))
7716 current = config->
find(
"binrefcoords");
7719 << current->
data <<
"\n";
7726 << firstTimestep <<
"\n" <<
endi;
7738 void SimParameters::parse_mgrid_params(
ConfigList *config)
7742 mgridforcelist.clear();
7743 char *key =
new char[81];
7744 char *valstr =
new char[256];
7747 mgridforceOn =
TRUE;
7750 mgfp = mgridforcelist.find_key(default_key);
7752 iout <<
iINFO <<
"MGRIDFORCEPOTFILE key " 7753 << key <<
" redefined for file " << valstr <<
"\n" <<
endi;
7755 mgfp = mgridforcelist.add(default_key);
7760 parse_mgrid_string_param(config,
"gridforcefile",&(mgfp->
gridforceFile));
7761 parse_mgrid_string_param(config,
"gridforcecol",&(mgfp->
gridforceCol));
7762 parse_mgrid_string_param(config,
"gridforcechargecol",&(mgfp->
gridforceQcol));
7763 parse_mgrid_string_param(config,
"gridforcepotfile",&(mgfp->
gridforceVfile));
7774 current = config->
find(
"mgridforcepotfile");
7775 while (current != NULL) {
7776 int curlen = strlen(current->
data);
7779 sscanf(current->
data,
"%80s%255s",key,valstr);
7782 mgfp = mgridforcelist.find_key(key);
7783 if ( mgfp != NULL) {
7784 iout <<
iINFO <<
"MGRIDFORCEPOTFILE key " 7785 << key <<
" redefined for file " << valstr <<
"\n" <<
endi;
7787 mgfp = mgridforcelist.add(key);
7789 int fnamelen = strlen(valstr);
7799 current = current->
next;
7802 current = config->
find(
"mgridforcefile");
7803 while (current != NULL) {
7804 int curlen = strlen(current->
data);
7807 sscanf(current->
data,
"%80s%255s",key,valstr);
7810 mgfp = mgridforcelist.find_key(key);
7811 if ( mgfp == NULL) {
7812 iout <<
iINFO <<
"MGRIDFORCEFILE no key " 7813 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7815 int fnamelen = strlen(valstr);
7823 current = current->
next;
7826 current = config->
find(
"mgridforcevolts");
7827 while (current != NULL) {
7830 int curlen = strlen(current->
data);
7831 sscanf(current->
data,
"%80s%255s",key,valstr);
7834 mgfp = mgridforcelist.find_key(key);
7835 if ( mgfp == NULL) {
7836 iout <<
iINFO <<
"MGRIDFORCEVOLTS no key " 7837 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7840 if (boolval == -1) {
7842 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7848 current = current->
next;
7851 current = config->
find(
"mgridforcescale");
7852 while (current != NULL) {
7855 int curlen = strlen(current->
data);
7857 sscanf(current->
data,
"%80s%n",key,&nread);
7858 char *val = current->
data + nread + 1;
7861 mgfp = mgridforcelist.find_key(key);
7862 if ( mgfp == NULL) {
7863 iout <<
iINFO <<
"MGRIDFORCESCALE no key " 7864 << key <<
" defined for vector " << val <<
"\n" <<
endi;
7869 current = current->
next;
7872 current = config->
find(
"mgridforcevoff");
7873 while (current != NULL) {
7876 int curlen = strlen(current->
data);
7878 sscanf(current->
data,
"%80s%n",key,&nread);
7879 char *val = current->
data + nread + 1;
7882 mgfp = mgridforcelist.find_key(key);
7883 if ( mgfp == NULL) {
7884 iout <<
iINFO <<
"MGRIDFORCEVOFF no key " 7885 << key <<
" defined for vector " << val <<
"\n" <<
endi;
7890 current = current->
next;
7893 current = config->
find(
"mgridforcecol");
7894 while (current != NULL) {
7897 int curlen = strlen(current->
data);
7898 sscanf(current->
data,
"%80s%255s",key,valstr);
7901 mgfp = mgridforcelist.find_key(key);
7902 if ( mgfp == NULL) {
7903 iout <<
iINFO <<
"MGRIDFORCECOL no key " 7904 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7906 int collen = strlen(valstr);
7914 current = current->
next;
7917 current = config->
find(
"mgridforcechargecol");
7918 while (current != NULL) {
7921 int curlen = strlen(current->
data);
7922 sscanf(current->
data,
"%80s%255s",key,valstr);
7925 mgfp = mgridforcelist.find_key(key);
7926 if ( mgfp == NULL) {
7927 iout <<
iINFO <<
"MGRIDFORCECHARGECOL no key " 7928 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7930 int collen = strlen(valstr);
7938 current = current->
next;
7941 current = config->
find(
"mgridforcecont1");
7942 while (current != NULL) {
7945 int curlen = strlen(current->
data);
7946 sscanf(current->
data,
"%80s%255s",key,valstr);
7949 mgfp = mgridforcelist.find_key(key);
7950 if ( mgfp == NULL) {
7951 iout <<
iINFO <<
"MGRIDFORCECONT1 no key " 7952 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7955 if (boolval == -1) {
7957 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7963 current = current->
next;
7966 current = config->
find(
"mgridforcecont2");
7967 while (current != NULL) {
7970 int curlen = strlen(current->
data);
7971 sscanf(current->
data,
"%80s%255s",key,valstr);
7974 mgfp = mgridforcelist.find_key(key);
7975 if ( mgfp == NULL) {
7976 iout <<
iINFO <<
"MGRIDFORCECONT2 no key " 7977 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
7980 if (boolval == -1) {
7982 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
7988 current = current->
next;
7990 current = config->
find(
"mgridforcecont3");
7991 while (current != NULL) {
7994 int curlen = strlen(current->
data);
7995 sscanf(current->
data,
"%80s%255s",key,valstr);
7998 mgfp = mgridforcelist.find_key(key);
7999 if ( mgfp == NULL) {
8000 iout <<
iINFO <<
"MGRIDFORCECONT3 no key " 8001 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
8005 if (boolval == -1) {
8007 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
8013 current = current->
next;
8017 current = config->
find(
"mgridforcechecksize");
8018 while (current != NULL) {
8021 int curlen = strlen(current->
data);
8022 sscanf(current->
data,
"%80s%255s",key,valstr);
8025 mgfp = mgridforcelist.find_key(key);
8026 if ( mgfp == NULL) {
8027 iout <<
iINFO <<
"MGRIDFORCECHECKSIZE no key " 8028 << key <<
" defined for file " << valstr <<
"\n" <<
endi;
8031 if (boolval == -1) {
8032 iout <<
iINFO <<
"MGRIDFORCECHECKSIZE key " 8033 << key <<
" boolval " << valstr <<
" badly defined" <<
endi;
8039 current = current->
next;
8049 while (params != NULL) {
8052 sprintf(errmsg,
"Value undefined for gridforceFile for key %s\n",
8058 sprintf(errmsg,
"Value undefined for gridforceCol for key %s\n",
8062 params = params->
next;
8067 void SimParameters::parse_mgrid_string_param(
ConfigList *cl,
8068 const char *fieldname,
8074 if (vallist != NULL) {
8075 val = vallist->
data;
8088 *dest =
new char[len+1];
8089 strncpy(*dest,val,len+1);
8096 void SimParameters::parse_group_restraints_params(
ConfigList *config)
8103 if (groupRestraintsOn) {
8105 arguments = config->
find(
"group1File");
8106 for ( ; arguments != NULL; arguments = arguments->
next) {
8107 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8108 groupRestraints.SetGroup1AtomFileIndices(key, strValue);
8110 sprintf(err_msg,
"For group1File, expected a tag and file name, but recieved: %s\n", arguments->
data);
8115 arguments = config->
find(
"group1List");
8116 for ( ; arguments != NULL; arguments = arguments->
next) {
8118 sscanf(arguments->
data,
"%127s%n", key, &nread);
8119 char *val = arguments->
data + nread + 1;
8120 groupRestraints.SetGroup1AtomListIndices(key, val);
8123 arguments = config->
find(
"group1RefPos");
8124 for ( ; arguments != NULL; arguments = arguments->
next) {
8126 sscanf(arguments->
data,
"%127s%n", key, &nread);
8127 char *val = arguments->
data + nread + 1;
8128 groupRestraints.SetGroup1RefPosition(key, val);
8131 arguments = config->
find(
"group2File");
8132 for ( ; arguments != NULL; arguments = arguments->
next) {
8133 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8134 groupRestraints.SetGroup2AtomFileIndices(key, strValue);
8136 sprintf(err_msg,
"For group2File, expected a tag and file name, but recieved: %s\n", arguments->
data);
8141 arguments = config->
find(
"group2List");
8142 for ( ; arguments != NULL; arguments = arguments->
next) {
8144 sscanf(arguments->
data,
"%127s%n", key, &nread);
8145 char *val = arguments->
data + nread + 1;
8146 groupRestraints.SetGroup2AtomListIndices(key, val);
8149 arguments = config->
find(
"groupResK");
8150 for ( ; arguments != NULL; arguments = arguments->
next) {
8152 if (sscanf(arguments->
data,
"%127s%lf", key, &kForce) == 2) {
8153 groupRestraints.SetForce(key, kForce);
8155 sprintf(err_msg,
"For groupResK, expected a tag and force value, but recieved: %s\n", arguments->
data);
8160 arguments = config->
find(
"groupResExp");
8161 for ( ; arguments != NULL; arguments = arguments->
next) {
8163 if (sscanf(arguments->
data,
"%127s%d", key, &exponent) == 2) {
8164 groupRestraints.SetExponent(key, exponent);
8166 sprintf(err_msg,
"For groupResExp, expected a tag and exponent but recieved: %s\n", arguments->
data);
8171 arguments = config->
find(
"groupResCenter");
8172 for ( ; arguments != NULL; arguments = arguments->
next) {
8174 sscanf(arguments->
data,
"%127s%n", key, &nread);
8175 char *val = arguments->
data + nread + 1;
8176 groupRestraints.SetResCenter(key, val);
8179 arguments = config->
find(
"groupResX");
8180 for ( ; arguments != NULL; arguments = arguments->
next) {
8181 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8182 groupRestraints.SetResDirectionX(key, strValue);
8184 sprintf(err_msg,
"For groupResX, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8189 arguments = config->
find(
"groupResY");
8190 for ( ; arguments != NULL; arguments = arguments->
next) {
8191 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8192 groupRestraints.SetResDirectionY(key, strValue);
8194 sprintf(err_msg,
"For groupResY, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8199 arguments = config->
find(
"groupResZ");
8200 for ( ; arguments != NULL; arguments = arguments->
next) {
8201 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8202 groupRestraints.SetResDirectionZ(key, strValue);
8204 sprintf(err_msg,
"For groupResZ, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8209 arguments = config->
find(
"groupResUseMagnitude");
8210 for ( ; arguments != NULL; arguments = arguments->
next) {
8211 if (sscanf(arguments->
data,
"%127s%511s", key, strValue) == 2) {
8212 groupRestraints.SetUseDistMagnitude(key, strValue);
8214 sprintf(err_msg,
"For groupResUseMagnitude, expected a tag and status (true/false), but recieved: %s\n", arguments->
data);
8218 auto grps = groupRestraints.GetGroupResMap();
8219 groupRestraintsCount = grps.size();
8226 void SimParameters::create_output_directories(
const char *dirname){
8231 int baselen = strlen(outputFilename);
8232 char *filename =
new char[baselen+32];
8233 memset(filename, 0, baselen+32);
8234 strcpy(filename, outputFilename);
8235 if(access(filename, F_OK)!=0) {
8236 int ret =
MKDIR(filename);
8239 sprintf(errmsg,
"Error in creating top-level directory %s!", filename);
8246 strcat(filename, dirname);
8248 if(access(filename, F_OK)!=0) {
8249 int ret =
MKDIR(filename);
8252 sprintf(errmsg,
"Error in creating middle-level directory %s!", filename);
8259 for(
int i=0; i<numoutputprocs; i++) {
8260 memset(tmpstr, 0, 256);
8261 sprintf(tmpstr,
"%s%s%d", filename,
PATHSEPSTR, i);
8262 if(access(tmpstr, F_OK)!=0) {
8263 int ret =
MKDIR(tmpstr);
8266 sprintf(errmsg,
"Error in creating last-level directory %s!", tmpstr);
8279 #define BoolToString(b) ((b) ? "TRUE" : "FALSE") 8281 void SimParameters::print_mgrid_params()
8285 while (params != NULL) {
8296 const char *qcol_msg =
"Use atom charge";
8300 iout <<
iINFO <<
" ChargeCol " << qcol_msg
8316 iout <<
iINFO <<
" Gridforce-CheckSize " 8319 params = params->
next;
8346 if ( FFTWWisdomString ) {
8347 int fftwlen = strlen(FFTWWisdomString) + 1;
8349 msg->
put(fftwlen,FFTWWisdomString);
8351 if ( tclBCScript ) {
8352 int tcllen = strlen(tclBCScript) + 1;
8354 msg->
put(tcllen,tclBCScript);
8357 #ifdef MEM_OPT_VERSION 8358 int filelen = strlen(binAtomFile)+1;
8360 msg->
put(filelen, binAtomFile);
8362 filelen = strlen(binCoorFile)+1;
8364 msg->
put(filelen, binCoorFile);
8367 filelen = strlen(binVelFile)+1;
8369 msg->
put(filelen, binVelFile);
8373 filelen = strlen(binRefFile)+1;
8375 msg->
put(filelen, binRefFile);
8379 mgridforcelist.pack_data(msg);
8398 if ( FFTWWisdomString ) {
8401 FFTWWisdomString =
new char[fftwlen];
8402 msg->
get(fftwlen,FFTWWisdomString);
8405 fftwf_import_wisdom_from_string(FFTWWisdomString);
8407 fftw_import_wisdom_from_string(FFTWWisdomString);
8411 if ( tclBCScript ) {
8414 tclBCScript =
new char[tcllen];
8415 msg->
get(tcllen,tclBCScript);
8418 #ifdef MEM_OPT_VERSION 8421 binAtomFile =
new char[filelen];
8422 msg->
get(filelen, binAtomFile);
8425 binCoorFile =
new char[filelen];
8426 msg->
get(filelen, binCoorFile);
8430 binVelFile =
new char[filelen];
8431 msg->
get(filelen, binVelFile);
8436 binRefFile =
new char[filelen];
8437 msg->
get(filelen, binRefFile);
8444 mgridforcelist.clear();
8445 mgridforcelist.unpack_data(msg);
8454 if ( alchLambdaIDWS >= 0. ) {
8455 const BigReal lambda2 = ( (step / alchIDWSFreq) % 2 == 1 ) ? alchLambda2 : alchLambdaIDWS;
8464 if (alchLambdaIDWS < 0.)
return 0;
8465 if (alchLambdaIDWS > 1.) {
8466 NAMD_die(
"alchLambdaIDWS should be either in the range [0.0, 1.0], or negative (disabled).\n");
8479 if ( alchOutFreq % nonbondedFrequency != 0 ) {
8480 NAMD_die(
"For IDWS, alchOutFreq must be a multiple of nonBondedFrequency.\n");
8482 if ( fullElectFrequency > 0 ) {
8483 if ( alchOutFreq % fullElectFrequency != 0 ) {
8484 NAMD_die(
"For IDWS, alchOutFreq must be a multiple of fullElectFrequency.\n");
8487 if ( alchOutFreq ) {
8488 alchIDWSFreq = alchOutFreq;
8489 }
else if ( outputEnergies ) {
8490 alchIDWSFreq = outputEnergies;
8492 NAMD_die(
"Either alchOutFreq or outputEnergies should be non-zero.\n");
8494 if ( alchOutFreq && alchOutFreq != outputEnergies) {
8495 iout <<
iWARN <<
"alchOutFreq and outputEnergies do not match. IDWS output" 8496 <<
" to stdout may not be useful!\n" <<
endi;
8523 if ( alchLambdaFreq > 0 && step >= alchEquilSteps ) {
8528 const int timeOrigin = firstTimestep + alchEquilSteps;
8529 const BigReal alchLambdaDelta = getLambdaDelta();
8530 const BigReal increment = (step - timeOrigin) /
BigReal(alchLambdaFreq);
8531 return alchLambda + alchLambdaDelta*(floor(increment) + 1);
8541 return ((alchLambda2 - alchLambda)*alchLambdaFreq
8542 /
BigReal(N - firstTimestep - alchEquilSteps));
8547 return (lambda <= alchElecLambdaStart ? 0.
8548 : (lambda - alchElecLambdaStart) / (1. - alchElecLambdaStart));
8565 if ( lambda < alchRepLambdaEnd || alchRepLambdaEnd == 1.0 ) {
8567 }
else if ( lambda >= alchVdwLambdaEnd ) {
8570 return (lambda - alchRepLambdaEnd) / (alchVdwLambdaEnd - alchRepLambdaEnd);
8573 return (lambda >= alchVdwLambdaEnd ? 1. : lambda / alchVdwLambdaEnd);
8579 return (lambda >= alchRepLambdaEnd ? 1. : lambda / alchRepLambdaEnd);
8584 return (lambda >= alchBondLambdaEnd ? 1. : lambda / alchBondLambdaEnd);
8588 size_t num_max_grids = 1;
8589 if (!alchOn)
return num_max_grids;
8590 if (alchFepOn && !alchThermIntOn) {
8595 if (alchElecLambdaStart > 0) {
8599 if (!alchFepOn && alchThermIntOn) {
8605 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)