chemaxon.util
Class HitDisplayUtil

java.lang.Object
  extended by chemaxon.util.HitDisplayUtil

public class HitDisplayUtil
extends java.lang.Object

Class providing some utility tools for displaying hit results with hit coloring, alignment, partial clean, etc.

Since:
Marvin 5.1
Author:
Szilard Dorant, Tamas Csizmazia

Field Summary
static java.lang.String PROP_ALIGNHIT
          Atom property to store "align hit" option.
static int SEQ_RESTORE
          Bond set sequence constant to be set if bond color is to be reset.
 
Constructor Summary
HitDisplayUtil()
           
 
Method Summary
static void color(Molecule substructure, Molecule molToColor, HitColoringAndAlignmentOptions options)
          Only for internal use!
static void color(Molecule substructure, Molecule molToColor, int[] hit, HitColoringAndAlignmentOptions options)
          Performs hit coloring on the specified structure.
protected static java.util.ArrayList<MolBond> getNonHitBonds(Molecule query, Molecule target, int[] hit)
          Returns the bonds of the target molecule that should not be colored in hit highlighting.
static Molecule getScaffoldOrientatedHit(Molecule scaffold, Molecule molToAlign)
          Only for internal use!
static Molecule getScaffoldOrientatedHit(Molecule query, Molecule target, int[] hit)
          Returns an aligned (rotated) version of molToAlign that contains scaffold - possibly in the same position or optimally close to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEQ_RESTORE

public static final int SEQ_RESTORE
Bond set sequence constant to be set if bond color is to be reset.

See Also:
Constant Field Values

PROP_ALIGNHIT

public static final java.lang.String PROP_ALIGNHIT
Atom property to store "align hit" option.

See Also:
Constant Field Values
Constructor Detail

HitDisplayUtil

public HitDisplayUtil()
Method Detail

getScaffoldOrientatedHit

public static Molecule getScaffoldOrientatedHit(Molecule scaffold,
                                                Molecule molToAlign)
Only for internal use!

Parameters:
scaffold - base for alignment
molToAlign - molecule that should be aligned to scaffold
Returns:
aligned molecule

getScaffoldOrientatedHit

public static Molecule getScaffoldOrientatedHit(Molecule query,
                                                Molecule target,
                                                int[] hit)
Returns an aligned (rotated) version of molToAlign that contains scaffold - possibly in the same position or optimally close to it.

Parameters:
query - scaffold baseline for alignment
target - molToAlign molecule that should be aligned to scaffold
hit - ordered array (its size must be equal to scaffold size), describes matchings between scaffold and molToAlign atom indices (e.g. scaffold[2] --> molToAlign[5] ==> hit[2] = 5)
Returns:
aligned molecule

color

public static void color(Molecule substructure,
                         Molecule molToColor,
                         HitColoringAndAlignmentOptions options)
Only for internal use!

Parameters:
substructure - the structure taken as a template for coloring
molToColor - the structure to be colored
options - coloring options

color

public static void color(Molecule substructure,
                         Molecule molToColor,
                         int[] hit,
                         HitColoringAndAlignmentOptions options)
Performs hit coloring on the specified structure.

Parameters:
substructure - the structure taken as a template for coloring
molToColor - the structure to be colored
hit - maps atoms of the template to atoms in the colored structure
options - coloring options

getNonHitBonds

protected static java.util.ArrayList<MolBond> getNonHitBonds(Molecule query,
                                                             Molecule target,
                                                             int[] hit)
Returns the bonds of the target molecule that should not be colored in hit highlighting. Bonds surrounding lonely atoms are never included Bonds between targets atoms belonging to the same query atom are also accepted. e.g. qHomology see setMultiAtomHitColor(Molecule, Molecule, int[]).

Parameters:
query - the query Molecule
target - the target Molecule
hit - the hit list
Returns:
the non-hit bonds specified by the atom indexes of their endpoints. The ArrayList contains MolBond objects.
Since:
JChem 2.2