13.3 Included scripts

 

13.3.1 Introduction

The VEGA ZZ package includes some scripts placed in the Scripts directory with the following sub-directory structure:

Scripts
     _Templates (hidden folder)
  Ammp
  AutoDock
  Build
  Calculation
Color
  Common
  Communication
  Database
Examples
  File conversion
  Movie
Protein tools
Trajectory
Utilities

 

13.3.2 _Templates

This folder contains the templates used when a new script is created.

OpenGL.c 

Template for OpenGL C scripts.

Rebol.r  Template for REBOL scripts.
Stabdard.c Template for standard C scripts.
Window API.c Template window with Close button (Windows API version).
Window GraphApp.c Template window with Ok button (GraphApp GUI version).
Window GraphApp Calc.c Template window with Calculate button. Clicking this button, the main window is hided and the abort dialog is shown. Pressing its Abort button, the calculation is stopped. This script template requires the GarphApp GUI.

 

13.3.3 Ammp

The scripts contained in this directory, are useful to control some AMMP jobs in automatic way.

2D to 3D.c

Convert a structure from 2D to 3D, adding the hydrogens (if needed) and fixing the atom charges with the Gasteiger - Marsili methods if they aren't assigned. The procedure works in several steps:

  1. If needed, add the hydrogens with the more appropriate algorithm.

  2. Assign the atom charges.

  3. Send the molecule to AMMP.

  4. Gauss-Siedel distance geometry optimization (15 steps).

  5. Steepest descent energy minimization (50 steps, toler = 1).

  6. Conjugate gradients energy minimization (3000 steps, toler = 0.01).

  7. Send the resulting structure to VEGA ZZ.

Dipole.c

Compute the dipole momentum using AMMP. If the charges aren't assigned, they are fixed by the Gasteiger - Marsili method (see AMMP's DIPOLE command).

Interaction analysis.c

