<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Noé,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>To get the rotamer list <i class="">specifically</i><span style="font-style: normal;" class=""> for residue :3.a, the code would be:</span></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>from chimera.specifier import evalSpec</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>from Rotamers import getRotamers</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>for r in evalSpec(":3.a").residues():</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>rots = getRotamers(r)</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span># do whatever you were going to do with the rotamer list</div><div class=""><br class=""></div><div class="">However, you can use any string you like as the argument to evalSpec(). For instance you could use "#0 & protein" to go through all the protein residues of model #0. In that case r.oslIdent() would return the atom specifier for the residue which you could then use in other commands.</div><div class=""><br class=""></div><div class="">--Eric<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 7, 2023, at 7:07 AM, Noe Robert via Chimera-users <<a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);" class="">Hi,<span class="Apple-converted-space"> </span><br class=""></span></div><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="ContentPasted0" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">I would like to come back to this answer from M. Pettersen :<br class=""></span></div><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="ContentPasted0" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><i class="">"To answer the Python side of this, chimera.Rotamers.getRotamers(<span class="FluidPluginCopy ContentPasted0">residue</span>) gets a list of rotamers (really Molecule instances) for that residue (Dunbrack library by default). Each of those Molecule instances has a 'rotamerProb' attribute, which is the value you see in the graphical user interface.</i>"<br class=""></span></div><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="ContentPasted0" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">As I'm not used to this scale of Chimera use, I don't know how to run getRotamers on the specific residue I want and I'm having quite a hard time exploring python scripts refering to getRotamers. I would just need to run this function to get the<span class="Apple-converted-space"> </span><span class="FluidPluginCopy ContentPasted0" style="font-size: 12pt; background-color: rgb(255, 255, 255);"><i class="ContentPasted1">'rotamerProb'<span class="Apple-converted-space"> </span></i><span class="ContentPasted1">attribute</span></span><span class="Apple-converted-space"> </span>of each rotamer, the rest would be performed using commands.<span class="Apple-converted-space"> </span><br class=""></span></div><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="ContentPasted0" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">So I would like to know what would be the code line to have getRotamers returning "mols" on a specific residue, for instance ":3.a"</span></div><div class="elementToProof" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><span class="ContentPasted0" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Thank you a lot and have a great weekend !<br class=""></span></div><div id="appendonsend" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div><hr tabindex="-1" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline-block; width: 483.125px;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""></span><div id="divRplyFwdMsg" dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">De :</b><span class="Apple-converted-space"> </span>Eric Pettersen <<a href="mailto:pett@cgl.ucsf.edu" class="">pett@cgl.ucsf.edu</a>><br class=""><b class="">Envoyé :</b><span class="Apple-converted-space"> </span>mardi 3 janvier 2023 18:26<br class=""><b class="">À :</b><span class="Apple-converted-space"> </span>Noe Robert <<a href="mailto:noe.robert@etu.univ-cotedazur.fr" class="">noe.robert@etu.univ-cotedazur.fr</a>><br class=""><b class="">Cc :</b><span class="Apple-converted-space"> </span><a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a> <<a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a>><br class=""><b class="">Objet :</b><span class="Apple-converted-space"> </span>Re: [Chimera-users] Question concerning rotamer choosing</font><div class=""> </div></div><div class="" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; line-break: after-white-space;">To answer the Python side of this, chimera.Rotamers.getRotamers(<i class="">residue</i>) gets a list of rotamers (really Molecule instances) for that residue (Dunbrack library by default). Each of those Molecule instances has a 'rotamerProb' attribute, which is the value you see in the graphical user interface. You apply the rotamer you want by calling chimera.Rotamers.useRotamer(<i class="">residue</i><span class="" style="font-style: normal;">,<span class="Apple-converted-space"> </span></span><i class="">rotamers</i><span class="" style="font-style: normal;">) where<span class="Apple-converted-space"> </span></span><i class="">rotamers</i><span class="" style="font-style: normal;"> is a list of rotamers to apply, probably just one (at a time) in your case because if you supply multiple rotamers then they will all be used by putting each one in a different alternate location.</span><div class=""><br class=""></div><div class=""><div class="">--Eric</div><div class=""><br class=""></div><div class=""><span class="x_Apple-tab-span" style="white-space: pre;"></span>Eric Pettersen</div><div class=""><span class="x_Apple-tab-span" style="white-space: pre;"></span>UCSF Computer Graphics Lab</div></div><div class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <<a href="mailto:chimera-users@cgl.ucsf.edu" class="">chimera-users@cgl.ucsf.edu</a>> wrote:</div><br class="x_Apple-interchange-newline"><div class=""><div class="x_elementToProof" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><span class="" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">Hi,<span class="x_Apple-converted-space"> </span><br class=""></span></div><div class="x_elementToProof" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><span class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">I'm currently trying to write a python script which automatizes mutageneses on Chimera 1.16, and calculates clashes inducted by the change of amino acid through a local minimization (which explains why I'm using Chimera instead of ChimeraX).<span class="x_Apple-converted-space"> </span><br class=""></span></div><div class="x_elementToProof" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><span class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">I would like to choose which rotamer to use depending on their probability from the rotamer library Dunbrack (for instance, when probability is >0.1), which<span class="x_Apple-converted-space"> </span></span><span class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">is visible on the "Rotamers graphical user interface". Is there a way to extract these probability values using a script, in order to run it on a certain number of rotamers ? That way it would be quite automated.</span><span class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></span></div><div class="x_elementToProof" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><span class="x_elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><pre class="x_FluidPluginCopy x_ContentPasted0"><span class="x_elementToProof x_ContentPasted1" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);">On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (<a href="https://www.cgl.ucsf.edu/pipermail/chimera-users/2015-July/011193.html" title="https://www.cgl.ucsf.edu/pipermail/chimera-users/2015-July/011193.html" data-loopstyle="link" id="LPlnk716302" class="">here</a>), but I don't which one it is.<br class=""><br class="">Thank you,<br class=""><br class=""></span><span class="x_elementToProof x_ContentPasted1" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div class=""><div id="x_Signature" class=""><div class=""><div class="" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Noé Robert,</div><div class="" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France</div><div class="" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">Phone : +33 7 81 00 52 02</div><div class="" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;"><i class="">"let's limit the use of our resources and lighten our mails"</i><br class=""></div></div></div></div></span></pre><br class=""></span></div><div class="x_elementToProof" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><span class="" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><br class=""></span></div><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; float: none; display: inline !important;">_______________________________________________</span><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; float: none; display: inline !important;">Chimera-users mailing list:<span class="x_Apple-converted-space"> </span></span><a href="mailto:Chimera-users@cgl.ucsf.edu" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Chimera-users@cgl.ucsf.edu</a><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;"><span class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; float: none; display: inline !important;">Manage subscription:<span class="x_Apple-converted-space"> </span></span><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users</a></div></blockquote></div><br class=""></div></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Chimera-users mailing list:<span class="Apple-converted-space"> </span></span><a href="mailto:Chimera-users@cgl.ucsf.edu" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Chimera-users@cgl.ucsf.edu</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Manage subscription:<span class="Apple-converted-space"> </span></span><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users</a></div></blockquote></div><br class=""></div></body></html>