| 7 | 1/1 | 返回列表 |
| 查看: 1390 | 回復: 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 簡單說就是沿三個方向做平面積分與平均 這只是我為了某個目的去寫 輸出結(jié)果不見得能符合你的需求 所以 還是自己寫會比問別人還快 |
木蟲 (小有名氣)
鐵桿木蟲 (著名寫手)

| 7 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 求調(diào)劑推薦 材料 304 +14 | 荷包蛋hyj 2026-03-26 | 14/700 |
|
|---|---|---|---|---|
|
[考研] 272求調(diào)劑 +7 | 腳滑的守法公民 2026-03-27 | 7/350 |
|
|
[考研] 材料與化工(0856)304求B區(qū)調(diào)劑 +7 | 邱gl 2026-03-27 | 7/350 |
|
|
[考研] 308求調(diào)劑 +6 | 墨墨漠 2026-03-27 | 6/300 |
|
|
[考研] 269專碩求調(diào)劑 +10 | 金恩貝 2026-03-21 | 10/500 |
|
|
[考研] 305求調(diào)劑 +5 | 哇盧卡庫 2026-03-26 | 5/250 |
|
|
[考研] 085601 材料工程 313分 求調(diào)劑 +5 | Ong3 2026-03-27 | 5/250 |
|
|
[考研] 303求調(diào)劑 +7 | 安憶靈 2026-03-22 | 8/400 |
|
|
[考研] 材料調(diào)劑 +8 | 匹克i 2026-03-23 | 8/400 |
|
|
[考研]
|
nnnnnnn5 2026-03-25 | 5/250 |
|
|
[考研] 求調(diào)劑 +6 | 白QF 2026-03-21 | 6/300 |
|
|
[考研] 086000生物與醫(yī)藥292求調(diào)劑 +6 | 小小陳小小 2026-03-22 | 9/450 |
|
|
[考研] 081700 調(diào)劑 267分 +11 | 迷人的哈哈 2026-03-23 | 11/550 |
|
|
[考研] 求調(diào)劑 +3 | QiMing7 2026-03-25 | 3/150 |
|
|
[考研] 0703化學求調(diào)劑 +6 | 奶油草莓. 2026-03-22 | 7/350 |
|
|
[考研] 求調(diào)劑 +6 | 研研,接電話 2026-03-24 | 7/350 |
|
|
[考研] 一志愿河北工業(yè)大學0817化工278分求調(diào)劑 +7 | jhybd 2026-03-23 | 12/600 |
|
|
[考研] 308求調(diào)劑 +3 | 墨墨漠 2026-03-21 | 3/150 |
|
|
[考研] 生物學調(diào)劑 +5 | Surekei 2026-03-21 | 5/250 |
|
|
[考研] 297求調(diào)劑 +3 | 喜歡還是不甘心 2026-03-20 | 3/150 |
|