#Prepare the new simulation locally os.system("mkdir %s" % stage2) os.system("cp %sPOTCAR %s" % (stage1, stage2)) #For DOS calculations. #os.system("cp %sINCAR_dos %sINCAR"%(local,stage2)) #os.system("cp %sKPOINTS_dos %sKPOINTS"%(local,stage2)) #For precision structure refinement. (useful for Enthalpy vs Pressure) #======= incar = open("%s/INCAR" % stage1, "r").readlines() incarprecise = open("%s/INCAR" % stage2, "w") for line in incar: #need to change encut ? if "PREC" in line: line = "PREC = HIGH" incarprecise.write(line) #======= os.system("cp %s/KPOINTS %s" % (stage1, stage2)) outcar2poscar.outcar2poscar(stage1, "%sPOSCAR" % stage2, -1) #Upload gmice_up.dir(stage2, remotedir) #Run! gmice_run.vasp(remotedir + stage2, stage2[:15].strip("/"), 8)
os.system("mkdir %s"%stage2) os.system("cp %sPOTCAR %s"%(stage1,stage2)) #For DOS calculations. #os.system("cp %sINCAR_dos %sINCAR"%(local,stage2)) #os.system("cp %sKPOINTS_dos %sKPOINTS"%(local,stage2)) #For precision structure refinement. (useful for Enthalpy vs Pressure) #======= incar=open("%s/INCAR"%stage1,"r").readlines() incarprecise=open("%s/INCAR"%stage2,"w") for line in incar: #need to change encut ? if "PREC" in line: line="PREC = HIGH" incarprecise.write(line) #======= os.system("cp %s/KPOINTS %s"%(stage1,stage2)) outcar2poscar.outcar2poscar(stage1,"%sPOSCAR"%stage2,-1) #Upload gmice_up.dir(stage2,remotedir) #Run! gmice_run.vasp(remotedir+stage2,stage2[:15].strip("/"),8)
open(kpointfil) except IOError: print "Error: Unable to locate initial KPOINT file." exit(0) os.mkdir(finaldir) comm = ['cp', initdir + "INCAR", finaldir + "INCAR"] os.spawnvpe(os.P_WAIT, 'cp', comm, os.environ) #comm=['cp',initdir+"POSCAR",finaldir+"POSCAR"] #os.spawnvpe(os.P_WAIT, 'cp', comm, os.environ) comm = ['cp', initdir + "POTCAR", finaldir + "POTCAR"] os.spawnvpe(os.P_WAIT, 'cp', comm, os.environ) comm = ['cp', kpointfil, finaldir + "KPOINTS"] os.spawnvpe(os.P_WAIT, 'cp', comm, os.environ) #Change INCAR to highest accuracy and set NSW to 0 incar = open(finaldir + "INCAR", "r").readlines() for i in range(len(incar)): if "PREC" in incar[i]: incar[i] = "PREC = high\n" if "IBRION" in incar[i]: incar[i] = "IBRION = -1\n" if "NSW" in incar[i]: incar[i] = "NSW = 0\n" open(finaldir + "INCAR", "w").writelines(incar) #Make the new POSCAR from the selected configuration in the OUTCAR outcar2poscar.outcar2poscar(initdir + "OUTCAR", finaldir + "POSCAR", configNum)
open(kpointfil) except IOError: print "Error: Unable to locate initial KPOINT file." exit(0) os.mkdir(finaldir) comm=['cp',initdir+"INCAR",finaldir+"INCAR"] os.spawnvpe(os.P_WAIT, 'cp', comm, os.environ) #comm=['cp',initdir+"POSCAR",finaldir+"POSCAR"] #os.spawnvpe(os.P_WAIT, 'cp', comm, os.environ) comm=['cp',initdir+"POTCAR",finaldir+"POTCAR"] os.spawnvpe(os.P_WAIT, 'cp', comm, os.environ) comm=['cp',kpointfil,finaldir+"KPOINTS"] os.spawnvpe(os.P_WAIT, 'cp', comm, os.environ) #Change INCAR to highest accuracy and set NSW to 0 incar=open(finaldir+"INCAR","r").readlines() for i in range(len(incar)): if "PREC" in incar[i]: incar[i]="PREC = high\n" if "IBRION" in incar[i]: incar[i]="IBRION = -1\n" if "NSW" in incar[i]: incar[i]="NSW = 0\n" open(finaldir+"INCAR","w").writelines(incar) #Make the new POSCAR from the selected configuration in the OUTCAR outcar2poscar.outcar2poscar(initdir+"OUTCAR",finaldir+"POSCAR",configNum)