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

Molecule.h

Go to the documentation of this file.
00001 
00007 /*
00008    This class is used to store all of the structural       
00009    information for a simulation.  It reads in this information 
00010    from a .psf file, cross checks and obtains some information
00011    from the Parameters object that is passed in, and then     
00012    stores all this information for later use. 
00013 */
00014 
00015 
00016 #ifndef MOLECULE_H
00017 
00018 #define MOLECULE_H
00019 
00020 #include "parm.h"
00021 
00022 #include "common.h"
00023 #include "NamdTypes.h"
00024 #include "structures.h"
00025 #include "ConfigList.h"
00026 #include "Vector.h"
00027 #include "UniqueSet.h"
00028 #include "Hydrogen.h"
00029 #include "GromacsTopFile.h"
00030 /* BEGIN gf */
00031 #include "GridForceGrid.h"
00032 #include "Tensor.h"
00033 /* END gf */
00034 
00035 // Go -- JLai
00036 #define MAX_GO_CHAINS          10
00037 #define MAX_RESTRICTIONS       10
00038 // End of Go
00039 
00040 #include "molfile_plugin.h"
00041 
00042 #include <vector>
00043 
00044 class SimParameters;
00045 class Parameters;
00046 class ConfigList;
00047 class PDB;
00048 class MIStream;
00049 class MOStream;
00050 
00051 class ExclElem;
00052 class BondElem;
00053 class AngleElem;
00054 class DihedralElem;
00055 class ImproperElem;
00056 class TholeElem;  // Drude model
00057 class AnisoElem;  // Drude model
00058 class CrosstermElem;
00059 class ResidueLookupElem;
00060 
00061 struct OutputAtomRecord;
00062 
00063 template<class Type> class ObjectArena;
00064 
00065 class ExclusionCheck {
00066 public:
00067   int32 min,max;
00068   char *flags;
00069 
00070   ExclusionCheck(){
00071       min=0;
00072       max=-1;
00073       flags = NULL;
00074   }
00075   ExclusionCheck(const ExclusionCheck& chk){
00076       min = chk.min;
00077       max = chk.max;
00078       if(max>min){ 
00079         flags = new char[max-min+1];
00080         memcpy(flags, chk.flags, sizeof(char)*(max-min+1));
00081       }
00082   }
00083   ExclusionCheck &operator=(const ExclusionCheck& chk){
00084     min = chk.min;
00085     max = chk.max;
00086     if(flags) delete [] flags;
00087     flags = NULL;
00088     if(max>min){
00089         flags = new char[max-min+1];
00090         memcpy(flags, chk.flags, sizeof(char)*(max-min+1));
00091     }
00092     return *this;
00093   }
00094   ~ExclusionCheck(){
00095       if(flags) delete [] flags;
00096   }
00097 };
00098 #define EXCHCK_FULL 1
00099 #define EXCHCK_MOD 2
00100 
00101 // Ported by JLai -- JE
00102 typedef struct go_val
00103 {
00104   Real epsilon;      // Epsilon
00105   int exp_a;         // First exponent for attractive L-J term
00106   int exp_b;         // Second exponent for attractive L-J term
00107   int exp_rep;       // Exponent for repulsive L-J term
00108   Real sigmaRep;     // Sigma for repulsive term
00109   Real epsilonRep;   // Epsilon for replusive term
00110   Real cutoff;       // Cutoff distance for Go calculation
00111   int  restrictions[MAX_RESTRICTIONS];  //  List of residue ID differences to be excluded from Go calculation
00112 } GoValue;
00113 // End of port - JL
00114 
00115 //only used for compressing the molecule information
00116 typedef struct seg_resid
00117 {
00118     char segname[11];
00119     int resid;
00120 }AtomSegResInfo;
00121 
00122 // List maintaining the global atom indicies sorted by helix groups.
00123 class Molecule
00124 {
00125  private:
00126 typedef struct constraint_params
00127 {
00128    Real k;    //  Force constant
00129    Vector refPos; //  Reference position for restraint
00130 } ConstraintParams;
00131 
00132 
00133 
00134 /* BEGIN gf */
00135 typedef struct gridfrc_params
00136 {
00137     Real k;     // force multiplier
00138     Charge q;   // charge
00139 } GridforceParams;
00140 /* END gf */
00141 
00142 
00143 typedef struct stir_params
00144 {
00145   Real startTheta;
00146   Vector refPos;  //  Reference position for stirring
00147 } StirParams;
00148 
00149 typedef struct movdrag_params
00150 {
00151   Vector v;            //  Linear velocity (A/step)
00152 } MovDragParams;
00153 
00154 
00155 typedef struct rotdrag_params
00156 {
00157    Real v;              //  Angular velocity (deg/step)
00158    Vector a;            //  Rotation axis
00159    Vector p;            //  Rotation pivot point
00160 } RotDragParams;
00161 
00162 typedef struct constorque_params
00163 {
00164    Real v;              //  "Torque" value (Kcal/(mol*A^2))
00165    Vector a;            //  Rotation axis
00166    Vector p;            //  Rotation pivot point
00167 } ConsTorqueParams;
00168 
00169 #ifdef MEM_OPT_VERSION
00170 //indicate a range of atoms from aid1 to aid2
00171 struct AtomSet{
00172     AtomID aid1;
00173     AtomID aid2;
00174 
00175     int operator < (const AtomSet &a) const{
00176                 return aid1 < a.aid1;
00177         }
00178 };
00179 typedef ResizeArray<AtomSet> AtomSetList;
00180 #endif
00181 
00182 friend class ExclElem;
00183 friend class BondElem;
00184 friend class AngleElem;
00185 friend class DihedralElem;
00186 friend class ImproperElem;
00187 friend class TholeElem;  // Drude model
00188 friend class AnisoElem;  // Drude model
00189 friend class CrosstermElem;
00190 friend class WorkDistrib;
00191 
00192 private:
00193 
00194 #ifndef MEM_OPT_VERSION
00195         Atom *atoms;    //  Array of atom structures
00196         ObjectArena<char> *nameArena;
00197         AtomNameInfo *atomNames;//  Array of atom name info.  Only maintained on node 0 for VMD interface
00198         //replaced by atom signatures
00199         Bond *bonds;    //  Array of bond structures
00200         Angle *angles;    //  Array of angle structures
00201         Dihedral *dihedrals;  //  Array of dihedral structures
00202         Improper *impropers;  //  Array of improper structures                          
00203         Crossterm *crossterms;  //  Array of cross-term structures
00204 
00205         //These will be replaced by exclusion signatures
00206         Exclusion *exclusions;  //  Array of exclusion structures
00207         UniqueSet<Exclusion> exclusionSet;  //  Used for building
00208 
00209         int32 *cluster;   //  first atom of connected cluster
00210 
00211         ObjectArena<int32> *tmpArena;
00212         int32 **bondsWithAtom;  //  List of bonds involving each atom
00213         ObjectArena<int32> *arena;
00214 
00215         //function is replaced by atom signatures
00216         int32 **bondsByAtom;  //  List of bonds owned by each atom
00217         int32 **anglesByAtom;     //  List of angles owned by each atom
00218         int32 **dihedralsByAtom;  //  List of dihedrals owned by each atom
00219         int32 **impropersByAtom;  //  List of impropers owned by each atom
00220         int32 **crosstermsByAtom;  //  List of crossterms owned by each atom
00221 
00222         int32 **exclusionsByAtom; //  List of exclusions owned by each atom
00223         int32 **fullExclusionsByAtom; //  List of atoms excluded for each atom
00224         int32 **modExclusionsByAtom; //  List of atoms modified for each atom
00225         ObjectArena<char> *exclArena;
00226         ExclusionCheck *all_exclusions;
00227 
00228         // DRUDE
00229         int32 **tholesByAtom;  // list of Thole correction terms owned by each atom
00230         int32 **anisosByAtom;  // list of anisotropic terms owned by each atom
00231         // DRUDE
00232 
00233 #else
00234         //Indexing to constant pools to save space
00235         AtomCstInfo *atoms;
00236         Index *eachAtomMass; //after initialization, this could be freed (possibly)
00237         Index *eachAtomCharge; //after initialization, this could be freed (possibly)
00238         AtomNameIdx *atomNames;
00239         ObjectArena<char> *nameArena; //the space for names to be allocated  
00240 
00241         //A generally true assumption: all atoms are arranged in the order of clusters. In other words,
00242         //all atoms for a cluster must appear before/after any atoms in other clusters
00243         //The first atom in the cluster (which has the lowest atom id) stores the cluster size
00244         //other atoms in the cluster stores -1
00245         int32 *clusterSigs;
00246         int32 numClusters;
00247         
00248         AtomSigID *eachAtomSig;
00249         ExclSigID *eachAtomExclSig;
00250 
00251     AtomSetList *fixedAtomsSet;    
00252 #endif
00253  
00254   ResidueLookupElem *resLookup; // find residues by name
00255 
00256   AtomSegResInfo *atomSegResids; //only used for generating compressed molecule info
00257 
00258   Bond *donors;         //  Array of hydrogen bond donor structures
00259   Bond *acceptors;  //  Array of hydrogen bond acceptor
00260 
00261   // DRUDE
00262   DrudeConst *drudeConsts;  // supplement Atom data (length of Atom array)
00263   Thole *tholes;            // Thole (screened Coulomb) interactions
00264   Aniso *anisos;            // anisotropic terms
00265   Lphost *lphosts;          // lone pair hosts
00266   int32 *lphostIndexes;     // index for each LP into lphosts array
00267   // DRUDE
00268 
00269   int32 *consIndexes; //  Constraint indexes for each atom
00270   ConstraintParams *consParams;
00271 
00272 /* BEGIN gf */
00273   int32 **gridfrcIndexes;
00274   GridforceParams **gridfrcParams;
00275   GridforceGrid **gridfrcGrid;
00276 /* END gf */
00277 
00278         //  Parameters for each atom constrained
00279   int32 *stirIndexes; //Stirring indexes for each atoms
00280   StirParams *stirParams;
00281                           // Paramters for each atoms stirred
00282   int32 *movDragIndexes;  //  Moving drag indexes for each atom
00283   MovDragParams *movDragParams;
00284                                 //  Parameters for each atom moving-dragged
00285   int32 *rotDragIndexes;  //  Rotating drag indexes for each atom
00286   RotDragParams *rotDragParams;
00287                                 //  Parameters for each atom rotation-dragged
00288 
00289   Real *langevinParams;   //  b values for langevin dynamics
00290   int32 *fixedAtomFlags;  //  1 for fixed, -1 for fixed group, else 0
00291   int32 *exPressureAtomFlags; // 1 for excluded, -1 for excluded group.
00292 
00293   //In the memory optimized version: it will be NULL if the general
00294   //true assumption mentioned above holds. If not, its size is numClusters.
00295   //In the ordinary version: its size is numAtoms, and indicates the size
00296   //of connected cluster or 0.
00297   int32 *clusterSize;                            
00298 
00299         Real *rigidBondLengths;  //  if H, length to parent or 0. or
00300         //  if not H, length between children or 0.
00301 //fepb
00302         unsigned char *fepAtomFlags; 
00303 //fepe
00304 
00305   //occupancy and bfactor data from plugin-based IO implementation of loading structures
00306   float *occupancy;
00307   float *bfactor;
00308 
00309 
00310   // added during the trasition from 1x to 2
00311   SimParameters *simParams;
00312   Parameters *params;
00313 
00314 private:
00315         void initialize(SimParameters *, Parameters *param);
00316         // Sets most data to zero
00317 
00318   //LCPO
00319   int *lcpoParamType;
00320 
00321 #ifndef MEM_OPT_VERSION
00322         void read_psf_file(char *, Parameters *);
00323         //  Read in a .psf file given
00324         //  the filename and the parameter
00325         //  object to use          
00326   
00327   void read_atoms(FILE *, Parameters *);
00328         //  Read in atom info from .psf
00329   void read_bonds(FILE *, Parameters *);
00330         //  Read in bond info from .psf
00331   void read_angles(FILE *, Parameters *);
00332         //  Read in angle info from .psf
00333   void read_dihedrals(FILE *, Parameters *);
00334         //  Read in dihedral info from .psf
00335   void read_impropers(FILE *, Parameters *);
00336         //  Read in improper info from .psf
00337   void read_crossterms(FILE *, Parameters *);
00338         //  Read in cross-term info from .psf
00339   void read_donors(FILE *);
00340         //  Read in hydrogen bond donors from .psf
00341   void read_acceptors(FILE *);
00342         //  Read in hydrogen bond acceptors from .psf
00343   void read_exclusions(FILE *);
00344         //  Read in exclusion info from .psf
00345 
00346   // DRUDE: PSF reading
00347   void read_lphosts(FILE *);
00348         //  Read in lone pair hosts from Drude PSF
00349   void read_anisos(FILE *);
00350         //  Read in anisotropic terms from Drude PSF
00351   // DRUDE
00352 
00353   //LCPO
00354   //input type is Charmm/Amber/other
00355   //0 - Charmm/Xplor
00356   //1 - Amber TODO
00357   //2 - Plugin TODO
00358   //3 - Gromacs TODO
00359   void assignLCPOTypes(int inputType);
00360 
00361   //pluginIO-based loading atoms' structure
00362   void plgLoadAtomBasics(molfile_atom_t *atomarray);
00363   void plgLoadBonds(int *from, int *to); //atom index is 1-based in the parameters
00364   void plgLoadAngles(int *plgAngles);
00365   void plgLoadDihedrals(int *plgDihedrals);
00366   void plgLoadImpropers(int *plgImpropers);
00367   void plgLoadCrossterms(int *plgCterms);
00368 
00369         //  List of all exclusions, including
00370         //  explicit exclusions and those calculated
00371         //  from the bonded structure based on the
00372         //  exclusion policy.  Also includes 1-4's.
00373   void build_lists_by_atom();
00374         //  Build the list of structures by atom
00375 
00376   void build12excl(void);
00377   void build13excl(void);
00378   void build14excl(int);
00379 
00380   // DRUDE: extend exclusions for Drude and LP
00381   void build_inherited_excl(int);
00382   // DRUDE
00383   void stripFepExcl(void);
00384 
00385   void build_exclusions();
00386   // analyze the atoms, and determine which are oxygen, hb donors, etc.
00387   // this is called after a molecule is sent our (or received in)
00388   void build_atom_status(void);
00389 
00390 #else
00391   //the method to load the signatures of atoms etc. (i.e. reading the file in 
00392   //text fomrat of the compressed psf file)
00393   void read_mol_signatures(char *fname, Parameters *params, ConfigList *cfgList=0);     
00394   void load_one_inputatom(int aid, OutputAtomRecord *one, InputAtom *fAtom);
00395   void build_excl_check_signatures();  
00396 #endif
00397 
00398         void read_parm(const GromacsTopFile *);  
00399           
00400 public:
00401   // DRUDE
00402   int is_drude_psf;      // flag for reading Drude PSF
00403   int is_lonepairs_psf;  // flag for reading lone pairs from PSF
00404   // DRUDE
00405 
00406   // data for TIP4P
00407   Real r_om;
00408   Real r_ohc;
00409 
00410   // data for tail corrections
00411   BigReal tail_corr_ener;
00412   BigReal tail_corr_virial;
00413 
00414   int const * getLcpoParamType() {
00415     return lcpoParamType;
00416   }
00417 
00418 #ifdef MEM_OPT_VERSION
00419   AtomCstInfo *getAtoms() const { return atoms; }
00420   AtomNameIdx *getAtomNames() const { return atomNames; }
00421 #else
00422   Atom *getAtoms () const { return atoms; }
00423   AtomNameInfo *getAtomNames() const { return atomNames; }
00424 #endif
00425 
00426   AtomSegResInfo *getAtomSegResInfo() const { return atomSegResids; }
00427   
00428   // return number of fixed atoms, guarded by SimParameters
00429   int num_fixed_atoms() const {
00430     // local variables prefixed by s_
00431     int s_NumFixedAtoms = (simParams->fixedAtomsOn ? numFixedAtoms : 0);
00432     return s_NumFixedAtoms;  // value is "turned on" SimParameters
00433   }
00434 
00435   int num_fixed_groups() const {
00436     // local variables prefixed by s_
00437     int s_NumFixedAtoms = num_fixed_atoms();
00438     int s_NumFixedGroups = (s_NumFixedAtoms ? numFixedGroups : 0);
00439     return s_NumFixedGroups;  // value is "turned on" SimParameters
00440   }
00441 
00442   int num_group_deg_freedom() const {
00443     // local variables prefixed by s_
00444     int s_NumGroupDegFreedom = 3 * numHydrogenGroups;
00445     int s_NumFixedAtoms = num_fixed_atoms();
00446     int s_NumFixedGroups = num_fixed_groups();
00447     if (s_NumFixedGroups) s_NumGroupDegFreedom -= 3 * s_NumFixedGroups;
00448     if ( ! (s_NumFixedAtoms || numConstraints
00449           || simParams->comMove || simParams->langevinOn) ) {
00450       s_NumGroupDegFreedom -= 3;
00451     }
00452     return s_NumGroupDegFreedom;
00453   }
00454 
00455   int num_deg_freedom(int isInitialReport = 0) const {
00456     // local variables prefixed by s_
00457     int s_NumDegFreedom = 3 * numAtoms;
00458     int s_NumFixedAtoms = num_fixed_atoms();
00459     if (s_NumFixedAtoms) s_NumDegFreedom -= 3 * s_NumFixedAtoms;
00460     if (numLonepairs) s_NumDegFreedom -= 3 * numLonepairs;
00461     if ( ! (s_NumFixedAtoms || numConstraints
00462           || simParams->comMove || simParams->langevinOn) ) {
00463       s_NumDegFreedom -= 3;
00464     }
00465     if ( ! isInitialReport && simParams->pairInteractionOn) {
00466       //
00467       // DJH: a kludge?  We want to initially report system degrees of freedom
00468       //
00469       // this doesn't attempt to deal with fixed atoms or constraints
00470       s_NumDegFreedom = 3 * numFepInitial;
00471     }
00472     int s_NumFixedRigidBonds = 
00473       (simParams->fixedAtomsOn ? numFixedRigidBonds : 0);
00474     if (simParams->watmodel == WAT_TIP4) {
00475       // numLonepairs is subtracted here because all lonepairs have a rigid bond
00476       // to oxygen, but all of the LP degrees of freedom are dealt with above
00477       s_NumDegFreedom -= (numRigidBonds - s_NumFixedRigidBonds - numLonepairs);
00478     }
00479     else {
00480       // Non-polarized systems don't have LPs.
00481       // For Drude model, bonds that attach LPs are not counted as rigid;
00482       // LPs have already been subtracted from degrees of freedom.
00483       s_NumDegFreedom -= (numRigidBonds - s_NumFixedRigidBonds);
00484     }
00485     return s_NumDegFreedom;
00486   }
00487 
00488   int numAtoms;   //  Number of atoms                   
00489 
00490   int numRealBonds;   //  Number of bonds for exclusion determination
00491   int numBonds;   //  Number of bonds calculated, including extras
00492   int numAngles;    //  Number of angles
00493   int numDihedrals; //  Number of dihedrals
00494   int suspiciousAlchBonds;    //  angles dropped due to crossing FEP partitions
00495   int alchDroppedAngles;    //  angles dropped due to crossing FEP partitions
00496   int alchDroppedDihedrals; //  dihedrals dropped due to crossing FEP partitions
00497   int alchDroppedImpropers; //  impropers dropped due to crossing FEP partitions
00498   int numImpropers; //  Number of impropers
00499   int numCrossterms; //  Number of cross-terms
00500   int numDonors;          //  Number of hydrogen bond donors
00501   int numAcceptors; //  Number of hydrogen bond acceptors
00502   int numExclusions;  //  Number of exclusions
00503   int numTotalExclusions; //  Real Total Number of Exclusions // hack
00504 
00505   // DRUDE
00506   int numLonepairs; // Number of lone pairs
00507   int numDrudeAtoms;  // Number of Drude particles
00508   int numTholes;  // Number of Thole terms
00509   int numAnisos;  // Number of anisotropic terms
00510   int numLphosts;  // Number of lone pair hosts
00511   // DRUDE
00512   
00513   int numConstraints; //  Number of atoms constrained
00514 /* BEGIN gf */
00515   int numGridforceGrids;//  Number of gridforce grids
00516   int *numGridforces;   //  Number of atoms in gridforce file (array, one per grid)
00517 /* END gf */
00518   int numMovDrag;         //  Number of atoms moving-dragged
00519   int numRotDrag;         //  Number of atoms rotating-dragged
00520   int numConsTorque;  //  Number of atoms "constant"-torqued
00521   int numFixedAtoms;  //  Number of fixed atoms
00522   int numStirredAtoms;  //  Number of stirred atoms
00523   int numExPressureAtoms; //  Number of atoms excluded from pressure
00524   int numHydrogenGroups;  //  Number of hydrogen groups
00525   int maxHydrogenGroupSize;  //  Max atoms per hydrogen group
00526   int numMigrationGroups;  //  Number of migration groups
00527   int maxMigrationGroupSize;  //  Max atoms per migration group
00528   int numFixedGroups; //  Number of totally fixed hydrogen groups
00529   int numRigidBonds;  //  Number of rigid bonds
00530   int numFixedRigidBonds; //  Number of rigid bonds between fixed atoms
00531 //fepb
00532         int numFepInitial;  // no. of fep atoms with initial flag
00533         int numFepFinal;  // no. of fep atoms with final flag
00534 //fepe
00535 
00536   int numConsForce; //  Number of atoms that have constant force applied
00537   int32 *consForceIndexes;//  Constant force indexes for each atom
00538   Vector *consForce;  //  Constant force array
00539 
00540   int32 *consTorqueIndexes; //  "Constant" torque indexes for each atom
00541   ConsTorqueParams *consTorqueParams;
00542                                 //  Parameters for each atom "constant"-torqued
00543 
00544   // The following are needed for error checking because we
00545   // eliminate bonds, etc. which involve only fixed atoms
00546   int numCalcBonds; //  Number of bonds requiring calculation
00547   int numCalcAngles;  //  Number of angles requiring calculation
00548   int numCalcDihedrals; //  Number of dihedrals requiring calculation
00549   int numCalcImpropers; //  Number of impropers requiring calculation
00550   int numCalcCrossterms; //  Number of cross-terms requiring calculation
00551   int numCalcExclusions;  //  Number of exclusions requiring calculation
00552 
00553   // DRUDE
00554   int numCalcTholes;  // Number of Thole correction terms requiring calculation
00555   int numCalcAnisos;  // Number of anisotropic terms requiring calculation
00556   // DRUDE
00557 
00558   //  Number of dihedrals with multiple periodicity
00559   int numMultipleDihedrals; 
00560   //  Number of impropers with multiple periodicity
00561   int numMultipleImpropers; 
00562   // indexes of "atoms" sorted by hydrogen groups
00563   HydrogenGroup hydrogenGroup;
00564 
00565   // Ported by JLai -- JE - Go
00566   int numGoAtoms;         //  Number of atoms subject to Go forces -- ported by JLai/ Original by JE
00567   int32 *atomChainTypes;  //  Go chain type for each atom; from 1 to MAX_GO_CHAINS
00568   int32 *goSigmaIndices;  //  Indices into goSigmas
00569   Real  *goSigmas;        //  Sigma values for Go forces L-J type formula
00570   bool *goWithinCutoff;   //  Whether the reference atom-atom distance is within the Go cutoff
00571   Real  *goCoordinates;   //  Coordinates (x,y,z) for Go atoms in the native structure
00572   int *goResids;          //  Residue ID from PDB
00573   PDB *goPDB;             //  Pointer to PDB object to use
00574   // GO ENERGY CALCULATION CODE
00575   BigReal energyNative;    // Holds the energy value of the native structure
00576   BigReal energyNonnative; // Holds the energy value of the nonnative structure
00577   // GO ENERGY CALCULATION CODE
00578   // End of port - JL
00579 
00580   Molecule(SimParameters *, Parameters *param);
00581   Molecule(SimParameters *, Parameters *param, char *filename, ConfigList *cfgList=NULL);  
00582   Molecule(SimParameters *simParams, Parameters *param, molfile_plugin_t *pIOHdl, void *pIOFileHdl, int natoms);
00583   
00584   Molecule(SimParameters *, Parameters *, Ambertoppar *);
00585   void read_parm(Ambertoppar *);
00586 
00587   Molecule(SimParameters *, Parameters *, const GromacsTopFile *);
00588 
00589   ~Molecule();    //  Destructor
00590 
00591   void send_Molecule(MOStream *);
00592         //  send the molecular structure 
00593         //  from the master to the clients
00594 
00595   void receive_Molecule(MIStream *);
00596         //  receive the molecular structure
00597         //  from the master on a client
00598   
00599   void build_constraint_params(StringList *, StringList *, StringList *,
00600              PDB *, char *);
00601         //  Build the set of harmonic constraint 
00602         // parameters
00603 
00604 /* BEGIN gf */
00605   void build_gridforce_params(StringList *, StringList *, StringList *, StringList *, PDB *, char *);
00606         //  Build the set of gridForce-style force pars
00607 /* END gf */
00608 
00609   void build_movdrag_params(StringList *, StringList *, StringList *, 
00610           PDB *, char *);
00611         //  Build the set of moving drag pars
00612 
00613   void build_rotdrag_params(StringList *, StringList *, StringList *,
00614           StringList *, StringList *, StringList *,
00615           PDB *, char *);
00616         //  Build the set of rotating drag pars
00617 
00618   void build_constorque_params(StringList *, StringList *, StringList *,
00619              StringList *, StringList *, StringList *,
00620              PDB *, char *);
00621         //  Build the set of "constant" torque pars
00622 
00623 
00624   void build_constant_forces(char *);
00625         //  Build the set of constant forces
00626 
00627   void build_langevin_params(BigReal coupling, BigReal drudeCoupling,
00628       Bool doHydrogen);
00629   void build_langevin_params(StringList *, StringList *, PDB *, char *);
00630         //  Build the set of langevin dynamics parameters
00631 
00632 #ifdef MEM_OPT_VERSION
00633   void load_fixed_atoms(StringList *fixedFile);
00634 #endif
00635 
00636   void build_fixed_atoms(StringList *, StringList *, PDB *, char *);
00637         //  Determine which atoms are fixed (if any)
00638 
00639   void build_stirred_atoms(StringList *, StringList *, PDB *, char *);
00640         //  Determine which atoms are stirred (if any)
00641 
00642   void build_extra_bonds(Parameters *parameters, StringList *file);
00643 
00644 //fepb
00645         void build_fep_flags(StringList *, StringList *, PDB *, char *, const char *);
00646                                // selection of the mutant atoms
00647         void delete_alch_bonded(void);
00648 //fepe
00649 
00650   void build_exPressure_atoms(StringList *, StringList *, PDB *, char *);
00651         //  Determine which atoms are excluded from
00652                                 //  pressure (if any)
00653 
00654   // Ported by JLai -- Original JE - Go -- Change the unsigned int to ints
00655   void print_go_sigmas(); //  Print out Go sigma parameters
00656     void build_go_sigmas(StringList *, char *);
00657         //  Determine which atoms have Go forces applied
00658         //  calculate sigmas from distances between Go atom pairs
00659   void build_go_arrays(StringList *, char *);
00660         //  Determine which atoms have Go forces applied
00661   BigReal get_go_force(BigReal, int, int, BigReal *, BigReal *) const;
00662         //  Calculate the go force between a pair of atoms -- Modified to 
00663         //  output Go energies
00664   BigReal get_go_force_new(BigReal, int, int, BigReal *, BigReal *) const;
00665         //  Calculate the go force between a pair of atoms
00666   BigReal get_go_energy_new(BigReal, int, int) const;
00667         //  Calculate the go energy between a pair of atoms
00668   Bool atoms_1to4(unsigned int, unsigned int);
00669 // End of port -- JL  
00670 
00671   void reloadCharges(float charge[], int n);
00672 
00673         Bool is_lp(int);     // return true if atom is a lone pair
00674         Bool is_drude(int);     // return true if atom is a Drude particle
00675         Bool is_hydrogen(int);     // return true if atom is hydrogen
00676         Bool is_oxygen(int);       // return true if atom is oxygen
00677   Bool is_hydrogenGroupParent(int); // return true if atom is group parent
00678   Bool is_water(int);        // return true if atom is part of water 
00679   int  get_groupSize(int);     // return # atoms in (hydrogen) group
00680         int get_mother_atom(int);  // return mother atom of a hydrogen
00681 
00682   #ifdef MEM_OPT_VERSION
00683   //the way to get the cluster size if the atom ids of the cluster are
00684   //contiguous. The input parameter is the atom id that leads the cluster.
00685   int get_cluster_size_con(int aid) const { return clusterSigs[aid]; }  
00686   //the way to get the cluster size if the atoms ids of the cluster are
00687   //not contiguous. The input parameter is the cluster index.
00688   int get_cluster_size_uncon(int cIdx) const { return clusterSize[cIdx]; }
00689   int get_cluster_idx(int aid) const { return clusterSigs[aid]; }
00690   int get_num_clusters() const { return numClusters; }
00691   #else
00692   int get_cluster(int anum) const { return cluster[anum]; }
00693   int get_clusterSize(int anum) const { return clusterSize[anum]; }
00694   #endif
00695 
00696 #ifndef MEM_OPT_VERSION
00697   const float *getOccupancyData() { return (const float *)occupancy; }
00698   void setOccupancyData(molfile_atom_t *atomarray);
00699   void freeOccupancyData() { delete [] occupancy; occupancy=NULL; }
00700 
00701   const float *getBFactorData() { return (const float *)bfactor; }
00702   void setBFactorData(molfile_atom_t *atomarray);
00703   void freeBFactorData() { delete [] bfactor; bfactor=NULL; }
00704 #endif
00705 
00706   //  Get the mass of an atom
00707   Real atommass(int anum) const
00708   {
00709     #ifdef MEM_OPT_VERSION
00710     return atomMassPool[eachAtomMass[anum]];
00711     #else
00712     return(atoms[anum].mass);
00713     #endif
00714   }
00715 
00716   //  Get the charge of an atom
00717   Real atomcharge(int anum) const
00718   {
00719     #ifdef MEM_OPT_VERSION
00720     return atomChargePool[eachAtomCharge[anum]];
00721     #else
00722     return(atoms[anum].charge);
00723     #endif
00724   }
00725   
00726   //  Get the vdw type of an atom
00727   Index atomvdwtype(int anum) const
00728   {      
00729       return(atoms[anum].vdw_type);
00730   }
00731 
00732   #ifndef MEM_OPT_VERSION
00733   //  Retrieve a bond structure
00734   Bond *get_bond(int bnum) const {return (&(bonds[bnum]));}
00735 
00736   //  Retrieve an angle structure
00737   Angle *get_angle(int anum) const {return (&(angles[anum]));}
00738 
00739   //  Retrieve an improper strutcure
00740   Improper *get_improper(int inum) const {return (&(impropers[inum]));}
00741 
00742   //  Retrieve a dihedral structure
00743   Dihedral *get_dihedral(int dnum) const {return (&(dihedrals[dnum]));}
00744 
00745   //  Retrieve a cross-term strutcure
00746   Crossterm *get_crossterm(int inum) const {return (&(crossterms[inum]));}
00747   #endif
00748 
00749   // DRUDE: retrieve lphost structure
00750   Lphost *get_lphost(int atomid) const {
00751     // don't call unless simParams->drudeOn == TRUE
00752     // otherwise lphostIndexes array doesn't exist!
00753     int index = lphostIndexes[atomid];
00754     return (index != -1 ? &(lphosts[index]) : NULL);
00755   }
00756   // DRUDE
00757 
00758   #ifndef MEM_OPT_VERSION
00759   Bond *getAllBonds() const {return bonds;}
00760   Angle *getAllAngles() const {return angles;}
00761   Improper *getAllImpropers() const {return impropers;}
00762   Dihedral *getAllDihedrals() const {return dihedrals;}
00763   Crossterm *getAllCrossterms() const {return crossterms;}
00764   #endif
00765 
00766   // DRUDE: retrieve entire lphosts array
00767   Lphost *getAllLphosts() const { return lphosts; }
00768   // DRUDE
00769 
00770   //  Retrieve a hydrogen bond donor structure
00771   Bond *get_donor(int dnum) const {return (&(donors[dnum]));}  
00772 
00773   //  Retrieve a hydrogen bond acceptor structure
00774   Bond *get_acceptor(int dnum) const {return (&(acceptors[dnum]));} 
00775 
00776   Bond *getAllDonors() const {return donors;}
00777   Bond *getAllAcceptors() const {return acceptors;}
00778 
00779   //  Retrieve an exclusion structure
00780   #ifndef MEM_OPT_VERSION
00781   Exclusion *get_exclusion(int ex) const {return (&(exclusions[ex]));}
00782   #endif
00783 
00784   //  Retrieve an atom type
00785   const char *get_atomtype(int anum) const
00786   {
00787     if (atomNames == NULL)
00788     {
00789       NAMD_die("Tried to find atom type on node other than node 0");
00790     }
00791 
00792     #ifdef MEM_OPT_VERSION    
00793     return atomTypePool[atomNames[anum].atomtypeIdx];
00794     #else
00795     return(atomNames[anum].atomtype);
00796     #endif
00797   }
00798 
00799   //  Lookup atom id from segment, residue, and name
00800   int get_atom_from_name(const char *segid, int resid, const char *aname) const;
00801 
00802   //  Lookup number of atoms in residue from segment and residue
00803   int get_residue_size(const char *segid, int resid) const;
00804 
00805   //  Lookup atom id from segment, residue, and index in residue
00806   int get_atom_from_index_in_residue(const char *segid, int resid, int index) const;
00807 
00808   
00809   //  The following routines are used to get the list of bonds
00810   //  for a given atom.  This is used when creating the bond lists
00811   //  for the force objects  
00812 
00813   #ifndef MEM_OPT_VERSION
00814   int32 *get_bonds_for_atom(int anum)
00815       { return bondsByAtom[anum]; } 
00816   int32 *get_angles_for_atom(int anum) 
00817       { return anglesByAtom[anum]; }
00818   int32 *get_dihedrals_for_atom(int anum) 
00819       { return dihedralsByAtom[anum]; }
00820   int32 *get_impropers_for_atom(int anum) 
00821       { return impropersByAtom[anum]; }  
00822   int32 *get_crossterms_for_atom(int anum) 
00823       { return crosstermsByAtom[anum]; }  
00824   int32 *get_exclusions_for_atom(int anum)
00825       { return exclusionsByAtom[anum]; }
00826   const int32 *get_full_exclusions_for_atom(int anum) const
00827       { return fullExclusionsByAtom[anum]; }
00828   const int32 *get_mod_exclusions_for_atom(int anum) const
00829       { return modExclusionsByAtom[anum]; }
00830   #endif
00831   
00832   //  Check for exclusions, either explicit or bonded.
00833         //  Returns 1 for full, 2 for 1-4 exclusions.
00834   #ifdef MEM_OPT_VERSION
00835   int checkExclByIdx(int idx1, int atom1, int atom2) const;
00836   const ExclusionCheck *get_excl_check_for_idx(int idx) const{      
00837       return &exclChkSigPool[idx];
00838   }
00839   #else
00840   int checkexcl(int atom1, int atom2) const;
00841 
00842   const ExclusionCheck *get_excl_check_for_atom(int anum) const{      
00843       return &all_exclusions[anum];             
00844   }
00845   #endif
00846 
00847 /* BEGIN gf */
00848   // Return true or false based on whether or not the atom
00849   // is subject to grid force
00850   Bool is_atom_gridforced(int atomnum, int gridnum) const
00851   {
00852       if (numGridforceGrids)
00853       {
00854           return(gridfrcIndexes[gridnum][atomnum] != -1);
00855       }
00856       else
00857       {
00858           return(FALSE);
00859       }
00860   }
00861 /* END gf */
00862 
00863   //  Return true or false based on whether the specified atom
00864   //  is constrained or not.
00865   Bool is_atom_constrained(int atomnum) const
00866   {
00867     if (numConstraints)
00868     {
00869       //  Check the index to see if it is constrained
00870       return(consIndexes[atomnum] != -1);
00871     }
00872     else
00873     {
00874       //  No constraints at all, so just return FALSE
00875       return(FALSE);
00876     }
00877   }
00878 
00879   //  Return true or false based on whether the specified atom
00880   //  is moving-dragged or not.
00881   Bool is_atom_movdragged(int atomnum) const
00882   {
00883     if (numMovDrag)
00884     {
00885       //  Check the index to see if it is constrained
00886       return(movDragIndexes[atomnum] != -1);
00887     }
00888     else
00889     {
00890       //  No constraints at all, so just return FALSE
00891       return(FALSE);
00892     }
00893   }
00894 
00895   //  Return true or false based on whether the specified atom
00896   //  is rotating-dragged or not.
00897   Bool is_atom_rotdragged(int atomnum) const
00898   {
00899     if (numRotDrag)
00900     {
00901       //  Check the index to see if it is constrained
00902       return(rotDragIndexes[atomnum] != -1);
00903     }
00904     else
00905     {
00906       //  No constraints at all, so just return FALSE
00907       return(FALSE);
00908     }
00909   }
00910 
00911   //  Return true or false based on whether the specified atom
00912   //  is "constant"-torqued or not.
00913   Bool is_atom_constorqued(int atomnum) const
00914   {
00915     if (numConsTorque)
00916     {
00917       //  Check the index to see if it is constrained
00918       return(consTorqueIndexes[atomnum] != -1);
00919     }
00920     else
00921     {
00922       //  No constraints at all, so just return FALSE
00923       return(FALSE);
00924     }
00925   }
00926 
00927   //  Get the harmonic constraints for a specific atom
00928   void get_cons_params(Real &k, Vector &refPos, int atomnum) const
00929   {
00930     k = consParams[consIndexes[atomnum]].k;
00931     refPos = consParams[consIndexes[atomnum]].refPos;
00932   }
00933 
00934 /* BEGIN gf */
00935   void get_gridfrc_params(Real &k, Charge &q, int atomnum, int gridnum) const
00936   {
00937       k = gridfrcParams[gridnum][gridfrcIndexes[gridnum][atomnum]].k;
00938       q = gridfrcParams[gridnum][gridfrcIndexes[gridnum][atomnum]].q;
00939   }
00940   
00941   GridforceGrid* get_gridfrc_grid(int gridnum) const
00942   {
00943       GridforceGrid *result = NULL;
00944       if (gridnum >= 0 && gridnum < numGridforceGrids) {
00945           result = gridfrcGrid[gridnum];
00946       }
00947       return result;
00948   }
00949   
00950   int set_gridfrc_grid(int gridnum, GridforceGrid *grid)
00951   {
00952       if (grid && gridnum >= 0 && gridnum < numGridforceGrids) {
00953           gridfrcGrid[gridnum] = grid;
00954           return 0;
00955       } else {
00956           return -1;
00957       }
00958   }
00959 /* END gf */
00960 
00961   Real langevin_param(int atomnum) const
00962   {
00963     return(langevinParams ? langevinParams[atomnum] : 0.);
00964   }
00965 
00966   //  Get the stirring constraints for a specific atom
00967   void get_stir_refPos(Vector &refPos, int atomnum) const
00968   {
00969     refPos = stirParams[stirIndexes[atomnum]].refPos;
00970   }
00971 
00972 
00973   void put_stir_startTheta(Real theta, int atomnum) const
00974   {
00975     stirParams[stirIndexes[atomnum]].startTheta = theta;
00976   }
00977 
00978 
00979   Real get_stir_startTheta(int atomnum) const
00980   {
00981     return stirParams[stirIndexes[atomnum]].startTheta;
00982   }
00983  
00984 
00985   //  Get the moving drag factor for a specific atom
00986   void get_movdrag_params(Vector &v, int atomnum) const
00987   {
00988     v = movDragParams[movDragIndexes[atomnum]].v;
00989   }
00990 
00991   //  Get the rotating drag pars for a specific atom
00992   void get_rotdrag_params(BigReal &v, Vector &a, Vector &p, 
00993         int atomnum) const
00994   {
00995     v = rotDragParams[rotDragIndexes[atomnum]].v;
00996     a = rotDragParams[rotDragIndexes[atomnum]].a;
00997     p = rotDragParams[rotDragIndexes[atomnum]].p;
00998   }
00999 
01000   //  Get the "constant" torque pars for a specific atom
01001   void get_constorque_params(BigReal &v, Vector &a, Vector &p, 
01002         int atomnum) const
01003   {
01004     v = consTorqueParams[consTorqueIndexes[atomnum]].v;
01005     a = consTorqueParams[consTorqueIndexes[atomnum]].a;
01006     p = consTorqueParams[consTorqueIndexes[atomnum]].p;
01007   }
01008 
01009 //fepb
01010         unsigned char get_fep_type(int anum) const
01011         {
01012                 return(fepAtomFlags[anum]);
01013         }
01014 //fepe
01015 
01016 #ifndef MEM_OPT_VERSION
01017   Bool is_atom_fixed(int atomnum) const
01018   {
01019     return (numFixedAtoms && fixedAtomFlags[atomnum]);
01020   }
01021 #else
01022   //Since binary search is more expensive than direct array access,
01023   //and this function is usually called for consecutive atoms in this context,
01024   //the *listIdx returns the index to the range of atoms [aid1, aid2]
01025   //that are fixed. If the atom aid is fixed, then aid1=<aid<=aid2;
01026   //If the atom aid is not fixed, then aid1 indicates the smallest fixed atom
01027   //id that is larger than aid; so the listIdx could be equal the size of
01028   //fixedAtomsSet. --Chao Mei
01029   Bool is_atom_fixed(int aid, int *listIdx=NULL) const;
01030 #endif
01031         
01032   Bool is_atom_stirred(int atomnum) const
01033   {
01034     if (numStirredAtoms)
01035     {
01036       //  Check the index to see if it is constrained
01037       return(stirIndexes[atomnum] != -1);
01038     }
01039     else
01040     {
01041       //  No constraints at all, so just return FALSE
01042       return(FALSE);
01043     }
01044   }
01045   
01046 
01047   Bool is_group_fixed(int atomnum) const
01048   {
01049     return (numFixedAtoms && (fixedAtomFlags[atomnum] == -1));
01050   }
01051   Bool is_atom_exPressure(int atomnum) const
01052   {
01053     return (numExPressureAtoms && exPressureAtomFlags[atomnum]);
01054   }
01055   // 0 if not rigid or length to parent, for parent refers to H-H length
01056   // < 0 implies MOLLY but not SHAKE, > 1 implies both if MOLLY is on
01057   Real rigid_bond_length(int atomnum) const
01058   {
01059     return(rigidBondLengths[atomnum]);
01060   }
01061 
01062   void print_atoms(Parameters *); 
01063         //  Print out list of atoms
01064   void print_bonds(Parameters *); 
01065         //  Print out list of bonds
01066   void print_exclusions();//  Print out list of exclusions
01067 
01068 public:  
01069   int isOccupancyValid, isBFactorValid;
01070 
01071 #ifdef MEM_OPT_VERSION
01072   //read the per-atom file for the memory optimized version where the file 
01073   //name already exists the range of atoms to be read are 
01074   //[fromAtomID, toAtomID].
01075   void read_binary_atom_info(int fromAtomID, int toAtomID, InputAtomList &inAtoms);
01076 
01077   int getNumCalcExclusions(){return numCalcExclusions;}
01078   void setNumCalcExclusions(int x){numCalcExclusions= x;}
01079 
01080   Index getEachAtomMass(int i){return eachAtomMass[i];}
01081   Index getEachAtomCharge(int i){return eachAtomCharge[i];}
01082 
01083   ExclSigID getAtomExclSigId(int aid) const {
01084       return eachAtomExclSig[aid];
01085   }
01086 
01087   Real *getAtomMassPool(){return atomMassPool;}
01088   Real *getAtomChargePool(){return atomChargePool;}
01089   AtomCstInfo *getAtoms(){return atoms;}  
01090 
01091   int atomSigPoolSize;
01092   AtomSignature *atomSigPool;
01093 
01094   /* All the following are temporary variables for reading the compressed psf file */
01095   //declarations for atoms' constant information  
01096   int segNamePoolSize; //Its value is usually less than 5
01097   char **segNamePool; //This seems not to be important, but it only occupied very little space.
01098 
01099   int resNamePoolSize;
01100   char **resNamePool;
01101 
01102   int atomNamePoolSize;
01103   char **atomNamePool;
01104 
01105   int atomTypePoolSize;
01106   char **atomTypePool;
01107 
01108   int chargePoolSize;
01109   Real *atomChargePool;
01110 
01111   int massPoolSize;
01112   Real *atomMassPool;
01113 
01114   AtomSigID getAtomSigId(int aid) {
01115       return eachAtomSig[aid]; 
01116   }
01117 
01118   //Indicates the size of both exclSigPool and exclChkSigPool
01119   int exclSigPoolSize;
01120   //this will be deleted after build_lists_by_atom
01121   ExclusionSignature *exclSigPool;
01122   //This is the final data structure we want to store  
01123   ExclusionCheck *exclChkSigPool;
01124 
01125   void addNewExclSigPool(const std::vector<ExclusionSignature>&);  
01126 
01127   void delEachAtomSigs(){    
01128       //for NAMD-smp version, only one Molecule object is held
01129       //on each node, therefore, only one deletion operation should
01130       //be taken on a node, otherwise, there possibly would be some
01131       //wierd memory problems. The same reason applies to other deletion
01132       //operations inside the Molecule object.   
01133       if(CmiMyRank()) return;
01134 
01135       delete [] eachAtomSig;
01136       delete [] eachAtomExclSig;
01137       eachAtomSig = NULL;
01138       eachAtomExclSig = NULL;
01139   }
01140 
01141   void delChargeSpace(){
01142       if(CmiMyRank()) return;
01143 
01144       delete [] atomChargePool;
01145       delete [] eachAtomCharge;
01146       atomChargePool = NULL;
01147       eachAtomCharge = NULL;
01148   }
01149   
01150   void delMassSpace(){
01151       if(CmiMyRank()) return;
01152 
01153       delete [] atomMassPool;
01154       delete [] eachAtomMass;
01155       atomMassPool = NULL;
01156       eachAtomMass = NULL;
01157   }
01158   
01159   void delClusterSigs() {
01160       if(CmiMyRank()) return;      
01161 
01162       delete [] clusterSigs;
01163       clusterSigs = NULL;
01164   }
01165 
01166   void delAtomNames(){
01167       if(CmiMyRank()) return;
01168       delete [] atomNamePool;
01169       delete [] atomNames;
01170       atomNamePool = NULL;
01171       atomNames = NULL;
01172   }
01173 
01174   void delFixedAtoms(){
01175       if(CmiMyRank()) return;
01176       delete fixedAtomsSet;
01177       fixedAtomsSet = NULL;
01178   }
01179 
01180 private:
01181   Index insert_new_mass(Real newMass);
01182 
01183 #endif
01184 
01185 // Go stuff
01186 public:
01187 
01188 GoValue go_array[MAX_GO_CHAINS*MAX_GO_CHAINS];    //  Array of Go params -- JLai
01189 int go_indices[MAX_GO_CHAINS+1];        //  Indices from chainIDS to go array -- JLai
01190 int NumGoChains;                        //  Number of Go chain types -- JLai
01191 
01192 // Declares and initializes Go variables
01193 void goInit();
01194 
01195 // Builds the initial Go parameters 
01196 void build_go_params(StringList *);
01197 
01198 //  Read Go parameter file
01199 void read_go_file(char *);
01200 
01201 //  Get Go cutoff for a given chain type pair
01202 Real get_go_cutoff(int chain1, int chain2) { return go_array[MAX_GO_CHAINS*chain1 + chain2].cutoff; };
01203 
01204 //  Get Go epsilonRep for a given chain type pair
01205 Real get_go_epsilonRep(int chain1, int chain2) { return go_array[MAX_GO_CHAINS*chain1 + chain2].epsilonRep; };
01206 
01207 //  Get Go sigmaRep for a given chain type pair
01208 Real get_go_sigmaRep(int chain1, int chain2) { return go_array[MAX_GO_CHAINS*chain1 + chain2].sigmaRep; };
01209 
01210 //  Get Go epsilon for a given chain type pair
01211 Real get_go_epsilon(int chain1, int chain2) { return go_array[MAX_GO_CHAINS*chain1 + chain2].epsilon; };
01212 
01213 //  Get Go exp_a for a given chain type pair
01214 int get_go_exp_a(int chain1, int chain2) { return go_array[MAX_GO_CHAINS*chain1 + chain2].exp_a; };
01215 
01216 //  Get Go exp_b for a given chain type pair
01217 int get_go_exp_b(int chain1, int chain2) { return go_array[MAX_GO_CHAINS*chain1 + chain2].exp_b; };
01218 
01219 //  Get Go exp_rep for a given chain type pair
01220 int get_go_exp_rep(int chain1, int chain2) { return go_array[MAX_GO_CHAINS*chain1 + chain2].exp_rep; };
01221 
01222 //  Whether residue IDs with this difference are restricted
01223 Bool go_restricted(int, int, int);
01224 
01225 // Prints Go Params
01226 void print_go_params();
01227 
01228 void initialize();
01229 
01230 void send_GoMolecule(MOStream *);
01231 //  send the molecular structure 
01232 //  from the master to the clients
01233 
01234 void receive_GoMolecule(MIStream *);
01235 //  receive the molecular structure
01236 //  from the master on a client
01237 };
01238 
01239 #endif
01240 

Generated on Fri May 25 04:07:16 2012 for NAMD by  doxygen 1.3.9.1