#
# Author: Henrique Pereira Coutada Miranda
# Run a Silicon groundstate calculation using Quantum Espresso
#
from __future__ import print_function, division
import sys
import argparse
from qepy import *
from schedulerpy import *
from math import sqrt

kpoints      = [6,6,1]
kpoints_nscf = [6,6,1]
kpoints_double = [24,24,1]
qpoints = [3,3,1]
layer_separation = 12
pw = 'pw.x'
ph = 'ph.x'
q2r = 'q2r.x'
matdyn = 'matdyn.x'
prefix = 'bn'

npoints = 10 
p = Path([ [[0.0, 0.0, 0.0],'$\Gamma$'],
           [[0.5, 0.0, 0.0],'M'],
           [[1./3,1./3,0.0],'K'],
           [[0.0, 0.0, 0.0],'$\Gamma$']], [int(npoints*2),int(npoints),int(sqrt(5)*npoints)])

# scheduler
scheduler = Scheduler.factory

# create the input files
def get_inputfile():
    """ Define a Quantum espresso input file for boron nitride
    """ 
    qe = PwIn()
    qe.set_atoms([['N',[0.0,0.0,0.5]],
                  ['B',[1/3,2/3,0.5]]])