aiidateam / aiida-quantumespresso

The official AiiDA plugin for Quantum ESPRESSO
https://aiida-quantumespresso.readthedocs.io
Other
55 stars 82 forks source link

`PwCalculation`: Incorrect exit message for `ERROR_CHARGE_IS_WRONG` #976

Open mbercx opened 1 year ago

mbercx commented 1 year ago

Just noticed this beautiful copy-pasta:

https://github.com/aiidateam/aiida-quantumespresso/blob/7a303f9e10ff6dd9eae652b4f2d8ad2c482022d6/src/aiida_quantumespresso/calculations/pw.py#L155-L156

That apparently has managed to avoid being spotted for over 4 years, since it was added in https://github.com/aiidateam/aiida-quantumespresso/commit/4fc9e12826ed79ce5fe4c04d79259b8b9a3f82d4. ^^

@sphuber do you remember what "charge is wrong" means, specifically? I'm assuming that QE knows the number of valence electrons, and when the integrated charge density doesn't match this number this error pops up?

sphuber commented 1 year ago

Something like that, I am not a 100% sure on the details either. Here is the example output:

     WARNING: integrated charge=     0.00003902, expected=   114.00000000

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     Error in routine electrons (1):
     charge is wrong
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

     stopping ...