Re: [AMBER] print forces experienced by molecule during simulation

From: Jason Swails <jason.swails.gmail.com>
Date: Fri, 14 Jun 2013 16:18:25 -0400

Gah. I'm wrong here. Sorry. This approach will not work. The code was
not set up for force dumps. During the integration step the 'old'
coordinates are dumped into the force array. This is done _before_ the
mdvel file is written, so the forces that you print will just be the mdcrd
file shifted by 1 time step. :(

The parallel considerations I mentioned are still valid, but the frc->vel
substitution I suggested won't work.

Good luck,
Jason


On Fri, Jun 14, 2013 at 9:30 AM, Jason Swails <jason.swails.gmail.com>wrote:

>
>
>
> On Fri, Jun 14, 2013 at 8:22 AM, ET <sketchfoot.gmail.com> wrote:
>
>> Is there any way to output the forces a small molecule experiences within
>> the simulation with minor adjustment of source code? Is this hopefully
>> going to be a feature in a later version of AMBER? :)
>>
>
> If you want a trajectory of forces, my best suggestion would be to see
> where the velocities are written to the mdvel file and dump the forces
> instead of the velocities to that file (unless you need the coordinates,
> forces, AND velocities -- then you'll need to duplicate what was done for
> the crds and frcs to a separate file).
>
> There are 'gotchas' in parallel, though, since the forces are not
> distributed for every atom to the master necessarily... In pmemd you'll
> need to call mpi_gathervec(atm_cnt, frc) in order to collect the forces to
> the master node before writing. In sander I think if you modify
> "parallel.h", the logtwo table to make every entry 0, then it will force
> the fdist routine to use a 'reduce_scatter' call to communicate the forces,
> which will result in a complete set of coordinates on the master thread
> (the binary tree may do that as well, but I can't be certain).
>
> If you want to do this in the CUDA code, you'll need to add a
> gpu_download_frc call in order to synchronize the forces with the CPU to
> print them out.
>
> Note if you go the mdvel route, you will need to print to a NetCDF file
> and then use some kind of NetCDF reader to extract the data (e.g., the
> netCDF4 Python module, your own custom C program that links to the netCDF
> API, or parsing the output of ncdump).
>
> HTH,
> Jason
>
> FWIW, I recall conversations with other developers that have indicated
> their plans to include this as a feature in a future version of Amber due
> to its increasing popularity.
>
> --
> Jason M. Swails
> Quantum Theory Project,
> University of Florida
> Ph.D. Candidate
> 352-392-4032
>



-- 
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Jun 14 2013 - 13:30:02 PDT
Custom Search