def setUp(self): super(GaussianBickelhauptTest, self).setUp() self.data, self.logfile = getdatafile(Gaussian, "basicGaussian09", ["dvb_un_sp.log"]) self.analysis = Bickelhaupt(self.data) self.analysis.logger.setLevel(0) self.analysis.calculate()
def test_dvb_sp(self): """Testing Bickelhaupt charges (restricted) against outputs from Multiwfn.""" data, logfile = getdatafile(Gaussian, "basicGaussian09", ["dvb_sp.out"]) bpa = Bickelhaupt(data) bpa.logger.setLevel(logging.ERROR) bpa.calculate() e_bpa = numpy.loadtxt( os.path.dirname(os.path.realpath(__file__)) + "/dvb_sp.bpa") self.assertTrue(numpy.all(bpa.fragcharges >= e_bpa - 0.05)) self.assertTrue(numpy.all(bpa.fragcharges <= e_bpa + 0.05))