[QE-developers] DFT + U / hp.x code: Problem computing Hubbard U if element in chi0 matrix has 3 digits in front of comma

Iurii TIMROV iurii.timrov at epfl.ch
Thu Jul 8 17:48:22 CEST 2021


Dear Johannes,


Try simply to add a space between 1.630110720512887 and -10.412346555519138 and repeat the last step of the HP calculation.


In order to avoid having this problem in your future calculations, you need to modify a routine "hp_write_chi_full.f90" in HP/src on lines 40 and 45. Namely, replace line 40 by this

WRITE(iunitchi,'(1x,5f20.15)') (chi0(na,nb), nb=1,nath)

and line 45 by this

WRITE(iunitchi,'(1x,5f20.15)') (chi(na,nb), nb=1,nath)

Here we simply changed 5f19.15 to 5f20.15, i.e. the code will write numbers in a file in a format such that there are 15 digits after the point and 20-15=5 digits in front (including the point), i.e. 4 digits before the point. So we increased 19 to 20 in order to have an empty space occupying the very first position (i.e. before the minus sign in your case). I hope this explanation is clear enough. To be safe, you can increase even further, e.g. to 5f22.15 (note that the number 5 in front of the letter "f" means that the format "f22.15" is applied to 5 numbers, i.e. 5 chi matrix elements are printed in a row).


The fact that you have this problem suggests that there can be issues with your calculation. Your system contains Cu, and this element is tricky because it may be that the 3d shell in Cu is completely filled - in this case, the HP code will give unphysically large values of Hubbard U. Note that the HP code (linear response as it is implemented now) has a limitation: it should not be applied to closed-shell systems (please check this paper: J. Chem. Phys. 140, 121105 (2014)).


Thanks for reporting this issue! Next time it would be great if you open an issue on Gitlab:

https://gitlab.com/QEF/q-e/-/issues


HTH


Greetings,

Iurii



--
Dr. Iurii TIMROV
Senior Research Scientist
Theory and Simulation of Materials (THEOS)
Swiss Federal Institute of Technology Lausanne (EPFL)
CH-1015 Lausanne, Switzerland
+41 21 69 34 881
http://people.epfl.ch/265334
________________________________
From: developers <developers-bounces at lists.quantum-espresso.org> on behalf of Johannes Meusburger - STFC UKRI <Johannes.Meusburger at stfc.ac.uk>
Sent: Thursday, July 8, 2021 5:03:14 PM
To: developers at lists.quantum-espresso.org
Subject: [QE-developers] DFT + U / hp.x code: Problem computing Hubbard U if element in chi0 matrix has 3 digits in front of comma

Reports of bugs or unexpected behavior MUST include:
1. QE version 6.7-foss-2019b
2. Main hardware and compilation information   AMD Epyc 7502 32 cores / 256 GB RAM/ OpenMPI/3.1.4-GCC-8.3.0
3. input data and pseudopotential files, or (better) links to them
Google drive: https://drive.google.com/drive/folders/1pIawUE7HooO1UqJT1kErZ_vff-jIpZnE?usp=sharing
3.1. Optionally, output file(s), especially if execution time is long or if they contain useful information
Google drive: https://drive.google.com/drive/folders/1pIawUE7HooO1UqJT1kErZ_vff-jIpZnE?usp=sharing
4. ALL information needed to reproduce the problem:


Dear QE developers,
I have been trying to compute the Hubbard U values for two symmetrically independent copper sites in CuSO4 x 5H2O (all input+output+pseudopotential files can downloaded from this folder:https://drive.google.com/drive/folders/1pIawUE7HooO1UqJT1kErZ_vff-jIpZnE?usp=sharing).  The calculations for a 2 x 1 x 2 q-grid completed without any issues. For the 3 x 2 x 3 q-grid, however, I managed to compute all q-points but the final compute_hp step always kept on crashing and I received following error message from the cluster:

"At line 239 of file hp_postproc.f90 (unit = 98, file = '/home/vol06/scarf906/CS5H/Convergence_testing/SSSP/Ucalc_3_2_3_merge/HP/CS5H.chi.dat')
Fortran runtime error: Bad real number in item 1 of list input
Error termination. Backtrace:
#0  0x2b35ceca9708 in read_real
at ../../../libgfortran/io/list_read.c:2026
#1  0x2b35cecabaed in list_formatted_read_scalar
at ../../../libgfortran/io/list_read.c:2180
#2  0x418d33 in ???
#3  0x40d05c in ???
#4  0x40c77c in ???
#5  0x2b35cfcb7554 in ???
#6  0x40c7a5 in ???
#7  0xffffffffffffffff in ???"

I had a look at the CS5H.chi.dat file and it contains following line (marked in bold, just first 4 lines shown for the sake of brevity)

         chi0 :
  -4.680510845057160  1.630102927497870
   1.630110720512887-10.412346555519138
   0.061548562716948 -0.569923297074040
   0.309390139567641  0.519384613429163

As you can see in row two there is no space between the 1.630110720512887 and -10.412346555519138. I have manually deleted the minus sign in front of 10.412346555519138 (in the CS5H.chi.pert_2 file) and tried to compute the hubbard U value again and this time the calculations finished without any problems. Having a look at the CS5H.chi.dat file there was now a space in between the rows:

         chi0 :
  -4.680510845057160  1.630102927497870
   1.630110720512887 10.412346555519138
   0.061548562716948 -0.569923297074040
   0.309390139567641  0.519384613429163


Just to find out where this problem might stem from I have changed the -10.412346555519138 (in the CS5H.chi.pert_2 file) to 100.412346555519138 and again there is no space in between the two rows and the same error occurs.

         chi0 :
  -4.680510845057160  1.630102927497870
   1.630110720512887100.412346555519138
   0.061548562716948 -0.569923297074040
   0.309390139567641  0.519384613429163

To sum up, I think this problem stems from there being three digits in front of the comma for an entry in the chi matrix with the third digit replacing the space in between the rows.

As a possible workaround I have tried to get rid of a digit after the comma of the 1.630110720512887 entry by rounding it to --> 1.63011072051289 in the in the CS5H.chi.pert_1 file:

      row  column  chi0 matrix elements
       1     1    -4.680510845057160
       2     1     1.630110720512887
       3     1     0.061548562716948
       4     1     0.309390139567641

changed to

      row  column  chi0 matrix elements
       1     1    -4.680510845057160
       2     1     1.63011072051289
       3     1     0.061548562716948
       4     1     0.309390139567641

Unfortunately, this did not resolve the problem and the columns are still not separated in the CS5H.chi.dat file:

      chi0 :
  -4.680510845057160  1.630102927497870
   1.630110720512890-10.412346555519138
   0.061548562716948 -0.569923297074040
   0.309390139567641  0.519384613429163

Many thanks for all of your work on the hp.x code and in advance for your efforts in resolving this issue.

All the best,

Johannes
____________________________________________________________
Johannes Meusburger
ISIS Neutron and Muon Source/Diamond Light Source/University of Exeter
johannes.meusburger at stfc.ac.uk



This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to UKRI business are solely those of the author and do not represent the views of UKRI.

_______________________________________________
developers mailing list
developers at lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20210708/5093b2c3/attachment-0001.html>


More information about the developers mailing list