From 4270b88a220156921f30a915dfad34b2c860ea37 Mon Sep 17 00:00:00 2001 From: Marco Biasini <marco.biasini@unibas.ch> Date: Wed, 4 May 2011 11:49:07 +0200 Subject: [PATCH] use 'ligand' property in the conservation example --- examples/demos/conservation.py | 13 ++++++------- examples/demos/data/sh2.pdb | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/demos/conservation.py b/examples/demos/conservation.py index e4a254448..0e079ea68 100644 --- a/examples/demos/conservation.py +++ b/examples/demos/conservation.py @@ -1,10 +1,9 @@ -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 diff --git a/examples/demos/data/sh2.pdb b/examples/demos/data/sh2.pdb index e254cf039..e4ef85faa 100644 --- a/examples/demos/data/sh2.pdb +++ b/examples/demos/data/sh2.pdb @@ -1,3 +1,4 @@ +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 -- GitLab