Skip to content
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

python: store group velocities and fields at every k-point #132

Open
mahar opened this issue Jan 31, 2021 · 0 comments
Open

python: store group velocities and fields at every k-point #132

mahar opened this issue Jan 31, 2021 · 0 comments

Comments

@mahar
Copy link

mahar commented Jan 31, 2021

Hello,

I am trying to calculate and store in arrays the fields and group velocities at every k-point.
Probably I don't understand exactly the way the band functions are working.

Currently, I am using the following code (and add more k-points manually

efieldsG = []
groupVelocG = []
efieldsX = []
groupVelocX = []

def get_efieldsG(ms,band):
    efieldsG.append(ms.get_efield(band,bloch_phase=True))
    groupVelocG.append(ms.compute_one_group_velocity(band))

def get_efieldsX(ms,band):
    efieldsX.append(ms.get_efield(band,bloch_phase=True))
    groupVelocX.append(ms.compute_one_group_velocity(band))

ms.run_tm(mpb.output_at_kpoint(G,mpb.fix_efield_phase,get_efieldsG),
          mpb.output_at_kpoint(X,mpb.fix_efield_phase,get_efieldsX))

Thank you

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

No branches or pull requests

1 participant