-
Notifications
You must be signed in to change notification settings - Fork 5
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
Error with CdTe BS #34
Comments
Which task_id did you use? The issue is that some MP calculations didn't use a uniform k-point mesh. They used a custom code to generate the symmetry adapted mesh which was broken and omitted random k-points. PyTASER requires a uniform k-point mesh (symmetry reduced is fine) to calculate the k-point weights. If you don't have a uniform mesh you can't reliably calculate the weights so unfortunately this isn't something we can fix. You have two options:
|
Thanks, @kavanase. It's exciting to know you run the Pytaser with CdTe. We checked several materials, but this k-point mesh uniform issue from the MP band structure is new. Thanks for sharing. |
Thanks both for the quick replies! I just used the I wonder in cases like this if it would be relatively easy to determine the subset of kpoints which form a uniform mesh. E.g. here it seems the reduced 12x12x12 mesh contains a uniform 6x6x6 mesh, which if you make PyTASer use this it seems to run ok (and I'd think the weights should be fine – might just need to be renormalised?), so could it be used? |
I checked again that this issue is still present for CdTe. For now, I've added a warning to the Materials Project tutorial about this (dbe30a0). As mentioned in that last message ☝️ , I think downsampling the kpoint mesh would work as a solution here. I think something like this (in addresses = np.rint((kpoints + shift / (mesh * 2)) * mesh)
for factor in [1,2,3,4,6,8]:
try:
mesh = np.rint(mesh)/factor
...
if n_mapped != n_expected:
raise ValueError(f"Expected {n_expected} points but found {n_mapped}")
break
except ValueError as exc:
if factor == 8:
raise exc to loop over possible uniform subsets of the broken full mesh (e.g. for CdTe would identify the 6x6x6 uniform mesh from the non-uniform 12x12x12 mesh). The kpoint weights would then just need to be renormalised based on the (relative) weights of this reduced uniform mesh, and the |
Hi!
This is a really useful and well put-together package! 🙌 Excited to see how it develops!
I was trying to run this with CdTe, in the same way as the GaAs example notebook, and I'm running into this issue (see attachments). Basically it seems that the MP bandstructure has a down-sampled 12x12x12 mesh (I think), so manually hard-coding the mesh to 6x6x6 works, but the default doesn't.
I've pulled my hair out for a few hours now trying to figure out what was going on here & where it was failing 😅, so I think I've found mostly where the issue is coming from but not how best to fix. Hopefully those who are more familiar with the code will be able to spot/fix the issue quicker!
CdTe_TAS_Error_MWE.ipynb.zip
The text was updated successfully, but these errors were encountered: