Question concerning rotamer choosing

Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here<https://www.cgl.ucsf.edu/pipermail/chimera-users/2015-July/011193.html>), but I don't which one it is. Thank you, Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails"

Hi Noé Robert, I can't answer the python part, but wanted to make sure that you understand the meaning of the probability: it is the probability based on backbone conformation only. It is NOT the total probability for the specific position, because it does not look at sidechain interactions. So the one with the highest probability might be a very poor choice for the specific position (might have high clashes, low H-bonds). It is a common misconception that the highest probability is the best one to choose. Rotamers mutagenesis is implemented as the "swapaa" command where the default is to take account first clashes, then H-bonds, the probability (again because that value is only based on the backbone conformation). See the "swapaa" command "criteria" option: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/swapaa.html#options> So even though you may still want to use python for various reasons like looping, you should consider carefully how you choose the rotamer, and possibly use the default settings of the "swapaa" command. Even if you decide you only want to use probability, then you can still use the "swapaa" command option with "criteria p" as explained in the help link above. I hope this clarifies the situation, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here), but I don't which one it is.
Thank you,
Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails"
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users

Hi Elaine, Thank you a lot for this clarification, my group and I will reconsider the parameters to use for the rotamers selection, because they are indeed really interesting. One thing though, and it's just a semantic question out of curiosity, but how would you write the option to run swapaa on the first rotamer depending on the probability only ? It would be something comprising "criteria", "1" for the rank and "p" for the parameter concerned, but I don't know how to take the 2 last into account at the same time. Thank you again for your time, and best wishes for 2023 ! Robert Noé ________________________________ De : Elaine Meng <meng@cgl.ucsf.edu> Envoyé : lundi 2 janvier 2023 18:48 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr> Cc : chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu> Objet : Re: [Chimera-users] Question concerning rotamer choosing Hi Noé Robert, I can't answer the python part, but wanted to make sure that you understand the meaning of the probability: it is the probability based on backbone conformation only. It is NOT the total probability for the specific position, because it does not look at sidechain interactions. So the one with the highest probability might be a very poor choice for the specific position (might have high clashes, low H-bonds). It is a common misconception that the highest probability is the best one to choose. Rotamers mutagenesis is implemented as the "swapaa" command where the default is to take account first clashes, then H-bonds, the probability (again because that value is only based on the backbone conformation). See the "swapaa" command "criteria" option: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/swapaa.html#options> So even though you may still want to use python for various reasons like looping, you should consider carefully how you choose the rotamer, and possibly use the default settings of the "swapaa" command. Even if you decide you only want to use probability, then you can still use the "swapaa" command option with "criteria p" as explained in the help link above. I hope this clarifies the situation, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here), but I don't which one it is.
Thank you,
Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails"
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users

Hi Noé Robert, If I understand your question, it is exactly as I said in the previous reply, use option "criteria p" in the "swapaa" (which omits the other measures entirely).
<https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/swapaa.html#options> So even though you may still want to use python for various reasons like looping, you should consider carefully how you choose the rotamer, and possibly use the default settings of the "swapaa" command. Even if you decide you only want to use probability, then you can still use the "swapaa" command option with "criteria p" as explained in the help link above.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 3, 2023, at 3:23 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi Elaine, Thank you a lot for this clarification, my group and I will reconsider the parameters to use for the rotamers selection, because they are indeed really interesting. One thing though, and it's just a semantic question out of curiosity, but how would you write the option to run swapaa on the first rotamer depending on the probability only ? It would be something comprising "criteria", "1" for the rank and "p" for the parameter concerned, but I don't know how to take the 2 last into account at the same time. Thank you again for your time, and best wishes for 2023 ! Robert Noé De : Elaine Meng <meng@cgl.ucsf.edu> Envoyé : lundi 2 janvier 2023 18:48 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr> Cc : chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu> Objet : Re: [Chimera-users] Question concerning rotamer choosing
Hi Noé Robert, I can't answer the python part, but wanted to make sure that you understand the meaning of the probability: it is the probability based on backbone conformation only. It is NOT the total probability for the specific position, because it does not look at sidechain interactions. So the one with the highest probability might be a very poor choice for the specific position (might have high clashes, low H-bonds).
It is a common misconception that the highest probability is the best one to choose.
Rotamers mutagenesis is implemented as the "swapaa" command where the default is to take account first clashes, then H-bonds, the probability (again because that value is only based on the backbone conformation). See the "swapaa" command "criteria" option: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/swapaa.html#options>
So even though you may still want to use python for various reasons like looping, you should consider carefully how you choose the rotamer, and possibly use the default settings of the "swapaa" command. Even if you decide you only want to use probability, then you can still use the "swapaa" command option with "criteria p" as explained in the help link above.
I hope this clarifies the situation, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here), but I don't which one it is.
Thank you,
Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails"
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users

