Esempio n. 1
0
    def preProcess(self, _edObject=None):
        EDPluginControl.preProcess(self)
        self.DEBUG("EDPluginControlXDSAPPv1_0.preProcess")
        self.screen("XDSAPP processing started")

        if self.dataInput.reprocess is not None:
            self.reprocess = self.dataInput.reprocess.value

        self.processingCommandLine = ' '.join(sys.argv)
        self.processingPrograms = "XDSAPP"
        if self.reprocess:
            self.processingPrograms += " reprocess"

        if self.dataInput.useXdsAsciiToXml is not None:
            if self.dataInput.useXdsAsciiToXml.value:
                self.useXdsAsciiToXml = True

        if self.useXdsAsciiToXml:
            self.doAnomAndNonanom = False
        elif self.dataInput.doAnomAndNonanom is not None:
            self.doAnomAndNonanom = self.dataInput.doAnomAndNonanom.value

        if self.doAnomAndNonanom:
            self.doAnom = True
            self.doNoanom = True
        else:
            if self.dataInput.doAnom is not None:
                self.doAnom = self.dataInput.doAnom.value
            self.doNoanom = not self.doAnom

        self.strHost = socket.gethostname()
        self.screen("Running on {0}".format(self.strHost))
        try:
            strLoad = os.getloadavg()
            self.screen("System load avg: {0}".format(strLoad))
        except OSError:
            pass

        self.edPluginWaitFileFirst = self.loadPlugin("EDPluginMXWaitFilev1_1", "MXWaitFileFirst")
        self.edPluginWaitFileLast = self.loadPlugin("EDPluginMXWaitFilev1_1", "MXWaitFileLast")

        self.edPluginRetrieveDataCollection = self.loadPlugin("EDPluginISPyBRetrieveDataCollectionv1_4")
        if self.doAnom:
            self.edPluginExecXDSAPPAnom = self.loadPlugin("EDPluginExecXDSAPPv1_0", "EDPluginExecXDSAPPv1_0_anom")
        if self.doNoanom:
            self.edPluginExecXDSAPPNoanom = self.loadPlugin("EDPluginExecXDSAPPv1_0", "EDPluginExecXDSAPPv1_0_noanom")

        # Check for space group and cell
        if self.dataInput.spaceGroup is not None and self.dataInput.unitCell is not None:
            spaceGroup = self.dataInput.spaceGroup.value
            spaceGroupNumber = EDUtilsSymmetry.getITNumberFromSpaceGroupName(spaceGroup)
            self.screen("Forcing space group {0} number {1}".format(spaceGroup, spaceGroupNumber))
            unitCell = self.dataInput.unitCell.value
            self.screen("Forcing unit cell {0}".format(unitCell))
            self.xdsAppSpacegroup = "{0} {1}".format(spaceGroupNumber, unitCell)
