GithubHelp home page GithubHelp logo

jrwnter / gruenifai Goto Github PK

View Code? Open in Web Editor NEW
28.0 6.0 6.0 4.23 MB

Implementation grünif.ai: Interactive multi-parameter optimization of molecules in a continuous vector space

License: MIT License

Python 24.45% HTML 1.62% JavaScript 64.92% CSS 7.31% Dockerfile 1.48% Shell 0.22%

gruenifai's Introduction

gruenif.ai

gruenif.ai is a web application for interactive multi-parameter optimization of molecules in a continous vector space.

Showcase of functionality

A web application is best explained through a live demo. Please watch our video for a detailed explanation of the functionality: Showcase

Installation and setting up

In its current form grünifai is commposed of multiple microservices. We recommend the use of Docker to compose all microservises into one running environment.

Installation using Docker

  • clone this environment.
  • cd <REPOSITORY_DIR>
  • docker compose up

The web app can now be accessed at http://localhost:8777/ When running without GPUs or to test, we recommend to set the checkbox for fastmode to reduce compute time.

Installation using Anaconda

The repository can also be installed from scratch. That way GPU support can be enabled as well. However, currently, we recommend using the Docker installation described above.

Dependencies

Installation

  1. terminal
  • clone and install cddd
  • clone and install mso
  • clone this repository
  • cd <REPOSITORY_DIR>
  • conda env create -f environment.yml ( + activate this environment)
  • pip install .
  • cd <REPOSITORY_DIR>/gruenifai/backend/postgres
  • python create_db.py (assumes a running postgres server running locally)
  • cd <REPOSITORY_DIR>/gruenifai/gui/client
  • yarn install
  • yarn start
  • cp marvinjs forlder into /gruenifai/gui/client/public
  1. terminal
  • cd <REPOSITORY_DIR>/gruenifai/gui/server
  • python api.py
  1. terminal
  • cd <REPOSITORY_DIR>/gruenifai/backend/
  • python start_inference_server.py --model_dir <PATH_TO_CDDD_MODEL> --device <CUDA_DEVICE (e.g. 1 3 4)> --num_servers <NUMBER_OF_SERVERS>
  1. terminal
  • cd <REPOSITORY_DIR>/gruenifai/backend/
  • python flaskserver.py --num_swarms=<NUMBER_OF_SWARMS> --num_workers=<NUMBER_OF_WORKERS>

The web app can now be accessed at port 3000

gruenifai's People

Contributors

andreassteffen avatar jrwnter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gruenifai's Issues

failed to load reward_penalized_log_p score. Consider installing package networkx

I noticed this on the log of docker-compose:

backend_1      | /opt/conda/envs/cddd/lib/python3.6/site-packages/mso/objectives/mol_functions.py:211: UserWarning: failed to load reward_penalized_log_p score. Consider installing package networkx
backend_1      |   warnings.warn("failed to load reward_penalized_log_p score. Consider installing package networkx")

Does the lack of networkx break functionality?

Thanks,
João

export molecules fails with ModuleNotFoundError: No module named 'xlwt'

Hi,

I've followed the instructions for deploying using docker-compose. It was successfully deployed, I am able to use the interface, but when exporting the molecules from the "cart", it errors with:

Traceback (most recent call last):
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask_restplus/api.py", line 584, in error_router
    return original_handler(e)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/_compat.py", line 38, in reraise
    raise value.with_traceback(tb)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask_restplus/api.py", line 584, in error_router
    return original_handler(e)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/_compat.py", line 38, in reraise
    raise value.with_traceback(tb)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask_restplus/api.py", line 325, in wrapper
    resp = resource(*args, **kwargs)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask/views.py", line 89, in view
    return self.dispatch_request(*args, **kwargs)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/flask_restplus/resource.py", line 44, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/home/server/api.py", line 238, in post
    data.to_excel(fn, index=None)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/pandas/core/generic.py", line 2181, in to_excel
    engine=engine,
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/pandas/io/formats/excel.py", line 726, in write
    writer = ExcelWriter(stringify_path(writer), engine=engine)
  File "/opt/conda/envs/gfai/lib/python3.7/site-packages/pandas/io/excel/_xlwt.py", line 13, in __init__
    import xlwt
ModuleNotFoundError: No module named 'xlwt'

I quickly checked and apparently xlwt is not a pandas dependency, so I guess it needs to be added explicitly to the environment.yml of the gui server.

At least what I did was add xlwt to https://github.com/jrwnter/gruenifai/blob/master/gruenifai/gui/server/environment.yml, build that image locally instead of pulling it, and the export works.

I hope this is helpful.
João

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.