Symmetry-transformed overlap integrals#134
Merged
stevengj merged 18 commits intoNanoComp:masterfrom Jun 6, 2021
Merged
Conversation
…ween Bloch states of H
…in the d-field instead of the b-field
…ngs unnecessarily
… fields are in a Cartesian basis
…oking get_bfield/get_dfield and add a clearer method description: - compute_symmetry (band function) - compute_symmetries (all bands) Also minor revisions to comments and micro-refactoring.
- The translation component of {W|w}^-1 contains a factor of W^-1
- Previously, nonsymmorphic operations were consequently wrongly implemented
- also add a comment to remind ourselves why the current implementation doesn't work with mpbi + a likely explanation for the origin of the issue
- add a note describing the problem
stevengj
reviewed
Jun 1, 2021
Collaborator
|
Is there any test for this that could be included? |
Contributor
Author
|
We could add a simple test that e.g. checks against regressions for a simple operation, e.g. inversion? E.g., adding something like: (set! resolution 16)
(set! num-bands 6)
(set! output-epsilon (lambda () (print "skipping output-epsilon\n")))
; define a simple geometry with inversion
(set! geometry-lattice (make lattice (size 1 1 1)
(basis1 1 0 0) (basis2 0 1 0) (basis3 0 0 1)))
(set! geometry (list (make sphere
(center 0 0 0) (radius 0.25)
(material (make dielectric (epsilon 13) )))))
; set a k-point whose little group includes inversion
(set! k-points (list (vector3 0.5 0.5 0.5)))
; define inversion as a symmetry operation {W|w}
(define W (matrix3x3 (vector3 -1 0 0) (vector3 0 -1 0) (vector3 0 0 -1)))
(define w (vector3 0 0 0))
(define (print-sym which-band) (print (compute-symmetry which-band W w) "\n"))
; run the calculation
(run print-sym)
; calculate and print symmetry eigenvalues of each band
(print (compute-symmetries W w))to the test suite? (and then of course testing against some hardcoded output) |
Collaborator
|
Yes, that should be fine. |
Contributor
Author
|
There's some tests now and I resolved the |
stevengj
reviewed
Jun 5, 2021
Revert use of `static` for C89 compatibility. Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
stevengj
approved these changes
Jun 5, 2021
Collaborator
|
Looks good. I’m assuming |
Contributor
Author
|
I checked it locally and it passed, yep. |
thchr
added a commit
to thchr/meep
that referenced
this pull request
Feb 7, 2022
…_symmetries` - corresponding MPB PRs: NanoComp/mpb#134 and NanoComp/mpb#100
stevengj
pushed a commit
to NanoComp/meep
that referenced
this pull request
Feb 11, 2022
* pympb ports of of `transform_overlap`, `compute_symmetry`, & `compute_symmetries` - corresponding MPB PRs: NanoComp/mpb#134 and NanoComp/mpb#100 * remove `!SCALAR_COMPLEX` and `HAVE_MPI` related code * remove overlooked stale MPI-specific code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @stevengj,
As I mentioned last week, I've had some code laying around for a while in my fork (and have used it a bunch) which computes the overlap integral of modes under a symmetry operation.
This allows one to easily compute which irrep a given solution transforms like by using the little group operations and character tables (e.g., via Crystalline.jl). I figured this might be interesting to contribute back to your main repo, since it could be of general interest.
The way it works is just to do the integral in the real-space basis: ideally, it could've been done in the plane-wave basis - but it seemed simpler to do in the real-space basis since the transformation of the mode polarization is straightforward there.
It's reasonably fast as-is: I found the cost of evaluating the symmetries to be negligible compared to obtaining the band solutions themselves.
There are some caveats to consider if you think this might be worth merging:
mpband not formpb-mpi,mpbi, ormpbi-mpi. There are some issues in theHAVE_MPIandSCALAR_COMPLEXcases that I haven't managed to get to the bottom of.-Thomas