| 1 | """ |
| 2 | Builds a new RSH dictionary for gau2grid. |
| 3 | """ |
| 4 | import gau2grid |
| 5 | import numpy as np |
| 6 | import decimal |
| 7 | import pickle |
| 8 | import time |
| 9 | np.set_printoptions(precision=60) |
| 10 | |
| 11 | t = time.time() |
| 12 | rsh_dict = {} |
| 13 | for AM in range(9): |
| 14 | print("AM %d" % AM) |
| 15 | data = gau2grid.RSH.cart_to_RSH_coeffs(AM, gen=True) |
| 16 | rsh_dict[AM] = data |
| 17 | print(time.time() - t) |
| 18 | |
| 19 | with open("rsh_coeffs.pkl", "wb") as handle: |
| 20 | pickle.dump(rsh_dict, handle, protocol=2) |
| 21 | |
| 22 | |
| 23 | with open("rsh_coeffs.pkl", "rb") as handle: |
| 24 | data = pickle.load(handle) |
| 25 | |
| 26 | for x in range(5): |
| 27 | print(data[x]) |