Endonuclease PvuII (1PVI) DNA - GATTACAGATTACA
CAP - Catabolite gene Activating Protein (1BER)
DNA - GATTACAGATTACAGATTACA Endonuclease PvuII bound to palindromic DNA recognition site CAGCTG (1PVI) DNA - GATTACAGATTACAGATTACA TBP - TATA box Binding Protein (1C9B)
CAP - Catabolite gene Activating Protein (1BER)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
GCN4 - leucine zipper transcription factor bound to palindromic DNA recognition site ATGAC(G)TCAT (1YSA)
TBP - TATA box Binding Protein (1C9B)
 

° 

Selections can be combined with explicit operators

In addition to the implicit logical ANDs and ORs, you can also combine selections with explicit operators. All operators have the same priority, and are evaluated from the left to the right. An explicit operator switches the selection type back to the final selection type, no matter what it was before the operator.

° 

The 'and', 'or' and 'not' operators perform logical operations

At some occasions, the implicit logical ANDs and ORs are not sufficient to express your selection. You can then also use them explicitly and add a 'not' to negate the entire selection block.

Examples:
ColorAtom !CA !CB,Blue
Color all blue (atoms which are not CA or not CB, which adds up to everything)
ColorAtom !CA and !CB,Blue
Color all except CA and CB atoms blue (solving the problem above)
ColorAtom not CA CB,Blue
Same as above. Take atoms called CA or CB and invert the selection.
DelAtom CA Res Lys or CB Res Arg
Delete CA atoms in Lys plus CB atoms in Arg (note that after the 'or', the selection type has been switched back to 'Atom' even though it was at 'Res' before the 'or')
DelAtom Protein and not CA Res Lys
Delete all protein atoms except CA in Lys

Note that the explicit 'and' (in contrast to the explicit 'or') performs an inflation before the actual operation:

ColorAtom CA and CB,Blue
Color nothing at all (no atom is called CA and CB at the same time)
ColorRes Atom CA and Atom CB,Blue
Color all residues with a CA and a CB atom blue

The same is true for the 'not'. It also inflates the current selection block before inverting:

DelRes Atom CA
Delete all residues that contain a Calpha atom
DelRes Atom !CA
Delete all residues that contain an atom which is not a Calpha (leave the Calpha only residues)
DelRes not Atom CA
Delete all residues that do not contain a Calpha atom (note how the selection of Calpha atoms has been inflated to cover entire residues before being inverted by the 'not')
DelMol not Res Lys
Delete all molecules that do not contain a Lys residue
DelMol not Res Lys Arg
Delete all molecules that contain neither a Lys nor an Arg residue
DelMol not Res Lys or not Res Arg
Delete all molecules that do not contain a Lys or do not contain an Arg residue
ShowAtom Res Lys 43 Mol A or Res Arg 55 Mol B and SideChain CA
Show side-chain plus CA atoms in residues Lys 43 (molecule A) and Arg 55 (molecule B)

° 

The 'with distance <>X from' operator measures distances between atoms

If you want to select items close to or far away from something (e.g. a ligand), this is the operator of choice. It keeps everything in the first selection that has the right distance X from the items in the second selection.

Examples:
ColorAtom CA with distance < 10 from Mol C,yellow
Color all CA atoms that are closer than 10 A to molecule C yellow
ColorRes Asp Glu with distance < 5 from Arg Lys,blue
Color all Asp or Glu residues blue, that have at least one atom closer than 5 A to an Arg or Lys residue
ListRes all with distance > 8 from ATP
List all residues that do not contain any atom closer than 8 A to an ATP residue
DelRes HOH Atom O with distance > 6 from Protein
Delete all water molecules whose oxygen atom is more than 6 A away from any protein

° 

The 'with minimum distance from' operator finds the closest atom

This operator keeps the one single atom in the first selection that is closest to the atoms in the second selection. This is very useful in connection with chemically equivalent hydrogens (which are not numbered in YASARA).

Example:


AddSpring OE1 Res Glu 30, HH1 Res Arg 10 with minimum distance from OE1 Res Glu 30, 2.0

This command adds a spring of length 2.0 A between the OE1 atom of Glu 30 and the closer of the two HH1 atoms in the side-chain of Arg 10, thereby fixing the hydrogen bond.

° 

The 'with maximum distance from' operator finds the most distant atom

This operator keeps the one single atom in the first selection that is the furthest away from the atoms in the second selection.

° 

The 'with <>X atoms closer Y among' operator counts close atoms

For every atom in the first selection, this operator counts the number of atoms in the second selection that are closer than Y Angstroms, compares it with X and keeps the atom if the result is true.

Examples:
DelRes HOH with < 5 atoms closer 4.5 among Protein
Delete all waters with less than 5 protein atoms closer than 4.5 Angstroms
DelRes Atom CA with 2 atoms closer 4 among Atom CA
Delete all residues whose CA atoms have 2 other CA atoms within 4 Angstroms

