Re: AMBER: Harmonic restraint along z-axis

From: Carlos Simmerling <carlos.csb.sunysb.edu>
Date: Thu, 27 Jul 2006 12:15:18 -0400

I added this to the xconst routine for doing something similar,
you can use it as an example:

! add restraint to keep atom 1019 below 10.0 in the Y axis

#ifdef MPI
      if (mytaskid.eq.0) then
#endif
      ! force constant
        wt = 1.0
      ! atom 1019
        i=1019
        I3 = 3*I-3
        if (x(i3+2).gt.10.) then
            AY = X(I3+2)-(10.)
            WY = WT*AY
            EADD = WY*AY
            ECON = ECON+EADD
            F(I3+2) = F(I3+2)-(WY+WY)
        endif

Myunggi Yi wrote:

> Dear Amber user,
>
> I'd like to restrain some atoms at a certain value (z=5.0) along
> the z-axis with a harmonic potential during simulations.
> The source code is so complicated for me.
> Would you give me some draft or orientation for adding
> my own potential to the sander code?
>
>
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Sun Jul 30 2006 - 06:07:09 PDT
Custom Search