OEMCSTverskySim

class OEMCSTverskySim : public OEMedChem::OEMCSSimFuncBase

This class represents OEMCSTverskySim that calculates the Tversky similarity score.

Formula:

\(Sim_{Tversky}(A,B) = \frac{bothAB}{\alpha * onlyA + \beta * onlyB + bothAB}\)

The following methods are publicly inherited from OEMCSSimFuncBase:

operator()

CreateCopy

GetMCSSimTypeString

Constructors

OEMCSTverskySim(ref: OEMCSTverskySim) -> OEMCSTverskySim

Default constructor (\(\alpha = 0.95\), \(\beta = 0.05\))

OEMCSTverskySim(tvAlpha: float = 0.95, tvBeta: float = 0.05) -> OEMCSTverskySim

Constructor with arbitrary \(\alpha\) and \(\beta\) parameters.

operator()

__call__(commonAB: int, totalA: int, totalB: int) -> float

Returns the Tversky similarity coefficient based on the fragment core counts for the fragment core, query molecule and indexed molecule.

CreateCopy

CreateCopy() -> OEMCSTverskySim

Deep copy constructor that returns a copy of the object. The memory for the returned OEMCSTverskySim object is dynamically allocated and owned by the caller.

GetAlpha

GetAlpha() -> float

Returns the \(\alpha\) parameter from the OEMCSTverskySim class.

GetBeta

GetBeta() -> float

Returns the \(\beta\) parameter from the OEMCSTverskySim class.

GetMCSSimTypeString

GetMCSSimTypeString() -> str

Returns a string representation of the OEMCSTverskySim class.