GithubHelp home page GithubHelp logo

torcolvin / gpusimilarity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from schrodinger/gpusimilarity

0.0 2.0 0.0 452 KB

A Cuda/Thrust implementation of fingerprint similarity searching

License: BSD 3-Clause "New" or "Revised" License

CMake 7.41% C++ 44.26% Python 29.70% Cuda 17.70% HTML 0.93%

gpusimilarity's Introduction

gpusimilarity

A brute-force GPU implementation of chemical fingerprint similarity searching. Its intended use is to be kept alive as a service with an entire library loaded into graphics card memory. It has python scripts included which use RDKit to generate fingerprints, but the C++/Cuda backend are agnostic to the data once it's been created.

Architecture and benchmarks were presented in a presentation at the 2018 RDKit European UGM.

Basic Benchmark

On a machine with four Tesla V100, searching one billion compounds takes ~0.4 seconds.

See RDKit Presentation for much more in depth benchmarks.

Example integration

Here is a video of this backend being utilized for immediate-response searching inside Schrödinger's LiveDesign application:

GPUSimilarity Gadget

Dependencies

  • RDKit (At Python level, not compilation)
  • Qt 5.2+ (including QtNetwork)
  • PyQt
  • Cuda SDK, CUDACXX env variable pointing to nvcc
  • cmake 3.10.2+
  • C++11 capable compiler
  • Boost test libraries
  • Optional: Doxygen for generating documents

Building with CMake and running unit tests with CTest

From parent directory of source:
mkdir bld
cd bld
ccmake ../gpusimilarity
make -j5
ctest

If Cuda, boost or doxygen are not found, start ccmake with the following options:

ccmake -DCMAKE_CUDA_COMPILER=/path/to/nvcc -DBOOST_ROOT=/path/to/boost/directory -DDOXYGEN_EXECUTABLE=/path/to/doxygen

Generate the documentation

Install doxygen on system

make doc_doxygen

The result is in bld/doc/html

Running

For basic json-response http endpoint:

From build directory: python3 ${SRC_DIR}/python/gpusim_server.py <fingerprint fsim file>

For testing (insecure):

From build directory: python3 ${SRC_DIR}/python/gpusim_server.py <fingerprint fsim file> --http_interface

For generating databases:

Easiest from rdkit conda with pyqt installed:

From source python directory: python3 gpusim_createdb.py <input smi.gz file> <fingerprint fsim file>

For debugging Cuda server, avoiding python/http server altogether:

From build directory:
./gpusimserver <dbname>.fsim
python3 python ${SRC_DIR}/python/gpusim_search.py <dbname>

Note: No .fsim extension is used for gpusim_search.py

This may be useful to determine if the backend is having Cuda/GPU problems.

gpusimilarity's People

Contributors

francoisbertelatschrodinger avatar greglandrum avatar lilleswing avatar lorton avatar torcolvin avatar wisakedjack avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.