net.sf.ciccgrid.pws
Class Docking

java.lang.Object
  extended by net.sf.ciccgrid.pws.Docking

public class Docking
extends java.lang.Object

The methods in this class provide access to the docking database.

You can get a list of targets that have been processed and can then query for docked ligand structures via compound ID or via SMARTS patterns.

The ligand structures are returned in SD format

Author:
rguha

Constructor Summary
Docking()
           
 
Method Summary
 java.lang.String[] getCIDByScore(java.lang.String scoreFunction, java.lang.String target, int sortOrder, int howMany)
          Get PubChem compound ID's based on total score values.
 java.lang.String getLigandByCID(java.lang.String cid, java.lang.String scorefunction, java.lang.String target)
          Get the structure of a docked ligand by CID.
 java.lang.String[] getLigandByScore(java.lang.String scoreFunction, java.lang.String target, int sortOrder, int howMany)
          Get ligand structures based on total score values.
 java.lang.String[] getLigandBySmarts(java.lang.String scoreFunction, java.lang.String target, java.lang.String smarts, int sortOrder, int howMany)
          Get ligand structures based on a SMARTS pattern.
 double[] getScoreByCID(java.lang.String scoreName, java.lang.String pdbId, java.lang.String[] cids)
          Get the docking score for a set of compound ID's.
 java.lang.String[] getScoreFunctions()
          Get available score functions.
 double[] getScoreMaxMin(java.lang.String scoreName, java.lang.String pdbId)
          Get the best and worst score for a given scoring function for a given PDB ID.
 java.lang.String[] getTargets()
          Get the PDB ID's of the target that have been processed.
 java.lang.String getTargetStructure(java.lang.String pdbid)
          Gets a PDB structure given the PDB ID.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Docking

public Docking()
        throws java.sql.SQLException,
               java.lang.ClassNotFoundException
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException
Method Detail

getTargets

public java.lang.String[] getTargets()
                              throws java.sql.SQLException
Get the PDB ID's of the target that have been processed.

Returns:
A string array of the PDB ID's. If a zero-length array is obtained, there is probably some major error and should be reported
Throws:
java.sql.SQLException

getTargetStructure

public java.lang.String getTargetStructure(java.lang.String pdbid)
                                    throws java.lang.Exception
Gets a PDB structure given the PDB ID.

The structure returned is the one stored in the local database and not obtained directly from the PDB.

Parameters:
pdbid - The PDB ID. If invalid or non-existent, an empty string is returned
Returns:
The PDB structure
Throws:
java.sql.SQLException
java.lang.Exception

getScoreFunctions

public java.lang.String[] getScoreFunctions()
                                     throws java.sql.SQLException
Get available score functions.

The name of a score function is required for the other query methods.

Returns:
An array of score function names. Returns a zero-length array if there are no score functions. This situation is probably an error and should be reported
Throws:
java.sql.SQLException

getLigandByCID

public java.lang.String getLigandByCID(java.lang.String cid,
                                       java.lang.String scorefunction,
                                       java.lang.String target)
                                throws java.lang.Exception
Get the structure of a docked ligand by CID.

Parameters:
cid - The CID to look for. Returns an empty string if there is no such CID
scorefunction - A valid score function name
target - The PDB ID of the target of interest
Returns:
The structure in SD format
Throws:
java.lang.Exception
See Also:
getScoreFunctions(), getTargets()

getLigandByScore

public java.lang.String[] getLigandByScore(java.lang.String scoreFunction,
                                           java.lang.String target,
                                           int sortOrder,
                                           int howMany)
                                    throws java.lang.Exception
Get ligand structures based on total score values.

Parameters:
scoreFunction - The score function to use
target - The PDB ID of the target of interest
sortOrder - Sort in ascending (best to worst) or descending (worst to best) order. For the former specify 1 and for the latter specify 2
howMany - How many hits should be returned? If zero or a negative number is specified then all hits will be returned. Note that this can be a very large number of hits and might lead to an out of memory error on the application container. If the number of hits required is more than available then all will be returned.
Returns:
A string array containing the ligand structures in SD format
Throws:
java.lang.Exception
See Also:
getScoreFunctions(), getTargets()

getCIDByScore

public java.lang.String[] getCIDByScore(java.lang.String scoreFunction,
                                        java.lang.String target,
                                        int sortOrder,
                                        int howMany)
                                 throws java.lang.Exception
Get PubChem compound ID's based on total score values.

Parameters:
scoreFunction - The score function to use
target - The PDB ID of the target of interest
sortOrder - Sort in ascending (best to worst) or descending (worst to best) order. For the former specify 1 and for the latter specify 2
howMany - How many hits should be returned? If zero or a negative number is specified then all hits will be returned. Note that this can be a very large number of hits and might lead to an out of memory error on the application container. If the number of hits required is more than available then all will be returned.
Returns:
A string array containing the compound ID's
Throws:
java.lang.Exception
See Also:
getScoreFunctions(), getTargets()

getLigandBySmarts

public java.lang.String[] getLigandBySmarts(java.lang.String scoreFunction,
                                            java.lang.String target,
                                            java.lang.String smarts,
                                            int sortOrder,
                                            int howMany)
                                     throws java.lang.Exception
Get ligand structures based on a SMARTS pattern.

Note that this method does not necessarily include the best scoring ligand.

Parameters:
scoreFunction - The score function to use
smarts - The SMARTS pattern to search for
sortOrder - Sort in ascending (best to worst) or descending (worst to best) order. For the former specify 1 and for the latter specify 2
howMany - How many hits should be returned? If zero or a negative number is specified then all hits will be returned. Note that this can be a very large number of hits and might lead to an out of memory error on the application container. If the number of hits required is more than available then all will be returned.
Returns:
A string array containing the ligand structures in SD format
Throws:
java.lang.Exception
See Also:
getScoreFunctions(), getTargets()

getScoreMaxMin

public double[] getScoreMaxMin(java.lang.String scoreName,
                               java.lang.String pdbId)
                        throws java.sql.SQLException
Get the best and worst score for a given scoring function for a given PDB ID.

Note that the best score is the lowest (i.e., minimum) score and the worst score is the highest score.

Parameters:
scoreName - The name of the scoring function
pdbId - The protein target ID
Returns:
A 2-element array containing the maximum and minimum value of the scoring function for the target in question
Throws:
java.sql.SQLException

getScoreByCID

public double[] getScoreByCID(java.lang.String scoreName,
                              java.lang.String pdbId,
                              java.lang.String[] cids)
                       throws java.lang.Exception
Get the docking score for a set of compound ID's.

Since the score depends on the scoring function, you need to supply which scoreing funtion was used.

Parameters:
scoreName - The name of the scoring function.
pdbId - The protein of interest
cids - The CID's of interest
Returns:
An array containing the total score for these compounds against the target for the specified scoring funtion
Throws:
java.lang.Exception
See Also:
getScoreFunctions()