[gmx-developers] Re: local atom number from global atom number (Mark Abraham)

Dmitry Nerukh D.Nerukh at aston.ac.uk
Fri Apr 13 15:05:05 CEST 2012

Thanks, but this is still not what I want.  The issue is storage: I need to
save almost every step for a couple of microseconds run.  Obviously, I can
afford only few atoms, but that's good enough for me.

Can I avoid gathering data?  If I could calculate the local index of an atom
and the process rank, I'd simply output the coords and velocities of it to a
file?  If I understand correctly, write_traj doesn't do that, it gathers all
the data before writing, and then it doesn't need the local indices (and,
thus, there is no code similar to that snippet).  If there is an issue with
synchronisation, I could store my atoms' coordinates and velocities in a
separate array before outputting, could I?


> Message: 3
> Date: Thu, 12 Apr 2012 10:49:48 +1000
> From: Mark Abraham <Mark.Abraham at anu.edu.au>
> Subject: Re: [gmx-developers] local atom number from global atom
> 	number
> To: Discussion list for GROMACS development
> 	<gmx-developers at gromacs.org>
> Message-ID: <4F8626AC.6090007 at anu.edu.au>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> On 12/04/2012 5:41 AM, Dmitry Nerukh wrote:
> > Thanks, Mark.  Can you give me a hint in what function is the best to
> > for the code?
> See write_traj in src/mdlib/stat.c and how it is called.
> >
> > As for nstxtcout, etc I understand that it only outputs in xtc format,
> > is only coordinates?  But I need velocities as well.
> Yes, coordinates only. Sorry, I missed that you wanted velocities also.
> Frankly, by the time you've done global communication to gather
> coordinates and velocities and paid the "up front" cost of writing to
> the trajectory file, you may as well write all the coordinates and
> velocities to the normal .trr file and process afterwards. The main
> advantage of the .xtc output option is saving on post-processing and
> storage - there's no saving on mdrun execution time. You'll have to do
> heaps of your suggested pre-processed output to "pay" for your developer
> time, compared with just doing post-processing in a job script.
> If you're still keen, perhaps the simplest hack is to make the ".xtc
> output" option write a .trr and trigger the code to write both positions
> and velocities to that file, rather than just positions.
> Mark

More information about the gromacs.org_gmx-developers mailing list