Skip to content

Commit d19ce3a

Browse files
authored
Merge pull request brucefan1983#1304 from MoseyQAQ/fix_stress_shift
handle the `stress` tag in `shift_energy_to_zero.py`
2 parents 52b9e6f + b14a533 commit d19ce3a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tools/Analysis_and_Processing/shift_energy_to_zero/shift_energy_to_zero.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ def SVD_A(A,b):
9090
all_frames[i].new_array('forces',forces)
9191
except:
9292
pass
93+
try:
94+
stress = all_frames[i].get_stress(voigt=False)
95+
all_frames[i].info['stress'] = stress
96+
except:
97+
pass
9398
all_frames[i].calc = None
9499
all_frames[i].info['energy'] = shifted_energy[i]
95100
write("shifted.xyz",all_frames)

0 commit comments

Comments
 (0)