NAMD
Parameters.h
Go to the documentation of this file.
1 
7 /*
8  The Parameters class is used to read in and store all of the parameters
9  from the parameter files. These parameters are stored and used to assign
10  constants to bonds and atoms as they are read in from the psf file
11 */
12 
13 #ifndef PARAM_H
14 
15 #define PARAM_H
16 
17 #include "parm.h"
18 
19 #include "ReadAmberParm.h"
20 
21 #include "common.h"
22 #include "structures.h"
23 #include "strlib.h"
24 #include "MStream.h"
25 //****** BEGIN CHARMM/XPLOR type changes
26 #include "SimParameters.h"
27 //****** END CHARMM/XPLOR type changes
28 
29 #include "GromacsTopFile.h"
30 #define ACCELERATED_INPUT 1
31 #ifdef ACCELERATED_INPUT
32 #include "TupleString.h"
33 #define ACCELERATED_INPUT_ANGLES 1
34 #define ACCELERATED_INPUT_DIHEDRALS 1
35 #define ACCELERATED_INPUT_IMPROPERS 1
36 #define ACCELERATED_INPUT_CROSSTERMS 1
37 #define ACCELERATED_INPUT_VDW 1
38 #define ACCELERATED_INPUT_NBTHOLE 1
39 #define ACCELERATED_INPUT_TABLE_PAIR 1
40 #if defined(ACCELERATED_INPUT_NBTHOLE) && ! defined(ACCELERATED_INPUT_VDW)
41 static_assert(false, "ACCELERATED_INPUT_NBTHOLE requires ACCELERATED_INPUT_VDW");
42 #endif
43 
44 #if defined(ACCELERATED_INPUT_TABLE_PAIR) && ! defined(ACCELERATED_INPUT_VDW)
45 static_assert(false, "ACCELERATED_INPUT_TABLE_PAIR requires ACCELERATED_INPUT_VDW");
46 #endif
47 #endif // ACCELERATED_INPUT
48 
49 #ifndef cbrt
50  // cbrt() not in math.h on goneril
51  #define cbrt(x) pow((double)x,(double)(1.0/3.0))
52 #endif
53 
54 class Communicate;
55 class StringList;
56 
57 // The class Parameters is used to store and query the parameters for
58 // bonds and atoms. If the Parameter object resides on the master
59 // process, it is responsible for reading in all the parameters and
60 // then communicating them to the other processors. To do this, first
61 // the routine read_paramter_file is called to read in each parameter
62 // file. The information that is read in is stored in binary trees
63 // for vdw, bond, and angle information and in linked lists for
64 // dihedrals and impropers. Once all of the files have been read
65 // in, the routine done_reading_files is called. At this point, all
66 // of the data that has been read in is copied to arrays. This is
67 // so that each bond and atom can be assigned an index into these
68 // arrays to retreive the parameters in constant time.
69 //
70 // Then the psf file is read in. Each bond and atom is assigned an
71 // index into the parameter lists using the functions assign_*_index.
72 // Once the psf file has been read in, then the routine
73 // done_reading_structre is called to tell the object that it no
74 // longer needs to store the binary trees and linked lists that were
75 // used to query the parameters based on atom type. From this point
76 // on, only the indexes will be used.
77 //
78 // The master node then uses send_parameters to send all of these
79 // parameters to the other nodes and the objects on all of the other
80 // nodes use receive_parameters to accept these parameters.
81 //
82 // From this point on, all of the parameter data is static and the
83 // functions get_*_params are used to retrieve the parameter data
84 // that is desired.
85 
86 // Define the number of Multiples that a Dihedral or Improper
87 // bond can have with the Charm22 parameter set
88 #define MAX_MULTIPLICITY 6
89 
90 // Number of characters maximum allowed for storing atom type names
91 #define MAX_ATOMTYPE_CHARS 6
92 
93 //****** BEGIN CHARMM/XPLOR type changes
94 // Define the numbers associated with each possible parameter-file
95 // type (format) NAMD can handle.
96 #define paraXplor 0
97 #define paraCharmm 1
98 //****** END CHARMM/XPLOR type changes
99 
100 
101 class BondValue {
102 public:
103  BondValue() : k(0), x0(0), x1(0) { }
104  Real k; // Force constant for the bond
105  Real x0; // Rest distance for the bond
106  Real x1; // Upper wall for harmonic wall potential (with x0 lower wall)
107 };
108 
109 class AngleValue {
110 public:
111  Real k; // Force constant for angle
112  Real theta0; // Rest angle for angle
113  Real k_ub; // Urey-Bradley force constant
114  Real r_ub; // Urey-Bradley distance
115  int normal; // Whether we use harmonic (1) or cos-based (0) angle terms
116 };
117 
118 typedef struct four_body_consts
119 {
120  Real k; // Force constant
121  int n; // Periodicity
122  Real delta; // Phase shift
124 
126 public:
129 };
130 
132 public:
135 };
136 
138 
140 public:
141 #ifdef ACCELERATED_INPUT
143 #endif
144  enum {dim=25};
145  CrosstermData c[dim][dim]; // bicubic interpolation coefficients
146 };
147 
148 // JLai
150 public:
153 /* BigReal A;
154  BigReal B;
155  BigReal A14;
156  BigReal B14;
157  BigReal sqrt26;
158  BigReal expo;*/
159 };
160 // End of JLai
161 
162 
164 public:
165  // need to put parameters here...
166  // for now, copy bond
167  Real k; // Force constant for the bond
168  Real x0; // Rest distance for the bond
169 };
170 
171 typedef struct vdw_val
172 {
173  Real sigma; // Sigma value
174  Real epsilon; // Epsilon value
175  Real sigma14; // Sigma value for 1-4 interactions
176  Real epsilon14; // Epsilon value for 1-4 interactions
177 } VdwValue;
178 
179 // IndexedVdwPair is used to form a binary search tree that is
180 // indexed by vwd_type index. This is the tree that will be
181 // used to search during the actual simulation
182 
183 typedef struct indexed_vdw_pair
184 {
185  Index ind1; // Index for first atom type
186  Index ind2; // Index for second atom type
187  Real A; // Parameter A for this pair
188  Real A14; // Parameter A for 1-4 interactions
189  Real B; // Parameter B for this pair
190  Real B14; // Parameter B for 1-4 interactions
191  struct indexed_vdw_pair *right; // Right child
192  struct indexed_vdw_pair *left; // Left child
194 
195 #ifdef ACCELERATED_INPUT_VDW
197 {
198  Index ind1; // Index for first atom type
199  Index ind2; // Index for second atom type
200  Real A; // Parameter A for this pair
201  Real A14; // Parameter A for 1-4 interactions
202  Real B; // Parameter B for this pair
203  Real B14; // Parameter B for 1-4 interactions
204  inline indexed_vdw_pair_accel(Index _ind1, Index _ind2, Real _A, Real _A14, Real _B, Real _B14):
205  ind1(_ind1), ind2(_ind2), A(_A), A14(_A14), B(_B), B14(_B14){}
208 #endif
209 
210 typedef struct indexed_nbthole_pair
211 {
212  Index ind1; // Index for first atom type
213  Index ind2; // Index for second atom type
214  Real alphai; // Parameter alpha for this pair
215  Real alphaj; // Parameter alpha for this pair
216  Real tholeij; // Parameter thole for this pair
217  struct indexed_nbthole_pair *right; // Right child
218  struct indexed_nbthole_pair *left; // Left child
220 
221 typedef struct nbthole_pair_value
222 {
223  Index ind1; // Index for first atom type
224  Index ind2; // Index for second atom type
225  Real alphai; // Parameter alpha for this pair
226  Real alphaj; // Parameter alpha for this pair
227  Real tholeij; // Parameter thole for this pair
228  inline nbthole_pair_value(Index _ind1, Index _ind2, Real _tholeij) : ind1(_ind1), ind2(_ind2), tholeij(_tholeij){};
230  // we don't initialize alpha[ij], they are unused
231 
233 
234 // IndexedTablePair is used to form a binary search tree that is
235 // indexed by table_type index. This is the tree that will be
236 // used to search during the actual simulation
237 
238 typedef struct indexed_table_pair
239 {
240 
241  Index ind1; // Index for first atom type
242  Index ind2; // Index for second atom type
243  int K; // number of the table type for this pair
244 #ifndef ACCELERATED_INPUT_TABLE_PAIR
245  struct indexed_table_pair *right; // Right child
246  struct indexed_table_pair *left; // Left child
247 #else
248  inline indexed_table_pair(Index _ind1, Index _ind2, int _K) : ind1(_ind1), ind2(_ind2), K(_K){};
250 
251 #endif
253 
254 // Structures that are defined in Parameters.C
255 struct bond_params;
256 struct angle_params;
257 struct improper_params;
258 struct dihedral_params;
259 struct crossterm_params;
260 struct vdw_params;
261 struct vdw_pair_params;
262 struct nbthole_pair_params;
263 struct table_pair_params;
264 
266 {
267 private:
268  void initialize(); // zeros out pointers
269 
270  char *atomTypeNames; // Names of atom types
271  Bool AllFilesRead; // Flag TRUE imples that all
272  // of the parameter files
273  // have been read in and
274  // the arrays have been
275  // created.
276 //****** BEGIN CHARMM/XPLOR type changes
277  int paramType; // Type (format) of parameter-file
278 //****** END CHARMM/XPLOR type changes
279  bool cosAngles; // True if some angles may be cos-based
280  struct bond_params *bondp; // Binary tree of bond params
281  bool strictSort; // mem_opt requires alpha order sorting
282 #ifdef ACCELERATED_INPUT
283  TwoLevelParam <2, BondValue> *bondmap; // Unordered map and vector of bond params
284  TwoLevelParam <3, AngleValue> *anglemap; // Unordered map and vector of angle params
285  TwoLevelParam <4, DihedralValue> *dihedralmap; // Unordered map and vector of dihedral params
286  TupleString4 lastDihedralKey;
287  TwoLevelParam <4, ImproperValue> *impropermap; // Unordered map and vector of improper params
288  TwoLevelParam <8, CrosstermValue> *crosstermmap; // Unordered map and vector of crossterm params
289  TwoLevelParam <1, VdwValue> *vdwmap; // Unordered map and vector of Vdw params
290 #ifdef ACCELERATED_INPUT_VDW
291  // for these we don't even need to keep string keyed data structures
292  // so we go straight to maps
293  std::unordered_map <uint64_t, IndexedVdwPairAccel> vdwpairmap; // Unordered map of vdw index pairs
294 #ifdef ACCELERATED_INPUT_NBTHOLE
295  std::unordered_map <uint64_t, NbtholePairValue> nbtholepairmap; // Unordered map of nbthole index pairs
296 #endif
297 #ifdef ACCELERATED_INPUT_TABLE_PAIR
298  std::unordered_map <uint64_t, IndexedTablePair> tablepairmap; // Unordered map of table index pairs
299 #endif
300 
301 #endif
302 #endif
303  struct angle_params *anglep; // Binary tree of angle params
304  struct improper_params *improperp; // Linked list of improper par.
305  struct dihedral_params *dihedralp; // Linked list of dihedral par.
306  struct crossterm_params *crosstermp; // Linked list of cross-term par.
307  struct vdw_params *vdwp; // Binary tree of vdw params
308  struct vdw_pair_params *vdw_pairp; // Binary tree of vdw pairs
309  struct nbthole_pair_params *nbthole_pairp; // Binary tree of nbthole pairs
310  struct table_pair_params *table_pairp; // Binary tree of table pairs
311 public:
312  BondValue *bond_array; // Array of bond params
313  AngleValue *angle_array; // Array of angle params
314  DihedralValue *dihedral_array; // Array of dihedral params
315  ImproperValue *improper_array; // Array of improper params
316  CrosstermValue *crossterm_array; // Array of crossterm params
317  // JLai
318  GromacsPairValue *gromacsPair_array; // Array of gromacsPair params
319  // End of JLai
320  VdwValue *vdw_array; // Array of vdw params
321  NbtholePairValue *nbthole_array; // Array of nbthole params
322  int numenerentries; // Number of entries for enertable
323  int rowsize;
325  BigReal* table_ener; // Table for tabulated energies
326  IndexedVdwPair *vdw_pair_tree; // Tree of vdw pair params
327  IndexedNbtholePair *nbthole_pair_tree; // Tree of nbthole pair params
328  IndexedTablePair *tab_pair_tree; // Tree of vdw pair params
330  int NumBondParams; // Number of bond parameters
331  int NumAngleParams; // Number of angle parameters
332  int NumCosAngles; // Number of cosine-based angles
333  int NumDihedralParams; // Number of dihedral params
334  int NumImproperParams; // Number of improper params
335  int NumCrosstermParams; // Number of cross-term params
336  // JLai
337  int NumGromacsPairParams; // Number of gromacsPair params
338  // End of JLai
339  int NumVdwParams; // Number of vdw parameters
340  int NumTableParams; // Number of table parameters
341  int NumVdwParamsAssigned; // Number actually assigned
342  int NumVdwPairParams; // Number of vdw_pair params
343  int NumNbtholePairParams; // Number of nbthole_pair params
344  int NumTablePairParams; // Number of vdw_pair params
345 private:
346  ResizeArray<char *> error_msgs; // Avoids repeating warnings
347 
348  int *maxDihedralMults; // Max multiplicity for
349  // dihedral bonds
350  int *maxImproperMults; // Max multiplicity for
351  // improper bonds
352 
353  void skip_stream_read(char *, FILE *); // skip part of stream file
354 
355  void add_bond_param(const char *, Bool);// Add a bond parameter
356  struct bond_params *add_to_bond_tree(struct bond_params * ,
357  struct bond_params *, Bool overwrite);
358 
359  void add_angle_param(char *); // Add an angle parameter
360  struct angle_params *add_to_angle_tree(struct angle_params * ,
361  struct angle_params *);
362 
363  void add_dihedral_param(char *, FILE *); // Add a dihedral parameter
364  void add_to_dihedral_list(struct dihedral_params *);
365  void add_to_charmm_dihedral_list(struct dihedral_params *);
366 
367  void add_improper_param(char *, FILE *); // Add an improper parameter
368  void add_to_improper_list(struct improper_params *);
369 
370  void add_crossterm_param(char *, FILE *); // Add an cross-term parameter
371  void add_to_crossterm_list(struct crossterm_params *);
372 
373  void add_vdw_param(char *); // Add a vdw parameter
374  struct vdw_params *add_to_vdw_tree(struct vdw_params *,
375  struct vdw_params *);
376 
377  void add_vdw_pair_param(char *); // Add a vdw pair parameter
378  void add_nbthole_pair_param(char *); // Add a nbthole pair parameter
379  void add_table_pair_param(char *); // Add a table pair parameter
380  void add_to_vdw_pair_list(struct vdw_pair_params *);
381  void add_to_nbthole_pair_list(struct nbthole_pair_params *);
382  void add_to_table_pair_list(struct table_pair_params *);
383 
384  void add_hb_pair_param(char *); // Add a hydrogen bond pair parameter
385 
386  // All of the traverse routines are used for debugging purposes
387  // to print out the appropriate list of parameters
388  void traverse_vdw_pair_params(struct vdw_pair_params *);
389  void traverse_nbthole_pair_params(struct nbthole_pair_params *);
390  void traverse_vdw_params(struct vdw_params *);
391  void traverse_dihedral_params(struct dihedral_params *);
392  void traverse_improper_params(struct improper_params *);
393  void traverse_crossterm_params(struct crossterm_params *);
394  void traverse_angle_params(struct angle_params *);
395  void traverse_bond_params(struct bond_params *);
396 
397  // The index_* routines are used to index each of
398  // the parameters and build the arrays that will be used
399  // for constant time access
400  Index index_bonds(struct bond_params *, Index);
401  Index index_angles(struct angle_params *, Index);
402  Index index_vdw(struct vdw_params *, Index);
403  void index_dihedrals();
404  void index_impropers();
405  void index_crossterms();
406 
407  void convert_vdw_pairs();
408  void convert_nbthole_pairs();
409  void convert_table_pairs();
410  IndexedVdwPair *add_to_indexed_vdw_pairs(IndexedVdwPair *, IndexedVdwPair *);
411  IndexedNbtholePair *add_to_indexed_nbthole_pairs(IndexedNbtholePair *, IndexedNbtholePair *);
412  IndexedTablePair *add_to_indexed_table_pairs(IndexedTablePair *, IndexedTablePair *);
413 
414  int vdw_pair_to_arrays(int *, int *, Real *, Real *, Real *, Real *,
415  int, IndexedVdwPair *);
416 
417  int nbthole_pair_to_arrays(int *, int *, Real *, Real *, Real *, int, IndexedNbtholePair *);
418 
419  int table_pair_to_arrays(int *, int *, int *, int, IndexedTablePair *);
420 
421  // The free_* routines are used by the destructor to deallocate
422  // memory
423  void free_bond_tree(struct bond_params *);
424  void free_angle_tree(struct angle_params *);
425  void free_dihedral_list(struct dihedral_params *);
426  void free_improper_list(struct improper_params *);
427  void free_crossterm_list(struct crossterm_params *);
428  void free_vdw_tree(struct vdw_params *);
429  void free_vdw_pair_tree(IndexedVdwPair *);
430  void free_nbthole_pair_tree(IndexedNbtholePair *);
431  void free_table_pair_tree(IndexedTablePair *);
432  void free_vdw_pair_list();
433  void free_nbthole_pair_list();
434 
435  BigReal interp_lin(BigReal, BigReal, BigReal, BigReal, BigReal); // Perform a linear interpolation for energy table
436 
437  /* does the actual initialization, once the variables have all
438  been given default values. See Parameters() below */
439  void read_parm(const GromacsTopFile *, Bool min);
440 public:
441  //****** BEGIN CHARMM/XPLOR type changes
443  Parameters();
445  //****** END CHARMM/XPLOR type changes
446 
448  void read_parm(Ambertoppar *, BigReal);
449 
451  void read_parm(AmberParm7Reader::Ambertoppar *, BigReal);
452  /* initializes this to hold the set of parameters in the
453  GROMACS topology file <gf>. If the parameter <min> is on,
454  this assumes that we are going to do minimization and
455  therefore can't have atoms with zero VDW - it will add a
456  small repulsive term to these. */
457  Parameters(const GromacsTopFile *gf, Bool min);
458 
459  ~Parameters(); // Destructor
460 
461  // return a string for the Nth atom type. This can only be
462  // called after all the param files have been read and the type
463  // names have been indexed. The Nth atom type refers to the same
464  // index of the Nth vdw parameter (i.e. there are NumVdwParams names).
466  return (atomTypeNames + (a * (MAX_ATOMTYPE_CHARS + 1)));
467  }
468 
469  // Read a parameter file
470  void read_parameter_file(char *);
471 
472  //****** BEGIN CHARMM/XPLOR type changes
473  void read_charmm_parameter_file(char *);
474  //****** END CHARMM/XPLOR type changes
475 
476  // Signal the parameter object that all of
477  // the parameter files have been read in
478  void done_reading_files(Bool);
479 
480  // Signal the parameter object that the
481  // structure file has been read in
482  void done_reading_structure();
483 
484  // The assign_*_index routines are used to assign
485  // an index to atoms or bonds. If an specific atom
486  // or bond type can't be found, then the program
487  // terminates
488  #ifdef MEM_OPT_VERSION
489  void assign_vdw_index(const char *, AtomCstInfo *);
490  #else
491  void assign_vdw_index(const char *, Atom *); // Assign a vdw index to
492  #endif
493  // an atom
494  void assign_bond_index(const char *, const char *, Bond *, bool* bond_found = nullptr);
495  // Assign a bond index
496  // to a bond
497  void assign_angle_index(const char *, const char *, const char *, Angle *, int);
498  // Assign an angle index
499  // to an angle
500  void assign_dihedral_index(const char *, const char*, const char*, const char *, Dihedral *, int, int);
501  // Assign a dihedral index
502  // to a dihedral
503  void assign_improper_index(const char *, const char*, const char*, const char *, Improper *, int);
504  // Assign an improper index
505  // to an improper
506  void assign_crossterm_index(const char *, const char*, const char*, const char *, const char *, const char*, const char*, const char *, Crossterm *);
507 
508  // send_parameters is used by the master process to
509  // communicate the paramters to all the other processors
510  void send_Parameters(MOStream *);
511 
512  // receive_parameters is used by all the child processes
513  // to receive the parameters from the master process
515 
516  // The get_*_params routines are the routines that really
517  // do all the work for this object. Given an index, they
518  // access the parameters and return the relevant information
520  {
521  *k = bond_array[index].k;
522  *x0 = bond_array[index].x0;
523  }
524 
525  void get_angle_params(Real *k, Real *theta0, Real *k_ub, Real *r_ub,
526  Index index)
527  {
528  *k = angle_array[index].k;
529  *theta0 = angle_array[index].theta0;
530  *k_ub = angle_array[index].k_ub;
531  *r_ub = angle_array[index].r_ub;
532  }
533 
535  {
536  return(improper_array[index].multiplicity);
537  }
538 
540  {
541  return(dihedral_array[index].multiplicity);
542  }
543 
544  void get_improper_params(Real *k, int *n, Real *delta,
545  Index index, int mult)
546  {
547  if ( (mult<0) || (mult>MAX_MULTIPLICITY) )
548  {
549  NAMD_die("Bad mult index in Parameters::get_improper_params");
550  }
551 
552  *k = improper_array[index].values[mult].k;
553  *n = improper_array[index].values[mult].n;
554  *delta = improper_array[index].values[mult].delta;
555  }
556 
557  void get_dihedral_params(Real *k, int *n, Real *delta,
558  Index index, int mult)
559  {
560  if ( (mult<0) || (mult>MAX_MULTIPLICITY) )
561  {
562  NAMD_die("Bad mult index in Parameters::get_dihedral_params");
563  }
564 
565  *k = dihedral_array[index].values[mult].k;
566  *n = dihedral_array[index].values[mult].n;
567  *delta = dihedral_array[index].values[mult].delta;
568  }
569 
572  {
573  if ( vdw_array ) {
578  } else {
579  // sigma and epsilon from A and B for each vdw type's interaction with itself
580  Real A; Real B; Real A14; Real B14;
581  if (get_vdw_pair_params(index, index, &A, &B, &A14, &B14) ) {
582  if (A && B) {
583  *sigma = sqrt(cbrt(A)) / sqrt(cbrt(B));
584  *epsilon = B*B / (4*A);
585  }
586  else {
587  *sigma = 0; *epsilon = 0;
588  }
589  if (A14 && B14) {
590  *sigma14 = sqrt(cbrt(A14)) / sqrt(cbrt(B14));
591  *epsilon14 = B14*B14 / (4*A14);
592  }
593  else {
594  *sigma14 = 0; *epsilon14 = 0;
595  }
596  }
597  else {NAMD_die ("Function get_vdw_params failed to derive Lennard-Jones sigma and epsilon from A and B values\n");}
598  }
599  }
600 
601  int get_vdw_pair_params(Index ind1, Index ind2, Real *, Real *, Real *, Real *);
602  // Find a vwd_pair parameter
603 
605 
606  int get_table_pair_params(Index, Index, int*);
607 
608  // The print_*_params are provided for debugging purposes
609  void print_bond_params(); // Print bonds params
610  void print_angle_params(); // Print angle params
611  void print_dihedral_params(); // Print dihedral params
612  void print_dihedral_array(); // Print dihedral params post pocessed
613  void print_improper_params(); // Print improper params
614  void print_crossterm_params(); // Print cross-term params
615  void print_vdw_params(); // Print vdw params
616  void print_vdw_pair_params(); // Print vdw_pair params
617  void print_nbthole_pair_params(); // Print nbthole_pair params
618  void print_param_summary(); // Print a summary of params
619  void read_ener_table(SimParameters*); // Read an energy table file
620  int get_int_table_type(char*); // Return the integer type for a named table interaction
621 
622  int read_energy_type(FILE*, const int, BigReal*, const float, const float);
623  int read_energy_type_cubspline(FILE*, const int, BigReal*, const float, const float);
624  int read_energy_type_bothcubspline(FILE*, const int, BigReal*, const float, const float);
625 };
626 
627 #endif
628 
int numenerentries
Definition: Parameters.h:322
int NumTablePairParams
Definition: Parameters.h:344
GromacsPairValue * gromacsPair_array
Definition: Parameters.h:318
void assign_improper_index(const char *, const char *, const char *, const char *, Improper *, int)
Definition: Parameters.C:5167
int NumBondParams
Definition: Parameters.h:330
CrosstermData c[dim][dim]
Definition: Parameters.h:145
Real epsilon
Definition: Parameters.h:174
int NumTableParams
Definition: Parameters.h:340
int columnsize
Definition: Parameters.h:324
nbthole_pair_value(Index _ind1, Index _ind2, Real _tholeij)
Definition: Parameters.h:228
void assign_vdw_index(const char *, Atom *)
Definition: Parameters.C:4399
void print_crossterm_params()
Definition: Parameters.C:6448
void print_bond_params()
Definition: Parameters.C:6326
indexed_table_pair(Index _ind1, Index _ind2, int _K)
Definition: Parameters.h:248
void read_charmm_parameter_file(char *)
Definition: Parameters.C:567
struct indexed_vdw_pair * right
Definition: Parameters.h:191
int NumVdwParams
Definition: Parameters.h:339
struct indexed_table_pair IndexedTablePair
int get_improper_multiplicity(Index index)
Definition: Parameters.h:534
float Real
Definition: common.h:118
int NumVdwPairParams
Definition: Parameters.h:342
Real sigma14
Definition: Parameters.h:175
void get_dihedral_params(Real *k, int *n, Real *delta, Index index, int mult)
Definition: Parameters.h:557
int read_energy_type_cubspline(FILE *, const int, BigReal *, const float, const float)
Definition: Parameters.C:9012
Real sigma14
Definition: Parameters.C:153
DihedralValue * dihedral_array
Definition: Parameters.h:314
int NumAngleParams
Definition: Parameters.h:331
void assign_bond_index(const char *, const char *, Bond *, bool *bond_found=nullptr)
Definition: Parameters.C:4741
CrosstermValue * crossterm_array
Definition: Parameters.h:316
IndexedVdwPair * vdw_pair_tree
Definition: Parameters.h:326
int read_energy_type(FILE *, const int, BigReal *, const float, const float)
Definition: Parameters.C:9252
Real epsilon14
Definition: Parameters.C:154
int NumDihedralParams
Definition: Parameters.h:333
void print_param_summary()
Definition: Parameters.C:6478
IndexedNbtholePair * nbthole_pair_tree
Definition: Parameters.h:327
BigReal d11
Definition: Parameters.h:137
void read_parameter_file(char *)
Definition: Parameters.C:430
FourBodyConsts values[MAX_MULTIPLICITY]
Definition: Parameters.h:128
AngleValue * angle_array
Definition: Parameters.h:313
int Index
Definition: structures.h:26
struct indexed_vdw_pair * left
Definition: Parameters.h:192
void print_dihedral_array()
int get_int_table_type(char *)
Definition: Parameters.C:9371
void get_angle_params(Real *k, Real *theta0, Real *k_ub, Real *r_ub, Index index)
Definition: Parameters.h:525
int NumNbtholePairParams
Definition: Parameters.h:343
#define MAX_MULTIPLICITY
Definition: Parameters.h:88
void get_improper_params(Real *k, int *n, Real *delta, Index index, int mult)
Definition: Parameters.h:544
void assign_crossterm_index(const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, Crossterm *)
Definition: Parameters.C:5352
Real sigma
Definition: Parameters.h:173
void print_vdw_pair_params()
Definition: Parameters.C:6411
int NumImproperParams
Definition: Parameters.h:334
int Bool
Definition: common.h:142
void print_dihedral_params()
Definition: Parameters.C:6360
struct four_body_consts FourBodyConsts
struct vdw_val VdwValue
BigReal d00
Definition: Parameters.h:137
struct indexed_vdw_pair IndexedVdwPair
int NumCosAngles
Definition: Parameters.h:332
int NumCrosstermParams
Definition: Parameters.h:335
ImproperValue * improper_array
Definition: Parameters.h:315
int get_vdw_pair_params(Index ind1, Index ind2, Real *, Real *, Real *, Real *)
Definition: Parameters.C:4646
void NAMD_die(const char *err_msg)
Definition: common.C:147
int NumVdwParamsAssigned
Definition: Parameters.h:341
NbtholePairValue * nbthole_array
Definition: Parameters.h:321
char * atom_type_name(Index a)
Definition: Parameters.h:465
int get_num_vdw_params(void)
Definition: Parameters.h:604
FourBodyConsts values[MAX_MULTIPLICITY]
Definition: Parameters.h:134
struct indexed_nbthole_pair * right
Definition: Parameters.h:217
struct indexed_vdw_pair_accel IndexedVdwPairAccel
int get_table_pair_params(Index, Index, int *)
Definition: Parameters.C:4556
void send_Parameters(MOStream *)
Definition: Parameters.C:6560
void done_reading_files(Bool)
Definition: Parameters.C:3813
void print_nbthole_pair_params()
Definition: Parameters.C:6428
VdwValue * vdw_array
Definition: Parameters.h:320
void print_vdw_params()
Definition: Parameters.C:6394
Index index
Definition: Parameters.C:155
BigReal d01
Definition: Parameters.h:137
BigReal * table_ener
Definition: Parameters.h:325
BondValue * bond_array
Definition: Parameters.h:312
void read_ener_table(SimParameters *)
Definition: Parameters.C:8527
void print_improper_params()
Definition: Parameters.C:6377
int read_energy_type_bothcubspline(FILE *, const int, BigReal *, const float, const float)
Definition: Parameters.C:8775
void assign_dihedral_index(const char *, const char *, const char *, const char *, Dihedral *, int, int)
Definition: Parameters.C:4962
int NumGromacsPairParams
Definition: Parameters.h:337
void done_reading_structure()
Definition: Parameters.C:6511
Real epsilon14
Definition: Parameters.h:176
void assign_angle_index(const char *, const char *, const char *, Angle *, int)
Definition: Parameters.C:4849
Real theta0
Definition: Parameters.h:112
struct indexed_nbthole_pair * left
Definition: Parameters.h:218
indexed_vdw_pair_accel(Index _ind1, Index _ind2, Real _A, Real _A14, Real _B, Real _B14)
Definition: Parameters.h:204
int tablenumtypes
Definition: Parameters.h:329
void print_angle_params()
Definition: Parameters.C:6344
Real epsilon
Definition: Parameters.C:152
Real sigma
Definition: Parameters.C:151
void get_bond_params(Real *k, Real *x0, Index index)
Definition: Parameters.h:519
struct nbthole_pair_value NbtholePairValue
void get_vdw_params(Real *sigma, Real *epsilon, Real *sigma14, Real *epsilon14, Index index)
Definition: Parameters.h:570
int get_dihedral_multiplicity(Index index)
Definition: Parameters.h:539
IndexedTablePair * tab_pair_tree
Definition: Parameters.h:328
#define cbrt(x)
Definition: Parameters.h:51
#define MAX_ATOMTYPE_CHARS
Definition: Parameters.h:91
BigReal d10
Definition: Parameters.h:137
struct indexed_nbthole_pair IndexedNbtholePair
void receive_Parameters(MIStream *)
Definition: Parameters.C:6936
double BigReal
Definition: common.h:123