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 typical 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
ANGLE Ogl Measure the bond angle between three atoms.
ANTIALIAS Ogl Enable/disable the anti-aliased visualization.
BIODOCK Ogl Start a BioDock background calculation.
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 depth cueing.
DIRDLG Gen Show the directory dialog box.
DISTANCE Ogl Measure the distance between two atoms
ERRMSG Std Return the error description.
FORCEFIELD Std Assigns the atom types.
GET Std Get the value of a specific internal variable.
GRAPHADD Ogl Add a point value in the chart.
GRAPHCALC Ogl Calculate a statistical value.
GRAPHCLOSE Ogl Close the Graph Editor window.
GRAPHGET Ogl Get the point values.
GRAPHDELETE Ogl Delete a point.
GRAPHLABELX Ogl Set the X axis label.
GRAPHLABELY Ogl Set the Y axis label.
GRAPHLOAD Ogl Load the graph data file.
GRAPHNEW Ogl Clear all data in the chart.
GRAPHOPEN Ogl Open the Graph Editor window.
GRAPHSAVE Ogl Save the graph data into a file.
GRAPHSET Ogl Set the point values.
GRAPHTITLE Ogl Set the chart title.
GRAPHWIN Ogl Change the position and the size of the Graph Editor window.
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.
MERGE Std Merge the loaded molecule with one or more parts of another molecule.
MINIED Gen Open the mini text editor.
MONITORPOWER Ogl Change the monitor power status (CRT, Windows 9x only).
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.
PLANEANG Ogl Angle between two planes.
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.
TORSION Ogl Measure a torsion angle.
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.
TRJGRAPHENE Ogl Show the energy data in the Graph Editor.
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 wire frame visualization properties.
ZCLIP Ogl Set the Z clipping.
ZOOM Ogl Set the zoom factor.
   
Fmod    = FMod commands.
Gen = General purpose 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   (BOOL)ActiveOnly
Assign the atomic partial charges using the specified method.  For more information, click here.

Parameters:
Method   

Method to assign the atomic partial charges. At the present time, the only supported method is Gasteiger.

ActiveOnly

If it's true (1), the force field is assigned only to the active (visible) atoms. If it's false (0), the force field is assigned to all atoms (visible an invisible).

Return values:
Error code if it fails.

Example:
CHARGE    Gasteiger   0

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)ActiveOnly   (BOOL)Quiet
Assign the atom types using the specified template. For more information, click here.

Parameters:
Template   

Template name used to assign the atom types.

ActiveOnly

If it's true (1), the force field is assigned only to the active (visible) atoms. If it's false (0), the force field is assigned to all atoms (visible an invisible).

Quiet

