def testExpectedCaseA(self):
        eigensA, eigensB = [7, 8, 9], [8, 11]
        expObjA = parsePdosHelp.PdosFragmentStandard(eigenValues=eigensA)
        expObjB = parsePdosHelp.PdosFragmentStandard(eigenValues=eigensB)
        self._runTestFunct()

        actObjA, actObjB = self.testObjA, self.testObjB
        self.assertEqual(expObjA, actObjA)
        self.assertEqual(expObjB, actObjB)
 def testExpectedTargetMaxThree(self):
     self.targMaxOcc = 3
     expOccs = [1, 2, 3]
     expObj = parsePdosHelp.PdosFragmentStandard(occs=expOccs)
     self._runTestFunct()
     actObj = self.testObjA
     self.assertEqual(expObj, actObj)
Exemplo n.º 3
0
	def _loadExpObjA(self):
		haToEv = uConvHelp.RYD_TO_EV*2
		eigenValues = [x*haToEv for x in [-0.921635, 0.007051]]
		occs = [2,0]
		breakdowns = [ [0.45700077, 0.01994362, 0.00076722],
		               [0.15757794, 0.08100025, 0.02367271] ]
		fragName = "O"
		breakdownHeaders = ["s", "p", "d"]
		currKwargs = {"eigenValues":eigenValues, "occs":occs, "fragName":fragName,
		              "breakdowns":breakdowns, "breakdownHeaders":breakdownHeaders}
		return tCode.PdosFragmentStandard(**currKwargs)
 def createTestObjs(self):
     currKwargs = {
         "eigenValues": self.eigenValues,
         "occs": self.occs,
         "fragName": self.fragName,
         "breakdowns": self.breakdowns,
         "breakdownHeaders": self.breakdownHeaders
     }
     self.testObj = parsePdosHelp.PdosFragmentStandard(**currKwargs)
     self.expLabelMergedShells = tCode.simXpsStdObjsHelp.MolFragLabel(
         fragKey=self.fragName, eleKey="", aoKey="")
     self.mockRetValA = mock.Mock()
    def createTestObjs(self):

        kwargsA = {
            "eigenValues": self.eigenValsA,
            "occs": self.occsA,
            "fragName": self.fragNameA,
            "breakdowns": self.breakdownsA,
            "breakdownHeaders": self.breakdownHeadersA
        }
        kwargsB = {
            "eigenValues": self.eigenValsB,
            "occs": self.occsB,
            "fragName": self.fragNameB,
            "breakdowns": self.breakdownsB,
            "breakdownHeaders": self.breakdownHeadersB
        }

        self.testObjA = parsePdosHelp.PdosFragmentStandard(**kwargsA)
        self.testObjB = parsePdosHelp.PdosFragmentStandard(**kwargsB)

        self.pdosFragments = [self.testObjA, self.testObjB]
 def testExpected_validInput(self):
     #Create the expected object
     expBreakdowns = [[0.8, 0.2], [0.5, 0.7], [0.3, 0.5]]
     expKwargs = {
         "eigenValues": self.eigenValsA,
         "occs": self.occsA,
         "fragName": self.outFragName,
         "breakdowns": expBreakdowns,
         "breakdownHeaders": self.breakdownHeadersA
     }
     expObj = parsePdosHelp.PdosFragmentStandard(**expKwargs)
     actObj = self._runTestFunct()
     self.assertEqual(expObj, actObj)
Exemplo n.º 7
0
	def createTestObjs(self):
		currKwargDict = {"eigenValues":self.eigenVals, "occs":self.occs,
		                 "fragName":self.fragName, "breakdowns":self.breakdowns,
		                 "breakdownHeaders": self.breakdownHeaders}
		self.testObj = tCode.PdosFragmentStandard(**currKwargDict)
 def testExpectedTargetMaxOne(self):
     expOccs = [1 / 3, 2 / 3, 1]
     expObj = parsePdosHelp.PdosFragmentStandard(occs=expOccs)
     self._runTestFunct()
     actObj = self.testObjA
     self.assertEqual(expObj, actObj)
 def createTestObjs(self):
     self.testObjA = parsePdosHelp.PdosFragmentStandard(occs=self.occsA)
 def createTestObjs(self):
     self.testObjA = parsePdosHelp.PdosFragmentStandard(
         eigenValues=self.eigenValsA)
     self.testObjB = parsePdosHelp.PdosFragmentStandard(
         eigenValues=self.eigenValsB)
     self.pdosFragsA = [self.testObjA, self.testObjB]