Problem solved.<br>The &quot;2&quot; in the text is just a typo when I sent the email.<br>So actually there is no partial charge in the electrons.dat file.  <br>Thanks, Justin.<br><br>Jianhui<br><br>Date: Sat, 01 Jan 2011 13:56:45 -0500<br>

From: &quot;Justin A. Lemkul&quot; &lt;<a href="mailto:jalemkul@vt.edu">jalemkul@vt.edu</a>&gt;<br>
Subject: Re: [gmx-users] electron density<br>
To: Discussion list for GROMACS users &lt;<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>&gt;<br>
Message-ID: &lt;<a href="mailto:4D1F78ED.5070302@vt.edu">4D1F78ED.5070302@vt.edu</a>&gt;<br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
<br>
<br>
Jianhui Tian wrote:<br>
&gt; Date: Fri, 31 Dec 2010 19:08:50 -0500<br>
&gt; From: &quot;Justin A. Lemkul&quot; &lt;<a href="mailto:jalemkul@vt.edu">jalemkul@vt.edu</a> &lt;mailto:<a href="mailto:jalemkul@vt.edu">jalemkul@vt.edu</a>&gt;&gt;<br>
&gt; Subject: Re: [gmx-users] electron density<br>
&gt; To: Discussion list for GROMACS users &lt;<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br>
&gt; &lt;mailto:<a href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a>&gt;<div id=":2w">&gt;<br>
&gt; Message-ID: &lt;<a href="mailto:4D1E7092.7060309@vt.edu">4D1E7092.7060309@vt.edu</a> &lt;mailto:<a href="mailto:4D1E7092.7060309@vt.edu">4D1E7092.7060309@vt.edu</a>&gt;&gt;<br>
&gt; Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Jianhui Tian wrote:<br>
&gt;&gt;  Hi gmx users,<br>
&gt;&gt;<br>
&gt;&gt;  I tried to calculate both the mass density and electron density for the<br>
&gt;&gt;  water layer of a membrane simulation. The mass density is 1000 kg/m^3,<br>
&gt;&gt;  however the electron density I got is smaller than about 0.33 e/A^3. I<br>
&gt;<br>
&gt;&gt;  How much smaller?<br>
&gt; I got about 0.27 e/A^3.<br>
&gt;<br>
&gt;&gt;  am using a CHARMM force field and the CHARMM version of TIP3P water. Am<br>
&gt;&gt;  I doing anything wrong when calculating the electron density? Thanks a<br>
&gt; lot.<br>
&gt;&gt;<br>
&gt;<br>
&gt;&gt;  Possibly, but without seeing what you used for input, information<br>
&gt; about your<br>
&gt;&gt;  simulation, etc it&#39;s impossible to say.<br>
&gt; In the electrons.dat file, I had<br>
&gt; 2<br>
&gt; OW = 8.834<br>
&gt; HW1 = 0.583<br>
&gt; HW2 = 0.583<br>
&gt; And then used g_density ... -ei electrons.dat -dens electron ...<br>
&gt;<br>
<br>
There are several problems.  The first line of electrons.dat indicates there are<br>
only two unique atom names, but clearly you&#39;re supplying three.  Second, this<br>
file is read in such that at integral number of electrons is detected on each<br>
line.  So, in your case, two lines are being read, one that detects 8 electrons,<br>
and another that detects zero.<br>
<br>
-Justin<br>
</div>