Difference between revisions of "Selecting"

From Jmol
Jump to navigation Jump to search
(correction of syntax: AND needed before NOT)
(Atom expressions)
Line 6: Line 6:
 
= Atom expressions =
 
= Atom expressions =
 
In the reference the full list of [http://chemapps.stolaf.edu/jmol/docs/#atomexpressions atom expressions] can be found.
 
In the reference the full list of [http://chemapps.stolaf.edu/jmol/docs/#atomexpressions atom expressions] can be found.
 +
Common examples:
 +
 +
* [b]display *.CA[/b] displays all C-alpha atoms.
 +
* [b]select _C[/b] selects all carbon atoms, equivalent to [b]select *.C??[/b]
 +
* [b]select [ALA][/b] selects all atoms in ALA amino acids.
 +
* [b]display 1[/b], this will select the first amino acid residue and/or molecule. If a file contains various molecules, and they are all numbered starting from 1, this will select all first molecules or first residues of peptide strings.
 +
* [b]display 1:A[/b], if multiple chains are present, this will select residue 1 of chain A.
  
 
= Geometric expressions =
 
= Geometric expressions =

Revision as of 16:47, 12 September 2007

Jmol / JSmol Tutorials


Selecting can be done via atom expressions or based on topology or geometry. The selection expressions used in Jmol can be used for the "select" and the "display within" commands.

Atom expressions

In the reference the full list of atom expressions can be found. Common examples:

  • [b]display *.CA[/b] displays all C-alpha atoms.
  • [b]select _C[/b] selects all carbon atoms, equivalent to [b]select *.C??[/b]
  • [b]select [ALA][/b] selects all atoms in ALA amino acids.
  • [b]display 1[/b], this will select the first amino acid residue and/or molecule. If a file contains various molecules, and they are all numbered starting from 1, this will select all first molecules or first residues of peptide strings.
  • [b]display 1:A[/b], if multiple chains are present, this will select residue 1 of chain A.

Geometric expressions

Topology expressions

Some examples of using topologies as selection criteria: (check the reference for more options)

  • select molecule = 1 selects the first set of covalently bound atoms in the file.
  • select connected(3) selects all atoms that are connected by bonds to 3 other atoms.
  • select substructure("C(O)C") selects all ketone groups in the system. Any substructure strings in the SMILE format are accepted.

Combining selection statements

The combination of selection statements in Jmol is based on Boolean logic, using the statements And, Or, and Not, in a slightly different way than these are used in conversational language.

Example: We have a system consisting of water and a peptide chain. We are interested in selecting oxygen atoms. Let's call the set of atoms in the peptide chain A, and all oxygen atoms B.

Select A

Select A.jpg Selects all atoms in the peptide chain


Select A or B

Select A or B.jpg Selects all atoms in the peptide chain, and all oxygen atoms, including the oxygen atoms in the water molecules.


Select A and B

Select A and B.jpg Selects only the atoms that are both belonging to the peptide chain, and oxygen atoms. Therefore it selects only the oxygen atoms in the chain.

Select A and not B

Select A not B.jpg Selects the atoms in the peptide chain, but not the ones that are oxygen atoms.

Select (A or B ) and (not (A and B))

Select A or B and not A and B.jpg Selects all the peptide chain atoms and all the oxygen atoms, but not the oxygen atoms in the peptide chain.

Contributors

Pimpim, AngelHerraez