[gmx-users] Reading XTC files from fortran90

Jones de Andrade johannesrs at gmail.com
Mon Oct 1 05:38:34 CEST 2007


Hi all.

First: ok, lets stop the C X Fortran issue here: this kind of subject always
look like a "ready to become flamme war" one.  ;) Sorry for rising the
subject a bit in the previous email.

The point is: when this project started, almost 4 years ago, I already knew
very well frotran90, and gromacs was not still in the sight for us, but
fortran codes like mdynamix still were. So, at that point it was pointless
to learn C.

Three years later, at the end of the project, gromacs becomes all-day tool,
and thousands of lines of code already written and optimized for fortran90
also are standard here.  ;)  That's the reason why it would be crazzyness to
try to translate everything to C. So, the aim here is to just change the
reading procedures, to read the information needed from gromacs. One way
would be to rewrite everything on fortran, and that will be painfull. The
other is to link to the objects and libraries in the proper way.

If everything goes smoothly here, the next project I get in will include two
years of implementing a few extra features inside gromacs code. Then, of
course, learning C will be a must, and the first thing to be done.  :)

I can already do that for .xtc files. Seems that, unfortunatelly, the least
odd way is to find a way to get the last pieces of information needed
(atomic charges and masses) from the .tpr files. Other ways would include
lots of file translations, or adaptions in the codes themselves which would
lead to "non-generality" of it.

Sorry for not noticing the box shape in the .xtc file. I passed over that
integer in the reading, dismissing it as only some kind of old feature
useless now. Really sorry for that point.

Which files should I look for in order to get the proper way of reading
masses and atomic charges from a .tpr file? And which objects will need to
be included in the linking stage? Is there any "outsider" program (fortran
would be perfect, but I don't think it will be too common too) that works
directly with the .tpr files?

Thanks a lot everybody for all the help, and sorry for taking so much of
your time,

Sincerally yours,

Jones

On 9/30/07, David van der Spoel <spoel at xray.bmc.uu.se> wrote:
>
> Jones de Andrade wrote:
> > Hi Mark.
> >
> > Wait a second, you mean that editconf would allow me to have both
> > charges and masses on a .pdb file directly from command line (having
> > other matters asking for my presence absolutelly now, so please forgive
> > me if this message becomes somehow strange)
> >
> > So, I would have atom names, number of molecules types, number of
> > molecules of each type, number of atoms of each molecule type,
> > coordinates, charges and masses on a .pdb file, correct?
> no just atoms and charges.
>
>
>
> >
> > But, still, where could I then easilly get the box type and sizes, as
> > well as simulation times?
> box is in xtc file.
>
> You could make your life easier by learning some C, unless you hae to
> link the trajectories to a big fortran library. By the way you can also
> trjconv -f k.xtc -o l.g87 which you can read using 10f8.3
>
> >
> > Thanks a lot for all the help, and sorry for this punctual hurry here.
> >
> > Sincerally yours,
> >
> > Jones
> >
> > On 9/30/07, *Mark Abraham* < Mark.Abraham at anu.edu.au
> > <mailto:Mark.Abraham at anu.edu.au>> wrote:
> >
> >     David van der Spoel wrote:
> >
> >      > the box is in the xtc file, if you need the atom names a
> >     corresponding
> >      > pdb or gro file should do the trick. don't try to read tpr files
> or
> >      > gmxdumps of it, that's a complete waste of time. you can e.g. use
> >      > editconf to dump a pdb file with charges in the b-factor fields.
> >
> >     Yes, I now see that editconf has that ability, and Jones can fill in
> the
> >     masses himself, so he doesn't need to parse the .tpr at all.
> >
> >      > And indeed, using fortran will make your life quite miserable for
> >     these
> >      > kind of things.
> >
> >     :-)
> >
> >     Mark
> >     _______________________________________________
> >     gmx-users mailing list    gmx-users at gromacs.org
> >     <mailto: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
> >     <mailto:gmx-users-request at gromacs.org>.
> >     Can't post? Read http://www.gromacs.org/mailing_lists/users.php
> >     <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
>
>
> --
> David van der Spoel, Ph.D.
> Molec. Biophys. group, Dept. of Cell & Molec. Biol., Uppsala University.
> Box 596, 75124 Uppsala, Sweden. Phone:  +46184714205. Fax: +4618511755.
> spoel at xray.bmc.uu.se    spoel at gromacs.org   http://folding.bmc.uu.se
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20071001/18d672d4/attachment.html>


More information about the gromacs.org_gmx-users mailing list