Jmol/Useful one-liners

From Proteopedia

(Difference between revisions)
Jump to: navigation, search
(Examples)
(save orientation, select whole residues, frame all)
Line 1: Line 1:
This is a collection of [[Jmol/Useful one-liners|useful one-liners]] in Jmol. While the [[Scene authoring tools]] give you access to a lot of Jmol's functionality, they don't cover the entire scripting language. However, the SAT contains an input box for entering Jmol commands directly. This page collects commands that might be entered into that textbox to achieve effects not otherwise possible. [[Viewing guide|Viewers of Proteopedia pages]] might find occasional use of these one-liners as well. To enter them, you first have to right-click on the Jmol window and open a console. For more complex Jmol commands, see [[Jmol/Using the console]].
This is a collection of [[Jmol/Useful one-liners|useful one-liners]] in Jmol. While the [[Scene authoring tools]] give you access to a lot of Jmol's functionality, they don't cover the entire scripting language. However, the SAT contains an input box for entering Jmol commands directly. This page collects commands that might be entered into that textbox to achieve effects not otherwise possible. [[Viewing guide|Viewers of Proteopedia pages]] might find occasional use of these one-liners as well. To enter them, you first have to right-click on the Jmol window and open a console. For more complex Jmol commands, see [[Jmol/Using the console]].
- 
==Examples==
==Examples==
Line 20: Line 19:
<jmol><jmolButton><text>hide %B</text><script>hide hidden or *%B</script></jmolButton></jmol>
<jmol><jmolButton><text>hide %B</text><script>hide hidden or *%B</script></jmolButton></jmol>
<jmol><jmolButton><text>display %B</text><script>hide hidden and not *%B</script></jmolButton></jmol>
<jmol><jmolButton><text>display %B</text><script>hide hidden and not *%B</script></jmolButton></jmol>
- 
- 
set zshade on
set zshade on
Line 35: Line 32:
<jmol><jmolButton><text>4</text><script>set zshadepower 4</script></jmolButton></jmol>
<jmol><jmolButton><text>4</text><script>set zshadepower 4</script></jmolButton></jmol>
This controls how strongly the scene fades with distance.
This controls how strongly the scene fades with distance.
- 
- 
-
 
===Color bonds independently from atoms===
===Color bonds independently from atoms===
Line 55: Line 49:
script inline @view1
script inline @view1
 +
 +
That is not necessary, given the native commands
 +
save orientation someName
 +
restore orientation someName
 +
 +
<jmol><jmolButton><text>save orientation view1</text><script>save orientation view1</script></jmolButton></jmol>
 +
<jmol><jmolButton><text>restore orientation view1</text><script>restore orientation view1</script></jmolButton></jmol>
 +
 +
===Expanding selection to whole residue/groups===
 +
select within(group, selected)
 +
This expands the selection to include all atoms belonging to the same residues or groups than the currently selected atoms.
===Not yet categorized===
===Not yet categorized===
Line 63: Line 68:
This centers on all atoms that are visible, either explicitly or as part of a cartoon etc.
This centers on all atoms that are visible, either explicitly or as part of a cartoon etc.
-
model 0
+
model all
When multiple models are loaded (e.g. NMR structures), or multiple structures are loaded (e.g. superpositions), this shows all the structures at the same time.
When multiple models are loaded (e.g. NMR structures), or multiple structures are loaded (e.g. superpositions), this shows all the structures at the same time.
 +
Synonyms: <code>model 0, frame all, frame 0</code>
</StructureSection>
</StructureSection>

Revision as of 14:53, 29 October 2020

This is a collection of useful one-liners in Jmol. While the Scene authoring tools give you access to a lot of Jmol's functionality, they don't cover the entire scripting language. However, the SAT contains an input box for entering Jmol commands directly. This page collects commands that might be entered into that textbox to achieve effects not otherwise possible. Viewers of Proteopedia pages might find occasional use of these one-liners as well. To enter them, you first have to right-click on the Jmol window and open a console. For more complex Jmol commands, see Jmol/Using the console.

Examples

Drag the structure with the mouse to rotate

Proteopedia Page Contributors and Editors (what is this?)

Karsten Theis, Angel Herraez

Personal tools