[gmx-developers] local atom number from global atom number

Mark Abraham Mark.Abraham at anu.edu.au
Thu Apr 12 02:49:48 CEST 2012


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 look
> 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, that
> 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

>
> Dmitry.
>
>> Message: 5
>> Date: Wed, 11 Apr 2012 10:24:38 +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:<4F84CF46.4010200 at anu.edu.au>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> On 11/04/2012 7:28 AM, Dmitry Nerukh wrote:
>>> Hi,
>>>
>>> When using MPI, how do I calculate the local atom number from the
>>> global one?  The code given here
>>>
>>>
>> http://www.gromacs.org/Developer_Zone/Programming_Guide/Programm
>> er%27s_Guide#local_index
>>> does not work for the latest gromacs 4.5.5 which I need.  Also, if I
>>> understand correctly, the given code only works for domain
>>> decomposition.  I need a universal method... Thanks!
>>>
>> Then you'll have to see how particle decomposition (and current DD) does
>> it by looking at the code. It won't be any harder than the snippet there
>> suggests. Of course, a static guide will go out of date as the code
> changes.
>>> My ultimate goal is to hack mdrun such that I can output only a few
>>> atoms' positions and velocities, say atoms 0,1, and 3, but fairly
>>> frequently (say, every 10 steps).
>>>
>> nstxtcout, xtc_precision and xtc_grps can solve this problem already.
>>
>> Mark
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: http://lists.gromacs.org/pipermail/gmx-
>> developers/attachments/20120411/459094b0/attachment-0001.html
>>
>> ------------------------------
>




More information about the gromacs.org_gmx-developers mailing list