OEFPDatabaseOptions

class OEFPDatabaseOptions

The OEFPDatabaseOptions class allows setting options on a per-search basis. This class is used to control the behavior of:

The OEFPDatabaseOptions class stores the following properties:

Property

Get method

Set method

Corresponding namespace / type

cutoff value

GetCutoff

SetCutoff / HasCutoff

floating point number

order of sorting

GetDescendingOrder

SetDescendingOrder

boolean

max number of scores

GetLimit

SetLimit

integer 0 means no limit

similarity method

GetSimFunc

SetSimFunc

OESimMeasure

\(\alpha\) and \(\beta\) for Tversky

GetTverskyAlpha / GetTverskyBeta

SetTverskyCoeffs

floating point number

numper of processors

GetNumProcessors

SetNumProcessors

integer 0 means OEGetNumProcessors

Constructors

OEFPDatabaseOptions() -> OEFPDatabaseOptions

Default constructor.

Default parameters of OEFPDatabaseOptions

Property

Default value

cutoff value

no cutoff set

order of sorting

true (means descending order)

max number of scores

0 (means no limit)

similarity method

OESimMeasure_Tanimoto

\(\alpha\) and \(\beta\) for Tversky

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

number of processors

1

OEFPDatabaseOptions(limit: int, simfunc: int) -> OEFPDatabaseOptions

Constructs an OEFPDatabaseOptions object with a limit on the number of similarity scores returned and a similarity method from the OESimMeasure namespace. The returned scores will be in descending order and applying no cutoff value.

OEFPDatabaseOptions(arg2: OEFPDatabaseOptions) -> OEFPDatabaseOptions

Copy constructors.

ClearCutoff

ClearCutoff() -> None

Removes the cutoff value previously set by the OEFPDatabaseOptions.SetCutoff method. After clearing the cutoff value, OEFPDatabaseOptions.HasCutoff method will return false.

GetCutoff

GetCutoff() -> float

Returns the cutoff value previously set by the OEFPDatabase.SetCutoff method.

GetDescendingOrder

GetDescendingOrder() -> bool

Returns whether the similarity scores will be returned in descending or in ascending order.

GetLimit

GetLimit() -> int

Returns the maximum number of similarity scores returned.

GetSimFunc

GetSimFunc() -> int

Returns the similarity measure used to evaluate fingerprint similarities. The return value is taken from the OESimMeasure namespace.

GetNumProcessors

GetNumProcessors() -> int

Returns the number of threads that are used to search fingerprints when calling the OEFastFPDatabase.SortedSearch method.

GetTverskyAlpha

GetTverskyAlpha() -> float

Returns the \(\alpha\) parameter of the Tversky similarity.

GetTverskyBeta

GetTverskyBeta() -> float

Returns the \(\beta\) parameter of the Tversky similarity.

HasCutoff

HasCutoff() -> bool

Returns whether the cutoff value of the OEFPDatabaseOptions object has been set by the OEFPDatabaseOptions.SetCutoff method.

SetCutoff

SetCutoff(cutoff: float) -> None

Sets the cutoff value of the OEFPDatabaseOptions object.

SetDescendingOrder

SetDescendingOrder(descending: bool = True) -> None

Sets whether the similarity scores will be returned in descending or in ascending order.

Note

This method has no effect on the OEFPDatabase.GetScores method.

SetLimit

SetLimit(limit: int) -> None

Sets the maximum number of similarity scores returned.

limit

If it is set to zero, then all similarity scores are returned.

Note

This method has no effect on the OEFPDatabase.GetScores method.

SetSimFunc

SetSimFunc(simfunc: int) -> None

Sets the similarity measure used to evaluate fingerprint similarities.

simtype

This value has to be from the OESimMeasure namespace.

SetNumProcessors

SetNumProcessors(nrps: int) -> None

Sets the number of threads that are used to search fingerprints when calling the OEFastFPDatabase.SortedSearch method. When set to 0, the number of processors used will be the number returned by the OEGetNumProcessors function.

Multi-threaded fingerprint search is currently only available in OEFastFPDatabaseMemoryType_MemoryMapped and OEFastFPDatabaseMemoryType_InMemory modes.

SetTverskyCoeffs

SetTverskyCoeffs(alpha: float = 0.95, beta: float = 0.05) -> None

Sets \(\alpha\) and \(\beta\) parameters for the Tversky similarity.