° 

The 'with <>X bonds to' operator analyzes bound atoms

This operator keeps those atoms in the first selection that make the specified number of bonds to atoms in the second selection.

Examples:
ShowAtom Element H with bond to Element !C
Show all polar hydrogens
HideAtom Element H with 1 bond to Element C
Hide all non-polar hydrogens
ColorAtom Element N with >2 bonds to Element H,red 
Color N-terminal and Lysine nitrogens red
DelAtom all with <4 bonds to all
Delete all atoms making less than four bonds

Note that bonds to metal ions are normally visualized as arrow cylinders, but not treated as real bonds and thus ignored by this operator.

° 

The 'with <>X bond angles to' operator analyzes second neighbor atoms

This operator keeps those atoms in the first selection that make the specified number of bond angles to atoms in the second selection.

Examples:
ShowAtom Element H with bond angle to Element H
Show hydrogens that have chemically equivalent partners bound to the same heavy atom
ShowAtom Element H with bond to Element C and with 1 bond angle to Element H
Show methylene hydrogens
ShowAtom Element H with bond to Element N and with 2 bond angles to Element H
Show hydrogens in positively charged amino groups and ammonia.

Note that bonds to metal ions are normally visualized as arrow cylinders, but not treated as real bonds and thus ignored by this operator.

° 

The 'with distance <>X from Y surface...' operator measures distances from a surface

Selecting atoms based on the distance from a surface is a convenient way of identifying for example those that are in the protein core. The calculation of accessible surface areas does not always give an optimal answer, because even residues pointing to the surface are often completely buried (e.g. a surface Alanine covered by the side-chain of another surface Arginine).

This operator keeps everything in the first selection that has the right distance X from the VdW, molecular or accessible surface(s) defined by the second selection. There are two alternative ways of defining the surface(s):

  • 'with distance <>X from Y surface of' builds the surface(s) for the atoms in the second selection considering the current surface environment.

  • 'with distance <>X from Y surface touched by' builds the surface(s) for the entire object and keeps only those surface(s) that have a contribution from one or more atoms in the second selection. Most proteins have more than one surface (the main surface plus some cavities), and this operator allows to pick one of these surfaces. More details can be found at the FirstSurfAtom command.

Periodic boundaries are ignored when calculating surface distances.

Examples:
ShowAtom all with distance < 5 from molecular surface of Obj 1
Show all atoms that are closer than 5 A to the molecular surface of object 1
ListRes Lys Arg Glu Asp with distance > 8 from accessible surface of all
List all charged residues that do not have any accessible surface closer than 8 A (FirstSurfAtom is required to also find those facing cavities)
CountAtom Element C with distance < 6 from VdW surface touched by 3456
Count the carbon atoms that are closer than 6 A from the Van der Waals surface touched by atom 3456

° 

The 'with contribution to X surface...' operator analyzes surface contributions

While every atom has a distance from a given surface , only a specific set of atoms actually contribute to this surface: those atoms with the shortest distance from a given point on the surface.

This operator keeps everything in the first selection that is also in the second selection and has the shortest distance from at least one point on the VdW, molecular or accessible surface(s) defined by the second selection. Again, there are two alternative ways of defining the surface(s):

  • 'with contribution to X surface of' builds the surface(s) for the atoms in the second selection considering the current surface environment.

  • 'with contribution to X surface touched by' builds the surface(s) for the entire object and keeps only those surface(s) that have a contribution from one or more atoms in the second selection. Most proteins have more than one surface (the main surface plus some cavities), and this operator allows to pick one of these surfaces. More details can be found at the FirstSurfAtom command.

To select the buried residues instead of the exposed ones, the operator can be inverted by using 'without contribution'.

Periodic boundaries are ignored when analyzing surface contributions.

Examples:
ListRes Lys with contribution to molecular surface of Obj 1
List all Lysines that contribute to the molecular surface(s) in object 1
CountAtom all with contribution to accessible surface touched by 3478
Count the number of atoms contributing to the same accessible surface(s) as atom 3478
ShowRes all with distance>12 from Lys 310 with contribution to accessible surface of protein
Show all residues that are more than 12 A away from Lys 310 and contribute to the accessible surface of the protein
ColorRes all without contribution to molecular surface touched by 1,yellow
Color all residues yellow that do not contribute to the molecular surface touched by residue 1

° 

The 'within sequence' operator selects within a given sequence

This operator keeps everything in the first selection that is part of the sequence given as the second selection.

Examples:
ColorRes Lys within sequence Asp Lys Arg,red
Color all lysines in the sequence Asp-Lys-Arg red.
ListRes all within sequence Glu Ala Phe
List all Glu, Ala and Phe residues that appear in a sequence.
ListAtom CB within sequence CB CG CD
List all Cbeta atoms that are followed by a Cgamma and a Cdelta.