ViTO macro language


ViTO has now a small macro language that can be used to create new coloration schemes and to create publication quality images.

The language is very simple and ressembles the Rasmol language. Single commands can be issued in the command entry at the bottom of the 3D panel or for more complicated macros that can be loaded or saved to files. The provided macro editor can deal with multiple macros. The macro panel is displayed in the next picture.


An example

The following macro can be used to color in red residus that are conserved within the colorization list and works on the structures that are selected in the alignment.

with selected;
select conserved;
color red;

The next creates a surface object, assuming that a structure named 1edo exist in the alignment (it doesn't need to be selected)

with 1edo;
select *;
color cpk;
surface topquality;

As you can see, macros begin with "with .. " which identify the list of structures to work with. The syntax of the commands enclosed is very similar to Rasmol except that each line must be terminated by a ";" character.


Detailed description of commands







Commands that change the color of objects:


Selection command and syntax


Customization commands


Detailed description of selection patterns

ViTO has a powerful way to select atoms, very similar to Rasmol (which guided the design). Many extensions are provided using the alignments (selection according to the conservation rate of amino acids, ...) . Instead of giving a BNF description of the syntax, we will give examples.

select amino/hetero; select the amino acids or hetero groups.

select ILE; selects all isoleucine residus.

select ILE:34; select the 34 isoleucine;

select within(10.0, ILE:34); selects all atoms that fall at at less than 10.0 angstroms from isoleucine 34.

select 20,30; selects the residus from 20 to 30. (PDB numbers).

select selected and water; select water among the selected residus.

select selected or hetero; adds the hetero groups to the selection.

select not selected; inverts the selection.

select *; selects everything.

select 20,30:A; selects from 20 to 30 in chain A.


Combinations of this simple rules lead to powerful selection patterns. For example:

select within(7.0,ADP) and not hetero; will select amino acids around ADP.


Some selection expression deals with the alignment:

select conserved; will select those group which are conserved among the family defined with the "set colorization list" menu command.

select aligned; select the aligned residues.

select variability(80,100); will select residus whose conservation rate falls between 80 to 100% in the family.


These "alignment aware" selection commands are useful to map phylogenic information on the 3D structure. It is possible with simple macros to do what programs like consurf do.



Using the macro panel

ViTO has a build-in macro editor to create, load and save macros. The window looks like :

The file menu allows you to load or save macros or to create new macros. The currently created or loaded macros names are displayed in the left part of the window. In the second part the commands corresponding to the selected macro in the list are displayed.

Next to come

As you probably noticed, the language is very simple and cannot be considered as a programming language. There is no control structures, no way to define functions, and it is impossible to do any calculations. We are currently working to develop a full featured programming language. This is a work in progress but it won't be released before the next version of the program.


Examples of macros

As an example, we will give two macros that map phylogenic information onto the 3D structure. These macros can be readily used using the macro panel.

# highlighting conserved residus
with 1efn;
select not conserved;
shade 0.7;
select conserved;
sidechain 0.3;

This small macros makes the the conserved residues apparent. Note that line beginning with # are treated as comments.

A more complicated example :

with 1edo;
select *;
color white;
spacefill on;

select conserved;
color red;

select variability(80,99.99);
color orange;

select variablity( 50,79.99);
color yellow;

select variablity( 20,49.99);
color 1.0 1.0 0.5;

In this second example a color ramp is built which highlights the most selected areas in the 1edo structure.