[Chimera-users] Attaching a Probe to Modify an Existing Amino Acid

Eric Pettersen pett at cgl.ucsf.edu
Thu Jun 19 15:05:19 PDT 2014

Hi Shana,
	Well, you might be able to get away with just setting that atom's "name" attribute to "SD", but since you are writing Python code anyway and residues hold their atoms in a name-indexed structure, it would be better to do it the right way by removing the atom from the residue, renaming it, and putting it back.  Assuming you have the CYS residue in a variable named 'cys':

s = cys.findAtom("SG")
s.name = "SD"


On Jun 19, 2014, at 11:25 AM, Shana Burstein <sburstei at haverford.edu> wrote:

> Hi Eric,
> I was able to move the CN atoms from the CN residue to the CYS residue and call it MSCN. I actually need it to be called MSCN in order for the modified residue to be recognized by a force field in an MD simulation. My only problem now is that the S atom of cysteine is labeled as "SG" and I need it to be called "SD." I know how to do this by going through the Tool menu, but is there a way to automate that?
> Thanks,
> Shana
> On Wed, Jun 18, 2014 at 2:35 PM, Eric Pettersen <pett at cgl.ucsf.edu> wrote:
> Hi Shana,
> 	If you were starting from scratch, the procedure to add the CN would probably be simpler by using chimera.molEdit.addDihedralAtom() to add the C and then the N at the appropriate bond length, angle and dihedral and then rename the residue with: r.type = "MSCN".  Nonetheless, you have come a long way down the road with your script and probably would not prefer to start over from scratch!  So let's suppose you have your two relevant Residue instances in variables named 'cys' and 'cn'.  The code to do what you want would be:
> for a in cn.atoms:
> 	cn.removeAtom(a)
> 	cys.addAtom(a)
> cys.type = "MSCN"
> # empty residues are problematic in various parts of Chimera, so...
> cn.molecule.deleteResidue(cn)
> 	If you don't know how to get the 'cys' and 'cn' variables but you know an atom specifier that selects each, you can use this code to set the variables:
> runCommand("sel atom-spec-for-cys")
> cys = chimera.selection.currentResidues()[0]
> runCommand("sel atom-spec-for-cn")
> cn = chimera.selection.currentResidues()[0]
> 	There's a couple of further relevant things here.  Strictly speaking, 4-letter residue names are not legal in PDB format (while there is a column where a 4th character could go, according to the format definition that column is supposed to be blank).  Therefore if you export your modified structure to other software programs, they may or may not be able to handle the 4-character residue name without problems.  Therefore I recommend you use the same residue name that the PDB uses for this moiety, 4CY (which can be found in the 3or0 entry).
> 	Along the same lines, 4CY can actually be found in the SwissSidechain rotamer library plugin for Chimera (SwissSidechain - A database of non-natural side chains) and therefore if you install that plugin then the entire substitution process becomes a single command:  swapnaa 4CY cysteine-atom-spec.
> --Eric
>                         Eric Pettersen
>                         UCSF Computer Graphics Lab
>                         http://www.cgl.ucsf.edu
> On Jun 18, 2014, at 6:50 AM, Shana Burstein <sburstei at haverford.edu> wrote:
>> Hello,
>> I am an undergraduate student at Haverford College and I am attempting to attach thiocyanate probes onto different sites along a protein by first replacing the existing amino acid with a cysteine and then by adding a C and N onto the S- of the Cys residue. I know it is possible to carry this out manually using Tools>Structure Editing>Modify Structure, but I am hoping to automate this process by calling an external .py script that will primarily contain a list of preexisting Chimera commands. 
>> I have been successful at converting the targeted amino acid to Cys using "swapaa," building a CN residue called MSCN (using the createMolecule.py as a guide), combining the two models into one ("combine selected close True") and forming a bond between the Cys S and CN C atoms ("bond").
>> At this point, I am seeking help in automating the renaming of the modified residue to MSCN. Currently, Chimera sees this residue as two different separate residues called CYS and MSCN. Is there a way to combine these two structures so that the label corresponds to MSCN and the residue number corresponds to CYS? 
>> Sincerely,
>> Shana Burstein
>> Haverford College '15
>> _______________________________________________
>> 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/20140619/bb7c5604/attachment.html>

More information about the Chimera-users mailing list