Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

fix(core): Prevent Buckingham Potential Collapse at Short Distances#36

Merged
TKanX merged 2 commits intomainfrom
bugfix/34-buckingham-exp-6-potential-leads-to-non-physical-energy-collapse-at-short-distances
Aug 18, 2025
Merged

fix(core): Prevent Buckingham Potential Collapse at Short Distances#36
TKanX merged 2 commits intomainfrom
bugfix/34-buckingham-exp-6-potential-leads-to-non-physical-energy-collapse-at-short-distances

Conversation

@TKanX
Copy link
Member

@TKanX TKanX commented Aug 18, 2025

Summary:

Addresses a critical issue in the buckingham_exp_6 potential function where it can non-physically "collapse" to an infinite negative energy at extremely short inter-atomic distances. To prevent this catastrophe, a switching mechanism has been introduced. Below a defined threshold (a fraction of the van der Waals radius), the potential now transitions to a purely repulsive Lennard-Jones r^-12 form, guaranteeing a robust and physically realistic energy barrier for atomic clashes.

Changes:

  • Switched to a Lennard-Jones Repulsive Core at Short Distances:

    • Implemented a switching mechanism in the buckingham_exp_6 function to avert the potential catastrophe at very short distances.
    • Below a threshold (60% of r_min), the calculation now uses a purely repulsive Lennard-Jones (r^-12) term instead of the standard Buckingham form.
    • This change ensures a consistent, strong repulsive wall and prevents non-physical energy collapse during simulations.
  • Updated Unit Tests for Verification:

    • Added a specific unit test to confirm that the potential correctly switches to the LJ r^-12 form at short distances.
    • Refined existing tests to ensure the potential's behavior is correct in the standard operating region.

@TKanX TKanX self-assigned this Aug 18, 2025
Copilot AI review requested due to automatic review settings August 18, 2025 00:00
@TKanX TKanX added the bug 🐛 Something isn't working label Aug 18, 2025
@TKanX TKanX linked an issue Aug 18, 2025 that may be closed by this pull request
4 tasks
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a critical issue in the Buckingham potential function where it could produce non-physical infinite negative energies at extremely short inter-atomic distances. The solution implements a switching mechanism that transitions to a purely repulsive Lennard-Jones r^-12 form below 60% of the van der Waals radius.

  • Introduced a switching mechanism to prevent potential energy collapse at short distances
  • Replaced problematic short-distance handling with a robust Lennard-Jones repulsive core
  • Updated unit tests to verify the switching behavior and remove obsolete tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@TKanX TKanX merged commit 8f20bc5 into main Aug 18, 2025
2 checks passed
@TKanX TKanX deleted the bugfix/34-buckingham-exp-6-potential-leads-to-non-physical-energy-collapse-at-short-distances branch August 18, 2025 00:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Buckingham (exp-6) Potential Leads to Non-Physical Energy Collapse at Short Distances

2 participants