from ipymol import viewer as pymol
pymol.start()
pymol.fetch('4MBS')
'4MBS'
pymol.remove('chain A')
pymol.remove('solvent')
pymol.select('ligand', 'resn MRV')
pymol.show_as('sticks', 'ligand')
pymol.show('spheres', 'ligand')
pymol.set('stick_radius', '.07', 'ligand')
pymol.set('sphere_scale', '.25', 'ligand')
pymol.set('sphere_quality', '4', 'ligand')
pymol.show_as('spheres', '4MBS and not ligand')
pymol.set('sphere_transparency', '.2', '4MBS and not ligand')
pymol.center('ligand')
pymol.orient('ligand')
pymol.zoom('ligand', '10')
pymol.do('rotate z,180; rotate x,90;')
pymol.center('ligand')
pymol.clip('near', '5')
pymol.bg_color('white')
pymol.do('util.cbaw;')
pymol.color('slate', 'elem N')
pymol.set('light_count', '8')
pymol.set('spec_count', '1')
pymol.set('shininess', '10')
pymol.set('specular', '0.25')
pymol.set('ambient', '0')
pymol.set('direct', '0')
pymol.set('reflect', '1.5')
pymol.set('ray_shadow_decay_factor', '0.3')
pymol.set('ray_shadow_decay_range', '1')
pymol.unset('depth_cue')
# Ligand specific
pymol.color('black', 'elem C and ligand')
pymol.set('stick_color', 'white')
pymol.ray()
pymol.display()