Find Missing Structure
This program is designed specifically for Open Enventory to fix issue with molecules missing structures (could not be extracted through "Read data from supplier")
DETAILS
This programs does:
Connect into mysql database and find molecule in 'molecule' table
of specific database and find those molecule with missing structure (smiles)
folder "missing_mol_files" needs to be created inside /var/lib/mysql
with 'mysql' as ownner (chown mysql:mysql)
Try to download mol files from various sources into a folder in
/var/lib/mysql/missing_mol_files
Update those sql entries with new downloaded mol_files
REQUIREMENTS
root access to the server hosting Open Enventory
Python 3+
This file is made for Linux environment, you should be able
to used it on other OS with changing the location of the "download_path"
USAGE
After cloning this repo onto the Open Enventory server:
Change into directory of the new file:
(Optional): create virtual environment for python to install dependency:
Install python dependencies:
Run the program:
Answer questions for:
confirming running under root
mySQL root password (typing password will not be shown on screen)
the name of the database you want to update (twice to confirm)
url path for your Open Enventory server (including 'http/https' and no trailing '/')
VERSIONS
Version 4:
Using simple download bar with bar=wget.bar_thermometer in wget.download
Added handling database connection error (wrong password, wrong database)
Added confirmation for database
Version 5
Change to https (from http) for ChemicalBook site
Version 6 (2020-01-18):
Remove this extra step of going into Open Enventory manual by the user using a web browser and doing Batch Processing.
Why: for versions 5 and before:
after running this program, YOU STILL NEED TO LOGIN INTO OPEN ENVENTORY ON A WEB BROWSER AS ROOT, GO TO "SETTINGS/BATCH PROCESSING". CHOOSE DATABASE THAT YOU WANT TO UPDATE AND THEN CHOOSE "MOLECULE", "EMPIRICAL FORMULA", "MW", "DEG. OF UNSAT." , "STRUCTURE", "SMILES" AND "FINGERPRINT" AND THEN SUBMIT TO UPDATE THE SQL QUERY. ONLY AFTER THIS, THE STRUCTURE WILL SHOW UP
Last updated