chemaxon.sss.search
Class RGroupDecomposition

java.lang.Object
  extended by chemaxon.sss.search.Search
      extended by chemaxon.sss.search.MolSearch
          extended by chemaxon.sss.search.StandardizedMolSearch
              extended by chemaxon.sss.search.RGroupDecomposition
All Implemented Interfaces:
chemaxon.license.Licensable, SearchConstants, StereoConstants

public class RGroupDecomposition
extends StandardizedMolSearch
implements chemaxon.license.Licensable

R-group decomposition.

Given a scaffold structure with attached R1, R2, ... nodes as query, determines the possible R-group decompositions of given target molecule. A decomposition consists of the matching scaffold and the R1, R2, ... ligands with attachment points. Each decomposition corresponds to a group hit, see MolSearch.findFirstGroup() and MolSearch.findNextGroup().

After setting the query, the target, and possibly the search options, call findFirstDecomposition() and findNextDecomposition() to get the decompositions. Call Decomposition.equals(java.lang.Object) to filter equivalent decompositions that provide the same ligands (but correspond to different group hits). Color the decomposition by calling Decomposition.color() or Decomposition.color(java.lang.String). To create a result table with all decompositions right away, call findLigandTable(int, int, java.lang.String). Alternatively, you can get the table header with query, target and R-atoms, call getLigandTableHeader(int, int, java.lang.String) and then add only a single table row corresponding to the first decomposition by calling findLigandTableRow(int, java.lang.String). Different ligand attachment types can be set in setAttachmentType(int). As of JChem 5.3, extra ligands without matching R-atom are not allowed. As of JChem 5.3, a query without R-atoms will be automatically modified in setQuery(chemaxon.struc.Molecule): R-atoms will be added in place of implicit hydrogens by addRGroups(chemaxon.struc.Molecule). The R-grouped query can be retrieved by getRGroupedQuery(). If the original query contains R-atoms then the default R-atom matching behavior is SearchConstants.UNDEF_R_MATCHING_GROUP_H, otherwise the default matching behavior of the automatically added R-atoms is SearchConstants.UNDEF_R_MATCHING_GROUP_H_EMPTY (the empty set matching is allowed here because we expect that ligands are attached to some of the implicit hydrogens in the original query, but not necessarily all implicit hydrogens have corresponding ligands).

Search options:

The options below have different default values as in MolSearch:

The API has been changed in JChem 5.3, as the decomposition result is now returned in a Decomposition object. Most of the earlier methods have been deprecated and will be removed in JChem 5.4. The examples below are rewritten to show the new API usage.

API usage examples:

query: the query molecule
target: the target molecule

Since:
JChem 3.0
Author:
Nora Mate

Field Summary
static int ATTACHMENT_ATOM
          Constant for attachment point representation in ligands: sets attachment points by attaching an pseudo-atom.
static int ATTACHMENT_LABEL
          Constant for attachment point representation in ligands: sets attachment points by MolAtom.setExtraLabel(java.lang.String) Labels with R-group ID: "1" for R1, "2" for R2, ...
static int ATTACHMENT_MAP
          Constant for attachment point representation in ligands: sets attachment points by MolAtom.setAtomMap(int).
static int ATTACHMENT_NONE
          Constant for attachment point representation in ligands: none (no attachment point data).
static int ATTACHMENT_POINT
          Constant for attachment point representation in ligands: sets attachment points by MolAtom.setAttach(int).
static int ATTACHMENT_RLABEL
          Constant for attachment point representation in ligands: sets attachment points by MolAtom.setExtraLabel(java.lang.String).
static int COL_MOLECULE
          Constant for adding query-target column to ligand table.
static int COL_SCAFFOLD
          Constant for adding scaffold column to ligand table.
static int HEADER_MAP
          Constant for header type: header with any atoms mapped by Rgroup indexes.
static int HEADER_NONE
          Constant for header type: no header.
static int HEADER_RGROUP
          Constant for header type: header with Rgroup atoms (cannot be exported to SMILES).
static java.lang.String SEPARATOR
          Separator in atom color code property string representation.
 
Fields inherited from class chemaxon.sss.search.MolSearch
groupHit, groupHitHandler, isOrigTargetMayBeMarkush, isQueryStandardizable, isTargetStandardizable
 
Fields inherited from class chemaxon.sss.search.Search
preMatchLength, preMatchQueryAtoms, preMatchTargetAtoms, searchOptions
 
Fields inherited from interface chemaxon.struc.StereoConstants
ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_MASK, CHIRALITY_R, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_ODD, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, TRANS
 
