| ²é¿´: 2506 | »Ø¸´: 3 | |||
sulisha_agrhгæ (СÓÐÃûÆø)
|
[ÇóÖú]
vasp·Ö¸îDOSCARºÍPROCAR ¾ÈÖú ÒÑÓÐ1È˲ÎÓë
|
ÔÚÉèÖÃLORBIT =11µÄÇé¿öϵõ½µÄ·Ö²¨Ì¬ÃܶÈÊý¾ÝÖУ¬µÚÒ»ÁÐʾÄÜÁ¿µÚ¶þÁÐʾs¹ìµÀµÄdosÄÇôµÚÈýËÄÎåÁÐʾpx£py£pz£¨ÒòΪPROCARÖÐÃ²ËÆÊǰ´s£-py-pz-px-dxy-dyz-dz2.....µÄ˳Ðò£©ÂðÓÃÍøÉÏÁ÷´«µÄsplit_dos.py´¦Àí£¬PORCARÓÃdos_procar.f´¦Àí£¬ºó¸½´úÂëÇó´óÉñÕÖÎÒ![]() #!/usr/bin/env python import numpy as np import ase ### READ DOSCAR ### def read_dosfile(): f = open("DOSCAR", 'r') lines = f.readlines() f.close() index = 0 natoms = int(lines[index].strip().split()[0]) index = 5 nedos = int(lines[index].strip().split()[2]) efermi = float(lines[index].strip().split()[3]) print natoms, nedos, efermi return lines, index, natoms, nedos, efermi ###READ POSCAR or CONTCAR and save pos def read_posfile(): from ase.io import read try: atoms = read('POSCAR') except IOError: print "[__main__]: Couldn't open input file POSCAR, atomic positions will not be written...\n" atoms = [] return atoms ### WRITE DOS0 CONTAINING TOTAL DOS ### def write_dos0(lines, index, nedos, efermi): fdos = open("DOS0", 'w') index +=1 line = lines[index+2].strip().split() ncols = int(len(line)) fdos.write('# %d \n' % (ncols)) for n in xrange(1,nedos): index +=1 e = float(lines[index].strip().split()[0]) e_f = e-efermi fdos.write('%15.8f ' % (e_f)) for col in xrange(1, ncols): dos = float(lines[index].strip().split()[col]) fdos.write('%15.8f ' % (dos)) col +=1 fdos.write('\n ') n +=1 return index ### LOOP OVER SETS OF DOS, NATOMS ### def write_nospin(lines, index, nedos, natoms, ncols, efermi): atoms = read_posfile() if len(atoms) < natoms: pos = np.zeros((natoms, 3)) else: pos = atoms.get_positions() for i in xrange(1,natoms+1): si = str(i) ## OPEN DOSi FOR WRITING ## fdos = open("DOS"+si, 'w') index +=2 ia = i -1 fdos.write('# %d \n' % (ncols)) fdos.write('# %15.8f %15.8f %15.8f \n' % (pos[ia,0], pos[ia,1], pos[ia,2])) ### LOOP OVER NEDOS ### for n in xrange(1,nedos): index +=1 e = float(lines[index].strip().split()[0]) e_f = e-efermi fdos.write('%15.8f ' % (e_f)) for col in xrange(1, ncols): dos = float(lines[index].strip().split()[col]) fdos.write('%15.8f ' % (dos)) col +=1 fdos.write('\n ') n +=1 i+=1 fdos.close() def write_spin(lines, index, nedos, natoms, ncols, efermi): #pos=[] atoms = read_posfile() if len(atoms) < natoms: pos = np.zeros((natoms, 3)) else: pos = atoms.get_positions() nsites = (ncols -1)/2 for i in xrange(1,natoms+1): si = str(i) ## OPEN DOSi FOR WRITING ## fdos = open("DOS"+si, 'w') index +=2 ia = i-1 fdos.write('# %d \n' % (ncols)) fdos.write('# %15.8f %15.8f %15.8f \n' % (pos[ia,0], pos[ia,1], pos[ia,2])) ### LOOP OVER NEDOS ### for n in xrange(1,nedos): index +=1 e = float(lines[index].strip().split()[0]) e_f = e-efermi fdos.write('%15.8f ' % (e_f)) for col in xrange(1, nsites): dos_up = float(lines[index].strip().split()[col]) dos_down = float(lines[index].strip().split()[col+1])*-1 fdos.write('%15.8f %15.8f ' % (dos_up, dos_down)) col +=1 fdos.write('\n ') n +=1 i+=1 fdos.close() # if __name__ == '__main__': import sys import os import datetime import time import optparse lines, index, natoms, nedos, efermi = read_dosfile() index = write_dos0(lines, index, nedos, efermi) ##Test if there a spin calculation was performed ## line = lines[index+2].strip().split() ncols = int(len(line)) if ncols==7 or ncols==19 or ncols==9 or ncols==33: write_spin(lines, index, nedos, natoms, ncols, efermi) is_spin=True else: write_nospin(lines, index, nedos, natoms, ncols, efermi) is_spin=False print "Spin unrestricted calculation: ", is_spin #if is_spin: # write_spin(lines, index, ncols, natoms, nedos, efermi) #else: # write_nospin(lines, index, ncols, natoms, nedos, efermi) |
» ²ÂÄãϲ»¶
ÊÛSCIÒ»ÇøÎÄÕ£¬ÎÒ:8.O.551.O.5.4,¿ÆÄ¿È«,¿ÉÙ¤¼±
ÒѾÓÐ5È˻ظ´
ÊÛSCIÒ»ÇøT0PÎÄÕ£¬ÎÒ:8.O.55.1.O.5.4,¿ÆÄ¿È«,¿É+¼±
ÒѾÓÐ5È˻ظ´
ÊÛSCIÒ»ÇøT0PÎÄÕ£¬ÎÒ:8.O.55.1.O.5.4,¿ÆÄ¿È«,¿É+¼±
ÒѾÓÐ4È˻ظ´
ÊÛSCIÒ»ÇøT0PÎÄÕ£¬ÎÒ:8O.55.1.O.5.4,¿ÆÄ¿ÆëÈ«,¿É+¼±
ÒѾÓÐ4È˻ظ´
2026Äê8ÔÂ25ÈÕ¹ú×ÔÈ»·Å°ñǰͻȻÊÕµ½ÁÐÈëÆÀÉóר¼ÒÓʼþ£¬ÓйØÏµÂð£¿
ÒѾÓÐ20È˻ظ´
½ñÌìÎñί»á¿ªÍêÁË£¬Ã÷Ìì³ö½á¹ûÂð
ÒѾÓÐ22È˻ظ´
ÔÚ¼á±ù»¹¸Ç×ű±º£µÄʱºò£¬ÎÒ¿´µ½ÁËŷŵÄ÷»¨¡£
ÒѾÓÐ9È˻ظ´
Ã÷ÌìÓ¦¸Ã¿É²éÁË£¡£¿
ÒѾÓÐ6È˻ظ´
ÓÐûÓдóÉñ°ïÎÒ¿´¿´»ù½ð´úÂë
ÒѾÓÐ10È˻ظ´
·Å°ñǰµÄ²»µ¶¨
ÒѾÓÐ19È˻ظ´
» ±¾Ö÷ÌâÏà¹Ø¼ÛÖµÌùÍÆ¼ö£¬¶ÔÄúͬÑùÓаïÖú:
ÇóÖú£¬»DOSͼ
ÒѾÓÐ12È˻ظ´
ÓÃdos_procar´¦ÀídosÊý¾Ý²»×¼
ÒѾÓÐ3È˻ظ´
PROCARÀïÊý¾ÝÊÇʲôÒâ˼
ÒѾÓÐ8È˻ظ´
ÈçºÎ¼ÆËãLDOSºÍPDOS
ÒѾÓÐ4È˻ظ´
¸÷λ´óÏÀ½øÀ´¿´Ò»ÏÂÍÛ£¬¼ÆËãʯīϩ̬ÃܶÈʱ³öÏÖ¾¯¸æ£¬ÊÇʲôÒâ˼£¿
ÒѾÓÐ13È˻ظ´
Çë½Ìsplit_dos´¦ÀíDOSµÄÏà¹ØÎÊÌâ
ÒѾÓÐ4È˻ظ´
py,pz,px,dxy,dyz,dz2,dxz,dx2
ÒѾÓÐ7È˻ظ´
´ÓPROCARÖÐÌáȡ̬ÃܶȵÄshell´úÂë
ÒѾÓÐ42È˻ظ´
ÔÚÓÃVasp¼ÆËãʱ£¬Óöµ½µÄÎÊÌâ
ÒѾÓÐ8È˻ظ´
vasp¼ÆËãʯīϩÄÜ´øÊ±£¬diracµãÊÇ´ò¿ªµÄ£¬´øÏ¶²»ÎªÁ㣬Ó뾲̬µÄDOSCARÒ²¶Ô²»ÉÏ
ÒѾÓÐ10È˻ظ´
ÓÃvasp¼ÆËãPDOSµÄÎÊÌâ
ÒѾÓÐ5È˻ظ´
ÇóÖúpdosµÄÎÊÌâ
ÒѾÓÐ10È˻ظ´
DOSCAR»Ì¬ÃܶÈ
ÒѾÓÐ16È˻ظ´
VASP¼ÆË㣺LORBITÉèÖóöÏÖÎÊÌâ
ÒѾÓÐ5È˻ظ´
¼ÆËã×ÔÐý¹ìµÀñîºÏDOSCARÖÐÊý¾ÝÒâÒå
ÒѾÓÐ12È˻ظ´
vasp¼ÆËã½á¹û´¦Àí̬ÃܶÈÒªÓõ½µÄ³ÌÐò
ÒѾÓÐ18È˻ظ´
¡¾ÇóÖú¡¿DOSCAR
ÒѾÓÐ14È˻ظ´
¡¾ÇóÖúÍê±Ï¡¿¼¯ÈºÉÏÓÃvasp¼ÆËãELFÓÐELFCAR¶øÃ»ÓÐDOSCARÊÇɶÎÊÌ⣿
ÒѾÓÐ15È˻ظ´
¡¾ÇóÖú¡¿vaspÔõô¼ÆËãPDOS?
ÒѾÓÐ10È˻ظ´
¡¾ÇóÖú³É¹¦¡¿ÔõôʹÓÃDOSCAR»³öDOSͼÐÎ
ÒѾÓÐ23È˻ظ´
¡¾ÇóÖú¡¿Çë½ÌÒ»ÏÂPROCARµÄ¸ñʽ
ÒѾÓÐ11È˻ظ´
sulisha_agrh
гæ (СÓÐÃûÆø)
- Ó¦Öú: 2 (Ó×¶ùÔ°)
- ½ð±Ò: 30.4
- É¢½ð: 324
- ºì»¨: 1
- Ìû×Ó: 88
- ÔÚÏß: 275.5Сʱ
- ³æºÅ: 3638590
- ×¢²á: 2015-01-10
- ÐÔ±ð: MM
- רҵ: Äý¾Û̬ÎïÐÔI:½á¹¹¡¢Á¦Ñ§ºÍ
|
ÉϱߵÄÊÇsplit_dos.py´úÂëϱ߹±Ï×Ò»¸ösplit_dos(ÐèÒªvp£©´úÂë #!/bin/ksh # Script to break the VASP DOSCAR file into segments for # each atomic site. # JMS NRL 5/0/02 # Modified to also align the Fermi level from the ground state # to E=0.0 # JMS NRL 6/19/02 # Modified to be compatible to LORBIT=11 # weibingchen.thu@gmail.com # 2009.11.1 # Executables reside here #BIN=~/bin/vtstscripts # GH: replace this so that it looks for vp in the same directory as this script EXE=$0 BIN=${EXE%/*} if [ $# -ne 0 ]; then "split_dos" 230L, 5859C |
2Â¥2015-04-29 18:43:30
huterx
½ð³æ (СÓÐÃûÆø)
- Ó¦Öú: 9 (Ó×¶ùÔ°)
- ½ð±Ò: 1485.5
- É¢½ð: 300
- ºì»¨: 2
- Ìû×Ó: 193
- ÔÚÏß: 432.8Сʱ
- ³æºÅ: 1380155
- ×¢²á: 2011-08-26
- רҵ: Äý¾Û̬ÎïÐÔ II £ºµç×ӽṹ
3Â¥2015-04-30 07:58:55
sulisha_agrh
гæ (СÓÐÃûÆø)
- Ó¦Öú: 2 (Ó×¶ùÔ°)
- ½ð±Ò: 30.4
- É¢½ð: 324
- ºì»¨: 1
- Ìû×Ó: 88
- ÔÚÏß: 275.5Сʱ
- ³æºÅ: 3638590
- ×¢²á: 2015-01-10
- ÐÔ±ð: MM
- רҵ: Äý¾Û̬ÎïÐÔI:½á¹¹¡¢Á¦Ñ§ºÍ
4Â¥2015-04-30 19:21:56










»Ø¸´´ËÂ¥
28