Edit3: HemanthHaridas' answer explained why BURAI gave me the result. However, when I opened the same output file using XCrySDen, I got a completely different result (the correct one). So, even though I accepted the answer, I am opening this question again. Since XCrySDen is maintained in a more regular manner than BURAI, I trust the result of XCrySDen cannot understand the discrepancy between XCrySDen result and BURAI result (or alternatively, the result obtained using @HemanthHaridas' explanation).

I was following a youtube tutorial for finding the lattice constant of Si crystal: Project: 3.1 Si crystal constant and density | Quantum Espresso Tutorial 2019. The input file I used is the following:

    calculation = 'vc-relax'
    prefix = 'si'
    etot_conv_thr = 1e-5
    forc_conv_thr = 1e-4
    celldm(1) =14 
 Si  28.0855  Si.pbe-n-rrkjus_psl.1.0.0.UPF
 Si 0.00 0.00 0.00 0 0 0 
 Si 0.25 0.25 0.25 0 0 0
K_POINTS (automatic)
  4 4 4 0 0 0

When I run this, I got the output file which gave me the (almost) correct value for the lattice constant of the Si which I found from the output/log file (5.48 Å). However, inside BURAI GUI, there is a window to view the convergence for geometric convergence which indicates a wrong result as can be seen from the image below. enter image description here

My question is why is the lattice constant converging to a different (wrong) value in the graph, while the output file gives the correct lattice constant (within an error of 1%) after the end of the SCF iteration?

Edit1: The output file espresso.log.opt can be found here. The cell parameters in each step and the volume can be found inside denoted by CELL_PARAMETERS and new unit-cell volume, respectively. To find the cell parameter in Bohr radius, I first divided the cell parameter by 0.5 and then multiplied by alat=14. To convert it to Å, one needs to multiply the Bohr radius by 0.529

Edit2: alat multiplier and the x, y and z axes lengths at each step

 13.999998  0.696568  0.696568  0.696568
 13.999998  0.680759  0.680759  0.680759
 13.999998  0.657046  0.657046  0.657046
 13.999998  0.644397  0.644397  0.644397
 13.999998  0.625422  0.625422  0.625422
 13.999998  0.611748  0.611748  0.611748
 13.999998  0.591238  0.591238  0.591238
 13.999998  0.560472  0.560472  0.560472
 13.999998  0.514324  0.514324  0.514324
 13.999998  0.526698  0.526698  0.526698
 13.999998  0.523420  0.523420  0.523420
 13.999998  0.523121  0.523121  0.523121
 13.999998  0.523121  0.523121  0.523121
  • 2
    $\begingroup$ Welcome to our new community! Could you add the output to your question? $\endgroup$
    – Camps
    Commented Jan 31, 2023 at 10:47
  • 2
    $\begingroup$ It would be great if you could share the cell parameters and volume of the cell at each step as a code block in the question $\endgroup$ Commented Jan 31, 2023 at 12:49
  • $\begingroup$ @Camps, this is the espresso.log.opt file https://rentry.co/w577d/raw $\endgroup$ Commented Feb 1, 2023 at 6:58
  • $\begingroup$ @HemanthHaridas, I edited the question and added the output file that contains all the information such as cell parameters and unit-cell volume at each step. Please see the edited part. $\endgroup$ Commented Feb 1, 2023 at 7:10
  • 2
    $\begingroup$ We allow huge blocks of code in our code blocks, please put the output file there. If it doesn't fit, then you can create a folder called 10324 here and put the file in there. 10324 is the number in this question's URL. $\endgroup$ Commented Feb 1, 2023 at 17:59

1 Answer 1



The results obtained by OP from BURAI has been independently verified to be correct using the attached Python script, and by redoing the calculation with cell vectors and positions set explicitly in units of angstrom. The results from both the calculations converged to the same final structure, as it should.

Unfortunately, OP got confused between primitive and conventional cells. The main issue was that OP is trying to compare the cell parameters from the optimized primitive cell to the cell parameters of the conventional cell. If we transform the optimized primitive cell to a conventional cell, we get a cell parameter of 5.50929172400000 Å which is the value that OP is after (0.5% error compared to the value of 5.48 Å).

Longer answer

Gist of the answer that I had previously written:

The cell parameters that were extracted from the output file that OP had posted are as follows:

The values for celldm(1) and cell parameters in x, y and z in units of angstrom are given below:

  7.408477  5.160506  5.160506  5.160506
  7.408477  5.043389  5.043389  5.043389
  7.408477  4.867713  4.867713  4.867713
  7.408477  4.773997  4.773997  4.773997
  7.408477  4.633422  4.633422  4.633422
  7.408477  4.532122  4.532122  4.532122
  7.408477  4.380172  4.380172  4.380172
  7.408477  4.152247  4.152247  4.152247
  7.408477  3.810360  3.810360  3.810360
  7.408477  3.902034  3.902034  3.902034
  7.408477  3.877742  3.877742  3.877742
  7.408477  3.875530  3.875530  3.875530
  7.408477  3.875530  3.875530  3.875530