Esempio n. 2
0
 def readIdxrefLp(self, _pathToIdxrefLp, _xsDataResultXDSIndexing=None):
     self.DEBUG("EDPluginXDSIndexingv1_0.readIdxrefLp")
     if _xsDataResultXDSIndexing is None:
         xsDataResultXDSIndexing = XSDataResultXDSIndexing()
     else:
         xsDataResultXDSIndexing = _xsDataResultXDSIndexing
     if os.path.exists(_pathToIdxrefLp):
         xsDataResultXDSIndexing.pathToLogFile = XSDataFile(XSDataString(_pathToIdxrefLp))
         with open(_pathToIdxrefLp) as f:
             listLines = f.readlines()
         indexLine = 0
         doParseParameters = False
         doParseLattice = False
         while (indexLine < len(listLines)):
             if "DIFFRACTION PARAMETERS USED AT START OF INTEGRATION" in listLines[indexLine]:
                 doParseParameters = True
                 doParseLattice = False
             elif "DETERMINATION OF LATTICE CHARACTER AND BRAVAIS LATTICE" in listLines[indexLine]:
                 doParseParameters = False
                 doParseLattice = True
             if doParseParameters:
                 if "MOSAICITY" in listLines[indexLine]:
                     mosaicity = float(listLines[indexLine].split()[-1])
                     xsDataResultXDSIndexing.mosaicity = XSDataAngle(mosaicity)
                 elif "DETECTOR COORDINATES (PIXELS) OF DIRECT BEAM" in listLines[indexLine]:
                     xBeam = float(listLines[indexLine].split()[-2])
                     yBeam = float(listLines[indexLine].split()[-1])
                     xsDataResultXDSIndexing.beamCentreX = XSDataFloat(xBeam)
                     xsDataResultXDSIndexing.beamCentreY = XSDataFloat(yBeam)
                 elif "CRYSTAL TO DETECTOR DISTANCE" in listLines[indexLine]:
                     distance = float(listLines[indexLine].split()[-1])
                     xsDataResultXDSIndexing.distance = XSDataLength(distance)
             elif doParseLattice:
                 if listLines[indexLine].startswith(" * ") and not listLines[indexLine + 1].startswith(" * "):
                     listLine = listLines[indexLine].split()
                     xsDataResultXDSIndexing.latticeCharacter = XSDataInteger(int(listLine[1]))
                     bravaisLattice = listLine[2]
                     xsDataResultXDSIndexing.bravaisLattice = XSDataString(bravaisLattice)
                     spaceGroup = EDUtilsSymmetry.getMinimumSymmetrySpaceGroupFromBravaisLattice(bravaisLattice)
                     xsDataResultXDSIndexing.spaceGroup = XSDataString(spaceGroup)
                     spaceGroupNumber = EDUtilsSymmetry.getITNumberFromSpaceGroupName(spaceGroup)
                     xsDataResultXDSIndexing.spaceGroupNumber = XSDataInteger(spaceGroupNumber)
                     xsDataResultXDSIndexing.qualityOfFit = XSDataFloat(float(listLine[3]))
                     xsDataXDSCell = XSDataXDSCell()
                     xsDataXDSCell.length_a = XSDataLength(float(listLine[4]))
                     xsDataXDSCell.length_b = XSDataLength(float(listLine[5]))
                     xsDataXDSCell.length_c = XSDataLength(float(listLine[6]))
                     xsDataXDSCell.angle_alpha = XSDataAngle(float(listLine[7]))
                     xsDataXDSCell.angle_beta = XSDataAngle(float(listLine[8]))
                     xsDataXDSCell.angle_gamma = XSDataAngle(float(listLine[9]))
                     xsDataResultXDSIndexing.unitCell = xsDataXDSCell
             indexLine += 1
     return xsDataResultXDSIndexing
    def preProcess(self, _edObject=None):
        EDPluginControl.preProcess(self)
        self.DEBUG("EDPluginControlXDSAPPv1_0.preProcess")
        self.screen("XDSAPP processing started")

        self.processingCommandLine = ' '.join(sys.argv)
        self.processingPrograms = "XDSAPP"

        if self.useXdsAsciiToXml:
            self.doAnomAndNonanom = False
        elif self.dataInput.doAnomAndNonanom is not None:
            if self.dataInput.doAnomAndNonanom.value:
                self.doAnomAndNonanom = True
            else:
                self.doAnomAndNonanom = False

        self.strHost = socket.gethostname()
        self.screen("Running on {0}".format(self.strHost))
        try:
            strLoad = os.getloadavg()
            self.screen("System load avg: {0}".format(strLoad))
        except OSError:
            pass

        self.edPluginWaitFileFirst = self.loadPlugin("EDPluginMXWaitFilev1_1", "MXWaitFileFirst")
        self.edPluginWaitFileLast = self.loadPlugin("EDPluginMXWaitFilev1_1", "MXWaitFileLast")

        self.edPluginRetrieveDataCollection = self.loadPlugin("EDPluginISPyBRetrieveDataCollectionv1_4")
        self.edPluginExecXDSAPPAnom = self.loadPlugin("EDPluginExecXDSAPPv1_0", "EDPluginExecXDSAPPv1_0_anom")
        if self.doAnomAndNonanom:
            self.edPluginExecXDSAPPNoanom = self.loadPlugin("EDPluginExecXDSAPPv1_0", "EDPluginExecXDSAPPv1_0_noanom")

        # Check for space group and cell
        if self.dataInput.spaceGroup is not None and self.dataInput.unitCell is not None:
            spaceGroup = self.dataInput.spaceGroup.value
            spaceGroupNumber = EDUtilsSymmetry.getITNumberFromSpaceGroupName(spaceGroup)
            self.screen("Forcing space group {0} number {1}".format(spaceGroup, spaceGroupNumber))
            unitCell = self.dataInput.unitCell.value
            self.screen("Forcing unit cell {0}".format(unitCell))
            self.xdsAppSpacegroup = "{0} {1}".format(spaceGroupNumber, unitCell)
    def generateXSDataIndexingResult(_xsDataResultLabelitIndexing, _xsDataExperimentalCondition=None):
        EDVerbose.DEBUG("EDHandlerXSDataLabelitv1_1.generateXSDataIndexingOutput")

        xsDataLabelitScreenOutput = _xsDataResultLabelitIndexing.screenOutput
        xsDataLabelitMosflmScriptsOutput = _xsDataResultLabelitIndexing.mosflmScriptsOutput

        iSelectedSolutionNumber = xsDataLabelitScreenOutput.getSelectedSolutionNumber().getValue()

        xsDataIndexingResult = XSDataIndexingResult()
        xsDataIndexingSolutionSelected = None

        for xsDataLabelitSolution in xsDataLabelitScreenOutput.getLabelitScreenSolution():
            xsDataCrystal = XSDataCrystal()
            xsDataSpaceGroup = XSDataSpaceGroup()
            edStringSpaceGroupName = EDUtilsSymmetry.getMinimumSymmetrySpaceGroupFromBravaisLattice(xsDataLabelitSolution.getBravaisLattice().getValue())
            xsDataSpaceGroup.setName(XSDataString(edStringSpaceGroupName))
            xsDataCrystal.setSpaceGroup(xsDataSpaceGroup)
            xsDataCrystal.setCell(xsDataLabelitSolution.getUnitCell())
            xsDataIndexingSolution = XSDataIndexingSolution()
            xsDataIndexingSolution.setCrystal(xsDataCrystal)
            iIndex = xsDataLabelitSolution.getSolutionNumber().getValue()
            xsDataIndexingSolution.setNumber(XSDataInteger(iIndex))
            xsDataIndexingResult.addSolution(xsDataIndexingSolution)
            if (iIndex == iSelectedSolutionNumber):
                xsDataIndexingSolutionSelected = XSDataIndexingSolutionSelected()
                xsDataIndexingSolutionSelected.setNumber(XSDataInteger(iIndex))
                edStringSelectedSpaceGroupName = edStringSpaceGroupName
                xsDataCellSelected = xsDataLabelitSolution.getUnitCell()
                fRmsdSelected = xsDataLabelitSolution.getRmsd().getValue()
                iNumberOfSpotsSelected = xsDataLabelitSolution.getNumberOfSpots().getValue()

        xsDataCrystalSelected = XSDataCrystal()
        xsDataSpaceGroupSelected = XSDataSpaceGroup()
        xsDataSpaceGroupSelected.setName(XSDataString(edStringSelectedSpaceGroupName))
        xsDataSpaceGroupSelected.setITNumber(XSDataInteger(EDUtilsSymmetry.getITNumberFromSpaceGroupName(edStringSelectedSpaceGroupName)))
        xsDataCrystalSelected.setSpaceGroup(xsDataSpaceGroupSelected)
        xsDataCrystalSelected.setCell(xsDataCellSelected)
        xsDataCrystalSelected.setMosaicity(XSDataDouble(xsDataLabelitScreenOutput.getMosaicity().getValue()))
        xsDataIndexingSolutionSelected.setCrystal(xsDataCrystalSelected)

        xsDataOrientation = XSDataOrientation()
        xsDataOrientation.setMatrixA(xsDataLabelitMosflmScriptsOutput.getAMatrix())
        xsDataOrientation.setMatrixU(xsDataLabelitMosflmScriptsOutput.getUMatrix())
        xsDataIndexingSolutionSelected.setOrientation(xsDataOrientation)

        xsDataStatisticsIndexing = XSDataStatisticsIndexing()

        if (_xsDataExperimentalCondition is not None):
            fBeamPositionXOrig = _xsDataExperimentalCondition.getDetector().getBeamPositionX().getValue()
            fBeamPositionYOrig = _xsDataExperimentalCondition.getDetector().getBeamPositionY().getValue()
            fBeamPositionXNew = xsDataLabelitScreenOutput.getBeamCentreX().getValue()
            fBeamPositionYNew = xsDataLabelitScreenOutput.getBeamCentreY().getValue()
            xsDataStatisticsIndexing.setBeamPositionShiftX(XSDataLength(fBeamPositionXOrig - fBeamPositionXNew))
            xsDataStatisticsIndexing.setBeamPositionShiftY(XSDataLength(fBeamPositionYOrig - fBeamPositionYNew))

        # xsDataStatisticsIndexing.setSpotDeviXSDataLength( dDistanceRefinedationAngular( XSDataAngle( dDeviationAngular ) )
        xsDataStatisticsIndexing.setSpotDeviationPositional(XSDataLength(fRmsdSelected))
        xsDataStatisticsIndexing.setSpotsUsed(XSDataInteger(iNumberOfSpotsSelected))
        xsDataStatisticsIndexing.setSpotsTotal(XSDataInteger(iNumberOfSpotsSelected))
        xsDataIndexingSolutionSelected.setStatistics(xsDataStatisticsIndexing)

        xsDataExperimentalConditionRefined = None
        if (_xsDataExperimentalCondition is None):
            xsDataExperimentalConditionRefined = XSDataExperimentalCondition()
        else:
            # Copy the incoming experimental condition
            xmlExperimentalCondition = _xsDataExperimentalCondition.marshal()
            xsDataExperimentalConditionRefined = XSDataExperimentalCondition.parseString(xmlExperimentalCondition)

        xsDataDetector = xsDataExperimentalConditionRefined.getDetector()
        if (xsDataDetector is None):
            xsDataDetector = XSDataDetector()

        xsDataDetector.setBeamPositionX(xsDataLabelitScreenOutput.getBeamCentreX())
        xsDataDetector.setBeamPositionY(xsDataLabelitScreenOutput.getBeamCentreY())
        xsDataDetector.setDistance(xsDataLabelitScreenOutput.getDistance())

        xsDataExperimentalConditionRefined.setDetector(xsDataDetector)
        xsDataIndexingSolutionSelected.setExperimentalConditionRefined(xsDataExperimentalConditionRefined)

        xsDataIndexingResult.setSelectedSolution(xsDataIndexingSolutionSelected)

        xsDataIndexingResult.setIndexingLogFile(xsDataLabelitScreenOutput.getPathToLogFile())

        return xsDataIndexingResult
    def generateXSDataIndexingResult(_xsDataResultLabelitIndexing,
                                     _xsDataExperimentalCondition=None):
        EDVerbose.DEBUG(
            "EDHandlerXSDataLabelitv1_1.generateXSDataIndexingOutput")

        xsDataLabelitScreenOutput = _xsDataResultLabelitIndexing.screenOutput
        xsDataLabelitMosflmScriptsOutput = _xsDataResultLabelitIndexing.mosflmScriptsOutput

        iSelectedSolutionNumber = xsDataLabelitScreenOutput.getSelectedSolutionNumber(
        ).getValue()

        xsDataIndexingResult = XSDataIndexingResult()
        xsDataIndexingSolutionSelected = None

        for xsDataLabelitSolution in xsDataLabelitScreenOutput.getLabelitScreenSolution(
        ):
            xsDataCrystal = XSDataCrystal()
            xsDataSpaceGroup = XSDataSpaceGroup()
            edStringSpaceGroupName = EDUtilsSymmetry.getMinimumSymmetrySpaceGroupFromBravaisLattice(
                xsDataLabelitSolution.getBravaisLattice().getValue())
            xsDataSpaceGroup.setName(XSDataString(edStringSpaceGroupName))
            xsDataCrystal.setSpaceGroup(xsDataSpaceGroup)
            xsDataCrystal.setCell(xsDataLabelitSolution.getUnitCell())
            xsDataIndexingSolution = XSDataIndexingSolution()
            xsDataIndexingSolution.setCrystal(xsDataCrystal)
            iIndex = xsDataLabelitSolution.getSolutionNumber().getValue()
            xsDataIndexingSolution.setNumber(XSDataInteger(iIndex))
            xsDataIndexingResult.addSolution(xsDataIndexingSolution)
            if (iIndex == iSelectedSolutionNumber):
                xsDataIndexingSolutionSelected = XSDataIndexingSolutionSelected(
                )
                xsDataIndexingSolutionSelected.setNumber(XSDataInteger(iIndex))
                edStringSelectedSpaceGroupName = edStringSpaceGroupName
                xsDataCellSelected = xsDataLabelitSolution.getUnitCell()
                fRmsdSelected = xsDataLabelitSolution.getRmsd().getValue()
                iNumberOfSpotsSelected = xsDataLabelitSolution.getNumberOfSpots(
                ).getValue()

        xsDataCrystalSelected = XSDataCrystal()
        xsDataSpaceGroupSelected = XSDataSpaceGroup()
        xsDataSpaceGroupSelected.setName(
            XSDataString(edStringSelectedSpaceGroupName))
        xsDataSpaceGroupSelected.setITNumber(
            XSDataInteger(
                EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                    edStringSelectedSpaceGroupName)))
        xsDataCrystalSelected.setSpaceGroup(xsDataSpaceGroupSelected)
        xsDataCrystalSelected.setCell(xsDataCellSelected)
        xsDataCrystalSelected.setMosaicity(
            XSDataDouble(xsDataLabelitScreenOutput.getMosaicity().getValue()))
        xsDataIndexingSolutionSelected.setCrystal(xsDataCrystalSelected)

        xsDataOrientation = XSDataOrientation()
        xsDataOrientation.setMatrixA(
            xsDataLabelitMosflmScriptsOutput.getAMatrix())
        xsDataOrientation.setMatrixU(
            xsDataLabelitMosflmScriptsOutput.getUMatrix())
        xsDataIndexingSolutionSelected.setOrientation(xsDataOrientation)

        xsDataStatisticsIndexing = XSDataStatisticsIndexing()

        if (_xsDataExperimentalCondition is not None):
            fBeamPositionXOrig = _xsDataExperimentalCondition.getDetector(
            ).getBeamPositionX().getValue()
            fBeamPositionYOrig = _xsDataExperimentalCondition.getDetector(
            ).getBeamPositionY().getValue()
            fBeamPositionXNew = xsDataLabelitScreenOutput.getBeamCentreX(
            ).getValue()
            fBeamPositionYNew = xsDataLabelitScreenOutput.getBeamCentreY(
            ).getValue()
            xsDataStatisticsIndexing.setBeamPositionShiftX(
                XSDataLength(fBeamPositionXOrig - fBeamPositionXNew))
            xsDataStatisticsIndexing.setBeamPositionShiftY(
                XSDataLength(fBeamPositionYOrig - fBeamPositionYNew))

        # xsDataStatisticsIndexing.setSpotDeviXSDataLength( dDistanceRefinedationAngular( XSDataAngle( dDeviationAngular ) )
        xsDataStatisticsIndexing.setSpotDeviationPositional(
            XSDataLength(fRmsdSelected))
        xsDataStatisticsIndexing.setSpotsUsed(
            XSDataInteger(iNumberOfSpotsSelected))
        xsDataStatisticsIndexing.setSpotsTotal(
            XSDataInteger(iNumberOfSpotsSelected))
        xsDataIndexingSolutionSelected.setStatistics(xsDataStatisticsIndexing)

        xsDataExperimentalConditionRefined = None
        if (_xsDataExperimentalCondition is None):
            xsDataExperimentalConditionRefined = XSDataExperimentalCondition()
        else:
            # Copy the incoming experimental condition
            xmlExperimentalCondition = _xsDataExperimentalCondition.marshal()
            xsDataExperimentalConditionRefined = XSDataExperimentalCondition.parseString(
                xmlExperimentalCondition)

        xsDataDetector = xsDataExperimentalConditionRefined.getDetector()
        if (xsDataDetector is None):
            xsDataDetector = XSDataDetector()

        xsDataDetector.setBeamPositionX(
            xsDataLabelitScreenOutput.getBeamCentreX())
        xsDataDetector.setBeamPositionY(
            xsDataLabelitScreenOutput.getBeamCentreY())
        xsDataDetector.setDistance(xsDataLabelitScreenOutput.getDistance())

        xsDataExperimentalConditionRefined.setDetector(xsDataDetector)
        xsDataIndexingSolutionSelected.setExperimentalConditionRefined(
            xsDataExperimentalConditionRefined)

        xsDataIndexingResult.setSelectedSolution(
            xsDataIndexingSolutionSelected)

        xsDataIndexingResult.setIndexingLogFile(
            xsDataLabelitScreenOutput.getPathToLogFile())

        return xsDataIndexingResult
