Example #1
0
    def process(self, _edObject = None):
        EDPluginControl.process(self)
        self.DEBUG("EDPluginControlAutoproc.process")

        EDVerbose.DEBUG('first run w/ anom')

        self.xds_anom.executeSynchronous()
        if self.xds_anom.isFailure():
            EDVerbose.ERROR('xds failed when generating w/ anom')
            self.setFailure()
            return

        #Now backup the file
        mydir = os.path.abspath(self.getWorkingDirectory())
        xds_run_directory= self.xds_anom.getWorkingDirectory()
        xds_output = os.path.join(xds_run_directory, 'XDS_ASCII.HKL')
        output_anom = os.path.join(mydir, 'XDS_ANOM.HKL')
        copyfile(xds_output, output_anom)

        # since the original get_xds_stats uses the CORRECT.LP file we
        # need to backup it as well
        correct_lp = os.path.join(xds_run_directory, 'CORRECT.LP')
        correct_lp_anom = os.path.join(mydir, 'CORRECT_ANOM.LP')
        copyfile(correct_lp, correct_lp_anom)

        # now the second run, generate w/out anom
        EDVerbose.DEBUG('second run w/out anom')

        self.xds_noanom.executeSynchronous()

        if self.xds_noanom.isFailure():
            EDVerbose.ERROR('xds failed when generating w/out anom')
            self.setFailure()
            return

        #Now backup the file
        xds_run_directory= self.xds_anom.getWorkingDirectory()
        xds_output = os.path.join(xds_run_directory, 'XDS_ASCII.HKL')
        output_noanom = os.path.join(mydir, 'XDS_NOANOM.HKL')
        copyfile(xds_output, output_noanom)

        # since the original get_xds_stats uses the CORRECT.LP file we
        # need to backup it as well
        correct_lp = os.path.join(xds_run_directory, 'CORRECT.LP')
        correct_lp_noanom = os.path.join(mydir, 'CORRECT_NOANOM.LP')
        copyfile(correct_lp, correct_lp_noanom)

        # everything went fine
        data_output = XSDataXdsGenerateOutput()
        data_output.hkl_anom = XSDataString(output_anom)
        data_output.hkl_no_anom = XSDataString(output_noanom)
        data_output.correct_lp_no_anom = XSDataString(correct_lp_noanom)
        data_output.correct_lp_anom = XSDataString(correct_lp_anom)
        self.dataOutput = data_output
Example #2
0
    def process(self, _edObject=None):
        EDPluginControl.process(self)
        self.DEBUG("EDPluginControlAutoproc.process")

        EDVerbose.DEBUG('first run w/ anom')

        self.xds_anom.executeSynchronous()
        if self.xds_anom.isFailure():
            EDVerbose.ERROR('xds failed when generating w/ anom')
            self.setFailure()
            return

        #Now backup the file
        mydir = os.path.abspath(self.getWorkingDirectory())
        xds_run_directory = self.xds_anom.getWorkingDirectory()
        xds_output = os.path.join(xds_run_directory, 'XDS_ASCII.HKL')
        output_anom = os.path.join(mydir, 'XDS_ANOM.HKL')
        copyfile(xds_output, output_anom)

        # since the original get_xds_stats uses the CORRECT.LP file we
        # need to backup it as well
        correct_lp = os.path.join(xds_run_directory, 'CORRECT.LP')
        correct_lp_anom = os.path.join(mydir, 'CORRECT_ANOM.LP')
        copyfile(correct_lp, correct_lp_anom)

        # now the second run, generate w/out anom
        EDVerbose.DEBUG('second run w/out anom')

        self.xds_noanom.executeSynchronous()

        if self.xds_noanom.isFailure():
            EDVerbose.ERROR('xds failed when generating w/out anom')
            self.setFailure()
            return

        #Now backup the file
        xds_run_directory = self.xds_anom.getWorkingDirectory()
        xds_output = os.path.join(xds_run_directory, 'XDS_ASCII.HKL')
        output_noanom = os.path.join(mydir, 'XDS_NOANOM.HKL')
        copyfile(xds_output, output_noanom)

        # since the original get_xds_stats uses the CORRECT.LP file we
        # need to backup it as well
        correct_lp = os.path.join(xds_run_directory, 'CORRECT.LP')
        correct_lp_noanom = os.path.join(mydir, 'CORRECT_NOANOM.LP')
        copyfile(correct_lp, correct_lp_noanom)

        # everything went fine
        data_output = XSDataXdsGenerateOutput()
        data_output.hkl_anom = XSDataString(output_anom)
        data_output.hkl_no_anom = XSDataString(output_noanom)
        data_output.correct_lp_no_anom = XSDataString(correct_lp_noanom)
        data_output.correct_lp_anom = XSDataString(correct_lp_anom)
        self.dataOutput = data_output
