Hello,

I have two questions:

1. I want to superpose object1 and object2 on top of each other, and have
derived a rotation matrix to transform object2 by. How do I apply this matrix
to all its atoms? Either I parse its PDB coordinates, multiply them by the
matrix, and load the object (which can be really slow), or, I specify the
(axis, angle) data via PyMOL's "rotate" command, which needs me to solve for
three angles from the matrix, and it's messy. Is there a better way to specify
a matrix to be multiplied to the atom coordinates?

(I saw set_view. But it rotates the viewing coordinates system (i.e. camera),
which would alter both object1 and object2.)

2. I have a series of commands in a python script to highlight secondary
structures:

        cmd.do(" util.ss")
        cmd.do(" color red, ss h")
        cmd.do(" color yellow, ss s")
        cmd.do(" color blue, ss l+''")

I found the "color" commands race ahead of util.ss and some odd color schemes
show up. I tried "cmd.sync(timeout=5.0, poll=2)" with numerous combinations of
timeout and poll after util.ss but it still happened. Now I'm using
time.sleep(1.5), which does block the main thread till util.ss finishes, but
it isn't nice for the program to "freeze" for the 1.5 seconds. My question is:
why does the sync command not work as expected? This race condition doesn't
occur if the commands are put in a PyMOL script or program (I guess there is
only one thread of execution in those cases?).


Thanks,

Tina




Reply via email to