This program is designed specifically for Open Enventory to fix issue with molecules missing structures (could not be extracted through "Read data from supplier")
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
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"
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 '/')
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
Change to https (from http) for ChemicalBook site
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