Jump to navigation Jump to search


usage: [-h] [--vendor-search] [--get-vendors] [--configuration-server-url CONFIGURATION_SERVER_URL] input_file results_out

search for smiles by zinc22 id

positional arguments:
  input_file            file containing list of zinc ids or vendor codes to look up
  results_out           destination file for output

optional arguments:
  -h, --help            show this help message and exit
  --vendor-search       look up molecules by vendor code instead of zinc id
  --get-vendors         get vendor supplier codes associated with zinc id
  --configuration-server-url CONFIGURATION_SERVER_URL
                        database containing configuration for zinc22 system is a script for looking up zinc ids on the zinc22 system. The operation is simple- provide a file containing a list of zincids and a destination file to write to. The script will give you a progress bar as it searches the system. If a database is down, the script will let you know and continue gathering the results it can.

The output format is as follows:


With --get-vendors or --vendor-search the output format looks like this:


Meaning the script will find all vendor information and smiles associated with the provided zinc ids or vendor codes.


You can find the script and environment @ /nfs/soft/zinc22/search_zinc on the BKS cluster.

If you get an error along the lines of "ImportError: /lib64/ version `GLIBC_2.14' not found" after sourcing the environment and attempting to run the script, you can try using an alternative environment @ ~xyz/btingle/bin/2dload.testing/py36_psycopg2

This happens because the required software libraries are not installed on whichever machine you are logged in to.

You can log into one of our development nodes (ssh user@n-1-17, ssh user@n-1-16, etc.) which are guaranteed to have the correct libraries and run it there.

Side note about slow queries

Depending on the molecules you happen to be looking up, your search may go by very quickly, or somewhat slowly. Smaller molecules tend to look up very quickly, while larger molecules take longer to find. We're working on it.

Usage w/ Bash on BKS cluster

source /nfs/soft/zinc22/search_zinc/env/bin/activate
python /nfs/soft/zinc22/search_zinc/ input_zinc_ids.txt output_zinc_ids.txt
python /nfs/soft/zinc22/search_zinc/ --get-vendors input_zinc_ids.txt output_vendor_ids.txt

Usage w/ Csh on BKS cluster

source /nfs/soft/zinc22/search_zinc/env/bin/activate.csh
python /nfs/soft/zinc22/search_zinc/ input_zinc_ids.txt output_zinc_ids.txt
python /nfs/soft/zinc22/search_zinc/ --get-vendors input_zinc_ids.txt output_vendor_ids.txt

Dealing with NULL

Sometimes a ZINC ID will fail to look up. This could be because a server is down (the script will notify you if this is the case), or because the ID is missing from the system for some reason. In this case, it may be helpful to separate the molecules that didn't look up from the molecules that did. You may want to save them for later when the servers come back online, or to run a deeper search with (more on this below).

How to:

[env]$ cat legitimate_ids.txt > input.txt
[env]$ echo ZINCzz00ZZZZZZZZ >> input.txt
[env]$ echo ZINCyy00AAAAAAAA >> input.txt
[env]$ echo ZINCxx00BBBBBBBB >> input.txt
[env]$ python input.txt output.txt
[env]$ grep "_null_" output.txt
_null_ ZINCzz00ZZZZZZZZ H33P270
_null_ ZINCyy00AAAAAAAA H34P280
_null_ ZINCxx00BBBBBBBB H35P290 will not omit IDs that don't look up from the output, instead it will return the zinc id with "_null_" in every other field. Therefore we can use grep to filter our results.

[env]$ grep "_null_" output.txt > missing.txt
[env]$ grep -v "_null_" output.txt > found.txt

It should be very infrequent that ZINC IDs don't look up, but if this happens you can use the following script:

python3 /mnt/nfs/home/xyz/btingle/bin/2dload.testing/utils-2d/tin/misc/ [INPUT_ZINC_IDS_FILE]

You don't need to source any particular python 3 environment for this script, but the environment used for will work just fine here.

This script will comb through our deprecated files and attempt to locate your ZINC IDs there. This script will create a file called "result" in your current directory containing all the smiles found.

If you're looking from vendor information, you can look up the SMILES you get back in arthor/smallworld sets to find vendor codes. Functionality is planned in for looking up by SMILES, but not implemented yet.

If after this you're STILL unable to find your zinc ids, you can send them to our development team and we will find them for you.

Email, ccing and Include your missing file as an attachment.