GLYLIB  0.3.0b
amber_prmtop_structs.h
Go to the documentation of this file.
00001 /** \file amber_prmtop_structs.h Structure for amber prmtop file info 
00002 
00003 begun on 20080424 by BLFoley
00004 
00005 If you add new flags, also add formats, preserving order -AND- define the
00006 new flag in the amber_prmtop structure below and in the initialization
00007 function (currently amber_prmtop_init.c).
00008 
00009 NOTE: one space to separate fields, no space at end of set!
00010 */
00011 
00012 #if !defined(GLYLIB_AMBER_PRMTOP_STRUCTS)
00013 #define GLYLIB_AMBER_PRMTOP_STRUCTS
00014 
00015 #define AMBER_PRMTOP_FLAGS "TITLE POINTERS ATOM_NAME CHARGE MASS \
00016 ATOM_TYPE_INDEX NUMBER_EXCLUDED_ATOMS NONBONDED_PARM_INDEX RESIDUE_LABEL RESIDUE_ID \
00017 RESIDUE_POINTER BOND_FORCE_CONSTANT BOND_EQUIL_VALUE ANGLE_FORCE_CONSTANT ANGLE_EQUIL_VALUE \
00018 DIHEDRAL_FORCE_CONSTANT DIHEDRAL_PERIODICITY DIHEDRAL_PHASE SOLTY LENNARD_JONES_ACOEF \
00019 LENNARD_JONES_BCOEF BONDS_INC_HYDROGEN BONDS_WITHOUT_HYDROGEN ANGLES_INC_HYDROGEN ANGLES_WITHOUT_HYDROGEN \
00020 DIHEDRALS_INC_HYDROGEN DIHEDRALS_WITHOUT_HYDROGEN EXCLUDED_ATOMS_LIST HBOND_ACOEF HBOND_BCOEF \
00021 HBCUT AMBER_ATOM_TYPE TREE_CHAIN_CLASSIFICATION JOIN_ARRAY IROTAT \
00022 SOLVENT_POINTERS ATOMS_PER_MOLECULE BOX_DIMENSIONS CAP_INFO CAP_INFO2 \
00023 RADIUS_SET RADII SCREEN LES_NTYP LES_TYPE \
00024 LES_FAC LES_CNUM LES_ID PERT_BOND_ATOMS PERT_BOND_PARAMS \
00025 PERT_ANGLE_ATOMS PERT_ANGLE_PARAMS PERT_DIHEDRAL_ATOMS PERT_DIHEDRAL_PARAMS PERT_RESIDUE_NAME \
00026 PERT_ATOM_NAME PERT_ATOM_SYMBOL ALMPER IAPER PERT_ATOM_TYPE_INDEX \
00027 PERT_CHARGE POLARIZABILITY PERT_POLARIZABILITY"
00028 #define AMBER_PRMTOP_FORMATS "20a4 10I8 20a4 5E16.8 5E16.8 \
00029 10I8 10I8 10I8 20a4 10a8 \
00030 10I8 5E16.8 5E16.8 5E16.8 5E16.8 \
00031 5E16.8 5E16.8 5E16.8 5E16.8 5E16.8 \
00032 5E16.8 10I8 10I8 10I8 10I8 \
00033 10I8 10I8 10I8 5E16.8 5E16.8 \
00034 5E16.8 20a4 20a4 10I8 10I8 \
00035 3I8 10I8 5E16.8 10I8 5E16.8 \
00036 1a80 5E16.8 5E16.8 10I8 10I8 \
00037 5E16 10I8 10I8 10I8 10I8 \
00038 10I8 10I8 10I8 10I8 20a4 \
00039 20a4 20a4 5E16.8 10I8 10I8 \
00040 5E16.8 5E16.8 5E16.8"
00041 
00042 // structure representing a section in a topology file
00043 typedef struct {
00044         char *N; // the "FLAG" name of this section
00045         char *FORMAT; // the formatting information, as found in the file
00046         char *TYPE; // the type of data contained in this section, e.g., char, int, double (no float...)
00047         char *desc; // description of data in this section (free format)
00048         int is_standard; // =0 if a standard section, not =0 if not standard
00049         int nc; // number of characters per datum
00050         int npl; // data points per line
00051         int nt; // total number of pieces of data
00052         int ns; // number of datum points per set (e.g., =3 for x,y,z data)
00053         int nu; // number of units of information (=nt/ns) (one of these will get deleted... maybe)
00054         char **D; // pointer to nt bits of data (will read in the prmtop file as-is and convert later)
00055 } amber_prmtop_section;
00056 
00057 // structure amber_prmtop
00058 //
00059 // IMPORTANT NOTES 
00060 // After the first few entries about filenames and headers, all the entries,
00061 //      despite being named for AMBER prmtop variables, are NOT the actual
00062 //      variables.  Rather, they are pointers to positions in the section
00063 //      structures.
00064 // Programmers wishing to alter/update this should also consider the contents
00065 //      of the initialization function (currently amber_prmtop_init.c) to 
00066 //      learn the data types used in the sections.
00067 typedef struct {
00068         char *FN; // name of file from which the data were obtained
00069         char *VERSION; // the top line that usually discusses version info
00070         int nS; // number of sections found
00071         char **SN; // names of sections, in the order found
00072         amber_prmtop_section *S; // addresses for the actual sections
00073         int nSS; // number of standard sections found
00074         int *SS; // pointers to those standard sections
00075         int nES;// number of extra sections found
00076         int *ES; // list of ES addresses
00077         int nFF,*FORMATS; // for programming later
00078         char **FLAGS; // list of known flags
00079 //FORMAT(20a4)  (ITITL(i), i=1,20)
00080         int ITITL; // the title section
00081 // Read the "pointers" section in here, as well as into an 
00082 //      amber_prmtop_section, but save room for extras if found
00083         int POINTERS; // pointer to the section containing the original char-strings
00084 //FORMAT(12i6) 
00085         int NATOM  ; // total number of atoms 
00086         int NTYPES ; // total number of distinct atom types
00087         int NBONH  ; // number of bonds containing hydrogen
00088         int MBONA  ; // number of bonds not containing hydrogen
00089         int NTHETH ; // number of angles containing hydrogen
00090         int MTHETA ; // number of angles not containing hydrogen
00091         int NPHIH  ; // number of dihedrals containing hydrogen
00092         int MPHIA  ; // number of dihedrals not containing hydrogen
00093         int NHPARM ; // currently not used
00094         int NPARM  ; // currently not used
00095         int NEXT   ; // number of excluded atoms
00096         int NRES   ; // number of residues
00097         int NBONA  ; // MBONA + number of constraint bonds
00098         int NTHETA ; // MTHETA + number of constraint angles
00099         int NPHIA  ; // MPHIA + number of constraint dihedrals
00100         int NUMBND ; // number of unique bond types
00101         int NUMANG ; // number of unique angle types
00102         int NPTRA  ; // number of unique dihedral types
00103         int NATYP  ; // number of atom types in parameter file, see SOLTY below
00104         int NPHB   ; // number of distinct 10-12 hydrogen bond pair types
00105         int IFPERT ; // set to 1 if perturbation info is to be read in
00106         int NBPER  ; // number of bonds to be perturbed
00107         int NGPER  ; // number of angles to be perturbed
00108         int NDPER  ; // number of dihedrals to be perturbed
00109         int MBPER  ; // number of bonds with atoms completely in perturbed group
00110         int MGPER  ; // number of angles with atoms completely in perturbed group
00111         int MDPER  ; // number of dihedrals with atoms completely in perturbed groups
00112         int IFBOX  ; // set to 1 if standard periodic box, 2 when truncated octahedral
00113         int NMXRS  ; // number of atoms in the largest residue
00114         int IFCAP  ; // set to 1 if the CAP option from edit was specified
00115 // FORMAT(20a4)  (IGRAPH(i), i=1,NATOM)
00116         int IGRAPH; // IGRAPH : the user atoms names 
00117 // FORMAT(5E16.8)  (CHRG(i), i=1,NATOM)
00118         int CHRG   ; // CHRG   : the atom charges.  
00119                 // (Divide by 18.2223 to convert to charge in units of the electron charge) 
00120 // FORMAT(5E16.8)  (AMASS(i), i=1,NATOM)
00121         int AMASS  ; // AMASS  : the atom masses 
00122 // FORMAT(12I6)  (IAC(i), i=1,NATOM)
00123         int IAC    ; // IAC    : index for the atom types involved in Lennard Jones (6-12) 
00124                 // interactions.  See ICO below.  
00125 // FORMAT(12I6)  (NUMEX(i), i=1,NATOM)
00126         int NUMEX  ; // NUMEX  : total number of excluded atoms for atom "i".  See
00127                 // NATEX below.  
00128 // FORMAT(12I6)  (ICO(i), i=1,NTYPES*NTYPES)
00129         int ICO    ; // ICO    : provides the index to the nonbon parameter
00130                 // arrays CN1, CN2 and ASOL, BSOL.  All possible 6-12
00131                 // or 10-12 atoms type interactions are represented.
00132                 // NOTE: A particular atom type can have either a 10-12
00133                 // or a 6-12 interaction, but not both.  The index is
00134                 // calculated as follows:
00135                 // index = ICO(NTYPES*(IAC(i)-1)+IAC(j))
00136                 // If index is positive, this is an index into the
00137                 // 6-12 parameter arrays (CN1 and CN2) otherwise it
00138                 // is an index into the 10-12 parameter arrays (ASOL and BSOL).  
00139 // FORMAT(20A4)  (LABRES(i), i=1,NRES)
00140         int LABRES ; // LABRES : the residue labels 
00141 // ****** START HERE -- figure out the actual AMBER name for this...
00142 // ------ LOOK vvvvvvvv
00143         int IRES;  // the residue numbers (of some sort)
00144 // ------ LOOK ^^^^^^^^
00145 // *****
00146 // FORMAT(12I6)  (IPRES(i), i=1,NRES)
00147         int IPRES  ; // IPRES  : atoms in each residue are listed for atom "i" in
00148                 // IPRES(i) to IPRES(i+1)-1 
00149 // FORMAT(5E16.8)  (RK(i), i=1,NUMBND)
00150         int RK     ; // RK     : force constant for the bonds of each type, kcal/mol 
00151 // FORMAT(5E16.8)  (REQ(i), i=1,NUMBND)
00152         int REQ    ; // REQ    : the equilibrium bond length for the bonds of each type, angstroms 
00153 // FORMAT(5E16.8)  (TK(i), i=1,NUMANG)
00154         int TK     ; // TK     : force constant for the angles of each type, kcal/mol A**2 
00155 // FORMAT(5E16.8)  (TEQ(i), i=1,NUMANG)
00156         int TEQ    ; // TEQ    : the equilibrium angle for the angles of each type, radians 
00157 // FORMAT(5E16.8)  (PK(i), i=1,NPTRA)
00158         int PK     ; // PK     : force constant for the dihedrals of each type, kcal/mol 
00159 // FORMAT(5E16.8)  (PN(i), i=1,NPTRA)
00160         int PN     ; // PN     : periodicity of the dihedral of a given type 
00161 // FORMAT(5E16.8)  (PHASE(i), i=1,NPTRA)
00162         int PHASE  ; // PHASE  : phase of the dihedral of a given type, radians 
00163 // FORMAT(5E16.8)  (SOLTY(i), i=1,NATYP)
00164         int SOLTY  ; // SOLTY  : currently unused (reserved for future use) 
00165 // FORMAT(5E16.8)  (CN1(i), i=1,NTYPES*(NTYPES+1)/2)
00166         int CN1    ; // CN1    : Lennard Jones r**12 terms for all possible atom type
00167                 // interactions, indexed by ICO and IAC; for atom i and j
00168                 // where i < j, the index into this array is as follows
00169                 // (assuming the value of ICO(index) is positive):
00170                 // CN1(ICO(NTYPES*(IAC(i)-1)+IAC(j))).  
00171 // FORMAT(5E16.8)  (CN2(i), i=1,NTYPES*(NTYPES+1)/2)
00172         int CN2    ; // CN2    : Lennard Jones r**6 terms for all possible atom type
00173                 // interactions.  Indexed like CN1 above.  
00174 /* NOTE: the atom numbers in the following arrays that describe bonds, 
00175         angles, and dihedrals are coordinate array indexes for runtime speed. 
00176         The true atom number equals the absolute value of the number divided by 
00177         three, plus one. In the case of the dihedrals, if the fourth atom is negative, 
00178         this implies that the dihedral is an improper. If the third atom is negative, 
00179         this implies that the end group interations are to be ignored. End group 
00180         interactions are ignored, for example, in dihedrals of various ring systems 
00181         (to prevent int counting of 1-4 interactions) and in multiterm dihedrals.  */
00182 // FORMAT(12I6)  (IBH(i),JBH(i),ICBH(i), i=1,NBONH)
00183         int IBH    ; // IBH    : atom involved in bond "i", bond contains hydrogen
00184         int JBH    ; // JBH    : atom involved in bond "i", bond contains hydrogen
00185         int ICBH   ; // ICBH   : index into parameter arrays RK and REQ 
00186 // FORMAT(12I6)  (IB(i),JB(i),ICB(i), i=1,NBONA)
00187         int IB     ; // IB     : atom involved in bond "i", bond does not contain hydrogen
00188         int JB     ; // JB     : atom involved in bond "i", bond does not contain hydrogen
00189         int ICB    ; // ICB    : index into parameter arrays RK and REQ 
00190 // FORMAT(12I6)  (ITH(i),JTH(i),KTH(i),ICTH(i), i=1,NTHETH)
00191         int ITH    ; // ITH    : atom involved in angle "i", angle contains hydrogen
00192         int JTH    ; // JTH    : atom involved in angle "i", angle contains hydrogen
00193         int KTH    ; // KTH    : atom involved in angle "i", angle contains hydrogen
00194         int ICTH   ; // ICTH   : index into parameter arrays TK and TEQ for angle
00195                 // ITH(i)-JTH(i)-KTH(i) 
00196 // FORMAT(12I6)  (IT(i),JT(i),KT(i),ICT(i), i=1,NTHETA)
00197         int IT     ; // IT     : atom involved in angle "i", angle does not contain hydrogen
00198         int JT     ; // JT     : atom involved in angle "i", angle does not contain hydrogen
00199         int KT     ; // KT     : atom involved in angle "i", angle does not contain hydrogen
00200         int ICT    ; // ICT    : index into parameter arrays TK and TEQ for angle
00201                 // IT(i)-JT(i)-KT(i) 
00202 // FORMAT(12I6)  (IPH(i),JPH(i),KPH(i),LPH(i),ICPH(i), i=1,NPHIH)
00203         int IPH    ; // IPH    : atom involved in dihedral "i", dihedral contains hydrogen
00204         int JPH    ; // JPH    : atom involved in dihedral "i", dihedral contains hydrogen
00205         int KPH    ; // KPH    : atom involved in dihedral "i", dihedral contains hydrogen
00206         int LPH    ; // LPH    : atom involved in dihedral "i", dihedral contains hydrogen
00207         int ICPH   ; // ICPH   : index into parameter arrays PK, PN, and PHASE for
00208                 // dihedral IPH(i)-JPH(i)-KPH(i)-LPH(i)
00209 
00210 // FORMAT(12I6)  (IP(i),JP(i),KP(i),LP(i),ICP(i), i=1,NPHIA)
00211         int IP     ; // IP     : atom involved in dihedral "i", dihedral does not contain hydrogen
00212         int JP     ; // JP     : atom involved in dihedral "i", dihedral does not contain hydrogen
00213         int KP     ; // KP     : atom involved in dihedral "i", dihedral does not contain hydrogen
00214         int LP     ; // LP     : atom involved in dihedral "i", dihedral does not contain hydrogen
00215         int ICP    ; // ICP    : index into parameter arrays PK, PN, and PHASE for
00216                 // dihedral IPH(i)-JPH(i)-KPH(i)-LPH(i).  Note, if the
00217                 // periodicity is negative, this implies the following entry
00218                 // in the PK, PN, and PHASE arrays is another term in a
00219                 // multitermed dihedral.  
00220 // FORMAT(12I6)  (NATEX(i), i=1,NEXT)
00221         int NATEX  ; // NATEX  : the excluded atom list.  To get the excluded list for atom 
00222                 // "i" you need to traverse the NUMEX list, adding up all
00223                 // the previous NUMEX values, since NUMEX(i) holds the number
00224                 // of excluded atoms for atom "i", not the index into the 
00225                 // NATEX list.  Let IEXCL = SUM(NUMEX(j), j=1,i-1), then
00226                 // excluded atoms are NATEX(IEXCL) to NATEX(IEXCL+NUMEX(i)).  
00227 // FORMAT(5E16.8)  (ASOL(i), i=1,NPHB)
00228         int ASOL   ; // ASOL   : the value for the r**12 term for hydrogen bonds of all
00229                 // possible types.  Index into these arrays is equivalent
00230                 // to the CN1 and CN2 arrays, however the index is negative.
00231                 // For example, for atoms i and j, with i < j, the index is
00232                 // -ICO(NTYPES*(IAC(i)-1+IAC(j)).  
00233 // FORMAT(5E16.8)  (BSOL(i), i=1,NPHB)
00234         int BSOL   ; // BSOL   : the value for the r**10 term for hydrogen bonds of all
00235                 // possible types.  Indexed like ASOL.  
00236 // FORMAT(5E16.8)  (HBCUT(i), i=1,NPHB)
00237         int HBCUT  ; // HBCUT  : no longer in use 
00238 // FORMAT(20A4)  (ISYMBL(i), i=1,NATOM)
00239         int ISYMBL ; // ISYMBL : the AMBER atom types for each atom 
00240 // FORMAT(20A4)  (ITREE(i), i=1,NATOM)
00241         int ITREE  ; // ITREE  : the list of tree joining information, classified into five
00242                 // types.  M -- main chain, S -- side chain, B -- branch point, 
00243                 // 3 -- branch into three chains, E -- end of the chain 
00244 // FORMAT(12I6)  (JOIN(i), i=1,NATOM)
00245         int JOIN   ; // JOIN   : tree joining information, potentially used in ancient
00246                 // analysis programs.  Currently unused in sander or gibbs.  
00247 // FORMAT(12I6)  (IROTAT(i), i = 1, NATOM)
00248         int IROTAT ; // IROTAT : apparently the last atom that would move if atom i was
00249                 // rotated, however the meaning has been lost over time.
00250                 // Currently unused in sander or gibbs.
00251 // The following are only present if IFBOX .gt. 0 
00252 // FORMAT(12I6)  IPTRES, NSPM, NSPSOL
00253         int IPTRES ; // IPTRES : final residue that is considered part of the solute,
00254                 // reset in sander and gibbs
00255         int NSPM   ; // NSPM   : total number of molecules
00256         int NSPSOL ; // NSPSOL : the first solvent "molecule" 
00257 // FORMAT(12I6)  (NSP(i), i=1,NSPM)
00258         int NSP    ; // NSP    : the total number of atoms in each molecule,
00259                 // necessary to correctly perform the pressure scaling.  
00260 // FORMAT(5E16.8)  BETA, BOX(1), BOX(2), BOX(3)
00261         int BETA   ; // BETA   : periodic box, angle between the XY and YZ planes in degrees.
00262         int BOX    ; // BOX    : the periodic box lengths in the X, Y, and Z directions 
00263 // The following are only present if IFCAP .gt. 0 
00264 // FORMAT(12I6)  NATCAP
00265         int NATCAP ; // NATCAP : last atom before the start of the cap of waters placed by edit 
00266 // FORMAT(5E16.8)  CUTCAP, XCAP, YCAP, ZCAP
00267         int CUTCAP ; // CUTCAP : the distance from the center of the cap to the outside
00268         int XCAP   ; // XCAP   : X coordinate for the center of the cap
00269         int YCAP   ; // YCAP   : Y coordinate for the center of the cap
00270         int ZCAP   ; // ZCAP   : Z coordinate for the center of the cap 
00271 // The following is only present if IFPERT .gt. 0
00272 /* Note that the initial state, or equivalently the prep/link/edit state, 
00273         is represented by lambda=1 and the perturbed state, or final state 
00274         specified in parm, is the lambda=0 state. */ 
00275 // FORMAT(12I6)  (IBPER(i), JBPER(i), i=1,NBPER)
00276         int IBPER  ; // IBPER  : atoms involved in perturbed bonds
00277         int JBPER  ; // JBPER  : atoms involved in perturbed bonds 
00278 // FORMAT(12I6)  (ICBPER(i), i=1,2*NBPER)
00279         int ICBPER ; // ICBPER : pointer into the bond parameter arrays RK and REQ for the
00280                 // perturbed bonds.  ICBPER(i) represents lambda=1 and 
00281                 // ICBPER(i+NBPER) represents lambda=0.  
00282 // FORMAT(12I6)  (ITPER(i), JTPER(i), KTPER(i), i=1,NGPER)
00283         int IPTER  ; // IPTER  : atoms involved in perturbed angles
00284         int JTPER  ; // JTPER  : atoms involved in perturbed angles
00285         int KTPER  ; // KTPER  : atoms involved in perturbed angles 
00286 // FORMAT(12I6)  (ICTPER(i), i=1,2*NGPER)
00287         int ICTPER ; // ICTPER : pointer into the angle parameter arrays TK and TEQ for 
00288                 // the perturbed angles.  ICTPER(i) represents lambda=0 and 
00289                 // ICTPER(i+NGPER) represents lambda=1.  
00290 // FORMAT(12I6)  (IPPER(i), JPPER(i), KPPER(i), LPPER(i), i=1,NDPER)
00291         int IPPER  ; // IPPER  : atoms involved in perturbed dihedrals
00292         int JPPER  ; // JPPER  : atoms involved in perturbed dihedrals
00293         int KPPER  ; // KPPER  : atoms involved in perturbed dihedrals
00294         int LPPER  ; // LPPER  : atoms involved in pertrubed dihedrals 
00295 // FORMAT(12I6)  (ICPPER(i), i=1,2*NDPER)
00296         int ICPPER ; // ICPPER : pointer into the dihedral parameter arrays PK, PN and
00297                 // PHASE for the perturbed dihedrals.  ICPPER(i) represents 
00298                 // lambda=1 and ICPPER(i+NGPER) represents lambda=0.  
00299 // FORMAT(20A4)  (LABRES(i), i=1,NRES)
00300         int LRESPER ; // LABRES : residue names at lambda=0 
00301 // FORMAT(20A4)  (IGRPER(i), i=1,NATOM)
00302         int IGRPER ; // IGRPER : atomic names at lambda=0 
00303 // FORMAT(20A4)  (ISMPER(i), i=1,NATOM)
00304         int ISMPER ; // ISMPER : atomic symbols at lambda=0 
00305 // FORMAT(5E16.8)  (ALMPER(i), i=1,NATOM)
00306         int ALMPER ; // ALMPER : unused currently in gibbs 
00307 // FORMAT(12I6)  (IAPER(i), i=1,NATOM)
00308         int IAPER  ; // IAPER  : IAPER(i) = 1 if the atom is being perturbed 
00309 // FORMAT(12I6)  (IACPER(i), i=1,NATOM)
00310         int IACPER ; // IACPER : index for the atom types involved in Lennard Jones
00311                 // interactions at lambda=0.  Similar to IAC above.  See ICO above.  
00312 // FORMAT(5E16.8)  (CGPER(i), i=1,NATOM)
00313         int CGPER  ; // CGPER  : atomic charges at lambda=0 
00314 // The following is only present if IPOL .eq. 1 
00315 // FORMAT(5E18.8) (ATPOL(i), i=1,NATOM)
00316         int ATPOL  ; // ATPOL  : atomic polarizabilities 
00317 // The following is only present if IPOL .eq. 1 .and. IFPERT .eq. 1 
00318 // FORMAT(5E18.8) (ATPOL1(i), i=1,NATOM)
00319         int ATPOL1 ; // ATPOL1 : atomic polarizabilities at lambda = 1 (above is at lambda = 0) 
00320 } amber_prmtop;
00321 
00322 #endif
 All Classes Files Functions Variables Typedefs Defines