def __init__(self, **kw): self.Nel = kw.get("Nel", 2) # number of interacting electrons self.spin = kw.get("M", 0) # spin of the system self.indi = kw.get("indi", 8) # spin of the system # initialize properties of parent class which is the class of # two-electron integrals self.pth = os.path.dirname(os.getcwd()) pth = self.pth + "/dis_scr/" self.int2e = of(pth + "!int2e" + str(self.indi) + ".dat") self.Norb = norb(np.size(np.diag(self.int2e))) # verify whether spin is consistent with number of electron if ((0.5 * self.Nel + self.spin) % 1 != 0) | ((0.5 * self.Nel - self.spin) % 1 != 0): sys.exit("Cann't get desired magnitude of the spin projection") self.E = of(pth + "!E" + str(self.indi) + ".dat")[0 : self.Norb] self.exch = -of(pth + "!exch" + str(self.indi) + ".dat")[0 : self.Norb, 0 : self.Norb] self.exch = self.exch + np.diag(self.E) # print np.diag(self.E) # self.Norb = 4 # initialize all possible alpha and betha strings self.cs = ConfSet(Nel=self.Nel, Norb=self.Norb, spin=self.spin) # initialize configuration interaction matrix by zeros self._M = np.zeros((self.cs.num_conf, self.cs.num_conf)) self._sym = np.zeros((self.cs.num_conf, self.cs.num_conf), dtype="S250")