Omega.py: Difference between revisions

From DISI
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
==Changing settings for Omega (OpenEye)==
==Changing settings for OMEGA (OpenEye)==


You may be interested to change the default settings for Omega (defined in omega.py) when generating conformations for docking. Mabye you want to increase the number of conformations sampled per ligand, or the force field used.<br>
You may be interested to change the default settings for OMEGA (defined in omega.py) when generating conformations for docking. Mabye you want to increase the number of conformations sampled per ligand, or the force field used.<br>


The easiest way to change the settings for Omega is to copy the default omega.py file into the directory where you want to generate ligand conformations using dbgen.csh.
The best way to change the settings for OMEGA is to copy a file called omega.parm into the directory where you want to generate ligand conformations using dbgen.csh. You should find a template in $DOCK_BASE/data/omega.parm


1) Type:
1) Copy omega.parm in your working directory:
  which omega.py
  cp $DOCK_BASE/data/omega.parm .


2)Copy the output of the which command above into your current working directory:
(=> if your ligand has no rings, copy and edit omega_noring.parm ($DOCK_BASE/data/omega_noring.parm)
cp /raid3/software/dockenv/etc/omega.py .


3) Rename that file to omega.parm:
2) Edit and save omega.parm (using the same name) in your favorite editor.
mv omega.py omega.parm


4) Edit omega.parm in your favorite editor.
3) Run dbgen.csh with altered settings in omega.parm (has to be in directory where you run dbgen.csh):
dbgen.csh my_ligs.smi


5) Run dbgen.csh with altered settings in omega.parm (has to be in directory where you run dbgen.csh):
dbgen.csh my_ligs.smi


==Increase ligand conformation sampling or change the type of force field==
==Increase ligand conformation sampling or change the type of force field==


An example of omega.py is shown at the bottom of this page. Settings you may want to consider changing are:  
An example of omega.parm is shown at the bottom of this page. Settings you may want to consider changing are:  




Line 43: Line 40:




===Example of omega.py===
===Example of omega.parm===


  #!/usr/bin/env python
  # Example omega toolkit configuration file
import os
  # File Parameters
import sys
SetCommentEnergy(False)
from openeye.oechem import *
SetIncludeInput(False)
from openeye.oeomega import *
SetRotorOffset(True)
SetSDEnergy(False)
def read_parm(parm):
SetWarts(True)
    if os.path.exists(parm):
# 3D Construction Parameters
        f = open(parm, 'r')
SetBuildForceField('mmff94s_NoEstat')
        for line in f:
SetCanonOrder(True)
            line = line.strip()
SetFixDeleteH(True)
            if line and line[0] != '#':
SetDielectric(1.0)
                eval('omega.%s' % line)
SetExponent(1.0)
        f.close()
SetFixRMS(0.15)
SetFromCT(False)
def write_molecule(outfile, mol):
SetFixMaxMatch(1)
    ofs = oemolostream(outfile)
SetFixUniqueMatch(True)
    OEWriteMolecule(ofs, mol)
# Structure Enumeration Parameters
    ofs.close()
SetEnumNitrogen(False)
   
SetEnumRing(False)
def set_defaults(omega):
# Torsion Driving Parameters
    # File Parameters
SetEnergyWindow(12.5)
    omega.SetCommentEnergy(True)
SetMaxConfs(600)
    omega.SetIncludeInput(False)
SetMaxRotors(-1)
    omega.SetRotorOffset(True)
SetMaxSearchTime(120.0)
    omega.SetSDEnergy(False)
SetRangeIncrement(5)
    omega.SetWarts(True)
SetRMSThreshold(0.80)
    # 3D Construction Parameters
SetSearchForceField('mmff94s_NoEstat')
    omega.SetBuildForceField('mmff94s_NoEstat')
SetTorsionDrive(True)
    omega.SetCanonOrder(True)
 
    omega.SetFixDeleteH(True)
 
    omega.SetDielectric(1.0)
===Example of omega_noring.parm===
    omega.SetExponent(1.0)
 
    omega.SetFixRMS(0.15)
  # Omega file with special no ring conformation parameters
    omega.SetFromCT(False)
  SetMaxConfs(30)
    omega.SetFixMaxMatch(1)
 
    omega.SetFixUniqueMatch(True)
 
    # Structure Enumeration Parameters
[[Category:Software]]
    omega.SetEnumNitrogen(False)
