Skip to content

fix symmetry reduction for force#3165

Open
stevengj wants to merge 3 commits intomasterfrom
force_symmetry
Open

fix symmetry reduction for force#3165
stevengj wants to merge 3 commits intomasterfrom
force_symmetry

Conversation

@stevengj
Copy link
Collaborator

@stevengj stevengj commented Mar 7, 2026

Fixes #129, following discussion in #3161.

The fix is to add an optional second "conjugate" component cc to a volume_list whose phase (conjugated) is included in symmetry reductions via reduce. For the force calculations, cc is set according to the normal_direction.

cc @oskooi — this PR is just a rough draft right now, and could use a test (e.g. copied from #3161).

@stevengj
Copy link
Collaborator Author

stevengj commented Mar 7, 2026

I copied over the test from the other PR. Would be good to double-check that it fixes the original test case in #129.

@oskooi
Copy link
Collaborator

oskooi commented Mar 8, 2026

The fix proposed in this PR (ceff208) does not produce the expected result of zero force for the test involving an Ez dipole in 2d vacuum. (The test is based on the one provided in #129 and transcribed from Scheme to Python. The simulation layout is shown below.) Running the test script with the --with-symmetry flag (mirror symmetry in $x$ and $y$) produces an incorrect force of 0.07380557. The result is -1.0482879755219221e-17 without symmetries (which is correct).

Additionally, using only a mirror symmetry in $x$ produces the correct result . However, a $y$ mirror symmetry produces 0.07380557 which is incorrect. This suggests there is a bug in the $y$ mirror-symmetry case.

force_layout

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.

fields instability when combining dft forces with symmetry objects

2 participants