对称梯度域机器学习(sgdml)
要求:Python2.7/3.7
纽比(>;=1.13.0)
scipy
Pythorch(可选)
开始
稳定释放
大多数系统都预装了pythonpip的默认包管理器。只需调用:即可安装sgdml
pip install sgdml
命令行界面和相应的python api现在可以从系统的任何地方使用。
开发版本
(1)克隆存储库
git clone https://github.com/stefanch/sGDML.git
cd sGDML
或用更新现有的本地副本
git pull origin master
(2)安装
pip install -e .
使用标志--user,我们可以告诉pip将包安装到当前用户的主目录,而不是系统范围。此选项可能要求您相应地更新系统的PATH变量。
…支持GPU
对于gpu支持,需要安装可选的pytorch依赖项。
pip install -e .[torch]
重建第一个力场
下载其中一个示例数据集:
sgdml-get dataset ethanol_dft
训练力场模型:
sgdml all ethanol_dft.npz 200 1000 5000
查询力字段importnumpyasnpfromsgdml.predictimportGDMLPredictfromsgdml.utilsimportior,_=io.read_xyz('examples/geometries/ethanol.xyz&#