def test_des_linkstr(self): norb, nelec = 10, 4 strs = cistring.gen_strings4orblist(range(norb), nelec) numpy.random.seed(11) mask = numpy.random.random(len(strs)) > .6 strs = strs[mask] c_index0 = gen_cre_linkstr(strs, norb, nelec) c_index1 = selected_ci.gen_cre_linkstr(strs, norb, nelec) c_index1[:, :, 1] = 0 self.assertTrue(numpy.all(c_index0 == c_index1))
def test_des_linkstr(self): norb, nelec = 10, 4 strs = cistring.make_strings(range(norb), nelec) numpy.random.seed(11) mask = numpy.random.random(len(strs)) > .6 strs = strs[mask] c_index0 = gen_cre_linkstr(strs, norb, nelec) c_index1 = selected_ci.gen_cre_linkstr(strs, norb, nelec) c_index1[:,:,1] = 0 self.assertTrue(numpy.all(c_index0 == c_index1))