I am trying to create the espresso input for magnetic calculation, reading the data from a cif file.
The ase code for the same is:
# Input
# Reading Input from CIF
filename = args.cif
system = aio.read(filename)
# Adding the magmom
system.magmom = [3]
print(system.magmom)
# vcrelax
input_data = {
'calculation': 'vc-relax',
'outdir': odir,
'occupations': 'smearing',
'degauss': 0.05,
'nspin': 2,
'smearing': 'gaussian',
"starting_magnetization(1)": 3.0
}
calc = Espresso(pseudopotentials=pseudo_list,
pseudo_dir=pseudodir,
input_data=input_data,
crystal_coordinates=True,
tstress=True,
tprnfor=True,
kpts=(6, 6, 6))
system.calc = calc
print(system.get_potential_energy())
I am expecting the generated input with 'starting_magnetization(1)=3', But I am getting the input as:
&SYSTEM
starting_magnetization(1) = 0.0
occupations = 'smearing'
degauss = 0.05
smearing = 'gaussian'
nspin = 2
ntyp = 1
nat = 2
ibrav = 0
/
Hence, my scf is showing 0 absolute magnetizations.
How I can use ase to create a proper spin-DFT input for QE using ASE?