%load_ext autoreload
%autoreload 2
from prettymol import draw, load_pdb StructureSelector, Repltools, MaterialCreator, StyleCreator, LightingCreator
# setup the repl
rt = Repltools()
# Load and process structure
structure = load_pdb("7xbu")
polymer = StructureSelector(structure).amino_acids().get_selection()
ligand = StructureSelector(structure).resname("MYN").get_selection()
# Create materials
surface_material = MaterialCreator.new()
cartoon_material = MaterialCreator.new()
sticks_material = MaterialCreator.new().update_properties(
**{'base_color': [0.15, 1, 0.15, 1],
"emission_strength": 1, # try changing this
"emission_color": [0.15, 1, 0.15, 1]}) # try changing this
# print(sticks_material)
# Draw and position
draw(structure, StyleCreator.cartoon(), MaterialCreator.new())
draw(ligand, StyleCreator.spheres(), sticks_material)
rt.view_set_axis(distance=0.1) # try changing this
rt.view_render()