@@ -77,7 +77,7 @@ module xtb_prog_main
7777 use xtb_xtb_gfn2
7878 use xtb_main_setup
7979 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
8181 use xtb_geoopt
8282 use xtb_metadynamic
8383 use xtb_biaspath
@@ -97,8 +97,6 @@ module xtb_prog_main
9797 use xtb_ptb_calculator, only: TPTBCalculator
9898 use xtb_solv_cpx, only: TCpcmx
9999 use xtb_dipro, only: get_jab, jab_input
100- ! > PTB related modules
101- use xtb_main_json, only: main_ptb_json
102100
103101 implicit none
104102 private
@@ -1020,32 +1018,39 @@ subroutine xtbMain(env, argParser)
10201018 end if
10211019
10221020 if (set% pr_json) then
1023- select type (calc)
1021+ select type (calc)
10241022 type is (TxTBCalculator)
10251023 call open_file(ich, ' xtbout.json' , ' w' )
10261024 call main_xtb_json(ich, &
10271025 mol, chk% wfn, calc% basis, res, fres)
10281026 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+
10291034 type is (TPTBCalculator)
10301035 call open_file(ich, ' xtbout.json' , ' w' )
10311036 call main_ptb_json(ich, &
10321037 mol, chk% wfn, calc, res, fres)
10331038 call close_file(ich)
10341039 end select
10351040 end if
1041+
10361042 if (printTopo% any ()) then
10371043 select type (calc)
10381044 type is (TGFFCalculator)
10391045 call write_json_gfnff_lists(mol% n, res% e_total, res% gnorm, calc% topo, calc% neigh, chk% nlist, printTopo)
10401046 end select
10411047 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) then
10451050 call main_geometry(iprop, mol)
10461051 end if
10471052
1048- if ((set % runtyp == p_run_hess) .or. (set % runtyp == p_run_ohess) .or. (set % runtyp == p_run_bhess) ) then
1053+ if (anyhess ) then
10491054 call generic_header(iprop, ' Frequency Printout' , 49 , 10 )
10501055 call main_freq(iprop, mol, chk% wfn, fres)
10511056 end if
@@ -1058,9 +1063,7 @@ subroutine xtbMain(env, argParser)
10581063 end if
10591064 end if
10601065
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
10641067 call generateFileName(tmpname, ' xtbopt' , extension, mol% ftype)
10651068 write (env% unit, ' (/,a,1x,a,/)' ) &
10661069 " optimized geometry written to:" , tmpname
0 commit comments