Example #3
0
    def process(self, _edObject = None):
        EDPluginControl.process(self)
        self.DEBUG("EDPluginControlAutoproc.process")

        EDVerbose.DEBUG('first run w/ anom')

        self.xds_anom.executeSynchronous()
        if self.xds_anom.isFailure():
            EDVerbose.ERROR('xds failed when generating w/ anom')
            self.setFailure()
            return

        #Now backup the file
        mydir = os.path.abspath(self.getWorkingDirectory())
        xds_run_directory= self.xds_anom.getWorkingDirectory()
        xds_output = os.path.join(xds_run_directory, 'XDS_ASCII.HKL')
        output_anom = os.path.join(mydir, 'XDS_ANOM.HKL')
        copyfile(xds_output, output_anom)

        # since the original get_xds_stats uses the CORRECT.LP file we
        # need to backup it as well
        correct_lp = os.path.join(xds_run_directory, 'CORRECT.LP')
        correct_lp_anom = os.path.join(mydir, 'CORRECT_ANOM.LP')
        copyfile(correct_lp, correct_lp_anom)

        # Integrate.HKL as well
        integrate_hkl = os.path.join(xds_run_directory, 'INTEGRATE.HKL')
        integrate_hkl_anom = os.path.join(mydir, 'INTEGRATE_ANOM.HKL')
        copyfile(integrate_hkl, integrate_hkl_anom)

        # now the second run, generate w/out anom
        EDVerbose.DEBUG('second run w/out anom')

        self.xds_noanom.executeSynchronous()

        if self.xds_noanom.isFailure():
            EDVerbose.ERROR('xds failed when generating w/out anom')
            self.setFailure()
            return

        #Now backup the file
        xds_run_directory= self.xds_noanom.getWorkingDirectory()
        xds_output = os.path.join(xds_run_directory, 'XDS_ASCII.HKL')
        output_noanom = os.path.join(mydir, 'XDS_NOANOM.HKL')
        copyfile(xds_output, output_noanom)

        # since the original get_xds_stats uses the CORRECT.LP file we
        # need to backup it as well
        correct_lp = os.path.join(xds_run_directory, 'CORRECT.LP')
        correct_lp_noanom = os.path.join(mydir, 'CORRECT_NOANOM.LP')
        copyfile(correct_lp, correct_lp_noanom)

        # Integrate.HKL as well
        integrate_hkl = os.path.join(xds_run_directory, 'INTEGRATE.HKL')
        integrate_hkl_noanom = os.path.join(mydir, 'INTEGRATE_NOANOM.HKL')
        copyfile(integrate_hkl, integrate_hkl_noanom)

        gxparm = os.path.join(xds_run_directory, 'GXPARM.XDS')

        # everything went fine
        data_output = XSDataXdsGenerateOutput()
        data_output.hkl_anom = XSDataString(output_anom)
        data_output.hkl_no_anom = XSDataString(output_noanom)
        data_output.correct_lp_no_anom = XSDataString(correct_lp_noanom)
        data_output.correct_lp_anom = XSDataString(correct_lp_anom)
        data_output.integrate_anom = XSDataString(integrate_hkl_anom)
        data_output.integrate_noanom = XSDataString(integrate_hkl_noanom)

        if not os.path.isfile(gxparm):
            EDVerbose.WARNING('No GXPARM.XDS in {0}'.format(xds_run_directory))
            EDVerbose.WARNING('Things will probably crash soon')
        else:
            data_output.gxparm = XSDataString(gxparm)
        self.dataOutput = data_output