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)
 

° 

Calls to YASARA commands must appear one per line

The most important part of any macro are the YASARA commands. Yanaconda is merely used to guide the control flow and call YASARA commands with the right parameters. Almost every example in this section used YASARA's 'Print' command to print results.

YASARA commands know which arguments to expect. E.g. the DelAtom command expects a selection. To save your time, selections are not enclosed by any quotes.


DelAtom CA

This will obviously delete all CA (=Calpha) atoms. Now let's put the atom name in a variable:


Name = 'CA'
DelAtom (Name)

Note that you must use an explicit evaluator so that (Name) is replaced with CA, otherwise YASARA would delete all atoms named 'Name'. If you look at previous examples, you can see that all Print commands that printed variables used explicit evaluators to insert the content of the variable. Otherwise just its name would have been printed.

You can of course also use variables for more complicated selections, e.g. for salt-bridges:


selection = 'Lys Atom NZ with distance < 4 from Asp Glu'
ShowRes (selection)
ColorRes (selection),blue

This brings us to the final golden rule for Yanaconda programmers:

ALWAYS USE EXPLICIT EVALUATORS AROUND YANACONDA EXPRESSIONS THAT APPEAR AS ARGUMENTS TO YASARA COMMANDS.

Some YASARA commands return values that can be assigned to variables. This example stores the X/Y/Z coordinates of atom 500 in three variables x,y and z:


x,y,z = PosAtom 500

If a command returns more results than variables present, the additional return values will be lost. In this case, the Y and Z coordinates are discarded:


x = PosAtom 500

It is also possible to put the return values in a list by appending two parentheses to the variable name:


pos() = PosAtom 500
Print X=(pos(1)) Y=(pos(2)) Z=(pos(3))

This feature is especially useful to store selections returned by the List command, e.g. the command ColorAtom CA,Red can be expressed as:


selection() = ListAtom CA
for atom in selection
  ColorAtom (atom),Red

If you want to know if a command returns something, look at the examples given for the command.