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