[Chimera-users] Using python to run rotamer

Eric Pettersen pett at cgl.ucsf.edu
Wed Aug 5 09:39:32 PDT 2020


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 <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html>

--Eric

	Eric Pettersen
	UCSF Computer Graphics Lab

> On Aug 5, 2020, at 1:21 AM, 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
> Manage subscription: https://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/20200805/19d3f049/attachment.html>


More information about the Chimera-users mailing list