Exemple #1
0
    def _showVolumesChimera(self):
        """ Create a chimera script to visualize selected volumes. """
        volumes = self._getVolumeNames()

        if len(volumes) > 1:
            cmdFile = self.protocol._getExtraPath('chimera_volumes.cmd')
            f = open(cmdFile, 'w+')
            for vol in volumes:
                localVol = relpath(vol, self.protocol._getExtraPath())
                if exists(vol):
                    f.write("open %s\n" % localVol)
            f.write('tile\n')
            f.close()
            view = em.ChimeraView(cmdFile)
        else:
            from pyworkflow.em.viewer import ChimeraClientView
            #view = CommandView('xmipp_chimera_client --input "%s" --mode projector 256 &' % volumes[0])
            view = ChimeraClientView(volumes[0], showProjection=False)

        return [view]
Exemple #2
0
    def _showVolumesChimera(self):
        """ Create a chimera script to visualize selected volumes. """
        volumes = self._getVolumeNames()

        if len(volumes) > 1:
            cmdFile = self.protocol._getExtraPath('chimera_volumes.cmd')
            f = open(cmdFile, 'w+')
            for volFn in volumes:
                # We assume that the chimera script will be generated
                # at the same folder than relion volumes
                vol = volFn.replace(':mrc', '')
                localVol = os.path.basename(vol)
                if exists(vol):
                    f.write("open %s\n" % localVol)
            f.write('tile\n')
            f.close()
            view = em.ChimeraView(cmdFile)
        else:
            view = em.ChimeraClientView(volumes[0])

        return [view]
    def _showVolumesChimera(self):
        """ Create a chimera script to visualize selected volumes. """
        volumes = self.getVolumeNames()

        if len(volumes) > 1:
            cmdFile = self._getFinalPath('chimera_volumes.cmd')
            f = open(cmdFile, 'w+')
            for vol in volumes:
                # We assume that the chimera script will be generated
                # at the same folder than spider volumes
                localVol = os.path.basename(vol)
                if os.path.exists(vol):
                    f.write("open spider:%s\n" % localVol)
            f.write('tile\n')
            f.close()
            view = em.ChimeraView(cmdFile)
        else:
            #view = CommandView('xmipp_chimera_client --input "%s" --mode projector 256 &' % volumes[0])
            #view = em.ChimeraClientView(volumes[0])
            view = em.ChimeraClientView(
                volumes[0], showProjection=True
            )  #, angularDistFile=sqliteFn, spheresDistance=radius)

        return [view]