Skip to content

Instantly share code, notes, and snippets.

@mnowotka
Forked from anonymous/get_weights.py
Last active August 29, 2015 14:16
Show Gist options
  • Save mnowotka/c0fff4f8560c17e0b473 to your computer and use it in GitHub Desktop.
Save mnowotka/c0fff4f8560c17e0b473 to your computer and use it in GitHub Desktop.
from chembl_webresource_client.new_client import new_client
molecules = new_client.molecule
clean_mols = molecules.filter(molecule_properties__full_mwt__isnull=False)
len(clean_mols)
weights = [x['molecule_properties']['full_mwt'] for x in clean_mols[0:1000]]
@mnowotka
Copy link
Author

mnowotka commented Mar 4, 2015

$ uname -a
Linux ThinkPad-T61 3.13.0-46-generic #76-Ubuntu SMP Thu Feb 26 18:52:49 UTC 2015 i686 i686 i686 GNU/Linux
$ python --version
Python 2.7.6

$ time(python get_weights.py)

real    0m50.228s
user    0m0.944s
sys 0m0.108s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment