inline static float soergel_distance (const MOLFP * fp1, const MOLFP * fp2) { #ifdef BUILD_WITH_INDIGO return 1.0f - ob_tanimoto (fp1->dwords+IN_SIMOFFSET, fp2->dwords+IN_SIMOFFSET, IN_SIMFPSIZE); #else return 1.0f - ob_tanimoto (fp1->dwords, fp2->dwords, OB_FPSIZE2); #endif }
Datum reaction_similarity_products (PG_FUNCTION_ARGS) { REACTION *rxn1 = PG_GETARG_REACTION_P (0); REACTION *rxn2 = PG_GETARG_REACTION_P (1); PG_RETURN_FLOAT8 (ob_tanimoto ((const uint32 *) rxn1->fp+OB_FPSIZE2, (const uint32 *) rxn2->fp+OB_FPSIZE2, OB_FPSIZE2)); }