[gmx-developers] Adding new parameter to output file

Berk Hess gmx3 at hotmail.com
Wed Aug 18 09:54:10 CEST 2004

>In e.g. force(), the FILE *fp parameter is declared in the function call,
>can I do something with that? I also see FILE *log around, what is this
>all referring to?

The FILE *fp in force() and FILE *log both refer to the md.log file.
In force() we should rename it to log to avoid confusion.

>It would be even nicer to put it into the ener.edr output although this
>seems not very straightforward to me, I can't really find a struct
>Icontaing all the values that are written down to the ener file. This
>Iquestion resembles
>Ihttp://www.gromacs.org/pipermail/gmx-developers/2004-March/000823.html But
>II couldn't find an answer on that one.

This is actually not too hard.
You need to add an index entry to the t_mdebin struct in include/mdebin.h
Then you need to call get_ebin_space in init_mdebin and add_ebin in 
all in src/mdlib/mdebin.c.
You can add code for instance after the code for md->nU.
If you look at that code you will probably find out how to do it.
If you add code not with the !bCompact if it will also by default
be written to the log file.
You might need to add a parameter to the upd_mdebin call to pass your 


MSN Search, for accurate results! http://search.msn.nl

More information about the gromacs.org_gmx-developers mailing list