Skip to content

Add Born Effective Charges support as a property head#1

Open
AugustinLu wants to merge 5 commits intomainfrom
feature/add-bec-support-14624376731387974145
Open

Add Born Effective Charges support as a property head#1
AugustinLu wants to merge 5 commits intomainfrom
feature/add-bec-support-14624376731387974145

Conversation

@AugustinLu
Copy link
Copy Markdown
Owner

Added support for training and predicting Born Effective Charges.

  • Uses IrrepsLinear to predict a 9x0e property mapped to (N, 3, 3) per atom matrices.
  • Modified dataloading from atoms.info/arrays for BEC extraction.
  • Exposes predicted BECs natively to calculator.results.

PR created automatically by Jules for task 14624376731387974145 started by @AugustinLu

@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@AugustinLu AugustinLu force-pushed the feature/add-bec-support-14624376731387974145 branch 2 times, most recently from 2e776d7 to e9656ae Compare March 31, 2026 03:26
- Added native support for BEC tensors in the core architecture.
- Integrated BEC in calculator for ASE.
- Implemented custom loss functions separating diagonal and off-diagonal BEC components.
- Added BEC-specific Terminal evaluation metrics (DiagRMSE and OffDiagRMSE).
- Introduced new configuration keywords for integration with the 'sevenn' parser.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
@AugustinLu AugustinLu force-pushed the feature/add-bec-support-14624376731387974145 branch from e9656ae to b751faf Compare March 31, 2026 03:27
google-labs-jules Bot and others added 4 commits April 10, 2026 07:09
* Explain why the `TotalLoss` tracking metric reads exactly `0.000000` when BEC weights are strictly > 0 and Energy/Force/Stress weights are exactly 0.0 (the terminal logger hardcodes non-BEC features for aggregation visualization).
* Deliver a custom FlashTP compatibility statement affirming that `use_flash_tp: True` flawlessly accelerates the `1x0e+1x1e+1x2e` tensor message-passing layers inside the $L_{max} \ge 2$ environment.

Co-authored-by: AugustinLu <59640670+AugustinLu@users.noreply.github.com>
* Modifies `sevenn/error_recorder.py` to append `BornEffectiveCharges` to the hardcoded loss aggregation list if `KEY.IS_TRAIN_BEC` is enabled in the configuration.
* Fixes a bug where models trained exclusively on BECs (`energy/force/stress_weight: 0.0`) reported `TotalLoss = 0.000000`, causing checkpoint saving algorithms tied to `best_metric` improvements to stall.

Co-authored-by: AugustinLu <59640670+AugustinLu@users.noreply.github.com>
* **Band Gap**: Adds a global intensive scalar prediction head (`1x0e`) utilizing `AtomReduce` with `reduce='mean'` to prevent artificial scaling across supercells.
* **Magmoms**: Adds a node-level scalar prediction head (`1x0e`) mapping to individual atom magnetic moments natively, bypassing spatial derivative calculations.
* Creates `BandGapLoss` and `MagmomsLoss` frameworks based off `MSELoss` for direct benchmarking against Materials Project structures.
* Outputs properties cleanly through the `SevenNetCalculator`.

Co-authored-by: AugustinLu <59640670+AugustinLu@users.noreply.github.com>
Co-authored-by: AugustinLu <59640670+AugustinLu@users.noreply.github.com>
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.

1 participant