예제 #1
0
 def test_count(self):
     """Test electron count for logfiles without pseudopotentials."""
     data, logfile = getdatafile(QChem, "basicQChem4.2", ["water_mp4sdq.out"])
     self.assertEqual(Electrons(data).count(), 10)
     self.assertEqual(Electrons(data).count(core=True), 10)
     data, logfile = getdatafile(Gaussian, "basicGaussian09", ["water_cis.log"])
     self.assertEqual(Electrons(data).count(), 10)
     self.assertEqual(Electrons(data).count(core=True), 10)
예제 #2
0
 def test_alpha_beta(self):
     """Test number of alpha and beta electrons"""
     # Systems with alpha == beta
     data, logfile = getdatafile(QChem, "basicQChem4.2", ["water_mp4sdq.out"])
     self.assertEqual(Electrons(data).alpha(), 5)
     self.assertEqual(Electrons(data).beta(), 5)
     data, logfile = getdatafile(Gaussian, "basicGaussian09", ["water_cis.log"])
     self.assertEqual(Electrons(data).alpha(), 5)
     self.assertEqual(Electrons(data).beta(), 5)
     # Systems with alpha != beta
     data, logfile = getdatafile(QChem, "basicQChem4.2", ["dvb_sp_un.out"])
     self.assertEqual(Electrons(data).alpha(), 35)
     self.assertEqual(Electrons(data).beta(), 34)
     data, logfile = getdatafile(Gaussian, "basicGaussian09", ["dvb_un_sp.log"])
     self.assertEqual(Electrons(data).alpha(), 35)
     self.assertEqual(Electrons(data).beta(), 34)
예제 #3
0
 def nelectrons(self):
     return Electrons(self).count()
예제 #4
0
 def test_count_pseudopotential(self):
     """Test electron count for logfiles with pseudopotentials."""
     data, logfile = getdatafile(Gaussian, "basicGaussian09",
                                 "Mo4OCl4-sp.log")
     self.assertEqual(Electrons(data).count(), 120)
     self.assertEqual(Electrons(data).count(core=True), 188)