[問題] 請問一下 我不能跑
請問各位大大
以下是我的程式編輯內容
因為我不是很懂fortran
老闆又要我把以下的內容轉成c++
我有大約了解過各種指令的意義 但是這個還是不能跑
也找過f2c轉譯軟體
但是就是不能跑
可以請各位高手解惑一下麼
縮網址http://pastie.org/2354079
program main
implicit real*8 (a-h,o-z)
implicit integer*4 (i-n)
c freqmin and freqmax denote the range of energies (in eV) of interest
parameter (freqmin=2.01d0)
parameter (freqmax=7.5d0)
c nplot is the number of points to plot: recommend (freqmax-freqmin)*100+1
parameter (nplot=15001)
c numfreq is the maximum number of transitions to read from the input file
parameter (numfreq=100)
c sigma is the width of the gaussian broadening function in eV
c parameter (sigma=1.2d0)
c parameter (sigma=1.0d0)
c parameter (sigma=0.8d0)
c parameter (sigma=0.6d0)
c parameter (sigma=0.4d0)
c parameter (sigma=0.2d0)
c parameter (sigma=0.18d0)
parameter (sigma=0.1d0)
c parameter (sigma=0.05d0)
c scale is used primarily for vibrational frequencies as indicated below
c use the following statement for HF frequencies with minimal basis
c parameter (scale=0.893d0)
c use the following statement for HF frequencies with pVDZ basis
c parameter (scale=0.9135d0)
c use the following statement for HF frequencies with pVTZ basis
c parameter (scale=0.9248d0)
c use the following statement for B3LYP frequencies with 6-31GD basis
c parameter (scale=0.9614d0)
parameter (scale=1.d0)
dimension w(numfreq),a(numfreq),v(numfreq),b(numfreq)
c
fnplot1=nplot-1
delf=(freqmax-freqmin)/fnplot1
fwhm=sigma
c
open(unit=1,file='input.dat',status='old')
c read(1,*)
c read(1,*)
do i=1,numfreq
read(1,*,end=10) idum,w(i),v(i),a(i)
c w(i)=scale*w(i)
end do
go to 11
10 continue
npts=i-1
go to 12
11 continue
npts=numfreq
write(*,*) 'maximum number of frequencies read:',numfreq
12 continue
close(unit=1)
c
do i=1,nplot
fi=i-1
x=freqmin+fi*delf
sum=0.d0
sums=0.d0
do j=1,npts
sum=sum+a(j)*exp(-(x-w(j))**2/(2.d0*fwhm**2))
c sums=sums+b(j)*exp(-(x-v(j))**2/(2.d0*fwhm**2))
end do
x=8065.54099*x
y=1.d7/x
write(*,*) i,x,y,sum
end do
c
end
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.231.24.32
※ 編輯: garyer 來自: 118.231.24.32 (08/22 15:34)
推
08/22 16:24, , 1F
08/22 16:24, 1F
→
08/22 16:31, , 2F
08/22 16:31, 2F
→
08/22 16:32, , 3F
08/22 16:32, 3F
推
08/22 22:01, , 4F
08/22 22:01, 4F
推
08/22 23:11, , 5F
08/22 23:11, 5F
→
08/22 23:11, , 6F
08/22 23:11, 6F
→
08/23 01:03, , 7F
08/23 01:03, 7F
→
08/25 00:03, , 8F
08/25 00:03, 8F
討論串 (同標題文章)
完整討論串 (本文為第 1 之 2 篇):
3
8
Fortran 近期熱門文章
PTT數位生活區 即時熱門文章