Пример #1
0
    def postProcess(self, _edObject=None):
        EDPluginExecProcessScript.postProcess(self)
        EDVerbose.DEBUG("EDPluginExecDIMPLEPHASERv10.postProcess")

        self.programTermination()
        # Create some output data
        xsDataResult = CCP4DataResultPhaser(HKLOUT=HKL(self._hklout),
                                            XYZOUT=XYZ(self._xyzout),
                                            returnStatus=CCP4ReturnStatus())

        self.setDataOutput(xsDataResult)

        xyzout = None

        for record in self.readProcessLogFile().split('\n'):
            if 'Solution' in record and 'written to PDB file:' in record and ".pdb" in record:
                xyzout = record.split()[-1]

        assert (xyzout)

        shutil.copyfile(os.path.join(self.getWorkingDirectory(), xyzout),
                        self._xyzout)

        if not os.path.isfile(self._xyzout):
            raise RuntimeError, 'File %s does not exist' % self._xyzout

        return
    def postProcess(self, _edObject = None):
        EDPluginExecProcessScript.postProcess(self)
        EDVerbose.DEBUG(
            '*** EDPluginExecDIMPLEREFMACRestrainedRefinementv10.postProcess')
        
        init_r, init_r_free, final_r, final_r_free = self.parse_refmac_log()

        xsDataResult = CCP4DataResultREFMACRestrainedRefinement(
            HKLOUT = HKL(self._hklout),
            XYZOUT = XYZ(self._xyzout),
            initialR = XSDataFloat(init_r),
            initialRFree = XSDataFloat(init_r_free),
            finalR = XSDataFloat(final_r),
            finalRFree = XSDataFloat(final_r_free),            
            returnStatus = CCP4ReturnStatus())

        self.setDataOutput(xsDataResult)    
        

        if not os.path.isfile(self.getDataOutput().getHKLOUT().getPath().getValue()):
            raise RuntimeError, 'File %s does not exist' % self.getDataOutput().getHKLOUT().getPath().getValue() 

        if not os.path.isfile(self.getDataOutput().getXYZOUT().getPath().getValue()):
            raise RuntimeError, 'File %s does not exist' % self.getDataOutput().getXYZOUT().getPath().getValue() 


        return
    def postProcess(self, _edObject = None):
        EDPluginControl.postProcess(self)
        EDVerbose.DEBUG('*** PipelineCalcDiffMapv10.postProcess')

        results = self._restrained_plugin.getDataOutput()

        xsDataResult = CCP4DataResultControlPipelineCalcDiffMap(
            HKLOUT = HKL(self._hklout),
            XYZOUT = XYZ(self._xyzout),
            initialR = results.getInitialR(),
            initialRFree = results.getInitialRFree(),
            finalR = results.getFinalR(),
            finalRFree = results.getFinalRFree(),
            returnStatus = CCP4ReturnStatus())

        self.setDataOutput(xsDataResult)            

        # and also produce a summary file? - first pull out the residuals

        refmac_out = self._restrained_plugin.readProcessLogFile().split('\n')

        residuals = { }
        collect_residuals = False

        for record in refmac_out:
            if '$TABLE: Rfactor analysis, stats vs cycle' in record:
                collect_residuals = True
                continue

            if not collect_residuals:
                continue

            if record.strip()[0] in '0123456789':
                tokens = record.split()
                cycle = int(tokens[0])
                r_rfree_fom = map(float, tokens[1:4])

                residuals[cycle] = r_rfree_fom

            if 'Final results' in record:
                collect_residuals = False

        # now need to write this someplace...

        summary = open(os.path.join(self.getWorkingDirectory(),
                                    'summary.log'), 'w')

        for c in sorted(residuals):
            summary.write('%2d %.4f %.4f %.3f\n' % (c, residuals[c][0],
                                                    residuals[c][1],
                                                    residuals[c][2]))

        summary.close()
        
        # Create a Coot script launcher
        self.createCootLauncher()
        
        return
Пример #4
0
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        EDVerbose.DEBUG('*** CopySpaceGroupPDBtoMTZv10.postProcess')

        xsDataResult = CCP4DataResultControlCopySpaceGroupPDBtoMTZ(
            HKLOUT=HKL(self._hklout), returnStatus=CCP4ReturnStatus())
        self.setDataOutput(xsDataResult)

        return
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        EDVerbose.DEBUG(
            "EDPluginControlDIMPLERefmacRigidBodyPhaserv10.postProcess")
        # Create some output data

        xsDataResult = CCP4DataResultControlRefmacRigidBodyPhaser(
            XYZOUT=XYZ(self._xyzout), returnStatus=CCP4ReturnStatus())
        self.setDataOutput(xsDataResult)
    def postProcess(self, _edObject=None):
        EDPluginExec.postProcess(self)
        EDVerbose.DEBUG("EDPluginExecDIMPLERefmacMonomerCheckv10.postProcess")

        xsDataResult = CCP4DataResultRefmacMonomerCheck(
            returnStatus=CCP4ReturnStatus())
        self.setDataOutput(xsDataResult)

        return
    def postProcess(self, _edObject=None):
        EDPluginControl.postProcess(self)
        EDVerbose.DEBUG('*** PrepareMTZFileForRefinementv10.postProcess')

        postProcessColLabels = self._truncate_plugin.getDataOutput(
        ).getColLabels()

        xsDataResult = CCP4DataResultControlPrepareMTZFileForRefinement(
            HKLOUT=HKL(self._hklout),
            ColLabels=postProcessColLabels,
            returnStatus=CCP4ReturnStatus())
        self.setDataOutput(xsDataResult)
    def postProcess(self, _edObject=None):
        EDPluginExecProcessScript.postProcess(self)
        EDVerbose.DEBUG("EDPluginExecDIMPLEPointlessOriginv10.postProcess")

        xsDataResult = CCP4DataResultPointlessOrigin(
            HKLOUT=HKL(self._hklout), returnStatus=CCP4ReturnStatus())

        self.setDataOutput(xsDataResult)

        if not os.path.isfile(
                self.getDataOutput().getHKLOUT().getPath().getValue()):
            raise RuntimeError, 'File %s does not exist' % self.getDataOutput(
            ).getHKLOUT().getPath().getValue()

        return
Пример #9
0
    def postProcess(self, _edObject = None):
        EDPluginExecProcessScript.postProcess(self)
        EDVerbose.DEBUG('*** EDPluginExecDIMPLECADv10.postProcess')

        self.programTermination()

        xsDataResult = CCP4DataResultCAD(
            HKLOUT = HKL(self._hklout),
            returnStatus = CCP4ReturnStatus())
        self.setDataOutput(xsDataResult)

        if not os.path.isfile(self.getDataOutput().getHKLOUT().getPath().getValue()):
            raise RuntimeError, 'File %s does not exist' % self.getDataOutput().getHKLOUT().getPath().getValue() 
        
        
        return
Пример #10
0
    def postProcess(self, _edObject=None):
        EDPluginExecProcessScript.postProcess(self)
        EDVerbose.DEBUG("*** EDPluginExecDIMPLEUNIQUEv10.postProcess")

        self.programTermination()

        # call something to parse out the results

        xsDataResult = CCP4DataResultUNIQUE(HKLOUT=HKL(self._hklout),
                                            returnStatus=CCP4ReturnStatus())

        self.setDataOutput(xsDataResult)

        if not os.path.isfile(
                self.getDataOutput().getHKLOUT().getPath().getValue()):
            raise RuntimeError, 'File %s does not exist' % self.getDataOutput(
            ).getHKLOUT().getPath().getValue()

        return