<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=x-gbk" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 30/11/2010 11:10 AM, 英雄不再寂寞 wrote:
<blockquote cite="mid:tencent_026613AC3FFD5CF8019D04DD@qq.com"
type="cite">
<div>Dear Mark,</div>
<div> 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.</div>
</blockquote>
<br>
You'll have fewer headaches if you build your arrays as
position[frame][atom][axisdirection] i.e. of rvec**. You'll also
likely get better cache performance than if you separate the x, y
and z coordinates, which you're likely to want to use together.<br>
<br>
If you're doing an all-against-all analysis, you can structure that
as two loops over frames such that you only need two frames in
memory at any time. Likewise if you can determine the pairs of
frames that need to be analysed, and put them in a sorted list.<br>
<br>
Mark<br>
<br>
<blockquote cite="mid:tencent_026613AC3FFD5CF8019D04DD@qq.com"
type="cite">
<div>Yours sincerely,</div>
<div>Chaofu Wu, Dr.</div>
<div><includetail>
<div> </div>
<div> </div>
<div style="color: rgb(0, 0, 0);">
<div style="padding: 2px 0px; font-size: 12px; font-family:
Arial Narrow;">------------------ 原始邮件 ------------------</div>
<div style="padding: 8px; font-size: 12px; background: none
repeat scroll 0% 0% rgb(239, 239, 239);">
<div id="menu_sender"><b>发件人:</b> "Mark
Abraham"<a class="moz-txt-link-rfc2396E" href="mailto:Mark.Abraham@anu.edu.au"><Mark.Abraham@anu.edu.au></a>;</div>
<div><b>发送时间:</b> 2010年11月29日(星期一) 晚上7:38</div>
<div><b>收件人:</b> "Discussion list for GROMACS
users"<a class="moz-txt-link-rfc2396E" href="mailto:gmx-users@gromacs.org"><gmx-users@gromacs.org></a>; <wbr></div>
<div><b>主题:</b> Re: [gmx-users] How to save the
coordinates of all atoms inthe 2D-arrays using xdrfile?</div>
</div>
<div> </div>
On 28/11/2010 12:12 AM, 英雄不再寂寞 wrote:<br>
> Dear gmxers,<br>
> I am trying to perform an analysis on the trjectory
file using xdrfile <br>
> library. First of all, I want to save the coordinates
of all atoms in <br>
> three 2D-arrays, i.e. xx[step-1][natom-1],
yy[step-1][natom-1], <br>
> zz[step-1][natom-1]. How to do so? Could you give me
some hints, <br>
> please? If you had happened to do so, could you kindly
send the code <br>
> to me? Thanks a lot.<br>
> Yours sincerely,<br>
> Chaofu Wu, Dr.<br>
<br>
You probably don't want to do that, because it doesn't scale
to large <br>
numbers of trajectory frames - you will run out of memory
eventually. If <br>
at all possible you should structure your algorithm to deal
with one <br>
frame at a time. There are already GROMACS functions that
make that <br>
easy. Pick a GROMACS trajectory analysis tool that sounds
fairly simple <br>
and vaguely similar to what you want to do, and look at how
its code works.<br>
<br>
Mark<br>
-- <br>
gmx-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.gromacs.org/mailman/listinfo/gmx-users">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at
<a class="moz-txt-link-freetext" href="http://www.gromacs.org/Support/Mailing_Lists/Search">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before
posting!<br>
Please don't post (un)subscribe requests to the list. Use
the <br>
www interface or send it to <a class="moz-txt-link-abbreviated" href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
Can't post? Read
<a class="moz-txt-link-freetext" href="http://www.gromacs.org/Support/Mailing_Lists">http://www.gromacs.org/Support/Mailing_Lists</a><br>
</div>
</includetail></div>
</blockquote>
<br>
</body>
</html>