Illustrates the use of BoundingBoxFromEntity().
1
2
3
4
5scene.RemoveAll()
6
7
8sdh=io.LoadPDB('data/sdh.pdb')
9
10helix=sdh.Select('rnum=99:128 and cname=A and aname=CA,C,N,O')
11
12
13go=gfx.Entity('helix', gfx.SIMPLE, helix)
14
15scene.Add(go)
16
17
18bbox=mol.BoundingBoxFromEntity(helix)
19
20
21bb=gfx.Cuboid('xxx', bbox)
22bb.SetFillColor(gfx.Color(0.5, 0.8, 0.5, 0.2))
23scene.Add(bb)
24
25
26scene.center=go.center