[gmx-users] Reading XTC files from fortran90

Mark Abraham Mark.Abraham at anu.edu.au
Sun Sep 30 18:30:20 CEST 2007


Jones de Andrade wrote:
> 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.  ;)

So now you have to weigh up the amount of time your computer will be 
doing calculations (and then how much Fortran gains against the 
alternatives) vs the amount of your time you'll spend writing and 
debugging the I/O routines :-) Short of doing calculations whose cost is 
on the order of more MD simulations, I'd be amazed if Fortran comes out 
ahead.

> 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?

Check out the C I/O routines?

> 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?

You've got atom names in the pdb, so look the masses up in your own 
code. Or post-process the pdb file to put masses in whichever of 
occupancy and B-factor doesn't have charges.

Mark



More information about the gromacs.org_gmx-users mailing list