Fields inherited from interface chemaxon.sss.SearchConstants
ABS_STEREO_ALWAYS_ON, ABS_STEREO_CHIRAL_FLAG, ABS_STEREO_TABLE_OPTION, ATTACHED_DATA_MATCH_EXACT, ATTACHED_DATA_MATCH_GENERAL, ATTACHED_DATA_MATCH_IGNORE, CHARGE_MATCHING_DEFAULT, CHARGE_MATCHING_EXACT, CHARGE_MATCHING_IGNORE, DEFAULT_DISSIMILARITY_THRESHOLD, DEFAULT_SIMILARITY_THRESHOLD, DISSIMILARITY, DUPLICATE, EXACT, EXACT_FRAGMENT, EXACT_FRAGMENT_OFF, EXACT_FRAGMENT_ON, FULL, FULL_FRAGMENT, HCOUNT_MATCHING_AUTO, HCOUNT_MATCHING_EQUAL, HCOUNT_MATCHING_GREATER_OR_EQUAL, HIT_EXCLUDEDQ, HIT_LP, HIT_MULTICENTER, HIT_NON_R, HIT_R, HIT_R_EMPTY_MATCH, HIT_UNMAPABLE, IMPLICIT_H_MATCHING_DEFAULT, IMPLICIT_H_MATCHING_DISABLED, IMPLICIT_H_MATCHING_ENABLED, ISOTOPE_MATCHING_DEFAULT, ISOTOPE_MATCHING_EXACT, ISOTOPE_MATCHING_IGNORE, KEEP_QUERY_ORDER, MARKUSH_AROM_FINAL_CHECK, MARKUSH_AROM_NO_FINAL_CHECK, MARKUSH_AROM_OFF, MARKUSH_DISABLED, MARKUSH_ENABLED, MARKUSH_HIT_INNER, MARKUSH_HIT_ORIGINAL, MATCH_COUNT_BETWEEN, MATCH_COUNT_RELATION, MIX_SGROUP_MATCHING_OFF, MIX_SGROUP_MATCHING_ON, NO_ABAS, NO_SCREEN, OPTION_CHARGE_MATCHING, OPTION_EXACT_FRAGMENT, OPTION_ISOTOPE_MATCHING, OPTION_KEEP_QUERY_ORDER, OPTION_MARKUSH_AROM, OPTION_MARKUSH_ENABLED, OPTION_MARKUSH_HIT, OPTION_MIX_SGROUP_MATCHING, OPTION_RADICAL_MATCHING, OPTION_STEREO_MODEL, OPTION_TAUTOMER_SEARCH, OPTION_VAGUE_BOND, OPTION_VALENCE_MATCHING, PERFECT, R_NODE_PLACEHOLDER, RADICAL_MATCHING_DEFAULT, RADICAL_MATCHING_EXACT, RADICAL_MATCHING_IGNORE, REARRANGE_QUERY, SEARCH_MODE_NAMES, SEARCH_OPTIONS_LENGTH, SIMILARITY, STEREO_DIASTEREOMER, STEREO_EXACT, STEREO_IGNORE, STEREO_MODEL_COMPREHENSIVE, STEREO_MODEL_DEFAULT, STEREO_MODEL_GLOBAL, STEREO_MODEL_LOCAL, STEREO_SPECIFIC, SUBSTRUCTURE, SUPERSTRUCTURE, TAUTOMER_SEARCH_OFF, TAUTOMER_SEARCH_ON, UNDEF_R_MATCHING_ALL, UNDEF_R_MATCHING_GROUP, UNDEF_R_MATCHING_GROUP_H, UNDEF_R_MATCHING_GROUP_H_EMPTY, UNDEF_R_MATCHING_UNDEF_R, VAGUE_BOND_DEFAULT, VAGUE_BOND_LEVEL_HALF, VAGUE_BOND_LEVEL1, VAGUE_BOND_LEVEL2, VAGUE_BOND_LEVEL3, VAGUE_BOND_LEVEL4, VAGUE_BOND_OFF, VALENCE_MATCHING_IGNORE, VALENCE_MATCHING_ON
 
Constructor Summary
RGroupDecomposition()
          Constructor.
 
Method Summary
static void addHydrogens(Molecule query)
          Deprecated. as of JChem 5.3, full fragment matching is forced, which means that ligands are accepted at R-atoms only (and never in place of implicit hydrogens)
static void addRGroups(Molecule query)
          Adds different rgroup atoms connected by any-bonds to query molecule in place of all implicit H-s.
