Skip to content

Instantly share code, notes, and snippets.

@ljmartin
ljmartin / ligand.yaml
Created November 18, 2024 05:30
Boltz1 on Modal
sequences:
- protein:
id: [A, B]
sequence: MVTPEGNVSLVDESLLVGVTDEDRAVRSAHQFYERLIGLWAPAVMEAAHELGVFAALAEAPADSGELARRLDCDARAMRVLLDALYAYDVIDRIHDTNGFRYLLSAEARECLLPGTLFSLVGKFMHDINVAWPAWRNLAEVVRHGARDTSGAESPNGIAQEDYESLVGGINFWAPPIVTTLSRKLRASGRSGDATASVLDVGCGTGLYSQLLLREFPRWTATGLDVERIATLANAQALRLGVEERFATRAGDFWRGGWGTGYDLVLFANIFHLQTPASAVRLMRHAAACLAPDGLVAVVDQIVDADREPKTPQDRFALLFAASMTNTGGGDAYTFQEYEEWFTAAGLQRIETLDTPMHRILLARRATEPSAVPEGQASENLYFQ
msa: ./seq1.a3m
- ligand:
id: [C, D]
ccd: SAH
- ligand:
id: [E, F]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import modal
image = (
modal.Image.debian_slim()
.pip_install("uv")
.run_commands("uv pip install --system --compile-bytecode chai_lab==0.4.2")
.run_commands('mkdir -p /usr/local/lib/python3.11/site-packages/downloads/models_v2')
.apt_install("wget")
.run_commands('wget -O /usr/local/lib/python3.11/site-packages/downloads/conformers_v1.apkl https://chaiassets.com/chai1-inference-depencencies/conformers_v1.apkl')
.run_commands('wget -O /usr/local/lib/python3.11/site-packages/downloads/models_v2/trunk.pt https://chaiassets.com/chai1-inference-depencencies/models_v2/trunk.pt')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import modal
image = (
modal.Image.micromamba(python_version="3.10")
.apt_install('gcc')
.apt_install('git', 'wget')
.micromamba_install('openmm==8.0.0', 'pdbfixer','kalign2=2.04', 'hhsuite=3.3.0',
'mmseqs2', channels=['conda-forge', 'bioconda'])
.run_commands('pip install "colabfold[alphafold-minus-jax] @ git+https://github.com/sokrypton/ColabFold"')
.run_commands('pip install "colabfold[alphafold]"')
import pandas as pd
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import rdMolDescriptors
from rdkit.Chem import AllChem, rdMolDescriptors, rdMolAlign, rdMolTransforms
import numpy as np
from tqdm.notebook import tqdm
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
data_structure
#
loop_
_atom_site.group_PDB
_atom_site.type_symbol
_atom_site.label_atom_id
_atom_site.label_alt_id
_atom_site.label_comp_id
_atom_site.label_asym_id
_atom_site.label_entity_id