new set of inputs with modified code (half working), sent by michal just now

This commit is contained in:
Guillaume Raffy 2023-06-05 14:59:53 +02:00
parent 8fb811dd96
commit 9f4f179dbd
14 changed files with 1903 additions and 520 deletions

View File

@ -10,14 +10,14 @@
implicit none
integer, parameter :: np_f=119 !number of points for function, input
integer, parameter :: np_f=142 !number of points for function, input
! integer, parameter :: nps=10000 !number of points we work with in the splint subroutine.
integer, parameter :: nlevtot=176 ! number of levels, some appear multiple times
integer, parameter :: nlevtot=165 ! number of levels, some appear multiple times
integer, parameter :: npar=2 ! number of parities from molscat
integer, parameter :: Jmin=0 ! Jtot min
integer, parameter :: Jmax=1 ! Jtot max
integer, parameter :: Jmax=5 ! Jtot max
! integer, parameter :: inist=1 ! initial state, # refers to levels.dat
integer, parameter :: nE=5 ! number of energies
integer, parameter :: nE=500 ! number of energies
! integer, parameter :: nf=10 !number of functions in input
! double precision, parameter :: c = 137.035999 !in au,
! c=1/alpha
@ -25,7 +25,6 @@
! double precision, parameter :: amu=1.66d-27 !in kg
! double precision, parameter :: kb=1.38d-23 !in J/K
! double precision, parameter :: kb2=8.617d-05 !in eV/K
integer :: iostat
integer :: i,j,k,m,idx,nf,nlevuniq,Jtot,idx_p1,idx_p2
integer :: l1,l2,l1min,l1max,l2min,l2max,iE,inist,openi(Jmax+1)
character(2) :: x1,x2,x3
@ -36,7 +35,7 @@
double precision :: Rmax,fmax,ener(nE),Emin,Emax
double precision, allocatable :: func(:,:),proba(:)
double precision :: probalev(nlevtot,npar),probalevtot(nlevtot)
double precision :: probaJ(Jmax+1,nlevtot) ! Jmax+1 as index J=0 won't work
double precision :: probaJ(Jmax+1,nlevtot) ! Jmax+1 as index J=0 wont work
double precision :: E_lev(nlevtot),sigidx(nlevtot),erel
integer :: jCO(nlevtot),jH2O(nlevtot),ja(nlevtot),jb(nlevtot)
integer :: tau(nlevtot),tau2(nlevtot),taui,taumax,tauf
@ -61,10 +60,7 @@
do m=1,npar ! loop over parities
idx_p1=Jtot+m*1000
open(idx_p1,status='old')
write(6,*) 'idx_p1=', idx_p1
open(idx_p1)
read(idx_p1,*) nf
n_adiab(Jtot+1,m)=nf ! store the number of functions for given J, parity
if (nf.eq.0) then ! do nothing, only for J=0 in some cases
@ -73,12 +69,8 @@
allocate(func(np_f,nf))
! allocate(proba(nf))
write(6,*) 'idx_p1 = ', idx_p1
do i=np_f,1,-1 ! read in reverse to start from Rmax
write(6,*) 'i = ', i
read(idx_p1,*) R(i),(func(i,j),j=1,nf)
! write(6,*) 'R(', i, ') = ', R(i)
! write(6,*) 'func( ', i,',nf=', nf,') = ', func(i,nf)
enddo
! rewind(idx_p1)
close(idx_p1)
@ -141,7 +133,7 @@
c read(5,*) jai, taui, jbi ! read initial state. ja=H2O, jb=CO
open(9,file='lvls.dat',status='old')
open(9,file='level.dat',status='old')
read(9,*) ! determine the number of unique levels, nlevuniq
nlevuniq=0
do i=1,nlevtot
@ -162,24 +154,24 @@ c read(5,*) jai, taui, jbi ! read initial state. ja=H2O, jb=CO
jamax=maxval(ja)
jbmax=maxval(jb)
do jai=0,9
do jai=0,5
taumax=2*jai+1
! print*, "taumax=",taumax
do taui=1,taumax
do jbi=0,7
do jbi=0,10
! print*, jai,taui,jbi
inist=0
write(6,*) 'nlevuniq = ', nlevuniq
do i=1,nlevuniq
! write(6,*) 'i = ', i
write(6,*) 'i = ', i
if ((ja(i).eq.jai) .and. (jb(i).eq.jbi) .and. (tau(i).eq.taui))
& then
inist=i ! find number of level corresponding to initial state
endif
enddo
print*, "inist=", inist, "with energy", Elev(inist)
if (inist .ne. 0) then ! if inist =0, don't do anything (wrong parity)
if (inist .ne. 0) then ! if inist =0, dont do anything (wrong parity)
c print*, "initial state does not exist"
! print*, "inist=", inist
@ -189,7 +181,6 @@ c print*, "initial state does not exist"
! print*,x1,x2,x3
name_CS='cross_'//x1//'_'//x2//'__'//x3//'.dat'
! print*, name_CS
write(6, *) 'opening file ', name_CS
open(26,file=name_CS,status='replace')
open(400,file='output_adiab',status='replace')
@ -199,11 +190,10 @@ c print*, "initial state does not exist"
Emin=1d0
Emax=1d3
Emax=8d2
do iE=1,nE ! loop over energies
ener(iE)=Emin+(iE-1)*(Emax-Emin)/(nE-1) !define scale for energy
write(6,*) 'ener(', iE, ') = ', ener(iE)
! ener(1)=500d0
write(400,*) 'energy: ',ener(iE)
! ener(iE)=10+(iE-1)*20d0 !define scale for energy
@ -212,7 +202,6 @@ c print*, "initial state does not exist"
probaJ=0d0
crosstot=0d0
write(6, *) 'Jmin=', Jmin, ' Jmax=', Jmax
do Jtot=Jmin,Jmax ! begin loop over Jtot
! write(6,*) "E = ", ener(iE), "Jtot = ", Jtot
@ -224,7 +213,7 @@ c print*, "initial state does not exist"
do m=1,npar ! loop over parities
nf=n_adiab(Jtot+1,m)
write(6,*) 'nf = ', nf
if (nf.eq.0) then ! do nothing, only for J=0 for some cases
else
@ -240,19 +229,12 @@ c print*, "initial state does not exist"
enddo
Etot=ener(iE)+Elev(inist)
write(6, *) 'Elev(', inist, ') = ', Elev(inist)
write(6, *) 'iE = ', iE
write(6, *) 'Etot = ', Etot,
&' Ebarrier(Jtot+1,m,j)=', Ebarrier(Jtot+1,m,j)
if (Etot.ge.Ebarrier(Jtot+1,m,j)) then
proba(j)=1d0
! if (Einf(Jtot+1,m,j).eq.Elev(inist)) then
write(6, *) 'Einf = ', Einf(Jtot+1,m,j),
& ' Elev =', Elev(inist)
if (abs(Einf(Jtot+1,m,j)-Elev(inist)).lt.1d-4) then
if (abs(Einf(Jtot+1,m,j)-Elev(inist)).lt.1d-3) then
openi(Jtot+1)=openi(Jtot+1)+1 ! count the number of open initial channels
stop
endif
else
proba(j)=0d0
@ -344,10 +326,7 @@ c print*, "initial state does not exist"
! enddo
! enddo
write(6, *) "openi(", Jtot+1, ")=", openi(Jtot+1)
crossJ(Jtot+1,i)=openi(Jtot+1)*crossJ(Jtot+1,i)*(2d0*Jtot+1d0)
write(6, *) "crossJ(", Jtot+1, ", ", i,")=", crossJ(Jtot+1,i)
crosstot(i)=crosstot(i)+crossJ(Jtot+1,i)
if (crossJ(Jtot+1,i).ne.0d0) then
write(300+i,*) ener(iE), Jtot, crossJ(Jtot+1,i)
@ -356,13 +335,9 @@ c print*, "initial state does not exist"
endif
enddo
write(6, *) "writing header"
write(26,*)" energy jbi jai taui jbf jaf
& tauf CS"
write(6, *) 'nlevuniq = ', nlevuniq
do i=1,nlevuniq
write(6, *) "crosstot(", i, ")=", crosstot(i)
crosstot(i)=crosstot(i)*pi/((2d0*jai+1d0)*(2d0*jbi+1d0)*wavek2)
crosstot(i)=crosstot(i)*((5.291772d-1)**2)
if (crosstot(i).ne.0d0) then

