def createGeometries(self, obj):
        from DejaVu.Geom import Geom
        geomC = obj.geomContainer
        c =  Geom('path',  shape=(0,0), protected=True)
        c.replace = 'force'
        geomC.addGeom(c, parent=geomC.masterGeom)
        for a in obj.allAtoms:
            a.colors['path']=(1.,1.,1.)
            a.opacities['path']=1.0

        for chain in obj.chains:
            if not hasattr(chain, 'sheet2D') or chain.sheet2D is None: 
                continue
            # HACK TO DEBUG SECONDARYSTRUCTURE
            if not chain.sheet2D.has_key('ssSheet2D') or \
               chain.sheet2D['ssSheet2D'] is None:
                continue

            # Create a geometry per sheet2D
            name = 'path'+ chain.id
            g = Spheres( name, quality = 10, radii = 0.15, protected=True)
            g.replace = 'force'
            geomC.addGeom( g, parent=c)
            self.managedGeometries.append(g)
            # FIXME to update this geom we would have to implement
            # self.updateGeom specifically for this command

            geomC.atoms[name] = ResidueSet()
            g.chain = chain
            geomC.atomPropToVertices[name] = self.atomPropToVertices
            geomC.geomPickToAtoms[name] = self.pickedVerticesToAtoms
            geomC.geomPickToBonds[name] = None
Example #2
0
    def createGeometries(self, obj):
        from DejaVu.Geom import Geom
        geomC = obj.geomContainer
        c = Geom('path', shape=(0, 0), protected=True)
        c.replace = 'force'
        geomC.addGeom(c, parent=geomC.masterGeom)
        for a in obj.allAtoms:
            a.colors['path'] = (1., 1., 1.)
            a.opacities['path'] = 1.0

        for chain in obj.chains:
            if not hasattr(chain, 'sheet2D') or chain.sheet2D is None:
                continue
            # HACK TO DEBUG SECONDARYSTRUCTURE
            if not chain.sheet2D.has_key('ssSheet2D') or \
               chain.sheet2D['ssSheet2D'] is None:
                continue

            # Create a geometry per sheet2D
            name = 'path' + chain.id
            g = Spheres(name, quality=10, radii=0.15, protected=True)
            g.replace = 'force'
            geomC.addGeom(g, parent=c)
            self.managedGeometries.append(g)
            # FIXME to update this geom we would have to implement
            # self.updateGeom specifically for this command

            geomC.atoms[name] = ResidueSet()
            g.chain = chain
            geomC.atomPropToVertices[name] = self.atomPropToVertices
            geomC.geomPickToAtoms[name] = self.pickedVerticesToAtoms
            geomC.geomPickToBonds[name] = None
 def createGeometries(self, name):
     from DejaVu.Geom import Geom
     t = Geom(name,shape=(0,0), protected=True)
     self.vf.vectfield[name]=t
     t.replace = True
     self.vf.GUI.VIEWER.AddObject(t, redo=0)
Example #4
0
 def createGeometries(self, name):
     from DejaVu.Geom import Geom
     t = Geom(name, shape=(0, 0), protected=True)
     self.vf.vectfield[name] = t
     t.replace = True
     self.vf.GUI.VIEWER.AddObject(t, redo=0)