3 * This source code is part of
7 * GROningen MAchine for Chemical Simulations
10 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12 * Copyright (c) 2001-2004, The GROMACS development team,
13 * check out http://www.gromacs.org for more information.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * If you want to redistribute modifications, please consider that
21 * scientific software is very special. Version control is crucial -
22 * bugs must be traceable. We will be happy to consider code for
23 * inclusion in the official distribution, but derived work must not
24 * be called official GROMACS. Details are found in the README & COPYING
25 * files - if they are missing, get the official version at www.gromacs.org.
27 * To help us fund GROMACS development, we humbly ask that you cite
28 * the papers on the package - you can find them in the top README file.
30 * For more info, check our website at http://www.gromacs.org
33 * Gromacs Runs On Most of All Computer Systems
53 extern int glatnr(int *global_atom_index
,int i
);
54 /* Returns the global topology atom number belonging to local atom index i.
55 * This function is intended for writing ascii output
56 * and returns atom numbers starting at 1.
57 * When global_atom_index=NULL returns i+1.
60 extern void calc_bonds(FILE *fplog
,const gmx_multisim_t
*ms
,
62 rvec x
[],history_t
*hist
,
63 rvec f
[],t_forcerec
*fr
,
64 const t_pbc
*pbc
,const t_graph
*g
,
65 gmx_enerdata_t
*enerd
,t_nrnb
*nrnb
,real lambda
,
67 t_fcdata
*fcd
,int *ddgatindex
,
68 t_atomtypes
*atype
, gmx_genborn_t
*born
,
69 bool bPrintSepPot
,gmx_large_int_t step
);
71 * The function calc_bonds() calculates all bonded force interactions.
72 * The "bonds" are specified as follows:
74 * the total number of bonded interactions.
76 * specifies which atoms are involved in a bond of a certain
77 * type, see also struct t_idef.
78 * t_functype *functype
79 * defines for every bonded force type what type of function to
80 * use, see also struct t_idef.
81 * t_iparams *forceparams
82 * defines the parameters for every bond type, see also struct
85 * total potential energy split up over the function types.
87 * global atom number indices, should be NULL when not using DD.
89 * if TRUE print local potential and dVdlambda for each bonded type.
91 * used with bPrintSepPot
93 * the total potential energy (sum over epot).
96 extern void calc_bonds_lambda(FILE *fplog
,
100 const t_pbc
*pbc
,const t_graph
*g
,
101 gmx_enerdata_t
*enerd
,t_nrnb
*nrnb
,
104 t_fcdata
*fcd
,int *global_atom_index
);
105 /* As calc_bonds, but only determines the potential energy
106 * for the perturbed interactions.
107 * The shift forces in fr are not affected.
110 extern real
posres(int nbonds
,
111 const t_iatom forceatoms
[],const t_iparams forceparams
[],
112 const rvec x
[],rvec f
[],rvec vir_diag
,
114 real lambda
,real
*dvdlambda
,
115 int refcoord_scaling
,int ePBC
,rvec comA
,rvec comB
);
116 /* Position restraints require a different pbc treatment from other bondeds */
118 extern real
bond_angle(const rvec xi
,const rvec xj
,const rvec xk
,
120 rvec r_ij
,rvec r_kj
,real
*costh
,
121 int *t1
,int *t2
); /* out */
122 /* Calculate bond-angle. No PBC is taken into account (use mol-shift) */
124 extern real
dih_angle(const rvec xi
,const rvec xj
,const rvec xk
,const rvec xl
,
126 rvec r_ij
,rvec r_kj
,rvec r_kl
,rvec m
,rvec n
, /* out */
128 int *t1
,int *t2
,int *t3
);
129 /* Calculate dihedral-angle. No PBC is taken into account (use mol-shift) */
131 extern void do_dih_fup(int i
,int j
,int k
,int l
,real ddphi
,
132 rvec r_ij
,rvec r_kj
,rvec r_kl
,
133 rvec m
,rvec n
,rvec f
[],rvec fshift
[],
134 const t_pbc
*pbc
,const t_graph
*g
,
135 const rvec
*x
,int t1
,int t2
,int t3
);
136 /* Do an update of the forces for dihedral potentials */
138 /*************************************************************************
140 * Bonded force functions
142 *************************************************************************/
143 extern t_ifunc bonds
,g96bonds
,morse_bonds
,cubic_bonds
,FENE_bonds
,restraint_bonds
;
144 extern t_ifunc angles
,g96angles
,cross_bond_bond
,cross_bond_angle
,urey_bradley
,quartic_angles
;
145 extern t_ifunc pdihs
,idihs
,rbdihs
;
146 extern t_ifunc tab_bonds
,tab_angles
,tab_dihs
;
147 extern t_ifunc polarize
,water_pol
,thole_pol
,angres
,angresz
,unimplemented
;
153 #endif /* _bondf_h */