NAMD
GromacsTopFile.h
Go to the documentation of this file.
1 #ifndef GROMACSTOPFILE_H
2 #define GROMACSTOPFILE_H
3 
4 #include "ResizeArray.h"
5 
6 typedef float Real;
7 
8 #define NAMESIZE 5
9 #define LONGNAMESIZE 20
10 
11 /* A GenericBond represents a bond between two atoms in a template
12  that can be used one or more times within a simulation. This is an
13  immutable type.
14  Here, atomi and atomj start at 0. */
15 class GenericBond {
16  private:
17  int atomi; /* the first atom of the bond */
18  int atomj; /* the second atom of the bond */
19  int type; /* an index into the bond's parameters, stored elsewhere */
20 
21  public:
22  /* initializes this to be a bond between atoms <i> and <j> of type
23  <type> */
24  GenericBond(int i, int j, int theType);
25 
26  int getAtomi() const {return atomi;}
27  int getAtomj() const {return atomj;}
28  int getType() const {return type;}
29 
30 };
31 
32 /* A GenericAngle represents a angle between two atoms in a template
33  that can be used one or more times within a simulation. This is an
34  immutable type.
35  Here, atomi and atomj start at 0. */
36 class GenericAngle {
37  private:
38  int atomi; /* the first atom of the angle */
39  int atomj; /* the second atom of the angle */
40  int atomk; /* the third atom of the angle */
41  int type; /* an index into the angle's parameters, stored elsewhere */
42 
43  public:
44  /* initializes this to be a angle between atoms <i>, <j>, and <k> of
45  type <type> */
46  GenericAngle(int i, int j, int k, int theType);
47 
48  int getAtomi() const {return atomi;}
49  int getAtomj() const {return atomj;}
50  int getAtomk() const {return atomk;}
51  int getType() const {return type;}
52 
53 };
54 
55 /* A GenericDihedral represents a dihedral angle between four atoms in
56  a template that can be used one or more times within a simulation.
57  This is an immutable type.
58  Here, atomi and atomj start at 0. */
60  private:
61  int atomi; /* the first atom of the angle */
62  int atomj; /* the second atom of the angle */
63  int atomk; /* the third atom of the angle */
64  int atoml; /* the fourth atom of the angle */
65  int type; /* an index into the parameters, stored elsewhere */
66 
67  public:
68  /* initializes this to be a angle between atoms <i>, <j>, <k>, and
69  <l> of type <type> */
70  GenericDihedral(int i, int j, int k, int l, int theType);
71 
72  int getAtomi() const {return atomi;}
73  int getAtomj() const {return atomj;}
74  int getAtomk() const {return atomk;}
75  int getAtoml() const {return atoml;}
76  int getType() const {return type;}
77 
78 };
79 
80 /* A GenericAtom represents an atom in a template that can be used one
81  or more times within a simulation. This is an immutable type. */
82 class GenericAtom {
83  private:
84  char type[NAMESIZE+1];
85  int typeNum;
86  int resNum;
87  char resType[NAMESIZE+1];
88  char atomName[NAMESIZE+1];
89  Real charge;
90  Real mass;
91 
92  public:
93 
94  /* Initializes this to be the atom specified by the given
95  parameters. All the strings will be copied, and must be at most
96  four characters long. */
97  GenericAtom(const char *theType, int theTypeNum, int theResNum,
98  const char *theResType,
99  const char *theAtomName, Real theCharge, Real theMass);
100 
101  /* The following just return the parameters of the atom. */
102  const char *getType() const { return type; }
103  int getTypeNum() const { return typeNum; }
104  int getResNum() const {return resNum;}
105  const char *getResType() const {return resType;}
106  const char *getAtomName() const {return atomName;}
107  Real getCharge() const {return charge;}
108  Real getMass() const {return mass;}
109 
110 };
111 
112 /* A GenericMol represents a complete molecule template. This will be
113  a mutable type, for convenience's sake. The atoms here are
114  numbered starting at ZERO */
115 class GenericMol {
116  private:
117  /* the name of this Molecule, so it can be identified later */
118  const char *name;
119 
120  /* the rest of the list */
121  const GenericMol *next;
122 
123  /* the list of GenericAtoms */
125 
126  /* the list of GenericBonds */
128 
129  /* the list of GenericAngles */
131 
132  /* the list of GenericDihedrals */
134 
135  public:
136  /* initializes this to be the molecule with name <name> */
137  GenericMol(const char *theName);
138 
139  /* getNumAtoms returns the number of atoms stored here. */
140  int getNumAtoms() const { return atomList.size(); }
141  int getNumBonds() const { return bondList.size(); }
142  int getNumAngles() const { return angleList.size(); }
143  int getNumDihedrals() const { return dihedralList.size(); }
144  int getNumRes() const { return atomList[atomList.size()-1]->getResNum(); }
145 
146  /* adds an atom to the end of list. The residue numbers must start
147  at zero and count up in unit steps */
148  void addAtom(const char *theType, int theTypeNum, int theResNum,
149  const char *theResType,
150  const char *theAtomName, Real theCharge, Real theMass);
151 
152  /* adds a bond/angle/dihedral to the molecule */
153  void addBond(int atomi, int atomj, int type);
154  void addAngle(int atomi, int atomj, int atomk, int type);
155  void addDihedral(int atomi, int atomj, int atomk, int atoml, int type);
156 
157  /* gets the name */
158  const char *getName() const { return name; }
159 
160  /* gets atom <n>, where atom 0 is the first atom in the list. */
161  const GenericAtom *getAtom(int n) const;
162 
163  /* gets bond <n>, where bond 0 is the first bond in the list. */
164  const GenericBond *getBond(int n) const;
165 
166  /* gets angle <n>, where angle 0 is the first angle in the list. */
167  const GenericAngle *getAngle(int n) const;
168 
169  /* gets dihedral <n>, where angle 0 is the first one in the list. */
170  const GenericDihedral *getDihedral(int n) const;
171 
172 };
173 
174 /* A MolInst represents a number of instances of a molecule. These
175  objects are meant to be assembled (in order) into a list, to
176  represent all the instances of molecules in a system. */
177 class MolInst {
178  int num;
179  const GenericMol *mol;
180  public:
181  /* initializes this to represent <theNum> copies of <theMol> */
182  MolInst(const GenericMol *theMol, int theNum);
183 
184  /* get the number */
185  int getNum() const { return num; }
186 
187  /* get the total number of X here */
188  int getNumAtoms() const;
189  int getNumRes() const;
190  int getNumBonds() const;
191  int getNumAngles() const;
192  int getNumDihedrals() const;
193 
194  /* get the molecule */
195  const GenericMol *getMol() const { return mol; }
196 };
197 
198 /* An AtomTable stores all the known types of atoms.
199  mass: the mass in amu
200  charge: the charge in e
201  c6: the LJ parameter c6 in kcal/mol A^6
202  c12: the LJ parameter c12 in kcal/mol A^12 */
203 class AtomTable {
204  private:
205  /* implementation of the extensible array */
206  ResizeArray<Real> mArray;
207  ResizeArray<Real> qArray;
208  ResizeArray<Real> c6Array;
209  ResizeArray<Real> c12Array;
210  ResizeArray<const char *> typeArray; /* should never be NULL */
211 
212  public:
213  /* this adds a entry for an atom type to the table */
214  void addType(const char *type, Real m, Real q, Real c6, Real c12);
215 
216  /* This looks up the atom by type - if it cannot be found, this
217  returns -1, otherwise this returns the index of the atomtype */
218  int getParams(const char *type, Real *m, Real *q,
219  Real *c6, Real *c12) const;
220 
221  /* This looks up the atom type by number, returning it in the string
222  <type>, which must be at least 11 characters long. */
223  void getType(int num, char *type) const;
224 
225 
226  /* returns the number of types in the table */
227  int size() const { return mArray.size(); }
228 };
229 
230 /* A BondTable stores all the different types of bonds, so that we
231  only have to have one copy of each.
232  b0: the natural bond length in A.
233  kB: the spring constant in kcal/mol/A^2, where E=kx^2 to 1st order.
234  funct: 1 for harmonic potential, 2 for fourth-order GROMACS96
235  potential. */
236 class BondTable {
237  private:
238  /* implementation of the extensible array */
239  ResizeArray<Real> b0Array;
240  ResizeArray<Real> kBArray;
241  ResizeArray<int> functArray;
242  ResizeArray<const char *> typeaArray; /* NULL if no type is set */
243  ResizeArray<const char *> typebArray; /* NULL if no type is set */
244 
245  public:
246  /* returns the number of types in the table */
247  int size() const { return b0Array.size(); }
248 
249  /* this gets the index of a bond in the table (adding an entry if
250  none exists). */
251  int getIndex(Real b0, Real kB, int funct);
252 
253  /* this adds a entry for a bond type to the table, including the two
254  atoms involved in the bond */
255  void addType(const char *typea, const char *typeb, Real b0,
256  Real kB, int funct);
257 
258  /* getParams puts the parameters for bond-type <num> into the
259  spaces pointed to by the other arguments. */
260  void getParams(int num, Real *b0, Real *kB, int *funct) const;
261 
262  /* This version looks up the bond by atom type - the order of the
263  types doesn't matter! If the specified bond/function combination
264  cannot be found, it returns -1, otherwise it returns the index of
265  the bondtype. */
266  int getParams(const char *typea, const char *typeb, int funct,
267  Real *b0, Real *kB) const;
268 };
269 
270 /* A AngleTable stores all the different types of angles, so that we
271  only have to have one copy of each. Units:
272  th0 - degrees
273  kth - kcal/mol/rad^2 (funct 1) OR kcal/mol (funct 2)
274  funct 1: harmonic angle potential
275  funct 2: harmonic G96 cosine potential
276  The atoms are in standard geometry order - A--B--C for angle /ABC
277 */
278 class AngleTable {
279  private:
280  /* implementation of the extensible array */
281  ResizeArray<Real> th0Array;
282  ResizeArray<Real> kthArray;
283  ResizeArray<int> functArray;
284  ResizeArray<const char *> typeaArray; /* NULL if no type is set */
285  ResizeArray<const char *> typebArray; /* NULL if no type is set */
286  ResizeArray<const char *> typecArray; /* NULL if no type is set */
287 
288  public:
289  /* returns the number of types in the table */
290  int size() const { return th0Array.size(); }
291 
292  /* this gets the index of a angle in the table (adding an entry if
293  none exists).
294  */
295  int getIndex(Real th0, Real kth, int funct);
296 
297  /* this adds a entry for a angle type to the table, including the
298  three atoms involved in the angle */
299  void addType(const char *typea, const char *typeb,
300  const char *typec, Real th0,
301  Real kth, int funct);
302 
303  /* getAngleParams puts the parameters for angle-type <num> into the
304  spaces pointed to by the other arguments.
305  */
306  void getParams(int num, Real *th0, Real *kth, int *funct) const;
307 
308  /* This version looks up the angle by atom type - the direction of
309  the types doesn't matter (it can be A--B--C or C--B--A)! If the
310  specified angle/function combination cannot be found, it returns
311  -1, otherwise it returns the index of the angletype. */
312  int getParams(const char *typea, const char *typeb,
313  const char *typec, int funct,
314  Real *th0, Real *kth) const;
315 };
316 
317 /* A DihedralTable stores all the different types of angles, so that we
318  only have to have one copy of each. Units:
319  funct 1: proper dihedral
320  c0 - thmax (deg)
321  c1 - fc (kcal/mol)
322  a,b are the two inner atoms
323  funct 2: improper dihedral
324  c0 - th0 (deg)
325  c1 - fc (kcal/mol)
326  a,b are the two outer atoms
327  funct 3: RB dihedral
328  c0-c5 - C0-C5 (kcal/mol)
329  a,b are the two inner atoms
330 
331  The atoms are in standard geometry order - A--B--C--D for the
332  dihedral between the planes containing ABC and BCD.
333 */
335  private:
336  /* implementation of the extensible array */
337  ResizeArray<int> functArray;
338  ResizeArray<const char *> typeaArray; /* NULL if no type is set */
339  ResizeArray<const char *> typebArray; /* NULL if no type is set */
340  ResizeArray<int> multArray; /* 0 if funct is not 1 */
341 
342  /* cArray is where the actual paramters live - each Real * is a
343  pointer to a list of Reals that is at least as long as the
344  number of parameters required for the given type. */
346 
347  public:
348  /* returns the number of types in the table */
349  int size() const { return functArray.size(); }
350 
351  /* this function gets the index of a dihedral angle in the table
352  (adding an entry if none exists). The required number of
353  parameters (see notes on class DihedralTable) must be stored in
354  the array <c> */
355  int getIndex(const Real *c, int mult, int funct);
356 
357  /* this adds a entry for a angle type to the table, including the
358  two atoms involved in the angle. The required number of
359  parameters (see notes on class DihedralTable) must be stored in
360  the array <c>. Note that these two angles really refer to either
361  atoms A and D or B and C depending on the dihedral type. */
362  void addType(const char *typea, const char *typeb,
363  const Real *c, int mult, int funct);
364 
365  /* getParams puts the parameters for angle-type <num> into the
366  spaces pointed to by the other arguments. The required number of
367  parameters (see notes on class DihedralTable) will be stored in
368  the array <c>, so make sure that c has size >= 6 */
369  void getParams(int num, Real *c, int *mult, int *funct) const;
370 
371  /* This version looks up the angle by atom type - the direction of
372  the types doesn't matter (it can be ABCD or DCBA)! If the
373  specified angle/function combination cannot be found, it returns
374  -1, otherwise it returns the index of the dihedraltye. This is a
375  little strange because the different dihedral types use different
376  atoms - but since we always will know all four AND the funct when
377  we need to look up a dihedral, this will work. The required
378  number of parameters (see notes on class DihedralTable) will be
379  stored in the array <c>, so make sure that c is big enough for
380  the specified function. */
381  int getParams(const char *typea, const char *typeb,
382  const char *typec, const char *typed, int funct,
383  Real *c, int *mult) const;
384 };
385 
386 /* this stores the VDW interaction parameters as a function of the
387  atom types. */
388 class VDWTable {
389  private:
390  /* atom types a and b */
391  ResizeArray<const char *> typeAArray; /* NULL if no type is set */
392  ResizeArray<const char *> typeBArray; /* NULL if no type is set */
393 
394  /* the VDW parameters */
395  ResizeArray<Real> c6Array;
396  ResizeArray<Real> c12Array;
397  ResizeArray<Real> c6PairArray; // these two are
398  ResizeArray<Real> c12PairArray; // for 1-4 pairs
399 
400  /* finds the index from the two interacting types, or returns -1 */
401  int getIndex(const char *typea, const char *typeb) const;
402 
403  public:
404  /* these add VDW parameters to the list */
405  void addType(const char *typea, const char *typeb, Real c6, Real c12);
406  void add14Type(const char *typea, const char *typeb,
407  Real c6pair, Real c12pair);
408 
409  /* this returns the VDW interaction parameters that were added to
410  the list earlier, and returns the index or the parameters (a
411  useless number) or -1 if it can't find the specified types. */
412  int getParams(const char *typea, const char *typeb,
413  Real *c6, Real *c12, Real *c6pair, Real *c12pair) const;
414 };
415 
416 /* this stores the pair interaction parameters as a function of the
417  atom types.
418  JLai August 16th, 2012
419 */
420 struct GroLJPair {
421  int indxLJA;
422  int indxLJB;
425 };
426 
427 struct GroGaussPair {
436 };
437 
438 class PairTable {
439  private:
440  // Data structure for LJ Structure-based potential
441  ResizeArray<int> indxLJA;
442  ResizeArray<int> indxLJB;
443  ResizeArray<Real> c6pair;
444  ResizeArray<Real> c12pair;
445  ResizeArray<GroLJPair> pairlistLJ;
446 
447  // Data structure for Gaussian Structure-based potential
448  ResizeArray<int> indxGaussA;
449  ResizeArray<int> indxGaussB;
451  ResizeArray<Real> gMu1;
452  ResizeArray<Real> giSigma1;
453  ResizeArray<Real> gMu2;
454  ResizeArray<Real> giSigma2;
455  ResizeArray<Real> gRepulsive;
456  ResizeArray<GroGaussPair> pairlistGauss;
457 
458  public:
459  /* these add pair parameters to the list */
460  int addPairLJType2(int typea, int typeb, Real c6, Real c12);
461  int addPairGaussType2(int typea, int typeb, Real gA,
462  Real gMu1, Real gSigma1);
463  int addPairGaussType2(int typea, int typeb, Real gA,
464  Real gMu1, Real gSigma1, Real gRepulsive);
465  int addPairGaussType2(int typea, int typeb, Real gA,
466  Real gMu1, Real gSigma1, Real gMu2, Real gSigma2, Real gRepulsive);
467  void getPairLJArrays2(int *indexA, int *indexB, Real *pairC6, Real *pairC12);
468  void getPairGaussArrays2(int *indexA, int *indexB, Real *gaussA, Real *gaussMu1,
469  Real *gaussSigma1, Real *gaussMu2, Real *gaussSigma2,
470  Real *gaussRepulsive);
471 
472  static bool GroLJCompare (GroLJPair, GroLJPair);
474 
475 };
476 
477 /* A GromacsTopFile represents the information stored in a GROMACS
478  topology file. This is an immutable type. */
480  private:
481  /* The system name */
482  char *systemName;
483 
484  /* 1-4 parameter scaling values */
485  Real fudgeLJ, fudgeQQ;
486 
487  /* whether or not to generate the 1-4 interactions automatically */
488  int genPairs;
489 
490  /* a list of molecule templates */
491  ResizeArray <GenericMol *> genericMols;
492 
493  /* the list of molecule instances */
495 
496  /* the table of bonds/angles/atoms */
497  AtomTable atomTable;
498  BondTable bondTable;
499  AngleTable angleTable;
500  DihedralTable dihedralTable;
501  VDWTable vdwTable;
502  PairTable pairTable;
503 
504  public:
505 
506  /* initializes this to represent the data stored in the topology
507  file <filename>, or exits on error. */
508  GromacsTopFile(char *filename);
509 
510  /* getSystemName returns the name of the system */
511  char *getSystemName() const { return systemName; }
512 
513  /* returns the number of atoms/bonds/angles/dihedrals in the file */
514  int getNumAtoms() const;
515  int getNumBonds() const;
516  int getNumAngles() const;
517  int getNumDihedrals() const;
518 
519  /* returns the number of atoms/bonds/angles/dihedrals params in the file */
520  int getNumAtomParams() const { return atomTable.size(); }
521  int getNumBondParams() const { return bondTable.size(); }
522  int getNumAngleParams() const { return angleTable.size(); }
523  int getNumDihedralParams() const { return dihedralTable.size(); }
524 
525  /* getAtom puts the information about atom number <num> into the
526  spaces pointed to by the other arguments. The string buffers
527  must be at least 11 characters long. Atom number 0 is the first
528  atom in the list, so that it corresponds with our normal idea of
529  atom numbers.
530  charge - e
531  mass - amu
532  */
533  void getAtom(int num, int *residue_number, char *residue_name,
534  char *atom_name, char *atom_type, int *atom_typenum,
535  Real *charge, Real *mass)
536  const;
537 
538  /* getAtomParams puts the parameters for atom-type <num> into the
539  spaces pointed to by the other arguements. Currently, all anyone
540  cares about is the atom type string, so that's all we're
541  returning! This may change later, but for now we get everything
542  else with the getAtom() method. The string buffer must be at
543  least 11 characters long. */
544  void getAtomParams(int num, char *type) const {
545  atomTable.getType(num,type);
546  }
547 
548  // JLai
549  int getNumPair() const;
550  int getNumLJPair() const;
551  int getNumGaussPair() const;
552  int getNumExclusions() const;
553  void getExclusions(int *, int *) const;
554  // End of JLai
555 
556  /* getBond puts the information about bond number <num> into the
557  spaces pointed to by the other arguments. Bond number 0 is the
558  first bond in the list.
559  */
560  void getBond(int num, int *atomi, int *atomj, int *bondtype) const;
561 
562  /* getBondParams puts the parameters for bond-type <num> into the
563  spaces pointed to by the other arguments.
564  b0 - natural length in A
565  kB - spring constant in kcal/mol/A^2 - E=kx^2
566  funct - 1 for harmonic, 2 for special fourth-order GROMOS96 thing */
567  void getBondParams(int num, Real *b0, Real *kB, int *funct) const;
568 
569  /* getAngle puts the information about angle number <num> into the
570  spaces pointed to by the other arguments. Angle number 0 is the
571  first angle in the list.
572  */
573  void getAngle(int num, int *atomi, int *atomj, int *atomk,
574  int *angletype) const;
575 
576  /* getAngleParams puts the parameters for angle-type <num> into the
577  spaces pointed to by the other arguments.
578  th0 - natural angle in degrees
579  kth - spring constant in kcal/rad - E=kx^2
580  funct - 1 for harmonic, 2 for special GROMOS96 thing */
581  void getAngleParams(int num, Real *th0, Real *kth, int *funct) const;
582 
583  /* getDihedral puts the information about dihedral number <num> into
584  the spaces pointed to by the other arguments. Dihedral number 0
585  is the first angle in the list. */
586  void getDihedral(int num, int *atomi, int *atomj, int *atomk,
587  int *atoml, int *type) const;
588 
589  /* getDihedralParams puts the parameters for dihedral-type <num>
590  into the spaces pointed to by the other arguments. The array of
591  Reals <c> must be of size >= 6, since up to 6 parameters will be
592  set there. These parameters are as follows:
593  funct 1: proper dihedral
594  c0 - thmax (deg)
595  c1 - fc (kcal/mol)
596  mult is the multiplicity
597  funct 2: improper dihedral
598  c0 - th0 (deg)
599  c1 - fc (kcal/mol/rad2)
600  funct 3: RB dihedral
601  c0-c5 - C0-C5 (kcal/mol)
602  */
603  void getDihedralParams(int num, Real *c, int *mult, int *funct) const;
604 
605  // JLai
606  void getPairLJArrays2(int *indexA, int *indexB, Real *pairC6, Real *pairC12);
607  void getPairGaussArrays2(int *indexA, int *indexB, Real *gaussA, Real *gaussMu1,
608  Real *gaussSigma1, Real *gaussMu2, Real *gaussSigma2,
609  Real *gaussRepulsive);
610 
611  /* getVDWParams returs the Lennard-Jones bonding parameters for the
612  specified two atom types, and the modified bonding parameters
613  for 1-4 L-J interactons (c6pair, c12pair).
614  Note that unlike the other types of parameters, you don't refer
615  to this one by number - any two atom types define a VDWParam */
616  void getVDWParams(int typea, int typeb,
617  Real *c6, Real *c12, Real *c6pair, Real *c7) const;
618 
619 };
620 
621 #endif // GROMACSTOPFILE_H
int getParams(const char *type, Real *m, Real *q, Real *c6, Real *c12) const
GenericMol(const char *theName)
int getNumAngleParams() const
int getNumRes() const
int addPairGaussType2(int typea, int typeb, Real gA, Real gMu1, Real gSigma1)
int getNumAngles() const
GenericBond(int i, int j, int theType)
void getAtom(int num, int *residue_number, char *residue_name, char *atom_name, char *atom_type, int *atom_typenum, Real *charge, Real *mass) const
int size(void) const
Definition: ResizeArray.h:131
const char * getResType() const
void getPairLJArrays2(int *indexA, int *indexB, Real *pairC6, Real *pairC12)
void getParams(int num, Real *c, int *mult, int *funct) const
static bool GroGaussCompare(GroGaussPair, GroGaussPair)
int getNumBonds() const
void getDihedralParams(int num, Real *c, int *mult, int *funct) const
int getNumBondParams() const
void add14Type(const char *typea, const char *typeb, Real c6pair, Real c12pair)
int getNumAngles() const
int size() const
void addType(const char *type, Real m, Real q, Real c6, Real c12)
int getResNum() const
float Real
Definition: common.h:118
void getBond(int num, int *atomi, int *atomj, int *bondtype) const
int getAtoml() const
const GenericMol * getMol() const
Real getMass() const
int getAtomk() const
int getNumBonds() const
int getType() const
float Real
Definition: GromacsTopFile.h:6
int getNum() const
const char * getAtomName() const
int getNumAtomParams() const
int getNumAtoms() const
void addType(const char *typea, const char *typeb, const char *typec, Real th0, Real kth, int funct)
int size() const
void getAngleParams(int num, Real *th0, Real *kth, int *funct) const
void getVDWParams(int typea, int typeb, Real *c6, Real *c12, Real *c6pair, Real *c7) const
int getIndex(Real b0, Real kB, int funct)
int getNumAtoms() const
const char * getName() const
int getIndex(Real th0, Real kth, int funct)
void addType(const char *typea, const char *typeb, const Real *c, int mult, int funct)
const char * getType() const
const GenericDihedral * getDihedral(int n) const
int getAtomk() const
int getType() const
void getType(int num, char *type) const
void getAtomParams(int num, char *type) const
int getTypeNum() const
GromacsTopFile(char *filename)
int getNumDihedrals() const
void getParams(int num, Real *th0, Real *kth, int *funct) const
int getNumRes() const
int addPairLJType2(int typea, int typeb, Real c6, Real c12)
void addAngle(int atomi, int atomj, int atomk, int type)
void getAngle(int num, int *atomi, int *atomj, int *atomk, int *angletype) const
#define NAMESIZE
Definition: GromacsTopFile.h:8
const GenericAtom * getAtom(int n) const
void addType(const char *typea, const char *typeb, Real c6, Real c12)
int size() const
Real getCharge() const
void addType(const char *typea, const char *typeb, Real b0, Real kB, int funct)
int getNumLJPair() const
int getNumPair() const
int getNumDihedrals() const
int getNumGaussPair() const
int getNumAtoms() const
int getNumDihedrals() const
char * getSystemName() const
void getPairLJArrays2(int *indexA, int *indexB, Real *pairC6, Real *pairC12)
int getIndex(const Real *c, int mult, int funct)
int getAtomi() const
int getAtomj() const
static bool GroLJCompare(GroLJPair, GroLJPair)
GenericAngle(int i, int j, int k, int theType)
void getExclusions(int *, int *) const
void getBondParams(int num, Real *b0, Real *kB, int *funct) const
const GenericBond * getBond(int n) const
void getDihedral(int num, int *atomi, int *atomj, int *atomk, int *atoml, int *type) const
int getAtomj() const
int getNumDihedralParams() const
int getNumBonds() const
void getPairGaussArrays2(int *indexA, int *indexB, Real *gaussA, Real *gaussMu1, Real *gaussSigma1, Real *gaussMu2, Real *gaussSigma2, Real *gaussRepulsive)
void getPairGaussArrays2(int *indexA, int *indexB, Real *gaussA, Real *gaussMu1, Real *gaussSigma1, Real *gaussMu2, Real *gaussSigma2, Real *gaussRepulsive)
int getParams(const char *typea, const char *typeb, Real *c6, Real *c12, Real *c6pair, Real *c12pair) const
void addBond(int atomi, int atomj, int type)
int size() const
int getAtomi() const
int getType() const
const GenericAngle * getAngle(int n) const
int getNumAngles() const
void addDihedral(int atomi, int atomj, int atomk, int atoml, int type)
int getNumExclusions() const
GenericAtom(const char *theType, int theTypeNum, int theResNum, const char *theResType, const char *theAtomName, Real theCharge, Real theMass)
void getParams(int num, Real *b0, Real *kB, int *funct) const
GenericDihedral(int i, int j, int k, int l, int theType)
int getAtomj() const
void addAtom(const char *theType, int theTypeNum, int theResNum, const char *theResType, const char *theAtomName, Real theCharge, Real theMass)
int getAtomi() const
MolInst(const GenericMol *theMol, int theNum)