If it's true, 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   0   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 retrieves 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.
CPUS UINT Number of the installed CPUs.
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.
TMPDIR CHAR Temporary directory.
TMPFILE CHAR Full path and file name to use as temporary file.
TOTACTATM UINT Total number of active (visible) atoms.
TOTATM UINT Total number of atoms of the current loaded molecule.
TOTMOL UINT Total number of molecules loaded un memory.
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 Length (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.
GLRENDERER CHAR OpenGL rendering subsystem (hardware/software).
GLVENDOR CHAR The vendor of the graphic card.
GLVERSION CHAR OpenGL subsystem version.
GRAPHLABELX CHAR X axis label.
GRAPHLABELY CHAR Y axis label.
GRAPHPOINTS UINT Number of the points in the current graph.
GRAPHPOSX UINT X screen position of the GraphEd window.
GRAPHPOSY UINT Y screen position of the GraphEd window.
GRAPHSIZEX UINT Width of the GraphEd window.
GRAPHSIZEY UINT Height of the GraphEd window.
GRAPHTITLE CHAR Chart title.
GRAPHVISIBLE BOOL True if the GraphEd is open.
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.


MERGE   (CHAR)FileName   (INT)Flags   (BOOL)ActiveOnly   (BOOL)Force
Merge the loaded molecule with one or more parts of another molecule. For more information click here.

Parameters:
FileName   

File name of the object to load (molecule, surface, trajectory).

Flags

This argument allows to specify the molecule fields/elements that are merged with the atoms already in memory. The following values can be combined through the "or" operator (or addition):

   
Value Description
1 Atom charges
2 Atom names
4 Atom types
8 Chain IDs
16 Connectivity
32 Atom constraints
64 Atomic coordinates
128 Atom elements
256 Molecule IDs
512 Residue names
1024 Residue numbers
2048 Segments
   
ActiveOnly

If it's true (1), it merges the molecule with the active (visible) atoms only, otherwise (false, 0) it merges the molecule with all atoms in memory.

Force

If it's true (1) and the molecules are different (but with the same number of atoms), the merging is forced.

Return values:
Error code if it fails.

Example:
MERGE     "C:\Documents\Molecules\MyMolecule.pdb"   10   0

See also:
NEW, SAVE, mMerge, mNew, mOpen, mSave.


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, MERGE, 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:
OPEN     "C:\Documents\Molecules\MyMolecule.pdb"

See also:
MERGE, NEW, SAVE, mMerge, 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:
SAVE    MyMolecule.pdb   PDB    BZIP2   1

See also:
MERGE, NEW, OPEN, mMerge, mNew, mOpen, mSave.


SRFCALC   (MCHAR)SurfaceType    (UFLOAT)ProbeRadius   (UINT)Density (BOOL)SelectedOnly
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 Ų.
SelectedOnly true (1), to consider the visible atoms only, false (0) to calculate the surface for all atoms.

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 (CSV, INSIGHT, QUANTA, Raw, 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 analysis 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

 

ANGLE   (CHAR)Atom1   (CHAR)Atom2   (CHAR)Atom3   (INT)Flags
Measure the bond angle between three atoms.

Parameters:
Atom1    Atoms defining the bond angle. See SELECT command for the correct syntax.
Atom2
Atom3
Flags Control flags that can be combined through the "or" operator (or addition):
   
Flag Value Description
MEAS_3DOBJ 1 Show the measure indicator in the main window.
MEAS_3DTXT 2 Show the measure value in the main window.
MEAS_CONTXT 4 Show the measure value in the console window.

Return values:
The command returns the measure value and if it fails, the error code is reported.

Example:
ANGLE    C1   C2   C3   7

See also:
DISTANCE, PLANEANG, SELECT, TORSION.


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:
DEPTHCUESMARTMOVE, mLight, mShowSettings.

 


BIODOCK   (CHAR)FileName
Use this command to start a BioDock background calculation. To check if the calculation is running, read the ISRUNNING variable.

Parameters:
FileName    the file name of the BioDock input file. The .bp extension can be omitted.

Return values:
Error code if it fails.

Example:
BIODOCK    "C:\My Documents\MyDocking.bp"

See also:
MOPAC.


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 depth cueing.

Parameters:
Mode    If Mode is 1, the depth cue 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.


DISTANCE   (CHAR)Atom1   (CHAR)Atom2   (INT)Flags
Measure the distance between two atoms.

Parameters:
Atom1    Atoms defining the bond. See SELECT command for the correct syntax.
Atom2
Flags Control flags that can be combined through the "or" operator (or addition):
   
Flag Value Description
MEAS_3DOBJ 1 Show the measure indicator in the main window.
MEAS_3DTXT 2 Show the measure value in the main window.
MEAS_CONTXT 4 Show the measure value in the console window.

Return values:
The command returns the measure value and if it fails, the error code is reported.

Examples:
DISTANCE    CA:ALA:25   O:ASP:42   0
DISTANCE    10   36   4

See also:
ANGLE, PLANEANG, SELECT, TORSION.


GRAPHADD    (FLOAT)XValue   (FLOAT)YValue
Add a point value in the chart.

Parameters:
XValue    X value.
YValue Y value.

Return values:
Error code if it fails.

Example:
GRAPHADD   1.5   0.25

See also:
GRAPHGET, GRAPHDELETE, GRAPHSET.


GRAPHCALC    (MCHAR)ClacType
Calculate a statistical value using the chart dataset.

Parameters:
ClacType    It's the keyword for the selection of the calculation type:
  
Keyword Description
AverageVal Average value.
MaxVal Maximum value.
MinVal Minimum value.
StdDev Standard deviation.

Return values:
This function returns the result of the requested calculation. If no data are present in the chart, the return value is zero

Example:
GRAPHCALC    StdDev

See also:
GRAPHGET, GRAPHWIN.


GRAPHCLOSE
Close the Graph Editor (GraphED) window.

Parameters:
None.

Return values:
Error code if it fails.

Example:
GRAPHCLOSE

See also:
GRAPHLOAD, GRAPHNEW, GRAPHOPEN, GRAPHSAVE, GRAPHWIN, mGraphEd.


GRAPHGET    (UINT)PointIndex
Get the point values.

Parameters:
PointIndex   

Point index (0< PointIndex < GraphPoints). To obtain the total number of points (GraphPoints), use GET or PLUGINGET commands.

Return values:
This function returns the X and Y floating point values separated by a space. If PointIndex exceeds the total number of points, no values are returned.

Example:
GRAPHGET    5

See also:
GRAPHADD, GRAPHDELETE, GRAPHSET.


GRAPHDELETE   (UINT)PointIndex
Delete a point.

Parameters:
PointIndex   

Point index (0< PointIndex < GraphPoints). To obtain the total number of points (GraphPoints), use GET or PLUGINGET commands.

Return values:
Error code if it fails.

Example:
GRAPHDELETE    3

See also:
GRAPHADD, GRAPHGET, GRAPHSET.


GRAPHLABELX   (CHAR)Label
Set the X axis label.

Parameters:
Title    X axis label.

Return values:
Error code if it fails.

Example:
GRAPHLABELX    "Time (ps)"

See also:
GRAPHLABELY, GRAPHTITLE, GRAPHWIN.


GRAPHLABELY   (CHAR)Label
Set the Y axis label.

Parameters:
Title    Y axis label.

Return values:
Error code if it fails.

Example:
GRAPHLABELY    "Energy (Kcal/mol)"

See also:
GRAPHLABELX, GRAPHTITLE, GRAPHWIN.


GRAPHLOAD    (CHAR)FileName
Load the graph data file.

Parameters:
FileName    Name of the file to load. The supported file formats are CHARMm (.ene) and comma separated value (.csv).

Return values:
Error code if it fails.

Example:
GRAPHLOAD    "MyGraph.csv"

See also:
GRAPHCLOSE, GRAPHNEW, GRAPHOPEN, GRAPHSAVE, mGraphEd.


GRAPHNEW
Clear all data in the chart.

Parameters:
None.

Return values:
Error code if it fails.

Example:
GRAPHNEW

See also:
GRAPHCLOSE, GRAPHLOAD, GRAPHOPEN, GRAPHSAVE, mGraphEd.


GRAPHOPEN    (UINT)Flags
Open the Graph Editor (GraphED) window.

Parameters:
Flags    Control flags:
  
Flag Value Description
GRAPHOPEN_CENTER

1

Center the window in the screen.

Return values:
Error code if it fails.

Example:
GRAPHOPEN    1

See also:
GRAPHCLOSE, GRAPHLOAD, GRAPHNEW, GRAPHSAVE, mGraphEd.


GRAPHSAVE    (CHAR)FileName   (MCHAR)Format   (CHAR)Compression
Save the graph data into a file.

Parameters:
FileName    Chart title.
Format Output format. The supported formats are:
  
Keyword Description
CSV Comma separated values.
PLT Quanta plot.
RAW Raw float format.
Compression Compression mode (NONE, BZIP2, GZIP, POWERPACKER, ZCOMPRESS).

Return values:
Error code if it fails.

Example:
GRAPHSAVE    "C:\My Documents\Graph.csv"   CSV   NONE

See also:
GRAPHCLOSE, GRAPHLOAD, GRAPHNEW, GRAPHOPEN, mGraphEd.


GRAPHSET    (UINT)PointIndex   (FLOAT)XValue    (FLOAT)YValue
Set/change the point values. To add a new point, use GRAPHADD command.

Parameters:
PointIndex   

Point index (0< PointIndex < GraphPoints). To obtain the total number of points (GraphPoints), use GET or PLUGINGET commands.

XValue X value.
YValue Y value.

Return values:
Error code if it fails.

Example:
GRAPHSET    5   3   4.34

See also:
GRAPHADD, GRAPHDELETE, GRAPHGET.


GRAPHTITLE   (CHAR)Title
Change the chart title.

Parameters:
Title    Chart title.

Return values:
Error code if it fails.

Example:
GRAPHTITLE    "This is my chart"

See also:
GRAPHLABELX, GRAPHLABELY, GRAPHWIN.


GRAPHWIN   (UINT)PosX   (UINT)PosY   (UINT)SizeX   (UINT)SizeY
Change the position and the size of the Graph Editor (GraphED)  window.

Parameters:
PosX   

X position.

PosY Y position.
SizeX Width.
SizeY Height.

Return values:
Error code if it fails.

Example:
GRAPHWIN   50 50 300 300

See also:
GRAPHCALC, GRAPHLABELX, GRAPHLABELY, GRAPHTITLE, mGraphEd.


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.


PLANEANG   (CHAR)Atom1   (CHAR)Atom2   (CHAR)Atom3   (CHAR)Atom4   (CHAR)Atom5   (CHAR)Atom6   (INT)Flags
Measure the angle between two plane defined by two triplets of atoms.

Parameters:
Atom1    Atoms defining the first plane. See SELECT command for the correct syntax.
Atom2
Atom3
Atom4 Atoms defining the second plane.
Atom5
Atom6
Flags Control flags that can be combined through the "or" operator (or addition):
   
Flag Value Description
MEAS_3DOBJ 1 Show the measure indicator in the main window.
MEAS_3DTXT 2 Show the measure value in the main window.
MEAS_CONTXT 4 Show the measure value in the console window.

Return values:
The command returns the measure value and if it fails, the error code is reported.

Example:
PLANEANG    C1   C3   C5   C29   C31   C33

See also:
ANGLE, DISTANCE, SELECT, TORSION.


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 inter-process 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

See also:
TRANSLATE, ZOOM.


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.
   
Extension Format
.bmp Windows Bitmap
.gif Compuserve GIF
.jpg JPEG
.oil OpenIL
.pcx ZSoft PCX
.pnm PNM
.raw Raw data
.sgi Silicon Graphics
.tga Targa
.tif Tiff

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:MOLECULE_MUMBER

Each argument of the selection is optional and the maximum length of each field is four characters for the ATOM_NAME, RESIDUE_NAME, RESIDUE_NUMBER, MOLECULE_MUMBER 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 specifying 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.


TORSION   (CHAR)Atom1   (CHAR)Atom2   (CHAR)Atom3   (CHAR)Atom4   (INT)Flags
Measure the torsion angle defined by four atoms.

Parameters:
Atom1    Atoms defining the torsion. See SELECT command for the correct syntax.
Atom2
Atom3
Atom4
Flags Control flags that can be combined through the "or" operator (or addition):
   
Flag Value Description
MEAS_3DOBJ 1 Show the measure indicator in the main window.
MEAS_3DTXT 2 Show the measure value in the main window.
MEAS_CONTXT 4 Show the measure value in the console window.

Return values:
The command returns the measure value and if it fails, the error code is reported.

Example:
TORSION    1   2   3   4

See also:
ANGLE, DISTANCE, SELECT, PLANEANG.


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

See also:
ROTATE, ZOOM.


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.


TRJGRAPHENE
Show the energy data in the Graph Editor if the energy values match the trajectory file.

Parameters:
None.

Return values:
Error code if it fails.

Example:
TRJGRAPHENE

See also:
OPEN, GRAPHCLOSE, TRJOPEN, 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)Thickness    (BOOL)SmoothMode
Change the wire frame visualization properties.

Parameters:
Thickness    Line thickness (1 <=  Thickness <= 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 dialog 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:\"

See also:
OPENDLG, SAVEDLG.


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):

  
Flag Value Description
MB_OK 0 The message box contains one push button: OK. This is the default.
MB_YESNO    4 The message box contains two push buttons: Yes and No.
MB_ICONQUESTION    32 A question-mark icon appears in the message box.
MB_ICONSTOP 16 A stop-sign icon appears in the message box.
MB_ICONERROR 16
MB_ICONHAND 16
MB_DEFBUTTON1 0 The first button is the default button.
MB_DEFBUTTON2 256 The second button is the default button.

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):

   
Flag Value Description
MINIED_ANSI 1

Force the character set conversion from Dos to ANSI-ISO, loading the file.

MINIED_READONLY 2

The text file is read-only and it can't be changed.

MINIED_SAVEAS 4 Enable the Save As menu item.
MINIED_OPENNEW 8 Enable Open and New menu items.

Return values:
Error code if it fails.

Example:
MINIED   "C:\My Documents\ReadMe.txt"   "Read this document" 12

See also:
None.


MONITORPOWER   (BOOL)Status
Change the monitor power status (CRT).

Parameters:
Status    If FALSE (0), the CRT goes to stand-by mode. otherwise if is TRUE (1), the CRT is switched on.

Return values:
Error code if it fails.

Example:
MONITORPOWER   0

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 (|).
Example: "First line|Second line|Third line"

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):

   
Flag Value Description
MULTISEL_MULTI 1

Allow to select more than one item.

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:

Description1
|Extension1a;Extension1b| ...

where Description is the filter description and Extensions are the filters (with wildcards) associated. Each field must be separated by the pipe character (|) and the semicolon (;) is required between the filter extensions.
Examples:

  • MSF File (*.msf)|*.msf

  • MSF File (*.msf)|*.msf|CRD File (*.crd)|*.crd

  • PDB File (*.pdb, *.ent)|*.pdb;*.ent

  • PDB File (*.pdb, *.ent)|*.pdb;*.ent|Mopac File (*.arc, *.dat)|*.arc;*.dat

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

