# -*- coding: utf-8 -*-
# imports here
import numpy as np
#
# Pymatgen imports
import pymatgen as mg
from pymatgen.io import vasp as vaspio
__copyright__ = u'Copyright © 2016, Mario Zic. All Rights Reserved.'
__contact__ = u'mario.zic.st_at_gmail.com'
# main body below
# === Prepare Input ===
# INCAR
incar_dict = {
"NPAR": 24,
"NELM": 2,
"ISTART": 0,
"ICHARG": 2,
"MAGMOM": "5.0 -5.0 0.0",
"IBRION": -1,
"NSW": 0,
"ISIF": 2,
"NBANDS": 72, # you may want to change this
"ISPIND": 2,
"ISPIN": 2,
"ISYM": 1,
"LWAVE": ".FALSE.",
"LCHARG": ".TRUE.",
"PREC": "Accurate",
"ENCUT": 300,
"EDIFF": 1e-06,
"ALGO": "Fast",
"ISMEAR": 1,
"SIGMA": 0.05
}
incar = vaspio.Incar(incar_dict)
# POSCAR
lattice_constant = 5.97
lattice = lattice_constant * np.array([
[0.0, 0.5, 0.5],
[0.5, 0.0, 0.5],
[0.5, 0.5, 0.0]
])
lattice = mg.Lattice(lattice)
struct = mg.Structure(
lattice,
[Mn, Mn, Ga],
# site coords
[[0.00, 0.00, 0.00], [0.25, 0.25, 0.25], [0.50, 0.50, 0.50]]
)
poscar = vaspio.Poscar(struct, comment='cubic Mn2Ga')
# POTCAR
# Note: for this to work Pymatgen needs to have an access to VASP pseudopotential directory
potcar = vaspio.Potcar(symbols=['Mn_pv', 'Mn_pv', 'Ga_d'], functional='PBE')
# KPOINTS
kpoints = vaspio.Kpoints.monkhorst_automatic(
kpts=(10, 10, 10), shift=(0.0, 0.0, 0.0)
)