static void addRGroups(Molecule query, int bondType)
          Adds different rgroup atoms connected by the specified bond type to query molecule in place of all implicit H-s.
 int[][] findAllLigandIds(int[][] hits)
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
 Molecule[][] findAllLigands(int[][] hits)
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
 Decomposition findDecomposition()
          Finds the first decomposition result.
 Decomposition findDecomposition(boolean first)
          Finds a decomposition result.
 Decomposition findFirstDecomposition()
          Finds the first decomposition result.
 int[] findLigandIds(int[] hit)
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
 Molecule[] findLigands(int[] hit)
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
 Molecule[][] findLigandTable(int headerType, int addCols)
          Returns the ligand table.
 Molecule[][] findLigandTable(int headerType, int addCols, java.lang.String colorTag)
          Returns the ligand table.
 Molecule[] findLigandTableRow(int addCols)
          Returns a ligand table row with ligands corresponding to a the first search hit.
 Molecule[] findLigandTableRow(int addCols, java.lang.String colorTag)
          Returns a ligand table row with ligands corresponding to a the first search hit.
 Decomposition findNextDecomposition()
          Finds the next decomposition result.
 Molecule[][] getLigandTable(int[][] hits, int[][] ligandIdArrays, int headerType, int addCols, java.lang.String colorTag)
          Deprecated. as of JChem 5.3, use findLigandTable(int, int, java.lang.String) to get decomposition results (the current implementation ignores the hits parameter and uses all filtered group hits - skipping equivalent hits - instead)
 Molecule[][] getLigandTable(int[][] hits, int headerType, int addCols)
          Deprecated. as of JChem 5.3, use findLigandTable(int, int) to get decomposition results (the current implementation ignores the hits parameter and uses all filtered group hits - skipping equivalent hits - instead)
 Molecule[][] getLigandTable(int[][] hits, int headerType, int addCols, java.lang.String colorTag)
          Deprecated. as of JChem 5.3, use findLigandTable(int, int, java.lang.String) to get decomposition results (the current implementation ignores the hits parameter and uses all filtered group hits - skipping equivalent hits - instead)
 Molecule[] getLigandTableHeader(int headerType, int addCols)
          Returns ligand table header.
 Molecule[] getLigandTableHeader(int headerType, int addCols, java.lang.String colorTag)
          Returns ligand table header.
 Molecule[] getLigandTableRow(int[] hit, int addCols)
          Deprecated. as of JChem 5.3, use findLigandTableRow(int, java.lang.String) to get decomposition results (the current implementation ignores the hit parameter and and uses the latest groupHit found by the search process)
 Molecule[] getLigandTableRow(int[] hit, int[] ligandIds, int addCols, java.lang.String colorTag)
          Deprecated. as of JChem 5.3, use findLigandTableRow(int, java.lang.String) to get decomposition results (the current implementation ignores the hit and the ligandIds parameters and and uses the latest groupHit found by the search process)
 Molecule[] getLigandTableRow(int[] hit, int addCols, java.lang.String colorTag)
          Deprecated. as of JChem 5.3, use findLigandTableRow(int, java.lang.String) to get decomposition results (the current implementation ignores the hit parameter and and uses the latest groupHit found by the search process)
 Molecule getQuery()
          Retrieves the original query structure.
 int[] getQueryRMap()
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
 java.lang.String getQueryRMapString()
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
 Molecule getRGroupedQuery()
          Returns the R-grouped query.
 int[] getTargetRMap(int[] ligandIds)
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
 java.lang.String getTargetRMapString(int[] ligandIds)
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
static int[] getUniformRMap(int rmap, Molecule mol)
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
static java.lang.String getUniformRMapString(int rmap, Molecule mol)
          Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)
 boolean isLicensed()
           
protected  boolean keepGroupOrder()
          Return false if groups in group hit should be reordered so that scaffold ligand matching the R-atom should come first.
 void setAlign(boolean align)
          Sets alignment.
 void setAttachmentType(int type)
          Sets the attachment point representation type in ligand molecules.
 void setLicenseEnvironment(java.lang.String env)
           
 void setQuery(Molecule mol)
          Specifies the query structure to search for.
 void setQuery(Molecule mol, int undefinedRAtom)
          Specifies the query structure to search for.
 void setSameRGroupSameStructure(boolean sameRGroupSameStructure)
          Deprecated. as of JChem 5.3, set search option "RLigandEqualityCheck" in SearchOptions, see SearchOptions.setRLigandEqualityCheck(boolean) and SearchOptions.setOption(java.lang.String, java.lang.String)
 void setTarget(Molecule mol)
          Specifies the target molecule to search in.
 
Methods inherited from class chemaxon.sss.search.StandardizedMolSearch
setStandardizer
 
Methods inherited from class chemaxon.sss.search.MolSearch
addComparator, addMatch, addMatch, checkFilter, checkFilter, clearComparators, clearMatch, filter, findAll, findAllGroups, findAllOrder, findFirst, findFirstGroup, findNext, findNextGroup, getFilter, getGroupHit, getMatchingQuery, getMatchingTarget, getMolecule, getQueryStructure, getTarget, hasFilter, hasHitFilter, isMatching, removeComparator, setFilter, setFilterConfig, setFilterConfig, setHitIncludesRNodes, setMolecule, setOrigTargetMayBeMarkush, setQuery, setQuery, setQueryStructure, setSearchOptions, setTarget, stop
 
Methods inherited from class chemaxon.sss.search.Search
areMatchingBondTypes, areMatchingBondTypes, getAtomStereo, getDefaultUndefinedRAtom, getDoubleBondStereoMatchingMode, getHCountMatching, getMatchCount, getOption, getQueryAsString, getQueryToPrint, getSearchOptions, getSearchType, getTargetAsString, getTargetToPrint, isExactAtomMatching, isExactBondMatching, isExactChargeMatching, isExactIsotopeMatching, isExactQueryAtomMatching, isExactRadicalMatching, isExactStereoMatching, isMatchCountBetween, isMatchCountInRelation, isOrderSensitiveSearch, isPerfectSearchType, isQueryAbsoluteStereo, isSubgraphSearch, isTargetAbsoluteStereo, isTautomerSearch, isVerbose, setDoubleBondStereoMatchingMode, setExactAtomMatching, setExactBondMatching, setExactChargeMatching, setExactIsotopeMatching, setExactQueryAtomMatching, setExactRadicalMatching, setExactStereoMatching, setHCountMatching, setOption, setOptions, setOrderSensitiveSearch, setQueryAbsoluteStereo, setSearchOptions, setSearchType, setStereoCareChecking, setStereoSearch, setSubgraphSearch, setTargetAbsoluteStereo, setTautomerSearch, setVerbose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COL_MOLECULE

public static final int COL_MOLECULE
Constant for adding query-target column to ligand table.

See Also:
Constant Field Values

COL_SCAFFOLD

public static final int COL_SCAFFOLD
Constant for adding scaffold column to ligand table.

See Also:
Constant Field Values

HEADER_NONE

public static final int HEADER_NONE
Constant for header type: no header.

See Also:
Constant Field Values

HEADER_RGROUP

public static final int HEADER_RGROUP
Constant for header type: header with Rgroup atoms (cannot be exported to SMILES).

See Also:
Constant Field Values

HEADER_MAP

public static final int HEADER_MAP
Constant for header type: header with any atoms mapped by Rgroup indexes.

See Also:
Constant Field Values

SEPARATOR

public static final java.lang.String SEPARATOR
Separator in atom color code property string representation.

See Also:
Constant Field Values

ATTACHMENT_NONE

public static final int ATTACHMENT_NONE
Constant for attachment point representation in ligands: none (no attachment point data).

See Also:
Constant Field Values

ATTACHMENT_POINT

public static final int ATTACHMENT_POINT
Constant for attachment point representation in ligands: sets attachment points by MolAtom.setAttach(int). This is the default.

See Also:
Constant Field Values

ATTACHMENT_MAP

public static final int ATTACHMENT_MAP
Constant for attachment point representation in ligands: sets attachment points by MolAtom.setAtomMap(int). Maps with R-group ID: 1 for R1, 2 for R2, ...

See Also:
Constant Field Values

ATTACHMENT_LABEL

public static final int ATTACHMENT_LABEL
Constant for attachment point representation in ligands: sets attachment points by MolAtom.setExtraLabel(java.lang.String) Labels with R-group ID: "1" for R1, "2" for R2, ...

See Also:
Constant Field Values

ATTACHMENT_RLABEL

public static final int ATTACHMENT_RLABEL
Constant for attachment point representation in ligands: sets attachment points by MolAtom.setExtraLabel(java.lang.String). Labels with full R-atom name: "R1" for R1, "R2" for R2, ...

See Also:
Constant Field Values

ATTACHMENT_ATOM

public static final int ATTACHMENT_ATOM
Constant for attachment point representation in ligands: sets attachment points by attaching an pseudo-atom.

See Also:
Constant Field Values
Constructor Detail

RGroupDecomposition

public RGroupDecomposition()
Constructor.

Method Detail

setAttachmentType

public void setAttachmentType(int type)
Sets the attachment point representation type in ligand molecules. Possible values:

Parameters:
type - is the attachment point representation type

setSameRGroupSameStructure

public void setSameRGroupSameStructure(boolean sameRGroupSameStructure)
Deprecated. as of JChem 5.3, set search option "RLigandEqualityCheck" in SearchOptions, see SearchOptions.setRLigandEqualityCheck(boolean) and SearchOptions.setOption(java.lang.String, java.lang.String)

Sets the "same R-group symbol matches same ligands" property. If set to true then identical R-group symbols on the query (e.g. two R1-s) should match identical target ligands. If set to false then identical R-group symbols on the query only represent equivalent positions but may match different structures. Default: true.

Parameters:
sameRGroupSameStructure - is true identical R-group symbols on the query should match identical target ligands
Since:
JChem 3.1

addHydrogens

public static void addHydrogens(Molecule query)
Deprecated. as of JChem 5.3, full fragment matching is forced, which means that ligands are accepted at R-atoms only (and never in place of implicit hydrogens)

Adds explicit hydrogens to query molecule to force ligands to be attached at Rgroup atoms only (full fragment matching). Call this before setQuery(Molecule).

Parameters:
query - is the query molecule to be set
See Also:
addRGroups(Molecule)

addRGroups

public static void addRGroups(Molecule query)
Adds different rgroup atoms connected by any-bonds to query molecule in place of all implicit H-s. In this way ligands will be accepted and stored at all possible attachments. As of JChem 5.3, these R-atoms are added automatically if the query does not contain undefined R-atoms. In this case R-atoms are allowed to match the empty set. Call this before setQuery(Molecule).

Parameters:
query - is the query molecule to be set
See Also:
addHydrogens(Molecule)

addRGroups

public static void addRGroups(Molecule query,
                              int bondType)
Adds different rgroup atoms connected by the specified bond type to query molecule in place of all implicit H-s. Bond types: see constants in MolBond. In this way ligands will be accepted and stored at all possible attachments. Call this before setQuery(Molecule).

Parameters:
query - is the query molecule to be set
bondType - is the attachment bond type
See Also:
addHydrogens(Molecule)

setAlign

public void setAlign(boolean align)
Sets alignment. Default: false.

Parameters:
align - is true if ligands and target should be aligned (cleaned)
Since:
JChem 5.3

setQuery

public void setQuery(Molecule mol,
                     int undefinedRAtom)