[[Category:Manual]]
    omega.SetEnumRing(False)
    # Torsion Driving Parameters
    omega.SetEnergyWindow(12.5)
    omega.SetMaxConfGen(100000)
    omega.SetMaxConfs(600)
    omega.SetMaxPoolSize(10000)
    omega.SetMaxRotors(-1)
    omega.SetMaxSearchTime(120.0)
    omega.SetRangeIncrement(5)
    omega.SetRMSThreshold(0.80)
    omega.SetSearchForceField('mmff94s_NoEstat')
    omega.SetTorsionDrive(True)
# Parse arguments here
parm_prefix = sys.argv[1]
infile = sys.argv[2]
parmfile = parm_prefix + ".parm"
noringparmfile = parm_prefix + "_noring.parm"
omega = OEOmega()
set_defaults(omega)
mol = OEMol()
inroot, inext = os.path.splitext(infile)
ifs = oemolistream(infile)
OEReadMolecule(ifs, mol)
  ifs.close()
count, ringlist = OEDetermineRingSystems(mol)
  rcf = open('ring_count', 'w')
rcf.write('%d\n' % count)
rcf.close()
if count == 0:
    omega.SetMaxConfs(30)
    read_parm(noringparmfile)
    outfile = "%s.%d.mol2" % (inroot, count)
    if omega(mol):
        write_molecule(outfile, mol)
else:
    read_parm(parmfile)
    pred = OEPartPredAtom(ringlist)
    for i in xrange(1, count+1):
        pred.SelectPart(i)
        outfile = "%s.%d.mol2" % (inroot, i)
        molcopy = OEMol(mol)
        if omega(molcopy, pred):
            write_molecule(outfile, molcopy)

Latest revision as of 04:08, 14 February 2014

Changing settings for OMEGA (OpenEye)

You may be interested to change the default settings for OMEGA (defined in omega.py) when generating conformations for docking. Mabye you want to increase the number of conformations sampled per ligand, or the force field used.

The best way to change the settings for OMEGA is to copy a file called omega.parm into the directory where you want to generate ligand conformations using dbgen.csh. You should find a template in $DOCK_BASE/data/omega.parm

1) Copy omega.parm in your working directory:

cp $DOCK_BASE/data/omega.parm .

(=> if your ligand has no rings, copy and edit omega_noring.parm ($DOCK_BASE/data/omega_noring.parm)

2) Edit and save omega.parm (using the same name) in your favorite editor.

3) Run dbgen.csh with altered settings in omega.parm (has to be in directory where you run dbgen.csh):

dbgen.csh my_ligs.smi


Increase ligand conformation sampling or change the type of force field

An example of omega.parm is shown at the bottom of this page. Settings you may want to consider changing are:


    omega.SetEnergyWindow(12.5)

    omega.SetMaxConfs(600)

    omega.SetRMSThreshold(0.80)

    omega.SetBuildForceField('mmff94s_NoEstat') 
    omega.SetSearchForceField('mmff94s_NoEstat')
  • you could increase the energy window: e.g. omega.SetEnergyWindow(25.0)

=> There is no benchmarking of this setting that I am aware of...

  • you could increase the number of output conformations: e.g. omega.SetMaxConfs(10000)

=> Molecules in ZINC have a cut a 600 conformations, which is certainly on the low side for flexible ligands

  • you could lower the RMS threshold between the confs: e.g. omega.SetRMSThreshold(0.40)

=> This results in finer sampling of conformational space

  • you could change the force field to included electrostatics: e.g. omega.SetBuildForceField('mmff94s') and omega.SetSearchForceField('mmff94s')

=> Internal benchmarkings on DUDE (by RGC) have shown that electrostatics improves enrichment for many targets.


Example of omega.parm

# Example omega toolkit configuration file
# File Parameters
SetCommentEnergy(False)
SetIncludeInput(False)
SetRotorOffset(True)
SetSDEnergy(False)
SetWarts(True)
# 3D Construction Parameters
SetBuildForceField('mmff94s_NoEstat')
SetCanonOrder(True)
SetFixDeleteH(True)
SetDielectric(1.0)
SetExponent(1.0)
SetFixRMS(0.15)
SetFromCT(False)
SetFixMaxMatch(1)
SetFixUniqueMatch(True)
# Structure Enumeration Parameters
SetEnumNitrogen(False)
SetEnumRing(False)
# Torsion Driving Parameters
SetEnergyWindow(12.5)
SetMaxConfs(600)
SetMaxRotors(-1)
SetMaxSearchTime(120.0)
SetRangeIncrement(5)
SetRMSThreshold(0.80)
SetSearchForceField('mmff94s_NoEstat')
SetTorsionDrive(True)


Example of omega_noring.parm

# Omega file with special no ring conformation parameters
SetMaxConfs(30)