Difference between revisions of "Load"
Jump to navigation
Jump to search
AngelHerraez (talk | contribs) (new page for collecting several pieces) |
AngelHerraez (talk | contribs) (→Loading structures and data into Jmol) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
=Loading structures and data into Jmol= | =Loading structures and data into Jmol= | ||
| − | ===Loading parts of a model file=== | + | For the full detailed syntax, visit [{{ScriptingDoc}}#load Jmol Scripting Doc] |
| + | |||
| + | In this page we highlight some particular uses. | ||
| + | |||
| + | === Loading parts of a model file === | ||
The use of <code>load</code> with the <code>filter</code> option allows that Jmol will only read some atoms from the file. This is useful e.g. to avoid the solvent molecules, to load a single chain, or to accelerate manipulation of large models (trace and cartoon may be rendered with just the Calpha atoms available) | The use of <code>load</code> with the <code>filter</code> option allows that Jmol will only read some atoms from the file. This is useful e.g. to avoid the solvent molecules, to load a single chain, or to accelerate manipulation of large models (trace and cartoon may be rendered with just the Calpha atoms available) | ||
| Line 9: | Line 13: | ||
* Loading part of the model using a filter | * Loading part of the model using a filter | ||
* Loading only some models from multimodel files | * Loading only some models from multimodel files | ||
| + | |||
| + | === Using the load() function === | ||
| + | Instead of loading a file with immediate display (the <code>load</code> command), data in a file can be put into a Jmol variable (in memory) in order to optionally process it before display, using the <code>load()</code> function. | ||
| + | |||
| + | Simplest syntax (no processing): | ||
| + | d = load("myStructure.pdb"); | ||
| + | load var d; | ||
| + | load "@d"; // synonym of the above line (quotes are essential) | ||
| + | reset d; // clears the variable to release the memory used (after having displayed it). | ||
| + | |||
| + | d = load("$caffeine"); | ||
| + | load var d; | ||
| + | zap; | ||
| + | load "@d"; | ||
Latest revision as of 19:09, 4 May 2026
Loading structures and data into Jmol
For the full detailed syntax, visit Jmol Scripting Doc
In this page we highlight some particular uses.
Loading parts of a model file
The use of load with the filter option allows that Jmol will only read some atoms from the file. This is useful e.g. to avoid the solvent molecules, to load a single chain, or to accelerate manipulation of large models (trace and cartoon may be rendered with just the Calpha atoms available)
Load/Filter has examples for:
- Loading part of the model using a filter
- Loading only some models from multimodel files
Using the load() function
Instead of loading a file with immediate display (the load command), data in a file can be put into a Jmol variable (in memory) in order to optionally process it before display, using the load() function.
Simplest syntax (no processing):
d = load("myStructure.pdb");
load var d;
load "@d"; // synonym of the above line (quotes are essential)
reset d; // clears the variable to release the memory used (after having displayed it).
d = load("$caffeine");
load var d;
zap;
load "@d";