download_chemreps

download_chemreps(version=None, *, prefix=None, return_version=False)[source]

Ensure the latest ChEMBL chemical representations file is downloaded.

This file is tab-separated and has four columns:

  1. chembl_id

  2. canonical_smiles

  3. standard_inchi

  4. standard_inchi_key

If you want to directly parse it with pandas, use get_chemreps_df().

Parameters:
  • version (Optional[str]) – The version number of ChEMBL to get. If none specified, uses latest() to look up the latest.

  • prefix (Optional[Sequence[str]]) – The directory inside pystow to use

  • return_version (bool) – Should the version get returned? Turn this to true if you’re looking up the latest version and want to reduce redundant code.

Return type:

Union[Path, Tuple[str, Path]]

Returns:

If return_version is true, return a pair of the version and the local file path to the downloaded *_chemreps.txt.gz file. Otherwise, just return the path.