# Make a phage T4 model with capsid (5vf3), needle (6j0b), sheath (6j0b, 6j0c) # and base plate (5iv5, 5iv7) assembled from several PDB models. # Animate the contraction of the sheath in a wave from tip to capsid. # Open extended sheath helix ring open 6j0b # Delete second copy of ring and needle proteins del #1/G-L,a-l # Move ring to origin 0,0,0 measure center #1 # Center of mass of 16476 atoms = (143.53, 143.53, 134.14) move -143.53,-143.53,-134.14 atoms #1 coord #1 # Open contracted sheath helix ring open 6j0c # Delete second copy of ring del /a-f # Rename chains so they match the order of 6j0b for morphing changechain #2 A,B,C,D,E,F F,E,D,C,B,A # Align contracted the extended helix ring matchmaker #2/A,B,C,D,E,F to #1/A-F pair ss cutoff none # Morph helix ring extended to contracted state morph #1,2 play false # Color sheath ring gray and blue color #3 lightgray color #3/A,C,E cornflowerblue # Open needle structure open 6j0b # Delete sheath rings and second copy of needle helix ring del #4/A-L,g-l # Color needle color #4 salmon # Align with sheath move -143.53,-143.53,-134.14 atoms #4 coord #4 # Create 28 ring needle helix from single ring sym #4 H,39.3,19.9,28 # Open capsid asymmetric unit open 5vf3 # Make full icosahedral shell sym #5 assembly 1 newmodel false # Position capsid at top of sheath and needle move z -420 model #5 coord #5 # Define the custom helixwave command. open helixwave.py # Create full sheath helixwave #3 28 time 0 # Open pre-attachment baseplate open 5iv5 # Align to tip of sheath matchmaker #7/BD,DG,FJ,IC,T,q to #6.28 pair ss cutoff none # Open post-attachment baseplate open 5iv7 # Align to post-attachment baseplate to pre-attachment baseplate matchmaker #8/BD,DF,GA,O,e,u to #6.28 pair ss cutoff none # Hide pre-attachment baseplate hide #8 model # Make window tall and narrow for movie recording windowsize 400 1000 # Orient vertically view orient turn x 90 center #5 zoom 1.7 move y 900 # Use ambient lighting light soft # Make small crevices darker light msDepth 0.003 # Draw first frame wait 1 # Animate and record movie movie record # Fade out pre-attachment baseplate model and fade in post-attachment baseplate crossfade 60 ; hide #7 model ; show #8 model wait 60 # Animate twisting collapse of sheath moving needle and capsid downward helixwave #6 move #4,5 steps 300 wait 300 # Record movie file movie encode phage.mp4 framerate 60 quality higher