[Chimera-users] minimize without addh and without GUI
Eric Pettersen
pett at cgl.ucsf.edu
Mon Oct 19 14:52:06 PDT 2009
Hi Richard,
There is no direct way to prevent the minimize command from
attempting to add hydrogens. I will be opening a ticket in our Trac
bug database to get this remedied. So for right now your only
recourse is to modify Chimera's Python code. Luckily the change is
pretty simple. Lines 86-87 of <your Chimera installation>/share/MMMD/
MMTKinter.py should currently look like this:
if nogui or chimera.nogui:
DockPrep.prep(mols, nogui=nogui, **kw)
change that to:
if nogui or chimera.nogui:
kw["addHFunc"] = None
DockPrep.prep(mols, nogui=nogui, **kw)
This change will prevent hydrogens from being added in nogui mode.
One caveat is that if Chimera believes that hydrogens should be added
then it's possible it will estimate the charge wrong for those
ligands. So:
1) You should use the release candidate since that has the most
accurate atom-type assessment.
2) If Add Charge fails because of wrong charge estimation, you may
have to either run the failures through "by hand" or enforce correct
atoms types with the "setattr" command (and the "idatmType" attribute,
see http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/idatm.html)
I would be interested in knowing about ligands where Chimera fails to
correctly type the atoms.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
http://www.cgl.ucsf.edu
On Oct 19, 2009, at 8:35 AM, richardbonnet wrote:
> Dear users
>
> Would you give me the best way to minimize the hydrogens in ligands
> with
> chimera used without GUI and without addh?
>
> I use : chimera --nogui --nostatus ligand_1.mol2 ./script.py
>
> here is script.py :
> from chimera import runCommand
> runCommand("select @H=")
> runCommand("minimize freeze unselected nsteps 1000")
> runCommand("write format mol2 0 out.mol2")
>
> However, chimera add wrong hydrogen because of the load of addh with
> minimize. I have a lot of ligands to process and I can not use GUI.
>
>
> thank you much for your help,
>
> Richard Bonnet
> Universite Auvergne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20091019/59c796b1/attachment.html>
More information about the Chimera-users
mailing list