Shows how to switch between different render modes and explains some of the rendermode parameters.
- See Also
- Loading and Displaying an Entity
9 eh=io.LoadPDB(
"data/sdh.pdb")
12 sdh_go=gfx.Entity(
"SDH2", eh.Select(
"cname=A"))
15 scene.CenterOn(sdh_go)
18 sdh_go.SetRenderMode(gfx.TUBE)
19 sdh_go.tube_options.SetTubeRadius(0.8)
21 sdh_go.ColorBy(
"abfac",gfx.BLUE,gfx.RED)
23 sdh_go.RadiusBy(
"abfac",0.8,2.2)
26 sdh_go.SetRenderMode(gfx.LINE_TRACE)
27 sdh_go.GetOptions(gfx.LINE_TRACE).SetLineWidth(2.5)
30 sdh_go.SetRenderMode(gfx.CPK)
31 sdh_go.GetOptions(gfx.CPK).SetSphereDetail(4)
34 sdh_go.SetRenderMode(gfx.RenderMode.HSC)
35 sdh_go.SetColor(gfx.Color(0.5, 0.5, 0.5),
'')
36 sdh_go.SetColor(gfx.Color(0,1,0),
"rtype=H")
37 sdh_go.SetDetailColor(gfx.Color(0.7,1.0,0.8),
"rtype=H")
39 sdh_go.SetColor(gfx.Color(1,0,0),
"rtype=E")
40 sdh_go.SetDetailColor(gfx.Color(1.0,0.8,0.2),
"rtype=E")