Skip to content

Conversation

@MoseyQAQ
Copy link
Contributor

@MoseyQAQ MoseyQAQ commented Jan 4, 2026

Summary
Fixes an issue in shift_energy_to_zero.py where stress data was dropped when processing extxyz files.

This clear will also delete the attached stress data:

Modification
This change explicitly retrieves and saves the stress to atoms.info (if available) before the calculator is reset.

    try:
        stress = all_frames[i].get_stress(voigt=False)
        all_frames[i].info['stress'] = stress
    except:
        pass

@brucefan1983 brucefan1983 merged commit d19ce3a into brucefan1983:master Jan 4, 2026
2 checks passed
@MoseyQAQ MoseyQAQ deleted the fix_stress_shift branch January 4, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants