2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team,
6 * check out http://www.gromacs.org for more information.
7 * Copyright (c) 2012, by the GROMACS development team, led by
8 * David van der Spoel, Berk Hess, Erik Lindahl, and including many
9 * others, as listed in the AUTHORS file in the top-level source
10 * directory and at http://www.gromacs.org.
12 * GROMACS is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 2.1
15 * of the License, or (at your option) any later version.
17 * GROMACS is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with GROMACS; if not, see
24 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * If you want to redistribute modifications to GROMACS, please
28 * consider that scientific software is very special. Version
29 * control is crucial - bugs must be traceable. We will be happy to
30 * consider code for inclusion in the official distribution, but
31 * derived work must not be called official GROMACS. Details are found
32 * in the README & COPYING files - if they are missing, get the
33 * official version at http://www.gromacs.org.
35 * To help us fund GROMACS development, we humbly ask that you cite
36 * the research papers on the package. Check out http://www.gromacs.org.
39 #define DEBUG_BOND(log,x,ai,aj,dx,dr2,dr,bondparams,delta_r,vbond,fbond,fij)
40 #define DEBUG_ANGLE_UPD(log,f_i,f_j,f_k)
41 #define DEBUG_ANGLES(log,x,ai,aj,ak,theta,bondparams,dtheta,fijk,va)
42 #define DEBUG_ANGLE4S(log,x,ai,aj,ak,theta,bondparams,dth1,dth2,dth12,fijk,va)
43 #define DEBUG_DIH_ANGLE(log,xi,xj,xk,xl,r_ij,r_kj,r_kl,m,n,cos_phi,phi,ipr, \
45 #define DEBUG_DIH_FUP(log,i,j,k,l,ddphi,ipr,p,q,r_ij,r_kj,r_kl,m,n,f_i,f_j, \
46 f_k,f_l,uvec,vvec,svec)
47 #define DEBUG_PDIHS(log,ai,aj,ak,al,x,r_ij,r_kj,r_kl,m,n,ph0,cp,mult,mdphi, \
49 #define DEBUG_IDIHS(log,ai,aj,ak,al,x,ph0,cp,dphi,ddphi,vid)
50 #define DEBUG_RBDIHS(log,rbc,ddphi,v)
51 #define DEBUG_POSRES(log,ai,x,pos0,fc,dx,dr2,fi,v)
53 #define vlist(v) (v)[0],(v)[1],(v)[2]
54 #define ivlist(i,v) i,(v)[i][0],(v)[i][1],(v)[i][2]
55 #define VECFMT(v) #v"=(%e,%e,%e) "
56 #define IVECFMT(i,v) #i"=%d (%e,%e,%e) "
57 #define INTFMT(i) #i"=%d "
58 #define REALFMT(r) #r"=%e "
61 #define DEBUG_BOND(log,x,ai,aj,dx,dr2,dr,bondparams,delta_r,vbond,fbond,fij) \
62 fprintf(log,"bonds: " \
75 ivlist(i,x),ivlist(aj,x), \
76 vlist(dx),dr2,dr,bondparams->bonds.b0,bondparams->bonds.cb, \
77 delta_r,vbond,fbond,vlist(fij))
78 #define DEBUG_ANGLE_UPD(log,f_i,f_j,f_k) \
79 fprintf(log,"do_fang_upd: " \
84 vlist(f_i),vlist(f_j),vlist(f_k))
85 #define DEBUG_ANGLES(log,x,ai,aj,ak,theta,bondparams,dtheta,fijk,va) \
86 fprintf(log,"angles: " \
97 ivlist(ai,x),ivlist(aj,x),ivlist(ak,x),theta, \
98 bondparams->angles.th0,bondparams->angles.ct,dtheta,fijk,va)
99 #define DEBUG_ANGLE4S(log,x,ai,aj,ak,theta,bondparams,dth1,dth2,dth12,fijk,v) \
100 fprintf(log,"angle4s: " \
113 ai,vlist(x[ai]),aj,vlist(x[aj]),ak,vlist(x[ak]),theta, \
114 bondparams->angles.th0,bondparams->angles.ct,dth1,dth2,dth12,fijk,va)
115 #define DEBUG_DIH_ANGLE(log,xi,xj,xk,xl,r_ij,r_kj,r_kl,m,n,cos_phi,phi,ipr, \
117 fprintf(log,"dih_angle: " \
131 vlist(xi),vlist(xj),vlist(xk),vlist(xl), \
132 vlist(r_ij),vlist(r_kj),vlist(r_kl),vlist(m),vlist(n), \
133 *(cos_phi),phi,ipr,*(sign))
134 #define DEBUG_DIH_FUP(log,i,j,k,l,ddphi,ipr,p,q,r_ij,r_kj,r_kl,m,n,f_i,f_j, \
135 f_k,f_l,uvec,vvec,svec) \
136 fprintf(log,"dih_fup: " \
158 i,j,k,l,ddphi,ipr,p,q,vlist(r_ij),vlist(r_kj),vlist(r_kl), \
160 vlist(f_i),vlist(f_j),vlist(f_k),vlist(f_l), \
161 vlist(uvec),vlist(vvec),vlist(svec))
162 #define DEBUG_PDIHS(log,ai,aj,ak,al,x,r_ij,r_kj,r_kl,m,n,ph0,cp,mult,mdphi, \
164 fprintf(log,"pdihs: " \
181 ivlist(ai,x),ivlist(aj,x),ivlist(ak,x),ivlist(al,x),vlist(r_ij), \
182 vlist(r_kj),vlist(r_kl),vlist(m),vlist(n),ph0,cp,mult,mdphi,ddphi, \
184 #define DEBUG_IDIHS(log,ai,aj,ak,al,x,ph0,cp,dphi,ddphi,vid) \
185 fprintf(log,"idihs: " \
196 ivlist(ai,x),ivlist(aj,x),ivlist(ak,x),ivlist(al,x),ph0,cp,dphi, \
198 #define DEBUG_RBDIHS(log,rbc,ddphi,v) \
199 fprintf(log,"rbdihs: " \
209 (rbc)[0],(rbc)[1],(rbc)[2],(rbc)[3],(rbc)[4],(rbc)[5],ddphi,v)
210 #define DEBUG_POSRES(log,ai,x,pos0,fc,dx,dr2,fi,v) \
211 fprintf(log,"rbdihs: " \
220 ivlist(ai,x),vlist(pos0),fc,vlist(dx),dr2,vlist(fi),v)