[gmx-developers] how to write a xtc file in c

David van der Spoel spoel at xray.bmc.uu.se
Thu Aug 10 09:30:27 CEST 2006


Dongsheng Zhang wrote:
> Dear David,
> 
> Thank you for your reply. I know we can use trjconv to convert a gro
> file to a xtc file, but I need to write a xtc file manually by myself.
> One way to do it is that I can write a gro file manually, then convert
> it to xtc. As I said in the previous email, gro file is larger than xtc,
> so I want to write a xtc file in the first place.
> 
> Could you please tell me the format of xtc, or give me a piece of code
> to write a xtc file? Thank you!
check the code in e.g. trjconv and call the functions from there. the 
format of xtc is quite complicated (I don't know it).
the function for writing are in xtcio.c/trxio.c (src/gmxlib)

> 
> All the best!
> 
> 
> Dongsheng
> 
> 
> On Thu, 2006-08-10 at 09:01 +0200, David van der Spoel wrote:
>> Dongsheng Zhang wrote:
>>> Dear GMX developers,
>>>
>>> I want to write a xtc file to do rerun to get a special potential
>>> energy. Could you please tell me how to write a xtc file in c from a gro
>>> file (with multiple frames got from a xtc file, without velocity)? Thank
>>> you for your help!
>>>
>> trjconv ?
>>
>>> By the way, I know mdrun -rerun can read a gro file, but I think using
>>> xtc file can save space.
>> yes and it has the same accuracy (picometer)
>>>
>>> All the best!
>>>
>>>
>>> Dongsheng
>>> _______________________________________________
>>> gmx-developers mailing list
>>> gmx-developers at gromacs.org
>>> http://www.gromacs.org/mailman/listinfo/gmx-developers
>>> Please don't post (un)subscribe requests to the list. Use the 
>>> www interface or send it to gmx-developers-request at gromacs.org.
>>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-developers-request at gromacs.org.


-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assoc. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://folding.bmc.uu.se
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the gromacs.org_gmx-developers mailing list