Evaluate the non-bond interaction energy between two molecules. This calculation requires two molecules in the workspace: the first one must be the receptor and the second one must be the ligand (see AMMP's ANALYZE command).

Neural network.c

Use the AMMP's Kohonen neural network to find the 3D space filling curve corresponding to the structure.  If the charges aren't assigned, they are fixed by the Gasteiger - Marsili method (see AMMP's KOHONEN command).

Rigid docking.c

Perform the genetic algorithm rigid docking using AMMP. This calculation requires two molecules in the workspace: the first one must be the receptor and the second one must be the ligand. This last molecule is moved to obtain the complex. Both molecules must have the hydrogens and the charges are automatically fixed (Gasteiger - Marsili method) if they are unassigned.
This script has a graphic user interface (provided by the GraphApp library) and to understand the meaning of each field, it's strongly recommended to read the GDOCK documentation.

 

13.3.4 AutoDock

These scripts allow to prepare the input files for AutoDock 4:

Box calc.c Calculate the box dimensions and its center coordinates containing the active (visible) atoms and show the results in the console. This script is useful to define a macromolecule region to dock ligands (e.g. by AutoDock Vina).
Ki calculator.c Evaluate the Ki and the interaction energy of a given ligand - receptor complex. This script is useful to recalculate the AutoDock 4 score after an energy minimization (e.g. performed by NAMD). This calculation requires two molecules in the workspace (the first one must be the receptor and the second one must be the ligand) and atom constraints defining the region in which the AutoDock 4 grid map is calculated. The free atoms only are considered to define this region.

Warning:
AutoGrid 4 and AutoGrid 4 executables must be installed in the VEGA ZZ installation directory. You can download the AutoDock package at http://autodock.scripps.edu.
GriDock for Windows must be installed.
You could find problems with UNC network path (e.g. \\myserver\my directory) because it's not fully supported by cygwin.dll library. For this reason, run AutoGrid saving the files on your local disk.
Ligand.c Prepare and save the current molecule as receptor for AutoDock 4, following these steps:
  1. If needed, add the hydrogens with the protein method.
  2. If required, assign the atom charges.

If the molecule has two dimensions only, the 2D to 3D conversion is performed as explained below:

  1. Send the molecule to AMMP.
  2. Gauss-Siedel distance geometry optimization (15 steps).
  3. Steepest descent energy minimization (50 steps, toler = 1).
  4. Conjugate gradients energy minimization (3000 steps, toler = 0.01).
  5. Send the resulting structure to VEGA ZZ.

These steps are performed for both 2D and 3D structures:

  1. Fix the atom types, applying the AutoDock force field.
  2. Remove the apolar hydrogens.
  3. Save the molecule in PDBQT format.
Receptor.r Prepare and save the current molecule as receptor for AutoDock 4, following these steps:
  1. If needed, add the hydrogens with the protein method.
  2. If required, assign the atom charges.
  3. Fix the atom types, applying the AutoDock force field.
  4. Remove the apolar hydrogens.
  5. Save the molecule in PDBQT format.
  6. Run AutoGrid4 to calculate the maps if the user confirms the operation. To do these last step, the file AutoGrid4.exe must be placed in the VEGA ZZ installation directory.

 

13.3.5 Build

With these scripts, it's possible to build complex structures:

Aromaticity fix.c Fix the bond order in aromatic rings, changing the single and double bonds to partial double bonds.
Coordinate transformation.c This script applies the specified transformation matrix to all atoms or to visible/active atoms only (see Active atoms only gadget). It's useful to build multimeric structures from the information included in the REMARK 300 and 350 tags of PDB files.
REMARK 300
REMARK 300 BIOMOLECULE: 1
REMARK 300 THIS ENTRY CONTAINS THE CRYSTALLOGRAPHIC ASYMMETRIC UNIT
REMARK 300 WHICH CONSISTS OF 2 CHAIN(S). SEE REMARK 350 FOR
REMARK 300 INFORMATION ON GENERATING THE BIOLOGICAL MOLECULE(S).
REMARK 350
REMARK 350 GENERATING THE BIOMOLECULE
REMARK 350 COORDINATES FOR A COMPLETE MULTIMER REPRESENTING THE KNOWN
REMARK 350 BIOLOGICALLY SIGNIFICANT OLIGOMERIZATION STATE OF THE
REMARK 350 MOLECULE CAN BE GENERATED BY APPLYING BIOMT TRANSFORMATIONS
REMARK 350 GIVEN BELOW.  BOTH NON-CRYSTALLOGRAPHIC AND
REMARK 350 CRYSTALLOGRAPHIC OPERATIONS ARE GIVEN.
REMARK 350
REMARK 350 BIOMOLECULE: 1
REMARK 350 APPLY THE FOLLOWING TO CHAINS: B, A
REMARK 350   BIOMT1   1  1.000000  0.000000  0.000000        0.00000
REMARK 350   BIOMT2   1  0.000000  1.000000  0.000000        0.00000
REMARK 350   BIOMT3   1  0.000000  0.000000  1.000000        0.00000
REMARK 350   BIOMT1   2 -1.000000  0.000000  0.000000      174.00000
REMARK 350   BIOMT2   2  0.000000 -1.000000  0.000000      174.00000            
REMARK 350   BIOMT3   2  0.000000  0.000000  1.000000        0.00000

To build this homodimeric macromolecule:

  • Open the original PDB file.
  • Run the Coordinate transformation script,
  • Put in the dialog window the values shown in red.
  • Click the Apply button.
  • Reopen the original PDB file in the same workspace of the transformed structure and click Append in the dialog window.
Graphite.r Create one or more graphite planes.
Nanotube.r

Generates single-walled carbon nanotube (SWCNT) structures. It's based on VBS code developed by Roberto G. A. Veiga at Instituto de Física - Universidade Federal de Uberlândia (UFU) - Brazil, using using the algorithm described in the work of White et al. (Phys. Rev. B, 1993, Vol. 47, No. 9, pp. 5485-5488).

Zero coord.c

Place the atoms at the specified coordinates. Checking Active atoms only, only the visible atoms are moved.

 

13.3.6 Calculation

This directory includes scripts for generic calculations:

Copy properties.c Copy some molecular properties to the clipboard in selective mode.
Druglikeness.c Check the druglikeness of the molecule in the current workspace. Two methods are used:

Lipinski's rule of five
This rule establishes that  an orally active drug must have:

  • not more than 5 hydrogen bond donors (nitrogen or oxygen atoms with one or more hydrogen atoms);
  • not more than 10 (2 x 5) hydrogen bond acceptors (nitrogen or oxygen atoms) ;
  • a molecular weight under 500 g/mol ;
  • a partition coefficient logP less than 5.

Ghose's rule
This rule establishes that  an orally active drug must have:

  • partition coefficient logP in -0.4 to 5.6 range;
  • molar refractivity from 40 to 130;
  • molecular weight from 160 to 480;
  • number of heavy atoms from 20 to 70.

The molecular refractivity is calculated according to the Ghose and Crippen method.

References:
Lipinski, C. A.; Lombardo, F.; Dominy, B. W.; Feeney, P. J.
"Experimental and computational approaches to estimate solubility and permeability in drug discovery and development settings"
AdV. Drug DeliVery ReV. 1997, 23,3-25.

Ghose, A. K.; Viswanadhan V. N.; Wendoloski, J.J.
"A Knowledge-Based Approach in Designing Combinatorial or Medicinal Chemistry Libraries for Drug Discovery. 1. A Qualitative and Quantitative Characterization of Known Drug Databases"
J. Comb. Chem. 1999, 1, 55 68.

Elecrostatic energy.c

Evaluate the electrostatic energy of the molecule in the current workspace. The default dielectric constant is 1 (vacuum).

Mopac.r  Perform multiple Mopac jobs for more than one molecule.

 

13.3.7 Color

Scripts to color the molecule:

Color RasMol.c Color the molecule using the RasMol color scheme.
Color VMD.c

Color the molecule using the VMD color scheme.

 

13.3.8 Common

This directory contains the initialization scripts to include in the REBOL scripts:

Fmod.r Fmod commands
Formats.r File format keywords and other definitions
Utils.r Functions for path manipulation
Vega.r VEGA ZZ interface (don't change it without any reason)
Vegadef.r Default settings used by Vega.r
Vutils.r REBOL/View utilities.

The C header files contained in this directory are hidden and they can't changed directly in the VEGA ZZ environment.

 

13.3.9 Communication

This directory includes communication and Internet-related scripts:

ActiveSync VRML send.c

Convert the molecule to VRML and send it to the mobile device (e.g. PocketPC) using Microsoft ActiveSync. The molecule can be shown using a pocket VRML viewer (e.g. Parallel Graphics Pocket Cortona). Due to the mobile device hardware limits, don't transfer molecules with complex representation. The script requires Microsoft ActiveSync and it works with all Windows versions.

E-mail PDB send.c Save the molecule in PDB format, compress it and attach it to a user-editable e-mail. This script uses the MAPI layer and so it's compatible with MAPI compliant e-mail clients only (e.g. Outlook, Outlook Express, etc). To change the output format or other settings, see the script source code.
Ftp put.r

Copy the molecule in the current workspace to a remote host via FTP.

IrDA VRML send.c

Convert the molecule to VRML and send it to the mobile device (e.g. PocketPC) over an infrared link. The molecule can be shown using a pocket VRML viewer (e.g. Parallel Graphics Pocket Cortona). Due to the mobile device hardware limits, don't transfer molecules with complex representation. The script requires Windows 2000 or XP or Server 2003.

Web server.r

Micro Web server for on-line manual.

 

13.3.10 Database

This directory includes scripts to manage the databases:

Database expander.r It's a REBOL/View script able to extract the molecules contained in a database into a directory specifying the file format, the compression and the save attributes (connectivity and constraints). 
Database logP.c Calculate the logP with the Testa's MLP method for each molecule in the database and export the results in a CSV (Output file). The input must be a 3D SDF or Zip database (Input database) and its structures can be pre-processed adding the hydrogens (Add the hydrogens) applying the geometry method (default) or the bond order method (Use bond order). This last method is recommended if the molecules has got the bond order correctly assigned. In the pre-processing phase, the structures can be optimized using the steepest descend (Steepest minimization) and/or the conjugate gradients (Conjugate minimization) methods. For both minimization algorithm, it's possible to put the number of iterations (Steps), the toler value (Toler) and the dielectric constant (Dielectric). Checking Update the graphic, the 3D graphic output is updated every 20 minimization steps. Increasing the Dot density value, it's possible to make a better prediction of the logP. A good value is from 10 to 50 dots for Å2.

Warning: even if in the theory it's possible to manage a 2D database, adding the hydrogens with the bond order method and optimizing the structures, this procedure is not recommended because the distance geometry optimization is not performed. For this reason, a better choice is the conversion of the database from 2D to 3D (see the Database 2D to 3D.c script) and the resulting database can be used without the pre-processing phase (e.g. hydrogens and optimization) to predict the logP values.

Database volume.c Calculate the volume of each molecule in the database. It have the same options of the Database logP.c script.
Database to 0D.c Convert a 2D or 3D database in a 0D SDF database, placing all atoms at the specified coordinates, usually at (0, 0, 0).
DrugBank SDF fix.c The DrugBank SDF files aren't standard because the header of each reacord has two lines only instead of three and the first line contains a tab character to delimit the molecule name from the DrugBank ID.
This script create a new file addinf _fix.sdf to the file name anf fixing the files adding the missing line, removig the tab character and the "SDF file of " string in the molecule name line.

 

13.3.11 Examples

This directory includes the example scripts:

Benzene.bat Build a benzene ring using the extended commands.
Benzene.c Same of above but written in C.
Benzene.htm Same of above but written in JavaScript.
Benzene.r Same of above but written in REBOL.
Command console.htm This script demonstrate how is possible to control VEGA ZZ through JavaScripts in a Html page.
Demo.bat Demo script.
Demo.r The same of the above, but written in REBOL.
Distances.r This REBOL script explains how to measure the interatomic distances.
Graph.r Demo of the extended commands to manage the plots.
GraphApp demo.r Demo of the GraphApp GUI library.
Info.r  Show some information in the VEGA ZZ console.
Meshload.r Load & display a 3D rabbit mesh model.
MP3 player.r Minimalist mp3 player (fmod demo).
Requesters.r Simple demo of the VEGA ZZ built-in requesters.
VEGA GL.c Application example of the VEGA GL commands.
View\VEGA ZZ toolbar.r Show a REBOL/View toolbar to control the VEGA ZZ main features.

 

13.3.12 File conversion

This directory includes scripts for file format conversion and exportation:

CSSR SOMFA export.c Export the current molecule in CSSR format readable by SOMFA.
CSV export.c Save the molecule in Comma Separated Values (CSV) format.
Format conversion.r 

This script converts all files placed in a directory using the specified file format/compression.

PDB ren export.c Export the molecule in PDB format renumbering the atoms.
XYZ import.c Import XYZ files giving the possibility to adapt the filter to each sub-format.

 

13.3.13 Movie

Scripts to create movies.

Movie maker.c This script generates a movie file starting from the molecule in the current workspace, rotating it around one or more axis. The parameters that the user can change are: Output movie (file name of the output movie), Number of frames (number of frames to put in the trajectory), X rotation (rotation in degrees around the X axis), Y rotation (rotation in degrees around the Y axis) and Z rotation (rotation in degrees around the Z axis).
Clicking the Animate, the movie will be created. The codec requester is shown to select the required compression options. Take care choosing the Render mode because not all graphic cards supports the Hardware mode. The Software rendering is the most reliable even if it's unable to reach the hardware quality.

 

13.3.14 Protein tools

This directory includes the visualization scripts:

Aminoacid selector.r

Show the aminoacid by selection and/or by chemical/physical properties.

Dump backbone torsions.c Dump the phi and psi backbone torsions of a protein.
Fasta to text.r

Convert a Fasta into a text file. That's is useful to load it into Microsoft Excel.

Fred2 scrore.c Calculate the interaction score of a ligand - protein complex using OpenEye Fred2 docking software. This calculation requires two molecules in the workspace: the first one must be the receptor and the second one must be the ligand. The scores extracted from Fred's outputs are: Chemgauss2, Chemscore, Plp, Screenscore, Shapegauus and Zapbind. The results are automatically copied to the clipboard.

Warning: This script requires Fred2 installed on your PC. You can request/buy it at http://www.eyesopen.com/

HIS protonantion.c

Find the histidine protonantion state (on NE2 or on ND1) using the CHARMM potential and swap the hydrogens (e.g. H-NE2 to H-ND1) according to the hydrogen bond energy. If the energy difference between the H-NE2 and H-ND1 tautomers is more than 2.0 Kcal/mol the hydrogen is placed on the nitrogen realizing a structure with lower hydrogen bonding energy. The starting structure must contain the hydrogens.

Move hydrogens to end.c

Move the hydrogens to the end of the atom list. In this way, you can obtain files split in two parts: the first one containing the heavy atoms and the second one, placed at the end, containing the hydrogens. As an example, that's useful to write mol2 files compatible with the GOLD docking system.

Remove apolar hydrogens.r

Remove the apolar hydrogens from the current structure.

Scores.c Calculate the interaction score between a ligand and a generic target biomacromolecule. The ligand must be previously docked in the target structure. This calculation requires two molecules in the workspace: the first one must be the receptor and the second one must be the ligand.
The script can calculate:
  • Electrostatic energy (Coulomb).
  • Electrostatic energy with distant-dependent dielectric constant.
  • R6-R12 Lennard-Johnes non-bond energy using the CHARMM and CVFF force fields.
  • Hydrophobic interaction using the Broto-Moreau parameters with different distance functions (linear, square, cube and Ferm's function).

The results are automatically copied to the clipboard.

 

13.3.15 Trajectory

It contains scripts for trajectory management.

Anim maker.c Generate a trajectory file starting from the molecule in the current workspace, rotating it around one or more axis. That's useful to create video files.
Automatic quenching.r Automatic quenching for dynamics trajectory files.
Dump energy.c Calculate the energy for each MD frame and dumps the molecular mechanics energy components in a CSV file.
Enantiomerizer.r Convert the trajectory to another format inverting all chiral atoms. It builds the trajectory of the enantiomer.
Frame extractor.r Extract each MD trajectory frame saving it in the specified molecule format.
Ramachandran.c

This script perform the Ramachandran analysis for each trajectory frame. Before running it, you must open a trajectory file. For each frame, the Phi and Psi backbone torsion angles are measured and evaluated if they are inside or outside the Ramachandran permission areas. For each frame is calculated the percentage referred to the total number of the residues and these values are visualized in a plot. This calculation is useful to highlight the secondary structure evolution during a MD simulation. If the percentage of the residues (Phi and Psi values) inside the permission areas is decreasing during the simulation, it means that the secondary structure evolves to a worse situation. Vice versa, if the percentage is growing, the secondary structure is improving.

SDF export.c Convert the current trajectory in a SDF database. Each structure in the database is equivalent to each frame in the trajectory file.
Water remover.r

Remove all water molecules from a trajectory converting it into a PDB multimodel file. This script is obsolete and it's maintained as example only. The same function is now implemented in VEGA ZZ without external scripts. 

 

13.3.16 Utilities

This directory includes the generic scripts. Some of these require REBOL/View.

Calculator.r Simple calculator (script by Ryan S. Cole).
Calendar.r Calendar and scheduler (script by Sterling Newton).
Clock.r Digital clock (script by Carl Sassenrath).
Console.r Open the REBOL console.
Desktop.r Open the REBOL desktop.
Image viewer.r Image viewer.