AMBER Archive (2006)

Subject: Re: AMBER: Harmonic restraint along z-axis

From: Carlos Simmerling (carlos_at_csb.sunysb.edu)
Date: Thu Jul 27 2006 - 11:15:18 CDT


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_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu