liveBook · Manning

Lipophilicity

As explained in Build AI Drug Discovery Pipelines

LogP is the logarithm of a compound's octanol-water partition coefficient and is a measure of lipophilicity.

Lipophilicity measures a molecule’s preference for nonpolar, lipid-like environments over aqueous environments. LogP is the logarithm of its octanol–water partition coefficient; higher values indicate a “greasier,” less polar compound. section 2.3.1

In oral drug discovery, logP helps flag absorption and solubility risk. A logP above 5 indicates excessive lipophilicity under the Rule of Five, increasing the risk that a molecule will not dissolve adequately in digestive fluids. Lipophilicity is related to polarity but is not identical to it. section 2.3.1

Use lipophilicity to:

  • Screen compound libraries alongside molecular weight, hydrogen-bond donors, and hydrogen-bond acceptors. section 2.3.1
  • Represent molecular structure as a machine-learning feature when modeling aqueous solubility. section 4.1.3
  • Balance lipophilicity against potency and other objectives during multi-objective molecule generation. section 13.3.1

From descriptor to solubility signal

A solubility dataset can include RDKit’s Crippen.MolLogP as the logP feature. Scatterplots and Pearson correlation then test whether increasing logP accompanies decreasing solubility; the observed relationship is strongly negative in the described dataset. section 4.1.3

Listing 2.4 Applying an Ro5 Filter
def apply_lipinski_filter(df):
    def count_ro5_violations(row):
        violations = 0
        if row['ExactMolWt'] > 500: violations += 1
        if row['MolLogP'] > 5: violations += 1
        if row['NumHDonors'] > 5: violations += 1
        if row['NumHAcceptors'] > 10: violations += 1
        return violations
    
    df['ro5_violations'] = df.apply(count_ro5_violations, axis=1)
    df['ro5_compliant'] = (    #A
        df['ro5_violations'] <= 1
    )
    
    compliant_df = df[df['ro5_compliant']]
    violated_df = df[~df['ro5_compliant']]
    return df, compliant_df, violated_df
 
specs, specs_ro5_compliant, specs_ro5_violated = \
    apply_lipinski_filter(specs)

Inspect a runnable Pandas filter that counts logP and other Rule of Five violations, then separates compliant and violated compounds. section 2.3.1

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Defines lipophilicity, applies a Rule of Five threshold, and computes logP with RDKit before correlating it with solubility.
Examples
Uses Rule of Five library filtering, RDKit descriptor computation, solubility scatterplots, and correlation heatmaps.
What it assumes
Assumes basic molecule descriptors and solubility while defining polarity, hydrogen bonding, and lipophilicity in practical terms.
What you can do after
Apply logP through RDKit and use it to filter compounds or investigate solubility relationships.
How it connects
Connects lipophilicity to polarity, aqueous solubility, membrane permeability, drug-likeness, feature engineering, and multi-objective optimization.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.