mopac FORCE job error
Ase cannot run FORCE job in Mopac error is:
freq.calculate(atoms_opt0)
File "/home/rmrmg/miniconda2/envs/3rxenv/lib/python3.10/site-packages/ase/calculators/calculator.py", line 940, in calculate
self.read_results()
File "/home/rmrmg/miniconda2/envs/3rxenv/lib/python3.10/site-packages/ase/calculators/mopac.py", line 233, in read_results
self.results['dipole'] = np.array(
ValueError: could not convert string to float: 'MASS'
My quick fix is to ignore 'TRANSITTION DIPOLE' keyword and not treat it as 'DIPOLE', diff for ase/calculators/mopac.py is below
--- mopac_oryg.py 2023-04-26 11:23:07.913757025 +0200
+++ mopac_mod.py 2023-04-26 11:24:01.811362735 +0200
@@ -229,6 +229,8 @@
eigs += [float(e) for e in lines[j].split()]
j += 1
self.eigenvalues = np.array(eigs).reshape(1, 1, -1)
+ elif line.find('TRANSITION DIPOLE') != -1:
+ pass
elif line.find('DIPOLE ') != -1:
self.results['dipole'] = np.array(
lines[i + 3].split()[1:1 + 3], float) * Debye
No side effect observed so but I am not sure if this is ultimate solution the bug.