[Chimera-users] addgrp command

Eric Pettersen pett at cgl.ucsf.edu
Wed Aug 26 13:55:42 PDT 2015

Hi Xiaobo,
	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 (http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html>) and in particular the “basic primer” for how to loop over files and do things in Chimera with those files (http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html>).
	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:

from chimera import runCommand, selection
runCommand(“sel :238.b at hg2”)
a = selection.currentAtoms()[0]

then, to change it into a methyl group where the carbon is named ‘CM’:

from BuildStructure import changeAtom
from chimera import Element
changeAtom(a, Element(“C”), 4, 4, name=“CM”)


	Eric Pettersen
	UCSF Computer Graphics Lab

> On Aug 26, 2015, at 1:28 PM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
> Hi Xiaobo,
> Sorry no, there is no command to add a chemical group in Chimera.
> Best,
> Elaine
> -----
> Elaine C. Meng, Ph.D.                       
> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> On Aug 26, 2015, at 10:53 AM, UCSF-xiaobowan <Xiaobo.Wan at ucsf.edu> wrote:
>> Hi all,
>> 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.
>> Best,
>> Xiaobo
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20150826/0aeab2f9/attachment.html>

More information about the Chimera-users mailing list