<html><body>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;">Dear Elaine,</div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;"> </div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;">I am struggling a little bit with the links you sent me and the command formats of chimea. I wrote the following Python script called addh_addcharge.py to add hydrogens and charges to a drug molecule.</div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;"> </div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;">
<div>import chimera<br />
from chimera import runCommand</div>
<div>runCommand("addh")<br />
runCommand("addcharge")<br />
runCommand("write 1 format mol2 %s" % "drug.mol2")</div>
<div> </div>
</div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;">I ran this code from command-line as</div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;"> </div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;">
<div>${chimera_dir}chimera --nogui --script "addh_addcharge.py" $drug_mol2_filename</div>
<div> </div>
</div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;">Although I am able to add hydrogens and charges without any errors, I am getting the following error when I try to save the model using the last write command in my Python code:</div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;"> </div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;">
<div>MidasError: no model ids match "1"</div>
<div> File "/vol1/software/edock/2018.08.6/script/beforedocking/chimera/share/Midas/__init__.py", line 4253, in _getModelsFromId<br />
raise MidasError, "no model ids match \"%s\"" % s</div>
</div>
<div style="font-size: 13.3333px; font-family: tahoma; color: rgb(0, 0, 0); font-weight: 400; font-style: normal;">
<div> </div>
<div>Looks like the command expects me to include a model number. I checked the link below but could not figure out which model number I should provide:</div>
<div> </div>
<div><a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/framecommand.html">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/framecommand.html</a></div>
<div><br />
It would be quite useful if the link of each command includes an example.</div>
<div> </div>
<div>I also tried the commands in</div>
<div> </div>
<div><a href="http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/save.py">http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/save.py</a></div>
<div> </div>
<div>but received other errors. I will appreciate if you can you tell me how I can save the model using the write command.
<div> </div>
</div>
<div>Thanks,</div>
<div>Zafer</div>
</div>
<div contenteditable="false" id="signature" style="position: relative; font-family: tahoma; color: rgb(0, 0, 0); font-size: 13.3333px; font-weight: 400; font-style: normal;"> </div>
<div style="font-family: tahoma; color: rgb(0, 0, 0); font-size: 13.3333px; font-weight: 400; font-style: normal;">
<blockquote class="as91pFk8AX8sDPOUp66RUy8IoCRjefxNG8oLk8fg" style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">From: "Elaine Meng (meng@cgl.ucsf.edu)" <meng@cgl.ucsf.edu><br />
To: Zafer AYDIN <zafer.aydin@agu.edu.tr><br />
Cc: chimera List <chimera-users@cgl.ucsf.edu><br />
Date: Fri, 15 Mar 2019 09:30:20 -0700<br />
Subject: Re: [Chimera-users] could not find binaries for addh and addcharge programs<br />
<div style="font-family: monospace, courier new, courier">Please see the last paragraph of my previous reply.<br />
<br />
First to figure out the commands you want, you would have to try them yourself in the GUI. Then, you would put the commands in a script. Then you would start Chimera with the nogui option and input your script. These topics are covered in the links I sent.<br />
<br />
Best,<br />
Elaine<br />
<br />
> On Mar 15, 2019, at 9:11 AM, Zafer AYDIN <<a href="mailto:zafer.aydin%40agu.edu.tr">zafer.aydin@agu.edu.tr</a>> wrote:<br />
><br />
> Dear Elaine,<br />
> <br />
> I want to be able to run these commands (findhbond and addcharge) from Linux command-line only. I don't know how I can do it through the chimera executable. Can you send me an example command-line that does that? I don't want to open structures in GUI.<br />
> <br />
> Thanks,<br />
> Zafer<br />
> <br />
> <br />
> From: "Elaine Meng (<a href="mailto:meng%40cgl.ucsf.edu">meng@cgl.ucsf.edu</a>)" <<a href="mailto:meng%40cgl.ucsf.edu">meng@cgl.ucsf.edu</a>><br />
> To: Zafer AYDIN <<a href="mailto:zafer.aydin%40agu.edu.tr">zafer.aydin@agu.edu.tr</a>><br />
> Cc: <a href="mailto:chimera-users%40cgl.ucsf.edu">chimera-users@cgl.ucsf.edu</a><br />
> Date: Fri, 15 Mar 2019 08:44:42 -0700<br />
> Subject: Re: [Chimera-users] could not find binaries for addh and addcharge programs<br />
> <br />
> Hi Zafer Aydin,<br />
> The commands are “findhbond” (or “hbonds”) and “addcharge” — they are in the Chimera executable, and they are not separate binaries.<br />
> <br />
> <<a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/hbonds.html" target="_blank">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/hbonds.html</a>><br />
> <<a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/addcharge.html" target="_blank">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/addcharge.html</a>><br />
><br />
> For example, open your structure(s) and then use commands:<br />
><br />
> findhbond reveal true<br />
> addcharge<br />
><br />
> Of course, there are other command options, and you would need to read the manual pages linked above to decide whether you want to use any of them.<br />
><br />
> If you want to use Chimera without any graphical interface (not even the Chimera window), you need to start it with the nogui option and input your structures and commands in a script. See<br />
> <<a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/startup.html" target="_blank">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/startup.html</a>><br />
> <<a href="http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/options.html" target="_blank">http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/options.html</a>><br />
> <<a href="http://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html" target="_blank">http://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html</a>><br />
><br />
> I hope this helps,<br />
> Elaine<br />
> -----<br />
> Elaine C. Meng, Ph.D. <br />
> UCSF Chimera(X) team<br />
> Department of Pharmaceutical Chemistry<br />
> University of California, San Francisco<br />
><br />
> > On Mar 15, 2019, at 7:31 AM, Zafer AYDIN <<a href="mailto:zafer.aydin%40agu.edu.tr">zafer.aydin@agu.edu.tr</a>> wrote:<br />
> ><br />
> > Hi,<br />
> > <br />
> > I installed chimera software to my Ubuntu workstation. I want to add hydrogen bonds and charges to ligand molecules. I could not find the addh and addcharge executables under the chimera directory.<br />
> > <br />
> > I would readlly appreciate if you can provide me basic guidelines for how to add hydrogen bonds and charges to ligand molecules using chimera from command-line (not from GUI).<br />
> > <br />
> > Many thanks,<br />
> > <br />
> > Zafer Aydin<br />
> > AGÜ Computer Engineering Department<br />
> > Kayseri, Turkey<br />
> </div>
</blockquote>
</div>
</body></html>