eljost/pysisyphus

Bug in Turbomole Hessian parsing code

chburger opened this issue · 2 comments

Dear Johannes,

first of all thanks alot for making your program publically available.

I reckon there is an error in your parsing code of Turbomole hessians.

The problem I believe lies in in the line
atom_num = int(lines[-2].split()[0])

which fails if one has more than 33 atoms since the hessian, respectively the index in the hessian file has then 3 rather than 2 digits and split will hence fail. I have replace that line with

    hess_lines= [line[5:] for line in lines[1:-1]]
    hess_lines = [line.split() for line in hess_lines]

and calculate the atom_num from the variable natoms read in from the control file (atom_num=3*natoms).

This works fine for a small example with 20 atoms, but fails with a larger example with 83 atoms. In the latter case, the program stops right after the calculation of the hessian. The file calculator_000.000.nprhessian is generated, but then the
program stops immediately - unfortunately with no signs of an error.

The optimizer.log file shows just.

Created optimizer with prefix ts_
Initial trust radius: 0.300000
No reference Hessian provided.

Do you have an idea what to do?

Best regards

Peter

Hi Peter,
I'll take a look at it. If its a bug I'll try to provide a fix.

All the best,
Johannes

So, I modified the Hessian parser. It now drops everything that appears not to be a float and reshapes the remaining items into the Hessian. Calculating the atom number is not needed anymore.

A test comprsing 12 methane molecules (60 atoms) seems fine (see test_turbomole_big_hessian_parsing in tests/test_turbomole/test_turbomole.py).

I pushed the commit onto the master branch. Is this enough for you to test it? Please let me know if this solves your issue.

Thanks for reporting this.