Cubeprop MP2 wfn

I’m using Psi4 1.4rc2 and I am unable to write a cubefile for an MP2 calculation. I get a segmentation fault.
If I use e.g B3LYP the cubefile is written correctly to disk.

The code to reproduce is the following

radical = psi4.geometry("""
symmetry c1
0 2
 N     0.000000     0.000000     0.000000
 O     1.400000     0.000000     0.000000
 O    -1.000000     1.000000     0.000000
 O    -1.000000    -1.000000     0.000000
""")
method = "hf"

psi4.core.set_output_file(f'radical_opt_{method}.log', False)
psi4.set_options({'reference':'uhf','guess':'gwh', 'soscf':True, 'maxiter':500})
E_hf = psi4.optimize('hf/6-31+G*', molecule=radical)

method = "mp2"


psi4.core.clean_options()
psi4.core.set_output_file(f'radical_opt_{method}.log', False)
psi4.set_options({'reference':'uhf','guess':'gwh', 'mp2_type':'conv', 'maxiter':500, 'mom_start':30})
E_mp2, wfn = psi4.optimize(f'{method}/6-31+G*', molecule=radical, return_wfn=True)

psi4.set_options({'cubeprop_tasks':['frontier_orbitals']})
psi4.cubeprop(wfn)

The seg fault is:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
libgdma.so 00007F8A24E260DC for__signal_handl Unknown Unknown
libpthread-2.28.s 00007F8A30793730 Unknown Unknown Unknown
core.cpython-37m- 00007F8A08B75B3D Unknown Unknown Unknown
core.cpython-37m- 00007F8A08B74207 _ZNK3psi12Wavefun Unknown Unknown
core.cpython-37m- 00007F8A08546999 _ZN3psi14CubeProp Unknown Unknown
core.cpython-37m- 00007F8A0A6E3B01 Unknown Unknown Unknown
core.cpython-37m- 00007F8A0A96836C Unknown Unknown Unknown
core.cpython-37m- 00007F8A0A9684DB Unknown Unknown Unknown
core.cpython-37m- 00007F8A0A56FABA Unknown Unknown Unknow

Thanks for the report. I’ve found the problem and wrote up the code that should fix this. I’m hopeful to get this in for 1.4 because the fix is so simple, but that depends on the other developers.

While examples always help, in future, it would be more helpful if you provided a minimal example that strips out anything not related to the problem. For example, the use of MOM, the optimization, and the previous HF computation are irrelevant to the issue.

Thanks for adressing this quickly.

I provided slightly more than a minimal example because using standard options the calculation does not converge. I wasn’t sure if it is a specific issue with that system or a general mp2 problem.

And, the code is already merged in, so this is fixed in current master and will be fixed in the 1.4 release.

Incidentally, you can converge your SOSCF in fewer iterations if you increase soscf_max_iter above the default of 5. MOM is a technique to converge non-Aufbau solutions, so I’m surprised to see it show up for a ground state problem.

1 Like

No, MOM is often also used to stabilize convergence to the ground state. The use of Aufbau occupations may sometimes change the occupied orbital symmetries, and then you may end up converging onto an excited state.

The alternative to using MOM in these cases is to set the occupations by hand.

In either case, it’s a good idea to check whether your converged wave function is really stable…

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