[gmx-users] g_density for a micelle
chris.neale at utoronto.ca
chris.neale at utoronto.ca
Sun Nov 12 22:23:47 CET 2006
> Hi Chris,
>
> Aren't you looking for a radial distribution function (g_rdf)? Maybe
> you'll have to change the code a bit to get exactly what you want, but
> I'd guess that g_rdf is closer to what you want. However, you do not
> state what it is you want.., so it's merely a guess.
>
> Best,
>
Of course you are correct, thanks. What I want is a histogram of the
distance from the center of mass of the micelle for each heavy atom
individually.
I have used g_rdf -com as suggested by Tsjerk. I then wrote a g_vol.c
program that used a loop over:
do{
vol = det(fr.box);
sumvol+=vol;
numfr++;
} while(read_next_frame(status,&fr));
vol=sumvol/(double)numfr;
Multiplying each rdf value by the shell volume {4/3*pi*(r^3-(r-dr)^3)}
and dividing by the total volume from g_vol gives a probability
histogram that is already normalized for the number of molecules in
the micelle.
This gives the correct answer for constant volume simulations and very
nearly the correct answer for constant pressure simulations (close
enough that I am satisfied with it). I could directly modify g_rdf,
but I have had trouble compiling seperate tools other than those that
I build myself based on template.c. How would one compile g_rdf only
after modifying the source code? Preferably, how would one copy
g_rdf/gmx_rdf to g_rdf_mod/gmx_rdf_mod and compile them?
Thanks again,
Chris.
More information about the gromacs.org_gmx-users
mailing list