00001 00007 /***************************************************************************** 00008 * $Source: /home/cvs/namd/cvsroot/namd2/src/SimParameters.h,v $ 00009 * $Author: gzheng $ 00010 * $Date: 2012/05/18 07:33:49 $ 00011 * $Revision: 1.1205 $ 00012 *****************************************************************************/ 00013 00014 #ifndef SIMPARAMETERS_H 00015 #define SIMPARAMETERS_H 00016 00017 #include "common.h" 00018 #include "Vector.h" 00019 #include "Lattice.h" 00020 00021 #include "MGridforceParams.h" 00022 00023 class ParseOptions; 00024 class Communicate; 00025 class ConfigList; 00026 class MIStream; 00027 00028 // The class SimParameters is really just a glorified structure used to 00029 // maintain the global simulation parameters. The only functions 00030 // associated with the class are used to get the parameters from the 00031 // ConfigList object, to send that Parameters from the master node 00032 // to the other nodes, and to receive the Parameters on the other nodes. 00033 00034 00035 // The following definitions are used to distinguish between possible 00036 // bonded exclusion settings 00037 typedef int ExclusionSettings; 00038 00039 #define NONE 0 00040 #define ONETWO 1 00041 #define ONETHREE 2 00042 #define ONEFOUR 3 00043 #define SCALED14 4 00044 00045 // The following definitions are used to distinguish between multiple 00046 // timestep integration schemes 00047 typedef int MTSChoices; 00048 00049 #define NAIVE 0 00050 #define VERLETI 1 00051 00052 // The following definitions are used to distinuish between multiple 00053 // long-short range force splittings 00054 #define SHARP 0 00055 #define XPLOR 1 00056 #define C1 2 00057 #define C2 3 00058 00059 // The following definitions are used to distinguish among load 00060 // balancers and their strategies 00061 #define LDBAL_NONE 0 00062 #define LDBAL_CENTRALIZED 1 // default 00063 #define LDBAL_HYBRID 2 00064 00065 #define LDBSTRAT_DEFAULT 10 // default 00066 #define LDBSTRAT_COMPREHENSIVE 11 00067 #define LDBSTRAT_REFINEONLY 12 00068 #define LDBSTRAT_OLD 13 00069 00070 // The following definitions are used to distinguish between patch-splitting 00071 // strategies 00072 #define SPLIT_PATCH_POSITION 0 // atom position determines patch 00073 #define SPLIT_PATCH_HYDROGEN 1 // hydrogen groups are not broken up 00074 00075 // The following definitions are used to distinguish the range of rigid 00076 // bond calculations: none, all bonds to hydrogen, or only water 00077 #define RIGID_NONE 0 00078 #define RIGID_ALL 1 00079 #define RIGID_WATER 2 00080 00081 // Added by JLai -- The following definitions are used to distinguish 00082 // the different GoMethodologies available to the Go program 00083 // -- 6.3.11 00084 typedef int GoChoices; 00085 #define GO_MATRIX 1 00086 #define GO_SPARSE 2 00087 #define GO_LOWMEM 3 00088 00089 // Used for controlling PME parallelization with nodehelper 00090 // The higher level will include all parallelization for lower ones 00091 // E.g. If setting useNodeHelper to 3, then xpencil's kspace, all 00092 // backward ffts and send_untrans/ungrid routines will be parallelized 00093 #define NDH_CTRL_PME_UNGRIDCALC 6 00094 #define NDH_CTRL_PME_FORWARDFFT 5 00095 #define NDH_CTRL_PME_SENDTRANS 4 00096 #define NDH_CTRL_PME_KSPACE 3 00097 #define NDH_CTRL_PME_BACKWARDFFT 2 00098 #define NDH_CTRL_PME_SENDUNTRANS 1 00099 00100 class SimParameters 00101 { 00102 private: 00103 public: 00104 00105 // MAKE SURE THAT THIS CLASS CAN BE BIT COPIED OR YOU WILL HAVE TO 00106 // ADD SPECIAL CODE TO send_SimParameters() and receive_SimParameters() 00107 00108 Bool lonepairs; // enable lone pairs 00109 int watmodel; // integer code for the water model in use 00110 // choices are defined in common.h 00111 Bool LJcorrection; // flag for whether water tail corrections should be used 00112 BigReal dt; // Timestep size 00113 int N; // Number of steps to be performed 00114 int stepsPerCycle; // Number of timesteps per cycle 00115 00116 zVector cellBasisVector1; // Basis vector for periodic cell 00117 zVector cellBasisVector2; // Basis vector for periodic cell 00118 zVector cellBasisVector3; // Basis vector for periodic cell 00119 zVector cellOrigin; // Fixed center of periodic cell 00120 Lattice lattice; // All data for periodic cell 00121 00122 int nonbondedFrequency; // Number of timesteps between 00123 // nonbonded evaluation 00124 int fullElectFrequency; // Number of timesteps between 00125 // full electrostatic evaluation 00126 BigReal fmaTheta; // DPMTA theta value 00127 int ldBalancer; // None, Centralized or Hybrid 00128 int ldbStrategy; // What load balancing strategy to use 00129 int ldbPeriod; // How often to do load balancing 00130 int firstLdbStep; // What step to do the first 00131 // load-balance on. 00132 int lastLdbStep; // What step to do the last 00133 // load-balance on. 00134 int hybridGroupSize; // hybrid group size 00135 BigReal ldbBackgroundScaling; // scaling factor for background load 00136 BigReal ldbPMEBackgroundScaling;// scaling factor for PME background 00137 BigReal ldbHomeBackgroundScaling;// scaling factor for home background 00138 BigReal ldbRelativeGrainsize; // fraction of average load per compute 00139 00140 int traceStartStep; //the timestep when trace is turned on, default to 3*firstLdbStep; 00141 int numTraceSteps; //the number of timesteps that are traced, default to 2*ldbPeriod; 00142 00143 #ifdef MEASURE_NAMD_WITH_PAPI 00144 Bool papiMeasure; //default to false 00145 int papiMeasureStartStep; //the timestep when to measure using PAPI, default to 3*firstLdbStep; 00146 int numPapiMeasureSteps; //the number of timesteps when performance are measured with PAPI, default to 40; 00147 #endif 00148 00149 Bool outputMaps; //control whether to dump compute/patch map before load balancing 00150 Bool simulateInitialMapping; //if true, the initial mapping during startup is dumped and exit 00151 int simulatedPEs; 00152 int simulatedNodeSize; 00153 00154 Bool benchTimestep; //only cares about benchmarking the timestep, so no file output to save SUs for large-scale benchmarking 00155 00156 //whether to use NodeHelper library to parallelize a loop in a function like OpenMP. 00157 //It has multiple control levels. The higher the value is (must be positive), the more parallelization will be performed 00158 //Currently, it is mainly used for PME computation. The default value is 0, meaning it is disabled 00159 //Refer to macros NDH_CTRL_* in this file for the ordering of different levels 00160 int useNodeHelper; 00161 00162 int twoAwayX; // half-size patches in X dimension 00163 int twoAwayY; // half-size patches in Y dimension 00164 int twoAwayZ; // half-size patches in Z dimension 00165 int maxPatches; // maximum patch count 00166 Bool ldbUnloadPME; // unload processors doing PME 00167 Bool ldbUnloadZero; // unload processor 0 00168 Bool ldbUnloadOne; // unload processor 1 00169 Bool noPatchesOnZero; // no patches on processor 0 00170 Bool noPatchesOnOne; // no patches on processor 1 00171 00172 BigReal initialTemp; // Initial temperature for the 00173 // simulation 00174 Bool comMove; // Should the center of mass be 00175 // able to move 00176 Bool zeroMomentum; // remove momentum drift from PME 00177 Bool zeroMomentumAlt; // alternate method for testing 00178 Bool wrapWater; // Wrap water around on output 00179 Bool wrapAll; // Wrap clusters around on output 00180 Bool wrapNearest; // Wrap to closest image to origin 00181 BigReal dielectric; // Dielectric constant 00182 ExclusionSettings exclude; // What electrostatic exclusions should 00183 // be made 00184 BigReal scale14; // Scaling factor for 1-4 00185 // electrostatics 00186 BigReal nonbondedScaling; // Scaling factor for nonbonded forces 00187 int dcdFrequency; // How often (in timesteps) should 00188 // a DCD trajectory file be updated 00189 int dcdUnitCell; // Whether to write unit cell information in the DCD 00190 int velDcdFrequency; // How often (in timesteps) should 00191 // a velocity DCD file be updated 00192 int forceDcdFrequency; // How often (in timesteps) should 00193 // a force DCD file be updated 00194 int xstFrequency; // How often (in timesteps) should 00195 // a XST trajectory file be updated 00196 char auxFilename[128]; // auxilary output filename 00197 char dcdFilename[128]; // DCD filename 00198 char velDcdFilename[128]; // Velocity DCD filename 00199 char forceDcdFilename[128]; // Force DCD filename 00200 char xstFilename[128]; // Extended system trajectory filename 00201 char outputFilename[128]; // Output file name. This name will 00202 // have .coor appended to it 00203 // for the coordinates and 00204 // .vel appended to 00205 // it for the velocities 00206 char restartFilename[128]; // Base name of the restart file 00207 int restartFrequency; // How often (in timesteps) shoud the 00208 // restart files be updated 00209 Bool restartSave; // unique filenames for restart files 00210 Bool binaryRestart; // should restart files be 00211 // binary format rather than PDB 00212 Bool binaryOutput; // should output files be 00213 // binary format rather than PDB 00214 BigReal cutoff; // Cutoff distance 00215 BigReal margin; // Fudge factor on patch size 00216 BigReal patchDimension; // Dimension of each side of a patch 00217 // This is either cutoff+margin or 00218 // pairlistDist+margin depending on 00219 // whether or not switching is on 00220 // or not 00221 BigReal limitDist; // Distance below which nonbonded 00222 // forces between atoms are limited 00223 Bool switchingActive; // Flag TRUE->using switching function 00224 // for electrostatics and vdw 00225 Bool vdwForceSwitching; // Flag TRUE->using force switching 00226 // function for vdw 00227 BigReal switchingDist; // Distance at which switching 00228 // becomes active 00229 Bool martiniSwitching; // Flag TRUE->use Martini residue-based 00230 // coarse-grain switching function 00231 Bool martiniDielAllow; // Allow non-standard dielectric constant 00232 // for use with Martini when dielectric != 15.0 00233 BigReal pairlistDist; // Distance within which atom pairs 00234 // should be added to pairlist 00235 int pairlistMinProcs; // Minimum number of processors 00236 // to enable pairlists 00237 int usePairlists; // Derived from pairlistMinProcs 00238 00239 int pairlistsPerCycle; // regenerate x times per cycle 00240 BigReal pairlistShrink; // tol *= (1 - x) on regeneration 00241 BigReal pairlistGrow; // tol *= (1 + x) on trigger 00242 BigReal pairlistTrigger; // trigger is atom > (1 - x) * tol 00243 int outputPairlists; // print pairlist warnings this often 00244 00245 Bool constraintsOn; // Flag TRUE-> harmonic constraints 00246 // active 00247 int constraintExp; // Exponent for harmonic constraints 00248 00249 /* BEGIN gf */ 00250 Bool gridforceOn; // Flag TRUE -> gridforce active 00251 Bool gridforceVolts; // Flag TRUE -> gridforce using volts as units 00252 zVector gridforceScale; // Gridforce scale factor 00253 Bool gridforceContA1; // Flag TRUE -> grid continuous in A1 direction 00254 Bool gridforceContA2; // Flag TRUE -> grid continuous in A2 direction 00255 Bool gridforceContA3; // Flag TRUE -> grid continuous in A3 direction 00256 zVector gridforceVOffset; // Gridforce potential offsets 00257 Bool gridforceLite; // Flag TRUE -> use lightweight, fast, feature-poor gridforce 00258 /* END gf */ 00259 Bool mgridforceOn; 00260 MGridforceParamsList mgridforcelist; 00261 00262 //****** BEGIN selective restraints (X,Y,Z) changes 00263 Bool selectConstraintsOn; // Flag TRUE-> selective restraints 00264 // active 00265 Bool constrXOn, constrYOn, 00266 constrZOn; // Flag TRUE-> select which Cartesian 00267 // component to restrain 00268 //****** END selective restraints (X,Y,Z) changes 00269 BigReal constraintScaling; // Scaling factor for constraint forces 00270 00271 //****** BEGIN CHARMM/XPLOR type changes 00272 Bool paraTypeXplorOn; // FLAG TRUE-> parametrs are XPLOR format (default) 00273 Bool paraTypeCharmmOn; // FLAG TRUE-> parametrs are CHARMM format 00274 //****** END CHARMM/XPLOR type changes 00275 00276 // Ported by JLai -- JE - Go 00277 Bool goForcesOn; // FLAG TRUE-> Go forces will be calculated 00278 char goParameters[128]; // File for Go parameters 00279 char goCoordinates[128]; // File for Go structure and atom chain types 00280 //JLai 6.3.11 00281 GoChoices goMethod; // Integer for Go method -- 1) Matrix-Go, 3) Low-mem-Go 00282 // End of port -- JL 00283 00284 //****** BEGIN moving constraints changes 00285 Bool movingConstraintsOn; // Flag TRUE-> moving constraints 00286 // active 00287 zVector movingConsVel; // Velocity of the movement, A/timestep 00288 //****** END moving constraints changes 00289 //****** BEGIN rotating constraints changes 00290 Bool rotConstraintsOn; // Flag TRUE-> rotating constraints 00291 // active 00292 zVector rotConsAxis; // Axis of rotation 00293 zVector rotConsPivot; // Pivot point of rotation 00294 BigReal rotConsVel; // Velocity of rotation, Deg/timestep 00295 //****** END rotating constraints changes 00296 00297 //****** BEGIN moving drag changes 00298 Bool movDragOn; // Flag TRUE-> moving drag active 00299 char movDragFile[128]; // PDB file defining dragged atoms 00300 // by non-zero value in the column 00301 BigReal movDragGlobVel; // global drag velocity (A/step) 00302 char movDragVelFile[128]; // PDB file; XYZ scale moving drag 00303 // velocity for each atom 00304 //****** END moving drag changes 00305 //****** BEGIN rotating drag changes 00306 Bool rotDragOn; // Flag TRUE-> rotating drag active 00307 char rotDragFile[128]; // PDB file defining dragged atoms 00308 // by non-zero value in the column 00309 char rotDragAxisFile[128]; // PDB file; XYZ define axes for atoms; 00310 char rotDragPivotFile[128]; // PDB file; XYZ define pivots for atoms 00311 BigReal rotDragGlobVel; // global drag velocity (deg/step) 00312 char rotDragVelFile[128]; // PDB file; B or O scales angular 00313 // velocity for each atom 00314 //****** END rotating drag changes 00315 //****** BEGIN "constant" torque changes 00316 Bool consTorqueOn; // Flag TRUE-> "constant" torque active 00317 char consTorqueFile[128]; // PDB file defining torqued atoms 00318 // by non-zero value in the column 00319 char consTorqueAxisFile[128]; // PDB file; XYZ define axes for atoms; 00320 char consTorquePivotFile[128];// PDB file; XYZ define pivots for atoms 00321 BigReal consTorqueGlobVal; // global "torque" (Kcal/(mol*A^2)) 00322 char consTorqueValFile[128]; // PDB file; B or O scales "torque" 00323 // for each atom 00324 //****** END "constant" torque changes 00325 00326 //****** BEGIN SMD constraints changes 00327 Bool SMDOn; // Flag TRUE-> SMD constraints active 00328 BigReal SMDVel; // Velocity of the movement, A/timestep 00329 zVector SMDDir; // Direction of the movement 00330 BigReal SMDk; // Elastic constant for SMD 00331 BigReal SMDk2; // Transverse elastic constant for SMD 00332 char SMDFile[128]; // File for SMD information 00333 int SMDOutputFreq; // Output frequency for SMD constr. 00334 //****** END SMD constraints changes 00335 00336 //****** BEGIN tabulated energy section 00337 Bool tabulatedEnergies; 00338 int tableNumTypes; 00339 char tabulatedEnergiesFile[128]; 00340 char tableInterpType[128]; 00341 Real tableSpacing; 00342 BigReal tableMaxDist; 00343 //****** END tabulated energy section 00344 00345 // TMD 00346 Bool TMDOn, TMDDiffRMSD; 00347 BigReal TMDk; 00348 char TMDFile[128], TMDFile2[128]; 00349 int TMDOutputFreq; 00350 int TMDFirstStep, TMDLastStep; 00351 BigReal TMDInitialRMSD, TMDFinalRMSD; 00352 00353 //Symmetry restraints 00354 Bool symmetryOn, symmetryScaleForces; 00355 BigReal symmetryk; 00356 char symmetrykfile[128]; 00357 char symmetryFile[128]; 00358 char symmetryMatrixFile[128]; 00359 int symmetryFirstStep, symmetryLastStep, symmetryFirstFullStep, symmetryLastFullStep; 00360 00361 00362 // Modifications for alchemical simulations 00363 // Begin alch flags 00364 00365 Bool alchOn; // Doing alchemical simulation? 00366 Bool alchFepOn; // Doing alchemical simulation? 00367 Bool alchThermIntOn; // Doing thermodynamic integration? 00368 Bool alchFepWCARepuOn; // Doing WCA decomposition repulsion interaction? 00369 Bool alchFepWCADispOn; // Doing WCA decomposition dispersion interaction? 00370 int alchMethod; // Which alchemical method to use? fep or ti 00371 BigReal alchLambda; // lambda for dynamics 00372 BigReal alchLambda2; // lambda for comparison 00373 BigReal alchFepWCArcut1; // rcut1 of WCA decompistion repulsion 00374 BigReal alchFepWCArcut2; // rcut2 of WCA decomposition repulsion 00375 BigReal alchTemp; // temperature for alchemical calculation 00376 int alchOutFreq; // freq. of alchemical output 00377 Bool alchEnsembleAvg; //if do ensemble average for the net free energy difference 00378 char alchOutFile[128]; // alchemical output filename 00379 int alchEquilSteps; // # of equil. steps in the window 00380 BigReal alchVdwShiftCoeff; // r2 shift coeff used for generating 00381 // the alchemical altered vdW interactions 00382 BigReal alchElecLambdaStart; // lambda value for starting point of 00383 // electrostatic interactions of 00384 // exnihilated particles. For annihilated 00385 // particles the starting point is 00386 // (1-alchElecLambdaStart) 00387 BigReal alchVdwLambdaEnd; // lambda value for endpoint of vdW 00388 // interactions of exnihilated particles. 00389 // For annihilated particles the endpoint is 00390 // (1-alchVdwLambdaEnd) 00391 Bool alchDecouple; // alchemical decoupling rather than annihilation 00392 00393 // End alch flags 00394 //fepe 00395 00396 00397 Bool lesOn; // Locally enhanced sampling? 00398 int lesFactor; // local enhancement factor 00399 Bool lesReduceTemp; // Reduce enhanced atom temperature? 00400 Bool lesReduceMass; // Reduce enhanced atom mass? 00401 00402 Bool extForcesOn; // Are ext command forces present? 00403 char extForcesCommand[256]; 00404 char extCoordFilename[128]; 00405 char extForceFilename[128]; 00406 00407 Bool printBadContacts; //print indices of bad contacts being moved downhill 00408 00409 //gbis implicit solvent parameters 00410 Bool GBISOn; //do generalized born implicit solvent 00411 BigReal fsMax; 00412 Bool GBISserOn; //do generalized born implicit solvent serial 00413 BigReal solvent_dielectric; //epsilon_s 00414 BigReal coulomb_radius_offset; //rho_0 00415 BigReal kappa; //debye screening length; k = sqrt(ion concentration mol/L ) / 0.304 00416 BigReal ion_concentration; 00417 BigReal gbis_delta; //three parameters for born radius calc 00418 BigReal gbis_beta; 00419 BigReal gbis_gamma; 00420 BigReal alpha_cutoff; //pairwise cutoff for integrating born radius 00421 BigReal alpha_max; //maximum allowable born radius 00422 Bool LCPOOn; //do LCPO SASA for GBSA 00423 BigReal surface_tension; //surface tension (kcal/mol/Ang^2) for LCPO 00424 00425 Bool drudeOn; // Perform integration of Drude oscillators? 00426 BigReal drudeTemp; // (low) temperature for freezing Drude oscillators 00427 BigReal drudeDamping; // Langevin damping coefficient (1/ps) 00428 // defaults to langevinDamping 00429 BigReal drudeBondLen; // Length beyond which to apply quartic 00430 // restraining potential to Drude bond 00431 BigReal drudeBondConst; // Force constant for restraining potential 00432 BigReal drudeNbtholeCut; // Radius of thole pair interaction 00433 00434 Bool pairInteractionOn; // Calculate pair interactions? 00435 int pairInteractionGroup1; // Interaction group 1. 00436 int pairInteractionGroup2; // Interaction group 2. 00437 Bool pairInteractionSelf; // Compute just within group. 00438 00439 Bool cosAngles; // Can some angles be cos-based 00440 Bool globalForcesOn; // Are global forces present? 00441 Bool tclForcesOn; // Are Tcl forces present? 00442 #ifdef NAMD_TCL 00443 Bool tclIsThreaded; // Is Tcl library thread-safe? 00444 #endif 00445 Bool tclBCOn; // Are Tcl boundary forces present 00446 char *tclBCScript; // Script defining tclBC calcforces 00447 char tclBCArgs[128]; // Extra args for calcforces command 00448 Bool freeEnergyOn; // Doing free energy perturbation? 00449 Bool miscForcesOn; // Using misc forces? 00450 Bool colvarsOn; // Using the colvars module? 00451 00452 Bool fixedAtomsOn; // Are there fixed atoms? 00453 Bool fixedAtomsForces; // Calculate forces anyway? 00454 00455 Bool langevinOn; // Flag TRUE-> langevin dynamics active 00456 BigReal langevinTemp; // Temperature for Langevin dynamics 00457 BigReal langevinDamping; // Damping coefficient (1/ps) 00458 Bool langevinHydrogen; // Flag TRUE-> apply to hydrogens 00459 00460 // BEGIN LA 00461 Bool loweAndersenOn; // Flag TRUE-> Lowe-Andersen dynamics active 00462 BigReal loweAndersenTemp; // Temperature for Lowe-Andersen dynamics 00463 BigReal loweAndersenRate; // Collision frequency for Lowe-Andersen dynamics (1/ps) 00464 BigReal loweAndersenCutoff; // Cutoff radius for Lowe-Andersen dynamics 00465 // END LA 00466 00467 Bool globalOn; // Flag TRUE-> use global integrator 00468 Bool dihedralOn; // Flag TRUE-> dihedral dynamics active 00469 Bool COLDOn; // Flag TRUE-> constrained overdamped 00470 // langevin dynamics active 00471 BigReal COLDRate; // Damping coefficient for COLD. 00472 BigReal COLDTemp; // Temperature for COLD. 00473 00474 Bool tCoupleOn; // Flag TRUE-> Temperature coupling 00475 // active 00476 BigReal tCoupleTemp; // Temperature for temp coupling 00477 00478 int rescaleFreq; // Velocity rescale frequency 00479 BigReal rescaleTemp; // Temperature to rescale to 00480 00481 Bool accelMDOn; // Perform accelerated MD 00482 Bool accelMDdihe; // Apply boost to the dihedral potential 00483 Bool accelMDdual; // dual boost mode 00484 Bool accelMDDebugOn; // Debugging accelerated MD 00485 BigReal accelMDFirstStep; // First aMD step 00486 BigReal accelMDLastStep; // Last aMD step 00487 int accelMDOutFreq; // aMD output frequency 00488 BigReal accelMDE; // aMD E 00489 BigReal accelMDalpha; // aMD alpha 00490 BigReal accelMDTE; // E for total potential in the dual boost mode 00491 BigReal accelMDTalpha; // alpha for total potential in the dual boost mode 00492 00493 /* Begin Adaptive Temperature Sampling */ 00494 Bool adaptTempOn; // is adaptTempOn 00495 Bool adaptTempDebug; // Debuggin adaptive temperature sampling 00496 int adaptTempFirstStep; // First adaptTemp step 00497 int adaptTempLastStep; // Last adaptTemp step 00498 int adaptTempOutFreq; // adaptTemp output frequency 00499 int adaptTempFreq; // Steps between adaptTemp updates 00500 BigReal adaptTempTmin; // Lower temperature bound 00501 BigReal adaptTempTmax; // Upper temperature bound 00502 BigReal adaptTempAutoDt; // Auto jump size. Value determines upper bound, adaotTempDt determines lower bound 00503 int adaptTempBins; // Number of bins to store average energy values 00504 BigReal adaptTempDt; // timestep for adaptTemp updates - only affects Temperature random walk 00505 BigReal adaptTempCgamma; // Cgamma variable for adaptive bin averaging Cgamma = 0 is normal Averaging. 1 > Cgamma >= 0 00506 Bool adaptTempLangevin; // Couple to Langevin Thermostat 00507 Bool adaptTempRescale; // Couple to Vel. Rescaling 00508 char adaptTempInFile[128]; // Restart information for adaptTemp to read 00509 char adaptTempRestartFile[128]; // File to write restart information 00510 int adaptTempRestartFreq; // Frequency of writing restart output 00511 Bool adaptTempRandom; // Do we assign random temperatures when we step out of [Tmin,Tmax]? 00512 /* End Adaptive Temperature Sampling */ 00513 00514 int reassignFreq; // Velocity reassignment frequency 00515 BigReal reassignTemp; // Temperature to reassign to 00516 BigReal reassignIncr; // Added to reassignTemp each time 00517 BigReal reassignHold; // Hold reassignTemp at this value 00518 00519 Bool useGroupPressure; // Use group rather than atomic 00520 // quantities for pressure calc 00521 00522 Bool excludeFromPressure; // Flag TRUE-> some atoms not rescaled 00523 00524 Bool useFlexibleCell; // Use anisotropic cell fluctuations 00525 Bool useConstantArea; // x,y dimensions fixed. 00526 Bool useConstantRatio; // x,y ratio fixed. 00527 00528 Bool fixCellDims; // fix the cell dimensions 00529 Bool fixCellDimX; 00530 Bool fixCellDimY; 00531 Bool fixCellDimZ; 00532 00533 Bool berendsenPressureOn; // Berendsen pressure bath 00534 BigReal berendsenPressureTarget; 00535 BigReal berendsenPressureCompressibility; 00536 BigReal berendsenPressureRelaxationTime; 00537 int berendsenPressureFreq; 00538 00539 Bool langevinPistonOn; // Langevin piston pressure control 00540 BigReal langevinPistonTarget; 00541 BigReal langevinPistonPeriod; 00542 BigReal langevinPistonDecay; 00543 BigReal langevinPistonTemp; 00544 00545 BigReal surfaceTensionTarget; 00546 00547 Bool pressureProfileOn; // Compute lateral pressure profile? 00548 int pressureProfileSlabs; // Number of slabs 00549 int pressureProfileFreq; // How often to store profile data 00550 int pressureProfileAtomTypes; 00551 Bool pressureProfileEwaldOn; // Compute Ewald contribution? 00552 int pressureProfileEwaldX; 00553 int pressureProfileEwaldY; 00554 int pressureProfileEwaldZ; 00555 00556 zVector strainRate; 00557 zVector strainRate2; // off diagonal elements (xy, xz, yz) 00558 00559 unsigned int randomSeed; // Seed for random number generator 00560 00561 Bool FMAOn; // Flag TRUE-> FMA active 00562 int FMALevels; // Number of Levels for FMA 00563 int FMAMp; // Number of multipole terms for FMA 00564 Bool FMAFFTOn; // FFT on/off flag for FMA 00565 int FMAFFTBlock; // FFT blocking factor for FMA 00566 00567 Bool fullDirectOn; // Should direct calculations of 00568 // full electrostatics be performed? 00569 00570 Bool MSMOn; 00571 int MSMApprox; 00572 int MSMSplit; 00573 int MSMLevels; 00574 int MSMBlockSizeX; 00575 int MSMBlockSizeY; 00576 int MSMBlockSizeZ; 00577 BigReal MSMGridSpacing; 00578 BigReal MSMPadding; 00579 Bool MsmSerialOn; 00580 00581 Bool PMEOn; // Flag TRUE -> PME active 00582 BigReal PMETolerance; // Direct space tolerance 00583 BigReal PMEEwaldCoefficient; // From tolerance and cutoff 00584 int PMEInterpOrder; // Order of interpolation 00585 int PMEGridSizeX; // No. of grid points in x dim 00586 int PMEGridSizeY; // No. of grid points in y dim 00587 int PMEGridSizeZ; // No. of grid points in z dim 00588 BigReal PMEGridSpacing; // Maximum spacing between points 00589 int PMEProcessors; // No. of processors to use 00590 int PMEMinSlices; // Min slices per PME slab 00591 int PMEMinPoints; // Min points per PME pencil 00592 Bool PMEBarrier; // Use barrier before sendTrans 00593 int PMEPencils; // Size of pencil grid in each dim 00594 00595 Bool useDPME; // Flag TRUE -> old DPME code 00596 Bool useOptPME; // Flag TRUE -> use the scalable version of PME 00597 Bool useManyToMany; // Flag TRUE -> use the manytomany optimization of PME. 00598 // This flag requres useOptPME to be set. 00599 00600 Bool FFTWEstimate; 00601 Bool FFTWPatient; 00602 Bool FFTWUseWisdom; 00603 char FFTWWisdomFile[128]; 00604 char *FFTWWisdomString; 00605 00606 #ifdef OPENATOM_VERSION 00607 Bool openatom; // Flag TRUE -> OpenAtom QM/MM active 00608 #endif // OPENATOM_VERSION 00609 00610 Bool minimizeCGOn; // Flag TRUE-> CG minimization active 00611 Bool minVerbose; // Flag TRUE-> print extra minimization data 00612 BigReal minTinyStep; // Minimization parameter 00613 BigReal minBabyStep; // Minimization parameter 00614 BigReal minLineGoal; // Minimization parameter 00615 Bool minimizeOn; // Flag TRUE-> minimization active 00616 BigReal maximumMove; // Maximum movement per timestep 00617 // during minimization 00618 00619 Bool sphericalBCOn; // Flag TRUE-> spherical boundary 00620 // conditions are active 00621 zVector sphericalCenter; // Center specified by user 00622 BigReal sphericalBCk1; // First force constant for 00623 // spherical BC 00624 BigReal sphericalBCk2; // Second force constant for 00625 // spherical BC 00626 BigReal sphericalBCr1; // First radius for spherical BC 00627 BigReal sphericalBCr2; // Second radius for spherical BC 00628 int sphericalBCexp1; // First radius for spherical BC 00629 int sphericalBCexp2; // Second radius for spherical BC 00630 00631 Bool cylindricalBCOn; // Flag TRUE->cylindrical boundary 00632 // conditions are active 00633 zVector cylindricalCenter; 00634 char cylindricalBCAxis; // 'x', 'y', or 'z' 00635 BigReal cylindricalBCr1; 00636 BigReal cylindricalBCr2; 00637 BigReal cylindricalBCl1; 00638 BigReal cylindricalBCl2; 00639 int cylindricalBCexp1; 00640 int cylindricalBCexp2; 00641 BigReal cylindricalBCk1; 00642 BigReal cylindricalBCk2; 00643 00644 Bool eFieldOn; // Should a electric field be applied 00645 zVector eField; // Electric field vector to be applied 00646 BigReal eFieldFreq; // Frequency of the electric field 00647 BigReal eFieldPhase; // Phase phi, cos(w*t-phi*PI/180) 00648 00649 Bool stirOn; // Should a stirring torque be applied 00650 char stirFilename[128]; // Stirring filename (atoms marked) 00651 //do the below two even needed to be defined? 00652 BigReal stirStartingTheta; // Stir starting theta offset 00653 BigReal stirVel; // Stir angular velocity 00654 BigReal stirK; // Stir force harmonic spring constant 00655 zVector stirAxis; // Direction of stir axis 00656 zVector stirPivot; // Pivot point of stir axis 00657 00658 Bool extraBondsOn; // read extra bonded forces 00659 00660 Bool consForceOn; // Should constant force be applied 00661 char consForceFile[128]; 00662 BigReal consForceScaling; 00663 00664 int outputEnergies; // Number of timesteps between energy 00665 // outputs 00666 00667 int outputMomenta; // Number of timesteps between momentum 00668 // outputs 00669 00670 int outputTiming; // Number of timesteps between timing 00671 // outputs 00672 00673 int outputCudaTiming; // Number of timesteps between timing 00674 // outputs of CUDA code 00675 00676 int outputPressure; // Number of timesteps between pressure 00677 // tensor outputs 00678 00679 Bool mergeCrossterms; // Merge crossterm energy w/ dihedrals 00680 00681 int firstTimestep; // Starting timestep. Will be 0 unless 00682 // restarting a simulation 00683 00684 MTSChoices MTSAlgorithm; // What multiple timestep algorithm 00685 // to use 00686 00687 int longSplitting; // What electrostatic splitting 00688 // to use 00689 00690 int splitPatch; // How are patches determined? 00691 BigReal hgroupCutoff; // what is the added hydrogen margin? 00692 00693 int mollyOn; // mollify long range forces? 00694 BigReal mollyTol; // error tolerance for molly 00695 int mollyIter; // max number of iterations for molly 00696 00697 int rigidBonds; // what type of rigid bonds to hydrogens 00698 // none, all, or only water 00699 00700 BigReal rigidTol; // error tolerance for rigid bonds 00701 int rigidIter; // Number of NR iterations 00702 int rigidDie; // die if rigidTol not achieved 00703 00704 Bool useSettle; // Use SETTLE; requires rigid waters 00705 00706 Bool testOn; // Do tests rather than simulation 00707 Bool commOnly; // Don't do any force evaluations 00708 Bool statsOn; // Don't do any force evaluations 00709 00710 int totalAtoms; // Total Number of atoms in simulation 00711 int maxSelfPart; // maximum number of self partitions 00712 // that a patch can be split into 00713 int maxPairPart; // maximum number of pair partitions 00714 // that a patch can be split into 00715 int numAtomsSelf; // maximum number of atoms in a single 00716 // self-compute 00717 int numAtomsSelf2; // maximum number of atoms in a pair compute 00718 // in the presence of twoAwayX,Y,Z options 00719 int numAtomsPair; // maximum number of atoms in a single 00720 // pair-compute 00721 int numAtomsPair2; // maximum number of atoms in a single 00722 // pair-compute 00723 int minAtomsPerPatch; // minimum average atoms per patch 00724 // (may create larger patches) 00725 int maxExclusionFlags; // maximum size of exclusion check list 00726 // for any given atom 00727 Bool outputPatchDetails; // print number of atoms per patch 00728 Bool staticAtomAssignment; // never migrate atoms 00729 00730 // 00731 // hydrogen bond simulation parameters 00732 // 00733 00734 // should the hydrogen bond term be used? If FALSE, all other 00735 // hydrogen bond parameters are unnecessary in simulation. 00736 Bool HydrogenBonds; 00737 00738 // should the antecedent atom be used in the calculation of hbonds? 00739 Bool useAntecedent; 00740 00741 // exponents used in hydrogen bond energy function: 00742 // aaAngleExp = exp for H-A-AA angle term (n) 00743 // haAngleExp = exp for D-H-A angle term (m) 00744 // distAttExp = exp for attractive A-D distance term (j) 00745 // distRepExp = exp for repulsive A-D distance term (i) 00746 int aaAngleExp, haAngleExp, distAttExp, distRepExp; 00747 00748 // cutoff D-H-A angle, and on/off angles for switch fcn (in degrees) 00749 BigReal dhaCutoffAngle, dhaOnAngle, dhaOffAngle; 00750 00751 // cutoff distance for D-A separation in hbonds (in Angstroms), and 00752 // on/off distances for hbond radial term switching function 00753 BigReal daCutoffDist, daOnDist, daOffDist; 00754 00755 // IMD parameters 00756 int IMDon; // enable IMD 00757 int IMDport; // port on which to listen for connections 00758 int IMDfreq; // frequency at which coordinates will be available 00759 int IMDwait; // if true, pause the simulation when there is no 00760 // connection 00761 int IMDignore; // IMD connection does not influence simulation 00762 // only sends coordinates and energies to VMD 00763 00764 // AMBER options 00765 Bool amberOn; // FLAG TRUE-> amber force field is used 00766 Bool readExclusions; // FLAG TRUE-> Read exclusions from parm file 00767 BigReal vdwscale14; // Scaling factor for 1-4 VDW interactions 00768 00769 // GROMACS options 00770 Bool gromacsOn; // FLAG TRUE -> gromacs-style force field is used 00771 00772 // OPLS options 00773 Bool vdwGeometricSigma; // Lennard-J sigma uses geometric mean 00774 00775 // ScriptTcl argument passing 00776 BigReal scriptArg1; 00777 BigReal scriptArg2; 00778 BigReal scriptArg3; 00779 BigReal scriptArg4; 00780 BigReal scriptArg5; 00781 00782 Bool useCompressedPsf; 00783 Bool genCompressedPsf; 00784 00785 Bool usePluginIO; 00786 00787 Bool mallocTest; 00788 Bool printExclusions; 00789 00790 //default value is -1 00791 int proxySendSpanningTree; 00792 int proxyRecvSpanningTree; 00793 00794 int proxyTreeBranchFactor; 00795 00796 00797 //fields needed for Parallel IO Input 00798 int numinputprocs; 00799 char *binAtomFile; 00800 char *binCoorFile; 00801 char *binVelFile; 00802 00803 //fields needed for Parallel IO Output 00804 int numoutputprocs; 00805 int numoutputwrts; 00806 00807 char computeMapFilename[128]; // store compute map 00808 Bool storeComputeMap; 00809 Bool loadComputeMap; 00810 00811 public: 00812 00813 SimParameters() : mgridforcelist() {}; 00814 SimParameters(ConfigList *c, char *&cwd) : mgridforcelist() { 00815 initialize_config_data(c,cwd); 00816 }; 00817 ~SimParameters() {}; 00818 00819 void initialize_config_data(ConfigList *, char *&cwd); 00820 // Initialize SimParameters data 00821 // from the ConfigList object 00822 void send_SimParameters(MOStream *); 00823 // Used by the master process 00824 // to send the paramters to 00825 // the other processors 00826 void receive_SimParameters(MIStream *); 00827 // Used by the other processors 00828 // to receive the data from the 00829 // master process 00830 void scriptSet(const char *, const char *); 00831 // Set parameters at run time 00832 00833 int isSendSpanningTreeOn(){ return proxySendSpanningTree == 1; } 00834 int isSendSpanningTreeUnset() { return proxySendSpanningTree == -1; } 00835 int isRecvSpanningTreeOn(){ return proxyRecvSpanningTree == 1; } 00836 int isRecvSpanningTreeUnset() { return proxyRecvSpanningTree == -1; } 00837 00838 private: 00839 00840 void config_parser(ParseOptions &opts); 00841 00842 void config_parser_basic(ParseOptions &opts); 00843 void config_parser_fileio(ParseOptions &opts); 00844 void config_parser_fullelect(ParseOptions &opts); 00845 void config_parser_methods(ParseOptions &opts); 00846 void config_parser_constraints(ParseOptions &opts); 00847 #ifdef OPENATOM_VERSION 00848 void config_parser_openatom(ParseOptions &opts); 00849 #endif //OPENATOM_VERSION 00850 /* BEGIN gf */ 00851 void config_parser_gridforce(ParseOptions &opts); 00852 /* END gf */ 00853 void config_parser_movdrag(ParseOptions &opts); 00854 void config_parser_rotdrag(ParseOptions &opts); 00855 void config_parser_constorque(ParseOptions &opts); 00856 void config_parser_boundary(ParseOptions &opts); 00857 void config_parser_misc(ParseOptions &opts); 00858 void config_parser_mgridforce(ParseOptions &opts); 00859 void parse_mgrid_string_param(ConfigList *config, 00860 const char *fieldname, char** dest); 00861 void parse_mgrid_params(ConfigList *config); 00862 void print_mgrid_params(); 00863 00864 void check_config(ParseOptions &opts, ConfigList *config, char *&cwd); 00865 00866 void print_config(ParseOptions &opts, ConfigList *config, char *&cwd); 00867 00868 void create_output_directories(const char *dirname); 00869 00870 int fmaFrequency; // outdated parameter name 00871 char loadBalancer[64]; // Load balancer 00872 char loadStrategy[64]; // Load balancing strategy 00873 00874 }; 00875 00876 #endif 00877
1.3.9.1