Skip to main content

NEP自动训练

Project description

PyPI Downloads Requires Python 3.10+

安装

Python包索引PyPI中的版本始终是相对无bug的最新稳定版本,可以通过pip安装:

pip install NepTrain

如果你想在主分支上使用最新未发布的更改,你可以直接从GitHub安装:

pip install -U git+https://github.com/aboys-cb/NepTrain

使用方式

修改vim ~/.NepTrain 修改赝势文件路径, 如果没有这个文件,请任意执行一次NepTrain init

1. 初始化

首先先初始化下 会在当前目录下创建提交脚本

NepTrain init
(mysci) aboy@aboy:/mnt/d/Desktop/1$ NepTrain init
[2024-11-05 13:20:57.264180]-- 对于已有的文件我们选择跳过,如果需要强行生成覆盖,请使用-f 或者--force。
[2024-11-05 13:20:57.270163]-- 创建./structure,请将需要跑md的扩包结构放到该文件夹!
[2024-11-05 13:20:57.285512]-- 请检查sub_vasp.sh中的队列信息以及环境设置!
[2024-11-05 13:20:57.289824]-- 请检查sub_gpu.sh中的队列信息以及环境设置!
[2024-11-05 13:20:57.294086]-- 您需要检查修改job.yaml的vasp_job以及vasp.cpu_core。
[2024-11-05 13:20:57.294713]-- 同样需要检查修改job.yaml的gpumd主动学习的设置!
[2024-11-05 13:20:57.472578]-- 创建run.in,您可修改系综设置!温度和时间程序会修改!
[2024-11-05 13:20:57.478132]-- 初始化完成,您在检查好文件后,运行NepTrain train job.yaml即可

2. 制作训练集(可选)

针对结构或者结构文件生成微扰训练集

0.03的晶格形变+0.1的原子扰动

NepTrain perturb ./structure/Cs16Ag8Bi8I48.vasp --num 200 --cell 0.03 -d 0.1 -o train.xyz

3. 提交任务

在修改提交脚本以及任务配置后,在登陆节点运行以下命令即可

NepTrain train job.yaml

如果是后台运行 配合nohup即可

nohup NepTrain train job.yaml &

如果中途出现异常停止了,目录下有一个restart.yaml 执行以下命令即可

NepTrain train restart.yaml

以下是单独使用部分功能的命令demo

  • 很多参数都是默认的可通过-h查看 比如NepTrain vasp -h

计算VASP单点能

NepTrain vasp demo.xyz -np 64 -g --kpoints 20  

如果想修改执行目录 输出目录 以及指定incar 参考以下命令

NepTrain vasp demo.xyz -np 64 --directory ./cache -g --incar=./INCAR --kpoints 20 -o ./result/result.xyz

执行主动学习

对./structure的结构跑300k、500k 10ps的md

NepTrain gpumd ./structure  -t 10 -T 300 500

更多细节参数执行NepTrain gpumd -h

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neptrain-1.3.1.tar.gz (65.1 kB view details)

Uploaded Source

Built Distribution

NepTrain-1.3.1-py3-none-any.whl (60.4 kB view details)

Uploaded Python 3

File details

Details for the file neptrain-1.3.1.tar.gz.

File metadata

  • Download URL: neptrain-1.3.1.tar.gz
  • Upload date:
  • Size: 65.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for neptrain-1.3.1.tar.gz
Algorithm Hash digest
SHA256 cfa80a9d0411ebc51069c171cac6809d460d209ce4ec345ba54e4fabe4c5e217
MD5 393f2019f27e65eca1ee6d16f5838367
BLAKE2b-256 5980a06e7fae2fc112c9c31ded30a30d7dc1c3026a5921834a411cc4cfd59ab8

See more details on using hashes here.

File details

Details for the file NepTrain-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: NepTrain-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 60.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for NepTrain-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 589d1d217ed4b3fd0639ca7da0eff5f66bd5a9ac9eabfec661b77c0c6f270dae
MD5 24e4d5320902f35e45450b01a6a02dbb
BLAKE2b-256 a92b0e8a6475ab53079d28fc00230c4c8c710a1c2096186b0d2ae3d0538e4f42

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page