# Step #1 -- reorient CRISPR-Cas9 RNA-DNA hybrid into the most extended view
pdb_frag B 1:97 C 1:20 4oo8.pdb 4oo8-nts.pdb
rotate_mol 4oo8-nts.pdb temp
rotate_mol -r=4oo8.rot temp 4oo8-ok.pdb
x3dna-dssr -i=4oo8-ok.pdb --prefix=4oo8-ok -o=4oo8-ok.out
# To get the result illustrated in panel B, load '4oo8-ok-2ndstrs.ct'
# or '4oo8-ok-2ndstrs.dbn' into VARNA to draw the planar secondary
# structure diagram, exported as .svg for annotation in Inkscape.
# Step #2 -- get the cartoon-block representation, with fitted helices
x3dna-dssr -i=4oo8-ok.pdb --helical-axis -o=temp
\mv dssr-helicalAxes.pdb 4oo8-ok-helices.pdb
x3dna-dssr -i=4oo8-ok.pdb --block-file -o=4oo8-ok-blocks.r3d
# see 4oo8-ok.pml -- panel A
pymol -qkc 4oo8-ok.pml
convert -trim +repage -border 10 -bordercolor white 4oo8-ok-pymol.png 4oo8-ok.png
# Step #3 -- comparison of diloops (panel C)
pdb_frag B 5:11 2f8k.pdb temp
x3dna-dssr -i=temp --frame=B.9:edge -o=temp2
rotate_mol -r=rotxy-180 temp2 2f8k-uuga.pdb
x3dna-dssr -i=2f8k-uuga.pdb --block-file -o=2f8k-uuga-blocks.r3d
# see file: 2f8k-uuga.pml
pymol -qkc 2f8k-uuga.pml
convert -trim +repage -border 10 -bordercolor white 2f8k-uuga-pymol.png 2f8k-uuga.png
pdb_frag B 54:60 4oo8-ok.pdb temp
x3dna-dssr -i=temp --frame=B.58:edge -o=temp2
rotate_mol -r=rotxy-180 temp2 4oo8-cuag.pdb
x3dna-dssr -i=4oo8-cuag.pdb --block-file -o=4oo8-cuag-blocks.r3d
# see file: 4oo8-cuag.pml
pymol -qkc 4oo8-cuag.pml
convert -trim +repage -border 10 -bordercolor white 4oo8-cuag-pymol.png 4oo8-cuag.png
ex_str -1 1rng.pdb model1.pdb
pdb_frag A 4:9 model1.pdb temp
x3dna-dssr -i=temp --frame=A.8:edge -o=temp2
rotate_mol -r=rotxy-180 temp2 1rng-cuug.pdb
x3dna-dssr -i=1rng-cuug.pdb --block-file -o=1rng-cuug-blocks.r3d
# see file: 1rng-cuug.pml
pymol -qkc 1rng-cuug.pml
convert -trim +repage -border 10 -bordercolor white 1rng-cuug-pymol.png 1rng-cuug.png