OpenStructure
Loading...
Searching...
No Matches
gfx_selection.py

Graphical entities have an active selection. In essence this selection is a subset of atoms, residues, chains and bonds. The active selection is displayed with a green halo around the structure. The selection can be set either programmatically by using Entity::SetSelection() or interactively by using the selection tool.

See also
Loading and Displaying an Entity
1eh=io.LoadEntity("fragment.pdb")
2go=gfx.Entity("test",eh.CreateFullView())
3ev = eh.Select(mol.Query("rnum=2,3,8,13"))
4go.SetSelection(ev)
5go.SetRenderMode(gfx.RenderMode.CUSTOM)
6go.SetColor(gfx.YELLOW,"(ele=C and rnum=1:4)")
7scene.Add(go)
8scene.SetCenter(go.GetCenter())
9
10scene.AutoslabMax()