<jupyter_start><jupyter_text>APE-Gen Example<jupyter_code>%mkdir -p example
%cd example
%pwd<jupyter_output>/Users/jayveeabella/kavrakilab/APE-Gen/example<jupyter_text>1. Input Preparation  Obtaining a receptor structure from PDB<jupyter_code># Run this cell if ...
# call get_pMHC_pdb script<jupyter_output><empty_output><jupyter_text>Obtaining a receptor structure through sequence<jupyter_code>from subprocess import call
call(["wget 'https://www.uniprot.org/uniprot/P01892.fasta'"], shell=True)
%pwd
%ls
import get_pMHC_pdb
get_pMHC_pdb.main(["3I6L"])
%ls
import model_receptor
model_receptor.main(["P01892.fasta", "3I6L.pdb"])<jupyter_output>Removing signal and transmembrane portions of alpha chain seq
Length of original alpha chain seq: 365
Length of processed alpha chain seq: 270
Length of alpha chain in template: 274
Preparing receptor template
Preparing target sequence
Aligning target sequence with receptor template
Aligning took 22.750502109527588 seconds.
Creating model
0 atoms in HETATM/BLK residues constrained
to protein atoms within 2.30 angstroms
and protein CA atoms within 10.00 angstroms
0 atoms in residues without defined topology
constrained to be rigid bodies
>> Model assessment by DOPE potential
DOPE score               : -40488.113281
>> Model assessment by DOPE potential
DOPE score               : -40846.265625

>> Summary of successfully produced models:
Filename                          molpdf     DOPE score    GA341 score
----------------------------------------------------------------------
target_sequence.B99990001.pdb     2269.25073   -40488.11328        1.00000
target_sequence.B99990002.pdb     220[...]<jupyter_text>2. Generate Models<jupyter_code>import APE_Gen
APE_Gen.main(["LLWTLVVLL", "HLA-A*02:01", "-o"])<jupyter_output>Preparing peptide and MHC
Peptide sequence: LLWTLVVLL
Receptor class: HLA-A*02:01
Aligning peptide anchors to MHC pockets
Sampling peptide backbone
Found RCD folder. Skipping this step
Loading sampled conformations
Num full confs: 39
Saving filtered peptide confs
Found peptide_confs.pdb, Please move to recompute.
Num filtered confs: 16
Average filtered energy: -21.0134997437
Saving complete peptide-HLA complexes
Found full_system_confs/ folder. Please move to recompute.
energy of selected binding mode: -23.2795639 38
Scoring/Minimizing with OpenMM ...
Found full_system_confs/openmm-minimized folder. Please move to recompute.<jupyter_text>3. Postprocessing / Visualization<jupyter_code>import nglview
import glob
import mdtraj as md
from matplotlib.colors import to_hex
import matplotlib as mpl

widget = nglview.NGLWidget()
widget.clear_representations()

structure = glob.glob("0/*.pdb")[0]
s = md.load(structure)

#widget.add_structure(s[0])
widget.add_trajectory(s)
#comp.add_licorice()

widget<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10028449502133713, 'fraction_numerical': 0.05654338549075391, 'mean_word_length': 4.515686274509804, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 24, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '277576', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 1032, 'n_tokens_neox': 882, 'n_words': 265, 'path': 'example.ipynb', 'repo_name': 'KavrakiLab/APE-Gen', 'size': '2812'}