[gmx-users] read trr file

石锐 rshi at itp.ac.cn
Tue Dec 2 10:51:32 CET 2014


Hi Tsjerk,

I cannot find your code in the attachment. Would you please send it to me again off list.

Thanks,
Rui


> -----原始邮件-----
> 发件人: "Tsjerk Wassenaar" <tsjerkw at gmail.com>
> 发送时间: 2014年12月2日 星期二
> 收件人: "Discussion list for GROMACS users" <gmx-users at gromacs.org>
> 抄送: 
> 主题: Re: [gmx-users] read trr file
> 
> Hi Rui,
> 
> Please find the code for reading TRR files attached. The neatest bit is
> that it doesn't read the coordinates/velocities/forces for a frame, unless
> you want them. That allows to do a quick indexing of frames first. The
> offset argument to the TRR reader allows jumping to a specific (frame)
> position.
> 
> If you have any issues or suggestions, please let me know. I'd also be
> interested to hear about cool things that are achieved with the code :)
> 
> Cheers,
> 
> Tsjerk
> 
> On Thu, Nov 27, 2014 at 3:10 AM, 石锐 <rshi at itp.ac.cn> wrote:
> 
> >
> > If pure Python/numpy can parse TRR file, that would be great. I also want
> > to use as less external library as possible.
> >
> > Best,
> > Rui
> >
> >
> > > -----原始邮件-----
> > > 发件人: "Patrick Fuchs" <patrick.fuchs at univ-paris-diderot.fr>
> > > 发送时间: 2014年11月27日 星期四
> > > 收件人: gromacs.org_gmx-users at maillist.sys.kth.se
> > > 抄送:
> > > 主题: Re: [gmx-users] read trr file
> > >
> > > Thanks Tsjerk, I'm interested in having a routine that needs as less
> > > external library as possible. Pure python and numpy is perfect.
> > > Best,
> > >
> > > Patrick
> > >
> > > Le 26/11/2014 18:15, Tsjerk Wassenaar a écrit :
> > > > Hi Patrick,
> > > >
> > > > TRR files are rather simple in structure and are quite easy to parse
> > with
> > > > pure python/numpy. That's not the case for XTC files.
> > > >
> > > > I'll make a few changes to the TRR reader, polishing a bit, and send
> > it.
> > > > Probably next week, as I'll be occupied this weekend.
> > > >
> > > > Cheers,
> > > >
> > > > Tsjerk
> > > > On Nov 26, 2014 6:05 PM, "Patrick Fuchs" <
> > > > patrick.fuchs at univ-paris-diderot.fr> wrote:
> > > >
> > > >> Hi Tsjerk,
> > > >> I would be very interested by your python code. Does it also read xtc
> > > >> files? Shall I contact you off-list? Thanks.
> > > >> Best,
> > > >>
> > > >> Patrick
> > > >>
> > > >> Le 26/11/2014 06:26, Tsjerk Wassenaar a écrit :
> > > >>
> > > >>> I also have Python code to read TRR files directly. Contact me if
> > you're
> > > >>> interested.
> > > >>>
> > > >>> Cheers,
> > > >>>
> > > >>> Tsjerk
> > > >>> On Nov 26, 2014 5:44 AM, "RINU KHATTRI" <nickname.mittu at gmail.com>
> > wrote:
> > > >>>
> > > >>>   you can also  read .trr file by the use of matlab code
> > > >>>>
> > > >>>> On Wed, Nov 26, 2014 at 9:01 AM, Justin Lemkul <jalemkul at vt.edu>
> > wrote:
> > > >>>>
> > > >>>>>
> > > >>>>>
> > > >>>>> On 11/25/14 9:04 PM, 石锐 wrote:
> > > >>>>>
> > > >>>>>>
> > > >>>>>> Hi all,
> > > >>>>>>
> > > >>>>>> I have generated a large .trr file (~500 G) from a simulation. To
> > save
> > > >>>>>>
> > > >>>>> the
> > > >>>>
> > > >>>>> space, I just want to write a C/C++ code to read and manipulate the
> > > >>>>>>
> > > >>>>> binary
> > > >>>>
> > > >>>>> .trr file directly rather than convert it to a readable .gro or
> > .pdb
> > > >>>>>>
> > > >>>>> file.
> > > >>>>
> > > >>>>> However, I cannot find the format of .trr file from the manual. Is
> > there
> > > >>>>>> anyone who knows how to read the .trr file ?
> > > >>>>>>
> > > >>>>>>
> > > >>>>> The XDR library can be used to do this:
> > > >>>>>
> > > >>>>>
> > http://www.gromacs.org/Developer_Zone/Programming_Guide/XTC_Library
> > > >>>>>
> > > >>>>> -Justin
> > > >>>>>
> > > >>>>> --
> > > >>>>> ==================================================
> > > >>>>>
> > > >>>>> Justin A. Lemkul, Ph.D.
> > > >>>>> Ruth L. Kirschstein NRSA Postdoctoral Fellow
> > > >>>>>
> > > >>>>> Department of Pharmaceutical Sciences
> > > >>>>> School of Pharmacy
> > > >>>>> Health Sciences Facility II, Room 629
> > > >>>>> University of Maryland, Baltimore
> > > >>>>> 20 Penn St.
> > > >>>>> Baltimore, MD 21201
> > > >>>>>
> > > >>>>> jalemkul at outerbanks.umaryland.edu | (410) 706-7441
> > > >>>>> http://mackerell.umaryland.edu/~jalemkul
> > > >>>>>
> > > >>>>>
> > > >>>>> ==================================================
> > > >>>>> --
> > > >>>>> Gromacs Users mailing list
> > > >>>>>
> > > >>>>> * Please search the archive at
> > > >>>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users
> > or
> > > >>>>>
> > > >>>> send a
> > > >>>>
> > > >>>>> mail to gmx-users-request at gromacs.org.
> > > >>>>>
> > > >>>> --
> > > >>>> Gromacs Users mailing list
> > > >>>>
> > > >>>> * Please search the archive at
> > > >>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users
> > or
> > > >>>> send a mail to gmx-users-request at gromacs.org.
> > > >>>>
> > > >>>>
> > > >> --
> > > >> _______________________________________________________________
> > > >> Patrick FUCHS
> > > >> Dynamique des membranes et trafic intracellulaire
> > > >> Institut Jacques Monod, CNRS UMR 7592, Université Paris Diderot
> > > >> Bâtiment Buffon, 15 rue Hélène Brion, 75013 Paris
> > > >> Tel :  +33 (0)1 57 27 80 05 - Fax : +33 (0)1 57 27 81 35
> > > >> E-mail address: patrick.fuchs at univ-paris-diderot.fr
> > > >> Web Site: http://www.dsimb.inserm.fr/~fuchs
> > > >> --
> > > >> Gromacs Users mailing list
> > > >>
> > > >> * Please search the archive at http://www.gromacs.org/
> > > >> Support/Mailing_Lists/GMX-Users_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-users or
> > > >> send a mail to gmx-users-request at gromacs.org.
> > > >>
> > >
> > > --
> > > _______________________________________________________________
> > > Patrick FUCHS
> > > Dynamique des membranes et trafic intracellulaire
> > > Institut Jacques Monod, CNRS UMR 7592, Université Paris Diderot
> > > Bâtiment Buffon, 15 rue Hélène Brion, 75013 Paris
> > > Tel :  +33 (0)1 57 27 80 05 - Fax : +33 (0)1 57 27 81 35
> > > E-mail address: patrick.fuchs at univ-paris-diderot.fr
> > > Web Site: http://www.dsimb.inserm.fr/~fuchs
> > > --
> > > Gromacs Users mailing list
> > >
> > > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or
> > send a mail to gmx-users-request at gromacs.org.
> >
> >
> > --
> >
> > ====================================================
> > Rui Shi, Ph.D.
> > Visiting Research Fellow
> > Institute of Theoretical Physics
> > Kavli Institute for Theoretical Physics China
> > Chinese Academy of Sciences
> > 55 East Zhongguancun Road, Beijing 100190, China
> > Email: rshi at itp.ac.cn
> > Tel: +86 159-0101-5707 (Cell)
> >      +86 10-62648753 (Office)
> > ====================================================
> >
> > --
> > Gromacs Users mailing list
> >
> > * Please search the archive at
> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or
> > send a mail to gmx-users-request at gromacs.org.
> >
> 
> 
> 
> -- 
> Tsjerk A. Wassenaar, Ph.D.


--

====================================================
Rui Shi, Ph.D.
Visiting Research Fellow 
Institute of Theoretical Physics
Kavli Institute for Theoretical Physics China
Chinese Academy of Sciences
55 East Zhongguancun Road, Beijing 100190, China
Email: rshi at itp.ac.cn
Tel: +86 159-0101-5707 (Cell)
     +86 10-62648753 (Office)
====================================================



More information about the gromacs.org_gmx-users mailing list