Replies: 2 comments 9 replies
-
|
Beta Was this translation helpful? Give feedback.
8 replies
-
In your script, you reorder the atoms, making O atoms ahead of H atoms. Did you do the same thing for coordinates and atomic types? |
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
Uh oh!
There was an error while loading. Please reload this page.
-
I converted the data of water molecules calculated by cp2k (natom=768, nconfig=50000) into raw format with python, and then used the raw_to_set.sh command to make a data set. After the training, RMS validation error of energy, and RMS training error of energy decreased satisfactorily, but RMS validation error of force and RMS training error of force did not decrease, but fluctuated around the initial value.

When I train the model of water in the deepmd-kit example, everything works fine.
This is the codes when I convert the python file in raw format and training
import numpy as np
from numpy.linalg import inv
f1=open("forces.xyz", "r")
f2=open("force.raw", "w")
natom=768
nconfig=50000
convf=27.2114/0.529177
for k in range(0,nconfig):
O=[]
H=[]
for i in range(0,2):
f1.readline()
for i in range(0,natom):
c=f1.readline().split()
if c[0]=="O":
O.append(c)
else:
H.append(c)
for i in range(0,len(O)):
for j in range(1,4):
O[i][j]=float(O[i][j])
O[i][j]=O[i][j]*convf
for i in range(0,len(H)):
for j in range(1,4):
H[i][j]=float(H[i][j])
H[i][j]=H[i][j]*convf
for i in range(0,len(O)):
f2.write(str(O[i][1])+" "+ str(O[i][2])+" "+str(O[i][3])+ " ")
for i in range(0,len(H)):
f2.write(str(H[i][1])+" "+ str(H[i][2])+" "+str(H[i][3])+ " ")
f2.write("\n")
Beta Was this translation helpful? Give feedback.
All reactions