[Chimera-users] Guessing net charge
pett at cgl.ucsf.edu
Tue Mar 5 13:59:00 PST 2013
On Mar 5, 2013, at 1:03 PM, Miro Moman wrote:
> 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.
> 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).
Chimera makes an assessment of the atom types 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.
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:
from chimera import openModels, Molecule
from AddCharge import estimateNetCharge
from OpenSave import osOpen
output = osOpen("~/charge-estimates", "w")
for m in openModels.list(modelTypes=[Molecule]):
print>>output, m, m.name, estimateNetCharge(m.atoms)
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
There's more about programming Chimera in the Programmer's Guide.
More info about starting Chimera in nogui/batch mode here: Chimera startup
UCSF Computer Graphics Lab
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users