Skip to content

Commit

Permalink
NequIP| lib_dft.py G_gs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kisung Kang committed Jun 19, 2024
1 parent f99cf65 commit d0cc616
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions libs/lib_dft.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ def run_DFT(inputs):
# Go through all sampled structral configurations
# Collect the calculations and deploy all inputs for FHI-vibes

if inputs.output_format == 'nequip':
from ase.io import read as atoms_read
single_print('[NequIP] Extract the pretrained NequIP ground truth.')
struc_init = atoms_read('./../../geometry.in.supercell', format='aims')
struc_init.calc = refer_MLIP
E_gs = struc_init.get_potential_energy()
single_print('[NequIP] Get G_gs from NequIP.')
# if inputs.output_format == 'nequip':
# from ase.io import read as atoms_read
# single_print('[NequIP] Extract the pretrained NequIP ground truth.')
# struc_init = atoms_read('./../../geometry.in.supercell', format='aims')
# struc_init.calc = refer_MLIP
# E_gs = struc_init.get_potential_energy()
# single_print('[NequIP] Get G_gs from NequIP.')


for jndex, jtem in enumerate(smapled_indices):
Expand All @@ -121,7 +121,8 @@ def run_DFT(inputs):
refer_atom = traj_DFT[jtem]
refer_atom.calc = refer_MLIP

refer_E = refer_atom.get_potential_energy() - E_gs
# refer_E = refer_atom.get_potential_energy() - E_gs
refer_E = refer_atom.get_potential_energy()
refer_F = refer_atom.get_forces()
write_geo.write(refer_atom)
write_geo.close()
Expand Down

0 comments on commit d0cc616

Please sign in to comment.