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

Constructor Summary
HitDisplayUtil()
           
 
Method Summary
static void color(Molecule substructure, Molecule molToColor, HitColoringAndAlignmentOptions options)
          Performs hit coloring on the specified structure.
static void color(Molecule substructure, Molecule molToColor, int[] hit, HitColoringAndAlignmentOptions options)
          Performs hit coloring on the specified structure.
protected static java.util.ArrayList 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
 

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)
Performs hit coloring on the specified structure.

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 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

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