Esempio n. 6
0
 def testGetITNumberFromSpaceGroupName(self):
     EDAssert.equal(1, EDUtilsSymmetry.getITNumberFromSpaceGroupName("P1"),
                    "ITNumber from space group P1")
     EDAssert.equal(3, EDUtilsSymmetry.getITNumberFromSpaceGroupName("P2"),
                    "ITNumber from space group P2")
     EDAssert.equal(5, EDUtilsSymmetry.getITNumberFromSpaceGroupName("C2"),
                    "ITNumber from space group C2")
     EDAssert.equal(16,
                    EDUtilsSymmetry.getITNumberFromSpaceGroupName("P222"),
                    "ITNumber from space group P222")
     EDAssert.equal(21,
                    EDUtilsSymmetry.getITNumberFromSpaceGroupName("C222"),
                    "ITNumber from space group C222")
     EDAssert.equal(22,
                    EDUtilsSymmetry.getITNumberFromSpaceGroupName("F222"),
                    "ITNumber from space group F222")
     EDAssert.equal(75, EDUtilsSymmetry.getITNumberFromSpaceGroupName("P4"),
                    "ITNumber from space group P4")
     EDAssert.equal(79, EDUtilsSymmetry.getITNumberFromSpaceGroupName("I4"),
                    "ITNumber from space group I4")
     EDAssert.equal(143,
                    EDUtilsSymmetry.getITNumberFromSpaceGroupName("P3"),
                    "ITNumber from space group P3")
     EDAssert.equal(146,
                    EDUtilsSymmetry.getITNumberFromSpaceGroupName("H3"),
                    "ITNumber from space group H3")
     EDAssert.equal(195,
                    EDUtilsSymmetry.getITNumberFromSpaceGroupName("P23"),
                    "ITNumber from space group P23")
     EDAssert.equal(196,
                    EDUtilsSymmetry.getITNumberFromSpaceGroupName("F23"),
                    "ITNumber from space group F23")