The code that was used for the analysis is

from numpy.linalg   import  norm

with open("raw") as f: # give your output file name instead
    fileContents    =   f.readlines()
    for index, line in enumerate(fileContents):
        if "CELL_PARAMETERS" in line:
            reqdlines   =   fileContents[index:index+4]
            multiplier  =   float(reqdlines[0].split()[-1].strip(")"))
            x_axis      =   [float(x) for x in reqdlines[1].split()]
            y_axis      =   [float(x) for x in reqdlines[2].split()]
            z_axis      =   [float(x) for x in reqdlines[3].split()]
            print("{:10.6f}{:10.6f}{:10.6f}{:10.6f}".format(multiplier*0.529177, norm(x_axis)*multiplier*0.529, norm(y_axis)*multiplier*0.529, norm(z_axis)*multiplier*0.529))

Thus, in the previous iteration of question and answer, it was made clear that BURAI is giving the correct answer, and the tutorial that OP was following was wrong.

Since OP is not convinced with the results, I redid the optimization of the Si cell using the same input file, but with the coordinates and cell vectors explicitly provided in units of angstrom.

The cell vectors in x, y and z that were obtained by are as follows:

  5.158930  5.158930  5.158930
  5.039445  5.039445  5.039445
  4.860218  4.860218  4.860218
  4.764030  4.764030  4.764030
  4.619749  4.619749  4.619749
  4.516518  4.516518  4.516518
  4.361672  4.361672  4.361672
  4.129403  4.129403  4.129403
  3.780998  3.780998  3.780998
  3.932265  3.932265  3.932265
  3.900708  3.900708  3.900708
  3.895402  3.895402  3.895402
  3.895658  3.895658  3.895658
  3.895658  3.895658  3.895658

It is clear that the optimization converges to the same structure regardless of whether we use alat or angstrom (which it must ideally).

Just to drive the point home, reproduced below is the output from AFlow.org showing that BURAI output is the correct one.


   0.000000000   2.754645862   2.754645862
   2.754645862   0.000000000   2.754645862
   2.754645862   2.754645862   0.000000000
Cartesian(2) [Si2]
0.000000000   0.000000000   0.000000000
4.131968792   1.377322931   4.131968792


 Real space lattice:
   0.0000e+00  2.7546e+00  2.7546e+00
   2.7546e+00  0.0000e+00  2.7546e+00
   2.7546e+00  2.7546e+00  0.0000e+00
 a b c alpha beta gamma: 3.895657538 3.895657538 3.895657538 60 60 60
 a b c alpha beta gamma: 7.361725291 7.361725291 7.361725291 60 60 60   Bohrs/Degs 
 Volume: 41.8
 c/a = 1
 Bravais Lattice Primitive        = FCC
 Lattice Variation                = FCC
 Lattice System                   = cubic
 Pearson Symbol                   = cF8

Endnote: I strongly suspect that OP is making some mistake in measuring the cell parameters manually, and that is the origin for the confusion.

Edit: I have now identified the origin of the confusion for OP. OP did the calculations in primitive cell, and has the cell parameter value for the conventional cell. Once that transformation is made, we get a value of 5.50929172400000 which is the value that OP is after.

  • $\begingroup$ The values you extracted don't seem to match mine. I will run this again and will add my step-by-step process of how I extracted the lattice constant as an edit to this question. I will let you know tomorrow. Thanks for checking into it. $\endgroup$ Commented Feb 2, 2023 at 14:14
  • $\begingroup$ Hi! I don't understand how you obtained all these values (also the values in the question that you edited). Could you tell me how you got those values? I understand that those values in the question you obtained in unit Bohr, and here in your answer, these are in Angstrom. But I don't understand how you got those values in the first place. $\endgroup$ Commented Feb 4, 2023 at 17:15
  • 1
    $\begingroup$ @Earmen, I have included the code that i used as an edit $\endgroup$ Commented Feb 4, 2023 at 17:19
  • $\begingroup$ My justification is this: from the final CELL_PARAMETERS (line 2320-2332 of the output), I got the value 0.369902398, which I divided by 0.5 (the primitive lattice vector length) and multiplied by 13.999998 (alat) to get the lattice constant in Bohr (See 11:40-12:50 here) $\endgroup$ Commented Feb 4, 2023 at 17:23
  • 1
    $\begingroup$ Just a reminder that if the discussion gets too long in comments, we have a Quantum ESPRESSO chat room available. Please don't click any links that the system gives you, for moving the discussion to chat, since that will create a new chat room, which we don't want. Instead you can just use the already-existing Quantum ESPRESSO chat room. $\endgroup$ Commented Feb 4, 2023 at 17:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .