Hands-on to APEX (Alloy Properties EXplorer using simulations)
©️ Copyright 2023 @ Authors
作者:
zhuoyli@outlook.com 📨
日期:2023-07-25
共享协议:本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。
快速开始:点击上方的 开始连接 按钮,选择 bohrium-notebook:2023-05-31镜像 和任意配置机型即可开始。
📖 Getting Started Guide
This document can be executed directly on the Bohrium Notebook. To begin, click the Connect button located at the top of the interface, then select the bohrium-notebook:2023-05-31 Image and choose your desired machine configuration to proceed.
This Bohrium notebook demonstrates how to perform alloy properties test flow with different simulation tools via APEX. The related computational tasks are submitted to the Bohrium platform, so you need to have a Bohrium account to start the workflow. Then you can monitor the workflow process on the website.
If you have any problems about the APEX, issues are welcomed in https://github.com/deepmodeling/APEX/
Background
After obtaining a DP model for an alloy, it is important to not only calibrate the model's energies, forces, and virials using dp test
, but also to test its accuracy in describing other properties. This requires a convenient software package (workflow) to compute and compare a series of properties computed with DFT and existing interatomic potential functions (such as EAM and MEAM). The agreement between DP and DFT in various properties reflects the accuracy of DP and guides training strategies and parameter settings.
The previous version of alloy property test package autotest
is integrated inside the DP-GEN
that has following drawbacks:
Inefficiency when testing multiple models simultaneously. For each model, the testing process involves
make
,run
, andpost
, with each test waiting for the previous step to finish before the user's intervention to kick off the following step, which significantly reduces the efficiency of model testing.Difficulty in locating specific tasks when errors occur during the running process, indicating weak error handling capabilities.
With the help of recently developed tools such as dflow and fpop, these issues can be effectively addressed. Thus, based on the previous codes, the new Python package: APEX (Alloy Properties Explorer using simulations) is introduced to provide an integrated alloy property test tool-kits based on cloud-native workflow with high efficiency.
Install APEX
Download APEX
packedge via git clone
APEX
can be easily installed via pip
, as well as other dependencies such as pydflow
.
check if apex
is installed
LAMMPS example
Here we take a case study example for demonstration. This test is to evaluate preformance of a recently published pre-trained Deep Potential model: DPA-1 on description of interatomic interation of HCP Titanium metal through MD simulation using LAMMPS.
Figure 1. DPA model
Firstly, go to the prepared case directory:
tree
to check current local working directory:
global_bohrium.json
contains necessary config for Bohrium platform (e.g. account infomation; machine type; image address et al.), and should be prepared under current work directory in the first place.
Please replace with your own Borium username
, password
and program_id
via following code:
A complete APEX
framework to test alloy properties contains two individual workflows (relaxation
and property
) joint together.
Three types of test parameters json files are prepared here for demonstration:
param_relax.json
contains structures path, interaction infomation and relaxation parameters:
param_props.json
contains structures path, interaction infomation and property test parameters:
As can be seen, the eos
and elastic
have been turned on by indicating value of "skip" to be false.
param_joint.json
contains all the information including parameters regarding relaxation and property test:
Submit relaxation
workflow
This can be done via any of following commands, for example:
apex param_relax.json
apex param_joint.json --relax
apex param_relax.json param_props.json --relax
For example: (it may takes a few minutes to submit to Bohrium depending on one's network connection)
Once Workflow has been submitted (ID: ...
appears, you can monitor the workflow on website.
While waiting...
APEX Introduction
APEX
inherits the functionality of the second version of alloy properties calculations and is developed based on the dflow
. By incorporating the advantages of cloud-native workflow features, APEX
simplifies the complex process to automatically test multiple configurations and properties within one workflow. It offers users an more intuitive and easy-to-use interaction, making the overall user experience more straightforward.
Overall framework of APEX:
Figure 1|A illustrtion of APEX workflow
Three types of workflow achieved on the Argo UI:
relaxation
mode:
property
mode:
joint
mode:
- The architechture of
relaxation
andproperty-test
workflows follows the similar three-steps style of previous codes:
Figure 2|Three steps in Relaxation flow
When the workflow finished, the work directory will be downloaded automatically, containing finished relaxation tasks:
Submit property-test
workflow
Then, we can continue submiting a property-test
workflow. This could be realized via one of following commands (note that you should have the relaxation
workflow finished in the first place before continue this step):
apex param_props.json
apex param_joint.json --props
apex param_relax.json param_props.json --props
for example: (it may takes a few minutes to submit to Bohrium depending on one's network connection)
you can monitor this workflow on website once submitted.
Basics for property tests
- The equation of state (EOS):
Figure 3|Three steps in EOS calculation
Figure 4|Example of EOS plot (from Computer Physics Communications 253 (2020) 107206)
- The elastic modulus:
Figure 5|Three steps in elastic constants calculation
The surface energy:
The point defect energy:
The stacking fault energy (Gamma line):
When the workflow completed, the work directory, together with property results, will be downloaded automatically to current directory:
Submit a joint
workflow (relaxation + property-test)
You can also submit an overall joint
workflow to complete equivalent jobs of above two workflow.
Let's start over by reset the work direction:
Submit a joint
workflow by:
apex param_joint.json
apex param_relax.json param_props.json
for example: (it may takes a few minutes to submit to Bohrium depending on one's network connection)
you can monitor this workflow on website once submitted.
When the workflow completed, the work directory, together with property results, will be downloaded automatically to current directory:
We can now extract the results of EOS
and elastic tensor
corresponding to each configuration: