Spaces:
Runtime error
Runtime error
Simon Duerr commited on
Commit ·
965a7b8
1
Parent(s): 4559fd7
add fixed positions
Browse filesFiles changed (2)
- app.py+168-37
- requirements.txt+2
25 unmodified lines262728293031218 unmodified lines25025125225325425525634 unmodified lines2912922932942952964 unmodified lines3013023033043053069 unmodified lines31631731831932032132245 unmodified lines36836937037137237337410 unmodified lines385386387388389390238 unmodified lines62963063163263363432 unmodified lines66766866967067167267367467567643 unmodified lines7207217227237247257267277287297307317327337347357365 unmodified lines74274374474574674774819 unmodified lines76876977077177277377477577677724 unmodified lines8028038048058068078085 unmodified lines81481581681781881982082182282382482582682782882983083183283383483583622 unmodified lines8598608618628638648658668678688698708718728 unmodified lines8818828838848858868878888898908918921 unmodified line89489589689789889990030 unmodified lines9319329339349359369372 unmodified lines94094194294394494530 unmodified lines97697797897998098113 unmodified lines99599699799899910006 unmodified lines1007100810091010101110121013101410151016101710181019102010211022102340 unmodified lines106410651066106710681069107010716 unmodified lines1078107910801081108210833 unmodified lines1087108810891090109110921093109410951096109725 unmodified linesimport jax.numpy as jnpimport tensorflow as tfif "/home/user/app/af_backprop" not in sys.path:sys.path.append("/home/user/app/af_backprop")218 unmodified lines)from protein_mpnn_utils import StructureDataset, StructureDatasetPDB, ProteinMPNNdevice = torch.device("cpu") #torch.device("cuda:0" if (torch.cuda.is_available()) else "cpu") #fix for memory issues# ProteinMPNN model name: v_48_002, v_48_010, v_48_020, v_48_030, v_32_002, v_32_010; v_32_020, v_32_030; v_48_010=version with 48 edges 0.10A noise# Standard deviation of Gaussian noise to add to backbone atomshidden_dim = 12834 unmodified linesreturn f"{pdb_code}.pdb"def update(inp,file,4 unmodified linessampling_temp,model_name,backbone_noise,):from protein_mpnn_utils import (loss_nll,9 unmodified lines)from protein_mpnn_utils import StructureDataset, StructureDatasetPDB, ProteinMPNNpdb_path = get_pdb(pdb_code=inp, filepath=file)if pdb_path == None:return "Error processing PDB"45 unmodified linesomit_AAs_np = np.array([AA in omit_AAs_list for AA in alphabet]).astype(np.float32)chain_id_dict = Nonefixed_positions_dict = Nonepssm_dict = Noneomit_AA_dict = Nonebias_AA_dict = None10 unmodified linestied_positions_dict = make_tied_positions_for_homomers(pdb_dict_list)else:tied_positions_dict = Nonechain_id_dict = {}chain_id_dict[pdb_dict_list[0]["name"]] = (designed_chain_list, fixed_chain_list)with torch.no_grad():238 unmodified lines)seq_list.append(seq + chain_s)message += f"{line}\n"# somehow sequences still contain X, remove againfor i, x in enumerate(seq_list):for aa in omit_AAs:32 unmodified linesgr.File.update(value="all_probs_concat.csv", visible=True),pdb_path,gr.Dropdown.update(choices=seq_list),)def update_AF(startsequence, pdb, num_recycles):# # run alphafold using ray# plddts, pae, num_res = run_alphafold(43 unmodified linesplt.colorbar()plt.xlabel("Scored residue")plt.ylabel("Aligned residue")# doesnt work (likely because too large)# plotAF_pae = px.imshow(# pae,# labels=dict(x="Scored residue", y="Aligned residue", color=""),# template="simple_white",# y=np.arange(len(plddts)),# )# plotAF_pae.write_html("test.html")# plotAF_pae.update_layout(title="Predicted Aligned Error", template="simple_white")return molecule(pdb, "out.pdb", num_res), plotAF_plddt, pltdef read_mol(molpath):5 unmodified linesreturn moldef molecule(pdb, afpdb, num_res):rms, input_pdb, aligned_pdb = align_structures(pdb, afpdb, num_res)mol = read_mol(input_pdb)19 unmodified lines.p-1{padding:0.5rem;}.flex{display:flex;align-items: center;}.w-4{width:1rem;}24 unmodified lines<label for="startstructure" class="relative inline-flex items-center mb-4 cursor-pointer "><input id="startstructure" type="checkbox" class="sr-only peer" checked><div class="w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"></div><span class="ml-3 text-sm font-medium text-gray-900 dark:text-gray-300">Show initial structure</span></label></div><button type="button" class="text-gray-900 bg-white hover:bg-gray-100 border border-gray-200 focus:ring-4 focus:outline-none focus:ring-gray-100 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-gray-600 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 mr-2 mb-2" id="download">5 unmodified lines<div> RMSD AlphaFold vs. native: """+ f"{rms:.2f}"+ """Å computed using CEAlign on the aligned fragment</div><div class="font-medium mt-4"><b>AlphaFold model confidence:</b></div><div class="flex space-x-2 py-1"><span class="w-4 h-4"style="background-color: rgb(0, 83, 214);"> </span><span class="legendlabel">Very high(pLDDT > 90)</span></div><div class="flex space-x-2 py-1"><span class="w-4 h-4"style="background-color: rgb(101, 203, 243);"> </span><span class="legendlabel">Confident(90 > pLDDT > 70)</span></div><div class="flex space-x-2 py-1"><span class="w-4 h-4"style="background-color: rgb(255, 219, 19);"> </span><span class="legendlabel">Low (70 >pLDDT > 50)</span></div><div class="flex space-x-2 py-1"><span class="w-4 h-4"style="background-color: rgb(255, 125, 69);"> </span><span class="legendlabel">Very low(pLDDT < 50)</span></div><div class="row column legendDesc"> AlphaFold produces a per-residue confidencescore (pLDDT) between 0 and 100. Some regions below 50 pLDDT may be unstructured in isolation.</div></div><script>let viewer = null;let voldata = null;22 unmodified linesreturn "Blue";}};viewer.getModel(1).setStyle({},{ cartoon: {color:"gray"} })viewer.getModel(0).setStyle({}, { cartoon: { colorfunc: colorAlpha } });viewer.zoomTo();viewer.render();viewer.zoom(0.8, 2000);viewer.getModel(0).setHoverable({}, true,function (atom, viewer, event, container) {console.log(atom)if (!atom.label) {atom.label = viewer.addLabel(atom.resn+atom.resi+" pLDDT=" + atom.b, { position: atom, backgroundColor: "mintcream", fontColor: "black" });}8 unmodified lines$("#sidechain").change(function () {if (this.checked) {BB = ["C", "O", "N"]viewer.getModel(0).setStyle( {"and": [{resn: ["GLY", "PRO"], invert: true},{atom: BB, invert: true},]},{stick: {colorscheme: "WhiteCarbon", radius: 0.3}, cartoon: { colorfunc: colorAlpha }});viewer.getModel(1).setStyle( {"and": [{resn: ["GLY", "PRO"], invert: true},{atom: BB, invert: true},]},{stick: {colorscheme: "WhiteCarbon", radius: 0.3}, cartoon: { color: "gray" }});viewer.render()} else {viewer.getModel(0).setStyle({cartoon: { colorfunc: colorAlpha }});viewer.getModel(1).setStyle({cartoon: { color:"gray" }});viewer.render()}});1 unmodified line$("#startstructure").change(function () {if (this.checked) {$("#sidechain").prop( "checked", false );viewer.getModel(1).setStyle({},{ cartoon: {color:"gray"} })viewer.getModel(0).setStyle({}, { cartoon: { colorfunc: colorAlpha } });viewer.render()} else {30 unmodified linesdef set_examples(example):label, inp, designed_chain, fixed_chain, homomer, num_seqs, sampling_temp = examplereturn [label,inp,2 unmodified lineshomomer,gr.Slider.update(value=num_seqs),gr.Radio.update(value=sampling_temp),]30 unmodified linesvalue=0.1,label="Sampling temperature",)with gr.Row():model_name = gr.Dropdown(choices=[13 unmodified linesgr.Markdown("for correct symmetric tying lenghts of homomer chains should be the same")btn = gr.Button("Run")label = gr.Textbox(label="Label", visible=False)6 unmodified lineshomomer,num_seqs,sampling_temp,],samples=[["Homomer design", "1O91", "A,B,C", "", True, 2, 0.1],["Monomer design", "6MRR", "A", "", False, 2, 0.1],["Redesign of Homomer to Heteromer", "3HTN", "A,B", "C", False, 2, 0.1],],)gr.Markdown(""" Sampling temperature for amino acids, `T=0.0` means taking argmax, `T>>1.0` means sample randomly. Suggested values `0.1, 0.15, 0.2, 0.25, 0.3`. Higher values will lead to more diversity.""")gr.Markdown("# Output")40 unmodified lineswith gr.Column():plotAF_plddt = gr.Plot(label="pLDDT")# remove maxh80 class from cssplotAF_pae = gr.Plot(label="PAE")tempFile = gr.Variable()btn.click(fn=update,inputs=[6 unmodified linessampling_temp,model_name,backbone_noise,],outputs=[out,3 unmodified linesall_probs,tempFile,chosen_seq,],)btnAF.click(fn=update_AF,inputs=[chosen_seq, tempFile, num_recycles],outputs=[mol, plotAF_plddt, plotAF_pae],)examples.click(fn=set_examples, inputs=examples, outputs=examples.components)25 unmodified lines262728293031323334218 unmodified lines25325425525625725825926026134 unmodified lines2962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553564 unmodified lines3613623633643653663679 unmodified lines37737837938038138238338438545 unmodified lines43143243343443543643743843944044110 unmodified lines452453454455456457458238 unmodified lines69769869970070170270370432 unmodified lines73773873974074174274374474574674743 unmodified lines7917927937947957967977987998008018028038048058068078088095 unmodified lines81581681781881982082119 unmodified lines84184284384484584624 unmodified lines8718728738748758768775 unmodified lines88388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291322 unmodified lines9369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729738 unmodified lines9829839849859869879889899909919929939949959969979989991000100110021003100410051 unmodified line100710081009101010111012101330 unmodified lines10441045104610471048104910502 unmodified lines105310541055105610571058105930 unmodified lines10901091109210931094109510961097109813 unmodified lines111211131114111511161117111811191120112111221123112411251126112711286 unmodified lines1135113611371138113911401141114211431144114511461147114811491150115140 unmodified lines1192119311941195119611971198119912006 unmodified lines12071208120912101211121212133 unmodified lines12171218121912201221122212231224122512261227122825 unmodified linesimport jax.numpy as jnpimport tensorflow as tffrom moleculekit.molecule import Moleculeif "/home/user/app/af_backprop" not in sys.path:sys.path.append("/home/user/app/af_backprop")218 unmodified lines)from protein_mpnn_utils import StructureDataset, StructureDatasetPDB, ProteinMPNNdevice = torch.device("cpu") # torch.device("cuda:0" if (torch.cuda.is_available()) else "cpu") #fix for memory issues# ProteinMPNN model name: v_48_002, v_48_010, v_48_020, v_48_030, v_32_002, v_32_010; v_32_020, v_32_030; v_48_010=version with 48 edges 0.10A noise# Standard deviation of Gaussian noise to add to backbone atomshidden_dim = 12834 unmodified linesreturn f"{pdb_code}.pdb"def preprocess_mol(pdb_code="", filepath=""):if pdb_code is None or pdb_code == "":try:mol = Molecule(filepath.name)except AttributeError as e:return Noneelse:mol = Molecule(pdb_code)mol.write('original.pdb')# clean messy files and only include protein itselfmol.filter("protein")# renumber using moleculekit 0...len(protein)df = mol.renumberResidues(returnMapping=True)# add proteinMPNN index col which used 1..len(chain), 1...len(chain)indexes = []for chain, g in df.groupby("chain"):j = 1for i, row in g.iterrows():indexes.append(j)j += 1df["proteinMPNN_index"] = indexesmol.write("cleaned.pdb")return "cleaned.pdb", dfdef make_fixed_positions_dict(atomsel, residue_index_df):# we use the uploaded file for the selectionmol = Molecule('original.pdb')# use index for selection as resids will changeselected_residues = mol.get("index",atomsel)# clean upmol.filter("protein")mol.renumberResidues()# based on selected index now get residsselected_residues = [str(i) for i in selected_residues]if len(selected_residues)==0:return None, []selected_residues_str = " ".join(selected_residues)selected_residues=set(mol.get('resid', sel=f"index {selected_residues_str}"))# use the proteinMPNN index nomenclature to assemble fixed_positions_dictfixed_positions_df = residue_index_df[residue_index_df['new_resid'].isin(selected_residues)]chains = set(mol.get('chain', sel="all"))fixed_position_dict = {'cleaned':{}}#store the selected residues in a list for the visualization later with cleaned.pdbselected_residues = list(fixed_positions_df['new_resid'])for c in chains:fixed_position_dict['cleaned'][c]=[]for i, row in fixed_positions_df.iterrows():fixed_position_dict['cleaned'][row['chain']].append(row['proteinMPNN_index'])return fixed_position_dict, selected_residuesdef update(inp,file,4 unmodified linessampling_temp,model_name,backbone_noise,atomsel):from protein_mpnn_utils import (loss_nll,9 unmodified lines)from protein_mpnn_utils import StructureDataset, StructureDatasetPDB, ProteinMPNN# pdb_path = get_pdb(pdb_code=inp, filepath=file)pdb_path, mol_index = preprocess_mol(pdb_code=inp, filepath=file)if pdb_path == None:return "Error processing PDB"45 unmodified linesomit_AAs_np = np.array([AA in omit_AAs_list for AA in alphabet]).astype(np.float32)chain_id_dict = Noneif atomsel == "":fixed_positions_dict, selected_residues = None, []else:fixed_positions_dict, selected_residues=make_fixed_positions_dict(atomsel, mol_index)pssm_dict = Noneomit_AA_dict = Nonebias_AA_dict = None10 unmodified linestied_positions_dict = make_tied_positions_for_homomers(pdb_dict_list)else:tied_positions_dict = Nonechain_id_dict = {}chain_id_dict[pdb_dict_list[0]["name"]] = (designed_chain_list, fixed_chain_list)with torch.no_grad():238 unmodified lines)seq_list.append(seq + chain_s)message += f"{line}\n"message += f"\nfixed positions:* {fixed_positions_dict['cleaned']} \n\n*uses CHAIN:[1..len(chain)] residue numbering"# somehow sequences still contain X, remove againfor i, x in enumerate(seq_list):for aa in omit_AAs:32 unmodified linesgr.File.update(value="all_probs_concat.csv", visible=True),pdb_path,gr.Dropdown.update(choices=seq_list),selected_residues)def update_AF(startsequence, pdb, num_recycles,selectedResidues):# # run alphafold using ray# plddts, pae, num_res = run_alphafold(43 unmodified linesplt.colorbar()plt.xlabel("Scored residue")plt.ylabel("Aligned residue")plt.savefig("pae_plot.png", dpi=300)plt.close()# doesnt work (likely because too large)# plotAF_pae = px.imshow(# pae,# labels=dict(x="Scored residue", y="Aligned residue", color=""),# template="simple_white",# y=np.arange(len(plddts_val)),# )# plotAF_pae.write_html("test.html")# plotAF_pae.update_layout(title="Predicted Aligned Error", template="simple_white")return molecule(pdb, "out.pdb", num_res, selectedResidues), plotAF_plddt, "pae_plot.png"def read_mol(molpath):5 unmodified linesreturn moldef molecule(pdb, afpdb, num_res, selectedResidues):rms, input_pdb, aligned_pdb = align_structures(pdb, afpdb, num_res)mol = read_mol(input_pdb)19 unmodified lines.p-1{padding:0.5rem;}.w-4{width:1rem;}24 unmodified lines<label for="startstructure" class="relative inline-flex items-center mb-4 cursor-pointer "><input id="startstructure" type="checkbox" class="sr-only peer" checked><div class="w-11 h-6 bg-gray-200 rounded-full peer peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"></div><span class="ml-3 text-sm font-medium text-gray-900 dark:text-gray-300">Show input structure</span></label></div><button type="button" class="text-gray-900 bg-white hover:bg-gray-100 border border-gray-200 focus:ring-4 focus:outline-none focus:ring-gray-100 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-gray-600 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:bg-gray-700 mr-2 mb-2" id="download">5 unmodified lines<div> RMSD AlphaFold vs. native: """+ f"{rms:.2f}"+ """Å computed using CEAlign on the aligned fragment</div></div><div class="text-sm flex items-start"><div class="w-1/2"><div class="font-medium mt-4 flex items-center space-x-2"><b>AF2 model of redesigned sequence</b></div><div>AlphaFold model confidence:</div><div class="flex space-x-2 py-1"><span class="w-4 h-4" style="background-color: rgb(0, 83, 214);"> </span><span class="legendlabel">Very high(pLDDT > 90)</span></div><div class="flex space-x-2 py-1"><span class="w-4 h-4" style="background-color: rgb(101, 203, 243);"> </span><span class="legendlabel">Confident(90 > pLDDT > 70)</span></div><div class="flex space-x-2 py-1"><span class="w-4 h-4" style="background-color: rgb(255, 219, 19);"> </span><span class="legendlabel">Low (70 >pLDDT > 50)</span></div><div class="flex space-x-2 py-1"><span class="w-4 h-4" style="background-color: rgb(255, 125, 69);"> </span><span class="legendlabel">Very low(pLDDT < 50)</span></div><div class="row column legendDesc"> AlphaFold produces a per-residue confidencescore (pLDDT) between 0 and 100. Some regions below 50 pLDDT may be unstructured in isolation.</div></div><div class="w-1/2"><div class="font-medium mt-4 flex items-center space-x-2"><b>Input structure </b><span class="w-4 h-4 bg-gray-300 inline-flex" ></span></div><div class="flex space-x-2 py-1"><span class="w-4 h-4" style="background-color:hotpink" > </span><span class="legendlabel">Fixed positions</span></div></div></div><script>let viewer = null;let voldata = null;22 unmodified linesreturn "Blue";}};var selectedResidues = """+f"{selectedResidues}"+"""let colors = {}for (let i=0; i<"""+str(num_res)+""";i++){if (selectedResidues.includes(i)){colors[i]="hotpink"}else{colors[i]="lightgray"}}let colorFixedSidechain = function(atom){if (selectedResidues.includes(atom.resi)){return "hotpink"}else if (atom.elem == "O"){return "red"}else if (atom.elem == "N"){return "blue"}else if (atom.elem == "S"){return "yellow"}else{return "lightgray"}}viewer.getModel(1).setStyle({},{ cartoon: {colorscheme:{prop:"resi",map:colors} } })viewer.getModel(0).setStyle({}, { cartoon: { colorfunc: colorAlpha } });viewer.zoomTo();viewer.render();viewer.zoom(0.8, 2000);viewer.getModel(0).setHoverable({}, true,function (atom, viewer, event, container) {if (!atom.label) {atom.label = viewer.addLabel(atom.resn+atom.resi+" pLDDT=" + atom.b, { position: atom, backgroundColor: "mintcream", fontColor: "black" });}8 unmodified lines$("#sidechain").change(function () {if (this.checked) {BB = ["C", "O", "N"]if ($("#startstructure").prop("checked")) {viewer.getModel(0).setStyle( {"and": [{resn: ["GLY", "PRO"], invert: true},{atom: BB, invert: true},]},{stick: {colorscheme: "WhiteCarbon", radius: 0.3}, cartoon: { colorfunc: colorAlpha }});viewer.getModel(1).setStyle( {"and": [{resn: ["GLY", "PRO"], invert: true},{atom: BB, invert: true},]},{stick: {colorfunc:colorFixedSidechain, radius: 0.3}, cartoon: {colorscheme:{prop:"resi",map:colors} }});}else{viewer.getModel(0).setStyle( {"and": [{resn: ["GLY", "PRO"], invert: true},{atom: BB, invert: true},]},{stick: {colorscheme: "WhiteCarbon", radius: 0.3}, cartoon: { colorfunc: colorAlpha }});viewer.getModel(1).setStyle();}viewer.render()} else {if ($("#startstructure").prop("checked")) {viewer.getModel(0).setStyle({cartoon: { colorfunc: colorAlpha }});viewer.getModel(1).setStyle({cartoon: {colorscheme:{prop:"resi",map:colors} }});}else{viewer.getModel(0).setStyle({cartoon: { colorfunc: colorAlpha }});viewer.getModel(1).setStyle();}viewer.render()}});1 unmodified line$("#startstructure").change(function () {if (this.checked) {$("#sidechain").prop( "checked", false );viewer.getModel(1).setStyle({},{cartoon: {colorscheme:{prop:"resi",map:colors} } })viewer.getModel(0).setStyle({}, { cartoon: { colorfunc: colorAlpha } });viewer.render()} else {30 unmodified linesdef set_examples(example):label, inp, designed_chain, fixed_chain, homomer, num_seqs, sampling_temp, atomsel = examplereturn [label,inp,2 unmodified lineshomomer,gr.Slider.update(value=num_seqs),gr.Radio.update(value=sampling_temp),atomsel]30 unmodified linesvalue=0.1,label="Sampling temperature",)gr.Markdown(""" Sampling temperature for amino acids, `T=0.0` means taking argmax, `T>>1.0` means sample randomly. Suggested values `0.1, 0.15, 0.2, 0.25, 0.3`. Higher values will lead to more diversity.""")with gr.Row():model_name = gr.Dropdown(choices=[13 unmodified linesgr.Markdown("for correct symmetric tying lenghts of homomer chains should be the same")gr.Markdown('## Fixed positions')gr.Markdown("""You can fix important positions in the protein. Resid should be specified with the same numbering as in the input pdb file. The fixed residues will be highlighted in the output.The [VMD selection](http://www.ks.uiuc.edu/Research/vmd/vmd-1.9.2/ug/node89.html) synthax is used. You can also select based on ligands or chains in the input structure to specify interfaces to be fixed.- <code>within 5 of resid 94</code> All residues that have >1 atom closer than 5 Å to any atom of residue 94- <code>name CA and within 5 of resid 94</code> All residues that have CA atom closer than 5 Å to any atom of residue 94- <code>resid 94 96 119</code> Residues 94, 94 and 119- <code>within 5 of resname ZN</code> All residues with any atom <5 Å of zinc ion- <code>chain A and within 5 of chain B </code> All residues of chain A that are part of the interface with chain B- <code>protein and within 5 of nucleic </code> All residues that bind to DNA (if present in structure)""")atomsel = gr.Textbox(placeholder="Specify atom selection ", label="Fixed positions")btn = gr.Button("Run")label = gr.Textbox(label="Label", visible=False)6 unmodified lineshomomer,num_seqs,sampling_temp,atomsel],samples=[["Homomer design", "1O91", "A,B,C", "", True, 2, 0.1,""],["Monomer design", "6MRR", "A", "", False, 2, 0.1,""],["Redesign of Homomer to Heteromer", "3HTN", "A,B", "C", False, 2, 0.1, ""],["Redesign of MID1 scaffold keeping binding site fixed", "3V1C", "A,B", "", False, 2, 0.1, "within 5 of resname ZN"],["Redesign of DNA binding protein", "3JRD", "A,B", "", False, 2, 0.1, "within 8 of nucleic"],],)gr.Markdown("# Output")40 unmodified lineswith gr.Column():plotAF_plddt = gr.Plot(label="pLDDT")# remove maxh80 class from cssplotAF_pae = gr.Image(label="PAE") #gr.Plot(label="PAE")tempFile = gr.Variable()selectedResidues = gr.Variable()btn.click(fn=update,inputs=[6 unmodified linessampling_temp,model_name,backbone_noise,atomsel,],outputs=[out,3 unmodified linesall_probs,tempFile,chosen_seq,selectedResidues],)btnAF.click(fn=update_AF,inputs=[chosen_seq, tempFile, num_recycles, selectedResidues],outputs=[mol, plotAF_plddt, plotAF_pae],)examples.click(fn=set_examples, inputs=examples, outputs=examples.components)
18 unmodified lines1920212218 unmodified linestqdmgradio==3.0.11protobuf<4-f https://storage.googleapis.com/jax-releases/jax_releases.html18 unmodified lines19202122232418 unmodified linestqdmgradio==3.0.11protobuf<4moleculekit--use-deprecated=legacy-resolver-f https://storage.googleapis.com/jax-releases/jax_releases.html
app.py+168-37
requirements.txt+2