ITADN

"ERROR: The property "forces" is not available." raised by neb_make_pymatgen.py

#15ClosedLuc1anoo 创建于 2024-04-14
L
Luc1anoocommented
<img width="643" alt="微信图片_20240414180908" src="https://github.com/QuantumMisaka/ATST-Tools/assets/105922114/424d73ed-bf98-4aa7-ac71-65edc1ebecce"> After autoneb calculation, I encountered the above error using command: python3 neb_post.py --autoneb run_autoneb???.traj. I found the SinglePointCalculator is explicitly used in neb_make_pymatgen.py but not in neb_make.py, so I think the error may raised because of the new neb_make script. I added "print(atoms.calc)" in the neb_post.py below the line 26 and tested in the ATST example [Cy-Pt@graphene](https://github.com/QuantumMisaka/ATST-Tools/tree/main/examples/Cy-Pt%40graphene) and my case. <img width="698" alt="微信图片_20240414181932" src="https://github.com/QuantumMisaka/ATST-Tools/assets/105922114/d857268b-675b-4e4e-b60c-15e108a5d294"> <img width="686" alt="微信图片_20240414181938" src="https://github.com/QuantumMisaka/ATST-Tools/assets/105922114/7fd9d093-158d-45e8-9d0d-9ba34d5cab56"> Apparently the "forces" property is missing in the IS and FS images. After locating the problem, I resolved it by making the following changes in neb_make_pymatgen.py and then do neb_run for just a few seconds. This process generated new trajectory files for IS and FS, complete with force properties, and replaced the old files. Combining the new IS and FS traj and the calculated trajs between, the post process can run successfully. ``` 56 is_e = is_atom.get_potential_energy() 57 fs_e = fs_atom.get_potential_energy() 58 is_f = is_atom.get_forces() 59 fs_f = fs_atom.get_forces() ... 78 ase_path[0].calc = SinglePointCalculator(ase_path[0].copy(), energy=is_e, forces=is_f) 79 ase_path[-1].calc = SinglePointCalculator(ase_path[-1].copy(), energy=fs_e, forces=fs_f) ``` Maybe there's a better way ~
关闭于 2024-04-18 4 条评论