回复: [gmx-users] How to save the coordinates of all atoms in the 2D-arrays using xdrfile?

英雄不再寂寞 xiaowu759 at qq.com
Tue Nov 30 01:10:02 CET 2010


Dear Mark,
   Thank you for your reply. It seems reasonable to deal with a frame at one time. But in my code, the coordinates in two different frames are frequently required to compare to each other. Other part of this code is like g_msd which calculates the mean-squared displacements for the atoms satisfied with the conditions. So, first of all, I had better save the coordinates in the 2D-arrays using xdrfile. I do not find such a tool in gmx that can realize it. Is there any other algorithms to do so more effectively? Please provide more detail about it.
 Yours sincerely,
 Chaofu Wu, Dr.
   
  
  ------------------ 原始邮件 ------------------
  发件人: "Mark Abraham"<Mark.Abraham at anu.edu.au>;
 发送时间: 2010年11月29日(星期一) 晚上7:38
 收件人: "Discussion list for GROMACS users"<gmx-users at gromacs.org>; 
 
 主题: Re: [gmx-users] How to save the coordinates of all atoms inthe 2D-arrays using xdrfile?

  
On 28/11/2010 12:12 AM, 英雄不再寂寞 wrote:
> Dear gmxers,
> I am trying to perform an analysis on the trjectory file using xdrfile 
> library. First of all, I want to save the coordinates of all atoms in 
> three 2D-arrays, i.e. xx[step-1][natom-1], yy[step-1][natom-1], 
> zz[step-1][natom-1]. How to do so? Could you give me some hints, 
> please? If you had happened to do so, could you kindly send the code 
> to me? Thanks a lot.
> Yours sincerely,
> Chaofu Wu, Dr.

You probably don't want to do that, because it doesn't scale to large 
numbers of trajectory frames - you will run out of memory eventually. If 
at all possible you should structure your algorithm to deal with one 
frame at a time. There are already GROMACS functions that make that 
easy. Pick a GROMACS trajectory analysis tool that sounds fairly simple 
and vaguely similar to what you want to do, and look at how its code works.

Mark
-- 
gmx-users mailing list    gmx-users at gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-request at gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20101130/b2efe404/attachment.html>


More information about the gromacs.org_gmx-users mailing list