lib.python3.9.site-packages.ample.util.tests.test_mtz_util.Test.test_process_reflection_file_CIF

Tags
Last edited time

Error Message

RuntimeError: Error running sfcif2mtz. Check the logfile: /home/jenkins/workspace/CCP4/sl7-g8-py39/devtools/test-install/lib/python3.9/site-packages/ample/util/tests/cif2mtz.log

Stacktrace

self = <ample.util.tests.test_mtz_util.Test testMethod=test_process_reflection_file_CIF>

    @unittest.skipIf(sys.platform.startswith('win'), "uniqueify not executable")
    def test_process_reflection_file_CIF(self):
        # Get MTZ flags
        os.chdir(self.thisd)  # Need as otherwise tests that happen in other directories change os.cwd()
        cif = os.path.join(self.testfiles_dir, "1x79-sf.cif")

        d = {'mtz': None, 'sf_cif': cif, 'F': None, 'SIGF': None, 'FREE': None, 'work_dir': os.getcwd()}

>       mtz_util.processReflectionFile(d)

/home/jenkins/workspace/CCP4/sl7-g8-py39/devtools/test-install/lib/python3.9/site-packages/ample/util/tests/test_mtz_util.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/jenkins/workspace/CCP4/sl7-g8-py39/devtools/test-install/lib/python3.9/site-packages/ample/util/mtz_util.py:168: in processReflectionFile
    mtz = cp.sfcif2mtz(amoptd['sf_cif'])
/home/jenkins/workspace/CCP4/sl7-g8-py39/devtools/test-install/lib/python3.9/site-packages/ample/util/cif_parser.py:83: in sfcif2mtz
    self._sfcif2mtz(cifPath, mtzPath)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ample.util.cif_parser.CifParser object at 0x7f7168299f10>
cifPath = '/home/jenkins/workspace/CCP4/sl7-g8-py39/devtools/test-install/share/ample/testfiles/1x79-sf.cif'
mtzPath = '/home/jenkins/workspace/CCP4/sl7-g8-py39/devtools/test-install/lib/python3.9/site-packages/ample/util/tests/1x79-sf.mtz'

    def _sfcif2mtz(self, cifPath, mtzPath):
        """Convert a CIF containing structure factors to an MTZ file."""

        cmd = ["cif2mtz", "hklin", cifPath, "hklout", mtzPath]
        logfile = os.path.join(os.getcwd(), "cif2mtz.log")
        # Need empty stdin to trigger eof to get program to run
        retcode = ample_util.run_command(cmd, stdin="", logfile=logfile)
        if retcode != 0:
>           raise RuntimeError("Error running sfcif2mtz. Check the logfile: {0}".format(logfile))
E           RuntimeError: Error running sfcif2mtz. Check the logfile: /home/jenkins/workspace/CCP4/sl7-g8-py39/devtools/test-install/lib/python3.9/site-packages/ample/util/tests/cif2mtz.log

/home/jenkins/workspace/CCP4/sl7-g8-py39/devtools/test-install/lib/python3.9/site-packages/ample/util/cif_parser.py:65: RuntimeError