[gmx-developers] saving modified trajectory

Paul Bauer paul.bauer.q at gmail.com
Tue Feb 12 07:47:56 CET 2019


Hello,

This is part of what I have been working on for as an extension to the
analysis framework, to allow saving of modified trajectory files.
If you are interested I can share the current state of those tools with you
in gerrit.gromacs.org.

Cheers

Paul


On Tue, 12 Feb 2019, 07:38 Joe Jordan <e.jjordan12 at gmail.com wrote:

> Could you post a detailed description of the problem you are trying to
> solve and the attempts you have made on redmine.gromacs.org 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.
>
> On Mon, Feb 11, 2019 at 11:34 PM titov_ai <titov_ai at pnpi.nrcki.ru> wrote:
>
>> Hello.
>>
>> A bit overview about the goal:
>> I've been using the gromacs template for a trajectory analysis tool.
>> First i have to read the trajectory, then modify it and save it again.
>> As i dont need most of the information from MD trajectory i dont have
>> issues with saving it in the memory.
>> But creating a pdb one is not an optimal solution i've found a function
>> in gromacs libs:
>> "write_trxframe_indexed" in "gromacs/fileio/trxio.h"
>> and its a bit unclear how exactly should i use the function
>>
>> Also i encountered an issue (which might be a simple misunderstanding
>> from my side):
>> while reading frames with
>> void <project name>::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc
>> *pbc, ...) {...}
>> i try to save the "fr" into defined much earlier "std::vector<
>> t_trxframe > saved_traj" by
>> "saved_traj.push_back(fr)" which seems to copy the link to whereever the
>> "fr" is stored and i end up having trajectory sized vector with
>> identical links to the last frame
>> is this happening because i need to save it differently or because teh
>> code does not do a deep copy and ending loosing data ?
>>
>> Best wishes,
>> Anatoly Titov, phd sudent, PNPI.
>> --
>> Gromacs Developers mailing list
>>
>> * Please search the archive at
>> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
>> posting!
>>
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>
>> * For (un)subscribe requests visit
>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
>> or send a mail to gmx-developers-request at gromacs.org.
>>
>
>
> --
> Joe Jordan
>
> --
> Gromacs Developers mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
> or send a mail to gmx-developers-request at gromacs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20190212/e5b72537/attachment.html>


More information about the gromacs.org_gmx-developers mailing list