My bad, it wasn't really clear ; I wanted to know if it was possible to select a rotamer depending on its rank (which would be an integer) depending on one specific parameter (either d, c, h or p), but I shouldn't have chosen the first rank as an example. So one better example of my question would be : is it possible to select the rotamer which ranks third on the lowest clash score ? Because in this case I don't know how to write the option taking care of the "c" (parameter) and the "3" (rank) in the swapaa formula. Again, thank your for your precious help. Noé ________________________________ De : Elaine Meng <meng@cgl.ucsf.edu> Envoyé : mardi 3 janvier 2023 18:17 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr> Cc : Chimera <chimera-users@cgl.ucsf.edu> Objet : Re: [Chimera-users] Question concerning rotamer choosing Hi Noé Robert, If I understand your question, it is exactly as I said in the previous reply, use option "criteria p" in the "swapaa" (which omits the other measures entirely).
<https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/swapaa.html#options> So even though you may still want to use python for various reasons like looping, you should consider carefully how you choose the rotamer, and possibly use the default settings of the "swapaa" command. Even if you decide you only want to use probability, then you can still use the "swapaa" command option with "criteria p" as explained in the help link above.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 3, 2023, at 3:23 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi Elaine, Thank you a lot for this clarification, my group and I will reconsider the parameters to use for the rotamers selection, because they are indeed really interesting. One thing though, and it's just a semantic question out of curiosity, but how would you write the option to run swapaa on the first rotamer depending on the probability only ? It would be something comprising "criteria", "1" for the rank and "p" for the parameter concerned, but I don't know how to take the 2 last into account at the same time. Thank you again for your time, and best wishes for 2023 ! Robert Noé De : Elaine Meng <meng@cgl.ucsf.edu> Envoyé : lundi 2 janvier 2023 18:48 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr> Cc : chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu> Objet : Re: [Chimera-users] Question concerning rotamer choosing
Hi Noé Robert, I can't answer the python part, but wanted to make sure that you understand the meaning of the probability: it is the probability based on backbone conformation only. It is NOT the total probability for the specific position, because it does not look at sidechain interactions. So the one with the highest probability might be a very poor choice for the specific position (might have high clashes, low H-bonds).
It is a common misconception that the highest probability is the best one to choose.
Rotamers mutagenesis is implemented as the "swapaa" command where the default is to take account first clashes, then H-bonds, the probability (again because that value is only based on the backbone conformation). See the "swapaa" command "criteria" option: <https://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/swapaa.html#options>
So even though you may still want to use python for various reasons like looping, you should consider carefully how you choose the rotamer, and possibly use the default settings of the "swapaa" command. Even if you decide you only want to use probability, then you can still use the "swapaa" command option with "criteria p" as explained in the help link above.
I hope this clarifies the situation, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here), but I don't which one it is.
Thank you,
Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails"
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users

To answer the Python side of this, chimera.Rotamers.getRotamers(residue) 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(residue, rotamers) where rotamers 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. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here <https://www.cgl.ucsf.edu/pipermail/chimera-users/2015-July/011193.html>), but I don't which one it is.
Thank you,
Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails"
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>

Thank you for answering this side of my question, I now have a small deviation to take in my approach thanks to Elaine C. Meng who clarified to me the value on the probability parameter. Have a great day, Robert Noé ________________________________ De : Eric Pettersen <pett@cgl.ucsf.edu> Envoyé : mardi 3 janvier 2023 18:26 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr> Cc : chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu> Objet : Re: [Chimera-users] Question concerning rotamer choosing To answer the Python side of this, chimera.Rotamers.getRotamers(residue) 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(residue, rotamers) where rotamers 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. --Eric Eric Pettersen UCSF Computer Graphics Lab On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here<https://www.cgl.ucsf.edu/pipermail/chimera-users/2015-July/011193.html>), but I don't which one it is. Thank you, Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails" _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users

Hi Noé, The numeric criteria cannot be mixed with any of the other criteria and simply picks the Nth most probable rotamer (based on its prevalence in all proteins). It cannot be used to pick the 3rd-least clashes, etc. If you really want to do that you would have to resort to using Python. The rotamers you get from chimera.Rotamers.getRotamers() only have their probability attribute (rotamerProb) assigned, since the clashes and H-bonds take time to compute and may not be needed, depending on what the user requested. To assign clash score and number-of-H-bonds attributes (clashScore and numHbonds respectively) you would need to call chimera.Rotamers.processClashes()/processHbonds(). You should look at the part of the chimera.Rotamers.useBestRotamers() function that calls those routines to see what you need to do. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Jan 3, 2023, at 10:08 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Thank you for answering this side of my question, I now have a small deviation to take in my approach thanks to Elaine C. Meng who clarified to me the value on the probability parameter. Have a great day, Robert Noé De : Eric Pettersen <pett@cgl.ucsf.edu> Envoyé : mardi 3 janvier 2023 18:26 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr> Cc : chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu> Objet : Re: [Chimera-users] Question concerning rotamer choosing
To answer the Python side of this, chimera.Rotamers.getRotamers(residue) 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(residue, rotamers) where rotamers 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.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> wrote:
Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here <https://www.cgl.ucsf.edu/pipermail/chimera-users/2015-July/011193.html>), but I don't which one it is.
Thank you,
Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails"
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>

