Utils#

Various utility tools that do not easily fit into other modules.


Validators:

ensure_mols

Ensure that all input sequence elements are RDKit Mol objects.

ensure_smiles

Ensure that all input sequence elements are SMILES strings.

get_conf_id

Get the conformer ID to use for 3D-based computations.

require_mols

Check that all inputs are RDKit Mol objects, raises TypeError otherwise.

require_mols_with_conformations

Check that all inputs are RDKit Mol objects with at least one conformation, i.e. with 3D coordinates computed.

require_strings

Check that all inputs are strings, raises TypeError otherwise.

Utilities:

get_data_from_indices

Retrieve elements from data at specified indices.

no_rdkit_logs

Context manager that disables RDKit logging.

run_in_parallel

Run a function in parallel on provided data in batches, using joblib.