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

Generated on Sat Sep 6 04:07:42 2008 for NAMD by  doxygen 1.3.9.1