| 7 | 1/1 | 返回列表 |
| 查看: 1391 | 回復: 6 | ||||
[求助]
求助!急需macroscopic average electrostatic potential的小程序 已有1人參與
|
|
想要看VASP輸出文件LOCPOT包含的體系靜電勢信息,想要可處理LOCPOT文件得到macroscopic average electrostatic potential的小程序,希望得到大家的幫助! 或者可以實現(xiàn)高斯濾波的小程序也行啊,真心求助。。! |
木蟲 (正式寫手)

鐵桿木蟲 (著名寫手)
金蟲 (正式寫手)
專家顧問 (著名寫手)
![]() |
專家經(jīng)驗: +20 |
|
三樓說的很好 程式還是要學著寫,否則未?淼穆泛茈y走 implicit real*8(a-h,o-z) character*32 tmp,t dimension nt(10),r(99) logical alive allocatable ep( ,grid(:,:, ,na(![]() !======================================================================= inquire(file='LOCPOT',exist=alive) if(alive) then write(6,*) ; write(6,*) 'LOCPOT file is found ~' open( 1,file='LOCPOT') open(11,file='LOCPOT-x.dat') open(12,file='LOCPOT-y.dat') open(13,file='LOCPOT-z.dat') do i=1,5 ; read(1,*) tmp ; end do 98 read(1,*,iostat=istat) nt ; ntype=count(nt>0) if(ntype .eq. 0) go to 98 allocate(na(ntype)) do i=1,ntype ; na(i)=nt(i) ; end do ntot=sum(na) ; allocate(ep(ntot)) do i=1,ntot ; read(1,*) tmp ; end do read(1,*) nx,ny,nz ; allocate(grid(nx,ny,nz)) read(1,*) (((grid(i,j,k),i=1,nx),j=1,ny),k=1,nz) sumgrid=sum(grid) write(6,*) " --------------- results from LOCPOT -------------------- " write(6,10) sumgrid write(6,11) nx,ny,nz write(11,'(f15.5)') (sum(grid(i,:, )/real(ny*nz),i=1,nx)write(12,'(f15.5)') (sum(grid(:,i, )/real(nx*nz),i=1,ny)write(13,'(f15.5)') (sum(grid(:,:,i))/real(nx*ny),i=1,nz) write(6,12) sumgrid/real(nx*ny*nz) write(6,*) " -------------------------------------------------------- " 10 format(" total electrostatic potential = ",f20.5) 11 format(" number of grids = ",5x,3i5) 12 format("average electrostatic potential = ",f20.5) close(1) ; deallocate(ep) end if 這是小弟寫的 fortran 處理 LOCPOT,很短 輸入檔: LOCPOT 輸出檔: LOCPOT-x.dat LOCPOT-y.dat LOCPOT-z.dat 簡單說就是沿三個方向做平面積分與平均 這只是我為了某個目的去寫 輸出結果不見得能符合你的需求 所以 還是自己寫會比問別人還快 |
木蟲 (小有名氣)
鐵桿木蟲 (著名寫手)

| 7 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 285求調(diào)劑 +4 | AZMK 2026-03-27 | 7/350 |
|
|---|---|---|---|---|
|
[考研] 學碩274求調(diào)劑 +5 | Li李魚 2026-03-26 | 5/250 |
|
|
[考研] 289求調(diào)劑 +7 | 新時代材料 2026-03-27 | 7/350 |
|
|
[考研] 07化學280分求調(diào)劑 +10 | 722865 2026-03-23 | 10/500 |
|
|
[考研] 一志愿太原理工安全工程300分,求調(diào)劑 +4 | 0857求調(diào)劑. 2026-03-24 | 4/200 |
|
|
[考研] 化學308分求調(diào)劑 +8 | 你好明天你好 2026-03-23 | 9/450 |
|
|
[考研] 材料求調(diào)劑 +5 | .m.. 2026-03-25 | 5/250 |
|
|
[考研] 一志愿吉大071010,316分求調(diào)劑 +3 | xgbiknn 2026-03-27 | 3/150 |
|
|
[考研] 286求調(diào)劑 +4 | lim0922 2026-03-26 | 4/200 |
|
|
[考研] 求調(diào)劑323材料與化工 +7 | 1124361 2026-03-24 | 7/350 |
|
|
[考研] 081200-11408-276學碩求調(diào)劑 +4 | 崔wj 2026-03-26 | 4/200 |
|
|
[考研] 281求調(diào)劑 +3 | 亞克西good 2026-03-26 | 5/250 |
|
|
[考研] 281求調(diào)劑 +6 | Koxui 2026-03-24 | 7/350 |
|
|
[考研] 各位老師您好:本人初試372分 +5 | jj涌77 2026-03-25 | 6/300 |
|
|
[考研] 340求調(diào)劑 +5 | 話梅糖111 2026-03-24 | 5/250 |
|
|
[考研] 調(diào)劑 +4 | 13853210211 2026-03-24 | 4/200 |
|
|
[考研] 292求調(diào)劑 +4 | 鵝鵝鵝額額額額?/a> 2026-03-24 | 4/200 |
|
|
[考研] 生物學一志愿985,分數(shù)349求調(diào)劑 +6 | zxts12 2026-03-21 | 9/450 |
|
|
[考研] 工科0856求調(diào)劑 +5 | 沐析汀汀 2026-03-21 | 5/250 |
|
|
[考研] 求調(diào)劑 +3 | .m.. 2026-03-21 | 4/200 |
|