當前位置: 首頁>>代碼示例>>Python>>正文


Python XSDataInputStrategy.parseString方法代碼示例

本文整理匯總了Python中XSDataMXv1.XSDataInputStrategy.parseString方法的典型用法代碼示例。如果您正苦於以下問題:Python XSDataInputStrategy.parseString方法的具體用法?Python XSDataInputStrategy.parseString怎麽用?Python XSDataInputStrategy.parseString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XSDataMXv1.XSDataInputStrategy的用法示例。


在下文中一共展示了XSDataInputStrategy.parseString方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: doBestToAlignmentTransition

# 需要導入模塊: from XSDataMXv1 import XSDataInputStrategy [as 別名]
# 或者: from XSDataMXv1.XSDataInputStrategy import parseString [as 別名]
    def doBestToAlignmentTransition(self, _edPlugin):
        """
        """
        EDVerbose.DEBUG("EDPluginControlKappaStrategyv2_0.doBestToAlignmentTransition")
        #self.retrieveSuccessMessages( _edPlugin, "EDPluginControlStrategyv01.doRaddoseToBestTransition" )


        xsDataInputStrategyCopy = XSDataInputStrategy.parseString(self.getDataInput("mxv1InputStrategy")[0].marshal())
        xsDataInputStrategyCopy.setSample(self.xsDataSampleCopy)

        xsDataInputBest = self.edHandlerXSDataBest.getXSDataInputBest(xsDataInputStrategyCopy)

        #xsDataAlignmentInput=EDList()
        #xsDataAlignmentInput.add(xsDataBestInput)
        ##data collection descriptor
        #xsDataAlignmentInput.add(self.getDataInput("mxv2DataCollection")[0])
        ##indexing result
        #xsDataAlignmentInput.add(self.getDataInput("mxv1Indexingresult")[0])
        #self.edPluginAlignment.setDataInput( xsDataAlignmentInput )
        self.edPluginAlignment.setDataInput(xsDataInputBest, "inputBest")
        self.edPluginAlignment.setDataInput(self.getDataInput("mxv2DataCollection")[0], "dataCollection")
        self.edPluginAlignment.setDataInput(self.getDataInput("mxv1IndexingResult")[0], "indexingResult")


        self.edPluginAlignment.executeSynchronous()
開發者ID:antolinos,項目名稱:edna,代碼行數:27,代碼來源:EDPluginControlKappaStrategyv2_0.py

示例2: executeBest

# 需要導入模塊: from XSDataMXv1 import XSDataInputStrategy [as 別名]
# 或者: from XSDataMXv1.XSDataInputStrategy import parseString [as 別名]
    def executeBest(self, _edPlugin=None):
        # Call the Best Translator layer

        from EDHandlerXSDataBestv1_2    import EDHandlerXSDataBestv1_2
        self._edHandlerXSDataBest = EDHandlerXSDataBestv1_2()
        xsDataInputStrategyCopy = XSDataInputStrategy.parseString(self.getDataInput().marshal())
        xsDataInputStrategyCopy.setSample(self._xsDataSampleCopy)
        xsDataInputBest = self._edHandlerXSDataBest.getXSDataInputBest(xsDataInputStrategyCopy)
        self._edPluginBest.setDataInput(xsDataInputBest)
        self._edPluginBest.executeSynchronous()
開發者ID:antolinos,項目名稱:edna,代碼行數:12,代碼來源:EDPluginControlStrategyv1_2.py

示例3: doRaddoseToBestTransition

# 需要導入模塊: from XSDataMXv1 import XSDataInputStrategy [as 別名]
# 或者: from XSDataMXv1.XSDataInputStrategy import parseString [as 別名]
    def doRaddoseToBestTransition(self, _edPlugin):
        """
        """
        EDVerbose.DEBUG("EDPluginControlKappaStrategyv2_0.doRaddoseToBestTransition")
        self.retrieveSuccessMessages(_edPlugin, "EDPluginControlKappaStrategyv2_0.doRaddoseToBestTransition")

        xsDataRaddoseOutput = self.edPluginRaddose.getDataOutput()

        # update the strategy data with the data coming from Raddose
        self.xsDataSampleCopy.setAbsorbedDoseRate(xsDataRaddoseOutput.getAbsorbedDoseRate())

        # Call the Best Translator layer

        xsDataInputStrategyCopy = XSDataInputStrategy.parseString(self.getDataInput("mxv1InputStrategy")[0].marshal())
        xsDataInputStrategyCopy.setSample(self.xsDataSampleCopy)

        xsDataInputBest = self.edHandlerXSDataBest.getXSDataInputBest(xsDataInputStrategyCopy)

        self.edPluginBest.setDataInput(xsDataInputBest)
        self.edPluginBest.executeSynchronous()
開發者ID:antolinos,項目名稱:edna,代碼行數:22,代碼來源:EDPluginControlKappaStrategyv2_0.py

示例4: doRaddoseToBestTransition

# 需要導入模塊: from XSDataMXv1 import XSDataInputStrategy [as 別名]
# 或者: from XSDataMXv1.XSDataInputStrategy import parseString [as 別名]
    def doRaddoseToBestTransition(self, _edPlugin):
        EDVerbose.DEBUG("EDPluginControlStrategyv1_2.doRaddoseToBestTransition")
        self.retrieveSuccessMessages(_edPlugin, "EDPluginControlStrategyv1_2.doRaddoseToBestTransition")

        xsDataRaddoseOutput = self._edPluginRaddose.getDataOutput()

        # update the strategy data with the data coming from Raddose
        self._xsDataSampleCopy.setAbsorbedDoseRate(xsDataRaddoseOutput.getAbsorbedDoseRate())
        if xsDataRaddoseOutput.getPathToLogFile() != None:
            self.xsDataFileRaddoseLog = xsDataRaddoseOutput.getPathToLogFile()


        # Call the Best Translator layer
        from EDHandlerXSDataBestv1_2    import EDHandlerXSDataBestv1_2
        self._edHandlerXSDataBest = EDHandlerXSDataBestv1_2()

        xsDataInputStrategyCopy = XSDataInputStrategy.parseString(self.getDataInput().marshal())
        xsDataInputStrategyCopy.setSample(self._xsDataSampleCopy)

        xsDataInputBest = self._edHandlerXSDataBest.getXSDataInputBest(xsDataInputStrategyCopy)

        self._edPluginBest.setDataInput(xsDataInputBest)
        self._edPluginBest.executeSynchronous()
開發者ID:antolinos,項目名稱:edna,代碼行數:25,代碼來源:EDPluginControlStrategyv1_2.py

示例5: testSetDataModelInput

# 需要導入模塊: from XSDataMXv1 import XSDataInputStrategy [as 別名]
# 或者: from XSDataMXv1.XSDataInputStrategy import parseString [as 別名]

