Skip to content

Commit

Permalink
add -q flag
Browse files Browse the repository at this point in the history
  • Loading branch information
atravitz committed Feb 25, 2025
1 parent 75c1c27 commit 8fc3581
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion showcase/openfe_showcase.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
" import condacolab\n",
" import locale\n",
" locale.getpreferredencoding = lambda: \"UTF-8\"\n",
" !mamaba install openfe\n",
" !mamba -q install openfe\n",
" !mkdir inputs && cd inputs && openfe fetch rbfe-tutorial\n",
" for _ in range(3):\n",
" # Sometimes we have to re-run the check\n",
Expand Down
36 changes: 36 additions & 0 deletions showcase/showcase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import openfe
from rdkit import Chem
from rdkit.Chem import AllChem
from openfe import SmallMoleculeComponent
from openfe.setup import LomapAtomMapper
# from openfe.setup.ligand_network_planning import generate_lomap_network

import lomap

# Extract the contents of the sdf file and visualise it
ligands_rdmol = [
mol for mol in Chem.SDMolSupplier("inputs/tyk2_ligands.sdf", removeHs=False)
]

for ligand in ligands_rdmol:
AllChem.Compute2DCoords(ligand)

Chem.Draw.MolsToGridImage(ligands_rdmol)


# Load ligands using RDKit
ligands_sdf = Chem.SDMolSupplier("inputs/tyk2_ligands.sdf", removeHs=False)

# Now pass these to form a list of Molecules
ligand_mols = [SmallMoleculeComponent(sdf) for sdf in ligands_sdf]

mapper = LomapAtomMapper()
lomap_mapping = next(mapper.suggest_mappings(ligand_mols[0], ligand_mols[4]))

lomap_network = lomap.generate_lomap_network(
molecules=ligand_mols,
scorer=openfe.lomap_scorers.default_lomap_score,
mappers=[
LomapAtomMapper(),
],
)

0 comments on commit 8fc3581

Please sign in to comment.