From: Jeffrey Potoff (jpotoffx_at_gmail.com)
Date: Fri Feb 07 2014 - 13:17:17 CST
On 2/7/2014 12:36 PM, Research Jubilant wrote:
> I was just wondering how to calculate density of a drug molecule using
> MD simulations. Has anyone got experience on it? Any information about
> it will be helpful.
>
> Thanks
>
Assuming you have a bunch of the same molecules in a box and want to
calculate the density this can be done easily by pushing your *.xst file
through the following AWK script.
#!/usr/bin/awk -f
BEGIN{vol_total=0; nmolecule=1000;molecular_weight=188.02;nequil=1000000}
{if($1 >nequil){ print $1, $2, $6, $10;
vol_total += $2*$6*$10;
count = count +1;
}
}
END{print "density
=",nmolecule*molecular_weight/6.023e23/(vol_total/count)/1e-24, "g/cm^3"}
-- ====================================================================== Jeffrey J. Potoff jpotoff_at_wayne.edu Associate Professor and Director of Early Engineering Programs Department of Chemical Engineering and Materials Science Wayne State University 5050 Anthony Wayne Dr Detroit, MI 48202 http://potoff1.eng.wayne.edu ======================================================================
This archive was generated by hypermail 2.1.6 : Wed Dec 31 2014 - 23:22:05 CST