arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

Other Supporting Programs for OE

Find Missing SDS

This program is designed specifically for Open Enventory to fix issue with molecule missing sds (could not be extracted through "Read data from supplier") This programs does:

hashtag
DETAILS

This programs does:

1. Connect into mysql database and find molecule in 'molecule' table of specific database and find those molecule with missing sds

2. Try to download sds files into a folder in /var/lib/mysql/missing_sds

3. Update those sql entries with new downloaded sds files

hashtag
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"

hashtag
USAGE

After cloning this repo onto the Open Enventory server:

  1. Change into directory of the new file:

  2. (Optional): create virtual environment for python to install dependency:

  3. Install python dependencies:

hashtag
VERSIONS

hashtag
Version 5:

  • Incorporated result from Fluorochem

  • Fixing bug with existing default_safety_sheet_url and default_safety_sheet_mime

    by setting them to NULL

hashtag
Version 4:

  • Testing using cheminfo.org/webservices by extracting catalog number from fluorochem

hashtag
Version 3:

  • Refactor extracting url download into its own method

  • Add extracting url download from chemicalsafety.com

hashtag
Version 2:

  • Add asking if user is root and password

  • Add asking what database to be modified

  • Switch to extracting data from because Chemexper

    has limited requests

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")

hashtag
DETAILS

This programs does:

  1. Connect into mysql database and find molecule in 'molecule' table

    of specific database and find those molecule with missing structure (smiles)

  2. folder "missing_mol_files" needs to be created inside /var/lib/mysql

    with 'mysql' as ownner (chown mysql:mysql)

  3. Try to download mol files from various sources into a folder in

    /var/lib/mysql/missing_mol_files

  4. Update those sql entries with new downloaded mol_files

hashtag
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"

hashtag
USAGE

After cloning this repo onto the Open Enventory server:

  1. Change into directory of the new file:

  2. (Optional): create virtual environment for python to install dependency:

  3. Install python dependencies:

hashtag
VERSIONS

hashtag
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

hashtag
Version 5

  • Change to https (from http) for ChemicalBook site

hashtag
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

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)

https://www.fishersci.comarrow-up-right
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 '/')

cd find_missing_sds-public
# you can change "find_missing_sds_venv" to another name too
python3 -m venv find_missing_sds_venv   # Create virtual environment
source find_missing_sds_venv/bin/activate    # Activate the virtual environment
pip install -r requirements.txt
# Replace "find_missing_sds_v5" with latest version if neccessary
python3 find_missing_sds_v5/find_missing_sds.py
cd update_sql_mol
# you can change "update_sql_mol_venv" to other name too
python3 -m venv update_sql_mol_venv   # Create virtual environment
source update_sql_mol_venv/bin/activate    # Activate the virtual environment
pip install -r requirements.txt
python3 update_sql_mol_v6/update_sql_mol.py    # Replace "update_sql_mol_v6" with latest version
GitHub - khoivan88/oe_find_structure: for Open Enventory using python to automatically update sql queries in 'molecule' table with mol filesGitHubchevron-right
GitHub - khoivan88/oe_find_sds-public: for Open Enventory, this script is used to find missing SDS for molecule in your existing Open Enventory databaseGitHubchevron-right
Logo
Logo