JelfsMaterialsGroup / stko

A collection of molecular optimisers and property calculators for use with stk.
https://stko-docs.readthedocs.io/en/latest/
MIT License
21 stars 8 forks source link

Calculate energy with orca Issue #176

Open Joe-Anslow opened 3 months ago

Joe-Anslow commented 3 months ago

when using the below code:

orca = stko.OrcaEnergy(
    orca_path='/home/cmja2/orca',
    output_dir='./Polymer2_ORCA',
    topline='! SP B97-3c',
    write_input_only=False,
    discard_output=False,
)

orca.get_results(polymer)

this error occurs:

  File "/home/cmja2/anaconda3/lib/python3.11/site-packages/stko/_internal/calculators/orca_calculators.py", line 202, in _check_outcome
    if "****ORCA TERMINATED NORMALLY****" not in lines[-2]:
                                                 ~~~~~^^^^
IndexError: list index out of range

I think that maybe orca itself was at fault and I ran the orca input indendently which was successful. When using stko, the output file is there but is empty. This would mean there is no line -2. could it be that stko is not waiting for the orca run to finish before looking at line -2? The error with orca does happen almost immediately whilst the orca calculation itself takes around a couple of minutes.

andrewtarzia commented 3 months ago

Editted to include code formatting