#.........這裏部分代碼省略.........
        xsDataGoniostat = XSDataGoniostat()
        xsDataGoniostat.setRotationAxis(XSDataString("phi"))
        xsExperimentalCondition.setGoniostat(xsDataGoniostat)

        xsDataStrategy.setExperimentalCondition(xsExperimentalCondition)


        # Best Files
        bestFileContentDat = EDUtilsFile.readFile(os.path.join(self.strDataPath, "bestfile.dat"))
        xsDataStrategy.setBestFileContentDat(XSDataString(bestFileContentDat))
        bestFileContentPar = EDUtilsFile.readFile(os.path.join(self.strDataPath, "bestfile.par"))
        xsDataStrategy.setBestFileContentPar(XSDataString(bestFileContentPar))
        bestFileContentHKL = EDUtilsFile.readFile(os.path.join(self.strDataPath, "bestfile1.hkl"))
        xsDataStrategy.addBestFileContentHKL(XSDataString(bestFileContentHKL))

        # Crystal

        xsDataSampleCrystalMM = XSDataSampleCrystalMM()
        xsDataStructure = XSDataStructure()
        xsDataComposition = XSDataChemicalCompositionMM()

        xsDataChain = XSDataChain()
        xsDataChain.setType(XSDataString("protein"))
        xsDataChain.setNumberOfCopies(XSDataDouble(2))
        xsDataAtomicComposition = XSDataAtomicComposition()
        xsDataAtom1 = XSDataAtom()
        xsDataAtom1.setSymbol(XSDataString("Se"))
        xsDataAtom1.setNumberOf(XSDataDouble(4))
        xsDataAtomicComposition.addAtom(xsDataAtom1)

        xsDataChain.setHeavyAtoms(xsDataAtomicComposition)
        xsDataChain.setNumberOfMonomers(XSDataDouble(100))
        xsDataStructure.addChain(xsDataChain)

        xsDataChain2 = XSDataChain()
        xsDataChain2.setType(XSDataString("rna"))
        xsDataChain2.setNumberOfCopies(XSDataDouble(1))
        xsDataChain2.setNumberOfMonomers(XSDataDouble(60))
        xsDataStructure.addChain(xsDataChain2)

        xsDataLigand = XSDataLigand()
        xsDataLigand.setNumberOfCopies(XSDataDouble(2))
        xsDataLigand.setNumberOfLightAtoms(XSDataDouble(42))
        xsDataAtomicComposition = XSDataAtomicComposition()
        xsDataAtom2 = XSDataAtom()
        xsDataAtom2.setSymbol(XSDataString("Fe"))
        xsDataAtom2.setNumberOf(XSDataDouble(1))
        xsDataAtomicComposition.addAtom(xsDataAtom2)
        xsDataLigand.setHeavyAtoms(xsDataAtomicComposition)
        xsDataStructure.addLigand(xsDataLigand)
        xsDataStructure.setNumberOfCopiesInAsymmetricUnit(XSDataDouble(0.25))

        xsDataSolvent = XSDataSolvent()
        xsDataAtomicComposition = XSDataAtomicComposition()

        xsDataAtom3 = XSDataAtom()
        xsDataAtom3.setSymbol(XSDataString("Na"))
        xsDataAtom3.setConcentration(XSDataDouble(1000))
        xsDataAtom4 = XSDataAtom()
        xsDataAtom4.setSymbol(XSDataString("Cl"))
        xsDataAtom4.setConcentration(XSDataDouble(1000))

        xsDataAtomicComposition.addAtom(xsDataAtom3)
        xsDataAtomicComposition.addAtom(xsDataAtom4)
        xsDataSolvent.setAtoms(xsDataAtomicComposition)

        xsDataComposition.setStructure(xsDataStructure)
        xsDataComposition.setSolvent(xsDataSolvent)
        xsDataSampleCrystalMM.setChemicalComposition(xsDataComposition)

        xsDataSampleCrystalMM.setSize(XSDataSize(XSDataLength(0.1), XSDataLength(0.1), XSDataLength(0.1)))

        xsDataCrystal = XSDataCrystal()
        xsDataCell = XSDataCell(angle_alpha=XSDataAngle(90.0),
                                angle_beta=XSDataAngle(90.0),
                                angle_gamma=XSDataAngle(90.0),
                                length_a=XSDataLength(78.9),
                                length_b=XSDataLength(95.162),
                                length_c=XSDataLength(104.087))
        xsDataCrystal.setCell(xsDataCell)

        xsDataSpaceGroup = XSDataSpaceGroup()
        xsDataSpaceGroup.setITNumber(XSDataInteger(16))
        xsDataCrystal.setSpaceGroup(xsDataSpaceGroup)

        xsDataSampleCrystalMM.setSusceptibility(XSDataDouble(1.5))

        xsDataStrategy.setCrystalRefined(xsDataCrystal)

        xsDataStrategy.setSample(xsDataSampleCrystalMM)

        xsDataStrategy.exportToFile(self.strObtainedInputFile)

        pyStrExpectedInput = self.readAndParseFile (self.strReferenceInputFile)
        pyStrObtainedInput = self.readAndParseFile (self.strObtainedInputFile)

        xsDataInputExpected = XSDataInputStrategy.parseString(pyStrExpectedInput)
        xsDataInputObtained = XSDataInputStrategy.parseString(pyStrObtainedInput)

        EDAssert.equal(xsDataInputExpected.marshal(), xsDataInputObtained.marshal())
開發者ID:IvarsKarpics,項目名稱:edna-mx,代碼行數:104,代碼來源:EDTestCasePluginUnitControlStrategyv1_3.py


注:本文中的XSDataMXv1.XSDataInputStrategy.parseString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。