Esempio n. 7
0
 def testGetITNumberFromSpaceGroupName(self):
     strSymopFileName = "/opt/pxsoft/ccp4/v6.3.0/linux-x86_64/lib/data/symop.lib"
     if os.path.exists(strSymopFileName):
         EDAssert.equal(
             1,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "P1", strSymopFileName), "ITNumber from space group P1")
         EDAssert.equal(
             3,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "P2", strSymopFileName), "ITNumber from space group P2")
         EDAssert.equal(
             5,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "C2", strSymopFileName), "ITNumber from space group C2")
         EDAssert.equal(
             16,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "P222", strSymopFileName),
             "ITNumber from space group P222")
         EDAssert.equal(
             21,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "C222", strSymopFileName),
             "ITNumber from space group C222")
         EDAssert.equal(
             22,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "F222", strSymopFileName),
             "ITNumber from space group F222")
         EDAssert.equal(
             75,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "P4", strSymopFileName), "ITNumber from space group P4")
         EDAssert.equal(
             79,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "I4", strSymopFileName), "ITNumber from space group I4")
         EDAssert.equal(
             143,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "P3", strSymopFileName), "ITNumber from space group P3")
         EDAssert.equal(
             146,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "H3", strSymopFileName), "ITNumber from space group H3")
         EDAssert.equal(
             195,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "P23", strSymopFileName), "ITNumber from space group P23")
         EDAssert.equal(
             196,
             EDUtilsSymmetry.getITNumberFromSpaceGroupName(
                 "F23", strSymopFileName), "ITNumber from space group F23")
 def testGetITNumberFromSpaceGroupName(self):
     strSymopFileName = "/opt/pxsoft/ccp4/v6.3.0/linux-x86_64/lib/data/symop.lib"
     if os.path.exists(strSymopFileName):
         EDAssert.equal(1, EDUtilsSymmetry.getITNumberFromSpaceGroupName("P1", strSymopFileName), "ITNumber from space group P1")
         EDAssert.equal(3, EDUtilsSymmetry.getITNumberFromSpaceGroupName("P2", strSymopFileName), "ITNumber from space group P2")
         EDAssert.equal(5, EDUtilsSymmetry.getITNumberFromSpaceGroupName("C2", strSymopFileName), "ITNumber from space group C2")
         EDAssert.equal(16, EDUtilsSymmetry.getITNumberFromSpaceGroupName("P222", strSymopFileName), "ITNumber from space group P222")
         EDAssert.equal(21, EDUtilsSymmetry.getITNumberFromSpaceGroupName("C222", strSymopFileName), "ITNumber from space group C222")
         EDAssert.equal(22, EDUtilsSymmetry.getITNumberFromSpaceGroupName("F222", strSymopFileName), "ITNumber from space group F222")
         EDAssert.equal(75, EDUtilsSymmetry.getITNumberFromSpaceGroupName("P4", strSymopFileName), "ITNumber from space group P4")
         EDAssert.equal(79, EDUtilsSymmetry.getITNumberFromSpaceGroupName("I4", strSymopFileName), "ITNumber from space group I4")
         EDAssert.equal(143, EDUtilsSymmetry.getITNumberFromSpaceGroupName("P3", strSymopFileName), "ITNumber from space group P3")
         EDAssert.equal(146, EDUtilsSymmetry.getITNumberFromSpaceGroupName("H3", strSymopFileName), "ITNumber from space group H3")
         EDAssert.equal(195, EDUtilsSymmetry.getITNumberFromSpaceGroupName("P23", strSymopFileName), "ITNumber from space group P23")
         EDAssert.equal(196, EDUtilsSymmetry.getITNumberFromSpaceGroupName("F23", strSymopFileName), "ITNumber from space group F23")