263
fort.1000

File diff suppressed because one or more lines are too long

263
fort.1001

File diff suppressed because one or more lines are too long

144
fort.1002 Normal file

File diff suppressed because one or more lines are too long

144
fort.1003 Normal file

File diff suppressed because one or more lines are too long

144
fort.1004 Normal file

File diff suppressed because one or more lines are too long

144
fort.1005 Normal file

File diff suppressed because one or more lines are too long

263
fort.2000

File diff suppressed because one or more lines are too long

264
fort.2001

File diff suppressed because one or more lines are too long

144
fort.2002 Normal file

File diff suppressed because one or more lines are too long

144
fort.2003 Normal file

File diff suppressed because one or more lines are too long

144
fort.2004 Normal file

File diff suppressed because one or more lines are too long

144
fort.2005 Normal file

File diff suppressed because one or more lines are too long

165
level.dat Normal file
View File

@ -0,0 +1,165 @@
1 0 0 0 0 0 0.000
2 0 0 0 0 1 2.956
3 0 0 0 0 2 8.869
4 0 0 0 0 3 17.739
5 0 0 0 0 4 29.564
6 1 0 1 1 0 37.162
7 1 0 1 1 1 40.118
8 0 0 0 0 5 44.347
9 1 0 1 1 2 46.031
10 1 0 1 1 3 54.901
11 0 0 0 0 6 62.085
12 1 0 1 1 4 66.726
13 2 0 0 2 0 70.133
14 2 0 0 2 1 73.090
15 2 0 0 2 2 79.003
16 1 0 1 1 5 81.509
17 0 0 0 0 7 82.780
18 2 0 0 2 3 87.872
19 2 -2 1 1 0 95.210
20 2 -2 1 1 1 98.166
21 1 0 1 1 6 99.247
22 2 0 0 2 4 99.698
23 2 -2 1 1 2 104.079
24 0 0 0 0 8 106.432
25 2 -2 1 1 3 112.949
26 2 0 0 2 5 114.480
27 1 0 1 1 7 119.942
28 2 -2 1 1 4 124.774
29 2 0 0 2 6 132.219
30 0 0 0 0 9 133.040
31 2 2 2 0 0 136.563
32 2 2 2 0 1 139.519
33 2 -2 1 1 5 139.557
34 3 0 1 3 0 142.369
35 1 0 1 1 8 143.594
36 3 0 1 3 1 145.326
37 2 2 2 0 2 145.432
38 3 0 1 3 2 151.238
39 2 0 0 2 7 152.914
40 2 2 2 0 3 154.301
41 2 -2 1 1 6 157.295
42 3 0 1 3 3 160.108
43 0 0 0 0 10 162.604
44 2 2 2 0 4 166.127
45 1 0 1 1 9 170.202
46 3 0 1 3 4 171.934
47 2 0 0 2 8 176.565
48 2 -2 1 1 7 177.990
49 2 2 2 0 5 180.909
50 3 0 1 3 5 186.716
51 2 2 2 0 6 198.648
52 1 0 1 1 10 199.766
53 2 -2 1 1 8 201.642
54 2 0 0 2 9 203.173
55 3 0 1 3 6 204.454
56 3 -2 2 2 0 206.696
57 3 -2 2 2 1 209.652
58 3 -2 2 2 2 215.565
59 2 2 2 0 7 219.343
60 4 0 0 4 0 222.369
61 3 -2 2 2 3 224.435
62 3 0 1 3 7 225.150
63 4 0 0 4 1 225.326
64 2 -2 1 1 9 228.250
65 4 0 0 4 2 231.239
66 2 0 0 2 10 232.738
67 3 -2 2 2 4 236.260
68 4 0 0 4 3 240.108
69 2 2 2 0 8 242.995
70 3 0 1 3 8 248.801
71 3 -2 2 2 5 251.043
72 4 0 0 4 4 251.934
73 2 -2 1 1 10 257.814
74 4 0 0 4 5 266.716
75 3 -2 2 2 6 268.781
76 2 2 2 0 9 269.603
77 3 0 1 3 9 275.409
78 4 -2 1 3 0 276.015
79 4 -2 1 3 1 278.971
80 4 0 0 4 6 284.455
81 4 -2 1 3 2 284.884
82 3 2 3 1 0 287.299
83 3 -2 2 2 7 289.476
84 3 2 3 1 1 290.255
85 4 -2 1 3 3 293.753
86 3 2 3 1 2 296.168
87 2 2 2 0 10 299.167
88 3 0 1 3 10 304.973
89 3 2 3 1 3 305.038
90 4 0 0 4 7 305.150
91 4 -2 1 3 4 305.579
92 3 -2 2 2 8 313.128
93 4 2 2 2 0 316.467
94 3 2 3 1 4 316.863
95 4 2 2 2 1 319.424
96 4 -2 1 3 5 320.361
97 4 2 2 2 2 325.336
98 5 0 1 5 0 327.096
99 4 0 0 4 8 328.801
100 5 0 1 5 1 330.053
101 3 2 3 1 5 331.646
102 4 2 2 2 3 334.206
103 5 0 1 5 2 335.965
104 4 -2 1 3 6 338.100
105 3 -2 2 2 9 339.736
106 5 0 1 5 3 344.835
107 4 2 2 2 4 346.032
108 3 2 3 1 6 349.384
109 4 0 0 4 9 355.409
110 5 0 1 5 4 356.661
111 4 -2 1 3 7 358.795
112 4 2 2 2 5 360.814
113 3 -2 2 2 10 369.300
114 3 2 3 1 7 370.079
115 5 0 1 5 5 371.443
116 4 2 2 2 6 378.552
117 4 -2 1 3 8 382.447
118 4 0 0 4 10 384.974
119 4 -4 3 1 0 385.845
120 4 -4 3 1 1 388.802
121 5 0 1 5 6 389.181
122 3 2 3 1 8 393.731
123 4 -4 3 1 2 394.715
124 4 2 2 2 7 399.247
125 4 -4 3 1 3 403.584
126 4 -2 1 3 9 409.055
127 5 0 1 5 7 409.877
128 4 -4 3 1 4 415.410
129 5 -2 2 4 0 417.096
130 5 -2 2 4 1 420.052
131 3 2 3 1 9 420.339
132 4 2 2 2 8 422.899
133 5 -2 2 4 2 425.965
134 4 -4 3 1 5 430.192
135 5 0 1 5 8 433.528
136 5 -2 2 4 3 434.835
137 4 -2 1 3 10 438.619
138 5 -2 2 4 4 446.660
139 4 -4 3 1 6 447.931
140 4 2 2 2 9 449.507
141 3 2 3 1 10 449.903
142 5 0 1 5 9 460.136
143 5 -2 2 4 5 461.443
144 4 -4 3 1 7 468.626
145 4 2 2 2 10 479.071
146 5 -2 2 4 6 479.181
147 5 0 1 5 10 489.700
148 4 -4 3 1 8 492.277
149 4 4 4 0 0 494.643
150 4 4 4 0 1 497.600
151 5 -2 2 4 7 499.876
152 4 4 4 0 2 503.513
153 4 4 4 0 3 512.382
154 4 -4 3 1 9 518.885
155 5 -2 2 4 8 523.528
156 4 4 4 0 4 524.208
157 4 4 4 0 5 538.990
158 4 -4 3 1 10 548.450
159 5 -2 2 4 9 550.136
160 4 4 4 0 6 556.729
161 4 4 4 0 7 577.424
162 5 -2 2 4 10 579.700
163 4 4 4 0 8 601.075
164 4 4 4 0 9 627.683
165 4 4 4 0 10 657.248