Class ObjectiveBlurFlexophoreHardMatchUncovered
- java.lang.Object
-
- com.actelion.research.chem.descriptor.flexophore.completegraphmatcher.ObjectiveBlurFlexophoreHardMatchUncovered
-
- All Implemented Interfaces:
IObjectiveCompleteGraph<IMolDistHist>
public class ObjectiveBlurFlexophoreHardMatchUncovered extends java.lang.Object implements IObjectiveCompleteGraph<IMolDistHist>
ObjectiveBlurFlexophoreHardMatchUncovered The weighting of the coverage is hard. Which means that uncovered nodes strongly change the final similarity score. look ingetScoreUncoveredNearestNodesBase(SolutionCompleteGraph solution)
andgetScoreUncoveredNearestNodesQuery(SolutionCompleteGraph solution)
. Use is subject to license terms.- Author:
- Modest von Korff Oct 2, 2012 MvK: Start implementation Mar 3. 2016 MvK: updates. Lowered thresh for histogram similarity. Mar 31. 2020 MvK: fraction of carbon is considered in pharmacophore node similarity.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INFO
static double
THRESH_HISTOGRAM_SIMILARITY
static java.lang.String
VERSION
-
Constructor Summary
Constructors Constructor Description ObjectiveBlurFlexophoreHardMatchUncovered()
ObjectiveBlurFlexophoreHardMatchUncovered(int versionInteractionTable, int modePPNodeSimilarity, double threshSimilarityNodeHardMatch, double threshHistogramSimilarity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areNodesMapping(int indexNodeQuery, int indexNodeBase)
Dynamic calculation of similarity threshold.IMolDistHist
getBase()
long
getDeltaNanoBaseBlur()
long
getDeltaNanoQueryBlur()
long
getDeltaNanoSimilarity()
IMolDistHist
getQuery()
float
getSimilarity(SolutionCompleteGraph solution)
float
getSimilarityHistogram(int indexNode1Query, int indexNode2Query, int indexNode1Base, int indexNode2Base)
float
getSimilarityHistogramsForNode(SolutionCompleteGraph solution, int indexHeap)
double
getSimilarityNodes(int indexNodeQuery, int indexNodeBase)
double
getSimilarityNodes(IPPNode query, IPPNode base)
boolean
isModeQuery()
boolean
isValidSolution(SolutionCompleteGraph solution)
If a single histogram is not matching the solution is invalid.void
setBase(IMolDistHist iMolDistHistBase)
void
setMatchingInfoInQueryAndBase(SolutionCompleteGraph solution)
Sets the color information for the visualization of the Flexophore PPPoints.void
setModeQuery(boolean modeQuery)
void
setQuery(IMolDistHist iMolDistHistQuery)
void
setVerbose(boolean v)
java.lang.String
toString()
java.lang.String
toStringParameter()
java.lang.String
toStringRecentSimilarityResults()
-
-
-
Field Detail
-
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
-
INFO
public static final java.lang.String INFO
- See Also:
- Constant Field Values
-
THRESH_HISTOGRAM_SIMILARITY
public static final double THRESH_HISTOGRAM_SIMILARITY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ObjectiveBlurFlexophoreHardMatchUncovered
public ObjectiveBlurFlexophoreHardMatchUncovered()
-
ObjectiveBlurFlexophoreHardMatchUncovered
public ObjectiveBlurFlexophoreHardMatchUncovered(int versionInteractionTable, int modePPNodeSimilarity, double threshSimilarityNodeHardMatch, double threshHistogramSimilarity)
-
-
Method Detail
-
setModeQuery
public void setModeQuery(boolean modeQuery)
-
isModeQuery
public boolean isModeQuery()
-
toStringParameter
public java.lang.String toStringParameter()
-
setVerbose
public void setVerbose(boolean v)
- Specified by:
setVerbose
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
isValidSolution
public boolean isValidSolution(SolutionCompleteGraph solution)
If a single histogram is not matching the solution is invalid. If at least one node is not matching the solution is invalid.- Specified by:
isValidSolution
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
areNodesMapping
public boolean areNodesMapping(int indexNodeQuery, int indexNodeBase)
Dynamic calculation of similarity threshold. Depends on the number of interaction types in the nodes.- Specified by:
areNodesMapping
in interfaceIObjectiveCompleteGraph<IMolDistHist>
- Parameters:
indexNodeQuery
-indexNodeBase
-- Returns:
-
getSimilarity
public float getSimilarity(SolutionCompleteGraph solution)
- Specified by:
getSimilarity
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
getSimilarityHistogramsForNode
public float getSimilarityHistogramsForNode(SolutionCompleteGraph solution, int indexHeap)
- Parameters:
solution
- a valid solution for IMolDistHis base and IMolDistHis query. Query and base must be set before starting the similarity calculation.indexHeap
- heap index of the node for which the histogram similarities to all other nodes will be calculated. indexHeap is the index from the list of matching query and base nodes.- Returns:
- histogram similarity for a single node. Calculated as average from the sum of histogram similarities.
-
getDeltaNanoQueryBlur
public long getDeltaNanoQueryBlur()
-
getDeltaNanoBaseBlur
public long getDeltaNanoBaseBlur()
-
getDeltaNanoSimilarity
public long getDeltaNanoSimilarity()
-
setMatchingInfoInQueryAndBase
public void setMatchingInfoInQueryAndBase(SolutionCompleteGraph solution)
Sets the color information for the visualization of the Flexophore PPPoints. Call before visualization. Method sets identical info values for corresponding nodes.- Specified by:
setMatchingInfoInQueryAndBase
in interfaceIObjectiveCompleteGraph<IMolDistHist>
- Parameters:
solution
-
-
getBase
public IMolDistHist getBase()
- Specified by:
getBase
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
getQuery
public IMolDistHist getQuery()
- Specified by:
getQuery
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
setBase
public void setBase(IMolDistHist iMolDistHistBase)
- Specified by:
setBase
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
setQuery
public void setQuery(IMolDistHist iMolDistHistQuery)
- Specified by:
setQuery
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
getSimilarityNodes
public double getSimilarityNodes(int indexNodeQuery, int indexNodeBase)
- Specified by:
getSimilarityNodes
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
getSimilarityHistogram
public float getSimilarityHistogram(int indexNode1Query, int indexNode2Query, int indexNode1Base, int indexNode2Base)
- Specified by:
getSimilarityHistogram
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
getSimilarityNodes
public double getSimilarityNodes(IPPNode query, IPPNode base)
- Specified by:
getSimilarityNodes
in interfaceIObjectiveCompleteGraph<IMolDistHist>
-
toStringRecentSimilarityResults
public java.lang.String toStringRecentSimilarityResults()
- Returns:
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-