| YASARA commands have a clearly defined format,
which the Commands section describes in more detail. You can type commands directly in the console
(press <SPACE> to enter, <RETURN> to leave). If the command involves a selection,
the usual format is:
<Verb><Final selection type> <Selection expression>, <Argument2>....
Example: In this case, 'Color' is the verb and 'Atom' the final selection type. Together they define the name of the command,
'ColorAtom'. Because 'Atom' extends the meaning of the basic 'Color' command, it is also called the
'command extension'. 'CA CB' is the selection expression
(the first argument to the command 'ColorAtom') and 'yellow' is the second argument. As commas
',' are used to separate command arguments, it is obvious that the selection expression must never contain commas
. You can use the selection types listed above to select
All, Objects,
Molecules, Residues and
Atoms. If you use All
, the selection expression is left out (so you start immediately with the argument). If you also leave out the final selection type,
All is assumed. Examples:
|
ColorAtom CA,Red
| Color all Calpha atoms red |
ColorRes Lys,Blue
| Color all lysine residues blue |
DelMol B
| Delete all molecules named
'B' |
SwitchObj 1crn,Off
| Switch object named 1crn off (hide it completely) |
ColorAll Green
| Color everything green, selection expression is left out |
Color Yellow
| Color everything yellow, final selection type and selection expression are omitted |
|
If you want to select a range of items,
separate the first and last item with a minus sign '-'. Examples:
|
ColorAtom 350-385,Red
| Color atoms with numbers 350 to 385 red |
ColorRes 30-40,Blue
| Search for a residue with number 30, then color all residues blue until residue number
40 in the same molecule |
ColorRes Lys 30-Asp 40,Blue
| Search for a residue named 'Lys 30', then color all residues blue until
'Asp 40' in the same molecule |
DelMol B-E
| Delete all molecules named 'B','C','D' or 'E' |
RemoveObj 4-6
| Remove objects 4, 5 and 6 from the soup |
|
If you specify more than one item of the same type,
you must separate them with a space, and YASARA implicitly treats this space as a logical OR.
Examples: |
ColorAtom 350 CA CB,Red
| Color atoms with number 350 or name CA or name CB red |
ColorRes Lys Arg His,Blue
| Color residues named Lys or Arg or His blue |
DelMol B E
| Delete all molecules named 'B' or 'E' |
RemoveObj 1 1crn
| Remove objects with number 1 or name 1crn from the soup |
|
It is easily possible to switch the selection type in the middle of a selection by including one of the
All, Obj, Mol, Res and Atom keywords. YASARA implicitly treats this change as a logical AND. Note that the
implicit OR has a higher priority than the implicit AND.
Examples: |
ColorAtom CA CB Res Lys Arg,Red
| Color atoms with name CA or CB and belonging to Lys or Arg residues red |
ColorRes Lys Mol A,Blue
| Color residues named Lys and belonging to molecule A blue |
DelMol B E Obj 5-6
| Delete all molecules named 'B' or 'E' and belonging to objects
5 or 6 |
DelMol B E Obj 5 Obj 6
| Same as above, since the second 'Obj' does not switch the selection type |
|
The final selection type
(the command extension) plays a special role, because it determines what you get at the end. Even if you switch to a smaller selection type,
your selection will be extended ('inflated') to the final type at the end.
Examples: |
ColorRes Atom 123,Blue
| Color the residue containing atom 123 blue (select atom 123 and inflate the selection to the entire residue) |
ColorRes Atom CA,Red
| Color residues with a CA atom red |
DelMol B E Res Lys
| Delete all molecules named 'B' or 'E' and containing a residue named Lys |
RemoveObj Res His
| Remove objects containing a His residue from the soup |
|
There are a number of selection types that you can only use as part of a selection,
but not as a command extension.
| You can select chemical elements by their one/two letter abbreviation,
their full name or their number in the periodic table. Examples:
|
ColorAtom Element H Carbon 8,Red
| Color atoms that are hydrogens or carbons or oxygens red |
DelAtom Element 1
| Delete all hydrogen atoms |
ColorRes Element S,Blue
| Color all residues containing a sulfur atom blue |
DelAtom Element C-O
| Delete all carbon, nitrogen and oxygen atoms |
|
After switching to the 'SecStr' selection type, use the keywords
'Strand', 'Helix', 'Turn' or 'Coil'. Examples: |
ColorRes SecStr Helix,Red
| Color all residues in a helix red |
ColorRes SecStr Turn Coil,Gray
| Color all residues in turn or coil gray |
DelMol SecStr Strand
| Delete all molecules that contain a strand |
|
The PDB format reserves four characters in columns 73-76 to specify a segment ID,
e.g. to distinguish the light and heavy chains in antibodies. In old PDB files,
the segment ID is often the same as the PDB ID. Examples:
|
ColorMol Segment HEAV, Green
| Color all molecules belonging to segment 'HEAV' green |
ListRestAtom Segment " A",Distance
| List all NMR distance restraints involving atoms in segment A |
|
Sometimes a bunch of atoms (mostly side-chains) can be seen at two or more distinct locations in the X-ray density map. These atoms are then present multiple times in the PDB file,
but with different 'alternate location (AltLoc) indicators'. The 'AltLoc' selection type allows to choose one of these multiple conformations.
Examples: |
DelAtom AltLoc B
| Delete all atoms with an alternate location indicator 'B' |
DelAtom AltLoc B-Z
| Delete all atoms with AltLoc indicators B to Z |
|
Contrary to the previous selection types,
these three do not require an actual selection afterwards. That's why they leave the selection type unaltered,
nevertheless they perform an implicit logical AND like all the others above.
Examples: |
DelMol NucAcid
| Delete all nucleic acid molecules |
DelAtom CA CB Protein
| Delete all atoms named CA or CB and belonging to a protein |
DelRes HetGroup
| Delete everything that is neither a protein nor a nucleic acid |
|
Everthing said for 'Protein', 'NucAcid' and
'HetGroup' also applies to these three. Note that the 'visible' selector looks at the atom visibilities set with
Show and Hide
, not at the object visibilities set with Switch
. Examples: |
|
ColorAtom Sidechain,Blue
| Color all side-chain atoms blue |
ColorAtom Res Glu Asp Backbone,Red
| Color the backbone of Glu or Asp residues red |
DelRes Sidechain
| Delete all residues with a side-chain (no glycines) |
ShowSurfAtom O Res HOH visible,VdW
| Show a Van der Waals surface for all visible water oxygens |
DelAtom !visible
| Delete all invisible atoms | |
|
Over the last decades, slightly different atom naming schemes have been introduced. For example YASARA and XPLOR name the terminal oxygens OT1 and OT2 to indicate their chemical equivalence,
while the PDB prefers O and OXT, and IUPAC suggests O' and O''. If you are working in NMR spectroscopy,
you are also used to the many problems associated with hydrogen nomenclature, which are
described in more detail here. The operators described here allow to change the current naming scheme when selecting atoms. The new scheme stays valid until the next change or the
next explicit operator. In the latter case,
it is changed back to YASARA's own default names. Examples:
|
ColorAtom PDB 1HB,blue
| Color the first of all equivalent beta-hydrogens blue |
ColorAtom XPLOR HB2,yellow
| Color all atoms whose XPLOR name is HB2 yellow |
DelAtom IUPAC HG3 PDB 1HB
| Delete atoms whose IUPAC name is HG3 plus those whose PDB name is
1HB |
DelAtom PDB OXT
| Delete all terminal oxygens |
ListAtom PDB 1HG and XPLOR HG2
| List the first of all gamma-methylene hydrogen pairs |
|
Sometimes it is helpful to select atoms by their position,
for example to slice a protein open and show only the back half. In YASARA, every atom has actually two positions,
first the position in the local coordinate system
of the object (which is specified in the PDB file), and second the position in the
global coordinate system of the screen. Like those in the previous sections,
the operators described here perform an implicit logical 'and'. Examples: |
HideAtom localX<0
| Hide atoms with an X-position < 0 in the local coordinate system |
ShowAtom localY>5 localZ<-10
| Show atoms with a local Y-position > 5 and a local Z-position
< -10 |
HideAtom globalY<0
| Hide atoms with a Y-position < 0 in the global coordinate system |
HideAtom globalX>0
| Hide atoms in the right half of the screen |
|
In addition to
coloring by BFactor
, Occupancy and Property value,
you can also use them to select atoms. Examples:
|
CountAtom BFactor>60
| Count the number of very flexible atoms |
DelAtom Occupancy<0.5
| Delete all atoms with an occupancy smaller than 50% |
HideAtom Property=0
| Hide all atoms whose property value is zero | |
|
The Charge selection operator sums up the net charge of each unit
(depending the current selection type) and selects those units that pass the comparison. If a force field has been
initialized, the force field charge
is used, otherwise YASARA resorts to the formal charge calculated from bond orders and standard atom valences.
Examples: |
ListAtom Charge<0
| List all atoms with a negative charge |
ColorRes Charge!=0,red
| Color all charged residues red |
ListRes Asp Glu Charge=0
| List all aspartates and glutamates that are neutral |
ColorObj Charge>0,yellow
| Color all objects with a positive net charge yellow |
|
|
An exclamation mark can be used to negate the name or number that follows immediately afterwards. Alternatively you can use the
'not' operator to negate an entire selection block.
Examples: |
ColorAtom !CA,Blue
| Color all except CA atoms blue |
DelRes !Glu
| Delete all residues exept Glu |
DelObj !5
| Delete all objects except 5 |
ColorAtom Element !C,Green
| Color all except carbon atoms green |
BallRes SecStr !Helix
| Display all residues outside helices as balls |
|
A question mark can be used specify ambiguous names.
Examples: |
ColorAtom NH?,Blue
| Color all atoms named NH1,NH2 etc. blue |
DelRes Gl?
| Delete all Glu or Gln residues |
DelObj 1crn??
| Delete all objects named 1crn01 till 1crn99 |
|
Occasionally, some names may contain characters that could lead to ambiguities when parsing the selection. In this case,
single (') or double (") quotes must be used to enclose the name. Examples: |
ColorAtom 'Cl-'-"H '",Blue
| Color the atom range from Cl- to H ' blue |
DelRes 'F-'
| Delete the residue named F- |
DelObj 'Module C'
| Delete all objects named Module C | |
|
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.  | 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) | |
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 | |
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. This operator keeps the one single atom in the first selection that is the furthest away from the atoms in the second selection.
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 | |
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 |
|
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. |
|
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.
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 | |
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'.
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 | |
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. |
|
|
If you look into a PDB file, atom names consist of four characters,
some of which are spaces. This creates some weird problems, like Calpha atoms being named
" CA " and calcium atoms being named "CA ". By typing the first character in uppercase and the second character in lowercase,
you tell YASARA that you want the latter, shifted form. So 'DelAtom CA' or 'DelAtom ca' deletes the Calpha atoms,
while 'DelAtom Ca' deletes the calciums. The second example involves the logical operators
'and' and 'or' which must always be lower case to distinguish them from residue or atom names.
Whenever you use the graphical interface,
you bump into mouse-driven selections. They usually start with a little pop-up menu asking whether you want to select
All, Objects,
Molecules, Residues or
Atoms. Here you pick your final selection type
. If you choose all, no further selection is required,
otherwise a window specific for your final selection type will appear.
Here is an example for the atom selection window:
 | | Figure: The atom selection window |
