Skip to content

Commit

Permalink
removed dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeZ committed Aug 11, 2016
1 parent ad9c7b7 commit 3a6a775
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
22 changes: 0 additions & 22 deletions nac/integrals/nonAdiabaticCoupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from functools import partial
from multiprocessing import Pool
import numpy as np

# =============================> Internal modules <============================
from nac.integrals.overlapIntegral import sijContracted
from nac.integrals.multipoleIntegrals import createTupleXYZ_CGF
Expand Down Expand Up @@ -96,24 +95,3 @@ def chunkSij(xyz_cgfs0, xyz_cgfs1, dim, i):

return xs


def calcOverlapMtxSeq(cgfsN, r0, r1):
"""
calculate the overlap matrix using the atomic basis at two
different geometries: R0 and R1.
"""
xyz_cgfs0 = np.array(concat([createTupleXYZ_CGF(xs, cgss)
for xs, cgss in zip(r0, cgfsN)]))
xyz_cgfs1 = np.array(concat([createTupleXYZ_CGF(xs, cgss)
for xs, cgss in zip(r1, cgfsN)]))
dim = len(xyz_cgfs0)
xs = np.empty((dim, dim))

for i in range(dim):
for j in range(dim):
t1 = xyz_cgfs0[i]
t2 = xyz_cgfs1[j]
xs[i, j] = sijContracted(t1, t2)
# print(i, j, xs[i, j])
return xs

4 changes: 4 additions & 0 deletions test/test_coupling.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from pymonad import curry
from qmworks import run
from qmworks.parsers import parse_string_xyz
from utilsTest import try_to_remove

import h5py
import numpy as np
Expand Down Expand Up @@ -63,4 +64,7 @@ def test_lazy_coupling():
expected = f5[path_coupling].value
arr = f6[path_coupling].value

# remove the hdf5 file used for testing
try_to_remove(path_hdf5_test)

assert is_antisymmetric(arr) and (np.sum(arr - expected) < 1.0e-8)

0 comments on commit 3a6a775

Please sign in to comment.