Specifies the query structure to search for. If the query does not contain undefined R-atoms then addRGroups(chemaxon.struc.Molecule) is called to put R-atoms in place of implicit hydrogens.

Parameters:
mol - the standardized query structure.
undefinedRAtom - the undefined R-atom setting, possible values: See note on aromatic bonds.
Since:
JChem 5.3

setQuery

public void setQuery(Molecule mol)
Specifies the query structure to search for. If the query does not contain undefined R-atoms then addRGroups(chemaxon.struc.Molecule) is called to put R-atoms in place of implicit hydrogens - in this case undefined R-atoms are allowed to match the empty set, apart from heavy atom groups or hydrogen atoms. If the query contains R-atoms, these are allowed to match heavy atom groups or hydrogen atoms, but not the empty set. The R-atom matching behavior can be explicitly set in setQuery(chemaxon.struc.Molecule, int).

Overrides:
setQuery in class MolSearch
Parameters:
mol - the standardized query structure.
See Also:
See note on aromatic bonds.

setTarget

public void setTarget(Molecule mol)
Specifies the target molecule to search in.

Overrides:
setTarget in class MolSearch
Parameters:
mol - the possibly standardized target molecule. See note on aromatic bonds

getQuery

public Molecule getQuery()
Retrieves the original query structure.

Overrides:
getQuery in class MolSearch
Returns:
the original query structure

getRGroupedQuery

public Molecule getRGroupedQuery()
Returns the R-grouped query. This is the same as the original query if it contains undefined R-atoms, otherwise it is its R-rgouped version. This is the query structure used in the search process.

Returns:
the R-grouped query
Since:
JChem 5.3

keepGroupOrder

protected boolean keepGroupOrder()
Return false if groups in group hit should be reordered so that scaffold ligand matching the R-atom should come first.

Overrides:
keepGroupOrder in class MolSearch
Returns:
false if groups in group hit should be reordered

findFirstDecomposition

public Decomposition findFirstDecomposition()
                                     throws chemaxon.sss.search.SearchException
Finds the first decomposition result.

Returns:
the decomposition corresponding to the first group hit, or null if there is no hit
Throws:
chemaxon.sss.search.SearchException - on search error
Since:
JChem 5.3
See Also:
findNextDecomposition(), findDecomposition(), findDecomposition(boolean)

findNextDecomposition

public Decomposition findNextDecomposition()
                                    throws chemaxon.sss.search.SearchException
Finds the next decomposition result.

Returns:
the decomposition corresponding to the next group hit, or null if there is no hit
Throws:
chemaxon.sss.search.SearchException - on search error
Since:
JChem 5.3
See Also:
findFirstDecomposition(), findDecomposition(), findDecomposition(boolean)

findDecomposition

public Decomposition findDecomposition()
                                throws chemaxon.sss.search.SearchException
Finds the first decomposition result. Just a shorthand for findFirstDecomposition().

Returns:
the decomposition corresponding to the first group hit, or null if there is no hit
Throws:
chemaxon.sss.search.SearchException - on search error
Since:
JChem 5.3
See Also:
findFirstDecomposition(), findNextDecomposition(), findDecomposition(boolean)

findDecomposition

public Decomposition findDecomposition(boolean first)
                                throws chemaxon.sss.search.SearchException
Finds a decomposition result.

Parameters:
first - true if first decomposition, false if next decomposition
Returns:
the decomposition corresponding to the first/next group hit, or null if there is no hit
Throws:
chemaxon.sss.search.SearchException - on search error
Since:
JChem 5.3
See Also:
findFirstDecomposition(), findNextDecomposition(), findDecomposition()

findLigandIds

public int[] findLigandIds(int[] hit)
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Returns the ligand ID array for the given hit. target atom index -> least ligand attachment query R-atom index, -1 for target atoms corresponding to the scaffold, -2 for target atoms outside the group hit.

Parameters:
hit - is the search hit
Returns:
the ligand ID array for the hit, assigning a ligand ID to each target atom, or null if the search hit is null

findAllLigandIds

public int[][] findAllLigandIds(int[][] hits)
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Returns the ligand ID arrays for all hits in the given hit array.

Parameters:
hits - is the search hit array
Returns:
the ligand ID arrays for the hits, assigning a ligand ID array to each hit, null if the search hit array is null
See Also:
findLigandIds(int[])

findLigands

public Molecule[] findLigands(int[] hit)
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Creates decomposition fragments: scaffold and ligands. Structures are returned in an array, one structure for each query atom: the same target scaffold structure object for scaffold query atoms, and corresponding ligand objects for rgroup query atoms, the same object is returned for different rgroup query atoms if they hold the same ligand. Attachment atoms are marked according to attachment type set in setAttachmentType(int). If a query atom matches an implicit hydrogen then null is set if the query atom is an rgroup, the scaffold is set otherwise.

Parameters:
hit - is the search hit returned by MolSearch.findFirst(), MolSearch.findNext() or fetched from the decomposition result record
Returns:
the decomposition fragments: scaffold and ligands, each assigned to the corresponding query atom index in the result array, null if the search hit is null

findAllLigands

public Molecule[][] findAllLigands(int[][] hits)
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Returns the ligand arrays for all hits in the given hit array.

