Potential not stable for LiAlO2 #4548
Unanswered
ankit213910
asked this question in
Q&A
Replies: 5 comments 2 replies
-
I find the number of neurons is very limited have you tried with the default settings in the deepmd-kit water example? and How about the training and test accuracy of your model? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Dear Dr. Wang,
Just wanted to inform you about all the steps.
1. Training data has *2500 consecutive frames* from VASP AIMD 128 atoms 10
X 10 X 10 Angstrom LiAlO2 supercell.
2. Test data has 300 frames of VASP AIMD.
3. Here is the input.json, I increased the number of neurons
following input_water.json example.
{
"_comment1": " model parameters",
"model": {
"type_map": [
"H",
"Li",
"Al",
"O"
],
"descriptor": {
"type": "se_e2_a",
"sel": [
46,
92,
138,
184
],
"rcut_smth": 0.50,
"rcut": 6.00,
"_comment": "N2=2N1, N2=N1, and otherwise can be tested",
"neuron": [
25,
50,
100,
100
],
"resnet_dt": false,
"axis_neuron": 16,
"type_one_side": true,
"seed": 1,
"_comment2": " that's all"
},
"fitting_net": {
"neuron": [
240,
240,
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment3": " that's all"
},
"_comment4": " that's all"
},
"learning_rate": {
"type": "exp",
"decay_steps": 5000,
"start_lr": 0.001,
"stop_lr": 3.51e-8,
"_comment5": "that's all"
},
"loss": {
"type": "ener",
"start_pref_e": 0.02,
"limit_pref_e": 1,
"start_pref_f": 1000,
"limit_pref_f": 1,
"start_pref_v": 0,
"limit_pref_v": 0,
"_comment6": " that's all"
},
"training": {
"training_data": {
"systems": [
"model_compression2/data"
],
"batch_size": "auto",
"_comment7": "that's all"
},
"validation_data": {
"systems": [
"model_compression2/data"
],
"batch_size": 1,
"numb_btch": 3,
"_comment8": "that's all"
},
"numb_steps": 20000,
"seed": 10,
"disp_file": "lcurve.out",
"disp_freq": 1000,
"save_freq": 5000,
"_comment9": "that's all"
},
"_comment10": "that's all"
}
Here is the test output
The energy and forces of predictions match well with test data but the
*diagonal
components of virials have a large error*:
Dear Dr. Wang,
Just wanted to inform you about all the steps.
1. Training data has 2500 consecutive frames from VASP AIMD 128 atoms 10 X 10 X 10 Angstrom LiAlO2 supercell.
2. Test data has 300 frames of VASP AIMD.
3. Here is the input.json, I increased the number of neurons following input_water.json example.
{
"_comment1": " model parameters",
"model": {
"type_map": [
"H",
"Li",
"Al",
"O"
],
"descriptor": {
"type": "se_e2_a",
"sel": [
46,
92,
138,
184
],
"rcut_smth": 0.50,
"rcut": 6.00,
"_comment": "N2=2N1, N2=N1, and otherwise can be tested",
"neuron": [
25,
50,
100,
100
],
"resnet_dt": false,
"axis_neuron": 16,
"type_one_side": true,
"seed": 1,
"_comment2": " that's all"
},
"fitting_net": {
"neuron": [
240,
240,
240
],
"resnet_dt": true,
"precision": "float64",
"seed": 1,
"_comment3": " that's all"
},
"_comment4": " that's all"
},
"learning_rate": {
"type": "exp",
"decay_steps": 5000,
"start_lr": 0.001,
"stop_lr": 3.51e-8,
"_comment5": "that's all"
},
"loss": {
"type": "ener",
"start_pref_e": 0.02,
"limit_pref_e": 1,
"start_pref_f": 1000,
"limit_pref_f": 1,
"start_pref_v": 0,
"limit_pref_v": 0,
"_comment6": " that's all"
},
"training": {
"training_data": {
"systems": [
"model_compression2/data"
],
"batch_size": "auto",
"_comment7": "that's all"
},
"validation_data": {
"systems": [
"model_compression2/data"
],
"batch_size": 1,
"numb_btch": 3,
"_comment8": "that's all"
},
"numb_steps": 20000,
"seed": 10,
"disp_file": "lcurve.out",
"disp_freq": 1000,
"save_freq": 5000,
"_comment9": "that's all"
},
"_comment10": "that's all"
}
Here is the test output
The energy and forces of predictions match well with test data but the diagonal components of virials have a large error:
image.pngimage.png
image.png
When I finally use the potential in LAMMPS, the structural integrity of the supercell is being distorted in a very small simulations with 500 atoms and NPH ensemble at 300 K. The volume is also rapidly increasing.
Start end
image.png image.png
Could you kindly provide some inputs on how to get a more accurate potential?
Sincerely,
Ankit



[image: image.png][image: image.png]
[image: image.png]
When I finally use the potential in LAMMPS, the structural integrity of the
supercell is being distorted in a very small simulations with 500 atoms and
NPH ensemble at 300 K. The volume is also rapidly increasing.

Start
end
[image: image.png] [image: image.png]
Could you kindly provide some inputs on how to get a more accurate
potential?
Sincerely,
Ankit
…On Wed, 15 Jan 2025 at 08:12, Han Wang ***@***.***> wrote:
I find the number of neurons is very limited have you tried with the
default settings in the deepmd-kit water example?
—
Reply to this email directly, view it on GitHub
<#4548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIASJYBBTPG36RIR7TWU46T2K2CF5AVCNFSM6AAAAABVBKTX4WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBUGQ4TGMA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello,
I generated 1500 frames of single point static calculations from vasp for 1
H in a 128 LiAlO2 system
OUTCAR1-OUTAR500 are the DFT outputs of *129 atoms *cell with perturbed
atom positions
OUTCAR501-OUTCAR1000 are for a Li atom migrating to a Li vacancy. Since I
created Li vacancy I also deleted 1 Al atoms and 2 O atoms to keep the cell
charge neutral. Now these OUTCARS only have *125 atoms*.
OUTCAR1001 to OUTCAR1500 are for Al atom migrating to Al vacancy. These
also have 125 atoms.
Now when I try to create the dataset using
dsys = dpdata.LabeledSystem("OUTCAR")
dsys.to("deepmd/npy", "deepmd_data", set_size=200)
I concat all the OUTCARs with 129 atoms and make one set and then concat
all OUTCARS with 125 atoms and then make set 2.
But the type and type_map files are different for these. Therefore the dp
train is throwing an error.
Is there a way to address this different number of atoms in training sets?
Sincerely,
Ankit
…On Fri, 17 Jan 2025 at 20:26, Han Wang ***@***.***> wrote:
1. it is recommend to use descriptor neuron [ 25, 50, 100].
2. the virial's precision is low because it is not trained, as the
start and limit virial prefactors are zeros. If you want to train them,
give prefactors the same as energy is a good rule of thumb.
3. AIMD is not a good sampler thus with the training data you may only
do md simulations at exactly the same condition as AIMD. e.g. AIMD is nvt
at 300K you may only do lammps MD simulation under nvt at 300K.
4. to generate a more capable model for different ensembles at boarder
range of thermodynamic conditions, you may need to use the concurrent
learning method introduced in
https://doi.org/10.1103/PhysRevMaterials.3.023804 and implemented by
dpgen https://doi.org/10.1016/j.cpc.2020.107206 . A example is the
water-ice model for 0-2400K and 0-50GPa
https://doi.org/10.1103/PhysRevLett.126.236001
—
Reply to this email directly, view it on GitHub
<#4548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIASJYEA6ENIIV2RCSB4JOT2LHJVXAVCNFSM6AAAAABVBKTX4WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBXGMZTENY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Thank you for your response Dr. Wang.
But each of the 1500 cases has only a single frame in the OUTCAR.
If I make a datasystem for every case then I will have 1500 datasystems.
And 500 of them have 129 atoms while the rest 1000 have 125 atoms (due to 1
Li vacancy+ 1Al vacancy + 2 O vacancies). Then the type_map will differ for
those with 125 atoms than those with 129 atoms. How to address that please?
Then when I make the dataset for each case should I do set size 1 for
dsys.to("deepmd/npy", "deepmd_data", *set_size=1*)?
Sincerely,
Ankit
…On Wed, 19 Feb 2025 at 19:27, Han Wang ***@***.***> wrote:
plz do not concat OUTCAR. create different "data systems" for different
cases.
—
Reply to this email directly, view it on GitHub
<#4548 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BIASJYEZSAMESYMLM5WPLKD2QVDTRAVCNFSM6AAAAABVBKTX4WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMRVG43DIOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am a new user of DeepMD.
I have trained a Deepmd model for LiAlO2 system.
I used the AIMD VASP OUTCAR to prepare the trianing set. I used the following code to prepare the training set.
from dpdata import LabeledSystem, MultiSystems
from glob import glob
"""
process multi systems
"""
fs = glob("OUTCAR") # remeber to change here !!!
ms = MultiSystems()
for f in fs:
try:
ls = LabeledSystem(f)
except:
print(f)
if len(ls) > 0:
ms.append(ls)
ms.to_deepmd_raw("deepmd")
ms.to_deepmd_npy("deepmd")
MultiSystems (1 systems containing 6000 frames)
It created the following files which includes the force and stress.
box, coord, energy, force, type, type_map, virial

(image shown below)
Then I trained it using the input_compress2_json (modified from the model compression json) and got the model.ckpt. I froze the model and used it in LAMMPS. But the potential is not able to retain simple crystal structure of a 500 atom supercell. Input.jaosn shown below
{
"_comment1": " model parameters",
"model": {
"type_map": [
"H",
"Li",
"Al",
"O"
],
"descriptor": {
"type": "se_e2_a",
"sel": [
46,
92,
138,
184
],
"rcut_smth": 0.50,
"rcut": 6.00,
"_comment": "N2=2N1, N2=N1, and otherwise can be tested",
"neuron": [
4,
8,
17,
17
],
"resnet_dt": false,
"axis_neuron": 16,
"seed": 1,
"_comment2": " that's all"
},
"fitting_net": {
"neuron": [
20,
20,
20
],
"resnet_dt": true,
"seed": 1,
"_comment3": " that's all"
},
"_comment4": " that's all"
},
"learning_rate": {
"type": "exp",
"decay_steps": 5000,
"start_lr": 0.001,
"stop_lr": 3.51e-8,
"_comment5": "that's all"
},
"loss": {
"type": "ener",
"start_pref_e": 0.02,
"limit_pref_e": 1,
"start_pref_f": 1000,
"limit_pref_f": 1,
"start_pref_v": 0,
"limit_pref_v": 0,
"_comment6": " that's all"
},
"training": {
"training_data": {
"systems": [
"model_compression2/data"
],
"batch_size": "auto",
"_comment7": "that's all"
},
"validation_data": {
"systems": [
"model_compression2/data"
],
"batch_size": 1,
"numb_btch": 3,
"_comment8": "that's all"
},
"numb_steps": 1000,
"seed": 10,
"disp_file": "lcurve.out",
"disp_freq": 100,
"save_freq": 1000,
"_comment9": "that's all"
},
"_comment10": "that's all"
}
I wanted to take some suggestions from you regarding how to get a simple stable potential using DeepMD. Could you kindly take a look at the data and the input file I sent please? I appreciate your guidance.
Beta Was this translation helpful? Give feedback.
All reactions