See also:
DIRDLG, SAVEDLG.


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

See also:
DIRDLG, OPENDLG.


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 edit box.

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 set NewLine 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.
Flag Value Description
FSOUND_LOOP_OFF 1

For non looping samples.

FSOUND_LOOP_NORMAL 2

For forward looping samples.

FSOUND_LOOP_BIDI 4

For bidirectional looping samples. (no effect if in hardware).

FSOUND_8BITS 8

For 8 bit samples.

FSOUND_16BITS 16

For 16 bit samples.

FSOUND_MONO 32

For mono samples.

FSOUND_STEREO 64

For stereo samples.

FSOUND_UNSIGNED 128

For user created source data containing unsigned samples.

FSOUND_SIGNED 256

For user created source data containing signed data.

FSOUND_DELTA 512

For user created source data stored as delta values.

FSOUND_IT214 1024

For user created source data stored using IT214 compression.

FSOUND_IT215 2048

For user created source data stored using IT215 compression.

FSOUND_HW3D 4096

Attempts to make samples use 3d hardware acceleration. (if the card supports it).

FSOUND_2D 8192

Ignores any 3d processing. Overrides FSOUND_HW3D. Located in software.

FSOUND_STREAMABLE 16384

For a streamomg sound where you feed the data to it. If you dont supply this sound may come out corrupted. (only affects a3d output).

