[gmx-users] Reading XTC files from fortran90

Jones de Andrade johannesrs at gmail.com
Sun Sep 30 18:17:06 CEST 2007


Hi all.

Firstly, thanks a lot for all the help!  ;)

First, about reading the atom-names from a .gro file, I don't think it would
"so painfull". It would "look like" a bit to having a well programmed "state
machine" in the code.

About the language, yes, I admit that bor reads and writes, fortran is
miserable. But for calculations (like the inner codes of a certain program?
;)  only joking...  :D  ) if one chooses not to go by assembly, fortran is
still the way, specially if you consider the extra simplicity of fortran90.
Anyway, I would not even consider re-writing the reads in fortran, but would
love to consider to link to a library (like in reading .xtc files) or
gromacs compiled object just to read it correctly.  ;)

About the box, is it on the .xtc file? Could not get the proper variable of
it, could someone give me some infor which is that?

Finally: yes, I considered changing everything to a .pdb file, despite the
file size and the fact that I completelly forgot it could have the charges
on it. But even so I would still have problems with the atomic masses, am I
right? Or can I put that on a standard pdb file with gromacs programs?

Again, tahnks a lot for all help in advance!

Sincerally yours,

Jones

On 9/30/07, David van der Spoel <spoel at xray.bmc.uu.se> wrote:
>
> Mark Abraham wrote:
> > Jones de Andrade wrote:
> >> Hi Tsjerk.
> >>
> >> Thanks for the prompt answer.
> >>
> >> Good idea, I can take the atom names from a .gro file, nad, probably
> >> some strange algorithm can also get the number of atoms per molecule
> >> and number of molecules from there, am I right? That would help a lot.
> >
> > Simplest is to write a parser for a gmxdump of a .tpr file. This is what
> > Perl was made for. If you're constrained to use Fortran for your
> > analysis program, then developing an intermediate file format for it to
> > parse might be worthwhile.
> >
> >> But: I'll still be unable to get atomic masses and point charges. No
> >> to mention the box shape. :( And I'll need a way to read these
> >> parameters too, unless I begin to write all them in a really awfull
> >> and strange index file.
> >>
> >>  From what I can understand on the "file logistics" of gromacs, these
> >> information are only stored in the whole ".top .itp .atp .rtp
> >> structure of files" or, in a condensed form, in the ".tpr" file. Is
> >> that right?
> >
> > Yeah. Writing something to do the lookups in the .*tp files which grompp
> > does to form the .tpr is asking for trouble. Do the lookup in the .tpr
> > file. The .edr file has box dimensions, of course.
> >
> > All this makes it sound like you should be dropping Fortran and writing
> > in C or Perl!
> >
> 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.
>
> And indeed, using fortran will make your life quite miserable for these
> kind of things.
>
> --
> 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/20070930/94c33bfe/attachment.html>


More information about the gromacs.org_gmx-users mailing list