[Chimera-users] Making a composite residue
pett at cgl.ucsf.edu
Thu Apr 23 10:35:25 PDT 2015
On Apr 23, 2015, at 8:42 AM, Repic Matej <matej.repic at epfl.ch> wrote:
> I wonder if it is possible to construct a composite residue from two existing residues in Chimera?
> What I would like to do is concatenate residues ALA100 (mid chain) and GLY200 (end of chain) to make a composite residue AGL100.
> Chimera won't let me set the same residue number via the "resrenumber" command. Preferably, the composite residue would have all the atoms listed where ALA100 was in the original pdb.
> While I realize there are trivial text editor-based workarounds I would like to know if there is a native way.
This is kind of an unusual request, and I don't think there's any way to do it with the standard tools or commands. Nonetheless, almost anything is possible via Chimera's Python interface, so I believe this Python code will do what you want:
# find the two residues; assumes they're in chain A and that only one structure is open
from chimera import openModels, Molecule
mol = openModels.list(modelTypes=[Molecule])
for r in mol.residues:
if r.id.chainId == 'A' and r.id.position == 100:
a100 = r
if r.id.chainId == 'A' and r.id.position == 200:
g200 = r
# transfer the GLY200 atoms into ALA100
for a in g200.atoms:
# delete the now empty GLY200 residue, which would otherwise be problematic
# change the combined residue's type to "AGL"
a100.type = "AGL"
So if you put the above in a file that ends with '.py' then you can run it simply by opening it (either with File->Open or with the "open" command). I hope this helps somehow. :-)
UCSF Computer Graphics Lab
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users