<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Xiaobo,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>As Elaine says, there is no command equivalent. Of course, if you are willing to resort to Python you can do it. I don’t know if you have any proficiency with Python or not, but if you do you would want to look at our Programmers Guide (<a href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html" class="">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html</a>) and in particular the “basic primer” for how to loop over files and do things in Chimera with those files (<a href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html" class="">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html</a>).</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Then you would need to use the “changeAtom” function from the BuildStructure module to make your modifications. You should work with a structure that has all its hydrogens present. Given that, let’s say you want to modify hydrogen HG2 in residue 238.B. To get its Python Atom instance:</div><div class=""><br class=""></div><div class="">from chimera import runCommand, selection</div><div class="">runCommand(“sel :238.b@hg2”)</div><div class="">a = selection.currentAtoms()[0]</div><div class=""><br class=""></div><div class="">then, to change it into a methyl group where the carbon is named ‘CM’:</div><div class=""><br class=""></div><div class="">from BuildStructure import changeAtom</div><div class="">from chimera import Element</div><div class="">changeAtom(a, Element(“C”), 4, 4, name=“CM”)</div><div class=""><br class=""></div><div class="">—Eric</div><div class=""><br class=""></div><div class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Eric Pettersen</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>UCSF Computer Graphics Lab</div></div><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Aug 26, 2015, at 1:28 PM, Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" class="">meng@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Hi Xiaobo,<br class="">Sorry no, there is no command to add a chemical group in Chimera.<br class="">Best,<br class="">Elaine<br class="">-----<br class="">Elaine C. Meng, Ph.D. <br class="">UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab<br class="">Department of Pharmaceutical Chemistry<br class="">University of California, San Francisco<br class=""><br class="">On Aug 26, 2015, at 10:53 AM, UCSF-xiaobowan <<a href="mailto:Xiaobo.Wan@ucsf.edu" class="">Xiaobo.Wan@ucsf.edu</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">Hi all,<br class="">I am Xiaobo Wan, a postdoc at UCSF. I would like to learn how to add chemical groups (such as methyl) or change chemical atoms (Fluorine to Nitrogen) using the command in Chimera because I have thousands of compounds to do the same modification. I know the Build Structure in the Graphic interface can do this. I am not sure whether the addgrp command was supported by chimera now.<br class="">Best,<br class="">Xiaobo<br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">Chimera-users mailing list<br class=""><a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users<br class=""></div></blockquote></div><br class=""></div></body></html>