Last active
December 12, 2015 09:49
-
-
Save aschreyer/4754908 to your computer and use it in GitHub Desktop.
PostgreSQL OpenEye cartridge benchmark based on ChEMBL15.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- set search_path = public, openeye; | |
DO $$ | |
DECLARE | |
molregno integer; | |
fp oefp; | |
BEGIN | |
FOR molregno, fp IN SELECT cfp.molregno, cfp.circular_fp | |
FROM chembl.compound_oefps cfp | |
ORDER BY random() LIMIT 100 | |
LOOP | |
EXECUTE | |
' | |
SELECT molregno, circular_fp % $1 | |
FROM chembl.compound_oefps | |
WHERE circular_fp %? $1 | |
ORDER BY circular_fp <%> $1 | |
LIMIT 10; | |
' USING fp; | |
END LOOP; | |
END$$; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment