即使该文件在目录中可用,我仍收到“文件未找到”错误。有人能帮助我吗?
我正在使用 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'
错误信息:
目录中的文件:
我能够解决该错误。我最初认为 DFTD3 计算器在 ASE 框架中隐式可用,但我错了。
我必须从外部安装 DFTD3 软件包并将其集成到 ASE。这是更多详细信息的
链接。