FileNotFoundError:[Errno 2] 没有这样的文件或目录:'dftd3'

FileNotFoundError:[Errno 2] 没有这样的文件或目录:'dftd3'

尽管文件在目录中可用,但我收到文件未找到错误。有人能帮我吗?

我正在使用 ASE 包执行 DFT 计算。我正在使用 GPAW 包,它是 DFT 的计算器。此外,我还想包括色散校正(由 DFTD3 执行)。我使用了本文档“https://wiki.fysik.dtu.dk/ase/ase/calculators/dftd3.html”中的第二个示例作为参考来设置我偶然发现错误的计算器。

与该错误相关的更多详细信息:

File "<stdin>", line 1, in <module>
File "/home/sachin/.local/lib/python3.10/site-packages/ase/optimize/lbfgs.py", line 65, in __init__
Optimizer.__init__(self, atoms, restart, logfile, trajectory,master,
File "/home/sachin/.local/lib/python3.10/site-packages/ase/optimize/optimize.py", line 234, in __init__
self.set_force_consistent()
File "/home/sachin/.local/lib/python3.10/site-packages/ase/optimize/optimize.py", line 325, in set_force_consistent
self.atoms.get_potential_energy(force_consistent=True)
File "/home/sachin/.local/lib/python3.10/site-packages/ase/atoms.py", line 728, in get_potential_energy
energy = self._calc.get_potential_energy(
File "/home/sachin/.local/lib/python3.10/site-packages/ase/calculators/calculator.py", line 709, in get_potential_energy
energy = self.get_property('energy', atoms)
File "/home/sachin/.local/lib/python3.10/site-packages/ase/calculators/dftd3.py", line 387, in get_property
dftd3_result = FileIOCalculator.get_property(self, name, atoms,
File "/home/sachin/.local/lib/python3.10/site-packages/ase/calculators/calculator.py", line 737, in get_property
self.calculate(atoms, [name], system_changes)
File "/home/sachin/.local/lib/python3.10/site-packages/ase/calculators/dftd3.py", line 220, in calculate
errorcode = subprocess.call(command,
File "/usr/lib/python3.10/subprocess.py", line 345, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.10/subprocess.py", line 971, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dftd3'

错误信息:

错误信息

目录中的文件:

目录中的文件

答案1

我能够解决该错误。我最初以为 DFTD3 计算器在 ASE 框架内隐式可用,但我错了。

我必须从外部安装 DFTD3 包并将其集成到 ASE。
以下是链接更多详细信息

相关内容