FSOUND_LOADMEMORY 32768

"name" will be interpreted as a pointer to data for streaming and samples.

FSOUND_LOADRAW 65536

Will ignore file format and treat as raw pcm.

FSOUND_MPEGACCURATE 131072

For FSOUND_Stream_OpenFile - for accurate FSOUND_Stream_GetLengthMs/FSOUND_Stream_SetTime. WARNING, see FSOUND_Stream_OpenFile for inital opening time performance issues.

FSOUND_FORCEMONO 262144

For forcing stereo streams and samples to be mono - needed if using FSOUND_HW3D and stereo data - incurs a small speed hit for streams.

FSOUND_HW2D 524288

2D hardware sounds. allows hardware specific effects.

FSOUND_ENABLEFX 1048576

Allows DX8 FX to be played back on a sound. Requires DirectX 8 - Note these sounds cannot be played more than once, be 8 bit, be less than a certain size, or have a changing frequency.

Return values:
Error code if it fails.

Example:
SONGPLAY    "MyMusic.mp3"

See also:
SONGSTOP, SONGVOL.


SONGSTOP
Stop the music.

Parameters:
None.

Return values:
Error code if it fails.

Example:
SONGSTOP

See also:
SONGPLAY, SONGVOL.


SONGVOL   (UINT)Volume
Set the volume.

Parameters:
Volume    Play volume (0 <= Volume <= 255)..

Return values:
Error code if it fails.

Example:
SONGVOL    128

See also:
SONGPLAY, SONGSTOP.