<div dir="ltr">Could you post a detailed description of the problem you are trying to solve and the attempts you have made on <a href="http://redmine.gromacs.org">redmine.gromacs.org</a> please? Writing with write_trxframe should just work but it is difficult to know if this is really the solution you want based on what you say here.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 11, 2019 at 11:34 PM titov_ai &lt;<a href="mailto:titov_ai@pnpi.nrcki.ru">titov_ai@pnpi.nrcki.ru</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello.<br>
<br>
A bit overview about the goal:<br>
I&#39;ve been using the gromacs template for a trajectory analysis tool.<br>
First i have to read the trajectory, then modify it and save it again.<br>
As i dont need most of the information from MD trajectory i dont have <br>
issues with saving it in the memory.<br>
But creating a pdb one is not an optimal solution i&#39;ve found a function <br>
in gromacs libs:<br>
&quot;write_trxframe_indexed&quot; in &quot;gromacs/fileio/trxio.h&quot;<br>
and its a bit unclear how exactly should i use the function<br>
<br>
Also i encountered an issue (which might be a simple misunderstanding <br>
from my side):<br>
while reading frames with<br>
void &lt;project name&gt;::analyzeFrame(int frnr, const t_trxframe &amp;fr, t_pbc <br>
*pbc, ...) {...}<br>
i try to save the &quot;fr&quot; into defined much earlier &quot;std::vector&lt; <br>
t_trxframe &gt; saved_traj&quot; by<br>
&quot;saved_traj.push_back(fr)&quot; which seems to copy the link to whereever the <br>
&quot;fr&quot; is stored and i end up having trajectory sized vector with <br>
identical links to the last frame<br>
is this happening because i need to save it differently or because teh <br>
code does not do a deep copy and ending loosing data ?<br>
<br>
Best wishes,<br>
Anatoly Titov, phd sudent, PNPI.<br>
-- <br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Joe Jordan<br><div><br></div></div></div></div></div>