Support Solubility #4

Open
opened 2026-04-12 16:29:37 -04:00 by aalexmmaldonado · 0 comments
aalexmmaldonado commented 2026-04-12 16:29:37 -04:00 (Migrated from github.com)

Aqueous solubility determines whether a drug can dissolve in the gut, whether a pollutant leaches into groundwater, and whether a molecule is worth pursuing at all. PubChem stores it under the "Solubility" heading, and the data is considerably messier than LogP.

Depositors report solubility in mg/L, g/100mL, mol/L, and sometimes in prose: "slightly soluble in water," "miscible with ethanol." Some entries include temperature, some specify the solvent, and some use scientific notation. A few are qualitative only. All of these need to be handled.

Scope

Add SOLUBILITY = "Solubility" to Annotation. Create pcdigitizer/data/solubility.py with a SolubilityData processor.

The output schema: cid, sid, pclid, solubility_value (Float64, nullable), unit (String), solvent (String, nullable), temperature_C (Float64, nullable), qualitative (String, nullable), comment (String, nullable). Qualitative-only entries like "Insoluble in water" should produce a row with solubility_value = null and qualitative = "insoluble".

Preserve the original unit for now. Normalization (e.g., converting everything to mg/L) is a real design choice that deserves its own discussion. Watch for scientific notation, "1.5E-3 mg/L" appears in the wild.

Register, export, and test. Tests should cover numeric values with units, qualitative descriptions, mixed entries, temperature conditions, and different solvent specifications.

Definition of done

GetAnnotationPage().do(item=1, annotation=Annotation.SOLUBILITY) returns a correct DataFrame. Tests pass. Docstrings present.

Aqueous solubility determines whether a drug can dissolve in the gut, whether a pollutant leaches into groundwater, and whether a molecule is worth pursuing at all. PubChem stores it under the `"Solubility"` heading, and the data is considerably messier than LogP. Depositors report solubility in mg/L, g/100mL, mol/L, and sometimes in prose: "slightly soluble in water," "miscible with ethanol." Some entries include temperature, some specify the solvent, and some use scientific notation. A few are qualitative only. All of these need to be handled. ### Scope Add `SOLUBILITY = "Solubility"` to `Annotation`. Create `pcdigitizer/data/solubility.py` with a `SolubilityData` processor. The output schema: `cid`, `sid`, `pclid`, `solubility_value` (Float64, nullable), `unit` (String), `solvent` (String, nullable), `temperature_C` (Float64, nullable), `qualitative` (String, nullable), `comment` (String, nullable). Qualitative-only entries like "Insoluble in water" should produce a row with `solubility_value = null` and `qualitative = "insoluble"`. Preserve the original unit for now. Normalization (e.g., converting everything to mg/L) is a real design choice that deserves its own discussion. Watch for scientific notation, `"1.5E-3 mg/L"` appears in the wild. Register, export, and test. Tests should cover numeric values with units, qualitative descriptions, mixed entries, temperature conditions, and different solvent specifications. ### Definition of done `GetAnnotationPage().do(item=1, annotation=Annotation.SOLUBILITY)` returns a correct DataFrame. Tests pass. Docstrings present.
Sign in to join this conversation.