Go to file
Navan Chauhan 64606f5d95 Delete CNAME 2020-11-08 17:31:16 +05:30
.github/workflows temporarily disabled fix wip 2020-11-08 15:56:41 +05:30
app prepare for release, Albus 2020-11-08 17:23:33 +05:30
db added initial sql setup 2020-09-22 17:24:49 +05:30
lstm_chem added alpha model 2020-08-01 15:34:22 +05:30
misc added sample curie systemd service with https 2020-09-27 21:12:28 +05:30
tests added another action to test 2020-11-08 15:16:44 +05:30
.deepsource.toml Add .deepsource.toml 2020-06-25 12:53:58 +00:00
.gitignore added personal configs 2020-09-27 14:18:06 +05:30
Aptfile moved six to aptfile 2020-09-22 18:52:49 +05:30
Dockerfile added docker specific requirements file to fix heroku 2020-09-24 16:41:57 +05:30
Procfile Added v1 API 2020-07-12 21:37:37 +05:30
README.md added installation details 2020-09-27 01:11:58 +05:30
api.py added exception handling for unknown hostname 2020-09-24 16:57:10 +05:30
config.ini added tensorflow support to docker-compose 2020-09-24 15:54:57 +05:30
docker-compose.yml added docker compose functionality for quick testing 2020-09-22 17:24:30 +05:30
requirements-docker.txt removed unncessary dependencies 2020-09-24 16:46:38 +05:30
requirements.txt added bunch 2020-09-24 17:16:09 +05:30
run.py make it better 2020-06-24 23:39:05 +05:30
runtime.txt bumped runtime 2020-09-02 17:49:07 +05:30

README.md

Curie-Web

Database and Backend

Curie-Web Cover

Tested on:

  • macOS 10.15 (Catalina)
  • Ubuntu 20.04 - Raspberry Pi 4

Quick Start (Docker-Compose)

You can quickly get started and test Curie-Web without needing to manage dependencies by using the docker-compose image. This has all features except AR/3D Model support. Otherwise, it is production ready.

git clone https://github.com/navanchauhan/Curie-Web
cd Curie-Web
docker-compose up

Do not forget to edit config.ini for the email section. Do not change the database settings for running it via docker.

Caveat(s):

  • This does not support generating a 3D Model and thus, AR viewer will not work on the Job Status page.

Installation

1. Installing Dependencies

1.1 Docker

Once you have installed docker, make sure to pull the following images (Otherwise, these will automatically get downloaded when you run the web-server)

  • navanchauhan/curie-cli (amd64/aarch64)
  • navanchauhan/usd-from-gltf (aarch64)
  • leon/usd-from-gltf (amd64)

1.2 PLIP

1.3 PyMOL with Python Bindings (version >= 2.0)

  • macOS users can use Homebrew to install it via brew install pymol

  • Users using apt can install it via sudo apt install pymol

1.4 Open-Babel (version >= 3.0)

  • macOS users can use Homebrew to install it via brew install open-babel

  • Users using apt can install it via sudo apt install openbabel python3-openbabel

1.5 AutoDock-Vina

1.6 Pandoc, Minimal TeX and ImageMagick

  • TeX is required for Pandoc's funcitonality for converting markdown to PDFs

  • macOS users can use Homebrew to first install mactex brew cask install mactex-no-gui and then the rest by brew install pandoc imagemagick

  • Users using apt can install via sudo apt-get install pandoc texlive-xetex imagemagick

x.x Tensorflow (Optional)

Please ensure you install Tensorflow 2.x.

If tensorflow is not properly installed, it will automatically disable the LSTM Module.

2. Changing the Configuration

Replace the values in config.ini

Default Values:

[DATABASE]
HOST = navanspi.duckdns.org
PORT = 3306
USER = curieweb
PASSWORD = curie-web-russian-54
NAME = curie

[SMTP]
SERVER = smtp.gmail.com
PORT = 587
EMAIL = navanchauhan@gmail.com
PASSWORD = okrs shoc ahtk idui

[LOGS]
LOG = True
SAVE_LOGS = False 

[FILES]
UPLOAD_FOLDER = ./app/static/uploads
LOG_FOLDER = ./app/logs/

[EXECUTION]
INSTANT = True

[FEATURES]
LSTM = False

Database

Name Description
HOST MySQL Database Host
PORT MySQL Database Port
USER Username
PASSWORD Password
NAME MySQL Database Name

SMTP

Name Description
SERVER SMTP Server
PORT SMTP Port
EMAIL Email
PASSWORD Password

LOGS

Name Description
LOG Log
SAVE_LOGS SAVE LOGS

FILES

Name Description
UPLOAD_FOLDER Folder to store files
LOG_FOLDER Folder to store logs

EXECUTION

Name Description
INSTANT Whether to run the docking jobs instantly (True or False)

FEATURES

Name Description
LSTM Enable LSTM Generator (True or False)

3. Adding AR Model Support

Make sure you have PyMOL 2.0 or higher

Either download the precompiled binaries from COLLADA2GLTF or compile it on your own

Once you have the COLLADA2GLTF-bin file, copy the file:

cp COLLADA2GLTF-bin /usr/local/bin/collada2gltf

4. Setting up the Database

You will first need to create a database and grant all priviliges to a user. Make sure you have correctly configured the config.ini file.

After tha simply run the following commands. This will create the table(s) and check if the backend is working or not.

cd tests
python3 dbTestFiller.py
python3 backendTest.py
python3 removeSample.py

5. Running

Without API Support

gunicorn app:app -b "0.0.0.0:7589"

With API Support (FastAPI)

gunicorn api:app -k uvicorn.workers.UvicornWorker -b "0.0.0.0:7589"

systemd

There is a sample systemd file in the misc folder

  • Configure the file and then copy it to /etc/systemd/system

  • You can start the server by running sudo systemctl start curie

  • To enable the server to start on boot run sudo systemctl enable curie

Misc.

Fine-Tuning the LSTM Module

Currently the base model has been trained on 1.5 million compounds and took ~4 hours to train on Google Colab's GPU runtime.

Information to be added soon