AutoNEP 阶段模板预览
这些文件会随任务包复制或参与生成,包含 GPUMD run.in、VASP INCAR、NEP 训练 nep.in、预测 run.in、machine.yaml 和执行脚本。
资源/调度配置config/machine.yaml
machine_name: "Local_Test_Env"
root_dir: "." # <--- 请修改这里为你的实际路径
paths:
# 必须填写入完整的绝对路径,确保 Python 无论在哪里执行都能找到它
gpumdkit: "/home/koko/local/compute-env/bin/gpumdkit.sh"
# 如果你的 nep 可执行文件也有特定路径,也可以放在这里
nep_exe: "/cluster/home/koko125/tool/GPUMD/src/nep"
# 脚本库位置
script_dir: "config/scripts"
executors:
# 1. 简单的本地命令 (如 NEP 训练)
nep_local:
type: "local"
cmd: "nep"
# 2. 复杂的本地脚本 (如 GPUMD)
gpumd:
type: "local"
cmd: "gpumd" # 对应 config/scripts/gpumd.sh
# 3. Slurm 提交测试 (VASP CPU)
vasp_gpu:
type: "local"
cmd: "mpirun -np 1 vasp_std"
compute_manager:
# Dev migration path: when enabled, AutoNEP keeps stage control locally and
# submits GPUMD/NEP/VASP heavy calculations through apps.compute.
# Enable with AUTONEP_USE_COMPUTE_MANAGER=1 or set enabled: true in a dev
# bundle that runs inside the Django platform container.
enabled: true
backend_name: "auto"
root_path: "/app/runtime/compute-jobs"
env_script: "/home/koko/local/compute-env/env.sh"
timeout_seconds: 86400
commands:
gpumd: "/home/koko/local/compute-env/bin/gpumd"
nep: "/home/koko/local/compute-env/bin/nep"
vasp: "mpirun -np 1 /home/koko/local/compute-env/bin/vasp_std_cpu"
scheduler:
# Phase-1 shared scheduler. Disabled by default so legacy behavior is kept
# unless explicitly enabled in generated task bundles or via environment:
# export AUTONEP_SHARED_SCHEDULER=1
enabled: false
poll_interval_seconds: 10
fifo_gpu_grace_seconds: 120
missing_job_fail_seconds: 300
partitions:
cpu: cpu
gpu: gpu
resource_limits:
auto_detect: true
fallback_cpu: 200
fallback_gpu: 2
resources:
gpumd_cpu: 4
nep_cpu: 4
vasp_cpu: 4
gpumdkit_cpu: 2
operations:
# D-class gpumdkit/ops tasks. Light preparation commands stay local on
# the persistent worker; heavy analysis/collection commands enter Slurm
# with the highest scheduler priority.
gpumdkit_cpu: 2
heavy_file_mb: 500
out2xyz_dir_threshold: 50
force_slurm: false
vasp:
candidate_cores: [4, 8, 16, 32, 48]
gpu_enabled: true
gpu_cores: 1
cpu_command: "srun --mpi=pmi2 /cluster/home/koko125/vasp/vasp.6.4.3_cpu_public/bin/vasp_std"
gpu_command: "mpirun -np {cores} vasp_std"
cpu_env_init: "source /cluster/home/koko125/vasp/vasp.6.4.3_cpu_public/env_public_cpu.sh\nexport OMP_NUM_THREADS=1\nexport MKL_NUM_THREADS=1\nexport MKL_DYNAMIC=FALSE\nexport I_MPI_PMI_LIBRARY=/usr/lib64/libpmi2.so.0.0.0\nunset SLURM_TRES_PER_TASK"
gpu_env_init: "source /cluster/apps/anaconda3/2022.05/etc/profile.d/conda.sh\nconda activate autonep\nsource ~/script/gpumd.sh\nsource ~/script/vasp_gpu.sh"
benchmark_nelm: 3
benchmark_timeout_seconds: 900
benchmark_fallback_cores: 4
timeout_factor: 6.0
min_success_ratio: 0.60
time: 7-00:00:00
# mem: 32G
执行脚本config/scripts/vasp_cpu.sh
GPUMD 预热template/00.md/preheat/run.in
potential ./nep.txt
time_step 1
# Stage 1: 预热阶段1 - 从100K升温到400K
# 使用npt_scr系综,提供稳定的压力控制,防止体积扩散
velocity 100
ensemble npt_scr 100 400 100 0 0 0 0 0 0 50 50 50 5 5 5 1000
dump_thermo 100
dump_exyz 1000
run 100000
# Stage 2: 预热阶段2 - 从400K升温到1000K
ensemble npt_scr 400 1000 100 0 0 0 0 0 0 50 50 50 5 5 5 1000
dump_thermo 10
dump_exyz 10000
run 100000
GPUMD 预热template/00.md/preheat/run_mpkk.in
potential ./nep.txt
velocity 100
ensemble npt_mttk temp 100 400 aniso 0 0
run 100000
ensemble npt_mttk temp 400 1000 aniso 0 0
dump_thermo 10
dump_exyz 10000
run 100000
GPUMD 预热template/00.md/preheat/run_scr.in
potential ./nep.txt
time_step 1
# Stage 1: 预热阶段1 - 从100K升温到400K
# 使用npt_scr系综,提供稳定的压力控制,防止体积扩散
velocity 100
ensemble npt_scr 100 400 100 0 0 0 0 0 0 50 50 50 5 5 5 1000
dump_thermo 100
dump_exyz 1000
run 100000
# Stage 2: 预热阶段2 - 从400K升温到1000K
ensemble npt_scr 400 1000 100 0 0 0 0 0 0 50 50 50 5 5 5 1000
dump_thermo 10
dump_exyz 10000
run 100000
GPUMD 生产template/00.md/production/run.in
potential ./nep.txt
time_step 1
# Production阶段 - 使用npt_scr系综,提供稳定的压力控制,防止体积扩散
# 温度范围:350K -> 900K
velocity 350
ensemble npt_scr 350 900 100 0 0 0 0 0 0 50 50 50 5 5 5 1000
dump_thermo 10
dump_exyz 100
run 500000
GPUMD 生产template/00.md/production/run_mpkk.in
potential ./nep.txt
velocity 350
ensemble npt_mttk temp 350 900 aniso 0 0
dump_thermo 10
dump_exyz 100
run 500000
GPUMD 生产template/00.md/production/run_scr.in
potential ./nep.txt
time_step 1
# Production阶段 - 使用npt_scr系综,提供稳定的压力控制,防止体积扩散
# 温度范围:350K -> 900K
velocity 350
ensemble npt_scr 350 900 100 0 0 0 0 0 0 50 50 50 5 5 5 1000
dump_thermo 10
dump_exyz 100
run 500000
VASP SCFtemplate/02.scf/INCAR
NSW = 0
PREC = Normal
SIGMA = 0.05
NELM = 100
LWAVE = .FALSE.
LCHARG = .FALSE.
KSPACING = 0.25
KGAMMA = .TRUE.
NEP 训练template/03.train/nep.in
type 3 Li Y Cl
zbl 2
cutoff 6 5
generation 100000
NEP 预测template/04.predict/run.in
potential ./nep.txt
time_step 1
# Stage 1: Heating (NPT) - 30 ps
velocity 300
ensemble npt_scr 300 {T} 100 0 0 0 0 0 0 50 50 50 5 5 5 1000
run 30000
# Stage 2: Equilibration (NPT) - 60 ps
ensemble npt_scr {T} {T} 100 0 0 0 0 0 0 50 50 50 5 5 5 1000
run 60000
# Stage 3: Production (NVT)
ensemble nvt_nhc {T} {T} 100
# MSD 设置: 10 * window * 20 = steps
compute_msd 10 {MSD_WINDOW} group 0 0
dump_thermo 1000
dump_exyz 5000
run {STEPS}