Goal

Define the physically identical system of E1 using ibrav=0 and an explicit CELL_PARAMETERS card, verify the equivalence through the total energy, and internalize the coordinate options (alat/crystal/angstrom). Every generator (ASE and friends) emits this format, so you must be able to read it.

New cards and variables

Item Role
ibrav = 0 Declares an explicit cell
CELL_PARAMETERS (angstrom) Three cell vectors as rows
ATOMIC_POSITIONS (crystal) Fractional coordinates: structure decoupled from cell

Input file

Download si_ibrav0.scf.in

! E02: the same crystal as E01, written with an explicit cell.
! This is exactly the format that structure generators (ASE, pymatgen) emit.

&CONTROL
  calculation = 'scf'
  prefix      = 'si_ibrav0'   ! separate prefix so E01's files are untouched
  outdir      = './tmp/'
  pseudo_dir  = './pseudo/'
  verbosity   = 'high'
/
&SYSTEM
  ibrav       = 0             ! cell given explicitly below
  nat         = 2
  ntyp        = 1
  ecutwfc     = 30            ! identical basis settings to E01,
  ecutrho     = 240           ! so the energies are directly comparable
  occupations = 'fixed'
/
&ELECTRONS
  conv_thr    = 1.0d-8
/

ATOMIC_SPECIES
  Si  28.0855  Si.pbe-n-kjpaw_psl.1.0.0.UPF

! the three fcc primitive vectors as rows, in Angstrom.
! 2.715 = a/2 with a = 5.430 A; note E01's celldm(1)=10.26 bohr is 5.4293 A,
! so the two inputs differ in the 4th digit of a (visible in the energy).
CELL_PARAMETERS (angstrom)
  -2.715   0.000   2.715
   0.000   2.715   2.715
  -2.715   2.715   0.000

! fractional ('crystal') coordinates: independent of the cell size,
! the safest choice in practice
ATOMIC_POSITIONS (crystal)
  Si  0.00  0.00  0.00
  Si  0.25  0.25  0.25

K_POINTS (automatic)
  8 8 8  0 0 0

Run

mpirun -np 6 pw.x -nk 6 -in si_ibrav0.scf.in > si_ibrav0.scf.out

What to check: the measured comparison

Item E1 (ibrav=2) E2 (ibrav=0)
Total energy −93.45273690 Ry −93.45274992 Ry
Sym. Ops. 48 (with inversion) 48 (with inversion)
  • Symmetry detection found all 48 operations in both cases. A cleanly written CELL_PARAMETERS does not necessarily lose symmetry (it can in general, so always check).
  • The energies differ by 1.3×10⁻⁵ Ry (0.09 meV/atom): not an exact match. The cause is not the syntax but rounding in the lattice constant: E1's celldm(1)=10.26 bohr is 5.4293 Å, while E2's cell (half-vectors of 2.715 Å) is exactly 5.4300 Å. Writing "the same structure" twice requires matching the unit conversion to full precision, which is a lesson in itself.

Exercises

  1. Switch CELL_PARAMETERS from angstrom to alat, introducing celldm(1). With celldm(1)=10.2614 (= 5.4300 Å), does the energy now match E2 to all digits?
  2. Convert ATOMIC_POSITIONS (crystal) to (angstrom) and confirm the total energy is unchanged.
  3. Perturb one cell-vector component by 0.001 Å. How far does the Sym. Ops. count drop, and how many irreducible k-points do you get?
Common mistakes

With ibrav=0 and a celldm(1) both present, a CELL_PARAMETERS card without a unit option is interpreted in alat units (that is, scaled by celldm(1)). Always write the unit explicitly. The full coordinate conventions are in Chapter 03.

03 Units and coordinates · 02 Input file structure