-
Notifications
You must be signed in to change notification settings - Fork 599
Description
Hi, everyone, I am trying to use dp as ASE calculator to obtain energy and force for each input geometry. The dp force field has been trained under dp 1.2.0 in centos7 and performs well.
Every time I submt the python script to put geometry into dp calculator iteratively, there is no output energy or force until all the geometries calculations are finished. However, normally, the whole cycle cannot be finished since the system memory soon ran out. Here is my code:
def get_E(isomer):
isomer.set_cell(100 * np.identity(3))
isomer.set_pbc((False, False, False))
isomer.calc=DP(model="graph.pb")
E=isomer.get_potential_energy()[0]
return E
f=open('E_ML.txt','w')
for one_xyz in xyz:
xyz_atoms_objs=ase.io.read(one_xyz,index=':')
for isomer in xyz_atoms_objs:
E=get_E(isomer)
f.write(str(E)+'\n')
f.close()
Any suggestions are sinerely welcomed!
Thanks.