Extended commands
VEGA can interpret commands with extended syntax that can be send trough the standard windows class port (OpenGL) and/or trough the TCP/IP. The syntax of each command is:
COMMAND_NAME ARG1 ARG2 ...
The command name can be in upper case or lower case and the number of arguments is tipical for each command. The arguments must be separated with one or more spaces. Like showed in the following table, an argument can be:
Type | Description |
BOOL | Boolean value (0 = false, 1 = true). |
CHAR | Character string. If it contains one or more spaces, you must use the double quotes " at the beginning and at the end of the string (e.g. "Hello World"). |
FLOAT | Floating point number with standard C syntax (the decimal separator must be a dot . and not a comma ,). |
UFLOAT | Unsigned float number. |
INT | Integer number. |
UINT | Unsigned integer number. |
MCHAR | Multiple selection string. The MCHAR argument must be a specific keyword (string). |
In order to interpret much easier the syntax of the commands present in this guide, for each argument is highlighted its type (BOOL, CHAR, INT, etc).
Standard commands
CHARGE (CHAR)Mode
It assigns the partial atomic charges using the specified Mode. At the present
time, the only supported mode is Gasteiger. For more inforamtion, click here.
e.g. CHARGE Gasteiger
FORCEFIELD (CHAR)Template
(BOOL)Quiet
It assigns the atom types using the specified Template. If Quiet is
true, no warning messages are showed if a problem was found during the force field
attribution. For more inforamtion, click here.
e.g. FORCEFIELD CVFF 1
GET (CHAR)Variable
The command GET returns the value of a specific internal variable. The argument name
is case-insensitive and the returned value is always a character string. The result can be
read from clipboard or from Result item of VGP_VEGAINFO structure if the
command is sent by a plugin (see plugin.h). SendVegaCmd retrives the result automatically
from the clipboard.
If you ar calling the GET command from a plugin, please use PLUGINGET instead of it.
Standard variables:
Variable | Type | Description |
CURLANG | CHAR | Current language for string translation. |
DATADIR | CHAR | Directory path of data files (e.g. templates, preferences, etc). |
ERRCODE | UINT | Last error code. |
ERRSTR | CHAR | Last error string. |
PRFLANG | CHAR | Language for string translation in prefs file. |
TOTATM | UINT | The total number of atoms of the current loaded molecule. |
TRJBESTENERGY | FLOAT | The energy of the best frame in the trajectory file. |
TRJBESTFRM | UINT | The number of the best frame. |
TRJCURFRM | UINT | The current frame number selected in the trajectory. |
TRJSIMTIME | UINT | Lenght (in ps) of the simulation. |
TRJSTARTTIME | UINT | Start time (ps) of the simulation. |
TRJTEMP | UINT | Simulation temperature (Kelvin). |
TRJTIMESTEP | UINT | Time step. |
TRJTOTFRM | UINT | Total number of frames in the trajectory. |
TRJWORSEENERGY | FLOAT | The energy of the worse frame in the trajectory file. |
TRJWORSEFRM | UINT | The number of the worse frame. |
VEGADIR | CHAR | Directory path where VEGA is installed. |
VERSION | CHAR | Full VEGA version. |
OpenGL variables:
Variable | Type | Description |
PORTNUM | UINT | Communication port number. |
ROTX | FLOAT | X rotation of the scene (degree). |
ROTY | FLOAT | Y rotation of the scene (degree). |
ROTZ | FLOAT | Z rotation of the scene (degree). |
SCALE | FLOAT | Visualization scale. |
TRANSX | FLOAT | X translation of the scene. |
TRANSY | FLOAT | Y translation of the scene. |
TRANSZ | FLOAT | Z translation of the scene. |
WINSIZEX | UINT | Width of the main window. |
WINSIZEY | UINT | Height of the main window. |
WINPOSX | UINT | X screen position of the main window. |
WINPOSY | UINT | Y screen position of the main window. |
MSGERRMODE (MCHAR)Mode
This command sets the Mode that VEGA uses to show an error message. The keywords
allowed, are:
Console | shows the errors in the console window (default for command line operation mode). |
Quiet | no errors are showed. |
Window | all errors are showed in a standard request window (default for OpenGL operation mode). |
e.g. MSGERRMODE Console
NEW
It cleans all objects, removing molecules, surfaces, selections, etc from the memory,
without to ask a confirm. Use mNew if you want that this operation must be confirmed.
e.g. NEW
OPEN (CHAR)File_Name
It opens a molecule and a trajectory file.
e.g. OPENMOL
"C:\Documents\Molecules\MyMolecule.pdb"
SAVE (CHAR)File_Name
(CHAR)Format (CHAR)Compression (BOOL)Connectivity
This command allows to save the current molecule in the file File_Name, using a
specific Format (see -f command line option), Compression
(NONE, BZIP2, GZIP, POWERPACKER, ZCOMPRESS) and Connectivity (0 no connectivity,
1 connectivity).
e.g. SAVEMOL MyMolecule.pdb PDB
BZIP2 1
TRJOPEN (CHAR)FileName
(BOOL)OpenDialog
It opens a trajectory file (FileName) and the analysys
dialog box if OpenDialog is 1 (true).
e.g. TRJOPEN "Simul.DCD" 1
TRJSEL (UINT)Number
Select the frame by number (0 < Number <= LastFrameNumber). The trajectory
must be opened with TRJOPEN command.
e.g. TRJSEL 25
TRJSELFIRST
Select the first frame of the trajectory. The trajectory must be opened with TRJOPEN
command.
TRJSELLAST
Select the last frame of the trajectory. The trajectory must be opened with TRJOPEN
command.
OpenGL commands
ANTIALIAS (BOOL)Mode
Enable/disable the anti-aliased visualization setting Mode to 1 or 0.
e.g. ANTIALIAS 1
COLOR (CHAR)Color
Change the color of the current selection. The allowed colors are: black, white, red,
green, cyan, yellow, firebirck, magenta, pink, violet, ghostgray, gray, darkgray, orange,
darkgreen, blue, darkyellow, brown, skyblue, ghostpink, ghostgreen, ghostblue, ghostyellow
and sand.
e.g. COLOR Blue
COPY (MCHAR)Format
Copy the molecule into the clipboard using the specified Format: VEGA
(Molecular object), Bitmap, Biosym, Mol2, Mopac, PDB, PDBF, XYZ. To paste use the mPaste
menu command. For more information click here.
e.g. COPY Bitmap
CPKPROP (UINT)ShpereRes
(UINT)SphereScale (UINT)CylinderRes (FLOAT)CylinderRad
Change the CPK visualization properties: the sphere resolution (8 <= SphereRes
<= 24), the sphere scale (10 <= SphereScale <= 50), the cylinder
resolution (5 <= CylinderRes <= 20) and the cylinder radius (0.05 <= CylinderRad
<= 0.5).
e.g. CPKPROP 12 20 10 0.10 (default
settings)
DEPTHCUE (BOOL)Mode
If Mode is 1, the depthcue is enabled, otherwise if it's 0, the depthcue is
disabled.
e.g. DEPTHCUE 1
LIQPROP (UINT)SphereRes
(UINT)CylinderRes (FLOAT)CylinderRad
Change the liquorice visualization properties: the sphere resolution (8 <= SphereRes
<= 24), the cylinder resolution (5 <= CylinderRes <= 20) and the cylinder radius
(0.05 <= CylinderRad <= 0.5).
e.g. LIQPROP 12 10 0.20 (default settings)
PLUGINABOUT (CHAR)Plugin_Name
It shows the about information of the specified plugin.
e.g. PLUGINABOUT PowerNet
PLUGINCONFIG (CHAR)Plugin_Name
This command opens the confuration dialog of the plugin.
e.g. PLUGINCONFIG PowerNet
PLUGINCALL (CHAR)Plugin_Name
(UINT)Function_number
Call a plugin user function by function number (from 1 to 100).
PLUGINGET (CHAR)Variable
As the standard GET command, it returns the value of a specific internal variable,
but without using the interprocess comunication system (e.g. clipboard). It's strongly
racommended to use in the plugin code. For more information see the GET command.
PLUGINHELP (CHAR)Plugin_Name
Show the plugin help.
e.g. PLUGINHELP PowerNet
REFRESH
Force the refresh of the main window.
e.g. RERESH
ROTATE (FLOAT)X
(FLOAT)Y (FLOAT)Z
Rotate the object around X, Y and Z axis.
e.g. ROTATE 90 45.5 0
SELECT (CHAR)Selection
With this command it's possible to show/hide (see UNSELECT command) the atoms. The
Selection uses the following format:
ATOM_NAME:RESIDUE_NAME:RESIDUE_NUMBER:CHAIN_ID
Each argument of the selection is optional and the
max lenght of each field is four characters for the ATOM_NAME, RESIDUE_NAME,
RESIDUE_NUMBER and one character for the CHAIN_ID. The selection is case-sensitive and you
can use wildcards (?, *). The SELECT command can be used also to select by atom number.
e.g.
SELECT H* | -> Select all hydrogens |
SELECT C*:ALA | -> Select all carbons of all alanines |
SELECT CA:*:*:B | -> Select all alpha carbon of the chain B |
SELECT *:VAL:? | -> Select all valines in the first 9 residues |
SELECT 10 | -> Select the atom number 10 |
SELRANGE (MCHAR)Mode
(UINT)Start (UINT)End
It allows to show/hide (see UNSELECTRANGE) an atom or residue range specifing the starting
and the ending atom/residue number.
e.g.
SELECTRANGE ATOM 45 101 | -> Show atoms from 45 to 101 |
SELECTRANGE RESIDUE 70 75 | -> Show residue from 70 to 75 |
TRANSLATE (FLOAT)X
(FLOAT)Y (FLOAT)Z
Translate the object along X, Y and Z axis.
e.g. TRANSLATE 90 45.5 0
TRJANIMPLAY
Start the animation playback.
e.g. TRJANIMPLAY
TRJANIMSET (UINT)Start
(UINT)End (BOOL)Loop
Set the animation range selecting the starting (Start) and the ending (End)
frames. If Loop is 1, the animation is played endlessly, otherwise if it's 0, the
animation is played only once.
e.g. TRJANIMSET 12 40 1
TRJANIMSPEED (UINT)Speed
(UINT)Skip
Set the trajectory animation speed (0 <= Speed <= 500) and the number of
frames to skip for each animation step (Skip >= 0).
e.g. TRJANIMSPEED 200 0
TRJANIMSTOP
Stop the animation playback.
e.g. TRJANIMSTOP
UNSELECT (CHAR)Selection
See SELECT command.
UNSELRANGE (MCHAR)Mode
(UINT)Start (UINT)End
See SELECTRANGE command.
VDWPROP (UINT)SphereRes
(UINT)DotSize
Change the VDW visualization properties: the sphere resolution (8 <= SphereRes
<= 24) and the size of the dots (1 <= DotSize <= 4).
e.g. VDWPROP 20 2
WIREPROP (UINT)Tickness
(BOOL)SmoothMode
Change the wireframe visualization properties: the line tickness (1 <= Tickness
<= 5) and the line color smoothing (1 = enabled, 0 = disabled).
ZCLIP (UINT)Value
This command set the Z clipping value (1 <= Value <= 300).
ZOOM (UINT)Factor
Set the zoom factor (Factor > 0).
FMod commands
These commands are the interface to the fmod library (Music and Sound effect system).
SONGPLAY (CHAR)FileName
It starts the playing of a music file (FileName) in MPEG layer 2/3, Wav (using
ACM codecs), WMA, ASF and RAW.
e.g. SONGPLAY "MyMusic.mp3"
SONGSTOP
Stop the playing.
e.g. SONGSTOP
SONGVOL (UINT)Volume
Set the volume from 0 to 255.
e.g. SONGVOL 128