<jupyter_start><jupyter_text>Solution-2In this excercise we add surfaces to pinpoint the location of a binding site and render the ligand in different styles.<jupyter_code>import py3Dmol<jupyter_output><empty_output><jupyter_text>HIV-1 Protease structure with ligand Nelfinavir (1UN)<jupyter_code>viewer = py3Dmol.view(query='pdb:1OHR')

viewer.setStyle({'chain': 'A'}, {'cartoon': {'color': 'blue'}})
viewer.setStyle({'chain': 'B'}, {'cartoon': {'color':' yellow'}})
viewer.show()<jupyter_output><empty_output><jupyter_text>TODO-1: Add a molecular surface to the structure.Note, we use the `hetflag` here to exclude non-protein residues from the surface to have an unobstructed view of the binding site.<jupyter_code>viewer.addSurface(py3Dmol.MS,{'opacity':0.9,'color':'lightblue'}, 
                  {'chain': 'A', 'hetflag' : False})
                   
viewer.addSurface(py3Dmol.MS,{'opacity':0.9,'color':'lightyellow'}, 
                  {'chain': 'B', 'hetflag' : False})
viewer.show()<jupyter_output><empty_output><jupyter_text>TODO-2: Set the style for the ligand Set style for ligand `1UN` to sphere and color by greenCarbon color scheme.<jupyter_code>viewer.setStyle({'resn': '1UN'},{'sphere': {'colorscheme': 'greenCarbon'}})
viewer.show()<jupyter_output><empty_output><jupyter_text>Bonus: Annotate the binding siteRender the ligand as stick, display the bond orders, and add the label 'Nelfinavir'.<jupyter_code>ligand = {'resn': '1UN'}
viewer.setStyle(ligand, {'stick':{'radius': 0.3, 'singleBond': False}})
viewer.addLabel('Nelfinavir', {'fontColor':'black', 'backgroundColor':'lightgray'},ligand)
viewer.zoomTo(ligand)
viewer.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1566408576533651, 'fraction_numerical': 0.011316259678379988, 'mean_word_length': 6.601809954751131, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '355491', 'license': 'Apache-2.0', 'n_tokens_mistral': 603, 'n_tokens_neox': 572, 'n_words': 130, 'path': '1-3D-visualization/Solution-2.ipynb', 'repo_name': 'NicholasAKovacs/mmtf-workshop', 'size': '1679'}