Re: [AMBER] How to appropriately replace the amber force in the source codes ?

From: Jason Swails <jason.swails.gmail.com>
Date: Wed, 6 Jan 2016 09:02:51 -0500

On Wed, Jan 6, 2016 at 8:37 AM, jinfeng liu <jinfengliu1119.gmail.com>
wrote:

> Dear Amber source codes authors,
>
> I want to use amber14 to perform protein MD simulation, but using
> the atomic forces calculated in my method. So, I want to modify the Amber
> source codes to replace the Amber MM forces with my calculated forces, and
> still use the Amber thermostat. I did a little modifications in runmd.F90,
> which is in AmberTools/src/sander directory. Specifically, just before
>
>
>
> !----------------------------------------------------------------------------------------
> ! ---Step 1c: do randomization of velocities, if needed:
>
>
> !----------------------------------------------------------------------------------------
> ! ---Assign new random velocities every Vrand steps, if ntt=2
>
> I added several lines new codes to replace the Amber MM forces in f() array
> with my own calculated forces, like the following:
>
> do i = 1 , natom
> f(3*i-2) = f2(i,1)
> f(3*i-1) = f2(i,2)
> f(3*i) = f2(i,3)
> enddo
>
> and f2() array is my calculated force.
>
> I'm not sure whether the above modification is right, and where does Amber
> add the heat bath (I think it is in Step 1c region, so I added the
> modification just before Step 1c) ?
>
> I am looking forward to your responses, and thanks very much !
>

W
​hy not just modify the forces at the end of force.F90? (You can also try
replacing the force subroutine with a call to get your forces to avoid
spending the time computing Amber forces that you just plan on discarding,
but I'm not positive that will work.)

To find out where sander applies different thermostat or integrator steps,
look for where the variable "ntt" is used.

HTH,
Jason

-- 
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Jan 06 2016 - 06:30:03 PST
Custom Search