Problems Optimizing Geometry Using BFGS and Orca

Dear Sir/ Madam,

I am encountering difficulties performing geometry optimizations using an ASE optimizer with the ORCA calculator. While the SCF runs normally, the job crashes when the optimization starts, and the following error is raised:

raise PropertyNotImplementedError(
ase.calculators.calculator.PropertyNotImplementedError: forces not present in this calculation

I have tried using both the BFGS and LBFGS optimizers, but the same error occurs with both. When switching to the EMT calculator, the job runs smoothly. Below is the snippet of the code I am using to run the geometry optimization:

nprocs = sys.argv[1]
mol_file = sys.argv[2]

orca_profile = OrcaProfile(command="orca_5_0_3/orca")
calc = ORCA(profile=orca_profile,  orcasimpleinput='r2SCAN-3c TightSCF',
                orcablocks=f'%pal nprocs {nprocs} end')

# Load the xyz files written by PaiNN.
mol = ase.io.read(mol_file)

print(mol.get_positions())

mol.calc = calc

print(mol.calc)

print("Start Geometry Optimization.")
dyn = LBFGS(mol, trajectory='opt.traj', logfile='opt.traj')
dyn.run(fmax=0.05)

ase.io.write(f'opt_{mol_file}.xyz', mol)

Could you please help me understand what might be causing this issue?

Yours faithfully,

I think you need to include a keyword in the orcasimpleinput to ensure that the calculation includes forces. Looking at the ASE test files, this might be “Engrad”? (I don’t have access to ORCA to confirm.)

1 Like