Difference between revisions of "Load"
Jump to navigation
Jump to search
AngelHerraez (talk | contribs) (new page for collecting several pieces) |
AngelHerraez (talk | contribs) |
||
| Line 1: | Line 1: | ||
=Loading structures and data into Jmol= | =Loading structures and data into Jmol= | ||
| − | ===Loading parts of a model file=== | + | === 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 9: | ||
* 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"; | ||
Revision as of 19:03, 4 May 2026
Loading structures and data into Jmol
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";