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.
1
2scene.RemoveAll()
3
4ent = io.LoadPDB('data/sdh.pdb', restrict_chains='A')
5
6
7go = gfx.Entity('SDH', ent)
8
9go.SetRenderMode(gfx.SLINE)
10
11sidechains = ent.Select('aname!=CA,C,N,O', mol.EXCLUSIVE_BONDS)
12
13go.SetRenderMode(gfx.SIMPLE, sidechains)
14
15
16scene.Add(go)
17
18
19scene.CenterOn(go)
20
21print('Demo 1: loading and displaying a pdb file')