Class RgDecompResults

java.lang.Object
chemaxon.sss.search.RgDecompResults

@PublicAPI public class RgDecompResults extends Object
Convenience class for generating, storing and returning results of a search in different forms: as r-group decomposition or Markush molecule. Used as return class of JChemSearch.getHitsAsRgDecomp(int[], int).
When RgDecompResults is used only for storing results use the constructor designed for that purpose. When generating the results, set the parameters (query, targets (and optionally their original identifiers), search options, attachment type) using the appropriate constructor or setters then call run() method.
Available setters:
If a query does not contain undefined r-atoms (r-atom without corresponding r-group definition) then implicit Hydrogens are exchanged to undefined r-atoms and results are obtained using this new query.
hasResults() shows whether the class can actually provide valid results. Results can be achieved by calling different methods: More details about r-group decomposition can be found here.
For more sophisticated usages (e.g. all hits of query in a specific target) see our RGroupDecomposition API documentation.
Since:
JChem 5.3 Date 1-Oct-2009
  • Constructor Details

  • Method Details

    • getScaffold

      public Molecule getScaffold()
      Returns scaffold of the query (r-groups are added automatically if needed).
      Returns:
      Scaffold if valid results are available otherwise null.
    • getLigandsNumber

      public int getLigandsNumber()
      Returns the number of ligands in one target structure.
      Returns:
      Number of ligands in a target structure if valid results are available, otherwise Integer.MIN_VALUE.
    • getHitsAsRgDecomp

      public Molecule[][] getHitsAsRgDecomp()
      Returns All ligands of all targets. When a target does not contain the query structure the array contains null instead of array of ligands.
      Returns:
      Array of array of ligands for all target structures if valid results are available, otherwise null. The returned array contains ligands for all query atoms. If a query atom is not an r-atom the ligand is null.
    • getDecompositions

      public Decomposition[] getDecompositions()
      Returns the Decomposition objects corresponding to the targets.
      Returns:
      the Decomposition objects corresponding to the targets if valid results are available, otherwise null.
      Since:
      JChem 5.10
    • getHitsAsTable

      public Molecule[][] getHitsAsTable()
      Returns the table elements in Molecule[][] format. As an example see decomposition table
      Returns:
      A colored molecule table if valid results are available and there were matching targets for the query, otherwise null. Format of the table (first row is header row, following rows contain targets, 1 hit/target):
       [query]:     molecule        R1         R2         R3    ...
       ---------------------------------------------------------
       [target1]:   molecule1    ligand1.1  ligand1.2  ligand1.3
       [target2]:   molecule2    ligand2.1  ligand2.2  ligand2.3
       
    • getHitsAsMarkush

      public RgMolecule getHitsAsMarkush()
      Returns a single RgMolecule that consists of the scaffold and all the possible ligands as rgroup-definitions.
      Returns:
      An RgMolecule if valid results are available, otherwise null.
    • getSkippedIds

      public int[] getSkippedIds()
      Returns indexes of those targets that are not matched by query.
      Returns:
      Array of skipped indexes if valid results are available, otherwise null. If original identifiers of targets are set then those are returned instead of array indexes.
    • getIncludedIds

      public int[] getIncludedIds()
      Returns indexes of those targets that are matched by query.
      Returns:
      Array of included indexes if valid results are available, otherwise null. If original identifiers of targets are set then those are returned instead of array indexes.
    • run

      public void run() throws SearchException
      Generates the results if no valid results are available (see hasResults())
      Throws:
      SearchException
    • setQuery

      public void setQuery(Molecule query)
      Parameters:
      query - The query to set
    • setTargets

      public void setTargets(Molecule[] targets)
      Parameters:
      targets - The targets to set
    • setSearchOptions

      public void setSearchOptions(SearchOptions options)
      Parameters:
      options - The search options to set
    • setAttachmentType

      public void setAttachmentType(int attachmentType)
      Parameters:
      attachmentType - The attachment type to set
    • setOriginalIds

      public void setOriginalIds(int[] originalIds)
      Parameters:
      originalIds - Original identifiers of targets to set
    • hasResults

      public boolean hasResults()
      Returns:
      true, if valid results are available