Load/Filter

From Jmol
Revision as of 10:48, 20 October 2016 by AngelHerraez (talk | contribs) (loading with filter)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Loading parts of a model file

Rather than a documentation, this page is a collection of ready-to-be-used examples that illustrate the quite particular syntax of this command. For details and explanation of the options visit https://chemapps.stolaf.edu/jmol/docs/#load and search for "filter ", or https://chemapps.stolaf.edu/jmol/docs/#loadmodels.

Loading part of the model using a filter

The use of load with the filter option will direct 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).

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, and only the first one (A) of those who have several.

Loading only some models from multimodel files

Multimodel files are typical of NMR results, holding alternative conformations of the whole protein.

Note that model numbers here refer to the order of models as found in the file, starting with 0, and typically will NOT match the model numbers indicated in PDB MODEL records (see farther below for this option).

To load only the first model:

load models ({0}) "myfile.pdb"

To load only the first and third models:

load models ({0 2}) "myfile.pdb"

To load only the 1st, 4th and 5th models:

load models ({0 3:4}) "myfile.pdb"

To load every other model (the odd ones: 1st, 3rd, etc.):

load models {0 -1 2} "myfile.pdb"

To load every other model (the even ones: 2nd, 4th, etc.):

load models {1 -1 2} "myfile.pdb"


To load just one model according to its number indicated in PDB MODEL records:

load "myfile.pdb" 2

that will load the MODEL 2 record

Contributors

AngelHerraez