-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symmetry-transformed overlap integrals #134
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
Is there any test for this that could be included? |
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) |
Yes, that should be fine. |
There's some tests now and I resolved the |
Revert use of `static` for C89 compatibility. Co-authored-by: Steven G. Johnson <[email protected]>
Looks good. I’m assuming |
I checked it locally and it passed, yep. |
…_symmetries` - corresponding MPB PRs: NanoComp/mpb#134 and NanoComp/mpb#100
* 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
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:
mpb
and not formpb-mpi
,mpbi
, ormpbi-mpi
. There are some issues in theHAVE_MPI
andSCALAR_COMPLEX
cases that I haven't managed to get to the bottom of.-Thomas