0

I am trying to change the color of many objects in pymol from python. I made this for loop

obs = ['R8', 'R1X', 'R2X', 'R11']
for i in obs:
    print "color gray, %s" % i

from pymol I run

run myscript.py

but the pymol interface simply prints the the command that should change the color, and does not change the color of the structure.

1 Answer 1

1

In order to execute Pymol commands from python you need to use cmd. In your case this would be:

cmd.color('gray', i)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.