[chimera-dev] declaring an integer to be used for the model and select command

Moses Adenaike adenaike at sas.upenn.edu
Tue Oct 8 09:39:55 PDT 2013


Hello there!
   I am trying to write a python script for chimera to rotate one molecule
then translate another molecule to the right. I can get the code to work
when I say use select 0 and model 1. But I want to define functions Rotate
and Translate and be able to parse an integer value for the model numbers:

Example
def Rotate (0) where 0 would be the value of a variable called model
inetger then later the function would have the code
runCommand("move x -1 model #modelinteger") but when I try to compile
chimera says model integer is not defined.
I define it outside the function as modelinteger=0 but still the same error
message shows.

Basically how do I get chimera to understand that my variable modelinteger
is indeed an integer?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20131008/4be92cc3/attachment.html>


More information about the Chimera-dev mailing list