This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]"') |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https://github.com/rdkit/rdkit/discussions/6135 | |
from rdkit import Chem | |
from rdkit.Chem import AllChem | |
def mol_to_bits(mol, radius=0): | |
bi = {} | |
fp = AllChem.GetMorganFingerprint(mol, radius, bitInfo=bi,useFeatures=False) | |
bits = np.zeros(mol.GetNumAtoms(),dtype=int) | |
for key, value in bi.items(): |
NewerOlder