#!/bin/bash

PWSCF=/usr/bin

for ((ia=-4; ia<=4; ia+=1)) do
	#a=$(echo "scale=3; 4.600 + $ia/20.0" | bc -l)
	a=$(echo $ia | awk '{printf ("%5.3f", 4.600 + $1/20.0)}')
	echo $a
	sed "s/4.602/$a/g" graphene.scf.in > graphene_${a}.scf.in
	$PWSCF/pw.x < graphene_${a}.scf.in > graphene_${a}.scf.out
done
