[Chimera-users] Using python to run rotamer

benjamintam benjamintam at um.edu.mo
Wed Aug 12 19:58:33 PDT 2020


Hi Eric,

Thank you very much!

Best,

Ben

From: Eric Pettersen <pett at cgl.ucsf.edu>
Sent: 06 August 2020 00:40
To: benjamintam <benjamintam at um.edu.mo>
Cc: chimera-users at cgl.ucsf.edu BB <chimera-users at cgl.ucsf.edu>
Subject: Re: [Chimera-users] Using python to run rotamer

Hi Ben,
                It might be easier to just use the "swapaa" command than to use the useRotamer() or useBestRotamers() calls (there is no useRotamers() call).  You can run any regular Chimera command from Python by using the runCommand() function, e.g. to run "swapaa leu #0:248.a" you would:

                from chimera import runCommand
                runCommand("swapaa leu #0:248.a")

You should look at this simple example of a Chimera Python script that does some looping and writes out result files: Very Basic Chimera Programming Primer<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.cgl.ucsf.edu_chimera_docs_ProgrammersGuide_basicPrimer.html&d=DwMFaQ&c=KXXihdR8fRNGFkKiMQzstu-8MbOxd1NuZkcSBymGmgo&r=EElAJhvpEXZIOG4aO3Q_1Fg1wh-iIcDTLJ2t8QVMlxU&m=tAlvtvhqR4bZXsSVLxOtdy1Kr93uvTSSz3XaNbvvH6g&s=04iNgJ5i2fvGm9HvoCYkIPt82I1yvvcNDHgfhZab32o&e=>

--Eric

                Eric Pettersen
                UCSF Computer Graphics Lab


On Aug 5, 2020, at 1:21 AM, mailman-bounces at cgl.ucsf.edu<mailto:mailman-bounces at cgl.ucsf.edu> wrote:

Dear all,

I am trying to simplify tedious and repetitive work through using Chimera. My work has to substitute a list of residue on a protein. For each row of the list, after the substitution, I need to save it as a separate file.
Since I am a beginner of python coding, I would like to ask the following question before I attempt to code:

-From what I said, is it possible to do it in Chimera?
-Do I just call the Rotamer program out by using “useRotamers()”? If it is using that, how do I provide the residue number and residue type into the program?

Thanks for your time and help.

Best regards,

Ben
_______________________________________________
Chimera-users mailing list: Chimera-users at cgl.ucsf.edu<mailto:Chimera-users at cgl.ucsf.edu>
Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users<https://urldefense.proofpoint.com/v2/url?u=https-3A__plato.cgl.ucsf.edu_mailman_listinfo_chimera-2Dusers&d=DwMFaQ&c=KXXihdR8fRNGFkKiMQzstu-8MbOxd1NuZkcSBymGmgo&r=EElAJhvpEXZIOG4aO3Q_1Fg1wh-iIcDTLJ2t8QVMlxU&m=tAlvtvhqR4bZXsSVLxOtdy1Kr93uvTSSz3XaNbvvH6g&s=1WcNEDy_b-Q4eMwIJ3BkcInltZidXiEuSihUVzvtzRc&e=>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20200813/e7ba431e/attachment.html>


More information about the Chimera-users mailing list