コード例 #1
0
 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)) > .4
     strs = strs[mask]
     d_index0 = gen_des_linkstr(strs, norb, nelec)
     d_index1 = selected_ci.gen_des_linkstr(strs, norb, nelec)
     d_index1[:, :, 0] = 0
     self.assertTrue(numpy.all(d_index0 == d_index1))
コード例 #2
0
ファイル: test_selected_ci.py プロジェクト: chrinide/pyscf
 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)) > .4
     strs = strs[mask]
     d_index0 = gen_des_linkstr(strs, norb, nelec)
     d_index1 = selected_ci.gen_des_linkstr(strs, norb, nelec)
     d_index1[:,:,0] = 0
     self.assertTrue(numpy.all(d_index0 == d_index1))