Gains:
- Ability to distinguish between deterministically calculated features and statistically estimated features and determine confidence levels
- Ability to evaluate the region in which the model is reliable by using the concept of applicability domain
- Ability to understand that one should use trait predictions to rank candidates and make the final decision through experimentation.
Before synthesizing a molecule, we often ask: "Is it water-soluble? How acidic is it? Does it cross the cell membrane? Is it plausible as a drug candidate?" Predicting the answers to these questions before the experiment saves a lot of time. AI and its specialized models (especially QSAR — Quantitative Structure-Activity Relationship, i.e. statistical model that predicts a property from the structural descriptors of the molecule) are powerful in these predictions. But these predictions are predictions of probability, not measurements. In this unit, we will learn about feature prediction, its strengths and the most critical concept, the applicability zone (the region where the model is reliable).
What features are predicted?
- logP: Oil/water partition coefficient of the molecule; It shows lipophilicity (fat liking). Critical in drug absorption.
- Solubility (logS): How soluble it is in water.
- pKa: Acidity/alkaliness; The pH at which a group ionizes.
- TPSA: Topological polar surface area; It is used in permeability estimation.
- Lipinski “rule of five”: Practical thresholds for molecular weight, logP, number of H-bond donors/acceptors of oral drug candidates.
Some of these values are calculated deterministically (e.g. TPSA, H-bond numbers) with tools such as RDKit; Some of them are statistical estimates (logS, biological activity). Knowing this distinction determines how much you trust.
Tip: Distinguish whether a feature is “calculated” (rule-based, repeatable) or “predicted” (from model, uncertain). Have high confidence in calculations, cautious confidence in predictions, and verify predictions by experiment.
Scope of applicability: the most important concept
A QSAR model works well on molecules that are similar to the molecules it was trained on. If you give a molecule that is very different from the training data (for example, a very large, unusual skeleton), the model will still produce a number, but that number will be unreliable. This is called "being outside the scope of applicability." The model always gives an answer; It's your job to tell whether the answer is reliable or not.
It's even riskier when the language model gives an attribute value: it produces the number as a "probable-looking" value, with no underlying calculation. So if possible, get feature values from a deterministic tool (RDKit) or a QSAR model that gives uncertainty, not from the language model.
Step by step: safe feature prediction
- Verify molecule: Parse SMILES with RDKit (unit 2).
- Calculate deterministic ones: MA, logP (calculated), TPSA, H-bond numbers from RDKit.
- Mark predictions separately: Keep model predictions such as logS, activity, etc. with the "prediction" tag.
- Check the applicability domain: Does the molecule look like the training data? Is it extremely large/unusual?
- Use for ranking, not decision: Use predictions to rank candidates; The ultimate choice is experiment.
- Close by experiment: Verify critical properties (solubility, pKa) by measurement.
Four copyable templates
1) Deterministic features with RDKit:
from rdkit import Chemfrom rdkit.Chem import Descriptors, rdMolDescriptorsmol = Chem.MolFromSmiles("CC(=O)Oc1ccccc1C(=O)O") # aspirinprint("MA:", round(Descriptors.MolWt(mol),2))print("logP (calculated):", round(Descriptors.MolLogP(mol),2))print("TPSA:", round(Descriptors.TPSA(mol),1))print("H-bond donor:", rdMolDescriptors.CalcNumHBD(mol))print("H-bond acceptor:", rdMolDescriptors.CalcNumHBA(mol))
2) Lipinski rule evaluation:
Molecule (SMILES): [SMILES]Task: Evaluate compliance with the Lipinski rule of five with MA, logP, HBD, HBA values to be calculated from RDKit. Mark each criterion separately as pass/fail. Rule: Do NOT make up the numbers; I'll get it from RDKit, you comment.
3) Feature estimate + uncertainty request:
Molecule (SMILES): [SMILES]Task: Give a qualitative estimate of water solubility (logS) (high/medium/low) and explain the rationale with structural features. Don't give an exact number; State that this is a PREDICTION and needs to be confirmed by experiment. Warn if the molecule has an unusual structure (applicability risk).
4) Candidate ranking (prioritization by prediction):
Below are SMILES of 5 molecules.Task: Rank them in terms of water solubility (most soluble to least) based on structural features (number of polar groups, rings, lipophilicity).Write justification for each ranking decision.Note: This is a PRELIMINARY sort; The final selection will be made by measurement.
Weak prompt / Strong prompt
Weak:
What is the solubility of this molecule?
The AI makes up a number that does not exist under the calculation (e.g. "12 mg/mL"); It gives confidence but may be wrong.
Strong:
Molecule (SMILES): [SMILES].Task: 1) I will give the logP, TPSA, HBD/HBA to be calculated with RDKit: [values].2) Based on these values, interpret whether the resolution is high/medium/low.3) Giving the exact number; State that it is a guess and experiments are required.
The difference: we took the deterministic values from the vehicle and made the AI just interpret them; We explicitly asked for uncertainty and the need for experimentation.
Feature types and trust level
feature
How to get
trust
note
molecular weight
RDKit (deterministic)
very high
Cut from the formula
TPSA, HBD/HBA
RDKit (deterministic)
high
rule based
logP (calculated)
RDKit model
medium-high
May deviate from experimental
logS (resolution)
QSAR estimate
medium
Depends on area of applicability
pKa
special model
medium
It falls in a complex structure
biological activity
QSAR/ML
Variable
Be sure to test and verify
mini cases
Case 1 — Number of resolutions fitted. A student asked the AI about the solubility of a compound; He received the answer "25 mg/mL" and set up the experimental design accordingly. The actual value in the measurement was ~2 mg/mL, a 10-fold difference. The AI had made up the number. Lesson: don't take properties like resolution as numbers from the language model; qualitative prediction + measurement.
Case 2 — Outside the scope of applicability. A QSAR model said "activity is high" for a large macromolecule that was very different from the training set. The user noticed that the molecule did not resemble the training data and deemed the prediction unreliable; The experiment gave really low activity. Lesson: the model always responds; If it is out of scope, the answer is worthless.
Case 3 — Correct use of Lipinski. On one candidate molecule, AI evaluated Lipinski with values from RDKit: MA 512 (>500, borderline), logP 4.8 (favorable), HBD 2, HBA 7. The user correctly interpreted "one criterion remains but the rule is not absolute" and did not eliminate the molecule altogether. Lesson: rules are guidelines, not thresholds; Interpret with context.
Common mistakes
- Getting the feature count from the language model. Values that are not calculated are fabricated; Use deterministic tool or model with uncertainty.
- Ignoring the field of applicability. The model generates numbers for each molecule; unreliable outside the field.
- Considering an estimated measurement. logS is an estimate; It is not a substitute for experimental resolution.
- Considering Lipinski the absolute rule. The candidate who is on the border is not automatically eliminated; Many drugs violate the rule.
- Confusing “calculated” with “estimated.” TPSA is calculated (reliable), activity is estimated (uncertain).
Caution: Feature predictions are great for ranking and prioritizing candidates; but not to determine a decision alone. "The model said soluble" is a hypothesis; "I measured, it dissolves" is a result.
In summary
- Molecular properties can be predicted before the experiment and saves a lot of time.
- Some features are calculated deterministically (MA, TPSA, HBD/HBA), some are statistical estimates (logS, activity).
- The domain of applicability is the most critical concept: the model always answers, but is unreliable outside the domain.
- Get the feature counts from RDKit or the ambiguity model, not the language model.
- Use predictions to rank candidates; Make the final decision by experimenting.
Application task
Select five molecules (e.g. a drug series). Calculate MA, logP, TPSA, HBD, HBA for each with RDKit and evaluate Lipinski. Separately, ask the AI for a qualitative estimate (not a number) of the solubility of each molecule and a field of applicability warning. Collect deterministic values and AI predictions in a table. Which molecule gave the most drug-like profile? Where is uncertainty highest?
checklist
- [ ] I distinguish between deterministic calculated and predicted properties.
- [ ] I'm getting the property values from the RDKit/model, not the language model.
- [ ] I notice molecules outside the scope of applicability.
- [ ] I use Lipinski as a guide, not an absolute rule.
- [ ] I use predictions for ranking and decision for experimentation.
- [ ] I have a plan to verify critical features by measurement.