Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

SimParameters.h

Go to the documentation of this file.
00001 
00007 /*****************************************************************************
00008  * $Source: /home/cvs/namd/cvsroot/namd2/src/SimParameters.h,v $
00009  * $Author: dhardy $
00010  * $Date: 2009/10/27 21:50:09 $
00011  * $Revision: 1.1157 $
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 //  balancing strategies
00061 #define LDBSTRAT_NONE           0
00062 #define LDBSTRAT_REFINEONLY     1
00063 #define LDBSTRAT_ALG7           2
00064 #define LDBSTRAT_ASB8           3
00065 #define LDBSTRAT_OTHER          99
00066 
00067 // The following definitions are used to distinguish between patch-splitting
00068 // strategies
00069 #define SPLIT_PATCH_POSITION    0       // atom position determines patch
00070 #define SPLIT_PATCH_HYDROGEN    1       // hydrogen groups are not broken up
00071 
00072 // The following definitions are used to distinguish the range of rigid
00073 // bond calculations: none, all bonds to hydrogen, or only water
00074 #define RIGID_NONE    0
00075 #define RIGID_ALL     1
00076 #define RIGID_WATER   2
00077 
00078 class SimParameters
00079 {
00080 private:
00081 public:
00082 
00083 //  MAKE SURE THAT THIS CLASS CAN BE BIT COPIED OR YOU WILL HAVE TO
00084 //  ADD SPECIAL CODE TO send_SimParameters() and receive_SimParameters()
00085 
00086   int watmodel; // integer code for the water model in use
00087                 // choices are defined in common.h
00088   Bool LJcorrection; // flag for whether water tail corrections should be used
00089         BigReal dt;                     //  Timestep size
00090         int N;                          //  Number of steps to be performed
00091         int stepsPerCycle;              //  Number of timesteps per cycle
00092 
00093         zVector cellBasisVector1;       //  Basis vector for periodic cell
00094         zVector cellBasisVector2;       //  Basis vector for periodic cell
00095         zVector cellBasisVector3;       //  Basis vector for periodic cell
00096         zVector cellOrigin;             //  Fixed center of periodic cell
00097         Lattice lattice;                //  All data for periodic cell
00098         
00099         int nonbondedFrequency;         //  Number of timesteps between
00100                                         //  nonbonded evaluation
00101         int fullElectFrequency;         //  Number of timesteps between
00102                                         //  full electrostatic evaluation
00103         BigReal fmaTheta;               //  DPMTA theta value
00104         int ldbStrategy;                //  What type of load balancing
00105         int ldbPeriod;                  //  How often to do load balancing
00106         int firstLdbStep;               //  What step to do the first 
00107                                         //  load-balance on.
00108         int lastLdbStep;                //  What step to do the last
00109                                         //  load-balance on.
00110         BigReal ldbBackgroundScaling;   //  scaling factor for background load
00111         BigReal ldbPMEBackgroundScaling;//  scaling factor for PME background
00112         BigReal ldbHomeBackgroundScaling;//  scaling factor for home background
00113         int twoAwayX;                   //  half-size patches in X dimension
00114         int twoAwayY;                   //  half-size patches in Y dimension
00115         int twoAwayZ;                   //  half-size patches in Z dimension
00116         Bool ldbUnloadPME;              //  unload processors doing PME
00117         Bool ldbUnloadSMP;              //  unload processors rank
00118         Bool ldbUnloadZero;             //  unload processor 0
00119         Bool ldbUnloadOne;              //  unload processor 1 
00120         Bool ldbUnloadRankZero;         //  unload processors rank
00121         int procsPerNode;               //  number of pes per node
00122         int ldbUnloadRank;              //  unload rank on a node
00123         Bool noPatchesOnZero;           //  no patches on processor 0
00124         Bool noPatchesOnOne;            //  no patches on processor 1
00125         Bool shiftIOToOne;              //  shift I/O operation (say, DCD output) to proc 1
00126         BigReal initialTemp;            //  Initial temperature for the 
00127                                         //  simulation
00128         Bool comMove;                   //  Should the center of mass be 
00129                                         //  able to move
00130         Bool zeroMomentum;              //  remove momentum drift from PME
00131         Bool zeroMomentumAlt;           //  alternate method for testing
00132         Bool wrapWater;                 //  Wrap water around on output
00133         Bool wrapAll;                   //  Wrap clusters around on output
00134         Bool wrapNearest;               //  Wrap to closest image to origin
00135         BigReal dielectric;             //  Dielectric constant
00136         ExclusionSettings exclude;      //  What electrostatic exclusions should
00137                                         //  be made
00138         BigReal scale14;                //  Scaling factor for 1-4 
00139                                         //  electrostatics
00140         BigReal nonbondedScaling;       //  Scaling factor for nonbonded forces
00141         int dcdFrequency;               //  How often (in timesteps) should
00142                                         //  a DCD trajectory file be updated
00143   int dcdUnitCell;  // Whether to write unit cell information in the DCD
00144         int velDcdFrequency;            //  How often (in timesteps) should
00145                                         //  a velocity DCD file be updated
00146         int xstFrequency;               //  How often (in timesteps) should
00147                                         //  a XST trajectory file be updated
00148         char auxFilename[128];          //  auxilary output filename
00149         char dcdFilename[128];          //  DCD filename
00150         char velDcdFilename[128];       //  Velocity DCD filename
00151         char xstFilename[128];          //  Extended system trajectory filename
00152         char outputFilename[128];       //  Output file name.  This name will
00153                                         //  have .coor appended to it 
00154                                         //  for the coordinates and 
00155                                         //  .vel appended to
00156                                         //  it for the velocities
00157         char restartFilename[128];      //  Base name of the restart file
00158         int restartFrequency;           //  How often (in timesteps) shoud the
00159                                         //  restart files be updated
00160         Bool restartSave;               //  unique filenames for restart files
00161         Bool binaryRestart;             //  should restart files be
00162                                         //  binary format rather than PDB
00163         Bool binaryOutput;              //  should output files be
00164                                         //  binary format rather than PDB
00165         BigReal cutoff;                 //  Cutoff distance
00166         BigReal margin;                 //  Fudge factor on patch size
00167         BigReal patchDimension;         //  Dimension of each side of a patch
00168                                         //  This is either cutoff+margin or
00169                                         //  pairlistDist+margin depending on
00170                                         //  whether or not switching is on
00171                                         //  or not
00172         BigReal limitDist;              //  Distance below which nonbonded
00173                                         //  forces between atoms are limited
00174         Bool switchingActive;           //  Flag TRUE->using switching function
00175                                         //  for electrostatics and vdw
00176         BigReal switchingDist;          //  Distance at which switching
00177                                         //  becomes active
00178         BigReal pairlistDist;           //  Distance within which atom pairs 
00179                                         //  should be added to pairlist
00180         int pairlistMinProcs;           //  Minimum number of processors
00181                                         //  to enable pairlists
00182         int usePairlists;               //  Derived from pairlistMinProcs
00183 
00184         int pairlistsPerCycle;          //  regenerate x times per cycle
00185         BigReal pairlistShrink;         //  tol *= (1 - x) on regeneration
00186         BigReal pairlistGrow;           //  tol *= (1 + x) on trigger
00187         BigReal pairlistTrigger;        //  trigger is atom > (1 - x) * tol
00188         int outputPairlists;            //  print pairlist warnings this often
00189 
00190         Bool constraintsOn;             //  Flag TRUE-> harmonic constraints 
00191                                         //  active
00192         int constraintExp;              //  Exponent for harmonic constraints
00193 
00194         /* BEGIN gf */
00195         Bool gridforceOn;               //  Flag TRUE -> gridforce active
00196         Bool gridforceVolts;            //  Flag TRUE -> gridforce using volts as units
00197         zVector gridforceScale;         //  Gridforce scale factor
00198         Bool gridforceContA1;           //  Flag TRUE -> grid continuous in A1 direction
00199         Bool gridforceContA2;           //  Flag TRUE -> grid continuous in A2 direction
00200         Bool gridforceContA3;           //  Flag TRUE -> grid continuous in A3 direction
00201         zVector gridforceVOffset;       //  Gridforce potential offsets
00202         /* END gf */
00203         Bool mgridforceOn;
00204         MGridforceParamsList mgridforcelist;
00205 
00206         //****** BEGIN selective restraints (X,Y,Z) changes 
00207         Bool selectConstraintsOn;       //  Flag TRUE-> selective restraints  
00208                                         //  active
00209         Bool constrXOn, constrYOn,       
00210              constrZOn;                 //  Flag TRUE-> select which Cartesian 
00211                                         //  component to restrain
00212         //****** END selective restraints (X,Y,Z) changes 
00213         BigReal constraintScaling;      //  Scaling factor for constraint forces
00214 
00215         //****** BEGIN CHARMM/XPLOR type changes
00216         Bool paraTypeXplorOn;           //  FLAG TRUE-> parametrs are XPLOR format (default)
00217         Bool paraTypeCharmmOn;          //  FLAG TRUE-> parametrs are CHARMM format
00218         //****** END CHARMM/XPLOR type changes
00219 
00220         //****** BEGIN moving constraints changes 
00221         Bool movingConstraintsOn;       //  Flag TRUE-> moving constraints 
00222                                         //  active
00223         zVector movingConsVel;           //  Velocity of the movement, A/timestep
00224         //****** END moving constraints changes 
00225         //****** BEGIN rotating constraints changes 
00226         Bool rotConstraintsOn;          //  Flag TRUE-> rotating constraints 
00227                                         //  active
00228         zVector rotConsAxis;             //  Axis of rotation
00229         zVector rotConsPivot;            //  Pivot point of rotation
00230         BigReal rotConsVel;             //  Velocity of rotation, Deg/timestep
00231         //****** END rotating constraints changes 
00232 
00233         //****** BEGIN moving drag changes
00234         Bool movDragOn;               //  Flag TRUE-> moving drag active
00235         char movDragFile[128];        //  PDB file defining dragged atoms
00236                                       //  by non-zero value in the column
00237         BigReal movDragGlobVel;       //  global drag velocity (A/step)
00238         char movDragVelFile[128];     //  PDB file; XYZ scale moving drag
00239                                       //  velocity for each atom
00240         //****** END moving drag changes
00241         //****** BEGIN rotating drag changes
00242         Bool rotDragOn;               //  Flag TRUE-> rotating drag active
00243         char rotDragFile[128];        //  PDB file defining dragged atoms
00244                                       //  by non-zero value in the column
00245         char rotDragAxisFile[128];    //  PDB file; XYZ define axes for atoms;
00246         char rotDragPivotFile[128];   //  PDB file; XYZ define pivots for atoms
00247         BigReal rotDragGlobVel;       //  global drag velocity (deg/step)
00248         char rotDragVelFile[128];     //  PDB file; B or O scales angular
00249                                       //  velocity for each atom
00250         //****** END rotating drag changes
00251         //****** BEGIN "constant" torque changes
00252         Bool consTorqueOn;            //  Flag TRUE-> "constant" torque active
00253         char consTorqueFile[128];     //  PDB file defining torqued atoms
00254                                       //  by non-zero value in the column
00255         char consTorqueAxisFile[128]; //  PDB file; XYZ define axes for atoms;
00256         char consTorquePivotFile[128];//  PDB file; XYZ define pivots for atoms
00257         BigReal consTorqueGlobVal;    //  global "torque" (Kcal/(mol*A^2))
00258         char consTorqueValFile[128];  //  PDB file; B or O scales "torque"
00259                                       //  for each atom
00260         //****** END "constant" torque changes
00261 
00262         //****** BEGIN SMD constraints changes   
00263         Bool SMDOn;                     //  Flag TRUE-> SMD constraints active
00264         BigReal SMDVel;                 //  Velocity of the movement, A/timestep
00265         zVector SMDDir;                  //  Direction of the movement
00266         BigReal SMDk;                   //  Elastic constant for SMD
00267         BigReal SMDk2;                  //  Transverse elastic constant for SMD
00268         char SMDFile[128];              //  File for SMD information
00269         int SMDOutputFreq;              //  Output frequency for SMD constr.
00270         //****** END SMD constraints changes 
00271         
00272   //****** BEGIN tabulated energy section
00273   Bool tabulatedEnergies;
00274   int tableNumTypes;
00275   char tabulatedEnergiesFile[128];
00276   char tableInterpType[128];
00277   Real tableSpacing;
00278   BigReal tableMaxDist;
00279   //****** END tabulated energy section
00280 
00281         // TMD
00282         Bool TMDOn;
00283         BigReal TMDk;
00284         char TMDFile[128];
00285         int TMDOutputFreq;
00286         int TMDFirstStep, TMDLastStep;
00287         BigReal TMDInitialRMSD, TMDFinalRMSD;
00288 
00289         
00290 // Modifications for alchemical simulations
00291 // Begin alch flags
00292 
00293   Bool alchOn;              //  Doing alchemical simulation?
00294   Bool alchFepOn;           //  Doing alchemical simulation?
00295   Bool alchThermIntOn;      //  Doing thermodynamic integration?
00296   int alchMethod;           //  Which alchemical method to use? fep or ti
00297   BigReal alchLambda;       //  lambda for dynamics
00298   BigReal alchLambda2;      //  lambda for comparison
00299   BigReal alchTemp;         //  temperature for alchemical calculation
00300   int alchOutFreq;          //  freq. of alchemical output
00301   char alchOutFile[128];    //  alchemical output filename
00302   int alchEquilSteps;       //  # of equil. steps in the window
00303   BigReal alchVdwShiftCoeff; //  r2 shift coeff used for generating  
00304                             //  the alchemical altered vdW interactions
00305   BigReal alchElecLambdaStart;  //  lambda value for starting point of
00306                                 //  electrostatic interactions of 
00307                                 //  exnihilated particles.  For annihilated
00308                                 //  particles the starting point is
00309                                 //  (1-alchElecLambdaStart)
00310   BigReal alchVdwLambdaEnd;  //  lambda value for endpoint of vdW
00311                              //  interactions of exnihilated particles.
00312                              //  For annihilated particles the endpoint is 
00313                              //  (1-alchVdwLambdaEnd)
00314   Bool alchDecouple;  // alchemical decoupling rather than annihilation
00315 
00316 // End alch flags
00317 //fepe
00318 
00319   
00320         Bool lesOn;                     //  Locally enhanced sampling?
00321         int lesFactor;                  //  local enhancement factor
00322         Bool lesReduceTemp;             //  Reduce enhanced atom temperature?
00323         Bool lesReduceMass;             //  Reduce enhanced atom mass?
00324 
00325         Bool extForcesOn;               //  Are ext command forces present?
00326         char extForcesCommand[256];
00327         char extCoordFilename[128];
00328         char extForceFilename[128];
00329 
00330         Bool drudeOn;       // Perform integration of Drude oscillators?
00331         BigReal drudeTemp;  // (low) temperature for freezing Drude oscillators
00332 
00333         Bool pairInteractionOn;         //  Calculate pair interactions?
00334         int pairInteractionGroup1;      //  Interaction group 1.
00335         int pairInteractionGroup2;      //  Interaction group 2.
00336         Bool pairInteractionSelf;       //  Compute just within group.
00337      
00338   Bool cosAngles;    // Can some angles be cos-based
00339         Bool globalForcesOn;            //  Are global forces present?
00340         Bool tclForcesOn;               //  Are Tcl forces present?
00341         Bool tclBCOn;                   //  Are Tcl boundary forces present
00342         char *tclBCScript;              //  Script defining tclBC calcforces
00343         char tclBCArgs[128];            //  Extra args for calcforces command
00344         Bool freeEnergyOn;              //  Doing free energy perturbation?
00345         Bool miscForcesOn;              //  Using misc forces?
00346         Bool colvarsOn;         //  Using the colvars module?
00347 
00348         Bool fixedAtomsOn;              //  Are there fixed atoms?
00349         Bool fixedAtomsForces;          //  Calculate forces anyway?
00350 
00351         Bool langevinOn;                //  Flag TRUE-> langevin dynamics active
00352         BigReal langevinTemp;           //  Temperature for Langevin dynamics
00353         BigReal langevinDamping;        //  Damping coefficient (1/ps)
00354         Bool langevinHydrogen;          //  Flag TRUE-> apply to hydrogens
00355 
00356         Bool globalOn;                  //  Flag TRUE-> use global integrator
00357         Bool dihedralOn;                //  Flag TRUE-> dihedral dynamics active
00358         Bool COLDOn;                    //  Flag TRUE-> constrained overdamped
00359                                         //  langevin dynamics active
00360         BigReal COLDRate;               //  Damping coefficient for COLD.
00361         BigReal COLDTemp;               //  Temperature for COLD.
00362 
00363         Bool tCoupleOn;                 //  Flag TRUE-> Temperature coupling 
00364                                         //  active
00365         BigReal tCoupleTemp;            //  Temperature for temp coupling
00366 
00367         int rescaleFreq;                //  Velocity rescale frequency
00368         BigReal rescaleTemp;            //  Temperature to rescale to
00369 
00370         int reassignFreq;               //  Velocity reassignment frequency
00371         BigReal reassignTemp;           //  Temperature to reassign to
00372         BigReal reassignIncr;           //  Added to reassignTemp each time
00373         BigReal reassignHold;           //  Hold reassignTemp at this value
00374 
00375         Bool useGroupPressure;          //  Use group rather than atomic
00376                                         //  quantities for pressure calc
00377 
00378         Bool excludeFromPressure;       //  Flag TRUE-> some atoms not rescaled
00379  
00380         Bool useFlexibleCell;           //  Use anisotropic cell fluctuations
00381         Bool useConstantArea;           //  x,y dimensions fixed.
00382         Bool useConstantRatio;          //  x,y ratio fixed.
00383 
00384   Bool fixCellDims; // fix the cell dimensions
00385   Bool fixCellDimX;
00386   Bool fixCellDimY;
00387   Bool fixCellDimZ;
00388 
00389         Bool berendsenPressureOn;       //  Berendsen pressure bath
00390         BigReal berendsenPressureTarget;
00391         BigReal berendsenPressureCompressibility;
00392         BigReal berendsenPressureRelaxationTime;
00393         int berendsenPressureFreq;
00394 
00395         Bool langevinPistonOn;          //  Langevin piston pressure control
00396         BigReal langevinPistonTarget;
00397         BigReal langevinPistonPeriod;
00398         BigReal langevinPistonDecay;
00399         BigReal langevinPistonTemp;
00400 
00401         BigReal surfaceTensionTarget;
00402 
00403         Bool pressureProfileOn;         // Compute lateral pressure profile?
00404         int pressureProfileSlabs;       // Number of slabs
00405         int pressureProfileFreq;        // How often to store profile data
00406         int pressureProfileAtomTypes;
00407         Bool pressureProfileEwaldOn;    // Compute Ewald contribution?
00408         int pressureProfileEwaldX;
00409         int pressureProfileEwaldY;
00410         int pressureProfileEwaldZ;
00411         
00412         zVector strainRate;
00413         zVector strainRate2; // off diagonal elements (xy, xz, yz)
00414 
00415         unsigned int randomSeed;        //  Seed for random number generator
00416 
00417         Bool FMAOn;                     //  Flag TRUE-> FMA active
00418         int FMALevels;                  //  Number of Levels for FMA
00419         int FMAMp;                      //  Number of multipole terms for FMA
00420         Bool FMAFFTOn;                  //  FFT on/off flag for FMA
00421         int FMAFFTBlock;                //  FFT blocking factor for FMA
00422 
00423         Bool fullDirectOn;              //  Should direct calculations of
00424                                         //  full electrostatics be performed?
00425 
00426         Bool PMEOn;                     //  Flag TRUE -> PME active
00427         BigReal PMETolerance;           //  Direct space tolerance
00428         BigReal PMEEwaldCoefficient;    //  From tolerance and cutoff
00429         int PMEInterpOrder;             //  Order of interpolation
00430         int PMEGridSizeX;               //  No. of grid points in x dim
00431         int PMEGridSizeY;               //  No. of grid points in y dim
00432         int PMEGridSizeZ;               //  No. of grid points in z dim
00433         BigReal PMEGridSpacing;         //  Maximum spacing between points
00434         int PMEProcessors;              //  No. of processors to use
00435         int PMEMinSlices;               //  Min slices per PME slab
00436         int PMEMinPoints;               //  Min points per PME pencil
00437         Bool PMEBarrier;                //  Use barrier before sendTrans
00438         int PMEPencils;                 //  Size of pencil grid in each dim
00439 
00440         Bool useDPME;                   //  Flag TRUE -> old DPME code
00441         Bool useOptPME;                 //  Flag TRUE -> use the scalable version of PME
00442         Bool useManyToMany;             //  Flag TRUE -> use the manytomany optimization of PME. 
00443                                         //  This flag requres useOptPME to be set.
00444 
00445         Bool FFTWEstimate;
00446         Bool FFTWUseWisdom;
00447         char FFTWWisdomFile[128];
00448         char *FFTWWisdomString;
00449 
00450         Bool minimizeCGOn;              //  Flag TRUE-> CG minimization active
00451         Bool minVerbose;                //  Flag TRUE-> print extra minimization data
00452         BigReal minTinyStep;            //  Minimization parameter
00453         BigReal minBabyStep;            //  Minimization parameter
00454         BigReal minLineGoal;            //  Minimization parameter
00455         Bool minimizeOn;                //  Flag TRUE-> minimization active
00456         BigReal maximumMove;            //  Maximum movement per timestep 
00457                                         //  during minimization
00458 
00459         Bool sphericalBCOn;             //  Flag TRUE-> spherical boundary 
00460                                         //  conditions are active
00461         zVector sphericalCenter;                //  Center specified by user
00462         BigReal sphericalBCk1;          //  First force constant for 
00463                                         //  spherical BC
00464         BigReal sphericalBCk2;          //  Second force constant for 
00465                                         //  spherical BC
00466         BigReal sphericalBCr1;          //  First radius for spherical BC
00467         BigReal sphericalBCr2;          //  Second radius for spherical BC
00468         int sphericalBCexp1;            //  First radius for spherical BC
00469         int sphericalBCexp2;            //  Second radius for spherical BC
00470 
00471         Bool cylindricalBCOn;           //  Flag TRUE->cylindrical boundary
00472                                         //  conditions are active
00473         zVector cylindricalCenter;
00474         char cylindricalBCAxis;         //  'x', 'y', or 'z'
00475         BigReal cylindricalBCr1;
00476         BigReal cylindricalBCr2;
00477         BigReal cylindricalBCl1;
00478         BigReal cylindricalBCl2;
00479         int cylindricalBCexp1;
00480         int cylindricalBCexp2;
00481         BigReal cylindricalBCk1;
00482         BigReal cylindricalBCk2;
00483 
00484         Bool eFieldOn;                  //  Should a electric field be applied
00485         zVector eField;                 //  Electric field vector to be applied
00486         BigReal eFieldFreq;             // Frequency of the electric field
00487         BigReal eFieldPhase;            // Phase phi, cos(w*t-phi*PI/180) 
00488 
00489         Bool stirOn;                   // Should a stirring torque be applied
00490         char stirFilename[128];        // Stirring filename (atoms marked)
00491         //do the below two even needed to be defined?
00492         BigReal stirStartingTheta;     // Stir starting theta offset
00493         BigReal stirVel;               // Stir angular velocity
00494         BigReal stirK;                 // Stir force harmonic spring constant
00495         zVector stirAxis;              // Direction of stir axis
00496         zVector stirPivot;             // Pivot point of stir axis
00497 
00498         Bool extraBondsOn;              // read extra bonded forces
00499 
00500         Bool consForceOn;               //  Should constant force be applied
00501   char consForceFile[128];
00502         BigReal consForceScaling;
00503 
00504         int outputEnergies;             //  Number of timesteps between energy
00505                                         //  outputs
00506 
00507         int outputMomenta;              //  Number of timesteps between momentum
00508                                         //  outputs
00509 
00510         int outputTiming;               //  Number of timesteps between timing
00511                                         //  outputs
00512 
00513         int outputPressure;             //  Number of timesteps between pressure
00514                                         //  tensor outputs
00515 
00516         Bool mergeCrossterms;           //  Merge crossterm energy w/ dihedrals
00517 
00518         int firstTimestep;              //  Starting timestep.  Will be 0 unless
00519                                         //  restarting a simulation
00520 
00521         MTSChoices MTSAlgorithm;        //  What multiple timestep algorithm
00522                                         //  to use
00523 
00524         int longSplitting;              //  What electrostatic splitting        
00525                                         //  to use
00526 
00527         int splitPatch;                 // How are patches determined?
00528         BigReal hgroupCutoff;           // what is the added hydrogen margin?
00529 
00530         int mollyOn;                    // mollify long range forces?
00531         BigReal mollyTol;               // error tolerance for molly
00532         int mollyIter;                  // max number of iterations for molly
00533 
00534         int rigidBonds;                 // what type of rigid bonds to hydrogens
00535                                         // none, all, or only water
00536 
00537         BigReal rigidTol;               // error tolerance for rigid bonds
00538         int rigidIter;                  // Number of NR iterations 
00539         int rigidDie;                   // die if rigidTol not achieved
00540 
00541         Bool useSettle;                 // Use SETTLE; requires rigid waters
00542 
00543         Bool testOn;                    //  Do tests rather than simulation
00544         Bool commOnly;                  //  Don't do any force evaluations
00545 
00546         int totalAtoms;                 //  Total Number of atoms in simulation
00547         int maxSelfPart;                // maximum number of self partitions
00548                                         // that a patch can be split into
00549         int maxPairPart;                // maximum number of pair partitions
00550                                         // that a patch can be split into
00551         int numAtomsSelf;               // maximum number of atoms in a single
00552                                         // self-compute 
00553         int numAtomsSelf2;              // maximum number of atoms in a pair compute
00554                                         // in the presence of twoAwayX,Y,Z options
00555         int numAtomsPair;               // maximum number of atoms in a single
00556                                         // pair-compute 
00557         int numAtomsPair2;              // maximum number of atoms in a single
00558                                         // pair-compute 
00559         int minAtomsPerPatch;           // minimum average atoms per patch
00560                                         //  (may create larger patches) 
00561         int maxExclusionFlags;          // maximum size of exclusion check list
00562                                         // for any given atom
00563         Bool outputPatchDetails;        // print number of atoms per patch
00564 
00565         //
00566         // hydrogen bond simulation parameters
00567         //
00568 
00569         // should the hydrogen bond term be used?  If FALSE, all other
00570         // hydrogen bond parameters are unnecessary in simulation.
00571         Bool HydrogenBonds;
00572 
00573         // should the antecedent atom be used in the calculation of hbonds?
00574         Bool useAntecedent;
00575 
00576         // exponents used in hydrogen bond energy function:
00577         //   aaAngleExp = exp for H-A-AA angle term (n)
00578         //   haAngleExp = exp for D-H-A angle term (m)
00579         //   distAttExp = exp for attractive A-D distance term (j)
00580         //   distRepExp = exp for repulsive A-D distance term (i)
00581         int aaAngleExp, haAngleExp, distAttExp, distRepExp;
00582 
00583         // cutoff D-H-A angle, and on/off angles for switch fcn (in degrees)
00584         BigReal dhaCutoffAngle, dhaOnAngle, dhaOffAngle;
00585 
00586         // cutoff distance for D-A separation in hbonds (in Angstroms), and
00587         // on/off distances for hbond radial term switching function
00588         BigReal daCutoffDist, daOnDist, daOffDist;
00589 
00590         // IMD parameters
00591         int IMDon;    // enable IMD
00592         int IMDport;  // port on which to listen for connections
00593         int IMDfreq;  // frequency at which coordinates will be available
00594         int IMDwait;  // if true, pause the simulation when there is no
00595                       // connection
00596         int IMDignore;  // IMD connection does not influence simulation
00597                         // only sends coordinates and energies to VMD
00598         
00599         // AMBER options
00600         Bool amberOn; // FLAG TRUE-> amber force field is used
00601         Bool readExclusions; // FLAG TRUE-> Read exclusions from parm file
00602         BigReal vdwscale14; //  Scaling factor for 1-4 VDW interactions
00603 
00604         // GROMACS options
00605         Bool gromacsOn; // FLAG TRUE -> gromacs-style force field is used
00606 
00607         // OPLS options
00608         Bool vdwGeometricSigma;  // Lennard-J sigma uses geometric mean
00609 
00610         // ScriptTcl argument passing
00611         BigReal scriptArg1;
00612         BigReal scriptArg2;
00613         BigReal scriptArg3;
00614         BigReal scriptArg4;
00615         BigReal scriptArg5;
00616 
00617         Bool useCompressedPsf;
00618         Bool genCompressedPsf;
00619 
00620         Bool usePluginIO;
00621 
00622         //default value is -1
00623         int proxySendSpanningTree;
00624         int proxyRecvSpanningTree;
00625 
00626 public:
00627 
00628         SimParameters() : mgridforcelist() {};
00629         SimParameters(ConfigList *c, char *&cwd) : mgridforcelist() {
00630           initialize_config_data(c,cwd);
00631         };
00632         ~SimParameters() {};
00633 
00634         void initialize_config_data(ConfigList *, char *&cwd);
00635                                         //  Initialize SimParameters data
00636                                         //  from the ConfigList object
00637         void send_SimParameters(MOStream *);    
00638                                         //  Used by the master process
00639                                         //  to send the paramters to
00640                                         //  the other processors
00641         void receive_SimParameters(MIStream *);  
00642                                         //  Used by the other processors
00643                                         //  to receive the data from the
00644                                         //  master process
00645         void scriptSet(const char *, const char *);
00646                                         //  Set parameters at run time
00647 
00648         int isSendSpanningTreeOn(){ return proxySendSpanningTree == 1; }
00649         int isSendSpanningTreeUnset() { return proxySendSpanningTree == -1; }
00650         int isRecvSpanningTreeOn(){ return proxyRecvSpanningTree == 1; }
00651         int isRecvSpanningTreeUnset() { return proxyRecvSpanningTree == -1; }
00652 
00653 private:
00654 
00655         void config_parser(ParseOptions &opts);
00656 
00657         void config_parser_basic(ParseOptions &opts);
00658         void config_parser_fileio(ParseOptions &opts);
00659         void config_parser_fullelect(ParseOptions &opts);
00660         void config_parser_methods(ParseOptions &opts);
00661         void config_parser_constraints(ParseOptions &opts);
00662         /* BEGIN gf */
00663         void config_parser_gridforce(ParseOptions &opts);
00664         /* END gf */
00665         void config_parser_movdrag(ParseOptions &opts);
00666         void config_parser_rotdrag(ParseOptions &opts);
00667         void config_parser_constorque(ParseOptions &opts);
00668         void config_parser_boundary(ParseOptions &opts);
00669         void config_parser_misc(ParseOptions &opts);
00670         void config_parser_mgridforce(ParseOptions &opts);
00671         void parse_mgrid_string_param(ConfigList *config,
00672                                       const char *fieldname, char** dest);
00673         void parse_mgrid_params(ConfigList *config);
00674         void print_mgrid_params();
00675   
00676         void check_config(ParseOptions &opts, ConfigList *config, char *&cwd);
00677 
00678         void print_config(ParseOptions &opts, ConfigList *config, char *&cwd);
00679 
00680         int fmaFrequency;               //  outdated parameter name
00681         char loadStrategy[64];          //  Load balancing strategy
00682 
00683 };
00684 
00685 #endif
00686 

Generated on Sun Nov 8 04:07:18 2009 for NAMD by  doxygen 1.3.9.1