c2x, PWscf and spin

From version 2.26 of c2x, the Quantum Espresso support is sufficient for the following example.

Starting with the FeO.cell file in the corresponding Castep example, most of a pwcsf .in file can be created with

$ c2x --qef FeO.cell FeO.in

FeO.in

&CONTROL
  calculation = 'scf',
  outdir = '.',
  pseudo_dir = '.'
/
&SYSTEM
  ibrav = 0,
  nat   = 4,
  ntyp = 3,
  nspin = 2,
  starting_magnetization(1) = 0.000000,
  starting_magnetization(2) = 2.000000,
  starting_magnetization(3) = -2.000000,
  ecutwfc = 10
/
&ELECTRONS
/

CELL_PARAMETERS angstrom
  0.0000000   4.3320000   4.3320000
  2.1660000   0.0000000   2.1660000
  2.1660000   2.1660000   0.0000000

ATOMIC_SPECIES
  O    1.0   O.UPF
  Fe   1.0   Fe.UPF
  Fe1  1.0   Fe.UPF

ATOMIC_POSITIONS crystal
  O   0.250000000  0.500000000  0.500000000
  O   0.750000000  0.500000000  0.500000000
 Fe   0.000000000  0.000000000  0.000000000
 Fe1  0.500000000  0.000000000  0.000000000

K_POINTS crystal
  9
[...]

This needs one modification to be a fully-valid pwscf input file: add

  occupations='smearing', degauss=0.01,

as the penultimate line in the &SYSTEM card. And to make it a sensible input file, change ecutwfc to 30.0.

One can then download suitable pseudopotentials:

$ curl -o Fe.UPF https://www.quantum-espresso.org/upf_files/Fe.pz-nd-rrkjus.UPF
$ curl -o O.UPF https://www.quantum-espresso.org/upf_files/O.pz-rrkjus.UPF

and run pwcsf

$ pw.x --in FeO.in  > FeO.log

Visualisation

Now one can analyse and visualise the results. In this case we choose to expand the system back to a cubic cell.

$ c2x -sv -X='(8.664,0,0)(0,8.664,0)(0,0,8.664)' pwscf.xml FeO.spin.xsf
QE binary reader called
grid extent in file -20:20,-10:10,-10:10
FFT grid used 45x24x24
Cell volume 40.647642
natoms      4
Total ionic charge 28.000000
Requested cut-off energy 408.171 eV
First FFT grid     45 24 24
spins=2   spinors=1
Found 3D data for Spin
  min=-4.36384  max=4.36589  sum=-0.208443  int=-0.00032688
  (integral is e per cell for charge and spin densities)
New cell volume 0.001538 (0.0625 times old)
Warning: unable to convert k points to new cell
New cell volume 650.362259 (16 times old)
New FFT grid is 72 72 72

Note that the spin density has its maximum and minimum of almost equal magnitude, and opposite sign.

FeO and spin density

Again alternating layers of spin clearly seen, and this time the cubic nature of the lattice is more apparent.