10. Extended commands
VEGA can interpret commands with extended syntax that can be send trough the console window, the windows class port and the TCP/IP (PowerNet plugin). The syntax of these commands is:
COMMAND_NAME ARG1 ARG2 ...
The command name is case insensitive 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"). |
MCHAR | Multiple selection string. The MCHAR argument must be a specific keyword (string). |
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. |
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).
10.1 Command index
Command | Type | Description | ||
ANTIALIAS | Ogl | Enable/disable the anti-aliased visualization. | ||
CHARGE | Std | Assign the atomic partial charges. | ||
CHDIR | Std | Change the current directory. | ||
COLOR | Ogl | Change the color of the current selection. | ||
COLORIDDLG | Gen | Show the predefined color dialog box. | ||
COLORRGBDLG | Gen | Show the RGB color table. | ||
CONCLRHIST | Ogl | Clear the console command history buffer. | ||
CONCLS | Ogl | Clear the console line buffer. | ||
CONSAVE | Ogl | Save the console output. | ||
CONSET | Ogl | Set the console line buffer size and the command history size. | ||
CONWIN | Ogl | Change the position and the size of the console window. | ||
COPY | Ogl | Copy the molecule into the clipboard. | ||
CPKPROP | Ogl | Change the CPK visualization properties. | ||
DEPTHCUE | Ogl | Enable/disable the depthcueing. | ||
DIRDLG | Gen | Show the directory dialog box. | ||
ERRMSG | Std | Return the error description. | ||
FORCEFIELD | Std | Assigns the atom types. | ||
GET | Std | Get the value of a specific internal variable. | ||
LIQPROP | Ogl | Change the liquorice visualization properties. | ||
MAINWIN | Ogl | Change the position and the size of the main window. | ||
MESSAGEBOX | Gen | Show a message box. | ||
MINIED | Gen | Open the mini text editor. | ||
MOPAC | Ogl | Start a Mopac background calculation. | ||
MSGERRMODE | Std | Set the mode used to show an error message. | ||
MULTISELDLG | Gen | Show the multiselection dialog box. | ||
NEW | Std | Clean all objects. | ||
OPEN | Std | Open molecules/surface/ trajectory files. | ||
OPENDLG | Gen | Show the requester to open a file. | ||
PLUGINABOUT | Ogl | Show the plugin about information. | ||
PLUGINCALL | Ogl | Call a plugin user function. | ||
PLUGINCONFIG | Ogl | Open the plugin configuration dialog. | ||
PLUGINGET | Ogl | Get the value of a specific internal variable. | ||
PLUGINHELP | Ogl | Show the plugin help. | ||
REFRESH | Ogl | Force the main window refresh. | ||
ROTATE | Ogl | Rotate the active object. | ||
SAVE | Std | Save the molecule. | ||
SAVEDLG | Gen | Show the requester to save a file. | ||
SAVEIMG | Ogl | Save the current view as bitmap. | ||
SELECT | Ogl | Show the atoms. | ||
SELRANGE | Ogl | Show an atom or a residue range. | ||
SMARTMOVE | Ogl | Enable/disable the SmartMove operation. | ||
SMARTMOVEATM | Ogl | Change the atom threshold to auto enable the SmartMove. | ||
SONGPLAY | Fmod | Play a music file. | ||
SONGSTOP | Fmod | Stop the music. | ||
SONGVOL | Fmod | Set the music volume. | ||
SRFCALC | Std | Calculate and show the molecular surface. | ||
SRFCOLOR | Ogl | Change the surface color. | ||
SRFCOLORBY | Ogl | Color the surface by a specific method. | ||
SRFSAVE | Std | Save the molecular surface. | ||
STRINGBOX | Gen | Open the string dialog box. | ||
TEXT | Gen | Show a message in the console. | ||
TRANSLATE | Ogl | Translate the active object. | ||
TRJANIMPLAY | Ogl | Start the trajectory animation playback. | ||
TRJANIMSET | Ogl | Set the trajectory animation range. | ||
TRJANIMSPEED | Ogl | Set the trajectory animation speed. | ||
TRJANIMSTOP | Ogl | Stop the animation playback. | ||
TRJOPEN | Std | Open a trajectory file to analyze it. | ||
TRJSEL | Std | Select the trajectory frame by number. | ||
TRJSELFIRST | Std | Select the first frame of the trajectory. | ||
TRJSELLAST | Std | Select the last frame of the trajectory. | ||
UNSELECT | Ogl | Hide the atoms. | ||
UNSELRANGE | Ogl | Hide an atom range or a residue range. | ||
VDWPROP | Ogl | Change the VDW visualization properties. | ||
WIREPROP | Ogl | Change the wireframe visualization properties. | ||
ZCLIP | Ogl | Set the Z clipping. | ||
ZOOM | Ogl | Set the zoom factor. |
Fmod | = FMod commands. | |
Gen | = General purpuse commands. | |
Ogl | = OpenGL commands. | |
Std | = Standard commands. |
10.2 Standard commands
CHDIR (CHAR)Directory
Change the current directory. Use CURDIR variable to get it.
Parameters: | ||
Directory | New directory path. |
Return values:
Error code if it fails.
Example:
CHDIR "C:\My Documents\Molecules"
See also:
None.
CHARGE (CHAR)Method
Assign the atomic partial charges using the specified method. For more inforamtion, click here.
Parameters: | ||
Method | Method to assign the atomic partial charges. At the present time, the only supported method is Gasteiger. |
Return values:
Error code if it fails.
Example:
CHARGE Gasteiger
See also:
FORCEFIELD, mCalcCharge.
ERRMSG (UINT)ErrorCode
Return the error description (standard C format) from the error code.
Parameters: | ||
ErrorCode | .Error code. |
Return values:
Error string.
Example:
ERRMSG 201
See also:
MSGERRMODE.
FORCEFIELD (CHAR)Template (BOOL)Quiet
Assign the atom types using the specified template. For more inforamtion, click here.
Parameters: | ||
Template | Template name used to assign the atom types. | |
Quiet | If it's true (1), no warning messages are showed if a problem was found during the force field attribution. |
Return values:
Error code if it fails.
Example:
FORCEFIELD CVFF 1
See also:
CHARGE, mCalcCharge.
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 call the GET command from a plugin, please use PLUGINGET instead of it.
Standard variables:
Variable | Type | Description |
CPUFEATURES | INT | 32 bit integer containing the CPU features (only for x86 CPUs). |
CPUNAME | CHAR | Installed CPU name. |
CPUTYPE | CHAR | Type, family, model and stepping of the installed CPU (only for x86 CPUs). |
CPUVENDOR | CHAR | CPU vendor. |
CURDIR | CHAR | Current directory. |
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. |
OS | CHAR | Operating system (e.g. AmigaOS, Linux, Irix, Unix, Windows 95/98/ME, Windows NT/2000/XP). |
OSFAMILY | CHAR | Operating system family (e.g. amigaos, unix, windows). |
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 |
CONBUFSIZE | UINT | Console buffer size (lines). |
CONHISTSIZE | UINT | Max. number of commands stored in the history buffer. |
CONPOSX | UINT | X screen position of the console window. |
CONPOSY | UINT | Y screen position of the console window. |
CONSIZEX | UINT | Width of the console window. |
CONSIZEY | UINT | Height of the console window. |
CONVISIBLE | BOOL | True if the console is open. |
GLASSWIN | BOOL | True if the glass windows are enabled. |
ISRUNNING | BOOL | True if a background calculation is running (e.g. Mopac). |
MAINSIZEX | UINT | Width of the main window. |
MAINSIZEY | UINT | Height of the main window. |
MAINPOSX | UINT | X screen position of the main window. |
MAINPOSY | UINT | Y screen position of the main window. |
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. |
SCREENDEPTH | UINT | Screen depth in bit per pixel. |
SCREENX | UINT | Screen width. |
SCREENY | UINT | Screen height. |
TRANSX | FLOAT | X translation of the scene. |
TRANSY | FLOAT | Y translation of the scene. |
TRANSZ | FLOAT | Z translation of the scene. |
Return values:
The value of the specified variable.
Example:
GET TOTATM
See also:
PLUGINGET.
MSGERRMODE (MCHAR)Mode
This command sets the mode used by VEGA to show the error messages.
Parameters: | ||||
Mode | Error message mode. It can be: | |||
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). |
Return values:
Error code if it fails.
Example:
MSGERRMODE Console
See also:
ERRMSG.
NEW
It cleans all objects, removing molecules, surfaces, selections, etc from the memory,
without confirm. Use mNew if you want that this operation must be confirmed.
Parameters:
None.
Return values:
Error code if it fails.
Example:
NEW
See also:
OPEN, SAVE, mNew, mOpen, mSave.
OPEN (CHAR)FileName
Open a molecule or a surface or a trajectory file.
Parameters: | ||
FileName | File name of the object to load (molecule, surface, trajectory). |
Return values:
Error code if it fails.
Example:
OPENMOL "C:\Documents\Molecules\MyMolecule.pdb"
See also:
NEW, SAVE, mNew, mOpen, mSave.
SAVE (CHAR)FileName (CHAR)Format
(CHAR)Compression (BOOL)Connectivity
This command saves the current molecule or assembly.
Parameters: | ||
FileName | File name of the output molecule (the file extension is added automatically if not present). | |
Format | File format (see -f command line option). | |
Compression | Compression mode (NONE, BZIP2, GZIP, POWERPACKER, ZCOMPRESS). | |
Connectivity | If 1 (true) the connectivity is saved if the file format supports it. |
Return values:
Error code if it fails.
Example:
SAVEMOL MyMolecule.pdb PDB
BZIP2 1
See also:
NEW, OPEN, mNew, mOpen, mSave.
SRFCALC (MCHAR)SurfaceType (UFLOAT)ProbeRadius
(UINT)Density
Calculate and show (in OpenGL mode) the molecular surface. The MEP and ILM
calculations ignore the ProbeRadius and the MLP ignores both ProbeRadius
and Density.
Parameters: | ||
SurfaceType | Surface type (ILM, MEP, MLP, PSA and VDW). | |
ProbeRadius | Probe radius in Å. | |
Density | Dot density in Ų. |
Return values:
The command returns the total surface area in Ų, the surface diameter in Å,
the minum value and the maximum value of the calculated property. If the SurfaceType
is ILM, it returns the Virtual LogP value also, if the SurfaceType is PSA and it
returns the positive and the negative surface areas in Ų.
If it fails, the error code is returned.
Example:
SRFCALC PSA 1.4 20
See also:
OPEN, SRFCOLOR, SRFCOLORBY,
SRFSAVE, mOpen, mSrfCalc, mSrfColor, mSrfSave, mSrfRemove.
SRFSAVE (CHAR)FileName (MCHAR)Format
(CHAR)Compression
This command saves the surface.
Parameters: | ||
FileName | Output file name (the file extension is added automatically if not present). | |
Format | Surface format (INSIGHT, QUANTA, VrmlDotted, VrmlSolid). | |
Compression | Compression mode (NONE, BZIP2, GZIP, POWERPACKER, ZCOMPRESS) |
Return values:
Error code if it fails.
Example:
SRFSAVE "Molecules\MySurface" QUANTA NONE
See also:
OPEN, SRFCALC, SRFCOLOR,
SRFCOLORBY, mOpen, mSrfCalc, mSrfColor, mSrfSave, mSrfRemove.
TRJOPEN (CHAR)FileName (BOOL)OpenDialog
Open a trajectory file to analyze it.
Parameters: | ||
FileName | Trajectory file to analyze. | |
OpenDialog | If 1 (true), the analysys dialog box is opened. |
Return values:
Error code if it fails.
Example:
TRJOPEN "Simul.DCD" 1
See also:
OPEN, TRJSEL, TRJSELFIRST,
TRJSELLAST, TRJSELLAST, mOpen, mAnalysis.
TRJSEL (UINT)Number
Select the frame by number. The trajectory must be opened with TRJOPEN command.
Parameters: | ||
Number | Frame number .(0 < Number <= LastFrameNumber) |
Return values:
Error code if it fails.
Example:
TRJSEL 25
See also:
OPEN, TRJOPEN, TRJSELFIRST,
TRJSELLAST, TRJSELLAST, mOpen, mAnalysis.
TRJSELFIRST
Select the first frame of the trajectory. The trajectory must be opened with TRJOPEN
command.
Parameters:
None.
Return values:
Error code if it fails.
Example:
TRJSELFIRST
See also:
OPEN, TRJOPEN, TRJSEL, TRJSELLAST, TRJSELLAST, mOpen, mAnalysis.
TRJSELLAST
Select the last frame of the trajectory. The trajectory must be opened with TRJOPEN
command.
Parameters:
None.
Return values:
Error code if it fails.
Example:
TRJSELFIRST
See also:
OPEN, TRJOPEN, TRJSEL, TRJSELFIRST, mOpen, mAnalysis.
10.3 OpenGL commands
ANTIALIAS (BOOL)Mode
Enable/disable the anti-aliased visualization.
Parameters: | ||
Mode | 1 enables the antialiasing and 0 disables it. |
Return values:
Error code if it fails.
Example:
ANTIALIAS 1
See also:
DEPTHCUE, SMARTMOVE, mLight, mShowSettings.
COLOR (MCHAR)Color
Change the color of the current selection.
Parameters: | ||
Color | Color name: 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. |
Return values:
Error code if it fails.
Example:
COLOR Blue
See also:
mColorByAtom, mColorByChain, mColorByCharge, mColorByMol, mColorByRes, mColorSel.
CONCLRHIST
Clear the command history buffer of the console.
Parameters:
None.
Return values:
Error code if it fails.
Example:
CONCLRHIST
See also:
CONCLS, CONSET, CONSAVE,
CONWIN, mConsole.
CONCLS
Clear the console buffer.
Parameters:
None.
Return values:
Error code if it fails.
Example:
CONCLS
See also:
CONCLRHIST, CONSET, CONSAVE,
CONWIN, mConsole.
CONSAVE
(CHAR)FileName
Save the console output in a specified text file.
Parameters: | ||
FileName | Full path and file name of the output file. |
Return values:
Error code if it fails.
Example:
CONSAVE "C:\Temp\Output.txt"
See also:
CONCLRHIST, CONCLS, CONSET,
CONWIN, mConsole.
CONSET
(UINT)BufferSize (UINT)HistorySize
Allow to set the console buffer size (in lines) and the command history size.
Parameters: | ||
BufferSize | Output buffer size in lines (BufferSize > 20, default 200). |
|
HistorySize | History size in number of commands (HistorySize > 0, default 20). |
Return values:
Error code if it fails.
Example:
CONSET 1000 40
See also:
CONCLRHIST, CONCLS, CONSAVE,
CONWIN, mConsole.
CONWIN
(UINT)PosX (UINT)PosY (UINT)SizeX
(UINT)SizeY
Change the position and the size of the console window.
Parameters: | ||
PosX | X position. |
|
PosY | Y position. | |
SizeX | Width. | |
SizeY | Height. |
Return values:
Error code if it fails.
Example:
CONWIN 0 0 640 300
See also:
CONCLRHIST, CONCLS, CONSAVE,
CONSET, mConsole.
COPY (MCHAR)Format
Copy the molecule into the clipboard using the specified format. To paste use the mPaste
menu command. For more information click here.
Parameters: | ||
Format | Clipborad format: VEGA (Molecular object), Bitmap, Biosym, Mol2, Mopac, PDB, PDBF, XYZ. |
Return values:
Error code if it fails.
Example:
COPY Bitmap
See also:
mCopy, mCopySpecial, mCut, mPaste.
CPKPROP (UINT)ShpereRes (UINT)SphereScale
(UINT)CylinderRes (FLOAT)CylinderRad
Change the CPK visualization properties.
Parameters: | ||
ShpereRes | Sphere resolution (8 <= SphereRes <= 24). |
|
SphereScale | Sphere scale (10 <= SphereScale <= 50). |
|
CylinderRes | Cylinder resolution (5 <= CylinderRes <= 20). |
|
CylinderRad | Cylinder radius (0.05 <= CylinderRad <= 0.5). |
Return values:
Error code if it fails.
Example:
CPKPROP 12 20 10 0.10
(default settings)
See also:
LIQPROP, VDWPROP, WIREPROP,
mShowSettings.
DEPTHCUE (BOOL)Mode
Enable/disable the depthcueing.
Parameters: | ||
Mode | If Mode is 1, the depthcue is enabled, otherwise if it's 0, the depthcue is disabled. |
Return values:
Error code if it fails.
Example:
DEPTHCUE 1
See also:
ANTIALIAS, SMARTMOVE, mLight, mShowSettings.
LIQPROP (UINT)SphereRes (UINT)CylinderRes
(FLOAT)CylinderRad
Change the liquorice visualization properties.
Parameters: | ||
SphereRes | Sphere resolution (8 <= SphereRes <= 24). | |
CylinderRes | Cylinder resolution (5 <= CylinderRes <= 20). | |
CylinderRad | Cylinder radius (0.05 <= CylinderRad <= 0.5). |
Return values:
Error code if it fails.
Example:
LIQPROP 12 10 0.20 (default settings)
See also:
CPKPROP, VDWPROP, WIREPROP,
mShowSettings.
MAINWIN
(UINT)PosX (UINT)PosY (UINT)SizeX
(UINT)SizeY
Change the position and the size of the main window.
Parameters: | ||
PosX | X position. |
|
PosY | Y position | |
SizeX | Width. | |
SizeY | Height. |
Return values:
Error code if it fails.
Example:
MAINWIN 0 0 500 300
See also:
None.
MOPAC (CHAR)FileName (CHAR)Keywords
Use this command to start a Mopac background calculation. To check if the calculation is
running, read the ISRUNNING variable.
Parameters: | ||
FileName | It's the full path file name of the input file that VEGA creates to start Mopac (the .dat extension is optional). | |
Keywords | Mopac keywords. If the CHARGE keyword isn't specified, VEGA calculates automatically the total charge and it adds this for you. |
Return values:
Error code if it fails.
Example:
MOPAC "C:\Molecules\a3" "AM1 CHARGE=0 PRECISE"
See also:
mCalcMoPac.
PLUGINABOUT (CHAR)PluginName
Show the about information of the specified plugin.
Parameters: | ||
PluginName | Name of the plugin. |
Return values:
Error code if it fails.
Example:
PLUGINABOUT PowerNet
See also:
PLUGINCONFIG, PLUGINCALL, PLUGINGET, PLUGINHELP.
PLUGINCALL (CHAR)PluginName (UINT)FunctionNumber
Call a plugin user function by function number.
Parameters: | ||
PluginName | Name of the plugin. | |
FunctionNumber | Function number (from 1 to 100). |
Return values:
Error code if it fails.
Example:
PLUGINCALL PowerNet 1
See also:
PLUGINABOUT, PLUGINCONFIG, PLUGINGET, PLUGINHELP.
PLUGINCONFIG (CHAR)PluginName
This command opens the plugin configuration dialog.
Parameters: | ||
PluginName | Name of the plugin. |
Return values:
Error code if it fails.
Example:
PLUGINCONFIG PowerNet
See also:
PLUGINABOUT, PLUGINCALL, PLUGINGET, PLUGINHELP.
PLUGINGET (CHAR)Variable
As the standard GET command, it returns the value of a specific internal variable,
but without using the interprocess communication system (e.g. clipboard). It's strongly
recommended to use in the plugin code. For more information see the GET command.
Parameters: | ||
Variable | Variable name.. |
Return values:
The value of the specified variable.
Example:
PLUGINGET CURLANG
See also:
GET.
PLUGINHELP (CHAR)PluginName
Show the plugin help.
Parameters: | ||
PluginName | Name of the plugin. |
Return values:
Error code if it fails.
Example:
PLUGINHELP PowerNet
See also:
PLUGINABOUT, PLUGINCALL, PLUGINCONFIG, PLUGINGET.
REFRESH
Force the main window refresh.
Parameters:
None.
Return values:
Error code if it fails.
Example:
RERESH
See also:
None.
ROTATE (FLOAT)X (FLOAT)Y (FLOAT)Z
Rotate the active object around X, Y and Z axis.
Parameters: | ||
X | X rotation (degree). | |
Y | Y rotation (degree). | |
Z | Z rotation (degree). |
Return values:
Error code if it fails.
Example:
ROTATE 90 45.5 0
SAVEIMG
(CHAR)FileName
Save the current view as bitmap file.
Parameters: | ||||||||||||||||||||||||
FileName | The name name of the output bitmap. Choose the appropriate extension to select the file format, according to OpenIL/DevIL specifications. | |||||||||||||||||||||||
|
Return values:
Error code if it fails.
Example:
SAVEIMG "C:\SnapShot.gif"
See also:
SAVE.
SELECT (CHAR)Selection
With this command it's possible to show/hide (see UNSELECT command) the atoms.
Parameters: | ||
Selection | 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. |
Return values:
Error code if it fails.
Examples:
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 |
See also:
SELRANGE, UNSELECT, UNSELRANGE, mSelectAll, mSelectCustom,
mSelectNone, mSelectInvert, mSelectBackbone, mSelectNoHyd, mSelectNoWater.
SELRANGE (MCHAR)Mode (UINT)Start
(UINT)End
Allows to show/hide (see UNSELECTRANGE) an atom or residue range specifing the starting
and the ending atom/residue number.
Parameters: | ||
Mode | Selection mode (ATOM, RESIDUE). | |
Start | Staring atom/residue number. | |
End | Endig atom/residue number. |
Return values:
Error code if it fails.
Examples:
SELRANGE ATOM 45 101 | -> Show atoms from 45 to 101 |
SELRANGE RESIDUE 70 75 | -> Show residue from 70 to 75 |
See also:
SELECT, UNSELECT, UNSELRANGE, mSelectAll, mSelectCustom,
mSelectNone, mSelectInvert, mSelectBackbone, mSelectNoHyd, mSelectNoWater.
SMARTMOVE
(BOOL)Mode
Enable/disable the SmartMove operation (see View
settings).
Parameters: | ||
Mode | If true (1), it enables the SmartMove, otherwise if false (0), it disables it. |
Return values:
Error code if it fails.
Example:
SMARTMOVE 0
See also:
ANTIALIAS, DEPTHCUE, SMARTMOVEATM, mLight, mShowSettings.
SMARTMOVEATM
(UINT)Atoms
Change the atom threshold to auto enable the SmartMove (see View settings).
Parameters: | ||
Atoms | Number of atoms. If it's null (0), the SmartMove is always active. |
Return values:
Error code if it fails.
Example:
SMARTMOVEATM 700
See also:
ANTIALIAS, DEPTHCUE, SMARTMOVE,
mLight, mShowSettings.
SRFCOLOR (UINT)Color
Change the surface color using the RGB format.
Parameters: | ||
Color | Color in RGB format (0 <= Color <= 16777215). |
Return values:
Error code if it fails.
Example:
SRFCOLOR 255
See also:
SRFCOLORBY, mSrfColor.
SRFCOLORBY (MCHAR)Method
This command colors the surface by a specific method.
Parameters: | ||
Method | Coloring method (ATOM or PROPERTY). |
Return values:
Error code if it fails.
Example:
SRFCOLOR PROPERTY
See also:
SRFCOLOR, mSrfColor.
TRANSLATE (FLOAT)X (FLOAT)Y (FLOAT)Z
Translate the active object along X, Y and Z axis.
Parameters: | ||
X | X translation. | |
Y | Y translation. | |
Z | Z translation. |
Return values:
Error code if it fails.
Example:
TRANSLATE 90 45.5 0
TRJANIMPLAY
Start the trajectory animation playback.
Parameters:
None.
Return values:
Error code if it fails.
Example:
TRJANIMPLAY
See also:
OPEN, TRJANIMSET, TRJANIMSPEED,
TRJANIMSTOP, TRJOPEN, TRJSEL,
TRJSELFIRST, TRJSELLAST, mOpen, mAnalysis.
TRJANIMSET (UINT)Start (UINT)End
(BOOL)Loop
Set the animation range.
Parameters: | ||
Start | Starting frame. | |
End | Ending frame. | |
Loop | If it's 1 (true), the animation is played endlessly, otherwise if it's 0 (false), the animation is played only once. |
Return values:
Error code if it fails.
Example:
TRJANIMSET 12 40 1
See also:
OPEN, TRJANIMPLAY, TRJANIMSPEED,
TRJANIMSTOP, TRJOPEN, TRJSEL,
TRJSELFIRST, TRJSELLAST, mOpen, mAnalysis.
TRJANIMSPEED (UINT)Speed (UINT)Skip
Set the trajectory animation speed and the number of frames to skip for each animation
step.
Parameters: | ||
Speed | Animation speed (0 <= Speed <= 500). | |
Skip | Number of frames to skip for each animation step (Skip >= 0). |
Return values:
Error code if it fails.
Example:
TRJANIMSPEED 200 0
See also:
OPEN, TRJANIMPLAY, TRJANIMSET,
TRJANIMSTOP, TRJOPEN, TRJSEL,
TRJSELFIRST, TRJSELLAST, mOpen, mAnalysis.
TRJANIMSTOP
Stop the animation playback.
Parameters:
None.
Return values:
Error code if it fails.
Example:
TRJANIMSTOP
See also:
OPEN, TRJANIMPLAY, TRJANIMSET,
TRJANIMSPEED, TRJOPEN, TRJSEL, TRJSELFIRST, TRJSELLAST,
mOpen, mAnalysis.
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.
Parameters: | ||
SphereRes | Sphere resolution (8 <= SphereRes <= 24). | |
DotSize | Dot size (1 <= DotSize <= 4). |
Return values:
Error code if it fails.
Example:
VDWPROP 20 2
See also:
CPKPROP, LIQPROP, WIREPROP,
mShowSettings.
WIREPROP (UINT)Tickness (BOOL)SmoothMode
Change the wireframe visualization properties.
Parameters: | ||
Tickness | Line tickness (1 <= Tickness <= 5). | |
SmoothMode | Line color smoothing (1 = enabled, 0 = disabled). |
Return values:
Error code if it fails.
Example:
WIREPROP 2 0
See also:
CPKPROP, LIQPROP, VDWPROP,
mShowSettings.
ZCLIP (UINT)Value
This command set the Z clipping.
Parameters: | ||
Value | Z clipping value (1 <= Value <= 300). |
Return values:
Error code if it fails.
Example:
ZCLIP 200
See also:
ANTIALIAS, DEPTHCUE, mShowSettings.
ZOOM (UINT)Factor
Set the zoom factor.
Parameters: | ||
Factor | zoom factor (Factor > 0). |
Return values:
Error code if it fails.
Example:
ZOOM 200
See also:
ROTATE, TRANSLATE, mShowSettings.
10.4 General purpose commands
COLORIDDLG (CHAR)Title
Show the predefined color dialog and return the VEGA color name.
Parameters: | ||
Title | The title of the dioalog box. |
Return values:
The return value is the VEGA color name (see COLOR for the color
names). If the dialog aborts, the NONE string is returned.
Example:
COLORIDDLG "Pick a color:"
See also:
COLOR, COLORRGBDLG, OPENDLG,
SAVEDLG, mColorSel.
COLORRGBDLG
Show the RGB color table and return the selected color in RGB format.
Parameters:
None.
Return values:
If the dialog is closed without the color selection, it returns -1, otherwise it returns
the selected color in RGB format.
Example:
COLORRGBDLG
See also:
COLOR, COLORIDDLG, OPENDLG,
SAVEDLG, mColorSel.
DIRDLG (CHAR)Message (CHAR)Path
Show the directory dialog box.
Parameters: | ||
Message | Message text showed in the main body of the dialog box. | |
Path | Starting directory path. |
Return values:
The return value is the full path of the selected directory. If the dialog aborts, a null
string is returned.
Example:
DIRDLG "Select a directory:" "C:\"
MESSAGEBOX (CHAR)Message (CHAR)Title
(INT)Type
This command creates and shows a message box, containing a title, a message and a
combination of predefined icons and buttons.
Parameters: | |||||||||||||||||||||||||||
Message | Message text showed in the main body of the message box. | ||||||||||||||||||||||||||
Title | Title of the message box. | ||||||||||||||||||||||||||
Type | It's a combination of flags like as the standard MessageBox() Windows function that can be combined through the "or" operator (or addition): |
||||||||||||||||||||||||||
|
Return values:
The return value is reported in the Result variable and can be one of the
following:
Result | Value | Description |
IDYES | 6 | Yes button was selected. |
IDNO | 7 | No button was selected. |
Example:
MESSAGEBOX "Do you want continue ?"
"ERROR" 36
See also:
MULTISELDLG, STRINGBOX, TEXT.
MINIED
(CHAR)FileName (CHAR)Title (INT)Flags
Open the mini text editor included in VEGA.
Parameters: | |||||||||||||||||
FileName | Text file to open. If it's null ("") a clean edit window is opened. | ||||||||||||||||
Title | Title of the editor window. It can be null (""). | ||||||||||||||||
Flags | Control flags that can be combined through the "or" operator (or addition): |
||||||||||||||||
|
Return values:
Error code if it fails.
Example:
MINIED "C:\My Documents\ReadMe.txt" "Read this
document" 12
See also:
None.
MULTISELDLG
(CHAR)Title (CHAR)Message (CHAR)Items
(CHAR)Button (UINT)Flags
Show the multiselection dialog box and return one or more choice.
Parameters: | ||||||||
Title | Title of the window. If it's null (""), the default title is showed. |
|||||||
Message | Message displayed at the window top. It can be null (""). |
|||||||
Items | Items showed in the main list. It's a string in
which each item is separated by the pipe character (|). |
|||||||
Button | It's the text showed in the button to confirm the operation. |
|||||||
Flags | Control flags that can be combined through the "or" operator (or addition): |
|||||||
|
Return values:
This function return the selected items indicating their identification number (1 for the
first item, 2 for the second and so on ...). If it aborts, a null string ("") is
returned (e.g. clicking the Cancel button or closing the window).
Example:
MULTISELDLG "My title" "Select one item"
"First|Second|Third" "Go !" 0
MULTISELDLG "My title" "Select one or more items"
"First|Second|Third" "Go !" 1
See also:
MESSAGEBOX, STRINGBOX.
OPENDLG
(CHAR)Title (CHAR)Path (CHAR)Filter
(INT)FilterIndex
Show the requester to open a file.
Parameters: | ||
Title | Dialog box title. | |
Path | Starting directory path. | |
Filter | String to filter the files that must be in the
following format:
If the filter if omitted ("") the default filter is used (All files (*.*)|*.*). |
|
FilterIndex | It's the predefined filter index used when the dialog is opened and it must be grater than 0. |
Return values:
This function return the selected file name with full path. If it aborts, a null string
("") is returned.
Example:
OPENDLG "Open file:" "C:\"
"Executables|*.com;*.exe|Batch files|*.bat" 2
SAVEDLG
(CHAR)Title (CHAR)Path (CHAR)Filter
(INT)FilterIndex
Show the requester to save a file.
Parameters: | ||
Title | Dialog box title. | |
Path | Starting directory path. | |
Filter | String to filter the files. See OPENDLG. |
|
FilterIndex | It's the predefined filter index used when the dialog is opened and it must be grater than 0. |
Return values:
This function return the selected filter index (for the file format) and file name with
full path. If it aborts, a null string ("") is returned.
Example:
SAVEDLG "Save file:" "C:\" "PDB (*.pdb)|*.pdb|Biosym
(*.car)|*.car" 1
STRINGBOX
(CHAR)Title (CHAR)Message (CHAR)Default
Open the string dialog box.
Parameters: | ||
Title | Dialog box title. If null, the default title is used. | |
Message | Message showed at the window top. It can be null (""). | |
Default | Default string placed in the editbox. |
Return values:
This function return the edited string. If it aborts, a null string ("") is
reported.
Example:
STRINGBOX "" "Put your name:" ""
See also:
MESSAGEBOX, MULTISELBOX.
TEXT (CHAR)Message (BOOL)NewLine
Show a message in the console.
Parameters: | ||
Message | Message text. | |
NewLine | If this flag is true (1), a line feed is automatically executed. Please remember that the console buffer is flushed only if a line feed is contained in the message string and thus, if you use this command with NewLine setted to false (0), the message is showed when the next print operation contains a line feed. |
Return values:
Error code if it fails.
Example:
TEXT "Hello World" 1
See also:
MESSAGEBOX.
10.5 FMod commands
These commands are the interface to the fmod library (Music and Sound Effect System). Include the file Scripts\Common\fmod.r for the REBOL definitions.
SONGPLAY (CHAR)FileName (UINT)Flags
Play a music file that can be in MPEG layer 2/3, Wav (using ACM codecs), WMA, ASF and RAW
format.
Parameters: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
FileName | File to play. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Flags | Fmod initialization flags.
|
Return values:
Error code if it fails.
Example:
SONGPLAY "MyMusic.mp3"
Parameters:
None.
Return values:
Error code if it fails.
Example:
SONGSTOP
SONGVOL (UINT)Volume
Set the volume.
Parameters: | ||
Volume | Play volume (0 <= Volume <= 255).. |
Return values:
Error code if it fails.
Example:
SONGVOL 128