Class MolDistHistViz
- java.lang.Object
-
- com.actelion.research.chem.descriptor.flexophore.DistHist
-
- com.actelion.research.chem.descriptor.flexophore.MolDistHistViz
-
- All Implemented Interfaces:
IMolDistHist
,ICompleteGraph
,java.io.Serializable
- Direct Known Subclasses:
MolDistHistVizFrag
public class MolDistHistViz extends DistHist implements java.io.Serializable, IMolDistHist, ICompleteGraph
Class for Flexophore visualization and atom tracking. Information about corresponding atoms is stored in PPNodeViz.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
CAPACITY_INEVITABLE_PPPOINTS
static java.lang.String[]
COLORS
Colors for visualization of the Flexophore mapping.static int
DESCRIBE_ALL
static int
DESCRIBE_MAPPED
Only mapped atoms are described.protected Molecule3D
molecule3D
static java.lang.String
TAG_VIZ_INFO_ENCODED
-
Fields inherited from class com.actelion.research.chem.descriptor.flexophore.DistHist
arrDistHists
-
-
Constructor Summary
Constructors Constructor Description MolDistHistViz()
MolDistHistViz(int nNodes)
MolDistHistViz(int nNodes, Molecule3D molecule3D)
MolDistHistViz(MolDistHist mdh)
MolDistHistViz(MolDistHistViz mdhv)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addInevitablePharmacophorePoint(int indexPPNode)
int
addNode(PPNodeViz node)
void
blurrSingleBinHistograms()
void
calculate()
void
canonize()
boolean
check()
MolDistHistViz
copy()
void
copy(MolDistHistViz copy)
static void
createIndexTables()
void
createNodeIndex()
This index is used to track the fate of the nodes MvK 17.07.2007boolean
equals(java.lang.Object o)
protected static Molecule3D
finalizeMolecule(Molecule3D mol)
Remove all atoms without connections.protected static java.lang.String
formatDescription(java.lang.String s)
int
getBondAtom(int index, int bond)
int
getConnAtom(int at, int index)
int
getConnBond(int at, int index)
java.util.List<float[][]>
getDistanceTables()
protected java.util.HashSet<java.lang.Integer>
getHashSetIndexInevitablePPPoints()
int
getIndexFromCoord(double x, double y, double z)
java.util.List<java.lang.Integer>
getInevitablePharmacophorePoints()
int
getInfo(int index)
double
getMaximumDistanceInPPPoint(int indexNode)
MolDistHist
getMolDistHist()
Molecule3D
getMolecule()
The atoms of the ff molecule contain the corresponding PPNode indices in the first field of the PPP vector.Molecule3D
getMoleculeRemovedUnrelatedAtoms()
java.lang.String
getName()
PPNodeViz
getNode(int i)
java.util.List<PPNodeViz>
getNodes()
int
getNumCExclusiveNodes()
int
getNumHeteroNodes()
int
getNumInevitablePharmacophorePoints()
int
hashCode()
protected void
initHistogramArray(int size)
boolean
isAcceptor(int indexNode)
boolean
isAliphatic(int indexNode)
boolean
isAromatic(int indexNode)
boolean
isChargeNeg(int indexNode)
boolean
isChargePos(int indexNode)
boolean
isDonor(int indexNode)
boolean
isInevitablePharmacophorePoint(int indexNode)
boolean
isMarked(int index)
boolean
isOnlyCarbon(int index)
static void
merge(MolDistHistViz mdhviz, MolDistHist mdh)
Deprecated.void
realize()
Canonizes theMolDistHistViz
Must be called after changes in the nodes or distance histograms.void
recalculateCoordPPPoints()
Recalculates the coordinates off the pharmacophore nodes.void
removeInevitablePharmacophorePoint(int indexPPNode)
void
resetInevitablePharmacophorePoints()
void
resetInfoColor()
void
set(Molecule3D ff)
void
set(java.util.List<PPNodeViz> liPPNodeViz)
void
setDistanceTables(java.util.List<double[][]> liDistanceTable)
The distance tables which were generated from the conformations.void
setMappingIndex(int index, int info)
void
setMark(int index, boolean mark)
void
setMarkAll(boolean mark)
void
setModeFlexophore(byte modeFlexophore)
void
setName(java.lang.String name)
void
setSimilarityMappingNodes(int index, float similarityMappingNodes)
static MolDistHistViz
summarizeAlkaneCluster(MolDistHistViz mdh, int maxDistance)
Summarizes alkane cluster.void
swapNodes(int n1, int n2)
java.lang.String
toString()
java.lang.String
toStringInevitable()
java.lang.String
toStringPPNodes()
Only nodes without coordinatesjava.lang.String
toStringShort()
-
Methods inherited from class com.actelion.research.chem.descriptor.flexophore.DistHist
copy, getBonds, getClusterCenter, getDistHist, getDistHist, getDistHists, getIdentifier, getIndex, getIndexPosStartForDistHist, getMaxDistInHist, getMinDist, getNumPPNodes, getRelMaxDistInHist, getRelMaxDistInHist, getSizeBytes, getValueAtAbsolutePosition, setDistHist, setDistHists, setIdentifier, toStringHistsIndexed
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.actelion.research.util.graph.complete.ICompleteGraph
getNumPPNodes
-
Methods inherited from interface com.actelion.research.chem.descriptor.flexophore.IMolDistHist
getDistHist, getRelMaxDistInHist
-
-
-
-
Field Detail
-
DESCRIBE_ALL
public static final int DESCRIBE_ALL
- See Also:
- Constant Field Values
-
DESCRIBE_MAPPED
public static final int DESCRIBE_MAPPED
Only mapped atoms are described.- See Also:
- Constant Field Values
-
CAPACITY_INEVITABLE_PPPOINTS
public static final int CAPACITY_INEVITABLE_PPPOINTS
- See Also:
- Constant Field Values
-
TAG_VIZ_INFO_ENCODED
public static final java.lang.String TAG_VIZ_INFO_ENCODED
- See Also:
- Constant Field Values
-
COLORS
public static final transient java.lang.String[] COLORS
Colors for visualization of the Flexophore mapping.
-
molecule3D
protected Molecule3D molecule3D
-
-
Constructor Detail
-
MolDistHistViz
public MolDistHistViz()
-
MolDistHistViz
public MolDistHistViz(int nNodes)
-
MolDistHistViz
public MolDistHistViz(int nNodes, Molecule3D molecule3D)
-
MolDistHistViz
public MolDistHistViz(MolDistHistViz mdhv)
-
MolDistHistViz
public MolDistHistViz(MolDistHist mdh)
-
-
Method Detail
-
createIndexTables
public static void createIndexTables()
-
addInevitablePharmacophorePoint
public void addInevitablePharmacophorePoint(int indexPPNode)
-
removeInevitablePharmacophorePoint
public void removeInevitablePharmacophorePoint(int indexPPNode)
-
setModeFlexophore
public void setModeFlexophore(byte modeFlexophore)
-
setMarkAll
public void setMarkAll(boolean mark)
-
setMark
public void setMark(int index, boolean mark)
-
isMarked
public boolean isMarked(int index)
-
addNode
public int addNode(PPNodeViz node)
- Parameters:
node
-- Returns:
- index of the node.
-
check
public boolean check()
-
initHistogramArray
protected void initHistogramArray(int size)
- Overrides:
initHistogramArray
in classDistHist
-
copy
public MolDistHistViz copy()
-
copy
public void copy(MolDistHistViz copy)
- Parameters:
copy
- This is written into copy.
-
recalculateCoordPPPoints
public void recalculateCoordPPPoints()
Recalculates the coordinates off the pharmacophore nodes. Has to be called after changing the coordinates for the Molecule3D.
-
resetInevitablePharmacophorePoints
public void resetInevitablePharmacophorePoints()
-
resetInfoColor
public void resetInfoColor()
-
createNodeIndex
public void createNodeIndex()
This index is used to track the fate of the nodes MvK 17.07.2007
-
getBondAtom
public int getBondAtom(int index, int bond)
- Parameters:
index
- 0 or 1bond
- index of the bond array- Returns:
- the atom index
-
getConnAtom
public int getConnAtom(int at, int index)
-
getConnBond
public int getConnBond(int at, int index)
-
getIndexFromCoord
public int getIndexFromCoord(double x, double y, double z)
-
getInfo
public int getInfo(int index)
-
getNode
public PPNodeViz getNode(int i)
- Specified by:
getNode
in interfaceIMolDistHist
-
getNodes
public java.util.List<PPNodeViz> getNodes()
- Returns:
- shallow copy.
-
set
public void set(java.util.List<PPNodeViz> liPPNodeViz)
-
set
public void set(Molecule3D ff)
- Parameters:
ff
- has to be the molecule the descriptor was derived from.
-
setMappingIndex
public void setMappingIndex(int index, int info)
-
setSimilarityMappingNodes
public void setSimilarityMappingNodes(int index, float similarityMappingNodes)
-
getName
public java.lang.String getName()
-
setName
public void setName(java.lang.String name)
-
isOnlyCarbon
public boolean isOnlyCarbon(int index)
-
canonize
public void canonize()
-
swapNodes
public void swapNodes(int n1, int n2)
-
getNumCExclusiveNodes
public int getNumCExclusiveNodes()
-
getNumHeteroNodes
public int getNumHeteroNodes()
-
getInevitablePharmacophorePoints
public java.util.List<java.lang.Integer> getInevitablePharmacophorePoints()
-
getHashSetIndexInevitablePPPoints
protected java.util.HashSet<java.lang.Integer> getHashSetIndexInevitablePPPoints()
-
getNumInevitablePharmacophorePoints
public int getNumInevitablePharmacophorePoints()
- Specified by:
getNumInevitablePharmacophorePoints
in interfaceIMolDistHist
-
isInevitablePharmacophorePoint
public boolean isInevitablePharmacophorePoint(int indexNode)
- Specified by:
isInevitablePharmacophorePoint
in interfaceIMolDistHist
-
isAliphatic
public boolean isAliphatic(int indexNode)
-
isAcceptor
public boolean isAcceptor(int indexNode)
-
isDonor
public boolean isDonor(int indexNode)
-
isAromatic
public boolean isAromatic(int indexNode)
-
isChargePos
public boolean isChargePos(int indexNode)
-
isChargeNeg
public boolean isChargeNeg(int indexNode)
-
realize
public void realize()
Canonizes theMolDistHistViz
Must be called after changes in the nodes or distance histograms.
-
blurrSingleBinHistograms
public void blurrSingleBinHistograms()
-
calculate
public void calculate()
-
finalizeMolecule
protected static Molecule3D finalizeMolecule(Molecule3D mol)
Remove all atoms without connections.- Parameters:
mol
-- Returns:
-
getMolDistHist
public MolDistHist getMolDistHist()
- Returns:
- deep object.
-
getMaximumDistanceInPPPoint
public double getMaximumDistanceInPPPoint(int indexNode)
-
getMolecule
public Molecule3D getMolecule()
The atoms of the ff molecule contain the corresponding PPNode indices in the first field of the PPP vector.- Returns:
-
getMoleculeRemovedUnrelatedAtoms
public Molecule3D getMoleculeRemovedUnrelatedAtoms()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toStringInevitable
public java.lang.String toStringInevitable()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- Returns:
- A canonized representation of the object.
-
toStringPPNodes
public java.lang.String toStringPPNodes()
Only nodes without coordinates- Returns:
-
toStringShort
public java.lang.String toStringShort()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
setDistanceTables
public void setDistanceTables(java.util.List<double[][]> liDistanceTable)
The distance tables which were generated from the conformations.- Parameters:
liDistanceTable
-
-
getDistanceTables
public java.util.List<float[][]> getDistanceTables()
-
formatDescription
protected static java.lang.String formatDescription(java.lang.String s)
-
merge
public static void merge(MolDistHistViz mdhviz, MolDistHist mdh)
Deprecated.Merges the histograms from mdh into mdhviz.- Parameters:
mdhviz
- has new histograms afterwards.mdh
- stays unchanged.
-
summarizeAlkaneCluster
public static MolDistHistViz summarizeAlkaneCluster(MolDistHistViz mdh, int maxDistance)
Summarizes alkane cluster. The central node may not be a alkane cluster. The interaction types of the cluster members are added to the interaction types of the center node.- Parameters:
mdh
-maxDistance
-- Returns:
-
-