11.2 Standard commands

These are the VEGA standard commands:

 

ADDHYDROG   (MCHAR)MolType   (MCHAR)HPos   (BOOL)IupacNames   (BOOL)ActiveOnly
Add the hydrogens to the molecule. If the hydrogens are already present, they will be removed before the adding procedure. 

Parameters:
MolType   

Molecule type. It must be GEN (generic organic), NA (nucleic acid) and PROT (protein).

HPos

Hydrogen position in the file. It must be HEAVYATM (the hydrogens are placed after each heavy atom) or RESEND (the hydrogens are placed at the end of each residue).

IupacNames

If it's true (1), IUPAC hydrogens name convention is used.

ActiveOnly

If it's true (1), the hydrogens are added to active (visible) atom only.

Return values:
The number of added hydrogens.

Example:
ADDHYDROG   GEN   RESEND   1   0

See also:
AddIons.


ADDIONS   (CHAR)Element   (INT)Charge   (UINT)Ions   (FLOAT)ExclAtomRad   (FLOAT)ExclIonRad   (FLOAT)GridStep   (FLOAT)BoxThick
With this command is possible to add one or more counter ions to the active molecule
. For more information about the method, please click here.

Parameters:
Element    Counter ion element (e.g. Na, K, Mg, Cl, etc).
Charge Ion charge (e.g. 1, 2, -1, etc).
Ions  Number of ions to add.
ExclAtomRad Atom-ion closest  distance.
ExclIonRad Ion/ion closest distance in order to reduce the electrostatic repulsion.
GridStep Grid step to build the grid used to place the ions.
BoxThick Box thickness surrounding the molecule.

Return values:
Error code if it fails.

Example:
ADDIONS   Na   1   5   6.5   11   0.5   10

See also:
AddHydrog.


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.


CPUFINDFILE   (CHAR)FileName
Check if the specified executable or DLL file exists and return a new file name if an executable with better performances is present. 

Parameters:
FileName   

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

Return values:
An empty string if the file doesn't exist or the executable file name optimized for the installed CPU.

Example:
CPUFINDFILE    BioDock.exe
If your system has got an AMD Athlon and the specific executable is installed, the command returns BioDock_k7.exe.

See also:
None.


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.
GRAPHID UINT The ID of the current Graph Editor window
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 Graph Editor window.
GRAPHPOSY UINT Y screen position of the Graph Editor window.
GRAPHSIZEX UINT Width of the Graph Editor window.
GRAPHSIZEY UINT Height of the Graph Editor window.
GRAPHTITLE CHAR Chart title.
GRAPHVISIBLE BOOL True if the Graph Editor is open (obsolete, only for backwards compatibility.
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.
WKSCURNUM UINT

Progressive number of the current workspace. 0 is the main workspace and it's always present.

WKSCURNAME CHAR Name of the current workspace.
WKSTOT UINT Number of the workspaces. It's at least greater or equal to 1.

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.


REMATOMS   (CHAR)Selection
Remove one or more atoms using the pattern matching.

Parameters:
Selection    It's the atom selection in standard VEGA format. For more information, see the SELECT command. Please remember that if you want remove a single atom, you can put the atom number only instead of the standard string selection.

Return values:
The number of the removed atoms.

Example:
REMATOMS     *:HOH

See also:
SELECT,
mRemoveHydrog, mRemoveInvisAtm, mRemoveWater.


SAVE   (CHAR)FileName   (CHAR)Format  (CHAR)Compression  (BOOL)Flags
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).
Flags Special flags that can be combined through the OR logical operator (or addition):
  
Flag Description
1 Save the connectivity.
2 Save the constraints if the file format supports them.

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.


Back to the command index