Fsapt.py crashes

I am very happy SAPT is implemented on Psi4. To learn how to use it, I started running the examples with version 1.3.2 of Psi4 (F/I-SAPT manual page), but I got an error running the post processing utility fsapt.py (downloaded from https://github.com/psi4/psi4/tree/master/psi4/share/psi4/fsapt).
What I did was to run the phenol dimer as given in Phenol Dimer SAPT0. The example runs to completion, with no errors.

As indicated in the manual, I copied fsapt.py Python script to the fsapt directory (or run “fsapt.py fsapt” from the directory in which I run the example, and created the fA.dat and fB.dat files. In both cases I got the error:

Traceback (most recent call last):
File “./fsapt.py”, line 1045, in
stuff = compute_fsapt(dirname, False)
File “./fsapt.py”, line 885, in compute_fsapt
order2 = extract_order2_fsapt(osapt, total_ws[‘A’], total_ws[‘B’], frags)
File “./fsapt.py”, line 496, in extract_order2_fsapt
val = np.einsum(‘i,ij,j’, valueA, value, valueB)
File “<array_function internals>”, line 6, in einsum
File “/home/tuk57672/apps/miniconda3/envs/adccenv/lib/python3.7/site-packages/numpy/core/einsumfunc.py”, line 1356, in einsum
return c_einsum(*operands, **kwargs)
ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (52,)->(52,newaxis) (51,51)->(51,51) (52,)->(52)

Any help would be greatly appreciated!

I’m 99% sure I know what the problem is. Can you be convinced to try a 1.4 release candidate, or do you want to stick to 1.3?

Thanks a lot for the quick reply. I tried a local installation of 1.4 and is not working (the installation, not the script). I would prefer to stick with the current version 1.3.2 if that is not a hassle, to save time installing a new version. Thanks a lot!

I’m curious why the installation isn’t working: with conda, it should be easy.

In any event, try using this file: psi4/fsapt.py at 281366f66df6ffa9427e02f81693c4cb217d7a12 · psi4/psi4 · GitHub

Some changes that are in 1.4 but not 1.3 required changing that particular script, and it’s no wonder that the 1.3 version of F/SAPT files are incompatible with the 1.4 version of the file parser.

Thanks a lot, this script works pretty well with the 1.3.2 version!

I am not sure why our 1.4 version is not working, but I believe is related with we were forcing certain Python versions, as we are using Psi4 as part of a bigger project with several other scripts.

Is there new SAPT functionality included in psi 1.4, or just re-written code? Thanks

The F/SAPT changes are to work with external electric fields.

Psi 1.4 is compatible with Python 3.6+.

Thanks again for the input, it helped.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.