[gmx-users] Patch for wrong NH2 angles in calch.c
Charles Karney
ckarney at sarnoff.com
Thu Nov 18 16:09:46 CET 2004
The bond angles used by calch.c when adding "type 3" hydrogens (i.e.,
planar hydrogens in -NH2 groups) is wrong. The following patch fixes
this and also uses the exact value for the tetrahedral angle. This
patch applies to the gromacs 3.2.1 source
--
Charles Karney Email: ckarney at sarnoff.com
Sarnoff Corporation URL: http://charles.karney.info
201 Washington Rd Phone: +1 609 734 2312
Princeton, NJ 08543-5300 Fax: +1 609 734 2323
--- gromacs-3.2.1/src/gmxlib/calch.c.orig 2004-01-23 12:23:13.000000000 -0500
+++ gromacs-3.2.1/src/gmxlib/calch.c 2004-11-18 09:43:28.000000000 -0500
@@ -103,7 +103,8 @@
void calc_h_pos(int nht, rvec xa[], rvec xh[])
{
-#define alfaH (DEG2RAD*109.5)
+#define alfaH (acos(-1/3.0)) /* 109.47 degrees */
+#define alfaHpl (2*M_PI/3) /* 120 degrees */
#define distH 0.1
#define alfaCOM (DEG2RAD*117)
@@ -181,8 +182,8 @@
break;
case 3: /* two planar hydrogens, e.g. -NH2 */
for(d=0; (d<DIM); d++) {
- xH1[d] = xAI[d]-distH*sin(alfaH)*sb[d]-distH*cos(alfaH)*sij[d];
- xH2[d] = xAI[d]+distH*sin(alfaH)*sb[d]-distH*cos(alfaH)*sij[d];
+ xH1[d] = xAI[d]-distH*sin(alfaHpl)*sb[d]-distH*cos(alfaHpl)*sij[d];
+ xH2[d] = xAI[d]+distH*sin(alfaHpl)*sb[d]-distH*cos(alfaHpl)*sij[d];
}
break;
case 4: /* two or three tetrahedral hydrogens, e.g. -CH3 */
More information about the gromacs.org_gmx-users
mailing list