University Project · Machine Learning · Computational Drug Discovery

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.

Individual computational research project2023 – 2024Completed

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.

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.

Scope

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.

A 3D ribbon rendering of the FGFR2 protein target, with alpha-helices and beta-sheets coloured by secondary structure on a black background.
FGFR2 was the manually selected protein target for the computational case study.

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:

Auditable pipeline stages
01
Protein representation
Sequence and structural encoding of the selected target.
02
Target-conditioned generation
Conditional molecular proposals for that target.
03
Validity and properties
Syntactic validity checks and descriptor calculation.
04
Project screening
Composite filters and scores defined by the project.
05
Predicted interaction score
Model-based ranking signal, not measured affinity.
06
Optimisation or rejection
Analogue step, retention, or explicit discard.

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

Pipeline architectureTarget and data, through generative and predictive models, into checks that feed candidate selection.
Layer 1 · Inputs & data
Disease focusIntrahepatic cholangiocarcinoma
TargetFGFR2
Protein sequence
Protein structurePDB / AlphaFold-derived
KIBA + DAVISProtein–ligand affinity pairs
Known ligandsChemical databases
Layer 2 · Protein representation
Sequence representation
Structural representationGeometric Vector Perceptron
Protein multimodal network (PMN)Fuses sequence + structure
Layer 2 · Molecule generation
Encoder q(z|x)
Latent z + condition vectorTarget-conditioned
Decoder → SMILESConditional VAE
Layer 2 · Affinity model
Ligand molecular graphMessage-passing network (MPNN)
Morgan fingerprintFeed-forward branch
Protein branchPMN representation
Feature fusion
OutputsAffinity + RMSD pose-quality bounds
Layer 3 · Molecular-property checks
Molecular weight
H-bond donors
H-bond acceptors
logP
TPSA
Rotatable bonds
Saturation
QED drug-likeness
Layer 3 · Optimisation — TeachOpenCADD
Binding-site detection
Similarity search
Affinity prediction
Protein–ligand interaction analysis
Candidate comparison
Outputs
Generated molecular entities~1,000 candidates
Filtered candidatesMet druggability criteria
Input-vs-optimised exampleReported in the appendix
Generation & prediction pathData & representationsOptimisation feedback

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.

Molecule generator — unconditional vs target-conditionedA condition path makes generation depend on the target rather than sampling blind.
Standard VAE
Ligand x
Encoder
Latent z
Decoder
Generated ligand
Conditional VAE
Ligand x
Encoder
Latent z
Condition vector cProtein representation (PMN)
Conditional decoderz + c
Target-conditioned ligand

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.

Binding-affinity predictor — original vs modifiedShared feature branches; only the final prediction head changes.
Original predictor
Protein representationPMN branch
Ligand molecular graphMPNN branch
Morgan fingerprintFeed-forward branch
Feature fusion
Feed-forward network
Scalar outputSingle predicted affinity value
Modified predictor
Protein representationPMN branch
Ligand molecular graphMPNN branch
Morgan fingerprintFeed-forward branch
Feature fusion
Modified output head
Vector outputPredicted affinity + RMSD pose-quality bounds

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

1,000
Requested outputs
Generation-run count reported by the project
17 / 100
Passed project screen
Archived records with total score ≥ 0.7
−4.8 → −5.1 kcal/mol
Example predicted score
Input versus optimised example

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.

Split violin plots of eleven molecular properties for 100 valid archived records, comparing 83 molecules that did not meet the project screen with 17 that did, plus a summary panel. Threshold drug_score_total greater than or equal to 0.7. Diversity 0.92, uniqueness, novelty and validity 1.00 within the archived set.Split violin plots of eleven molecular properties for 100 valid archived records, comparing 83 molecules that did not meet the project screen with 17 that did, plus a summary panel. Threshold drug_score_total greater than or equal to 0.7. Diversity 0.92, uniqueness, novelty and validity 1.00 within the archived set.
Property distributions for 100 valid archived molecular records. Seventeen met the project screen (drug_score_total ≥ 0.7); eighty-three did not. Diversity 0.92 · Uniqueness 1.00 · Novelty 1.00 · Validity 1.00 are scoped to this archived analysed set.
View archived-set summary
Archived molecular analysis summary
MetricValue
Valid archived records100
Met project screen (total ≥ 0.7)17
Did not meet project screen83
Diversity (archived set)0.92
Uniqueness (archived set)1.00
Novelty (archived set)1.00
Validity (archived set)1.00

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.