The list on the left allows you to select atoms sequentially. They are listed in order of increasing numbers. For every atom,
the list shows its name, and the residue, molecule and object the atom belongs to. Selecting multiple atoms works as usually: Press
<Ctrl>+<LeftButton> to (un)select more than one and <Shift>+<LeftButton> to
(un)select a range of atoms. The list in the middle allows to select atoms by name. In this example,
we picked 'CA'. Because the 'Negate' box below the list is checked, we select all except CA atoms.
The list on the right contains various properties to choose from. Here
'SecStr Helix' has been activated. At the bottom, there is the
'Manual selection' box, where you can extend your selection manually. Whatever you type there is connected with a logical AND to your selection.
(Unless you check the 'Or' button in the bottom left corner, then a logical OR is used).
All together, this selection now reads:
!CA SecStr Helix and Res 100-200
And, as explained in the previous sections, this expression selects all atoms that are not Calphas,
sit in a helix and belong to residues in the range 100 to 200. Another example: To show all residues closer than 5 A around a ligand
, you would click View > Show > Residue, select 'All' in the rightmost list and type the following in the manual selection box at the bottom:
'with distance<5 from Hetgroup'. See the help movie 'Molecular graphics' for more details.
If you are unsure how the things you pick are translated to a selection expression,
just try it, press OK, bring up the console with <SPACE> and see which expression YASARA created from your selection.
It is sometimes convenient to store selections under a certain set name to reuse them again later,
e.g. all residues that are in contact with a ligand. This can easily be achieved in a macro,
by defining the selection as a string:
MySet1 = 'all with Distance<5 from Res OUA'
MySet2 = 'Res Lys Arg'
# Show all atoms closer than 5 Angstrom to residue OUA
ShowAtom (MySet1)
# And color them yellow
ColorAtom (MySet1),yellow
# Style all lysine plus arginine side-chains as sticks.
StickAtom (MySet2)
The following selection examples have at least once helped YASARA users to get what they wanted:
|
ListRes Asp Glu Atom O with bond to Element H
| List all protonated Asp/Glu residues |
ListRes Tyr Atom OH with 0 bonds to Element H
| List all deprotonated tyrosines |
ListRes Arg Atom NH? with 1 bond to Element H
| List all neutral arginines |
ListRes Cys Element S with 1 bond to all
| List all negatively charged cysteines |
ListRes His Atom HD1 and Atom HE2
| List all protonated histidines |
ListRes not Atom HD1 or not Atom HE2 and His
| List all neutral histidines | |
|