-
Notifications
You must be signed in to change notification settings - Fork 15
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
Check why PDOS sometimes skips the first semicore, and why PDOS and DOS are different #959
Comments
@giovannipizzi @cpignedoli: Did you use the "fast" protocol for the calculations? According to the protocol in the PdosWorkFlow, when using the "precise" protocol, the parameter DeltaE is set to 0.01, whereas for the "fast" protocol, DeltaE is set to 0.1. Would it make sense to create a widget in the PDOS Settings tab that allows users to set the energy_grid_step for DOS and PROJWFC calculations? This would allow users to easily visualize and adjust the values as needed. |
Thanks a lot @AndresOrtegaGuerrero. I was not aware of the setting 0.01 for precise protocol. Thus I wonder if it still makes sense or not to have the default to 0.01. Maybe we should simply warn the user that with the fast protocol... and we can suggest setting the energy_grid_step to 0.01 in the Au exercise if we agree on adding the widget. @giovannipizzi what would you suggest? |
Since calculations are fast I would put 0.01 as a default for all, possibly comparing the Dos with even smaller value for precise (compare runtime, file size, accuracy of results). If there is time ok to add a widget in the advanced settings (otherwise put as an issue for the next round, I would eventually do it, but there are other more urgent issues to fix first) |
The issue of PDOS and DOS being different was not solved, and changing the energy grid to skip the first semi core was just a workaround. Therefore I'm reopening this issue, with additional investigation that might point to an actual solution.
This gives rise to the discrepancy between the DOS. This is shown in the plot below: If instead we use the I would guess that if we specify
Proposed solutionTherefore, here is my proposed solution:
I suggest to go ahead with 1 now, and possibly evaluate 2 with lower priority (priority P1 in the QE app demo project). Note: I didn't check other details, e.g. the actual PDOS channels being lower than the total DOS etc, but the results above make me confident that my suggested solution will solve the problem. Moreover, the tetrahedra_opt does see a peak for the semi core flat band, so this also seems to solve that issue (at least in my simple test) |
A few notes:
|
great @giovannipizzi . For your point 2) in "proposed solution" I am not an expert in DOS, I always focused on bandstructures in my calculations. I would directly check with Nicola about what should be done. It would be great if we could skip the dos.x calculation. |
Great @giovannipizzi, I will make the changes you suggested in the aiida-quantumespresso plugin and test it. |
@giovannipizzi , @t-reents there is also this issue for projwfc.x in aiida-quantum espresso , aiidateam/aiida-quantumespresso#1041 , if dos.x calculation is removed we need to get the total_pdos for magnetic systems to be properly parsed |
I commented there, if that's the only blocking step, let's just fix the parser |
I was wondering @superstar54 , should we set tetrahedral_opt for projwfc.x and dos.x calculations in aiidalab-qe as a provisional solution while we wait for the changes in aiida-qe plugin ? |
@AndresOrtegaGuerrero We're looking at this at the moment, but was this actually done? Can't remember why I closed it. |
I didnt work on this, i was not around. I still have the same question of what is the decision to solve this @giovannipizzi. "should we set tetrahedral_opt for projwfc.x and dos.x calculations in aiidalab-qe as a provisional solution while we wait for the changes in aiida-qe plugin ?" |
I think that, if there is a workaround in aiidalab qe for now, we should do it for this release, so yes, let's use the opt version for tetrahedra in the app. Let's also open another issue not to forget to do the actual fix, afterwards. At least we avoid getting Dos and pdos that don't match |
ok , so to clarify, @giovannipizzi we will set 'tetrahedra_opt' in the nscf calculation |
Yes, but please double check that those two changes indeed produce the expected result (try gold with the fast protocol, i.e. the in app guide that edan prepared, since it will be the first thing that everybody will do and at least that should work) |
@giovannipizzi , i cannot do this change at the aiidalab qe level, i tried but to set these options there must be PR in quantum espresso plugin , since nscf doesnt allow occupations different than tetrahedra def validate_nscf(value, _):
"""Validate the nscf parameters."""
parameters = value['pw']['parameters'].get_dict()
if parameters.get('CONTROL', {}).get('calculation', 'scf') != 'nscf':
return '`CONTOL.calculation` in `nscf.pw.parameters` is not set to `nscf`.'
if parameters.get('SYSTEM', {}).get('occupations', None) != 'tetrahedra':
return '`SYSTEM.occupations` in `nscf.pw.parameters` is not set to `tetrahedra`.' and for dos calculations it doesn allow bz_sum since the get_parameter_schema doesnt allow bz_sum def get_parameter_schema():
"""Return the ``PdosWorkChain`` input parameter schema."""
return {
'$schema': 'http://json-schema.org/draft-07/schema',
'type': 'object',
'required': ['DeltaE'],
'additionalProperties': False,
'properties': {
'Emin': {
'description': 'min energy (eV) for DOS plot',
'type': 'number'
},
'Emax': {
'description': 'max energy (eV) for DOS plot',
'type': 'number'
},
'DeltaE': {
'description': 'energy grid step (eV)',
'type': 'number',
'minimum': 0
},
'ngauss': {
'description': 'Type of gaussian broadening.',
'type': 'integer',
'enum': [0, 1, -1, -99]
},
'degauss': {
'description': 'gaussian broadening, Ry (not eV!)',
'type': 'number',
'minimum': 0
},
}
} def validate_dos(value, _):
"""Validate DOS parameters.
- shared: Emin | Emax | DeltaE
- dos.x only: ngauss | degauss | bz_sum
- projwfc.x only: ngauss | degauss | pawproj | n_proj_boxes | irmin(3,n_proj_boxes) | irmax(3,n_proj_boxes)
"""
jsonschema.validate(value['parameters'].get_dict()['DOS'], get_parameter_schema()) |
Update November 26
We should set the default deltaE of DOS (and PDOS) to 0.01. This will reduce the probability to encounter the problem and "fix" the case of Au as tested by Michail Minotakis.
We should expose in advanced settings deltaE in case a user would prefer a different default.
We should still report the issue to QE developers
BELOW info from November 19
Two notes:
the output of QE also has the integral of the DOS/PDOS: its derivative does not miss the first state.
For the difference between DOS and PDOS, of course they are different in the high conduction bands, but can we check why in the valence they are different? Different method, just different smearing, ...?
Some additional comments from @cpignedoli and @giovannipizzi investigation:
Issue to better understand in QE:
Restarted by hand, changing Emin in the energy range to start at lower E: it cures a little bit, but still bug:
Note from above: the integral actually “sees” something of the peak (even if the DOS and the derivative of the integral do not match exactly, which is more accurate? Should we show by default the derivative of the integral instead? Is it possible also for the PDOS?)
The text was updated successfully, but these errors were encountered: