Difference between revisions of "AtomSets"

From Jmol
Jump to navigation Jump to search
(By element names:)
(ammending definition of "solvent" to include "ions")
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
{{Jmol_Documentation_Sections}}
 
= Predefined Atom Sets =
 
= Predefined Atom Sets =
Jmol recognizes and uses several ''keywords'' or ''tokens'' for several purposes: commands in the scripting language, colors, etc. Among them, there are keywords for predefined atom sets:
 
  
== By element names: ==
+
Jmol recognizes and uses several ''keywords'' or ''tokens'' for several purposes: commands in the scripting language, colors, etc. Among them, there are keywords for predefined atom sets.
 +
 
 +
Please note that many of these keywords only apply to file formats that specify a residue ID or group ID as part of the information for each atom (most typically, <code>pdb</code> and <code>mmcif</code> formats, designed for macromolecules).
 +
 
 +
:''Technical note'': most of these are set in [http://jmol.svn.sourceforge.net/viewvc/jmol/trunk/Jmol/src/org/jmol/viewer/JmolConstants.java?view=markup src/org/jmol/viewer/JmolConstants.java]
 +
 
 +
== By element name ==
 
<tt>carbon</tt>, <tt>oxygen</tt>, <tt>hydrogen</tt>, <tt>sulphur</tt>, etc.
 
<tt>carbon</tt>, <tt>oxygen</tt>, <tt>hydrogen</tt>, <tt>sulphur</tt>, etc.
  
 
On Jmol 11, element symbol preceded by underscore can also be used: <tt>_C</tt>, <tt>_O</tt>, <tt>_H</tt>, <tt>_S</tt>, etc. Also, <tt>deuterium</tt> or  <tt>_D</tt>, and <tt>tritium</tt> or <tt>_T</tt>.
 
On Jmol 11, element symbol preceded by underscore can also be used: <tt>_C</tt>, <tt>_O</tt>, <tt>_H</tt>, <tt>_S</tt>, etc. Also, <tt>deuterium</tt> or  <tt>_D</tt>, and <tt>tritium</tt> or <tt>_T</tt>.
  
On PDB format, Jmol will identify the element from columns 77-78 (element symbol, right-justified). If this is absent, then it will interpret the "aton name" field (columns 13-14) to deduce the element identity.
+
On PDB format, Jmol will identify the element from columns 77-78 (element symbol, right-justified). If this is absent, then it will interpret the "atom name" field (columns 13-14) to deduce the element identity.
 +
 
 +
Note: Jmol 10.2 has a bug by which it may read calcium as alpha carbon based on its ID, although identification by element name works properly. It's been fixed for Jmol 11.
 +
 
 +
== By type of element ==
 +
:''(new in Jmol 14.6)''
 +
* <tt>nonMetal</tt>: H; B; C, Si; N, P, As; O, S, Se, Te; F, Cl, Br, I, At; noble gases
 +
* <tt>metal</tt>: all except <tt>nonMetal</tt>
 +
* <tt>metalloid</tt>: B, Si, Ge, As, Sb, Te ''(note it overlaps with both metal and metalloid)''
 +
* <tt>alkaliMetal</tt>: from Li down to Fr
 +
* <tt>alkalineEarth</tt>: from Be down to Ra
 +
* <tt>nobleGas</tt> from He down to Rn
 +
* <tt>transitionMetal</tt>: from Sc to Zn, from Y to Cd, from Hf to Hg, from Rf to Cn
 +
* <tt>lanthanide</tt>: La, from Ce to Lu
 +
* <tt>actinide</tt>: Ac, from Th to Lr
 +
 
 +
== By type of molecule ==
 +
* <tt>amino</tt>
 +
: This is based only upon group name and has nothing to do with the actual atoms that make up the group.
 +
: This set is composed of all groups with one of these names: ALA, ARG, ASN, ASP, CYS, GLN, GLU, GLY, HIS, ILE, LEU, LYS, MET, PHE, PRO, SER, THR, TRP, TYR, VAL, ASX, GLX, UNK.
 +
: This will usually be the 20 canonical proteinogenic amino acids, plus ambiguous Asp/Asn (ASX), ambiguous Glu/Gln (GLX) and 'unknown' (UNK).
 +
 
 +
* <tt>protein</tt>
 +
: The 'protein' set in Jmol is based solely on the atoms that make up the group. It is independent of the group name and independent of whether the atoms are defined in ATOM records or HETATM records.
 +
: This has the advantage that modified groups and interesting things that are not amino acids can still be identified as part of the protein.
 +
: The atoms that make up the set are recognized by the names of the atoms.
 +
:* Case 1:
 +
:: If the group has 4 atoms named N, CA, C and (O or O1) and they are bonded in the correct order, then the group is considered protein.
 +
:* Case 2:
 +
:: If the group has exactly 1 atom whose name is CA then it is considered protein. The purpose of this is to pick up alpha-carbon-only models
 +
 
 +
* <tt>peptide</tt>
 +
: The 'peptide' set in Jmol matches a 'protein' that has between 2 and 12 residues.
 +
:: only Jmol 14.29.1 or later
 +
:: defined as <code>protein and within(chain,monomer>1) and not within(chain,monomer>12)</code>
 +
 
 +
* <tt>nucleic</tt>
 +
: A group is considered 'nucleic' if it contains atoms with all of these names: C3*, O3*, O5*, N1, C2, N3, C4, C5, C6 (asterisk may be substituted by prime/apostrophe). It is independent of the group name and independent of whether the atoms are defined in ATOM records or HETATM records.
 +
 
 +
* <tt>rna</tt>
 +
: A group is 'rna' if it is <tt>nucleic</tt> and it also contains an atom named O2* (or O2').
 +
 
 +
* <tt>dna</tt>
 +
: A group is 'dna' if it is <tt>nucleic</tt> and it '''does not''' contain an atom named O2* (or O2').
 +
 
 +
* <tt>carbohydrate</tt>
 +
: This is based only upon group name.
 +
: This set is composed of all groups which name is in a (not comprehensive) list corresponding to common mono-, di- and trisaccharides ([[AtomSets/Carbohydrate|full list and identities]]).
 +
 
 +
* <tt>water</tt>
 +
: Any molecule chemically interpreted as water (an oxygen atom connected to two hydrogen, deuterium or tritium atoms), plus groups named HOH, DOD, or WAT.
 +
:: The original implementation of this set was only the named groups.
 +
 
 +
* <tt>ions</tt>
 +
: This set is not what might seem, but it's just composed of groups named PO4 or SO4.
 +
:: ''Explanation'': Both are common ions in protein crystals for X-ray diffraction, and this special set (which is RasMol syntax) is kept for backward compatibility.
 +
 
 +
* <tt>solvent</tt>
 +
: This includes <tt>water</tt> (in its extended definition), UREA groups and also <tt>ions</tt> (PO4 and SO4 by their residue/group name in the pdb file).
 +
 
 +
* <tt>ligand</tt>
 +
:: ''Note: <code>ligand</code> will, in some occasions, '''not''' match what you expect.''
 +
: The new definition (Jmol 12.2) includes atoms that do not belong to protein, nucleic or water. As a consequence,
 +
:* <tt>ions</tt> and <tt>carbohydrate</tt> '''are''' considered <code>ligands</code>.
 +
:* <tt>water</tt> is '''not''' considered <code>ligands</code>.
 +
:* Nonstandard amino acids are '''''not''''' considered <code>ligands</code>.
 +
:* Nonstandard nucleotides are '''''not''''' considered <code>ligands</code>.
 +
:* Isolated nucleotides (e.g. ATP, GTP, AMP...) are '''''not''''' considered <code>ligands</code> (despite being understood by us as ligands; this is due to them being part of the <code>nucleic</code> atom set). To account for this, you may choose to use <code>polymer=0 and not water</code> instead of <code>ligand</code> ''(this works only in most recent versions like 14.3.12)''
 +
: Ligand was clasically defined as <tt>hetero</tt> and not <tt>solvent</tt> (and so not always what you would expect from the word ligand, either).
 +
 
 +
== By type of residue ==
 +
Inclusion in these sets is mostly determined by residue id (only as far as it is written in the adequate field in the molecular coordinate file, usually PDB format). A few cases are also included based on their chemical structure and the presence of a distinguishing atom name.
 +
 
 +
Residue IDs:
 +
* Nucleotides: <tt>A, G, C, T, U, DA, DG, DC, DT</tt> but also based on their chemical <tt>nucleic</tt> structure and certain atom names. <tt>tu</tt> gets thiouridine.
 +
* Amino acids: the 3-letter standard abbreviation
 +
 
 +
Residue sets:
 +
* Nucleotides: <tt>purine, pyrimidine, at, cg</tt>
 +
* Amino acids:
 +
** <tt>acyclic, cyclic, aliphatic, aromatic</tt>
 +
** <tt>large (Arg,Glu,Gln,His,Ile,Leu,Lys,Met,Phe,Trp,Tyr), medium (Asn,Asp,Cys,Pro,Thr,Val), small (Ala,Gly,Ser)</tt>
 +
** <tt>polar, nonpolar, hydrophobic (Ala,Gly,Ile,Leu,Met,Phe,Pro,Trp,Tyr,Val), neutral, charged, acidic, negative, basic, positive,</tt> ...
 +
** <tt>buried (Ala,Cys,Ile,Leu,Met,Phe,Trp,Val), surface</tt>
 +
* <tt>hetero, carbohydrate, ions, ligand, water, solvent</tt> (see above)
  
Note: Jmol 10.2 has a bug by which it may read calcium as alpha carbon based on its ID, although identification by element name works properly.
+
== By structure of the polymer ==
 +
* <tt>helix, sheet, turn</tt>
 +
* <tt>bonded</tt>
  
== Parts in proteins: ==
+
== Parts in proteins ==
=== <tt>Backbone</tt> ===
+
=== <tt>Backbone</tt> or <tt>Mainchain</tt> ===
 
Inclusion in this set is determined by '''atom id'''*, as follows:
 
Inclusion in this set is determined by '''atom id'''*, as follows:
  
Line 23: Line 115:
  
 
(*)Note: on PDB format: '''atom id''' is called ''atom name'', and must be in these positions/columns:
 
(*)Note: on PDB format: '''atom id''' is called ''atom name'', and must be in these positions/columns:
* 13-14 : Chemical symbol, right justified, except for hydrogen atoms
+
:* 13-14 : Chemical symbol, right justified, except for hydrogen atoms
* 15 : Remoteness indicator (alphabetic); e.g., in amino acid residues, alpha = <tt>A</tt>, beta = <tt>B</tt>, gamma = <tt>G</tt>, delta = <tt>D</tt>, epsilon = <tt>E</tt>.
+
:* 15 : Remoteness indicator (alphabetic); e.g., in amino acid residues, alpha = <tt>A</tt>, beta = <tt>B</tt>, gamma = <tt>G</tt>, delta = <tt>D</tt>, epsilon = <tt>E</tt>.
* 16 : Branch designator (numeric).
+
:* 16 : Branch designator (numeric).
  
 
=== <tt>Sidechain</tt> ===
 
=== <tt>Sidechain</tt> ===
Line 33: Line 125:
 
A set defined by '''atom id''' <tt>CA</tt>.  
 
A set defined by '''atom id''' <tt>CA</tt>.  
  
== Parts in nucleic acids: ==
+
== Parts in nucleic acids ==
=== <tt>Backbone</tt> ===
+
=== <tt>Backbone</tt> or <tt>Mainchain</tt> ===
 
Inclusion in this set is determined by '''atom id'''*, as follows:
 
Inclusion in this set is determined by '''atom id'''*, as follows:
  
Line 45: Line 137:
 
** hydrogens attached to carbon ring: <tt>H1', 1H2', 2H2'</tt> (only DNA), <tt>H3', H4', 1H5'</tt> and <tt>2H5'</tt>
 
** hydrogens attached to carbon ring: <tt>H1', 1H2', 2H2'</tt> (only DNA), <tt>H3', H4', 1H5'</tt> and <tt>2H5'</tt>
 
** hydroxyls: <tt>O2', O3', O4', O5', 2HO'</tt> (H on 2'-hydroxyl, only RNA) (the ring oxygen is denoted <tt>O4</tt>, not <tt>O1</tt>).
 
** hydroxyls: <tt>O2', O3', O4', O5', 2HO'</tt> (H on 2'-hydroxyl, only RNA) (the ring oxygen is denoted <tt>O4</tt>, not <tt>O1</tt>).
 
+
: Note: old PDB files label pentose atoms with asterisk instead of prime signs. How does Jmol cope with this? Not much of a trouble: given the asterisk is a wildcard, "<tt>select C3*</tt>" will get pentose carbons either labeled with prime or asterisk!.
<blockquote>Note: PDB files label pentose atoms with asterisk instead of prime signs. How does Jmol cope with this? Not much of a trouble: given the asterisk is a wildcard, "<tt>select C3*</tt>" will get pentose carbons either labeled with prime or asterisk!.
 
</blockquote>
 
  
 
* Termini:
 
* Termini:
Line 54: Line 144:
 
** 3'-terminus hydrogen (on 3'-hydroxyl): <tt>H3T</tt>
 
** 3'-terminus hydrogen (on 3'-hydroxyl): <tt>H3T</tt>
  
* Atoms in bases:
+
* Atoms in bases (excluded from <tt>backbone</tt>):
 
** ring, both purines and pyrimidines: <tt>N1, C2, N3, C4, C5, C6</tt>
 
** ring, both purines and pyrimidines: <tt>N1, C2, N3, C4, C5, C6</tt>
 
** ring, purines: <tt>N7, C8, N9</tt>
 
** ring, purines: <tt>N7, C8, N9</tt>
Line 68: Line 158:
  
 
(*)Note: on PDB format, '''atom id''' is called ''atom name'', and must be in these positions/columns:
 
(*)Note: on PDB format, '''atom id''' is called ''atom name'', and must be in these positions/columns:
* 13-14 : Chemical symbol, right justified, except for hydrogen atoms
+
:* 13-14 : Chemical symbol, right justified, except for hydrogen atoms
* 15 : Remoteness indicator (alphabetic).
+
:* 15 : Remoteness indicator (alphabetic).
* 16 : Branch designator (numeric).
+
:* 16 : Branch designator (numeric).
  
 
=== Sidechain ===
 
=== Sidechain ===
Line 76: Line 166:
  
 
=== Bases ===
 
=== Bases ===
Synonim of <tt>(nucleic and sidechain)</tt>.
+
Synonym of <tt>(nucleic and sidechain)</tt>.
  
== By type of molecule: ==
+
= User-defined Atom Sets =
<tt>protein, nucleic, dna, rna, water, solvent, ligand</tt>...
+
A set can be created, and assigned any group of atoms, by giving it a name, using
 +
'''define''' ''whatever_name'' ''atom_expression''
 +
Later, that set's name can be used as the predefined ones, in commands <code>select, restrict, display, hide</code>, etc.
  
== By type of residue: ==
+
You can also use [{{ScriptingDoc}}#jmolmath JmolScript variables] for this purpose.
Inclusion in this sets is determined by residue id (only as far as it is written in the adequate field in the molecular coordinate file, usually PDB format).
 
  
Residue IDs:
+
= Selecting atom sets from the pop-up menu =
* Nucleotides: <tt>A, G, C, T, U</tt>
+
See [[AtomSets/Popup Menu]].
* Amino acids: the 3-letter standard abbreviation
 
 
 
Residue sets:
 
* Nucleotides: <tt>purine, pyrimidine, at, cg</tt>
 
* Amino acids:
 
** <tt>acyclic, cyclic, aliphatic, aromatic</tt>
 
** <tt>large, medium, small</tt>
 
** <tt>polar, nonpolar, hydrophobic, neutral, charged, acidic, negative, basic, positive,</tt> ...
 
** <tt>buried, surface</tt>
 
* <tt>hetero, ions, ligand, water, solvent</tt>
 
 
 
== By structure of the polymer: ==
 
* <tt>amino, protein, nucleic</tt>
 
* <tt>helix, sheet, turn</tt>
 
* <tt>bonded</tt>
 

Latest revision as of 19:26, 6 September 2023

Jmol + JSmol Documentation

Predefined Atom Sets

Jmol recognizes and uses several keywords or tokens for several purposes: commands in the scripting language, colors, etc. Among them, there are keywords for predefined atom sets.

Please note that many of these keywords only apply to file formats that specify a residue ID or group ID as part of the information for each atom (most typically, pdb and mmcif formats, designed for macromolecules).

Technical note: most of these are set in src/org/jmol/viewer/JmolConstants.java

By element name

carbon, oxygen, hydrogen, sulphur, etc.

On Jmol 11, element symbol preceded by underscore can also be used: _C, _O, _H, _S, etc. Also, deuterium or _D, and tritium or _T.

On PDB format, Jmol will identify the element from columns 77-78 (element symbol, right-justified). If this is absent, then it will interpret the "atom name" field (columns 13-14) to deduce the element identity.

Note: Jmol 10.2 has a bug by which it may read calcium as alpha carbon based on its ID, although identification by element name works properly. It's been fixed for Jmol 11.

By type of element

(new in Jmol 14.6)
  • nonMetal: H; B; C, Si; N, P, As; O, S, Se, Te; F, Cl, Br, I, At; noble gases
  • metal: all except nonMetal
  • metalloid: B, Si, Ge, As, Sb, Te (note it overlaps with both metal and metalloid)
  • alkaliMetal: from Li down to Fr
  • alkalineEarth: from Be down to Ra
  • nobleGas from He down to Rn
  • transitionMetal: from Sc to Zn, from Y to Cd, from Hf to Hg, from Rf to Cn
  • lanthanide: La, from Ce to Lu
  • actinide: Ac, from Th to Lr

By type of molecule

  • amino
This is based only upon group name and has nothing to do with the actual atoms that make up the group.
This set is composed of all groups with one of these names: ALA, ARG, ASN, ASP, CYS, GLN, GLU, GLY, HIS, ILE, LEU, LYS, MET, PHE, PRO, SER, THR, TRP, TYR, VAL, ASX, GLX, UNK.
This will usually be the 20 canonical proteinogenic amino acids, plus ambiguous Asp/Asn (ASX), ambiguous Glu/Gln (GLX) and 'unknown' (UNK).
  • protein
The 'protein' set in Jmol is based solely on the atoms that make up the group. It is independent of the group name and independent of whether the atoms are defined in ATOM records or HETATM records.
This has the advantage that modified groups and interesting things that are not amino acids can still be identified as part of the protein.
The atoms that make up the set are recognized by the names of the atoms.
  • Case 1:
If the group has 4 atoms named N, CA, C and (O or O1) and they are bonded in the correct order, then the group is considered protein.
  • Case 2:
If the group has exactly 1 atom whose name is CA then it is considered protein. The purpose of this is to pick up alpha-carbon-only models
  • peptide
The 'peptide' set in Jmol matches a 'protein' that has between 2 and 12 residues.
only Jmol 14.29.1 or later
defined as protein and within(chain,monomer>1) and not within(chain,monomer>12)
  • nucleic
A group is considered 'nucleic' if it contains atoms with all of these names: C3*, O3*, O5*, N1, C2, N3, C4, C5, C6 (asterisk may be substituted by prime/apostrophe). It is independent of the group name and independent of whether the atoms are defined in ATOM records or HETATM records.
  • rna
A group is 'rna' if it is nucleic and it also contains an atom named O2* (or O2').
  • dna
A group is 'dna' if it is nucleic and it does not contain an atom named O2* (or O2').
  • carbohydrate
This is based only upon group name.
This set is composed of all groups which name is in a (not comprehensive) list corresponding to common mono-, di- and trisaccharides (full list and identities).
  • water
Any molecule chemically interpreted as water (an oxygen atom connected to two hydrogen, deuterium or tritium atoms), plus groups named HOH, DOD, or WAT.
The original implementation of this set was only the named groups.
  • ions
This set is not what might seem, but it's just composed of groups named PO4 or SO4.
Explanation: Both are common ions in protein crystals for X-ray diffraction, and this special set (which is RasMol syntax) is kept for backward compatibility.
  • solvent
This includes water (in its extended definition), UREA groups and also ions (PO4 and SO4 by their residue/group name in the pdb file).
  • ligand
Note: ligand will, in some occasions, not match what you expect.
The new definition (Jmol 12.2) includes atoms that do not belong to protein, nucleic or water. As a consequence,
  • ions and carbohydrate are considered ligands.
  • water is not considered ligands.
  • Nonstandard amino acids are not considered ligands.
  • Nonstandard nucleotides are not considered ligands.
  • Isolated nucleotides (e.g. ATP, GTP, AMP...) are not considered ligands (despite being understood by us as ligands; this is due to them being part of the nucleic atom set). To account for this, you may choose to use polymer=0 and not water instead of ligand (this works only in most recent versions like 14.3.12)
Ligand was clasically defined as hetero and not solvent (and so not always what you would expect from the word ligand, either).

By type of residue

Inclusion in these sets is mostly determined by residue id (only as far as it is written in the adequate field in the molecular coordinate file, usually PDB format). A few cases are also included based on their chemical structure and the presence of a distinguishing atom name.

Residue IDs:

  • Nucleotides: A, G, C, T, U, DA, DG, DC, DT but also based on their chemical nucleic structure and certain atom names. tu gets thiouridine.
  • Amino acids: the 3-letter standard abbreviation

Residue sets:

  • Nucleotides: purine, pyrimidine, at, cg
  • Amino acids:
    • acyclic, cyclic, aliphatic, aromatic
    • large (Arg,Glu,Gln,His,Ile,Leu,Lys,Met,Phe,Trp,Tyr), medium (Asn,Asp,Cys,Pro,Thr,Val), small (Ala,Gly,Ser)
    • polar, nonpolar, hydrophobic (Ala,Gly,Ile,Leu,Met,Phe,Pro,Trp,Tyr,Val), neutral, charged, acidic, negative, basic, positive, ...
    • buried (Ala,Cys,Ile,Leu,Met,Phe,Trp,Val), surface
  • hetero, carbohydrate, ions, ligand, water, solvent (see above)

By structure of the polymer

  • helix, sheet, turn
  • bonded

Parts in proteins

Backbone or Mainchain

Inclusion in this set is determined by atom id*, as follows:

  • Peptide bond: N, H (bound to N), CA (alpha carbon), HA (bound to CA), C (carbonyl carbon), O or O1 (bound to C)
  • In glycine, the two equivalent hydrogens are both in the backbone set: either H1 and 1HA or 1HA and 2HA.
  • Termini:
    • second carbonyl oxygen on C-terminus: OXT
    • terminal amino hydrogens: 1H, 2H, 3H

(*)Note: on PDB format: atom id is called atom name, and must be in these positions/columns:

  • 13-14 : Chemical symbol, right justified, except for hydrogen atoms
  • 15 : Remoteness indicator (alphabetic); e.g., in amino acid residues, alpha = A, beta = B, gamma = G, delta = D, epsilon = E.
  • 16 : Branch designator (numeric).

Sidechain

Defined as (not backbone).

Alpha

A set defined by atom id CA.

Parts in nucleic acids

Backbone or Mainchain

Inclusion in this set is determined by atom id*, as follows:

  • Phosphate groups:
    • phosphorus: P
    • oxygens bound to phosphorus: O1P, O2P
  • Atoms in pentose:
    • carbon ring: C1', C2', C3', C4', C5'
    • hydrogens attached to carbon ring: H1', 1H2', 2H2' (only DNA), H3', H4', 1H5' and 2H5'
    • hydroxyls: O2', O3', O4', O5', 2HO' (H on 2'-hydroxyl, only RNA) (the ring oxygen is denoted O4, not O1).
Note: old PDB files label pentose atoms with asterisk instead of prime signs. How does Jmol cope with this? Not much of a trouble: given the asterisk is a wildcard, "select C3*" will get pentose carbons either labeled with prime or asterisk!.
  • Termini:
    • 5'-terminus oxygen (no phosphate): O5T
    • 5'-terminus hydrogen (attached to O5T or O5'): H5T
    • 3'-terminus hydrogen (on 3'-hydroxyl): H3T
  • Atoms in bases (excluded from backbone):
    • ring, both purines and pyrimidines: N1, C2, N3, C4, C5, C6
    • ring, purines: N7, C8, N9
    • ring, pyrimidines: O2
    • substituents on ring:
      • in cytosine: N4
      • in guanine: N2
      • in adenine: N6
      • in thymine: C5M
      • in guanine and hypoxanthine: O6
      • in thymine and uracil: O4
      • in thiouracil: S4

(*)Note: on PDB format, atom id is called atom name, and must be in these positions/columns:

  • 13-14 : Chemical symbol, right justified, except for hydrogen atoms
  • 15 : Remoteness indicator (alphabetic).
  • 16 : Branch designator (numeric).

Sidechain

Defined as (not backbone).

Bases

Synonym of (nucleic and sidechain).

User-defined Atom Sets

A set can be created, and assigned any group of atoms, by giving it a name, using

define whatever_name atom_expression

Later, that set's name can be used as the predefined ones, in commands select, restrict, display, hide, etc.

You can also use JmolScript variables for this purpose.

Selecting atom sets from the pop-up menu

See AtomSets/Popup Menu.