aizynthfinder.tools package

Submodules

aizynthfinder.tools.cat_output module

Module containing a CLI for concatenating output files (hdf5/json.gz files)

aizynthfinder.tools.cat_output.main()

Entry-point for the cat_aizynth_output CLI

Return type

None

aizynthfinder.tools.download_public_data module

Module with script to download public data

aizynthfinder.tools.download_public_data.main()

Entry-point for CLI

Return type

None

aizynthfinder.tools.make_stock module

Module containing classes and routines for making stock input to the tree search.

aizynthfinder.tools.make_stock.extract_plain_smiles(files)

Extract SMILES from plain text files, one SMILES on each line. The SMILES are yielded to save memory.

Parameters

files (List[str]) –

Return type

_StrIterator

aizynthfinder.tools.make_stock.extract_smiles_from_module(files)

Extract SMILES by loading a custom module, containing the function extract_smiles.

The first element of the input argument is taken as the module name. The other elements are taken as input to the extract_smiles method

The SMILES are yielded to save memory.

Parameters

files (List[str]) –

Return type

_StrIterator

aizynthfinder.tools.make_stock.make_hdf5_stock(inchi_keys, filename)

Put all the inchi keys from the given iterable in a pandas dataframe and save it as an HDF5 file. Only unique inchi keys are stored.

Parameters
  • inchi_keys (_StrIterator) –

  • filename (str) –

Return type

None

aizynthfinder.tools.make_stock.make_molbloom(smiles_list, filename, filter_size, approx_mols)

Put all the unique SMILES in a new bloom filter.

Params smiles_list

the SMILES

Params filename

the path to the saved filter

Params filter_size

the size of the filter in bits

Params approx_mols

approximately the number of compounds

Parameters
  • smiles_list (_StrIterator) –

  • filename (str) –

  • filter_size (int) –

  • approx_mols (int) –

Return type

None

aizynthfinder.tools.make_stock.make_molbloom_inchi(inchi_keys, filename, filter_size, approx_mols)

Put all the unique InChI keys in a new bloom filter.

Params inchi_keys

the Inchi Keys

Params filename

the path to the saved filter

Params filter_size

the size of the filter in bits

Params approx_mols

approximately the number of compounds

Parameters
  • inchi_keys (_StrIterator) –

  • filename (str) –

  • filter_size (int) –

  • approx_mols (int) –

Return type

None

aizynthfinder.tools.make_stock.make_mongo_stock(inchi_keys, source_tag, host=None)

Put all the inchi keys from the given iterable in Mongo database as a molecules collection. Only unique inchi keys are stored.

Parameters
  • inchi_keys (_StrIterator) –

  • source_tag (str) –

  • host (Optional[str]) –

Return type

None

aizynthfinder.tools.make_stock.main()

Entry-point for the smiles2stock tool

Return type

None

Module contents