Parameters:
hits - is the search hit array
Returns:
the ligand arrays for the hits, assigning a ligand array to each hit, null if the search hit array is null
See Also:
findLigands(int[])

getTargetRMap

public int[] getTargetRMap(int[] ligandIds)
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Returns the ligand ID rgroup index map. This is:

Parameters:
ligandIds - is the ligand ID array returned by findLigandIds(int[])
Returns:
the rgroup index map
See Also:
Decomposition.color(), Decomposition.color(java.lang.String)

getTargetRMapString

public java.lang.String getTargetRMapString(int[] ligandIds)
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Returns a list of ligand ID symbols separated by SEPARATOR characters. Used for setting color map in an SDF tag. Run MView with setting atom colors from the SDF tag DMAP, symbol - color pairs given in file Colors.ini:
 mview -t DMAP -p Colors.ini ligands.sdf
 
The symbols are the following:

Parameters:
ligandIds - is the ligand ID array returned by findLigandIds(int[])
Returns:
a list of ligand ID symbols for each target atom, separated by SEPARATOR characters
See Also:
Decomposition.color(), Decomposition.color(java.lang.String)

getQueryRMap

public int[] getQueryRMap()
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Returns the query rgroup index map. Used for setting this symbol for each atom, separated by SEPARATOR characters, for uniform ligand coloring.

Returns:
the query rgroup index map
See Also:
getUniformRMapString(int, Molecule), Decomposition.color(), Decomposition.color(java.lang.String)

getQueryRMapString

public java.lang.String getQueryRMapString()
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Returns a list of query rgroup index symbols separated by SEPARATOR characters. Used for setting color map in an SDF tag. Run MView with setting atom colors from the SDF tag DMAP, symbol - color pairs given in file Colors.ini:
 mview -t DMAP -p Colors.ini mols.sdf
 
The symbols are the following:

Returns:
the query color symbol string
See Also:
Decomposition.color(), Decomposition.color(java.lang.String)

getUniformRMap

public static int[] getUniformRMap(int rmap,
                                   Molecule mol)
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Returns the same ligand symbol for each atom, for uniform ligand coloring, but for pseudo-atoms denoting attachment points in scaffold the scaffold symbol '0' is set.

Parameters:
rmap - is the rgroup map symbol
mol - is the ligand / scaffold molecule
Returns:
the corresponding ligand / scaffold symbol array
Since:
JChem 5.1.1
See Also:
Decomposition.color(chemaxon.struc.Molecule), Decomposition.color(chemaxon.struc.Molecule, java.lang.String)

getUniformRMapString

public static java.lang.String getUniformRMapString(int rmap,
                                                    Molecule mol)
Deprecated. as of JChem 5.3, use findFirstDecomposition() and findNextDecomposition() to get decomposition results (the current implementation ignores the hit parameter and uses the latest groupHit found by the search process)

Returns the same ligand symbol for each atom, separated by SEPARATOR characters, for uniform ligand coloring, but for any-atoms denoting attachment points in scaffold the scaffold symbol '0' is set. This string is used to set in a molecule property (SDF tag) for setting coloring in MView. Run MView with setting atom colors from the SDF tag DMAP, symbol - color pairs given in file Colors.ini:
 mview -t DMAP -p Colors.ini ligands.sdf
 

Parameters:
rmap - is the rgroup map symbol
mol - is the ligand / scaffold molecule
Returns:
the corresponding ligand / scaffold symbol string
See Also:
getQueryRMap(), Decomposition.color(chemaxon.struc.Molecule), Decomposition.color(chemaxon.struc.Molecule, java.lang.String)

getLigandTable

public Molecule[][] getLigandTable(int[][] hits,
                                   int headerType,
                                   int addCols)
Deprecated. as of JChem 5.3, use findLigandTable(int, int) to get decomposition results (the current implementation ignores the hits parameter and uses all filtered group hits - skipping equivalent hits - instead)

Returns the ligand table. Format:
 query    scaffold        R1         R2         R3    ...
 ---------------------------------------------------------
 target   scaffold1    ligand1.1  ligand1.2  ligand1.3
 target   scaffold2    ligand2.1  ligand2.2  ligand2.3
 
in a Molecule[][] array (table): If there are more Rgroup ligands with the same rgroup index in the query (e.g. multiple R1 groups) then corresponding ligands will be fused. If there is no Rgroup ligand with an rgroup index then the corresponding table entry is null. Color map symbols are stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Rgroups in the table header are represented by any-atoms with rgroup index set in atom map to enable SMILES export.

Parameters:
hits - is the hit array (possibly returned by MolSearch.findAll()
headerType - is the header type:
addCols - additional columns to include:
Returns:
the molecule table
Since:
JChem 5.1.1

getLigandTable

public Molecule[][] getLigandTable(int[][] hits,
                                   int headerType,
                                   int addCols,
                                   java.lang.String colorTag)
Deprecated. as of JChem 5.3, use findLigandTable(int, int, java.lang.String) to get decomposition results (the current implementation ignores the hits parameter and uses all filtered group hits - skipping equivalent hits - instead)

Returns the ligand table. Format:
 query    scaffold        R1         R2         R3    ...
 ---------------------------------------------------------
 target   scaffold1    ligand1.1  ligand1.2  ligand1.3
 target   scaffold2    ligand2.1  ligand2.2  ligand2.3
 
in a Molecule[][] array (table): If there are more Rgroup ligands with the same rgroup index in the query (e.g. multiple R1 groups) then corresponding ligands will be fused. If there is no Rgroup ligand with an rgroup index then the corresponding table entry is null. If the colorTag is specified then a color map symbol is set in the molecule property for each atom, separated by SEPARATOR characters: You can run MView with setting atom colors from the SDF tag DMAP, symbol - color pairs given in file Colors.ini:
 mview -t DMAP -p Colors.ini ligands.sdf
 
By default, color map is stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Rgroups in the table header are represented by any-atoms with rgroup index set in atom map to enable SMILES export.

Parameters:
hits - is the hit array (possibly returned by MolSearch.findAll()
headerType - is the header type:
addCols - additional columns to include:
colorTag - is the molecule property name for setting the color map (null if no color map data is to be set)
Returns:
the molecule table

getLigandTable

public Molecule[][] getLigandTable(int[][] hits,
                                   int[][] ligandIdArrays,
                                   int headerType,
                                   int addCols,
                                   java.lang.String colorTag)
Deprecated. as of JChem 5.3, use findLigandTable(int, int, java.lang.String) to get decomposition results (the current implementation ignores the hits parameter and uses all filtered group hits - skipping equivalent hits - instead)

Returns the ligand table. Format:
 query    scaffold        R1         R2         R3    ...
 ---------------------------------------------------------
 target   scaffold1    ligand1.1  ligand1.2  ligand1.3
 target   scaffold2    ligand2.1  ligand2.2  ligand2.3
 
in a Molecule[][] array (table): If there are more Rgroup ligands with the same rgroup index in the query (e.g. multiple R1 groups) then corresponding ligands will be fused. If there is no Rgroup ligand with an rgroup index then the corresponding table entry is null. If the colorTag is specified then a color map symbol is set in the molecule property for each atom, separated by SEPARATOR characters: You can run MView with setting atom colors from the SDF tag DMAP, symbol - color pairs given in file Colors.ini:
 mview -t DMAP -p Colors.ini ligands.sdf
 
By default, color map is stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Rgroups in the table header are represented by any-atoms with rgroup index set in atom map to enable SMILES export.

Parameters:
hits - is the hit array (possibly returned by MolSearch.findAll()
ligandIdArrays - is the array of ligand Ids corresponding to the hits
headerType - is the header type:
addCols - additional columns to include:
colorTag - is the molecule property name for setting the color map null if color should be stored in atomsets
Returns:
the molecule table

findLigandTable

public Molecule[][] findLigandTable(int headerType,
                                    int addCols)
                             throws chemaxon.sss.search.SearchException
Returns the ligand table. Format:
 query    scaffold        R1         R2         R3    ...
 ---------------------------------------------------------
 target   scaffold1    ligand1.1  ligand1.2  ligand1.3
 target   scaffold2    ligand2.1  ligand2.2  ligand2.3
 
in a Molecule[][] array (table): If there are more Rgroup ligands with the same rgroup index in the query (e.g. multiple R1 groups) then corresponding ligands will be fused. If there is no Rgroup ligand with an rgroup index then the corresponding table entry is null. Color map is stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Rgroups in the table header are represented by any-atoms with rgroup index set in atom map to enable SMILES export.

Parameters:
headerType - is the header type:
addCols - additional columns to include:
Returns:
the molecule table
Throws:
chemaxon.sss.search.SearchException - on search error
Since:
JChem 5.3

findLigandTable

public Molecule[][] findLigandTable(int headerType,
                                    int addCols,
                                    java.lang.String colorTag)
                             throws chemaxon.sss.search.SearchException
Returns the ligand table. Format:
 query    scaffold        R1         R2         R3    ...
 ---------------------------------------------------------
 target   scaffold1    ligand1.1  ligand1.2  ligand1.3
 target   scaffold2    ligand2.1  ligand2.2  ligand2.3
 
in a Molecule[][] array (table): If there are more Rgroup ligands with the same rgroup index in the query (e.g. multiple R1 groups) then corresponding ligands will be fused. If there is no Rgroup ligand with an rgroup index then the corresponding table entry is null. If the colorTag is specified then a color map symbol is set in the molecule property for each atom, separated by SEPARATOR characters: You can run MView with setting atom colors from the SDF tag DMAP, symbol - color pairs given in file Colors.ini:
 mview -t DMAP -p Colors.ini ligands.sdf
 
By default, color map is stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Rgroups in the table header are represented by any-atoms with rgroup index set in atom map to enable SMILES export.

Parameters:
headerType - is the header type:
addCols - additional columns to include:
colorTag - is the molecule property name for setting the color map null if color should be stored in atomsets
Returns:
the molecule table
Throws:
chemaxon.sss.search.SearchException - on search error
Since:
JChem 5.3

findLigandTableRow

public Molecule[] findLigandTableRow(int addCols)
                              throws chemaxon.sss.search.SearchException
Returns a ligand table row with ligands corresponding to a the first search hit. Format:
 target    scaffold        ligand R1     ligand R2     ligand R3    ...
 
The target and the scaffold columns are optional. The color map is stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Attachment points in ligands are represented according to attachment type set in setAttachmentType(int).

Parameters:
addCols - additional columns to include:
Returns:
the table row
Throws:
chemaxon.sss.search.SearchException - on search error
Since:
JChem 5.3

findLigandTableRow

public Molecule[] findLigandTableRow(int addCols,
                                     java.lang.String colorTag)
                              throws chemaxon.sss.search.SearchException
Returns a ligand table row with ligands corresponding to a the first search hit. Format:
 target    scaffold        ligand R1     ligand R2     ligand R3    ...
 
The target and the scaffold columns are optional. By default, color map is stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Attachment points in ligands are represented according to attachment type set in setAttachmentType(int).

Parameters:
addCols - additional columns to include:
colorTag - is the molecule property name for setting the color map, null if color should be stored in atomsets
Returns:
the table row
Throws:
chemaxon.sss.search.SearchException - on search error
Since:
JChem 5.3

getLigandTableHeader

public Molecule[] getLigandTableHeader(int headerType,
                                       int addCols)
Returns ligand table header. Format:
 query    scaffold        R1         R2         R3    ...
 
The query and the scaffold columns are optional. Color maps are stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Rgroups in the table header are represented by any-atoms with rgroup index set in atom map or by rgroup atoms.

Parameters:
headerType - is the header type:
  • HEADER_RGROUP for header with rgroup atoms (cannot be exported to SMILES)
  • HEADER_MAP for mapped any atoms (for SMILES export)
addCols - additional columns to include:
Since:
JChem 5.1.1

getLigandTableHeader

public Molecule[] getLigandTableHeader(int headerType,
                                       int addCols,
                                       java.lang.String colorTag)
Returns ligand table header. Format:
 query    scaffold        R1         R2         R3    ...
 
The query and the scaffold columns are optional. By default, color map is stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Rgroups in the table header are represented by any-atoms with rgroup index set in atom map or by rgroup atoms.

Parameters:
headerType - is the header type:
  • HEADER_RGROUP for header with rgroup atoms (cannot be exported to SMILES)
  • HEADER_MAP for mapped any atoms (for SMILES export)
addCols - additional columns to include:
colorTag - is the molecule property name for setting the color map, null if color should be stored in atomsets

getLigandTableRow

public Molecule[] getLigandTableRow(int[] hit,
                                    int addCols)
Deprecated. as of JChem 5.3, use findLigandTableRow(int, java.lang.String) to get decomposition results (the current implementation ignores the hit parameter and and uses the latest groupHit found by the search process)

Returns a ligand table row with ligands corresponding to a given search hit. Format:
 target    scaffold        ligand R1     ligand R2     ligand R3    ...
 
The target and the scaffold columns are optional. Color maps are stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Attachment points in ligands are represented according to attachment type set in setAttachmentType(int).

Parameters:
hit - is the search hit
addCols - additional columns to include:
Since:
JChem 5.1.1

getLigandTableRow

public Molecule[] getLigandTableRow(int[] hit,
                                    int addCols,
                                    java.lang.String colorTag)
Deprecated. as of JChem 5.3, use findLigandTableRow(int, java.lang.String) to get decomposition results (the current implementation ignores the hit parameter and and uses the latest groupHit found by the search process)

Returns a ligand table row with ligands corresponding to a given search hit. Format:
 target    scaffold        ligand R1     ligand R2     ligand R3    ...
 
The target and the scaffold columns are optional. By default, color map is stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Attachment points in ligands are represented according to attachment type set in setAttachmentType(int).

Parameters:
hit - is the search hit
addCols - additional columns to include:
colorTag - is the molecule property name for setting the color map, null if color should be stored in atomsets

getLigandTableRow

public Molecule[] getLigandTableRow(int[] hit,
                                    int[] ligandIds,
                                    int addCols,
                                    java.lang.String colorTag)
Deprecated. as of JChem 5.3, use findLigandTableRow(int, java.lang.String) to get decomposition results (the current implementation ignores the hit and the ligandIds parameters and and uses the latest groupHit found by the search process)

Returns a ligand table row with ligands corresponding to a given search hit. Format:
 target    scaffold        ligand R1     ligand R2     ligand R3    ...
 
The target and the scaffold columns are optional. By default, color map is stored in atom sets which can be written in MRV format and is automatically handled by MView. See MolAtom.getSetSeq(). Attachment points in ligands are represented according to attachment type set in setAttachmentType(int).

Parameters:
hit - is the search hit
ligandIds - is the corresponding ligand ID array returned by findLigandIds(int[])
addCols - additional columns to include:
colorTag - is the molecule property name for setting the color map null if color should be stored in atomsets

isLicensed

public boolean isLicensed()
Specified by:
isLicensed in interface chemaxon.license.Licensable
Overrides:
isLicensed in class MolSearch

setLicenseEnvironment

public void setLicenseEnvironment(java.lang.String env)
Specified by:
setLicenseEnvironment in interface chemaxon.license.Licensable
Overrides:
setLicenseEnvironment in class MolSearch