<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 15, 2008, at 5:00 AM, Paul M. Grant wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div> <!-- Converted from text/rtf format --><p dir="LTR"><span lang="en-us"><font face="Calibri">There have been a number of posts to pw_forum regarding the units employed for charge density throughout PWscf package</font></span><span lang="en-us"><font face="Calibri"> and XcrySDen. This is an importan</font></span><span lang="en-us"><font face="Calibri">t issue, and I still find the situation</font></span><span lang="en-us"><font face="Calibri"> and answers</font></span><span lang="en-us"> <font face="Calibri">provided in</font></span><span lang="en-us"><font face="Calibri"> the forum archives</font></span><span lang="en-us"><font face="Calibri"> ambiguous.</font></span><span lang="en-us"><font face="Calibri"> Before slogging through</font></span><span lang="en-us"> <font face="Calibri">relevant source codes,</font></span><span lang="en-us"> <font face="Calibri">and testing</font></span><span lang="en-us"> <font face="Calibri">by</font></span><span lang="en-us"> <font face="Calibri">writing</font></span><span lang="en-us"><font face="Calibri"> time-consuming</font></span><span lang="en-us"><font face="Calibri"> homemade examples,</font></span><span lang="en-us"> <font face="Calibri">I</font></span><span lang="en-us"><font face="Calibri"></font></span><span lang="en-us"><font face="Calibri">m hoping someone in the community has preceded me.</font></span><span lang="en-us"></span></p><p dir="LTR"><span lang="en-us"><font face="Calibri">In a perfect</font></span><span lang="en-us"> <font face="Calibri">SI</font></span><span lang="en-us"> <font face="Calibri">world, these units would be</font></span><span lang="en-us"> <font face="Calibri">coulombs per cubic meter. In a practical</font></span><span lang="en-us"><font face="Calibri">, or rather intuitive,</font></span><span lang="en-us"> <font face="Calibri">world, they would be in units</font></span><span lang="en-us"> <font face="Calibri">of</font></span><span lang="en-us"> <font face="Calibri">total fractional number of electrons per unit cell volume (in cubic</font></span><span lang="en-us"> <font face="Calibri">angstroms or nanometers or bohrs (ugh)).</font></span><span lang="en-us"><font face="Calibri"> So</font></span><span lang="en-us"><font face="Calibri">
</font></span><span lang="en-us"><font face="Calibri">what is it? </font></span></p></div></blockquote><div>Paul: when I was familiar with the code (well, it is some time ago ...) it used to be (bohrs)^(-3). i.e. "densities" used to be NUMBER densities (length^(-3)), in the units used by the code. the only ambiguity about units is between the "pwscf" and "CP" branches of the distribution. The first uses Rydberg au (e^2/2=2m=hbar=1), the second Hartree au (e=m=hbar=1). in both sets of units, the unit length is the bohr, hence no ambiguity here.</div><br><blockquote type="cite"><div><p dir="LTR"><span lang="en-us"><font face="Calibri">And does it depend on the division of states between core and valence taken when constructing a given ps</font></span><span lang="en-us"><font face="Calibri">eudopotential? </font></span></p></div></blockquote><div><br></div>sure it does. the integral ofer the unit (super-) cell of the density is the number ov valence electrons.</div><div><blockquote type="cite"><div><p dir="LTR"><span lang="en-us"> </span></p><p dir="LTR"><span lang="en-us"><font face="Calibri">Finally, I</font></span><span lang="en-us"><font face="Calibri"></font></span><span lang="en-us"><font face="Calibri">ve been unable</font></span><span lang="en-us"><font face="Calibri"> (by visual in</font></span><span lang="en-us"><font face="Calibri">spection)</font></span><span lang="en-us"><font face="Calibri"> to determine from the documentation for Xc</font></span><span lang="en-us"><font face="Calibri">r</font></span><span lang="en-us"><font face="Calibri">y</font></span><span lang="en-us"><font face="Calibri">SDen (a marvelous tool</font></span><span lang="en-us"><font face="Calibri">
</font></span><span lang="en-us"><font face="Calibri">marvelous</font></span><span lang="en-us"><font face="Calibri">)</font></span><span lang="en-us"><font face="Calibri">, exactly how the</font></span><span lang="en-us"> <font face="Calibri"></font></span><span lang="en-us"><font face="Calibri">rho grid input</font></span><span lang="en-us"><font face="Calibri"></font></span><span lang="en-us"><font face="Calibri"> is scaled, especially regarding the</font></span><span lang="en-us"> <font face="Calibri">computation of the 3D min-max grid values,</font></span><span lang="en-us"> <font face="Calibri">the</font></span><span lang="en-us"> <font face="Calibri"></font></span><span lang="en-us"><font face="Calibri">isovalue</font></span><span lang="en-us"><font face="Calibri">
</font></span><span lang="en-us"><font face="Calibri">and</font></span><span lang="en-us"><font face="Calibri">
</font></span><span lang="en-us"><font face="Calibri">particularly</font></span><span lang="en-us"><font face="Calibri"> the mysterious</font></span><span lang="en-us"> <font face="Calibri"></font></span><span lang="en-us"><font face="Calibri">delta n(r)</font></span><span lang="en-us"><font face="Calibri"></font></span><span lang="en-us"><font face="Calibri"> displayed in the temperature inset box.</font></span></p></div></blockquote><div>no hint here</div><div><br></div><div>cheers - SB</div><div><br></div></div><br><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">---</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Stefano Baroni - SISSA</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "> </span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">&</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "> </span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">DEMOCRITOS National Simulation Center - Trieste</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "><a href="http://www.sissa.it/~baroni">http://www.sissa.it/~baroni</a> / [+39] 040 3787 406 (tel) -528 (fax) / stefanobaroni (skype)</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; font-size: 12px; "><br style="font-size: 12px; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; font-size: 12px; "><span class="Apple-style-span" style="font-size: 14px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">La morale est une logique de l'action comme la logique est une morale de la pensιe - Jean Piaget</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "><br></span></font></div></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Please, if possible, don't</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "> </span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">send me MS Word or PowerPoint attachments</span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Why? See:</span></font><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px; "> </span></font><font class="Apple-style-span" color="#0023E9" size="3"><span class="Apple-style-span" style="font-size: 12px; "><a href="http://www.gnu.org/philosophy/no-word-attachments.html">http://www.gnu.org/philosophy/no-word-attachments.html</a></span></font></div><div><font class="Apple-style-span" color="#0023E9" size="3"><span class="Apple-style-span" style="font-size: 12px; "><br class="webkit-block-placeholder"></span></font></div></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>