Skip to content

Commit

Permalink
Update unit conversion factor
Browse files Browse the repository at this point in the history
  • Loading branch information
diatomicDisaster committed Nov 2, 2022
1 parent ba47056 commit c77f37b
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 50 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ $RECYCLE.BIN/
*.code-workspace
.vs/
.vscode/
*.json
.vscode/launch.json
.vscode/tasks.json

# Vim files
*.swp
Expand Down Expand Up @@ -72,5 +73,3 @@ venv/
Network Trash Folder
Temporary Items
.apdisk
.vscode/launch.json
.vscode/tasks.json
87 changes: 50 additions & 37 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,54 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"args": ["O2MLRfitfull_12.out", "-o", "O2MLRfitfull_13.inp"],
"console": "integratedTerminal"
},
{
"name": "(gdb) Debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/duo.x",
"args": [
"<",
//"debug.inp",
"O2_5states_QM.inp",
//"O2XabMD.inp",
//"H2XMD.inp",
">",
"debug.out"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build",
}
{
"name": "(gdb) Fortran + Build",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/duo.x",
"args": [
"<",
"16O2_4states_MD.inp",
">",
"16O2_4states_MD.out"
], // Possible input args for a.out
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build",
},
{
"name": "(gdb) Fortran",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/duo.x",
"args": [
"<",
"16O2_4states_MD.inp",
">",
"16O2_4states_MD.out"
], // Possible input args for a.out
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
}
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
{
"label": "clean",
"type": "shell",
"command": "rm *.o *.mod duo.x",
"problemMatcher": "",
"command": "rm *.o *.mod duo.x"
},
{
"label": "build",
"type": "shell",
"command": "make -f makefile_LINUXgfortran_debug",
"dependsOn": ["clean"],
"group": {
"kind": "build",
"isDefault": true
Expand Down
9 changes: 7 additions & 2 deletions MAKEFILES/makefile_LINUXgfortran
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ LIB = $(LAPACK)

###############################################################################

OBJ = grids.o accuracy.o lapack.o timer.o input.o diatom.o refinement.o functions.o symmetry.o dipole.o quadrupole.o magnetic_dipole.o header_info.o atomic_and_nuclear_data.o Lobatto.o me_numer.o RWF.o
OBJ = F1_hyperfine.o F1_intensity.o grids.o accuracy.o lapack.o timer.o input.o diatom.o refinement.o functions.o symmetry.o dipole.o quadrupole.o magnetic_dipole.o header_info.o atomic_and_nuclear_data.o Lobatto.o me_numer.o RWF.o

diatom.o: symmetry.o functions.o input.o lapack.o Lobatto.o timer.o atomic_and_nuclear_data.o accuracy.o me_numer.o
dipole.o: timer.o accuracy.o diatom.o symmetry.o
quadrupole.o: timer.o accuracy.o diatom.o symmetry.o
magnetic_dipole.o: timer.o accuracy.o diatom.o symmetry.o
duo.o: header_info.o diatom.o accuracy.o refinement.o timer.o dipole.o
duo.o: header_info.o diatom.o accuracy.o refinement.o timer.o dipole.o F1_hyperfine.o F1_intensity.o
functions.o: accuracy.o timer.o
grids.o: accuracy.o Lobatto.o
header_info.o: accuracy.o
F1_hyperfine.o: accuracy.o diatom.o lapack.o symmetry.o
F1_intensity.o: F1_hyperfine.o accuracy.o diatom.o
me_numer.o : accuracy.o lapack.o timer.o
lapack.o: accuracy.o timer.o
Lobatto.o: accuracy.o timer.o
Expand All @@ -51,6 +53,9 @@ RWF.o: accuracy.o diatom.o timer.o symmetry.o lapack.o

duo: $(OBJ) duo.o
$(FOR) -o $(EXE) $(OBJ) $(FFLAGS) duo.o $(LIB)

RWF.o: RWF.f90 accuracy.o diatom.o timer.o symmetry.o lapack.o
$(FOR) -c RWF.f90 $(FFLAGS)

clean:
rm -f $(OBJ) *.mod *__genmod.f90 duo.o duo_test_0* eigen_vectors.chk eigen_vib.chk Bob-Rot_centrifugal_functions.dat _Lp__functions.dat Spin-Orbit.dat Spin-spin_functions.dat Dipole_moment_functions.dat Potential_functions.dat Spin-rotation_functions.dat Spin-spin-o__non-diagonal__functions.dat
Expand Down
1 change: 1 addition & 0 deletions MAKEFILES/makefile_gfortran
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ OBJ = F1_hyperfine.o F1_intensity.o grids.o accuracy.o lapack.o timer.o input.o
diatom.o: symmetry.o functions.o input.o lapack.o Lobatto.o timer.o atomic_and_nuclear_data.o accuracy.o me_numer.o
dipole.o: timer.o accuracy.o diatom.o symmetry.o
quadrupole.o: timer.o accuracy.o diatom.o symmetry.o
magnetic_dipole.o: timer.o accuracy.o diatom.o symmetry.o
duo.o: header_info.o diatom.o accuracy.o refinement.o timer.o dipole.o F1_hyperfine.o F1_intensity.o
functions.o: accuracy.o timer.o
grids.o: accuracy.o Lobatto.o
Expand Down
Binary file modified duo.x
Binary file not shown.
5 changes: 3 additions & 2 deletions magnetic_dipole.f90
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,11 @@ subroutine md_intensity(Jval,iverbose)

! conversion factor for Q[a.u] -> Q[S.I],
! h[erg.s] -> h[J.s] and nu[/cm] -> nu[/m]
unitConv = 4.486551525d-40
!unitConv = 4.486551525d-40
unitConv = 8.6007262932d-41

! calculate the common factor for the Einstein coefficient
A_coef_s_1 = unitConv*(16.0_rk * pi**5 * vacPerm)/(planck)
A_coef_s_1 = unitConv*(16.0_rk * pi**3 * vacPerm)/(3 * planck)
!
nJ = size(Jval)
!
Expand Down
11 changes: 8 additions & 3 deletions makefile_LINUXgfortran_debug
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ EXE = duo.x
FOR = gfortran

#FFLAGS = -O3 -fopenmp
#export OMP_NUM_THREADS=4
# Debugging options
FFLAGS = -O0 -g -Wall -Wextra -Wline-truncation -pedantic -fimplicit-none -fcheck=all -fbacktrace

Expand All @@ -22,22 +21,25 @@ LIB = $(LAPACK)

###############################################################################

OBJ = grids.o accuracy.o lapack.o timer.o input.o diatom.o refinement.o functions.o symmetry.o dipole.o quadrupole.o magnetic_dipole.o header_info.o atomic_and_nuclear_data.o Lobatto.o me_numer.o RWF.o
OBJ = F1_hyperfine.o F1_intensity.o grids.o accuracy.o lapack.o timer.o input.o diatom.o refinement.o functions.o symmetry.o dipole.o quadrupole.o magnetic_dipole.o header_info.o atomic_and_nuclear_data.o Lobatto.o me_numer.o RWF.o

diatom.o: symmetry.o functions.o input.o lapack.o Lobatto.o timer.o atomic_and_nuclear_data.o accuracy.o me_numer.o
dipole.o: timer.o accuracy.o diatom.o symmetry.o
quadrupole.o: timer.o accuracy.o diatom.o symmetry.o
magnetic_dipole.o: timer.o accuracy.o diatom.o symmetry.o
duo.o: header_info.o diatom.o accuracy.o refinement.o timer.o dipole.o
duo.o: header_info.o diatom.o accuracy.o refinement.o timer.o dipole.o F1_hyperfine.o F1_intensity.o
functions.o: accuracy.o timer.o
grids.o: accuracy.o Lobatto.o
header_info.o: accuracy.o
F1_hyperfine.o: accuracy.o diatom.o lapack.o symmetry.o
F1_intensity.o: F1_hyperfine.o accuracy.o diatom.o
me_numer.o : accuracy.o lapack.o timer.o
lapack.o: accuracy.o timer.o
Lobatto.o: accuracy.o timer.o
refinement.o: timer.o accuracy.o diatom.o
symmetry.o: accuracy.o
timer.o: accuracy.o
RWF.o: accuracy.o diatom.o timer.o symmetry.o lapack.o

# clear internal suffix rules
.SUFFIXES:
Expand All @@ -48,6 +50,9 @@ timer.o: accuracy.o

duo: $(OBJ) duo.o
$(FOR) -o $(EXE) $(OBJ) $(FFLAGS) duo.o $(LIB)

RWF.o: RWF.f90 accuracy.o diatom.o timer.o symmetry.o lapack.o
$(FOR) -c RWF.f90 $(FFLAGS)

clean:
rm -f $(OBJ) *.mod *__genmod.f90 duo.o duo_test_0* eigen_vectors.chk eigen_vib.chk Bob-Rot_centrifugal_functions.dat _Lp__functions.dat Spin-Orbit.dat Spin-spin_functions.dat Dipole_moment_functions.dat Potential_functions.dat Spin-rotation_functions.dat Spin-spin-o__non-diagonal__functions.dat
Expand Down
1 change: 0 additions & 1 deletion quadrupole.f90
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ subroutine qm_intensity(Jval, iVerbose)
beta = planck * vellgt / (boltz * Intensity%temperature)
inten_cm_mol = 8.0d-36*pi**3 / (3.0_rk * planck * vellgt)
emcoef = planck*vellgt/(4.0_rk*pi)
A_coef_s_1 = 64.0d-36 * pi**4 / (3.0_rk * planck)

!
! vacuum permittivity (NIST 2018) - needs to be
Expand Down

0 comments on commit c77f37b

Please sign in to comment.