Re: AMBER: About the Amber constraint constant

From: David A. Case <case.scripps.edu>
Date: Tue, 17 Aug 2004 08:08:04 -0700

On Mon, Aug 16, 2004, Yuhui Cheng wrote:

> I think that you might misunderstand me. In
> "_disnrg.f", the comments line is correct, as you
> wrote down:
>
> ! r1 <= r <= r2 : E = k2*(r-r2)**2
> ! r2 <= r <= r3 : E = 0
> ! r3 <= r <= r4 : E = k3*(r-r3)**2
>
> But can you check the program line?
> .....
> else if (rij < r2) then
> dif = rij - r2
> df = 2.0d0 * k2 * dif
> e = k2*dif*dif
> else if (rij <= r3) then
> e = 0.0d0
> do m=1,6
> dfr(m) = 0.0d0
> end do
> return
> else if (rij < r4) then
> dif = rij - r3
> df = 2.0d0 * k3 * dif
> e = k3*dif*dif
> ......
>
> Subroutine "disnrg" has been used in "nmrred.f
> ", k2 is the "rk2" and k3 is the "rk3", so in the
> program line it seems you didn't think about "1/2",

Looks correct to me. The energy goes into variable "e", which is set
to "e = k2*dif*dif" or "e = k3*dif*dif", just like the comments say; ["dif"
is (r-r2) or (r-r3)]. It's probably true that I misunderstand you, as I
still don't really know _exactly_ what you are referring to when you say:
'it seems you didn't think about "1/2"'.

In your original post you said:

   the comments line use the formula "E=(1/2)*k*(x-x0)^2" but the
   program line neglected the "1/2".

That comment was what I was originally responding to.

....regards...dac

-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Tue Aug 17 2004 - 18:53:02 PDT
Custom Search