|
From: DeLano, W. <wa...@su...> - 2002-01-24 03:46:30
|
Don't you hate it when users outsmart the programmer?
This is a tough one. The only solution I can think of is not memory
efficient, but it should work:
Load each frame of the movie into a separate segment or chain. This
should allow you to independently address each frame...
# assume that the segment is '' (empty) in the PDB files...
load frame1.pdb,mov
alter (segi ''),segi=3D'1'
load frame2.pdb,mov
alter (segi ''),segi=3D'2'
etc.=20
You can use Python to make a loop by switching to the Python API as
follows:
from pymol import cmd
for a in range(1,30):
cmd.load("frame%d.pdb"%a,"mov")
cmd.alter("(segi '')","segi=3D'%d'"%a)
Then you should be able to say:
color red,/mov/1//101/ca
color red,/mov/2//101/ca
color red,/mov/3//101/ca
Good luck,
Warren
--
mailto:wa...@su...
Warren L. DeLano, Ph.D.
Informatics Manager
Sunesis Pharmaceuticals, Inc.
341 Oyster Point Blvd.
S. San Francisco, CA 94080
(650)-266-3606 FAX:(650)-266-3501
> -----Original Message-----
> From: Nat [mailto:nat...@ya...]
> Sent: Wednesday, January 23, 2002 7:39 PM
> To: pym...@li...
> Subject: [PyMOL] movie frame alterations
>=20
>=20
>=20
> Is it possible to make changes to the way individual frames=20
> are rendered?
> Specifically, I'm writing a Python script (translated=20
> literally from C,
> but I'm too tired to learn the Python API right now) to evaluate bond
> "quality" and highlight the distorted regions in a frame of a protein
> morph. However, since the distortions tend to come in the middle of a
> morph, I want to examine each frame alone and apply highlighting only
> where applicable.
>=20
> Right now, treating individual frames as part of an object (i.e. for a
> movie) means that calls like 'color red, 101/ca' are applied to every
> state. Is there some way to only run that command on one state? In
> simple terms, I'm trying for a movie that changes color=20
> during its course
> to indicate bond quality. It's much easier to do this if I=20
> can use movie
> objects, especially since it would be nice to be able to run this
> interactively. Otherwise, I'm going to just create a very=20
> long pml file
> with all the commands.
>=20
> thanks,
> Nat
>=20
>=20
> _______________________________________________
> PyMOL-users mailing list
> PyM...@li...
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>=20
|