|
|
本帖最后由 chunlinxxx 于 2025-8-25 05:05 编辑
各位老师好!
我在使用 MOKIT(版本 1.2.7rc9, 2025-Jul-24)运行 CASSCF 测试计算时,遇到了一个关于 Python 模块的错误。环境已经安装 PySCF 2.9.0,并且 MOKIT 可以正常 import,但内部调用 Python 执行脚本时失败。
环境信息:
$ python --version
Python 3.9.12
$ python -c "import pyscf; import mokit; print(pyscf.__version__, mokit.__file__)"
2.9.0 /orcd/pool/003/*_shared/*-data/mokit3/mokit/__init__.py
$ echo $MOKIT_ROOT
/orcd/pool/003/*_shared/*-data/mokit3
$ echo $PATH
...$MOKIT_ROOT/bin:...
$ echo $PYTHONPATH
$MOKIT_ROOT:...
加载的模块:
module purge
module load deprecated-modules
module load gcc/12.2.0-x86_64
module load python/3.10.8-x86_64
module load anaconda3/2022.05-x86_64
module load intel/2024.2.1
运行命令:
./AutoMR.py --method casscf --basis cc-pVDZ ...
错误输出(部分):
Enter subroutine get_paired_LMO...
chem_core=1, ecp_core=0, Nskip_UNO=0
Two sets of MOs, ist=1, invoke UNO associated rotation.
$python 00-h2o_cc-pVDZ_1.5_uhf_uno_asrot.py >00-h2o_cc-pVDZ_1.5_uhf_uno_asrot.out 2>&1
ERROR in subroutine submit_pyscf_job: PySCF job failed. Please open
file 00-h2o_cc-pVDZ_1.5_uhf_uno_asrot.out and check.
已确认:
在命令行直接执行 Python 脚本可以成功:
python 00-h2o_cc-pVDZ_1.5_uhf_uno_asrot.py
内部调用 $python ... 时失败。
$python 是 MOKIT 在日志中标记的,不是 shell 命令。
疑问:
为什么 MOKIT 内部执行 Python 会找不到 mokit?
如何让 MOKIT 使用我通过 module load anaconda3/... 加载的 Python 环境?
有没有办法在不影响其他程序的前提下,确保内部 $python 调用与 shell 中 python 相同?
谢谢大家了!
|
|