@@ -25,6 +25,7 @@ module calc_type
2525 use tblite_api
2626 use gfn0_api
2727 use crest_solvation,only:solvation_data
28+ use crest_electrostatic,only:electrostatic_data
2829 use gfnff_api,only:gfnff_data
2930 use libpvol_api,only:libpvol_calculator
3031! >--- other types
@@ -58,10 +59,11 @@ module calc_type
5859 integer :: penalty = 13
5960 integer :: mlip = 14
6061 integer :: solvation = 15
62+ integer :: electrostatic = 16
6163 end type enum_jobtype
6264 type (enum_jobtype), parameter ,public :: jobtype = enum_jobtype()
6365
64- character (len= 45 ),parameter ,private :: jobdescription(16 ) = [ &
66+ character (len= 45 ),parameter ,private :: jobdescription(17 ) = [ &
6567 & ' Unknown calculation type ' , &
6668 & ' xTB calculation via external binary ' , &
6769 & ' Generic script execution ' , &
@@ -77,7 +79,8 @@ module calc_type
7779 & ' Approximate free energy computation ' , &
7880 & ' Empirical penalty function ' , &
7981 & ' MLIP via persistent python socket ' , &
80- & ' Standalone implicit solvation contribution ' ]
82+ & ' Standalone implicit solvation contribution ' , &
83+ & ' Charge-equilibration electrostatics ' ]
8184! &>
8285
8386! =========================================================================================!
@@ -188,8 +191,11 @@ module calc_type
188191 real (wp) :: pvradscal = 1.0_wp ! > Scaling factor for SAS radii
189192 type (libpvol_calculator),allocatable :: libpvol
190193
191- ! >--- implicit solvation composite data
192- type (solvation_data),allocatable :: solv
194+ ! >--- implicit solvation composite data
195+ type (solvation_data),allocatable :: solv
196+
197+ ! >--- charge-equilibration electrostatics data
198+ type (electrostatic_data),allocatable :: eeq
193199
194200! >--- approxg data
195201 type (approxg_params) :: ag
@@ -1164,6 +1170,7 @@ subroutine calculation_settings_deallocate(self)
11641170 if (allocated (self% tblite)) deallocate (self% tblite)
11651171 if (allocated (self% g0calc)) deallocate (self% g0calc)
11661172 if (allocated (self% solv)) deallocate (self% solv)
1173+ if (allocated (self% eeq)) deallocate (self% eeq)
11671174 if (allocated (self% ff_dat)) deallocate (self% ff_dat)
11681175 if (allocated (self% libpvol)) deallocate (self% libpvol)
11691176
@@ -1240,6 +1247,7 @@ subroutine calculation_settings_copy(self,src)
12401247 if (allocated (src% refcharges)) self% refcharges = src% refcharges
12411248 if (allocated (src% tbliteparam)) self% tbliteparam = src% tbliteparam
12421249 if (allocated (src% solv)) self% solv = src% solv
1250+ if (allocated (src% eeq)) self% eeq = src% eeq
12431251
12441252! ── gradient settings ────────────────────────────────────────────────────────
12451253 self% numgrad = src% numgrad
@@ -1452,6 +1460,12 @@ subroutine calculation_settings_shortflag(self)
14521460 if (allocated (self% solv% solvent)) &
14531461 & self% shortflag = self% shortflag// ' (' // trim (self% solv% solvent)// ' )'
14541462 end if
1463+ case (jobtype% electrostatic)
1464+ self% shortflag = ' EEQ'
1465+ if (allocated (self% eeq)) then
1466+ if (allocated (self% eeq% charge_model)) &
1467+ & self% shortflag = trim (self% eeq% charge_model)
1468+ end if
14551469 case default
14561470 self% shortflag = ' undefined'
14571471 end select
@@ -1631,6 +1645,15 @@ subroutine calculation_settings_info(self,iunit)
16311645 end if
16321646 end if
16331647
1648+ ! > charge-equilibration electrostatics details
1649+ if (self% id == jobtype% electrostatic .and. allocated (self% eeq)) then
1650+ write (iunit,fmt4) ' Charge-equilibration electrostatics (multicharge)'
1651+ if (allocated (self% eeq% charge_model)) then
1652+ write (atmp,* ) ' charge model'
1653+ write (iunit,fmt3) atmp,trim (self% eeq% charge_model)
1654+ end if
1655+ end if
1656+
16341657 if (any ((/ jobtype% orca,jobtype% xtbsys,jobtype% turbomole, &
16351658 & jobtype% generic,jobtype% terachem/ ) == self% id)) then
16361659 if (index (self% binary,' gxtb' ) .ne. 0 ) then
0 commit comments