AMBER Archive (2008)

Subject: Re: AMBER: value of Pi in Amber

From: Scott Brozell (sbrozell_at_scripps.edu)
Date: Tue Aug 26 2008 - 17:07:49 CDT


Hi,

On Fri, 8 Aug 2008, Alan wrote:

> Ok, it may meaningless in the end but I saw in the prmtop files that
> for DIHEDRAL_PHASE, angle 180 degree is given 3.14159400E+00.
>
> Pi is 3.141592653590...., so if rounding as above is should
> be 3.14159300E+00.
>
> grepping over amberTools src code, I see Pi apparently correctly defined.
>
> What I am doing in tleap is:
> source leaprc.gaff
> mods = loadamberparams FOO.frcmod
> FOO = loadmol2 FOO_bcc_gaff.mol2
> saveamberparm FOO FOO_AC.prmtop FOO_AC.inpcrd
>
> So, if I am loading only leaprc.gaff and FOO.frcmod (generated by
> antechamber with gaff), and in both files dihedral phase is written in
> degrees (e.g. 180.0), I am wondering in which part of leap code is
> converting to 3.14159400E+00.

./src/leap/basics.h:165:#define DEGTORAD 0.0174533

DEGTORAD is used 88 times in amber10/src/leap
and even occurs in nab/prm.c in inactive code.
The perverted value of pi occurs 2257 times in amber11.
And the perverted value of pi may occur zillions of times in the amberverse.

This is a terrible programming lapse in an otherwise good effort.

Scott

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" (in the *body* of the email)
      to majordomo_at_scripps.edu