Fragments#

The FragFLP subset contains frustrated Lewis pair fragments with typed fragment categories.

from lcmd_db import load_dataset
import polars as pl

data = load_dataset("fragflp", include=["fragments"])
fragments = data.as_dataset("fragments")

frag = fragments[0]
frag.properties["smiles"]
frag.fragment_type  # "backbone", "lewis_acid_aryl", etc.

# Filter by type
acids = fragments.filter(pl.col("fragment_type_slug") == "lewis_acid_aryl")

With typed stubs, fragment_type is narrowed to a Literal of the known types instead of plain str.

See also

FragmentDataset — full API reference, Assembly Templates — combine fragments into molecules, Typed Stubs — IDE autocomplete for property keys