# # Make a movie showing each residue and its nearby EM density map with backbone aligned # on the horizontal axis. Align by matching backbone N, CA, C atoms to 3 template atoms. # # Example: Beta-galactosidase, 2.2 A, PDB 5a1a, EMDB 2984 # # Setup windowsize 400 400 # Open 3 atom backbone template to align residues to. open template.pdb ~display #0 # Open atomic model open 5a1a ~ribbon #1 # Open density map open emdbID:2984 volume #2 level 0.026 style mesh step 1 color .7,.7,.7,.7 # Make a label that shows the current residue number 2dlabel create resname text "1" xpos .8 ypos .9 # Record movie movie record perframe "match #1:$1.A@N,CA,C #0@N,CA,C ; show #1:$1.A ; matrixcopy #1 #2 ; sop zone #2 #1:$1.A 2.5 ; 2dlabel change resname text $1 ; turn y 30 12 center #0@CA" range 2,1022 interval 14 # Wait 1021 * 14 frames wait 14300 movie encode ~/Desktop/5a1a_spin.mp4 framerate 7