Thank you a lot for answering this, I understand the need to save computing time. Knowing this we'll be able to adjust our script more easily. I appreciate the time you took to answer all of this ! Regards, Noé Robert ________________________________ De : Eric Pettersen <pett@cgl.ucsf.edu> Envoyé : mardi 3 janvier 2023 à 21:11 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr> Cc : Chimera <chimera-users@cgl.ucsf.edu> Objet : Re: [Chimera-users] Question concerning rotamer choosing Hi Noé, The numeric criteria cannot be mixed with any of the other criteria and simply picks the Nth most probable rotamer (based on its prevalence in all proteins). It cannot be used to pick the 3rd-least clashes, etc. If you really want to do that you would have to resort to using Python. The rotamers you get from chimera.Rotamers.getRotamers() only have their probability attribute (rotamerProb) assigned, since the clashes and H-bonds take time to compute and may not be needed, depending on what the user requested. To assign clash score and number-of-H-bonds attributes (clashScore and numHbonds respectively) you would need to call chimera.Rotamers.processClashes()/processHbonds(). You should look at the part of the chimera.Rotamers.useBestRotamers() function that calls those routines to see what you need to do. --Eric Eric Pettersen UCSF Computer Graphics Lab On Jan 3, 2023, at 10:08 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Thank you for answering this side of my question, I now have a small deviation to take in my approach thanks to Elaine C. Meng who clarified to me the value on the probability parameter. Have a great day, Robert Noé ________________________________ De : Eric Pettersen <pett@cgl.ucsf.edu<mailto:pett@cgl.ucsf.edu>> Envoyé : mardi 3 janvier 2023 18:26 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr<mailto:noe.robert@etu.univ-cotedazur.fr>> Cc : chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu> <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> Objet : Re: [Chimera-users] Question concerning rotamer choosing To answer the Python side of this, chimera.Rotamers.getRotamers(residue) 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(residue, rotamers) where rotamers 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. --Eric Eric Pettersen UCSF Computer Graphics Lab On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here<https://www.cgl.ucsf.edu/pipermail/chimera-users/2015-July/011193.html>), but I don't which one it is. Thank you, Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails" _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users

Hi, I would like to come back to this answer from M. Pettersen : "To answer the Python side of this, chimera.Rotamers.getRotamers(residue) 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." 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 'rotamerProb' attribute of each rotamer, the rest would be performed using commands. 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" Thank you a lot and have a great weekend ! ________________________________ De : Eric Pettersen <pett@cgl.ucsf.edu> Envoyé : mardi 3 janvier 2023 18:26 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr> Cc : chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu> Objet : Re: [Chimera-users] Question concerning rotamer choosing To answer the Python side of this, chimera.Rotamers.getRotamers(residue) 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(residue, rotamers) where rotamers 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. --Eric Eric Pettersen UCSF Computer Graphics Lab On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu<mailto:chimera-users@cgl.ucsf.edu>> wrote: Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here<https://www.cgl.ucsf.edu/pipermail/chimera-users/2015-July/011193.html>), but I don't which one it is. Thank you, Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails" _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users

Hi Noé, To get the rotamer list specifically for residue :3.a, the code would be: from chimera.specifier import evalSpec from Rotamers import getRotamers for r in evalSpec(":3.a").residues(): rots = getRotamers(r) # do whatever you were going to do with the rotamer list 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. --Eric
On Jan 7, 2023, at 7:07 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu> wrote:
Hi, I would like to come back to this answer from M. Pettersen : "To answer the Python side of this, chimera.Rotamers.getRotamers(residue) 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." 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 'rotamerProb' attribute of each rotamer, the rest would be performed using commands. 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" Thank you a lot and have a great weekend ! De : Eric Pettersen <pett@cgl.ucsf.edu> Envoyé : mardi 3 janvier 2023 18:26 À : Noe Robert <noe.robert@etu.univ-cotedazur.fr> Cc : chimera-users@cgl.ucsf.edu <chimera-users@cgl.ucsf.edu> Objet : Re: [Chimera-users] Question concerning rotamer choosing
To answer the Python side of this, chimera.Rotamers.getRotamers(residue) 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(residue, rotamers) where rotamers 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.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jan 2, 2023, at 6:26 AM, Noe Robert via Chimera-users <chimera-users@cgl.ucsf.edu <mailto:chimera-users@cgl.ucsf.edu>> wrote:
Hi, 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). 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 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. On Jul 1, 2015, Eric Pettersen advised to modify the "Python script that uses the functions in the Rotamers module" (here <https://www.cgl.ucsf.edu/pipermail/chimera-users/2015-July/011193.html>), but I don't which one it is.
Thank you,
Noé Robert, Fifth-year student in bioengineering, minor in Bioinformatics and Modelling, at engineering school Polytech Nice Sophia, France Phone : +33 7 81 00 52 02 "let's limit the use of our resources and lighten our mails"
_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>
Chimera-users mailing list: Chimera-users@cgl.ucsf.edu <mailto:Chimera-users@cgl.ucsf.edu> Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimera-users>
participants (3)
-
Elaine Meng
-
Eric Pettersen
-
Noe Robert