def postProcess(self, _edObject=None): EDPluginExecProcessScript.postProcess(self) self.DEBUG("EDPluginExecDamminv0_2.postProcess") # Create some output data cwd = self.getWorkingDirectory() model = XSDataSaxsModel(name=XSDataString("dammin")) xsDataResult = XSDataResultDammin(model=model) pathLogFile = os.path.join(cwd, "dammin.log") pathFitFile = os.path.join(cwd, "dammin.fit") pathFirFile = os.path.join(cwd, "dammin.fir") pathMoleculeFile = os.path.join(cwd, "dammin-1.pdb") pathSolventFile = os.path.join(cwd, "dammin-0.pdb") try: res = parse_atsas.parsePDB(pathMoleculeFile, pathMoleculeFile) except Exception as error: self.ERROR("EDPluginExecDamminv0_2:parsePDB: %s" % error) else: for k in res: self.__setattr__(k, res[k]) if os.path.exists(pathLogFile): xsDataResult.logFile = model.logFile = XSDataFile( XSDataString(pathLogFile)) if not self.Rfactor: self.Rfactor = self.returnDamminRFactor() if self.Rfactor: xsDataResult.rfactor = model.rfactor = XSDataDouble( self.Rfactor) if os.path.exists(pathFitFile): xsDataResult.fitFile = model.fitFile = XSDataFile( XSDataString(pathFitFile)) if os.path.exists(pathFirFile): model.firFile = XSDataFile(XSDataString(pathFirFile)) xsDataResult.chiSqrt = model.chiSqrt = self.returnDamminChiSqrt() if os.path.exists(pathMoleculeFile): xsDataResult.pdbMoleculeFile = model.pdbFile = XSDataFile( XSDataString(pathMoleculeFile)) if os.path.exists(pathSolventFile): xsDataResult.pdbSolventFile = XSDataFile( XSDataString(pathSolventFile)) if self.volume: model.volume = XSDataDouble(self.volume) if self.Rg: model.rg = XSDataDouble(self.Rg) if self.Dmax: model.dmax = XSDataDouble(self.Dmax) self.generateExecutiveSummary() xsDataResult.status = XSDataStatus( message=self.getXSDataMessage(), executiveSummary=XSDataString( os.linesep.join(self.getListExecutiveSummaryLines()))) self.dataOutput = xsDataResult
def postProcess(self, _edObject=None): EDPluginExecProcessScript.postProcess(self) self.DEBUG("EDPluginExecDamminv0_2.postProcess") # Create some output data cwd = self.getWorkingDirectory() model = XSDataSaxsModel(name=XSDataString("dammin")) xsDataResult = XSDataResultDammin(model=model) pathLogFile = os.path.join(cwd, "dammin.log") pathFitFile = os.path.join(cwd, "dammin.fit") pathFirFile = os.path.join(cwd, "dammin.fir") pathMoleculeFile = os.path.join(cwd, "dammin-1.pdb") pathSolventFile = os.path.join(cwd, "dammin-0.pdb") try: res = parse_atsas.parsePDB(pathMoleculeFile, pathMoleculeFile) except Exception as error: self.ERROR("EDPluginExecDamminv0_2:parsePDB: %s" % error) else: for k in res: self.__setattr__(k, res[k]) if os.path.exists(pathLogFile): xsDataResult.logFile = model.logFile = XSDataFile(XSDataString(pathLogFile)) if not self.Rfactor: self.Rfactor = self.returnDamminRFactor() if self.Rfactor: xsDataResult.rfactor = model.rfactor = XSDataDouble(self.Rfactor) if os.path.exists(pathFitFile): xsDataResult.fitFile = model.fitFile = XSDataFile(XSDataString(pathFitFile)) if os.path.exists(pathFirFile): model.firFile = XSDataFile(XSDataString(pathFirFile)) xsDataResult.chiSqrt = model.chiSqrt = self.returnDamminChiSqrt() if os.path.exists(pathMoleculeFile): xsDataResult.pdbMoleculeFile = model.pdbFile = XSDataFile(XSDataString(pathMoleculeFile)) if os.path.exists(pathSolventFile): xsDataResult.pdbSolventFile = XSDataFile(XSDataString(pathSolventFile)) if self.volume: model.volume = XSDataDouble(self.volume) if self.Rg: model.rg = XSDataDouble(self.Rg) if self.Dmax: model.dmax = XSDataDouble(self.Dmax) self.generateExecutiveSummary() xsDataResult.status = XSDataStatus(message=self.getXSDataMessage(), executiveSummary=XSDataString(os.linesep.join(self.getListExecutiveSummaryLines()))) self.dataOutput = xsDataResult
def postProcess(self, _edObject=None): EDPluginExecProcessScript.postProcess(self) EDVerbose.DEBUG("EDPluginExecDamminv0_1.postProcess") # Create some output data pathLogFile = XSDataString( os.path.join(self.getWorkingDirectory(), "dammin.log")) pathFitFile = XSDataString( os.path.join(self.getWorkingDirectory(), "dammin.fit")) pathMoleculeFile = XSDataString( os.path.join(self.getWorkingDirectory(), "dammin-1.pdb")) pathSolventFile = XSDataString( os.path.join(self.getWorkingDirectory(), "dammin-0.pdb")) xsLogFile = XSDataFile(pathLogFile) xsFitFile = XSDataFile(pathFitFile) xsMoleculeFile = XSDataFile(pathMoleculeFile) xsSolventFile = XSDataFile(pathSolventFile) xsDataResult = XSDataResultDammin() if os.path.exists(pathLogFile.getValue()): xsDataResult.setLogFile(xsLogFile) if os.path.exists(pathFitFile.getValue()): xsDataResult.setFitFile(xsFitFile) if os.path.exists(pathMoleculeFile.getValue()): xsDataResult.setPdbMoleculeFile(xsMoleculeFile) if os.path.exists(pathSolventFile.getValue()): xsDataResult.setPdbSolventFile(xsSolventFile) xsDataResult.setChiSqrt(self.returnDamminChiSqrt()) xsDataResult.setRfactor(self.returnDamminRFactor()) self.setDataOutput(xsDataResult)
def postProcess(self, _edObject=None): EDPluginExecProcessScript.postProcess(self) EDVerbose.DEBUG("EDPluginExecDamminv0_1.postProcess") # Create some output data pathLogFile = XSDataString(os.path.join(self.getWorkingDirectory(), "dammin.log")) pathFitFile = XSDataString(os.path.join(self.getWorkingDirectory(), "dammin.fit")) pathMoleculeFile = XSDataString(os.path.join(self.getWorkingDirectory(), "dammin-1.pdb")) pathSolventFile = XSDataString(os.path.join(self.getWorkingDirectory(), "dammin-0.pdb")) xsLogFile = XSDataFile(pathLogFile) xsFitFile = XSDataFile(pathFitFile) xsMoleculeFile = XSDataFile(pathMoleculeFile) xsSolventFile = XSDataFile(pathSolventFile) xsDataResult = XSDataResultDammin() if os.path.exists(pathLogFile.getValue()): xsDataResult.setLogFile(xsLogFile) if os.path.exists(pathFitFile.getValue()): xsDataResult.setFitFile(xsFitFile) if os.path.exists(pathMoleculeFile.getValue()): xsDataResult.setPdbMoleculeFile(xsMoleculeFile) if os.path.exists(pathSolventFile.getValue()): xsDataResult.setPdbSolventFile(xsSolventFile) xsDataResult.setChiSqrt(self.returnDamminChiSqrt()) xsDataResult.setRfactor(self.returnDamminRFactor()) self.setDataOutput(xsDataResult)