Thank you
I used config.ini and AIMS_SPECIES_DIR, and successfully ran FHI-aims combined with ASE. Now, I have a new problem. When SCF is converged, ASE tries to calculate the force, but it shows an error.
This is my python code:
from ase.io import read, write
from ase.calculators.aims import Aims
from ase.optimize import BFGS
from ase.io.trajectory import Trajectory
comp =read('geometry.in',format='aims')
aims = Aims( xc='RPBE',
sc_iter_limit=500,
occupation_type=('gaussian','0.2'),
charge_mix_param=0.4,
n_max_pulay=10,
sc_accuracy_etot=5e-5,
relativistic=('atomic_zora','scalar'),
sc_accuracy_eev=1e-2,
sc_accuracy_rho=1e-4,
parallel=True,
parallel_info={'nprocs': 44},
charge=0.0,
spin='collinear',
default_initial_moment=1.0,
write_restart_geometry='.true.',
compute_forces='.true.'
)
comp.calc=aims
opt = BFGS(comp,logfile='z_forces_opt.log',trajectory='z_opt.traj')
opt.run(fmax=0.05)
write('z_opt.in',water,format='aims')
and this is error:
Traceback (most recent call last):
File "/home/reza/runs/opt_bfgs.py", line 29, in <module>
opt.run(fmax=0.05)
File "/home/reza/ase_master/ase/optimize/optimize.py", line 429, in run
return Dynamics.run(self, steps=steps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/optimize/optimize.py", line 275, in run
for converged in Dynamics.irun(self, steps=steps):
File "/home/reza/ase_master/ase/optimize/optimize.py", line 225, in irun
self.optimizable.get_forces()
File "/home/reza/ase_master/ase/optimize/optimize.py", line 34, in get_forces
return self.atoms.get_forces()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/atoms.py", line 812, in get_forces
forces = self._calc.get_forces(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/calculators/abc.py", line 30, in get_forces
return self.get_property('forces', atoms)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/calculators/calculator.py", line 537, in get_property
self.calculate(atoms, [name], system_changes)
File "/home/reza/ase_master/ase/calculators/genericfileio.py", line 386, in calculate
self.results = self.template.read_results(self.directory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/calculators/aims.py", line 164, in read_results
return read_aims_results(dst, index=-1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/utils/__init__.py", line 577, in iofunc
obj = func(fd, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/io/aims.py", line 1704, in read_aims_results
return chunks[index].results
^^^^^^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/io/aims.py", line 1452, in results
"eigenvalues": self.eigenvalues,
^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/utils/__init__.py", line 678, in getter
cache[name] = meth(self)
^^^^^^^^^^
File "/home/reza/ase_master/ase/io/aims.py", line 1572, in eigenvalues
return self._parse_eigenvalues()["eigenvalues"]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reza/ase_master/ase/utils/__init__.py", line 678, in getter
cache[name] = meth(self)
^^^^^^^^^^
File "/home/reza/ase_master/ase/io/aims.py", line 1388, in _parse_eigenvalues
assert len(kpt_inds) == len(occupation_block_start)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
Any idea?