Hi Xinzhou, I will take a look at adding support for this to the cartridge.
-greg On Wed, Jun 9, 2021 at 9:54 PM Xinzhou Liu via Rdkit-discuss < rdkit-discuss@lists.sourceforge.net> wrote: > Hi RDKit team, > > I'm doing some substructure counting using the RDKit cartridge in my > postgres db. The SQL function substruct_count(mol, mol, bool) only accepts > mol (strict molecule) as the second input, but what I would like to have is > a little fuzziness, meaning using the qmol (molecule with query features) > as the query substructure. > > However, the current "substruct_count" function does not accept that > type. But the workaround I found is to create a SQL function > "substruct_count(mol, qmol, bool)" to pass the qmol to the low-level c > function "mol_substruct_count", which accepts qmol. Here is the create > script of this function: > > CREATE OR REPLACE FUNCTION public.substruct_count( > mol, > qmol, > boolean DEFAULT true) > RETURNS integer > LANGUAGE 'c' > COST 1 > IMMUTABLE STRICT PARALLEL UNSAFE > AS 'rdkit', 'mol_substruct_count' > ; > > But creating such C function wrapper is not permitted in our new AWS RDS > database. Can you add this overloading function "substruct_count(mol, qmol, > bool)" in the rdkit cartridge? It would be beneficial for anyone who wishes > to search a class of substructures rather than a single substructure using > the qmol type. > > Please let me know if there is any question. Thank you! > > Best, > Xinzhou Liu > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss