Set up BranchChain with CUDA in a temporary environment and load the model:
using Pkg
Registry.add(url="https://github.com/MurrellGroup/MurrellGroupRegistry")
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/MurrellGroup/BranchChain.jl")
Pkg.add(["DLProteinFormats", "CUDA", "cuDNN"])
ENV["CUDA_VISIBLE_DEVICES"] = 0
using CUDA, cuDNN
using BranchChain
dev = BranchChain.gpu
model = load_model("branchchain_tune1.jld") |> dev;Redesign the whole second chain:
template = (BranchChain.pdb"7F5H"1)[[1,2]]
to_redesign = [template[2].sequence]
samp = design(model, X1_from_pdb(template, to_redesign), steps = 200, device = dev, path = "samp-1.pdb", vidpath = "samp-1-anim");Redesign a portion of the second chain:
template = (BranchChain.pdb"7F5H"1)[[1,2]]
to_redesign = ["QVQLQESGGGLVQAGGSLRLSCAASGSDFSSSTMGWYRQAPGKQREFVAISSEGSTSYAGSVKGRFTISRDNAKNTVYLQMNSLEPED","QVTVSA"]
samp = design(model, X1_from_pdb(template, to_redesign), steps = 200, device = dev, path = "samp-2.pdb", vidpath = "samp-2-anim");using DLProteinFormats
feature_table = DLProteinFormats.load(PDBTable);
sampling_ff = featurizer(feature_table, DLProteinFormats.CHAIN_FEATS_V1)
# Design a single chain RBD binder with nanobody-like features:
feature_table[feature_table.pdb_id .== "7F5H", :]
template = (BranchChain.pdb"7F5H"1)[[1,2]]
to_redesign = [template[2].sequence]
samp = design(model, X1_from_pdb(template, to_redesign), template.name, [t.id for t in template], sampling_ff;
device = dev, recycles = 1, steps = 200, path = "samp-feat.pdb", vidpath = "samp-feat-anim")