Shows how to display one entity with several render modes at once. The sidechains are displayed simple mode, whereas the backbone is displayed with smooth lines.

# remove all objects from scene, just in case
# Load chain A of SDH
ent = io.LoadPDB('data/sdh.pdb', restrict_chains='A')

# create graphics object
go = gfx.Entity('SDH', ent)
# set rendermode of full graphical object to interpolated spline
# select sidechains (including bond to C-alpha and N in case of proline)
sidechains = ent.Select('aname!=CA,C,N,O', mol.EXCLUSIVE_BONDS)
# set rendering of sidechains to simple
go.SetRenderMode(gfx.SIMPLE, sidechains)

# add object to scene

# center the scene on the geometric center of the SDH

print 'Demo 1: loading and displaying a pdb file'
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 6 Dec 2017 for OpenStructure by  doxygen 1.6.1