[gmx-users] Reading XTC files from fortran90

Tsjerk Wassenaar tsjerkw at gmail.com
Sun Sep 30 10:01:20 CEST 2007


Hi Jones,

You probably only need to read the atoms and such from a .pdb or .gro
file, unless you really want to have topology information (bondedness,
molecule definitions, etc). Then you do have to read the topology file
or a .tpr file directly. Don't recall having seen the fortran
implementations for these... But maybe Bert knows better.

Just one note... There's no shape in PBC. The lattice vectors are all
there is, and these are stored in the .xtc file (as you already know).

Cheers,

Tsjerk

On 9/30/07, Jones de Andrade <johannesrs at gmail.com> wrote:
> Hi Bert.
>
> Thanks a lot for the help. I've found the mistakes, one programming minor
> issue and a compiler configuration a bit of "hidden" in the config files.
> Old time mistakes just choose to arise at its worst moments. :)
>
> At the moment, I already can read the coordinates, number of atoms, box
> coordinates, step number, simulation time and precision. I guess this is all
> what is stored in the .xtc files themselves, am I right?
>
>  I have so one extra question: I guess that extra information as atom names,
> number of molecules of type X, number of molecular types, box and pbc
> "shape" and atomic charges and masses are *not* stored in the .xtc files, am
> I right? Ok, the "integer" stuff (number of molecules of type X, number of
> molecular types, box and pbc) could be written in a special .ndx file, but
> that would, by all means, looks at least "diselegant".
>
> If so, the only two possible ways of getting them is reading or the .top and
> .itp files correctly, or to read the .tpr file, correct? Now, is there any
> guideline available on how to deal with those files?
>
> Thanks a lot everybody for all the help.
>
>
> Sincerally yours,
>
> Jones
>
> On 9/29/07, Bert de Groot <bgroot at gwdg.de> wrote:
> > On Sat, 29 Sep 2007, Jones de Andrade wrote:
> >
> > > Hi Bert.
> > >
> > > Thank you for the prompt answer.
> > >
> > > Just did as instructed, but got the following:
> > >
> > > CruNumMac src/own/B/9/xtc 286% ifort xtciof.f90 test_xtc.f90
> > > -L/home/johannes/src/own/B/9/xtc/xtc/ -lxrdf -lg2c
> > > IPO link: can not find -lxrdf
> >
> >
> > well, apparently the path you specify with -L does not contain a
> > libxdrf.a
> >
> > the way you called it the compiler expects it to be located here:
> > /home/johannes/src/own/B/9/xtc/xtc/libxdrf.a
> >
> > also, IIRC, the xtcio stuff is already linked into the libxdrf.a, so no
> > need to include it again.
> >
> >
> > > ifort: error: problem during multi-file optimization compilation (code
> 1)
> > >
> > > Looks better, in the sense that the number of error messages was
> reduced.
> > > But still doesn't accept to link to the xrdf library.
> > >
> > > Tried that with and without re-make of the library (strange fact that
> the
> > > SGI arch is to be used in linux) and also tried to say -llibxrdf instead
> of
> > > -lxrdf. Nothing worked.
> > >
> > > Have you or someone come across such an error before? Any clue of what
> can
> > > possibly be going wrong?
> > >
> > > Thanks a lot in advance...
> > >
> > > Sincerally yours,
> > >
> > > Jones
> > >
> > > On 9/29/07, Bert de Groot <bgroot at gwdg.de> wrote:
> > > >
> > > > Hi,
> > > >
> > > > try:
> > > >
> > > > download
> > > > http://www.mpibpc.gwdg.de/groups/de_groot/xtc.tar.gz
> > > >
> > > > (and optionally issue a 'make' in the xtc directory after unpacking)
> > > >
> > > > in the linking stage, use something like
> > > >
> > > > ifort -blabla -lxdrf -L/wherever/xtc -lg2c
> > > >
> > > > your smalll test code looks OK apart from the fact that I don't know
> what
> > > > happens if you read&write from the same file.
> > > >
> > > > Bert
> > > >
> > >
> >
> >
> > Bert
> >
> >
> >
> > ________________________________________________
> > Bert de Groot, PhD
> >
> > Max Planck Institute for Biophysical Chemistry
> > Computational biomolecular dynamics group
> > Am Fassberg 11
> > 37077 Goettingen, Germany
> >
> > tel: +49-551-2012308, fax: +49-551-2012302
> >
> > http://www.mpibpc.gwdg.de/groups/de_groot
> > _______________________________________________
> > gmx-users mailing list     gmx-users at gromacs.org
> > http://www.gromacs.org/mailman/listinfo/gmx-users
> > Please search the archive at http://www.gromacs.org/search before posting!
> > Please don't post (un)subscribe requests to the list. Use the
> > www interface or send it to gmx-users-request at gromacs.org .
> > Can't post? Read
> http://www.gromacs.org/mailing_lists/users.php
> >
>
>
> _______________________________________________
> gmx-users mailing list    gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at http://www.gromacs.org/search before posting!
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read
> http://www.gromacs.org/mailing_lists/users.php
>


-- 
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623



More information about the gromacs.org_gmx-users mailing list