Example with independent moving objects and animation via object flipping.
Click here to view the resulting movie using QuickTime.
The inputs to this movie consist of the following PDB files, constructed using the 1iau.pdb PDB entry for Granzyme B.
The first script loads all of the required structures structures and breaks them down into a series of independent objects suitable for constructing the movie.
# PyMOL script: load.pml load step1_docked_complex.pdb, enzyme load step2_peptide_adduct.pdb, step2_enz load step3_acyl_enzyme.pdb, step3_enz load step4_water_adduct.pdb, step4_enz load step5_free_enzyme.pdb, step5_enz # ignore glycosylation for now remove c// extract step1_sub, /enzyme//B create step2_adduct, /step2_enz//B extend 1, extract=/step2_enz//B create step3_adduct, /step3_enz//B extend 1, extract=/step3_enz//B create step4_adduct, /step4_enz//B extend 1, extract=/step4_enz//B extract step5_product, /step5_enz//B extract step3_product, bymol /step3_adduct//B/SER`406/CA set surface_quality, 1 order *,sort=1 dele *_enz
The second script does all of the rest of the work to define the movie. Note that this script is designed to be run iteratively (via @movie.pml
) so that the user can make a change, rerun the script, and immediately see the effect.
# PyMOL script: movie.pml # set representations and coloring as sticks as surface, enzyme # green carbons util.cbag # white enzyme color white, enzyme # with red active-site nucleophile color oxygen, enzyme///ser`195/OG # turn off everything disable # top-down camera view (frame of reference for translations) set_view (\ 0.690281689, 0.688584030, 0.222161561,\ -0.576666951, 0.709035158, -0.405857205,\ -0.436990112, 0.152041912, 0.886522174,\ 0.000079889, -0.000218283, -79.604537964,\ 10.085126877, 36.368568420, 66.158187866,\ 51.506359100, 107.684165955, 0.000000000 ) # adjust lighting and color saturation space pymol set light, [0.1, 0.2, -1] set reflect, 0.425 set specular_intensity, 0.25 set stick_radius, 0.4 bg white # reset everything (in case the script was run before) mset mview reset, object=step1_sub mview reset, object=step3_product mview reset, object=step5_product reset object=step1_sub reset object=step3_product reset object=step5_product rewind # start defining the movie... # pause madd 1 x30 mdo 1: disable; enable enzyme step1_sub # move substrate in start = cmd.count_frames() madd 1 x120 stop = cmd.count_frames() cmd.mview("store", stop, object="step1_sub") translate [0,-0.7,8], object=step1_sub cmd.mview("store", (start+stop)/2,object="step1_sub") translate [0,-17,4], object=step1_sub cmd.mview("store", start, object="step1_sub") cmd.mview("store", 1, object="step1_sub") mview interpolate, object=step1_sub # pause madd 1 x30 # show adduct n_frame = cmd.count_frames() cmd.mdo(n_frame, "disable step1_sub; enable step2_adduct") # pause madd 1 x30 # release c-terminal product n_frame = cmd.count_frames() cmd.mdo(n_frame, "disable step2_*; enable step3_*") cmd.mview("store", n_frame,object="step3_product") # pause madd 1 x30 # remove c-terminal product start = cmd.count_frames() + 1 madd 1 x90 stop = cmd.count_frames() cmd.mview("store", start, object="step3_product") translate [4,-20,12], object=step3_product cmd.mview("store", stop, object="step3_product") mview interpolate, object=step3_product # pause madd 1 x30 # show water adduct n_frame = cmd.count_frames() cmd.mdo(n_frame, "disable step3_add; enable step4_*") # pause madd 1 x30 # show n-terminal product & free enzyme n_frame = cmd.count_frames() cmd.mdo(n_frame, "disable step4_*; enable step5_*") cmd.mview("store", start,object="step5_product") # pause madd 1 x30 # remove n-terminal product start = cmd.count_frames() + 1 madd 1 x90 stop = cmd.count_frames() cmd.mview("store", start,object="step5_product") translate [0,-0.7,8], object=step5_product cmd.mview("store", (start+stop)/2, object="step5_product") translate [-3,-17,4], object=step5_product cmd.mview("store", stop, object="step5_product") mview interpolate, object=step5_product # set the final camera view set_view (\ 0.662352204, 0.712388158, 0.231917903,\ -0.570117116, 0.680115402, -0.460874110,\ -0.486055434, 0.173040211, 0.856625080,\ 0.000105150, -0.000141161, -108.809425354,\ 4.648024559, 31.749435425, 64.498596191,\ 80.722877502, 136.900558472, 0.000000000 ) # rewind and play the movie without looping rewind unset movie_loop mplay
The movie was exported from MacPyMOL with ray tracing enabled and using the QuickTime Animation codec. The resulting file was then recompressed using the QuickTime H.264 codec.
The PDB files and scripts can be downloaded as a ZIP archive: granzyme_hydrolysis.zip.