Skip to content

Fix fractional electrons - #271

Merged
marvinfriede merged 7 commits into
mainfrom
fix/fractional-electrons
Oct 5, 2026
Merged

marvinfriede merged 7 commits into
mainfrom
fix/fractional-electrons

Conversation

@marvinfriede

Copy link
Copy Markdown
Member

No description provided.

marvinfriede and others added 7 commits October 2, 2026 17:24
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@marvinfriede
marvinfriede merged commit c0cbb37 into main Oct 5, 2026
39 of 41 checks passed
@marvinfriede
marvinfriede deleted the fix/fractional-electrons branch October 5, 2026 08:08
marvinfriede pushed a commit to marvinfriede/dxtb that referenced this pull request Oct 6, 2026
The implicit SCF mode is correct with autograd after grimme-lab#272 but does not run
under torch.func transforms; the derivative with respect to refocc is
wrong since grimme-lab#271; the batched eigensolver stall is fixed for the unrolled
SCF. Report sections 6 (performance), 8 (inventory) and the appendix
tables are still to be refreshed. The workload script now saves after
every workload.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4doYYUUPZf74yA4gR3NQh
marvinfriede pushed a commit to marvinfriede/dxtb that referenced this pull request Oct 6, 2026
… wide gaps

The differentiable Newton steps of the Fermi occupations drop the derivative
with respect to the number of electrons when the gap is too wide to divide
by the derivative of the electron count (water: about 300 kT). Since the
electron count carries its graph (grimme-lab#271), the derivative with respect to
element.<X>.refocc missed its second contribution (water, GFN1,
dE/d refocc(H): -0.0036 instead of -0.2259).

In such gaps, the occupations now get the exact linear response to the
electron count (half the softmax of the tails above and of the holes below,
independent of the Fermi energy). Value and all other derivatives are
unchanged. Adds a finite-difference test of the refocc gradient (GFN1, GFN2;
full, implicit) and updates the gap test, which encoded the old zero.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4doYYUUPZf74yA4gR3NQh

This branch was successfully deployed

1 active deployment
codecov — c80cd334 Deployed Oct 5, 2026 by marvinfriede via Upload to Codecov #313
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