Target-Conditioned De Novo Molecule Generation for FGFR2
FGFR2 in intrahepatic cholangiocarcinoma
An individual computational study that adapted TargetVAE and TeachOpenCADD components to generate, filter and rank molecular structures for an FGFR2 case study in intrahepatic cholangiocarcinoma.
- Conditional VAE
- TargetVAE
- TeachOpenCADD
- Molecular representations
- Binding-score prediction
- Property screening
- Python
- PyTorch
Quick summary
- Role
- Individual computational researcher.
- Problem
- Keep target representation, molecular generation, property screening and model-based ranking separate and auditable.
- What I built
- Target-conditioned generation, modified interaction-score prediction and a TeachOpenCADD-inspired screening workflow.
- Best evidence
- 100 valid archived records analysed; 17 met the project-defined screen.
- Main limitation
- No biochemical, selectivity, synthesis, ADME, toxicity, animal or clinical validation.
- Repository / report
- View repositoryRead the technical retrospective
Overview
This individual computational project explored how target-aware molecular generation, binding-score prediction and cheminformatics filters could be connected into one reproducible screening workflow.
FGFR2 in intrahepatic cholangiocarcinoma was used as the case study. The target was chosen manually from the disease literature; the project did not build or validate an automated target-discovery system. The computational workflow then adapted ideas from TargetVAE’s protein-conditioned generation and TeachOpenCADD’s open pipeline structure.
COMPUTATIONAL STUDY ONLY. No biochemical binding assay, selectivity test, synthesis, ADME, toxicity, animal study or clinical validation was performed. The outputs are generated structures and model-based prioritisation signals, not validated drug candidates or treatments.

