Skip to content

fix errors when using xtb in dftbplus

Jinzhe Zeng requested to merge njzjz/ase:dftbplus-xtb into master

Recently dftbplus has supported xTB, but it doesn't need skf files.


This PR fixes the following errors:

  File "/home/jz748/.local/lib/python3.10/site-packages/ase/calculators/dftb.py", line 283, in write_input
    self.write_dftb_in(fd)
  File "/home/jz748/.local/lib/python3.10/site-packages/ase/calculators/dftb.py", line 206, in write_dftb_in
    l = read_max_angular_momentum(path)
  File "/home/jz748/.local/lib/python3.10/site-packages/ase/calculators/dftb.py", line 550, in read_max_angular_momentum
    with open(path, 'r') as fd:
FileNotFoundError: [Errno 2] No such file or directory: './H-H.skf'

When using xTB:

from ase.calculators.dftb import Dftb
calc = Dftb(Hamiltonian_='xTB',
            Hamiltonian_Method="GFN1-xTB"
      )
Edited by Jinzhe Zeng

Merge request reports