Exemplo n.º 1
0
        
        #ibest = 17 ###################TEMP  ONLY !!!!!!!!!!!!!!!!!!!!!
        writeEnergiesOszicar(dirsfull) 
        writefermi(dirsfull) #skip so don't have to read it every time
        writedirnames(dirsfull)
        writeNkIBZ(dirsfull)
        #writeNk(dirsfull)
        writeElConverge(dirsfull)
        writeElSteps(dirsfull)
        writeCPUtime(dirsfull)
        parts = enerparts(dirsfull)
        dets = getdata(dirsfull,'detL') #supercell volume in terms of unit cell volume
        dets = [float(dets[i]) for i in range(len(dets))]
        NkfullBZ = getdata(dirsfull,'detM') #Nk without symmetry reduction
        lattypes = getdata(dirsfull,'lattype')
        ms = array(getms(dirsfull),dtype = int)
        
        filesstructselect = sorted([f for f in os.listdir(os.getcwd())])

        #os.chdir(mainDir)
        
        file = open(tempdir+'energies','r')
        energies = nstrip(file.readlines())
        file.close()
        os.system('mv %s %s' % ('energies', 'energies'+structi))
        
        file = open(tempdir+'efermi','r')
        efermis = nstrip(file.readlines())
        file.close()
        os.system('mv %s %s' % ('efermi', 'efermi'+structi))
                   
Exemplo n.º 2
0
        [mmax, ibest] = getibest(dirs)
        print 'energy of structure 1, multiplier %i, index %i used as ebest' % (mmax, ibest)
        writeEnergiesOszicar(dirs) 
#        writefermi(dirs) #skip if don't want to read it every time
        writedirnames(dirs)
        writeNkIBZ(dirs)
        #writeNk(dirs)
        writeElConverge(dirs)
        writeElSteps(dirs)
        writeCPUtime(dirs)
        parts = enerparts(dirs)
        dets = getdata(dirs,'detL') #supercell volume in terms of unit cell volume
        dets = [float(dets[i]) for i in range(len(dets))]
        NkfullBZ = getdata(dirs,'detM') #Nk without symmetry reduction
        lattypes = getdata(dirs,'lattype')
        ms = array(getms(dirs),dtype = int)
        ################# summary #################
        outfile = open('vary_n.csv','w')
        outfile.write('Struct_m,n_mesh,energy,efermi,Natoms,energy/atom,energy err,fermi err,el converged,el steps,NIBZ,cputime(min\n')
        #os.chdir(mainDir)
        file = open(maindir+'names','r')
        names = nstrip(file.readlines())
        file.close()
        
        file = open(maindir+'energies','r')
        energies = nstrip(file.readlines())
        file.close()
        
        file = open(maindir+'efermi','r')
        efermis = nstrip(file.readlines())
        file.close()