Difference between revisions of "Load/Filter"

From Jmol
Jump to navigation Jump to search
(loading with filter)
 
(loading with filter)
Line 1: Line 1:
= Loading part of the model =
+
== Loading part of the model using a filter ==
  
 
The use of <code>load</code> with the <code>filter</code> option will make Jmol to read the file and either load or discard each atom based on the provided criteria.
 
The use of <code>load</code> with the <code>filter</code> option will make Jmol to read the file and either load or discard each atom based on the provided criteria.
Line 27: Line 27:
 
  load "myfile.pdb" filter "%A"
 
  load "myfile.pdb" filter "%A"
 
Some atoms in some models have alternative positions (the <code>AltLoc</code> field in the pdb format), usually labelled A, B, etc. This loads all atoms that have no alternative positions, but only the first one of those who have several.
 
Some atoms in some models have alternative positions (the <code>AltLoc</code> field in the pdb format), usually labelled A, B, etc. This loads all atoms that have no alternative positions, but only the first one of those who have several.
 +
 +
== Loading only some models from multimodel files ==
 +
...

Revision as of 16:55, 19 October 2016

Loading part of the model using a filter

The use of load with the filter option will make Jmol to read the file and either load or discard each atom based on the provided criteria.

This is useful in general to reduce the data to be managed in Jmol, without the need for scripts that will hide part of it (a part that might reappear due to other script).

Rather than a documentation (see https://chemapps.stolaf.edu/jmol/docs/#load and search for "filter "), this page is a collection of examples that illustrate the quite particular syntax of this command.

These apply to File icon.gifpdb and File icon.gifmmCif formatted files.

To avoid loading the water molecules

load "myfile.pdb" filter "![HOH]"

will work as long as the water groups are labelled HOH (which is the usual name in PDB database)

To load just chain A

load "myfile.pdb" filter "*:A"

To load just protein backbone

load "myfile.pdb" filter "*.CA"

This loads the alpha carbons, useful to reduce the load of very large models; Jmol will be able to render cartoons, ribbons or trace of such CA-only models and so provide a good representation, similar to the one obtained with the full model as long as you do not need details of the residues.

To load just protein and nucleic acid backbones

load "myfile.pdb" filter "*.CA,*.P"

Similar to the previous one but catering for nucleic acids together with proteins. As before, only the backbone atoms are loaded but that is enough for the schematic rendering.

To load only the first alternative conformation

load "myfile.pdb" filter "%A"

Some atoms in some models have alternative positions (the AltLoc field in the pdb format), usually labelled A, B, etc. This loads all atoms that have no alternative positions, but only the first one of those who have several.

Loading only some models from multimodel files

...

Contributors

AngelHerraez