Class PPNodeSimilarity
- java.lang.Object
-
- com.actelion.research.chem.descriptor.flexophore.completegraphmatcher.PPNodeSimilarity
-
- All Implemented Interfaces:
IPPNodeSimilarity
public class PPNodeSimilarity extends java.lang.Object implements IPPNodeSimilarity
PPNodeSimilarityCopyright: Actelion Ltd., Inc. All Rights Reserved This software is the proprietary information of Actelion Pharmaceuticals, Ltd. Use is subject to license terms.
- Version:
- 1.0 Jan 7, 2013 MvK Start implementation Dec 2020, MvK unskewed similarity calculation for similarity hard thresh. Node similarity is now independent from query base order.
- Author:
- Modest von Korff
-
-
Field Summary
Fields Modifier and Type Field Description static double
HARD_MATCH_OPTIMISTIC_PERCENTILE
static int
SIMILARITY_MODE_CARBON
static int
SIMILARITY_MODE_HARD_THRESH
Hard thresh means if the similarity of two atom types in a node to node comparison is below a threshold the complete node to node similarity becomes 0.static int
SIMILARITY_MODE_HARD_THRESH_AVR
static int
SIMILARITY_MODE_HARD_THRESH_OPTIMISTIC
static int
SIMILARITY_MODE_SIMPLE
static double
THRESH_SIMILARITY_HARD_MATCH
Similarity value distribution of the interaction table (April 2020).
-
Constructor Summary
Constructors Constructor Description PPNodeSimilarity(int versionInteractionTable, int modePPNodeSimilarity)
This constructor is used for parallel mode.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PPNodeSimilarity
getInstance(int versionInteractionTable, int modePPNodeSimilarity)
Use this as constructor for serial mode.double
getSimilarity(IPPNode query, IPPNode base)
double
getSimilarityExtraCarbonConsideration(PPNode query, PPNode base)
double
getSimilarityHardMatchAverage(PPNode query, PPNode base)
double
getSimilarityHardMatchMultiplicative(PPNode query, PPNode base)
double
getSimilarityHardMatchOptimistic(PPNode query, PPNode base)
java.util.List<java.lang.Double>
getSimilarityList(PPNode query, PPNode base)
double
getSimilaritySimple(PPNode query, PPNode base)
boolean
isValidType(int type)
void
setThreshSimilarityHardMatch(double threshSimilarityHardMatch)
void
setVerbose(boolean v)
java.lang.String
toStringParameter()
-
-
-
Field Detail
-
SIMILARITY_MODE_SIMPLE
public static final int SIMILARITY_MODE_SIMPLE
- See Also:
- Constant Field Values
-
SIMILARITY_MODE_HARD_THRESH
public static final int SIMILARITY_MODE_HARD_THRESH
Hard thresh means if the similarity of two atom types in a node to node comparison is below a threshold the complete node to node similarity becomes 0.- See Also:
- Constant Field Values
-
SIMILARITY_MODE_HARD_THRESH_AVR
public static final int SIMILARITY_MODE_HARD_THRESH_AVR
- See Also:
- Constant Field Values
-
SIMILARITY_MODE_HARD_THRESH_OPTIMISTIC
public static final int SIMILARITY_MODE_HARD_THRESH_OPTIMISTIC
- See Also:
- Constant Field Values
-
SIMILARITY_MODE_CARBON
public static final int SIMILARITY_MODE_CARBON
- See Also:
- Constant Field Values
-
THRESH_SIMILARITY_HARD_MATCH
public static final double THRESH_SIMILARITY_HARD_MATCH
Similarity value distribution of the interaction table (April 2020). First two rows bin borders. Third row counts. .900 .905 .910 .915 .920 .925 .930 .935 .940 .945 .950 .955 .960 .965 .970 .975 .980 .985 .990 .995 .905 .910 .915 .920 .925 .930 .935 .940 .945 .950 .955 .960 .965 .970 .975 .980 .985 .990 .995 1.000 191 239 202 280 213 207 193 165 229 221 157 139 131 79 74 23 17 5 2 56 A similarity thresh of 0.99 allows 58 pairwise interactions.- See Also:
- Constant Field Values
-
HARD_MATCH_OPTIMISTIC_PERCENTILE
public static final double HARD_MATCH_OPTIMISTIC_PERCENTILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setThreshSimilarityHardMatch
public void setThreshSimilarityHardMatch(double threshSimilarityHardMatch)
-
toStringParameter
public java.lang.String toStringParameter()
-
getInstance
public static PPNodeSimilarity getInstance(int versionInteractionTable, int modePPNodeSimilarity)
Use this as constructor for serial mode.- Returns:
-
setVerbose
public void setVerbose(boolean v)
- Specified by:
setVerbose
in interfaceIPPNodeSimilarity
-
getSimilarity
public double getSimilarity(IPPNode query, IPPNode base)
- Specified by:
getSimilarity
in interfaceIPPNodeSimilarity
-
getSimilaritySimple
public double getSimilaritySimple(PPNode query, PPNode base)
- Parameters:
query
-base
-- Returns:
- Throws:
java.lang.Exception
-
getSimilarityHardMatchMultiplicative
public double getSimilarityHardMatchMultiplicative(PPNode query, PPNode base)
-
getSimilarityList
public java.util.List<java.lang.Double> getSimilarityList(PPNode query, PPNode base)
-
getSimilarityHardMatchAverage
public double getSimilarityHardMatchAverage(PPNode query, PPNode base)
-
getSimilarityHardMatchOptimistic
public double getSimilarityHardMatchOptimistic(PPNode query, PPNode base)
-
getSimilarityExtraCarbonConsideration
public double getSimilarityExtraCarbonConsideration(PPNode query, PPNode base)
-
isValidType
public boolean isValidType(int type)
-
-