4 * This source code is part of
8 * GROningen MAchine for Chemical Simulations
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
27 * Good ROcking Metal Altar for Chronical Sinners
33 static char *SRCID_hackblock_h
= "$Id$";
38 /* Used for reading .rtp/.tdb */
39 /* ebtsBONDS must be the first, new types can be added to the end */
40 /* these *MUST* correspond to the arrays in hackblock.c */
41 enum { ebtsBONDS
, ebtsANGLES
, ebtsPDIHS
, ebtsIDIHS
, ebtsNR
};
42 extern char *btsNames
[ebtsNR
];
43 extern int btsNiatoms
[ebtsNR
];
45 /* if changing any of these structs, make sure that all of the
46 free/clear/copy/merge_t_* functions stay updated */
50 char *a
[MAXATOMLIST
]; /* atom names */
51 char *s
; /* optional define string which gets copied from
52 .rtp/.tdb to .top and will be parsed by cpp
57 int nb
; /* number of bondeds */
58 t_rbonded
*b
; /* bondeds */
69 /* list of bonded interactions to add */
70 t_rbondeds rb
[ebtsNR
];
73 /* Block to hack residues */
75 int nr
; /* Number of atoms to hack */
76 char *oname
; /* Old name */
77 char *nname
; /* New name */
78 /* the type of hack depends on the setting of oname and nname:
79 * if oname==NULL we're adding, must have tp>0 also!
80 * if oname!=NULL && nname==NULL we're deleting
81 * if oname!=NULL && nname!=NULL we're replacing
83 t_atom
*atom
; /* New atom data */
84 int cgnr
; /* chargegroup number. if not read will be NOTSET */
85 int tp
; /* Type of attachment (1..10) */
86 char *a
[4]; /* Control atoms i,j,k,l */
87 rvec newx
; /* calculated new position */
91 char *name
; /* Name of hack block (residue or terminus) */
92 int nhack
; /* Number of atoms to hack */
93 int maxhack
;/* used for efficient srenew-ing */
94 t_hack
*hack
; /* Hack list */
95 /* list of bonded interactions to add */
96 t_rbondeds rb
[ebtsNR
];
99 extern void free_t_restp(int nrtp
, t_restp
**rtp
);
100 extern void free_t_hack(int nh
, t_hack
**h
);
101 extern void free_t_hackblock(int nhb
, t_hackblock
**hb
);
102 /* free the whole datastructure */
104 extern void clear_t_hackblock(t_hackblock
*hb
);
105 extern void clear_t_hack(t_hack
*hack
);
108 extern void merge_t_bondeds(t_rbondeds s
[], t_rbondeds d
[]);
109 /* add s[].b[] to d[].b[] */
111 extern void copy_t_restp(t_restp
*s
, t_restp
*d
);
112 extern void copy_t_hack(t_hack
*s
, t_hack
*d
);
113 extern void copy_t_hackblock(t_hackblock
*s
, t_hackblock
*d
);
114 /* make copy of whole datastructure */
116 extern void merge_hacks_lo(int ns
, t_hack
*s
, int *nd
, t_hack
**d
);
117 /* add s[] to *d[] */
119 extern void merge_hacks(t_hackblock
*s
, t_hackblock
*d
);
120 /* add s->hacks[] to d->hacks[] */
122 extern void merge_t_hackblock(t_hackblock
*s
, t_hackblock
*d
);
123 /* add s->hacks[] and s->rb[] to d*/
125 extern void dump_hb(FILE *out
, int nres
, t_hackblock hb
[]);
126 /* print out whole datastructure */
128 #endif /* _hackblock_h */