@@ -77,7 +77,7 @@ module xtb_prog_main
77
77
use xtb_xtb_gfn2
78
78
use xtb_main_setup
79
79
use xtb_main_defaults, only: initDefaults
80
- use xtb_main_json, only: main_xtb_json, write_json_gfnff_lists
80
+ use xtb_main_json, only: main_xtb_json, write_json_gfnff_lists, main_ptb_json, main_tblite_json
81
81
use xtb_geoopt
82
82
use xtb_metadynamic
83
83
use xtb_biaspath
@@ -97,8 +97,6 @@ module xtb_prog_main
97
97
use xtb_ptb_calculator, only: TPTBCalculator
98
98
use xtb_solv_cpx, only: TCpcmx
99
99
use xtb_dipro, only: get_jab, jab_input
100
- ! > PTB related modules
101
- use xtb_main_json, only: main_ptb_json
102
100
103
101
implicit none
104
102
private
@@ -1020,32 +1018,39 @@ subroutine xtbMain(env, argParser)
1020
1018
end if
1021
1019
1022
1020
if (set% pr_json) then
1023
- select type (calc)
1021
+ select type (calc)
1024
1022
type is (TxTBCalculator)
1025
1023
call open_file(ich, ' xtbout.json' , ' w' )
1026
1024
call main_xtb_json(ich, &
1027
1025
mol, chk% wfn, calc% basis, res, fres)
1028
1026
call close_file(ich)
1027
+
1028
+ type is (TTBLiteCalculator)
1029
+ call open_file(ich, ' tblite.json' , ' w' )
1030
+ call main_tblite_json(ich, &
1031
+ calc, etot, g, sigma)
1032
+ call close_file(ich)
1033
+
1029
1034
type is (TPTBCalculator)
1030
1035
call open_file(ich, ' xtbout.json' , ' w' )
1031
1036
call main_ptb_json(ich, &
1032
1037
mol, chk% wfn, calc, res, fres)
1033
1038
call close_file(ich)
1034
1039
end select
1035
1040
end if
1041
+
1036
1042
if (printTopo% any ()) then
1037
1043
select type (calc)
1038
1044
type is (TGFFCalculator)
1039
1045
call write_json_gfnff_lists(mol% n, res% e_total, res% gnorm, calc% topo, calc% neigh, chk% nlist, printTopo)
1040
1046
end select
1041
1047
end if
1042
- if ((set% runtyp == p_run_opt) .or. (set% runtyp == p_run_ohess) .or. &
1043
- (set% runtyp == p_run_omd) .or. (set% runtyp == p_run_screen) .or. &
1044
- (set% runtyp == p_run_metaopt) .or. (set% runtyp == p_run_bhess)) then
1048
+
1049
+ if ( anyopt .or. (set% runtyp == p_run_bhess) ) then
1045
1050
call main_geometry(iprop, mol)
1046
1051
end if
1047
1052
1048
- if ((set % runtyp == p_run_hess) .or. (set % runtyp == p_run_ohess) .or. (set % runtyp == p_run_bhess) ) then
1053
+ if (anyhess ) then
1049
1054
call generic_header(iprop, ' Frequency Printout' , 49 , 10 )
1050
1055
call main_freq(iprop, mol, chk% wfn, fres)
1051
1056
end if
@@ -1058,9 +1063,7 @@ subroutine xtbMain(env, argParser)
1058
1063
end if
1059
1064
end if
1060
1065
1061
- if ((set% runtyp == p_run_opt) .or. (set% runtyp == p_run_ohess) .or. &
1062
- (set% runtyp == p_run_omd) .or. (set% runtyp == p_run_screen) .or. &
1063
- (set% runtyp == p_run_metaopt) .or. (set% runtyp == p_run_bhess)) then
1066
+ if ( anyopt .or. (set% runtyp == p_run_bhess) ) then
1064
1067
call generateFileName(tmpname, ' xtbopt' , extension, mol% ftype)
1065
1068
write (env% unit, ' (/,a,1x,a,/)' ) &
1066
1069
" optimized geometry written to:" , tmpname
0 commit comments