<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Richard,<div><span class="Apple-tab-span" style="white-space:pre"> </span>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:</div><div><br></div><div><div> if nogui or chimera.nogui:</div><div> DockPrep.prep(mols, nogui=nogui, **kw)</div><div><br></div><div>change that to:</div><div><br></div><div><div> if nogui or chimera.nogui:</div><div><div> kw["addHFunc"] = None</div><div><div> DockPrep.prep(mols, nogui=nogui, **kw)</div><div><br></div><div>This change will prevent hydrogens from being added in nogui mode.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>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:</div><div><br></div><div>1) You should use the release candidate since that has the most accurate atom-type assessment.</div><div>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 <a href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/idatm.html)">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/idatm.html)</a></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>I would be interested in knowing about ligands where Chimera fails to correctly type the atoms.</div><div><br></div><div>--Eric</div><div><br></div></div></div></div><div apple-content-edited="true"> <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; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><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"></div></span> </div><br><div><div>On Oct 19, 2009, at 8:35 AM, richardbonnet wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear users<br><br>Would you give me the best way to minimize the hydrogens in ligands with<br>chimera used without GUI and without addh?<br><br>I use : chimera --nogui --nostatus ligand_1.mol2 ./script.py <br><br>here is script.py :<br>from chimera import runCommand<br>runCommand("select @H=")<br>runCommand("minimize freeze unselected nsteps 1000")<br>runCommand("write format mol2 0 out.mol2")<br><br>However, chimera add wrong hydrogen because of the load of addh with<br>minimize. I have a lot of ligands to process and I can not use GUI.<br><br><br>thank you much for your help,<br><br>Richard Bonnet<br>Universite Auvergne</div></blockquote></div></div></body></html>