API reference

Public symbols re-exported from padelpy. Descriptor and fingerprint values are produced by the bundled PaDEL-Descriptor engine (Yap, 2011; DOI 10.1002/jcc.21707).

Public API for padelpy, a Python wrapper around PaDEL-Descriptor.

padelpy.from_mdl(mdl_file, output_csv=None, descriptors=True, fingerprints=False, timeout=60, maxruntime=-1, threads=-1)

Convert an MDL MolFile to QSPR descriptors and/or fingerprints.

Multiple molecules may appear in the MDL file.

Parameters:
  • mdl_file (str) – Path to an MDL file (.mdl extension required).

  • output_csv (str, optional) – If supplied, also write descriptors/fingerprints to this CSV path.

  • descriptors (bool, default True) – If True, calculate descriptors.

  • fingerprints (bool, default False) – If True, calculate fingerprints.

  • timeout (int, default 60) – Maximum subprocess time in seconds.

  • maxruntime (int, default -1) – Maximum running time per molecule in seconds (-1 = unlimited).

  • threads (int, default -1) – Worker threads (-1 = use all available).

Returns:

One mapping per compound, in file order.

Return type:

list of dict

padelpy.from_sdf(sdf_file, output_csv=None, descriptors=True, fingerprints=False, timeout=60, maxruntime=-1, threads=-1)

Convert an SDF file to QSPR descriptors and/or fingerprints.

Multiple molecules may appear in the SDF file.

Parameters:
  • sdf_file (str) – Path to an SDF file (.sdf extension required).

  • output_csv (str, optional) – If supplied, also write descriptors/fingerprints to this CSV path.

  • descriptors (bool, default True) – If True, calculate descriptors.

  • fingerprints (bool, default False) – If True, calculate fingerprints.

  • timeout (int, default 60) – Maximum subprocess time in seconds.

  • maxruntime (int, default -1) – Maximum running time per molecule in seconds (-1 = unlimited).

  • threads (int, default -1) – Worker threads (-1 = use all available).

Returns:

One mapping per compound, in file order.

Return type:

list of dict

padelpy.from_smiles(smiles, output_csv=None, descriptors=True, fingerprints=False, timeout=60, maxruntime=-1, threads=-1)

Convert SMILES to QSPR descriptors and/or fingerprints via PaDEL.

Parameters:
  • smiles (str or list of str) – SMILES for one molecule, or a list of SMILES strings.

  • output_csv (str, optional) – If supplied, also write descriptors to this CSV path.

  • descriptors (bool, default True) – If True, calculate descriptors.

  • fingerprints (bool, default False) – If True, calculate fingerprints.

  • timeout (int, default 60) – Maximum subprocess time in seconds.

  • maxruntime (int, default -1) – Maximum running time per molecule in seconds (-1 = unlimited).

  • threads (int, default -1) – Worker threads (-1 = use all available).

Returns:

Mapping of labels to values for a single SMILES, or a list of such mappings when smiles is a list.

Return type:

dict or list of dict

padelpy.padeldescriptor(maxruntime=-1, waitingjobs=-1, threads=-1, d_2d=False, d_3d=False, config=None, convert3d=False, descriptortypes=None, detectaromaticity=False, mol_dir=None, d_file=None, fingerprints=False, log=False, maxcpdperfile=0, removesalt=False, retain3d=False, retainorder=True, standardizenitro=False, standardizetautomers=False, tautomerlist=None, usefilenameasmolname=False, sp_timeout=None, headless=True)

Run the bundled PaDEL-Descriptor CLI with the given options.

Parameters:
  • maxruntime (int, default -1) – Maximum running time per molecule in milliseconds (-1 = unlimited).

  • waitingjobs (int, default -1) – Maximum queued jobs for worker threads (-1 = PaDEL default).

  • threads (int, default -1) – Maximum threads (-1 = number of CPU cores).

  • d_2d (bool, default False) – If True, calculate 2-D descriptors.

  • d_3d (bool, default False) – If True, calculate 3-D descriptors.

  • config (str, optional) – Path to a configuration file.

  • convert3d (bool, default False) – If True, convert molecules to 3-D.

  • descriptortypes (str, optional) – Path to a descriptor-types file.

  • detectaromaticity (bool, default False) – If True, re-detect aromaticity before descriptor calculation.

  • mol_dir (str, optional) – Path to a structure file or directory of structures.

  • d_file (str, optional) – Output CSV path for calculated descriptors/fingerprints.

  • fingerprints (bool, default False) – If True, calculate fingerprints.

  • log (bool, default False) – If True, write a log file alongside the descriptor file.

  • maxcpdperfile (int, default 0) – Maximum compounds per descriptor file (0 = unlimited).

  • removesalt (bool, default False) – If True, remove salts.

  • retain3d (bool, default False) – If True, retain 3-D coordinates when standardizing.

  • retainorder (bool, default True) – If True, retain input molecule order in the output.

  • standardizenitro (bool, default False) – If True, standardize nitro groups to N(:O):O.

  • standardizetautomers (bool, default False) – If True, standardize tautomers.

  • tautomerlist (str, optional) – Path to a SMIRKS tautomers file.

  • usefilenameasmolname (bool, default False) – If True, use the filename (without extension) as the molecule name.

  • sp_timeout (int, optional) – Subprocess timeout in seconds; None waits indefinitely.

  • headless (bool, default True) – If True, run Java headless (no PaDEL splash window).

Return type:

None

Raises:
  • ReferenceError – If java is not found on PATH.

  • RuntimeError – If PaDEL reports an error on stderr or the subprocess times out.