updated Readme to tell about config.ini
Also, moved away from hard-coding tfWorking value
This commit is contained in:
parent
2f0d88120f
commit
4b48546cea
93
README.md
93
README.md
|
@ -40,25 +40,79 @@ Users using apt can install it via `sudo apt install openbabel python3-openbabel
|
|||
|
||||
## 2. Changing the Configuration
|
||||
|
||||
Replace the values in `app/__init__.py`, `app/dock-single.py` and `app/dock-docker.py`
|
||||
Replace the values in `config.ini`
|
||||
|
||||
## 3. Enabling LSTM Generator
|
||||
Default Values:
|
||||
```ini
|
||||
[DATABASE]
|
||||
HOST = navanspi.duckdns.org
|
||||
PORT = 3306
|
||||
USER = curieweb
|
||||
PASSWORD = curie-web-russian-54
|
||||
NAME = curie
|
||||
|
||||
Open `app/views.py`
|
||||
[SMTP]
|
||||
SERVER = smtp.gmail.com
|
||||
PORT = 587
|
||||
EMAIL = navanchauhan@gmail.com
|
||||
PASSWORD = okrs shoc ahtk idui
|
||||
|
||||
Make sure you have installed Tensorflow. Replace the following:
|
||||
[LOGS]
|
||||
LOG = True
|
||||
SAVE_LOGS = False
|
||||
|
||||
```python
|
||||
tfWorking = 0
|
||||
[FILES]
|
||||
UPLOAD_FOLDER = ./app/static/uploads
|
||||
LOG_FOLDER = ./app/logs/
|
||||
|
||||
[EXECUTION]
|
||||
INSTANT = True
|
||||
|
||||
[FEATURES]
|
||||
LSTM = False
|
||||
```
|
||||
|
||||
with
|
||||
### **Database**
|
||||
| Name | Description |
|
||||
|----------|---------------------|
|
||||
| HOST | MySQL Database Host |
|
||||
| PORT | MySQL Database Port |
|
||||
| USER | Username |
|
||||
| PASSWORD | Password |
|
||||
| NAME | MySQL Database Name |
|
||||
|
||||
```python
|
||||
tfWorking = -1
|
||||
```
|
||||
### **SMTP**
|
||||
| Name | Description |
|
||||
|----------|-------------|
|
||||
| SERVER | SMTP Server |
|
||||
| PORT | SMTP Port |
|
||||
| EMAIL | Email |
|
||||
| PASSWORD | Password |
|
||||
|
||||
## 4. Adding AR Model Support
|
||||
### **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
|
||||
|
||||
|
@ -66,13 +120,13 @@ Make sure you have PyMOL 2.0 or higher
|
|||
Either download the precompiled binaries from [COLLADA2GLTF](https://github.com/KhronosGroup/COLLADA2GLTF) or compile it on your own
|
||||
|
||||
|
||||
Once you have the `COLLADA2GLTF-bin` file, run the following:
|
||||
Once you have the `COLLADA2GLTF-bin` file, copy the file:
|
||||
|
||||
```
|
||||
cp COLLADA2GLTF-bin /usr/local/bin/collada2gltf
|
||||
```
|
||||
|
||||
## Running
|
||||
## 4. Running
|
||||
|
||||
### Without FastAPI
|
||||
|
||||
|
@ -80,4 +134,15 @@ cp COLLADA2GLTF-bin /usr/local/bin/collada2gltf
|
|||
|
||||
### With FastAPI
|
||||
|
||||
`gunicorn api:app -k uvicorn.workers.UvicornWorker -b "0.0.0.0:7589"`
|
||||
`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`
|
||||
|
||||
|
|
|
@ -12,6 +12,12 @@ DB_NAME = config['DATABASE']['NAME']
|
|||
UPLOAD_FOLDER = config['FILES']['UPLOAD_FOLDER']
|
||||
LOG_FOLDER = config['FILES']['LOG_FOLDER']
|
||||
INSTANT_EXEC = config['EXECUTION']['INSTANT']
|
||||
LSTM = config['FEATURES']['LSTM']
|
||||
|
||||
if LSTM == 'True':
|
||||
LSTM = True
|
||||
else:
|
||||
LSTM = False
|
||||
|
||||
if INSTANT_EXEC == 'True':
|
||||
INSTANT_EXEC = True
|
||||
|
|
|
@ -247,11 +247,9 @@ def generate_pdbqts():
|
|||
return render_template('pdbqt_form.html',form=myform)
|
||||
|
||||
|
||||
tfWorking = 0
|
||||
|
||||
if tfWorking == -1:
|
||||
if app.config['LSTM']:
|
||||
try:
|
||||
import tensorrflow as tf
|
||||
import tensorflow as tf
|
||||
tfWorking = 1
|
||||
except Exception as e:
|
||||
log(e,"EXCEPTION")
|
||||
|
|
|
@ -20,4 +20,7 @@ UPLOAD_FOLDER = ./app/static/uploads
|
|||
LOG_FOLDER = ./app/logs/
|
||||
|
||||
[EXECUTION]
|
||||
INSTANT = True
|
||||
INSTANT = True
|
||||
|
||||
[FEATURES]
|
||||
LSTM = False
|
Loading…
Reference in New Issue