chemaxon.sss.search
Class Decomposition

java.lang.Object
  extended by chemaxon.sss.search.Decomposition

public class Decomposition
extends java.lang.Object

Class storing RGroupDecomposition results.

Since:
JChem 5.3
Author:
Nora Mate
See Also:
RGroupDecomposition.findFirstDecomposition(), RGroupDecomposition.findNextDecomposition(), RGroupDecomposition.findDecomposition()

Field Summary
static int ATTACHMENT_ATOM
          Constant for attachment point representation in ligands: sets attachment points by attaching an any-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: R-group attachment.
static int ATTACHMENT_RLABEL
          Constant for attachment point representation in ligands: sets attachment points by MolAtom.setExtraLabel(java.lang.String).
 
Constructor Summary
protected Decomposition(Molecule query, Molecule target, int[][] groupHit, Molecule[] ligands, Molecule scaffold, int attachmentType)
          Constructor.
 
Method Summary
 void color()
          Colors ligands, scaffold, query and target by setting color data in atoms by calling MolAtom.setSetSeq(int).
static void color(Molecule mol)
          Colors a molecule by setting color data in atoms by calling MolAtom.setSetSeq(int).
static void color(Molecule mol, java.lang.String colorTag)
          Colors a molecule by setting color data in the specified molecule property (SDF tag).
 void color(java.lang.String colorTag)
          Colors ligands, scaffold, query and target by setting color data in the specified molecule property (SDF tag).
 boolean equals(java.lang.Object o)
          Returns true if this decomposition is equivalent to the specified decomposition.
 int[][] getGroupHit()
          Returns the group hit corresponding to the R-group decomposition.
 int[] getLigandIds()
          Returns the target ligand IDs.
 Molecule[] getLigands()
          Returns the R-ligand array.
 Molecule getQuery()
          Returns the R-grouped query used in the R-group decomposition.
 Molecule getScaffold()
          Returns the scaffold in target.
 Molecule getTarget()
          Returns the target.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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: R-group attachment.

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 any-atom.

See Also:
Constant Field Values
Constructor Detail

Decomposition

protected Decomposition(Molecule query,
                        Molecule target,
                        int[][] groupHit,
                        Molecule[] ligands,
                        Molecule scaffold,
                        int attachmentType)
Constructor.

Parameters:
query - the R-grouped query
target - the target
groupHit - the group hit
ligands - the R-ligands
scaffold - the scaffold
attachmentType - the attachment type
Method Detail

equals

public boolean equals(java.lang.Object o)
Returns true if this decomposition is equivalent to the specified decomposition. Equivalent decompositions correspond to the same query and target and provide equivalent scaffold and R-ligands.

Overrides:
equals in class java.lang.Object
Parameters:
o - the other decomposition
Returns:
true if this decomposition is equivalent to the other decomposition

getQuery

public Molecule getQuery()
Returns the R-grouped query used in the R-group decomposition.

Returns:
the R-grouped query.

getTarget

public Molecule getTarget()
Returns the target.

Returns:
the target

getGroupHit

public int[][] getGroupHit()
Returns the group hit corresponding to the R-group decomposition. The group hit assigns the matching target index array for each query atom index. Negative entries refer to implicit H matches or specific constants, see Search.findNext() for a detailed description.

Returns:
the group hit corresponding to the R-group decomposition

getLigands

public Molecule[] getLigands()
Returns the R-ligand array. This array maps query atom indexes to the corresponding R-ligand molecules for undefined R-atoms and assigns null to other query atoms.

Returns:
the R-ligand array

getScaffold

public Molecule getScaffold()
Returns the scaffold in target.

Returns:
the scaffold

getLigandIds

public int[] getLigandIds()
Returns the target ligand IDs. This is a map of target atoms:

Returns:
the target ligand IDs

color

public void color()
Colors ligands, scaffold, query and target by setting color data in atoms by calling MolAtom.setSetSeq(int). This coloring method can be used with MRV output. The atom set values are the following:

See Also:
color(java.lang.String)

color

public static void color(Molecule mol)
Colors a molecule by setting color data in atoms by calling MolAtom.setSetSeq(int). This coloring method can be used with MRV output. The atom set values are the following:


color

public void color(java.lang.String colorTag)
Colors ligands, scaffold, query and target by setting color data in the specified molecule property (SDF tag). This coloring method can be used with both SDF and MRV output. The color data is a ';'-separated string of atom symbols in atom index order. The symbols are the following: The colored molecules are seen in MView with the following parametrization:
 mview -t DMAP -p Colors.ini mols.sdf
 
where DMAP is the color SDF tag, Colors.ini is the coloring configuration file containing symbol - color pairs, e.g.:
 0=red
 -=black
 1=green
 2=blue
 3=orange
 4=fuchsia
 empty=black
 other=gray
 

Parameters:
colorTag - the property name (SDF tag) storing the color data
See Also:
color()

color

public static void color(Molecule mol,
                         java.lang.String colorTag)
Colors a molecule by setting color data in the specified molecule property (SDF tag). This coloring method can be used with both SDF and MRV output. The color data is a ';'-separated string of atom symbols in atom index order. The symbols are the following: The colored molecules are seen in MView with the following parametrization:
 mview -t DMAP -p Colors.ini mols.sdf
 
where DMAP is the color SDF tag, Colors.ini is the coloring configuration file containing symbol - color pairs, e.g.:
 0=red
 -=black
 1=green
 2=blue
 3=orange
 4=fuchsia
 empty=black
 other=gray
 

Parameters:
colorTag - the property name (SDF tag) storing the color data