def make_input(): inp = AbiInput( pseudos = [ os.path.join(pseudo_dir, "Be.GGA_PBE-JTH.xml"), os.path.join(pseudo_dir, "Mn.GGA_PBE-JTH.xml"), os.path.join(pseudo_dir, "N.GGA_PBE-JTH.xml")], ndtset = 1) equation = ['Be', 'Mn', 'N'] structure = HalfHeusler(equation, 'gamma', a = 12.283218926) inp.set_structure(structure) inp.set_kmesh( shiftk = [ [.5,.5,.5], [.5,.0,.0], [.0,.5,.0], [.0,.0,.5], ], ngkpt = [12,12,12], ) inp.set_vars( ecut = 40, pawecutdg = 60, occopt = 3, nsppol = 2, tsmear = "0.04 eV", nband = 24, ) spins = [] for element in structure: if element.specie.symbol == 'Mn': spins.append([0.,0.,3.]) else: spins.append([0.,0.,0.]) inp.set_vars(spinat = spins) return inp
#!/usr/bin/env python from __future__ import division import abipy.data as data from abipy.htc.input import AbiInput inp = AbiInput(pseudos=data.pseudos("14si.pspnc"), ndtset=2) structure = inp.set_structure_from_file(data.cif_file("si.cif")) inp.set_kmesh(ngkpt=[4,4,4], shiftk=[0,0,0], dtset=1) inp.set_kpath(ndivsm=5, dtset=2) #inp.set_kpath(ndivsm=5, kptbounds=[[0,0,0], [0.5, 0.0, 0.0]], dtset=2) # Global variables inp.ecut = 10 # Dataset 1 inp.tolvrs1 = 1e-9 # Dataset 2 inp.tolwfr2 = 1e-18 inp.getden2 = -1 print(inp)