Research question
The useful question was not whether a generative model could emit valid SMILES strings.
It was whether a complete pipeline could keep the following stages separate and auditable:
Each stage answers a different question. A syntactically valid molecule is not necessarily unique. A unique molecule is not necessarily drug-like. A drug-like molecule is not necessarily active against FGFR2. A favourable predicted score is not measured binding affinity. None of those properties establishes safety or clinical efficacy.
Pipeline
The pipeline starts from the disease focus (intrahepatic cholangiocarcinoma) and target (FGFR2), with protein sequence and PDB or AlphaFold-derived structure, plus the KIBA and DAVIS affinity datasets and known ligands. Three model components follow: a protein multimodal network fuses sequence and structural (Geometric Vector Perceptron) representations; a conditional variational autoencoder encodes a ligand to a latent vector, conditions it on the target and decodes SMILES; and an affinity model combines a message-passing network over the ligand graph, a Morgan-fingerprint branch and the protein branch through feature fusion to output binding affinity plus RMSD pose-quality bounds. Generated candidates are then screened on molecular-property checks (molecular weight, hydrogen-bond donors and acceptors, logP, TPSA, rotatable bonds, saturation and QED drug-likeness) and refined by a TeachOpenCADD optimisation workflow of binding-site detection, similarity search, affinity prediction, interaction analysis and candidate comparison. Outputs are the generated entities, the filtered candidates and an input-versus-optimised example, and the checks feed back into candidate selection.
The report combined four main pieces:
- a protein multimodal representation using sequence and structural information;
- a conditional variational autoencoder for ligand generation;
- a modified multi-output binding-score predictor;
- a TeachOpenCADD-inspired property and optimisation workflow.
The work used PyTorch and PyTorch Geometric, with KIBA and DAVIS appearing in the model workflow described by the report. Experiments were run on a laptop RTX 3070 under limited time and compute.
Conditional generation
The original TargetVAE design conditions ligand generation on a protein representation. The project explored an additional condition pathway intended to steer generation using predicted molecular properties.
A standard variational autoencoder encodes a ligand to a latent vector and decodes it back to a generated ligand without any target information. The conditional variational autoencoder used here adds a condition vector derived from the protein representation, so the decoder generates from the latent vector together with the target condition and produces a target-conditioned ligand.
The ConditionalVAE run was limited to one fold and 130 epochs. That is enough to demonstrate an implementation and produce an analysed sample. It is not enough to establish generalisation across unseen targets, seeds, data splits or model families.
Binding-score model
The project retained the protein, ligand-graph and fingerprint branches from the referenced architecture and changed the final scalar head to a multi-output head intended to return an affinity-style score and pose-distance outputs.
The modification keeps the same protein and ligand feature branches and changes the final prediction head from one scalar output to a multi-output vector.
Both versions of the binding-affinity predictor share three input branches: a protein representation from the protein multimodal network, a message-passing network over the ligand molecular graph, and a Morgan-fingerprint feed-forward branch. The branches are concatenated and fused. In the original predictor the fused features pass through a feed-forward network to a single scalar affinity value. In the modified predictor the same fused features pass through a modified output head that produces a vector of predicted affinity plus RMSD pose-quality bounds. Only the output head differs.
The model was trained for 100 epochs on one fold. The report includes prediction plots and example pose-score tables, but the public portfolio does not treat those outputs as experimentally measured affinity.
The phrase kcal/mol describes the score’s reported unit. It does not convert the result into a laboratory binding free energy.
Archived generation results
The generation run reported 1,000 requested molecular outputs. The property-analysis archive available for this portfolio contains 100 valid molecular records. Seventeen of those 100 met the project’s drug_score_total ≥ 0.7 threshold.
Those denominators must remain explicit.
The archive does not by itself establish that the full generator had 10% validity. It establishes that 100 valid records were retained and analysed. A complete generation manifest would be required to classify every requested output as valid, invalid, duplicate, filtered or missing.
The plot compares the 17 archived records that met the project screen with the 83 that did not. The screen combines molecular descriptors and heuristic scores; it should not be labelled clinical druggability.
Within the archived set, the recorded summary metrics were:
| Metric | Archived value | What it establishes |
|---|---|---|
| Diversity | 0.92 | Structural spread under the project’s implementation |
| Uniqueness | 1.00 | No duplicates within the analysed set under the chosen representation |
| Novelty | 1.00 | No matches to the comparison set used by the project |
| Validity | 1.00 | All records in the archived analysed table were valid molecular representations |
These values do not establish biological activity, synthesizability, selectivity or safety.
Example optimisation
The appendix compares one generated input structure with one output from the optimisation workflow.
| Property | Input | Optimised output |
|---|---|---|
| Predicted best score | −4.8 kcal/mol | −5.1 kcal/mol |
| Molecular weight | 205.305 | 245.37 |
| LogP | 1.72 | 3.13 |
| QED score | 0.72 | 0.82 |
| Total project score | 0.80 | 0.86 |
| Hydrogen-bond donors | 2 | 1 |
| Hydrogen-bond acceptors | 3 | 3 |
| Rotatable bonds | 2 | 4 |
| TPSA | 41.06 | 18.51 |
The output improved the project’s composite score and the model’s example predicted score. That is evidence that the software path could transform and re-rank an example under its own objective.
It is not evidence that the output binds FGFR2 more strongly in vitro, reaches the target in a patient or is safer than the input.
Clinical context and corrections
FGFR2 fusions and rearrangements are established actionable alterations in a subset of intrahepatic cholangiocarcinoma. Pemigatinib and futibatinib are relevant FDA-approved FGFR-targeted comparators for previously treated disease with qualifying FGFR2 alterations.
Two corrections are important when reading the original coursework report:
- ivosidenib is an IDH1 inhibitor used for IDH1-mutated disease; it is not an FGFR2 inhibitor;
- the US approval of infigratinib for FGFR2-altered cholangiocarcinoma was withdrawn in May 2024, so it should be described only as a historical comparator.
The portfolio should preserve the original report as a dated artefact while correcting those points in the current public interpretation.
What the project established
The project established:
- an end-to-end computational workflow could be assembled from target representation, generation, property calculation and ranking components;
- the modified code produced a retained set of valid molecular records;
- a project-defined property screen separated 17 of 100 archived records;
- the optimisation path changed the descriptors and predicted score of an example molecule;
- the architecture was modular enough to expose where stronger validation should be inserted.
It did not establish:
- automated biological target selection;
- generalisation across data folds or unseen targets;
- experimentally measured FGFR2 binding;
- selectivity against other kinases;
- synthetic accessibility in practice;
- metabolic stability, permeability, toxicity or efficacy;
- a validated hit, lead or treatment.
What I would redesign
A stronger second iteration would make evaluation the centre of the project.
- Preserve a complete generation manifest linking every requested sample to decode status, canonical SMILES, duplicate status and rejection reason.
- Use scaffold-aware or target-held-out splits rather than one fold.
- Compare against simple baselines and the unmodified reference architecture.
- Separate generator metrics from property-screen metrics and target-interaction metrics.
- Add PAINS/reactive-group checks, synthesizability assessment and uncertainty estimates.
- Re-dock or rescore retained molecules with an independent method rather than evaluating them only with the same objective used to select them.
- Use prospective wet-lab validation before calling any output a hit.
- Track model, data, seed, checkpoint, threshold and source version for every reported number.
Documents
The paper and appendix preserve the original coursework methodology and results. The repository contains the implementation.