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 * GROningen Mixture of Alchemy and Childrens' Stories
36 #define DEBUG_BOND(log,x,ai,aj,dx,dr2,dr,bondparams,delta_r,vbond,fbond,fij)
37 #define DEBUG_ANGLE_UPD(log,f_i,f_j,f_k)
38 #define DEBUG_ANGLES(log,x,ai,aj,ak,theta,bondparams,dtheta,fijk,va)
39 #define DEBUG_ANGLE4S(log,x,ai,aj,ak,theta,bondparams,dth1,dth2,dth12,fijk,va)
40 #define DEBUG_DIH_ANGLE(log,xi,xj,xk,xl,r_ij,r_kj,r_kl,m,n,cos_phi,phi,ipr, \
42 #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, \
43 f_k,f_l,uvec,vvec,svec)
44 #define DEBUG_PDIHS(log,ai,aj,ak,al,x,r_ij,r_kj,r_kl,m,n,ph0,cp,mult,mdphi, \
46 #define DEBUG_IDIHS(log,ai,aj,ak,al,x,ph0,cp,dphi,ddphi,vid)
47 #define DEBUG_RBDIHS(log,rbc,ddphi,v)
48 #define DEBUG_POSRES(log,ai,x,pos0,fc,dx,dr2,fi,v)
50 #define vlist(v) (v)[0],(v)[1],(v)[2]
51 #define ivlist(i,v) i,(v)[i][0],(v)[i][1],(v)[i][2]
52 #define VECFMT(v) #v"=(%e,%e,%e) "
53 #define IVECFMT(i,v) #i"=%d (%e,%e,%e) "
54 #define INTFMT(i) #i"=%d "
55 #define REALFMT(r) #r"=%e "
58 #define DEBUG_BOND(log,x,ai,aj,dx,dr2,dr,bondparams,delta_r,vbond,fbond,fij) \
59 fprintf(log,"bonds: " \
72 ivlist(i,x),ivlist(aj,x), \
73 vlist(dx),dr2,dr,bondparams->bonds.b0,bondparams->bonds.cb, \
74 delta_r,vbond,fbond,vlist(fij))
75 #define DEBUG_ANGLE_UPD(log,f_i,f_j,f_k) \
76 fprintf(log,"do_fang_upd: " \
81 vlist(f_i),vlist(f_j),vlist(f_k))
82 #define DEBUG_ANGLES(log,x,ai,aj,ak,theta,bondparams,dtheta,fijk,va) \
83 fprintf(log,"angles: " \
94 ivlist(ai,x),ivlist(aj,x),ivlist(ak,x),theta, \
95 bondparams->angles.th0,bondparams->angles.ct,dtheta,fijk,va)
96 #define DEBUG_ANGLE4S(log,x,ai,aj,ak,theta,bondparams,dth1,dth2,dth12,fijk,v) \
97 fprintf(log,"angle4s: " \
110 ai,vlist(x[ai]),aj,vlist(x[aj]),ak,vlist(x[ak]),theta, \
111 bondparams->angles.th0,bondparams->angles.ct,dth1,dth2,dth12,fijk,va)
112 #define DEBUG_DIH_ANGLE(log,xi,xj,xk,xl,r_ij,r_kj,r_kl,m,n,cos_phi,phi,ipr, \
114 fprintf(log,"dih_angle: " \
128 vlist(xi),vlist(xj),vlist(xk),vlist(xl), \
129 vlist(r_ij),vlist(r_kj),vlist(r_kl),vlist(m),vlist(n), \
130 *(cos_phi),phi,ipr,*(sign))
131 #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, \
132 f_k,f_l,uvec,vvec,svec) \
133 fprintf(log,"dih_fup: " \
155 i,j,k,l,ddphi,ipr,p,q,vlist(r_ij),vlist(r_kj),vlist(r_kl), \
157 vlist(f_i),vlist(f_j),vlist(f_k),vlist(f_l), \
158 vlist(uvec),vlist(vvec),vlist(svec))
159 #define DEBUG_PDIHS(log,ai,aj,ak,al,x,r_ij,r_kj,r_kl,m,n,ph0,cp,mult,mdphi, \
161 fprintf(log,"pdihs: " \
178 ivlist(ai,x),ivlist(aj,x),ivlist(ak,x),ivlist(al,x),vlist(r_ij), \
179 vlist(r_kj),vlist(r_kl),vlist(m),vlist(n),ph0,cp,mult,mdphi,ddphi, \
181 #define DEBUG_IDIHS(log,ai,aj,ak,al,x,ph0,cp,dphi,ddphi,vid) \
182 fprintf(log,"idihs: " \
193 ivlist(ai,x),ivlist(aj,x),ivlist(ak,x),ivlist(al,x),ph0,cp,dphi, \
195 #define DEBUG_RBDIHS(log,rbc,ddphi,v) \
196 fprintf(log,"rbdihs: " \
206 (rbc)[0],(rbc)[1],(rbc)[2],(rbc)[3],(rbc)[4],(rbc)[5],ddphi,v)
207 #define DEBUG_POSRES(log,ai,x,pos0,fc,dx,dr2,fi,v) \
208 fprintf(log,"rbdihs: " \
217 ivlist(ai,x),vlist(pos0),fc,vlist(dx),dr2,vlist(fi),v)