Client#
Load molecules from the list endpoint with simple server-side filters. |
|
Remove cached data files. |
|
Fetch property definitions for a subset from the API. |
|
Loading#
- load_molecules(*, subset=None, smarts=None, smiles=None, molecular_formula=None, limit=None)[source]#
Load molecules from the list endpoint with simple server-side filters.
Filters are optional, single-value, and combined with
ANDsemantics. Passsubsetto restrict the search to one subset; omit it to search across all molecules in the database.- Parameters:
subset (
str|None(default:None)) – Restrict the search to a single subset slug.smarts (
str|None(default:None)) – SMARTS substructure pattern.molecular_formula (
str|None(default:None)) – Molecular-formula substring.limit (
int|None(default:None)) – Stop after this many molecules. Passing alimitalso opts out of the unbounded-result safety check.
- Raises:
ResultTooLargeError – When no
limitis given and the query matches more thansettings.max_moleculesmolecules. Narrow the query, passlimit, or raiseLCMD_DB_MAX_MOLECULES.- Return type:
Schema#
- schema(subset, entity_type=EntityType.MOLECULES)[source]#
Fetch property definitions for a subset from the API.
- Raises:
DatasetNotFoundError – If the subset does not exist.
DownloadError – On network / HTTP errors.
SchemaError – If the response cannot be parsed.
- Return type:
list[PropertyInfo]