Skip to content

PyLipidParse

Convert standard lipid shorthand notation (LIPID MAPS, SwissLipids, HMDB) to molecular structures.

CI PyPI Python 3.8+ License: MIT

What it does

No existing open-source tool converts lipid shorthand notation to SMILES, InChI, or RDKit molecules. PyLipidParse fills this gap by bridging pygoslin (lipid name parsing) and RDKit (cheminformatics) to generate actual molecular structures.

from pylipidparse import LipidConverter

conv = LipidConverter()

conv.to_smiles("PC 16:0/18:1(9Z)")
# -> canonical SMILES for POPC

conv.to_inchikey("FA 18:2(9Z,12Z)")
# -> 'OYHQOLUKZRVURQ-HZJYTTRNSA-N'

conv.to_mol("Cer 18:1;O2/16:0")
# -> <rdkit.Chem.rdchem.Mol object>