Jmol/Storymorph: Difference between revisions
(38 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Image:Spike labeled spacefill small.gif|right|border]] | [[Image:Spike labeled spacefill small.gif|right|border]] | ||
This is | This is the documentation for Storymorph, a suite of Jmol functions to help with superimposing and morphing between two structures representing different conformations of a molecule or molecular assembly ([https://proteopedia.org/wiki/index.php/Image:Storymorph.spt script]). For more general information, see [[Jmol/superposition]] and [[Morphs]]. If you load storymorph.spt into a Jmol session where no structures have loaded or all structures have been removed using the "zap" command, it will run a demonstration superposition and morph based on calmodulin strutures. Most examples in this documentation are from this demo. | ||
== Overview of capabilities == | == Overview of capabilities == | ||
Line 9: | Line 8: | ||
# The concept of anchors, ensuring inter-domain connectivity during the morph that does not rely on time-consuming energy minimization. | # The concept of anchors, ensuring inter-domain connectivity during the morph that does not rely on time-consuming energy minimization. | ||
# The capability of timing the domain transitions independently, giving the viewer a sense of cause and effect. The cause and effect is part of the storytelling, and does not necessarily reflect a true cause and effect. | # The capability of timing the domain transitions independently, giving the viewer a sense of cause and effect. The cause and effect is part of the storytelling, and does not necessarily reflect a true cause and effect. | ||
==Try it yourself== | |||
If you want to get a feel for the morphs before you read the theory, explore this section. If you don't like pushing buttons without knowing what is happening, skip this section and come back to it later. | |||
<StructureSection load='' size='500' side='right' caption='' scene=''> | |||
This interactive example is for playing around with the different choices you can make when preparing a morph. Some combinations of choices will make morphs that are easy to understand and have low-energy conformations on the path between initial and final states. Other combinations of choices will make morphs that are hard to understand or follow an unrealistic path. We are using the structures of calmodulin [[1prw]] and [[1cll]], after removing all atoms but the carbon alpha atoms to reduce the computational cost (i.e. giving a fairly fast morph). We first load and display the two structures, and then you can click on the buttons below to superimpose and morph. Try different combinations to get a feel for what is possible, and what makes sense to you. | |||
<jmol> | |||
<jmolLink> | |||
<script>load files "=1prw" "=1cll"; | |||
delete not alpha; | |||
model 0; | |||
backbone only; | |||
backbone 0.4; | |||
display 4-147; | |||
color group;color background black; | |||
structures = [{1.1}, {2.1}]; | |||
domains = [[{78-147},{78-147}, {(78-138)}], [{4-77}, {78}],]; | |||
timing = [[0,1,0],[0,1,0]] | |||
script "/images/a/a2/Storymorph.spt" </script> | |||
<text>load and display</text> | |||
</jmolLink> | |||
</jmol> | |||
'''Choose representation''' | |||
<jmol> | |||
<jmolRadioGroup> | |||
<item> | |||
<script>model 1 </script> | |||
<text>1prw</text> | |||
</item> | |||
<item> | |||
<script>model 2 </script> | |||
<text>1cll</text> | |||
</item> | |||
<item> | |||
<script>model 0</script> | |||
<text>both</text> | |||
<checked>true</checked> | |||
</item> | |||
</jmolRadioGroup> | |||
</jmol> | |||
<jmol> | |||
<jmolRadioGroup> | |||
<item> | |||
<script>select all; spacefill only; spacefill 4.0;</script> | |||
<text>spheres</text> | |||
</item> | |||
<item> | |||
<script>select all;backbone only; backbone 0.4; select 77,78; spacefill 2.0</script> | |||
<text>combo</text> | |||
</item> | |||
<item> | |||
<script>select all; backbone only; backbone 0.4</script> | |||
<text>C-alpha trace</text> | |||
<checked>true</checked> | |||
</item> | |||
</jmolRadioGroup> | |||
</jmol> | |||
'''Superposition''' | |||
The superposition defines the initial and final state. The morph is significantly affected by this because it merely provides the trajectory between these two states. | |||
<jmol> | |||
<jmolRadioGroup> | |||
<item> | |||
<script>superimpose(structures,{4-147});delay 2;center visible </script> | |||
<text>all</text> | |||
</item> | |||
<item> | |||
<script>superimpose(structures,{4-77});delay 2;center visible </script> | |||
<text>Nterm</text> | |||
</item> | |||
<item> | |||
<script>superimpose(structures,{78-147});delay 2;center visible</script> | |||
<text>Cterm</text> | |||
<checked>true</checked> | |||
</item> | |||
</jmolRadioGroup> | |||
</jmol> | |||
'''Run a morph''' | |||
<jmol> | |||
<jmolButton> | |||
<script>domains = [[{78-147}], [{4-77}, {78}],]; morph(20, structures, domains, timing);</script> | |||
<text>N anchored to C</text> | |||
</jmolButton> | |||
</jmol> <jmol> | |||
<jmolButton> | |||
<script>domains = [[{4-77}], [{78-147}, {77}],]; morph(20, structures, domains, timing);</script> | |||
<text>C anchored to N</text> | |||
</jmolButton> | |||
</jmol> <jmol> | |||
<jmolButton> | |||
<script>domains = [[{78-147}], [{4-77}],]; morph(20, structures, domains, timing);</script> | |||
<text>Independent domains</text> | |||
</jmolButton> | |||
</jmol> <jmol> | |||
<jmolButton> | |||
<script>domains = [[{4-147}],]; morph(20, structures, domains, timing);</script> | |||
<text>no domain separation</text> | |||
</jmolButton> | |||
</jmol> | |||
'''Additional parameters''' | |||
You can change these parameters, and then run another morph. | |||
Change the timing | |||
<jmol> | |||
<jmolRadioGroup> | |||
<item> | |||
<script>timing = [[0,1,0],[0,1,0]] </script> | |||
<text>simultaneously</text> | |||
</item> | |||
<item> | |||
<script>timing = [[0.5,1,0],[0,0.5,0]] </script> | |||
<text>consecutively</text> | |||
</item> | |||
<item> | |||
<script>timing = [[0,1,1],[0,1,1]]</script> | |||
<text>long direction</text> | |||
<checked>true</checked> | |||
</item> | |||
</jmolRadioGroup> | |||
</jmol> | |||
Parameters that tweak the morph | |||
<jmol> | |||
<jmolCheckbox> | |||
<scriptWhenUnChecked>morph_pause = 0 | |||
</scriptWhenUnChecked> | |||
<scriptWhenchecked>morph_pause = 10 | |||
</scriptWhenchecked> | |||
<checked>false</checked> | |||
<text>midway pause</text> | |||
</jmolCheckbox> | |||
</jmol> | |||
<jmol> | |||
<jmolCheckbox> | |||
<scriptWhenUnChecked>morph_delay = 0 | |||
</scriptWhenUnChecked> | |||
<scriptWhenchecked>morph_delay = 1 | |||
</scriptWhenchecked> | |||
<checked>flase</checked> | |||
<text>Slomo</text> | |||
</jmolCheckbox> | |||
</jmol> | |||
<jmol> | |||
<jmolCheckbox> | |||
<scriptWhenUnChecked>morph_palindrome = 0 | |||
</scriptWhenUnChecked> | |||
<scriptWhenchecked>morph_palindrome = 1 | |||
</scriptWhenchecked> | |||
<checked>flase</checked> | |||
<text>Palindrome</text> | |||
</jmolCheckbox> | |||
</jmol> | |||
<jmol> | |||
<jmolRadioGroup> | |||
<item> | |||
<script>morph_skiplinear = 0; morph_skiprigid = 1;</script> | |||
<text>skip rigid</text> | |||
</item> | |||
<item> | |||
<script>morph_skiplinear = 1; morph_skiprigid = 0;</script> | |||
<text>skip linear</text> | |||
</item> | |||
<item> | |||
<script>morph_skiplinear = 0; morph_skiprigid = 0;</script> | |||
<text>full morph</text> | |||
<checked>true</checked> | |||
</item> | |||
</jmolRadioGroup> | |||
</jmol> | |||
</StructureSection> | |||
===Worked examples=== | |||
[[Image:Morph worked example.gif|right|frame|Example 2: N-terminus in blue, C-terminus in red, domain link as two green spheres.]] | |||
# To see the changes in the C-terminal domain, move model 2 to minimize distances between the two conformations of this domain (i.e. choose superimpose Cterm). Check the Palindrome box, and display model 1 only. Then, click the morph button labeled "N anchored to C". If you want to focus on the changes in the C-terminal domain, also select the consecutive timing option. Because the C-terminal domain does not undergo rigid body rotation, it is easy to focus on the subtle changes in the conformation. | |||
# To focus on the N-terminal domain, superimpose Nterm, and run the "C anchored to N" morph. With this superposition, you can see the (less subtle) changes in the N-terminal domain, while the changes in the C-terminal domain are hardly perceptible. To explore how the anchoring helps to maintain covalent bonds, run the "independent domains" morph instead. To emphasize the distance of the link between the two domains (in this case, the distance between consecutive alpha carbon atoms), choose the "combo" representation and run the two morphs again (see animated GIF on the right. | |||
# To see a bad linear morph, superimpose "Nterm", check "skip rigid" and run any of the morphs. The reason the morph is bad is the large rotation of the C-terminal domain, foreshortening distances (e.g. "flattening" helices) in the middle of the trajectory in the absence of a rigid body movement. | |||
# To see a good linear morph, superimpose "all", check "skip rigid" and run any of the morphs. Because the necessary rotations are smaller in this case, the distortion of the domains is much smaller and hardly noticable as the domains are moving. | |||
== Two-phase Morph: rigid body followed by linear interpolation == | == Two-phase Morph: rigid body followed by linear interpolation == | ||
Line 20: | Line 209: | ||
In the right example, the midpoint of the "P" travels on a line (faint red line). As a result, the base of the "P", which has the same position in the initial and final state, moves away from this position during the morph. In the left example, the base of the "P" was chosen as anchor. Now it travels on a straight line (or in this case stays put) while the other parts of the "P" travel on curved paths (blue faint lines). | In the right example, the midpoint of the "P" travels on a line (faint red line). As a result, the base of the "P", which has the same position in the initial and final state, moves away from this position during the morph. In the left example, the base of the "P" was chosen as anchor. Now it travels on a straight line (or in this case stays put) while the other parts of the "P" travel on curved paths (blue faint lines). | ||
If the anchor selection is part of another domain, the morph algorithm will ensure that the distance of the domain to the anchor remains constant throughout the morph. In essence, the other domain "drags along" the domain in question. To maintain connectivity between domains | If the anchor selection is part of another domain, the morph algorithm will ensure that the distance of the domain to the anchor remains constant throughout the morph. In essence, the other domain "drags along" the domain in question. To maintain connectivity between domains linked by a single covalent bond, an appropriate anchor would be the atom or residue the domain is directly attached to. If their are multiple covalent connections between domains, you can choose the anchor to include all the connection points. | ||
[[Image:Morph two anchor.gif]] | [[Image:Morph two anchor.gif]] | ||
Line 28: | Line 217: | ||
== Loading the two structures == | == Loading the two structures == | ||
You can directly load two structures from the PDB into Jmol using the "load files" command, e.g. | You can directly load two structures from the PDB into Jmol using the "load files" command, e.g. | ||
<nowiki>load files "=1prw" "=1cll"</nowiki> | <nowiki>load files "=1prw" "=1cll" | ||
model 0</nowiki> | |||
In many cases, a single structure already contains two conformations, such as the two subunits of a dimer, mulitple models in an NMR structure, or multiple copies in the asymmetric unit. You can also assemble multiple structures into a single PDB file, designating them as different models (with the MODEL n and ENDMDL tags). | In many cases, a single structure already contains two conformations, such as the two subunits of a dimer, mulitple models in an NMR structure, or multiple copies in the asymmetric unit. You can also assemble multiple structures into a single PDB file, designating them as different models (with the MODEL n and ENDMDL tags). | ||
== Defining the two structures == | == Defining the two structures == | ||
Line 38: | Line 227: | ||
<nowiki>structures = [{1.1}, {2.1}]</nowiki> | <nowiki>structures = [{1.1}, {2.1}]</nowiki> | ||
Here, the selection is the first and the second structure loaded. For models in a single-structure file, you would use "1.1" and "1.2" instead. For subunits with different conformation, you would select by chain name, e.g. | Here, the selection is the first and the second structure loaded. For models in a single-structure file, you would use "1.1" and "1.2" instead. For subunits with different conformation, you would select by chain name, e.g. chain="A" and chain="B". More complicated cases are possible (chain B of the second model vs. chain A of the third model) but probably rare. | ||
== Defining the domains == | == Defining the domains == | ||
Line 52: | Line 241: | ||
To ensure connectivity between covalently linked domains, you can set the anchor of the second domain to be the connecting residue of the first. For example (see domain definitions above), the first domain might be {78-147} and the second domain {4-77}. To make sure the second domain does not get detached, we would choose the anchor as {78}, within the first domain and directly connected to the second. Because of the anchors, the order of domain definitions becomes important. Anchors either have to be within "your own" domain (for a linear movement of the anchor), or in the domains higher up in the list. The latter ensures that we already know where the anchor is before we translate the current domain to maintain the appropriate distance to it. | To ensure connectivity between covalently linked domains, you can set the anchor of the second domain to be the connecting residue of the first. For example (see domain definitions above), the first domain might be {78-147} and the second domain {4-77}. To make sure the second domain does not get detached, we would choose the anchor as {78}, within the first domain and directly connected to the second. Because of the anchors, the order of domain definitions becomes important. Anchors either have to be within "your own" domain (for a linear movement of the anchor), or in the domains higher up in the list. The latter ensures that we already know where the anchor is before we translate the current domain to maintain the appropriate distance to it. | ||
== Loading the storymorph suite == | |||
If you have internet access, this command will load the script. With an open console, it will also give some basic reminders of the functionality: | |||
<nowiki>script "https://proteopedia.org/wiki/images/a/a2/Storymorph.spt"</nowiki> | |||
If you are working in Proteopedia, you should shorten the link to make it local: | |||
<nowiki>script "images/a/a2/Storymorph.spt"</nowiki> | |||
== Superposition == | == Superposition == | ||
The superimpose function works the same way as the Jmol compare function, but it first verifies the required atom selections to prevent Jmol from crashing or freezing. The superimpose function takes two or three parameters. The first paramenter always defines the two structures (see above). The second parameter is either a single domain selection (when calling with two parameters), or it is the list of list describing all domains, with the third parameter an integer designating which domain is to be used in the superposition. The superposition leaves the first structure in its original orientation and moves the second structure to minimize the distances between corresponding atoms (defined by the domain selection). Different from the morph function, the superposition function alters coordinates for the remainder of the session. Because morphs connect initial and final atomic positions with a path, the orientation of the final state with respect to the initial one is crucial, and the choice of superposition defines this orientation. | The superimpose function works the same way as the Jmol compare function, but it first verifies the required atom selections to prevent Jmol from crashing or freezing. The superimpose function takes two or three parameters. The first paramenter always defines the two structures (see above). The second parameter is either a single domain selection (when calling with two parameters), or it is the list of list describing all domains, with the third parameter an integer designating which domain is to be used in the superposition. The superposition leaves the first structure in its original orientation and moves the second structure to minimize the distances between corresponding atoms (defined by the domain selection). Different from the morph function, the superposition function alters coordinates for the remainder of the session. Because morphs connect initial and final atomic positions with a path, the orientation of the final state with respect to the initial one is crucial, and the choice of superposition defines this orientation. In other words, you get a different morph if you choose to superimpose the two structures in a different way before starting the morph. | ||
To superimpose the two structures by minimizing distances in a given domain, use the superimpose() function. For example, | To superimpose the two structures by minimizing distances in a given domain, use the superimpose() function. For example, | ||
Line 120: | Line 320: | ||
where the last parameter gives the domain to compare (in this case domain 2). | where the last parameter gives the domain to compare (in this case domain 2). | ||
== Examples == | == Examples complete with code == | ||
=== Calmodulin === | === Calmodulin === | ||
Line 137: | Line 337: | ||
[{4-77}, {78}], // morph 4-77 as unit, anchored at 78 | [{4-77}, {78}], // morph 4-77 as unit, anchored at 78 | ||
] | ] | ||
superimpose(structures, domains | script "https://proteopedia.org/wiki/images/a/a2/Storymorph.spt" | ||
superimpose(structures, domains, 1) | |||
center visible | center visible | ||
model 1 | |||
morph(5,structures, domains) | morph(5,structures, domains) | ||
</nowiki> | </nowiki> | ||
=== Hexokinase === | === Hexokinase === | ||
<nowiki>load | <nowiki>load "https://proteopedia.org/wiki/images/f/f2/Apo_hexokinase.pdb" | ||
load append "=3O8M" | load append "=3O8M" | ||
select all; cartoon only | select all; cartoon only | ||
Line 173: | Line 375: | ||
color cpk | color cpk | ||
morph(20, | script "https://proteopedia.org/wiki/images/a/a2/Storymorph.spt" | ||
morph(20, structures, domains, timing)</nowiki> | |||
== | ==Storymorphs on Proteopedia== | ||
The following pages contain morphs created with the Jmol script: | |||
[[Recoverin, a calcium-activated myristoyl switch]] | |||
[[Calmodulin]] | |||
[[Human lactoferrin]] | |||
[[Hexokinase]] | |||
[[Lipase lid morph]] | |||
[[Mfd translocase]] | |||
[[T7 RNA Polymerase]] | |||
[[SARS-CoV-2 spike protein fusion transformation]] | |||
If you use Storymorph to make your own morphs, please add the following to your references: | |||
<nowiki> | |||
<ref>The [[Jmol/Storymorph|Storymorph Jmol scripts]] | |||
were used to create the interpolation shown in the morph. | |||
[https://proteopedia.org/wiki/index.php/Image:Spike_SARS_CoV_2_storymorph.pdb|Coordinates] | |||
available on Proteopedia</ref> | |||
</nowiki> | |||
If the morph is made on the fly in Proteopedia, please reference as: | |||
<nowiki> | |||
<ref>The [[Jmol/Storymorph|Storymorph Jmol scripts]] | |||
creates the interpolated coordinates | |||
of the morph on the fly.</ref></nowiki> | |||
This way, there will be an easy way to find all Storymorphs on the site, and readers can learn about the method used. |