-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpotsub.f90
56 lines (55 loc) · 1.52 KB
/
potsub.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
! File created at Fri Jun 5 21:58:57 PDT 2020
! Original source code: potsub.f
subroutine potsub (r,vev)
implicit double precision (a-h,o-z)
!
! -----------------------------------------------------------------
! This subroutine chooses which potential to use on the basis
! of the atomic masses in common /masses/, and also ensures
! that the potential is called with the bond lengths in the
! correct order.
! -----------------------------------------------------------------
!
dimension r(3),s(3),m(3)
double precision mass,mtot,mred
common /masses/ mass(3),mtot,mred
!
imax = 1
imin = 1
do i = 1,3
m(i) = nint(mass(i))
if (m(i) .gt. m(imax)) then
imax = i
else if (m(i) .lt. m(imin)) then
imin = i
endif
enddo
if (imax .eq. imin) then
imin = 1
imid = 2
imax = 3
else
imid = 6-imax-imin
endif
s(1) = r(imax)
s(2) = r(imid)
s(3) = r(imin)
mmax = m(imax)
mmid = m(imid)
mmin = m(imin)
! if (mmin .lt. 1) stop 'potsub 1'
! if (mmid .gt. 2) stop 'potsub 2'
! if (mmax .le. 2) then
! call hh2pot (s,vev)
! else if (mmax .eq. 19) then
! call fh2pot (s,vev)
! else if (mmax .eq. 35) then
! call clh2pt (s,vev)
! else if (mmax .eq. 37) then
! call clh2pt (s,vev)
! else
! stop 'potsub 3'
! endif
call pes(s(1),s(2),s(3),vev)
return
end