Skip to content

Instantly share code, notes, and snippets.

View IAlibay's full-sized avatar
😪
What's sleep?

Irfan Alibay IAlibay

😪
What's sleep?
View GitHub Profile
@IAlibay
IAlibay / AnalyzingMultistateFiles.ipynb
Created August 23, 2023 23:52
AnalyzingMultistateFiles
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# imports
from openmm import app, unit, MonteCarloBarostat, LangevinMiddleIntegrator, XmlSerializer
from openmm.app import PDBFile, Modeller
from openmmforcefields.generators import SystemGenerator
from openfe import SmallMoleculeComponent
from openff.units.openmm import ensure_quantity
# system_generator
forcefield_kwargs = {
'constraints': app.HBonds,
@IAlibay
IAlibay / tyk2_viz_alchemiscale.ipynb
Last active May 4, 2023 03:27
Build, visualize, and submit a tyk2 perturbation network using openfe and alchemiscale
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import os
from alchemiscale import AlchemiscaleClient, Scope, ScopedKey
user_id = os.environ['ALCHEMISCALE_ID']
user_key = os.environ['ALCHEMISCALE_KEY']
asc = AlchemiscaleClient('https://api.alchemiscale.org', user_id, user_key)
scope = Scope('openfe', 'v0_7_3', 'tyk2_off2_0')
with open('scoped-key.dat', 'r') as f:
network = asc.get_network(f.read())
import os
from pprint import pprint
from alchemiscale import AlchemiscaleClient, Scope, ScopedKey
user_id = os.environ['ALCHEMISCALE_ID']
user_key = os.environ['ALCHEMISCALE_KEY']
asc = AlchemiscaleClient('https://api.alchemiscale.org', user_id, user_key)
scope = Scope('openfe', 'v0_7_3', 'tyk2_off2_0')
with open('scoped-key.dat', 'r') as f:
network = asc.get_network(f.read())
import os
from alchemiscale import AlchemiscaleClient, Scope, ScopedKey
user_id = os.environ['ALCHEMISCALE_ID']
user_key = os.environ['ALCHEMISCALE_KEY']
asc = AlchemiscaleClient('https://api.alchemiscale.org', user_id, user_key)
scope = Scope('openfe', 'v0_7_3', 'tyk2_off2_0')
with open('scoped-key.dat', 'r') as f:
network = asc.get_network(f.read())
import os
import copy
import json
import openfe
from openfe import ChemicalSystem
from openfe.protocols.openmm_rfe import RelativeHybridTopologyProtocol as RHTP
from gufe import AlchemicalNetwork, tokenization
from openff.units import unit
from rdkit import Chem
from openfe_benchmarks import tyk2
@IAlibay
IAlibay / gen_networks.py
Last active March 28, 2023 11:36
A short script for generating networks using OpenFE
import yaml
import json
import argparse
from typing import List
import numpy as np
from rdkit import Chem
from openfe import SmallMoleculeComponent
from openfe.setup import LomapAtomMapper, lomap_scorers, LigandNetwork