[gmx-users] Reading XTC files from fortran90
Mark Abraham
Mark.Abraham at anu.edu.au
Sun Sep 30 17:44:06 CEST 2007
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!
Mark
More information about the gromacs.org_gmx-users
mailing list