<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Mar 5, 2013, at 1:03 PM, Miro Moman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello,<br><br>When computing partial charges in Chimera, the user is prompted to indicate the net charge of the "non-standard" residues. However, more often than not, the suggested value is correct.<br><br>I would like to know how this guess is made and whether or not the net charge of small organic molecules can be guessed in batch mode using Chimera (or other tools).</div></blockquote><br></div><div>Hi Miro,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Chimera makes an assessment of the <a href="http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/idatm.html">atom types</a> of the atoms of a structure as the structure is opened. Those atom types have an associated charge state and protonation state, which allows Chimera to guesstimate the formal charge of a structure as long as the original atom-type assessment was correct.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>The Python function that takes a set of atoms and returns the estimated formal charge is AddCharge.estimateNetCharge. I don't know how familiar you are with Python programming, but the Chimera Python code to run through all currently open structures and write their estimated formal charge to a file named "charge-estimates" in your home directory would be:</div><div><br></div><div>from chimera import openModels, Molecule</div><div>from AddCharge import estimateNetCharge</div><div>from OpenSave import osOpen</div><div>output = osOpen("~/charge-estimates", "w")</div><div>for m in openModels.list(modelTypes=[Molecule]):</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>print>>output, m, <a href="http://m.name">m.name</a>, estimateNetCharge(m.atoms)</div><div>output.close()</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>If the above code were in a file named "estimate.py", then you could estimate all the charges for all the Mol2 files in a directory with: chimera --nogui *.mol2 estimate.py</div><div><br></div><div>There's more about programming Chimera in the <a href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html">Programmer's Guide</a>.</div><div>More info about starting Chimera in nogui/batch mode here: <a href="http://www.cgl.ucsf.edu/chimera/current/docs/UsersGuide/startup.html#startup">Chimera startup</a></div><div><br></div><div>--Eric</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>Eric Pettersen</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>UCSF Computer Graphics Lab</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="5" style="font: 16.0px Helvetica"><span class="Apple-converted-space"> </span><a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></p><br class="Apple-interchange-newline"></span>
</div>
<br></body></html>