-
Notifications
You must be signed in to change notification settings - Fork 10
/
duo.f90
118 lines (113 loc) · 2.9 KB
/
duo.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
program duo
use timer
use accuracy
use refinement
use dipole
use quadrupole
!use polarizability
! use compilation_details, only: write_compilation_details
use header_info, only: write_logo
use diatom_module,only : duo_j0,verbose,job,readinput,map_fields_onto_grid,action !, check_and_set_atomic_data
interface ! used for isatty
function isatty(fd) bind(c)
use iso_c_binding
integer(c_int), value :: fd
integer(c_int) :: isatty
end function
end interface
!
if (verbose>=3) call write_logo
! if (verbose>=3) call write_compilation_details
!
if (isatty(0) /= 0) then
write(out, *) "DUO was called without an input file. Exiting..."
write(out, *) "The input file should be provided after a less-than sign."
write(out, *) "Example: duo.exe < my_input.inp"
stop
end if
!
if (verbose>=3) call print_physical_constants
!
if (verbose>=3) call TimerStart('Duo')
!
! --------------------------------------------------------
!
! initializing some constants (superfluous?)
!
!call accuracyInitialize
!
! read input data
!
call ReadInput
!
!call check_and_set_atomic_data(verbose)
!
if (action%fitting) then
!
if (action%intensity) then
write(out, '(a)') 'Fitting and intensity should not be used at the same time'
stop 'please switch-off/remove either fitting or intensity'
endif
!
! Here we map all fields onto the same grid
call map_fields_onto_grid(verbose)
!
call define_jlist
call sf_fitting
endif
!
if (action%intensity) then
!
call map_fields_onto_grid(verbose)
!
if (action%raman) then
!call pol_tranint
!
write(out, '(a)') '--End--'
stop
!
endif
!
!call define_jlist
if (action%quadrupole) then
call qm_tranint
write(out, '(a)') '--End--'
stop
else
call dm_tranint
write(out, '(a)') '--End--'
stop
endif
!
write(out, '(a)') '--End--'
stop
!
endif
!
select case (job%contraction)
!
case ("VIB","VIB-ALL")
!
call duo_j0
!
case ("SIGMA-LAMBDA","ROT")
!
write(out,'("This contraction scheme is not properly tested ",a)') trim(job%contraction)
stop 'Contraction scheme is not ready'
!
!call duo_lambdasigma
!
case default
!
write(out,'("Illegal contraction scheme ",a)') trim(job%contraction)
stop 'Illegal contraction scheme'
!
end select
!
if (verbose>=4) call MemoryReport
!
if (verbose>=3) call TimerStop('Duo')
!
if (verbose>=4) call TimerReport
!
end program duo