<div dir="ltr">Hi Eric,<div>When I attempt to change the bond angles of this modified side-chain (using the command "adjust angle"), the CN stays fixed and the entire protein is rotated. Is there a way to fix the position of the protein and change the position of the side chain instead? I previously set the coordinates of the C of the CN to (0,0,0) when I built the residue, so I think that might be contributing to the problem. </div>
<div><br></div><div>Thanks,</div><div>Shana</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 19, 2014 at 6:05 PM, Eric Pettersen <span dir="ltr"><<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Shana,<div><span style="white-space:pre-wrap"> </span>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':</div>
<div><br></div><div>s = cys.findAtom("SG")</div><div>cys.removeAtom(s)</div><div><a href="http://s.name" target="_blank">s.name</a> = "SD"</div><div>cys.addAtom(s)</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>--Eric</div></font></span><div><div class="h5"><div><br><div><div>On Jun 19, 2014, at 11:25 AM, Shana Burstein <<a href="mailto:sburstei@haverford.edu" target="_blank">sburstei@haverford.edu</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr">Hi Eric,<div>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?</div>
<div><br></div><div>Thanks,</div><div>Shana</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 18, 2014 at 2:35 PM, Eric Pettersen <span dir="ltr"><<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Shana,<div><span style="white-space:pre-wrap"> </span>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:</div>
<div><br></div><div>for a in cn.atoms:</div><div><span style="white-space:pre-wrap"> </span>cn.removeAtom(a)</div><div><span style="white-space:pre-wrap"> </span>cys.addAtom(a)</div><div>cys.type = "MSCN"</div>
<div>
# empty residues are problematic in various parts of Chimera, so...</div><div>cn.molecule.deleteResidue(cn)</div><div><br></div><div><span style="white-space:pre-wrap"> </span>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:</div>
<div><br></div><div>runCommand("sel <i>atom-spec-for-cys</i>")</div><div>cys = chimera.selection.currentResidues()[0]</div><div>runCommand("sel <i>atom-spec-for-cn</i>")</div><div>cn = chimera.selection.currentResidues()[0]</div>
<div><br></div><div><span style="white-space:pre-wrap"> </span>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).</div>
<div><span style="white-space:pre-wrap"> </span>Along the same lines, 4CY can actually be found in the SwissSidechain rotamer library plugin for Chimera (<a href="http://www.swisssidechain.ch/visualization/chimera.html" target="_blank">SwissSidechain - A database of non-natural side chains</a>) and therefore if you install that plugin then the entire substitution process becomes a single command: swapnaa 4CY <i>cysteine-atom-spec</i>.</div>
<div><br></div><div>--Eric</div><div><br> Eric Pettersen<br> UCSF Computer Graphics Lab<br> <a href="http://www.cgl.ucsf.edu/" target="_blank">http://www.cgl.ucsf.edu</a><br>
<br></div><div><div><div><div><div>On Jun 18, 2014, at 6:50 AM, Shana Burstein <<a href="mailto:sburstei@haverford.edu" target="_blank">sburstei@haverford.edu</a>> wrote:</div><br></div></div><blockquote type="cite">
<div><div><div dir="ltr">Hello,<div>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. </div>
<div><br></div><div>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"). </div>
<div><br></div><div>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? </div>
<div><br></div><div>Sincerely,</div><div><br></div><div>Shana Burstein</div><div>Haverford College '15</div></div></div></div>
_______________________________________________<br>Chimera-users mailing list<br><a href="mailto:Chimera-users@cgl.ucsf.edu" target="_blank">Chimera-users@cgl.ucsf.edu</a><br><a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" target="_blank">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br>
</blockquote></div><br></div><br><br></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div>