name: ligandmpnn description: > Inverse-fold a backbone with ligand, nucleic-acid, and metal context using LigandMPNN (Dauparas et al. 2023, github.com/dauparas/LigandMPNN). Reach for this skill to redesign the residues lining a binding pocket around a bound small molecule or cofactor, to design metal-coordinating sites where the geometry must be respected, or to get threaded designed-sequence PDBs out of any MPNN run. license: Apache-2.0 category: biomodels metadata: display-name: LigandMPNN
github.com/dauparas/LigandMPNN/blob/main/LICENSE: MIT (© 2024 Justas
Dauparas). verified 2026-06-30
third_party: - kind: weights name: LigandMPNN license: MIT terms_url: https://github.com/dauparas/LigandMPNN/blob/main/LICENSE
LigandMPNN
LigandMPNN extends the ProteinMPNN graph with non-protein atoms — small
molecules, nucleic acids, and metals are visible to the network — so it is the
right inverse-folding tool whenever the design surface includes a bound ligand
or cofactor that vanilla proteinmpnn would ignore. The same run.py is also
the most convenient runner for the other MPNN families because, unlike the
original ProteinMPNN script, it threads designs back onto the input structure
and writes PDBs alongside the FASTA. Code and weights are MIT
(github.com/dauparas/LigandMPNN). The model is small enough to run on CPU —
for a handful of designs on one structure that is seconds and usually faster
than dispatching, so the normal path is local with
pip install torch numpy biopython ProDy ml_collections dm-tree; a GPU helps
for batched campaigns.
Running it
pip install torch numpy biopython ProDy ml_collections dm-tree
git clone --depth 1 https://github.com/dauparas/LigandMPNN.git ligandmpnn
cd ligandmpnn
sed -i 's/np\.int\b/np.int64/g' openfold/np/residue_constants.py # repo pins numpy 1.23; alias removed in >=1.24
bash get_model_params.sh ./model_params
python run.py \
--model_type ligand_mpnn \
--checkpoint_ligand_mpnn ./model_params/ligandmpnn_v_32_010_25.pt \
--pdb_path complex.pdb \
--out_folder out \
--batch_size 8 --number_of_batches 4 \
--temperature 0.1 \
--fixed_residues "A45 A46 A47 A48"