• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ACEsuit / mace / 40074830643
75%

Build:
DEFAULT BRANCH: develop
Ran 24 Oct 2026 08:28AM UTC
Jobs 1
Files 71
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Oct 2026 11:11AM UTC coverage: 75.117%. Remained the same
40074830643

push

github

web-flow
Add opt-in PolarMACE polarizability from dipole and energy derivatives (#1755)

* Add field-derived dipole and polarizability calculations for PolarMACE

* Add opt-in polarizability for PolarMACE with two derivative routes

PolarMACE.forward gains `compute_polarizability: bool = False` and
`polarizability_method: str = "dipole"`; MACECalculator gains
`get_polarizability(atoms, method="dipole")`. Both return the physical
alpha_ij = d(dipole_i)/d(field_j) per graph, shape [n_graphs, 3, 3]. The
model's `external_field` enters the energy as +field.dipole, i.e. it is
minus the physical field, so both routes carry a sign flip.

  "dipole" (default): alpha = -d(dipole)/d(external_field). One autograd
      pass off the model's dipole readout; the definition of alpha.
  "energy": alpha = -d2(energy)/d(external_field)2. Two autograd passes;
      the intermediate d(energy)/d(external_field) is also returned as
      "dipole_from_energy".

For a variational model the two coincide; PolarMACE is not variational,
so they differ and both are exposed. The key is only produced on request,
so a plain energy call keeps its current output surface (pinned by the
golden contract test).

Merges the field-derivative implementation of #1737 (energy route) with
the dipole-readout implementation. Compared to #1737 the switch is a
forward/calculator argument rather than a model-construction option, so
no CLI flags, no persisted model config, and no new state on the model.

* PolarMACE polarizability: refuse periodic structures, inventory dipole_from_energy, lint

get_polarizability runs the same pbc_handling check as calculate and then
raises ValueError for any periodic direction: the dipole is charge times
position, so its field derivative depends on the image choice under PBC.
Two tests cover the forced-mode mismatch and a periodic cell that calculate
accepts.

Add dipole_from_energy to the golden feature inventory, harness channels
(e*Ang, like PolarMACE's dipole) and model_... (continued)

9307 of 12390 relevant lines covered (75.12%)

0.75 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40074830643.1 24 Oct 2026 08:28AM UTC 71
75.12
GitHub Action Run
Source Files on build 40074830643
  • Tree
  • List 71
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #40074830643
  • 7913afb6 on github
  • Prev Build on develop (#39921240878)
  • Next Build on develop (#40473180787)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc