标题: 过渡态IDPP插点出现No module named 'pymatgen.analysis.diffusion'的报错 [打印本页] 作者Author: WHY2001 时间: 2024-5-10 21:54 标题: 过渡态IDPP插点出现No module named 'pymatgen.analysis.diffusion'的报错 求教一下各位大佬,在pip install pymatgen pymatgen-analysis-diffusion --user 之后,安装到了/home/WHY/.local/lib/python3.9/site-packages路径下.
执行脚本idpp.py,出现报错
File "/home/WHY/bin/idpp.py", line 4, in <module>
from pymatgen.analysis.diffusion.neb.pathfinder import IDPPSolver
ModuleNotFoundError: No module named 'pymatgen.analysis.diffusion'
脚本内容如下,请问我该怎么解决这个问题
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from pymatgen.core import Structure
from pymatgen.analysis.diffusion.neb.pathfinder import IDPPSolver
import numpy as np
import os
import sys
sys.stdout = open(os.devnull, 'w')
if len(sys.argv) <4:
raise SystemError('Sytax Error! Run as python idpp ini/POSCAR fin/POSCAR 4')
for i in range(len(new_path)):
image_file='{0:02d}'.format(i)
if not os.path.exists(image_file):
os.makedirs(image_file)
POSCAR_file=image_file+'/POSCAR'
new_path.to(fmt="poscar", filename=POSCAR_file)
sys.stdout = sys.__stdout__
#Image Dependent Pair Potential for improved interpolation of NEB initial guess
#Reference: S. Smidstrup, A. Pedersen, K. Stokbro and H. Jonsson, Improved initial guess for minimum energy path calculations, J. Chem. Phys. 140, 214106 (2014).
print("Improved interpolation of NEB initial guess has been generated. BYE.")