Skip to content

Commit c96ae3e

Browse files
committed
add reading restarted cp2k aimd output
1 parent ad7ee2d commit c96ae3e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dpdata/cp2k/output.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __next__(self):
4949
assert all(eq1), (log_info_dict,xyz_info_dict,'There may be errors in the file')
5050
assert all(eq2), (log_info_dict,xyz_info_dict,'There may be errors in the file')
5151
assert all(eq3), (log_info_dict,xyz_info_dict,'There may be errors in the file')
52-
assert abs(log_info_dict['energies']-xyz_info_dict['energies'])<1E-4, (log_info_dict['energies'],xyz_info_dict['energies'],'There may be errors in the file')
52+
assert log_info_dict['energies']==xyz_info_dict['energies'], (log_info_dict['energies'], xyz_info_dict['energies'],'There may be errors in the file')
5353
info_dict.update(log_info_dict)
5454
info_dict.update(xyz_info_dict)
5555
return info_dict
@@ -166,9 +166,9 @@ def handle_single_log_frame(self, lines):
166166
info_dict['atom_names'] = atom_names
167167
info_dict['atom_numbs'] = atom_numbs
168168
info_dict['atom_types'] = np.asarray(atom_types_list)
169-
info_dict['cells'] = np.asarray([self.cell]).astype('float64')
170-
info_dict['energies'] = np.asarray([energy]).astype('float64')
171-
info_dict['forces'] = np.asarray([forces_list]).astype('float64')
169+
info_dict['cells'] = np.asarray([self.cell]).astype('float32')
170+
info_dict['energies'] = np.asarray([energy]).astype('float32')
171+
info_dict['forces'] = np.asarray([forces_list]).astype('float32')
172172
return info_dict
173173

174174
def handle_single_xyz_frame(self, lines):
@@ -210,8 +210,8 @@ def handle_single_xyz_frame(self, lines):
210210
info_dict['atom_names'] = atom_names
211211
info_dict['atom_numbs'] = atom_numbs
212212
info_dict['atom_types'] = np.asarray(atom_types_list)
213-
info_dict['coords'] = np.asarray([coords_list]).astype('float64')
214-
info_dict['energies'] = np.array([energy]).astype('float64')
213+
info_dict['coords'] = np.asarray([coords_list]).astype('float32')
214+
info_dict['energies'] = np.array([energy]).astype('float32')
215215
info_dict['orig']=[0,0,0]
216216
return info_dict
217217

0 commit comments

Comments
 (0)