Re: amber-developers: pressure code

From: David A. Case <case.scripps.edu>
Date: Wed, 28 May 2008 18:43:52 -0700

On Tue, May 27, 2008, Thomas Cheatham III wrote:
>
> Suggested simple adaptation:
>
> if (ntp == 1) then
> rmu(1) = (1.d0-dtcp*(pres0-pres(4)))**third
> rmu(2) = rmu(1)
> rmu(3) = rmu(1)
> else if (ntp == 2) then
> rmu(1) = (1.d0-dtcp*(pres0-pres(1)))**third
> rmu(2) = (1.d0-dtcp*(pres0-pres(2)))**third
> rmu(3) = (1.d0-dtcp*(pres0-pres(3)))**third
> else if (ntp == 3) then ! scale only X direction
> rmu(1) = (1.d0-dtcp*(pres0-pres(4)))**third
                                     ^^^^^^^^^

Doesn't look kosher to me. Don't you want pres(1) here, not pres(4)?

> rmu(2) = 1.d0
> rmu(3) = 1.d0
> end if

I know this is hand-waving, but I think of this as having differnt values of
taup for the different directions. In y and z, you essentially don't allow
any box-size changes, so taup -> infinity and dtcp -> zero. Then rmu(2) and
rmu(3) would be 1.0 (as in your ntp=3 code), but rmu(1) would be based on
pres(1). If you piston only moves in one direction, I'd the the component of
the internal pressure along that direction should be what you need to check.

As I said, I'm just guessing here: how does CHARMM do it?

...dac
Received on Sun Jun 01 2008 - 06:07:21 PDT
Custom Search