Support Solubility #4
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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"toAnnotation. Createpcdigitizer/data/solubility.pywith aSolubilityDataprocessor.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 withsolubility_value = nullandqualitative = "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.