Skip to content
Snippets Groups Projects
Commit 4270b88a authored by Marco Biasini's avatar Marco Biasini
Browse files

use 'ligand' property in the conservation example

parent a29098fb
No related branches found
No related tags found
No related merge requests found
from ost.seq import alg
scene.RemoveAll()
#-------------------------------------------------------------------------------
# Loading structure and alignment
#-------------------------------------------------------------------------------
m=io.LoadPDB('data/sh2.pdb')
mp=m.Select('ishetatm=false')
mp=m.Select('ligand=false')
aln=io.LoadAlignment('data/sh2.aln')
aln.AttachView(0, mp)
aln.SetSequenceOffset(0, 1)
......@@ -13,7 +12,7 @@ aln.SetSequenceOffset(0, 1)
# First we set all properties to zero, then let alg.Conservation assign the
# conservation scores to the residues
#-------------------------------------------------------------------------------
alg.Conservation(aln)
seq.alg.Conservation(aln)
#-------------------------------------------------------------------------------
# Setup Graphical Objects for Rendering
......@@ -25,7 +24,7 @@ scene.Add(gs)
scene.Add(g)
scene.CenterOn(g)
s.Attach(mp.Select('ishetatm=false'), 8.0)
s.Attach(mp.Select('ligand=false'), 8.0)
gr=gfx.Gradient()
gr.SetColorAt(0.0, gfx.Color(0.1, 0.1, 0.8))
......@@ -34,10 +33,10 @@ gr.SetColorAt(1.0, gfx.Color(0.8, 0.1, 0.1))
gs.ColorBy('cons', gr, 0.8, 1.0,
mol.Prop.Level.RESIDUE)
g.SetRenderMode(gfx.HSC,
m.Select('ishetatm=false'))
m.Select('ligand=false'))
g.SetRenderMode(gfx.CUSTOM,
m.Select('ishetatm=true'))
g.SetColor(gfx.YELLOW, 'ishetatm=true')
m.Select('ligand=true'))
g.SetColor(gfx.YELLOW, 'ligand=true')
#-------------------------------------------------------------------------------
# Create alignment viewer and show it on the screen
......
HET AYI A 1 37
HELIX 1 1 PRO A 66 LYS A 76 1 11
HELIX 2 2 SER A 127 HIS A 135 1 9
SHEET 1 A 4 PHE A 83 GLU A 87 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment