def tes_execute_MosflmGeneratePredictionTask_2m_RNASE_1(self):
     UtilsTest.loadTestImage('ref-2m_RNASE_1_0001.cbf')
     UtilsTest.loadTestImage('ref-2m_RNASE_1_0002.cbf')
     referenceDataPath = self.dataPath / 'mosflm_generatePrediction_2m_RNASE_1.json'
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     mosflmIndexingTask = MosflmGeneratePredictionTask(inData=inData)
     mosflmIndexingTask.execute()
     self.assertTrue(mosflmIndexingTask.isSuccess())
 def test_execute_MosflmGeneratePredictionTaskTRYP_X1_4(self):
     UtilsTest.loadTestImage('ref-TRYP-X1_4_0001.cbf')
     UtilsTest.loadTestImage('ref-TRYP-X1_4_0002.cbf')
     UtilsTest.loadTestImage('ref-TRYP-X1_4_0003.cbf')
     UtilsTest.loadTestImage('ref-TRYP-X1_4_0004.cbf')
     referenceDataPath = self.dataPath / 'mosflm_generatePrediction_TRYP-X1_4.json'
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     mosflmIndexingTask = MosflmGeneratePredictionTask(inData=inData)
     mosflmIndexingTask.execute()
     self.assertTrue(mosflmIndexingTask.isSuccess())
Example #3
0
 def test_generateMOSFLMCommands_generatePrediction(self):
     tempdir = tempfile.mkdtemp(prefix='generateMOSFLMCommands_' +
                                       'generatePrediction_test_')
     tmpWorkingDir = pathlib.Path(tempdir)
     referenceDataPath = self.dataPath / 'mosflm_generatePrediction_2m_RNASE_1.json'
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     task = MosflmGeneratePredictionTask(inData)
     listCommands = task.generateMOSFLMCommands(inData, tmpWorkingDir)
     for command in ['WAVELENGTH 0.8729', 'DISTANCE 305.222',
                     'BEAM 113.5544 112.2936',
                     'TEMPLATE ref-2m_RNASE_1_####.cbf', 'SYMMETRY P1',
                     'EXIT']:
         self.assertTrue(command in listCommands, command)
     shutil.rmtree(tempdir)
Example #4
0
 def test_generateMOSFLMCommands_generatePrediction(self):
     tempdir = tempfile.mkdtemp(prefix="generateMOSFLMCommands_" +
                                "generatePrediction_test_")
     tmpWorkingDir = pathlib.Path(tempdir)
     referenceDataPath = self.dataPath / "mosflm_generatePrediction_2m_RNASE_1.json"
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     task = MosflmGeneratePredictionTask(inData)
     listCommands = task.generateMOSFLMCommands(inData, tmpWorkingDir)
     for command in [
             "WAVELENGTH 0.8729",
             "DISTANCE 305.222",
             "BEAM 113.5544 112.2936",
             "TEMPLATE ref-2m_RNASE_1_####.cbf",
             "SYMMETRY P1",
             "EXIT",
     ]:
         self.assertTrue(command in listCommands, command)
     shutil.rmtree(tempdir)
Example #5
0
 def run(self, inData):
     outData = {}
     xdsIndexingOutData = inData["indexingSolution"]
     # Run MOSFLM prediction
     mosflmUB = xdsIndexingOutData["xparm"]["mosflmUB"]
     mosflmU = xdsIndexingOutData["xparm"]["mosflmU"]
     matrix = {
         "matrixA": mosflmUB,
         "missettingsAngles": [0.0, 0.0, 0.0],
         "matrixU": mosflmU,
         "cell": {
             "a": xdsIndexingOutData["idxref"]["a"],
             "b": xdsIndexingOutData["idxref"]["b"],
             "c": xdsIndexingOutData["idxref"]["c"],
             "alpha": xdsIndexingOutData["idxref"]["alpha"],
             "beta": xdsIndexingOutData["idxref"]["beta"],
             "gamma": xdsIndexingOutData["idxref"]["gamma"]
         },
     }
     mosflmInData = MosflmGeneratePredictionTask.generateMOSFLMInData(
         inData={"subWedge": listSubWedge})
     mosflmInData["matrix"] = matrix
     mosflmInData.update({
         "mosaicityEstimation":
         xdsIndexingOutData["idxref"]["mosaicity"],
         "deviationAngular":
         1.0,
         "refinedDistance":
         xdsIndexingOutData["idxref"]["distance"],
         "symmetry":
         "P1"
     })
     mosflmGeneratePredictionTask = MosflmGeneratePredictionTask(
         inData=mosflmInData)
     mosflmGeneratePredictionTask.execute()
     pass
     return outData