Skip to content

Commit

Permalink
Towards constant displacement and efield TB calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
juerghutter committed Mar 19, 2019
1 parent 3214a37 commit 68cf02e
Show file tree
Hide file tree
Showing 23 changed files with 492 additions and 274 deletions.
327 changes: 316 additions & 11 deletions src/efield_tb_methods.F

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion src/qmmm_tb_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ MODULE qmmm_tb_methods
dbcsr_add, dbcsr_copy, dbcsr_get_block_p, dbcsr_iterator_blocks_left, &
dbcsr_iterator_next_block, dbcsr_iterator_start, dbcsr_iterator_stop, dbcsr_iterator_type, &
dbcsr_p_type, dbcsr_set
USE erf_fn, ONLY: erfc
USE ewald_environment_types, ONLY: ewald_env_create,&
ewald_env_get,&
ewald_env_release,&
Expand Down
8 changes: 8 additions & 0 deletions src/xtb_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
!> \brief Definition of the xTB parameter types.
!> \author JGH (10.2018)
! **************************************************************************************************
! To be done:
! 1) Ewald defaults options for GMAX, ALPHA, RCUT
! 2) QM/MM debugging of forces
! 3) Periodic displacement field (debugging)
! 4) Check for RTP and EMD
! 5) Wannier localization
! 6) Charge Mixing methods: Broyden/Pulay
! **************************************************************************************************
MODULE xtb_types

USE cp_log_handling, ONLY: cp_get_default_logger,&
Expand Down
3 changes: 3 additions & 0 deletions tests/QMMM/xTB/regtest/fdeb_1.inp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
&DFT
&QS
METHOD xTB
&XTB
COULOMB_INTERACTION F
&END
&END QS
&SCF
SCF_GUESS MOPAC
Expand Down
3 changes: 3 additions & 0 deletions tests/QMMM/xTB/regtest/fdeb_3.inp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
&DFT
&QS
METHOD xTB
&XTB
COULOMB_INTERACTION F
&END
&END QS
&SCF
SCF_GUESS MOPAC
Expand Down
3 changes: 3 additions & 0 deletions tests/QMMM/xTB/regtest/fdeb_4.inp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
&DFT
&QS
METHOD xTB
&XTB
COULOMB_INTERACTION F
&END
&END QS
&SCF
SCF_GUESS MOPAC
Expand Down
1 change: 1 addition & 0 deletions tests/TEST_DIRS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ QS/regtest-cdft-hirshfeld
SIRIUS/regtest-1 libxc sirius elpa scalapack mpiranks=4 libxc sirius elpa scalapack mpiranks=4
xTB/regtest-1
xTB/regtest-2
xTB/regtest-3
QS/regtest-almo-strong
QS/regtest-elpa-2 elpa
QS/regtest-cdft-5
Expand Down
6 changes: 2 additions & 4 deletions tests/xTB/regtest-2/H2O-field-gopt-lsd.inp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
LSD
&PRINT
&MOMENTS
PERIODIC T
&END
&END
&PERIODIC_EFIELD
Expand All @@ -16,9 +17,6 @@
DO_EWALD T
&END
EPS_DEFAULT 1.0E-12
EXTRAPOLATION PS
EXTRAPOLATION_ORDER 2
MAP_CONSISTENT
&END QS
&SCF
EPS_SCF 1.0E-6
Expand All @@ -31,7 +29,7 @@
&END SCF
&POISSON
&EWALD
ALPHA 10.0
ALPHA 1.0
EWALD_TYPE SPME
GMAX 75
&END EWALD
Expand Down
14 changes: 6 additions & 8 deletions tests/xTB/regtest-2/H2O-field-gopt.inp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
&DFT
&PRINT
&MOMENTS
PERIODIC T
&END
&END
&PERIODIC_EFIELD
Expand All @@ -12,21 +13,18 @@
&QS
METHOD xTB
EPS_DEFAULT 1.0E-12
EXTRAPOLATION PS
EXTRAPOLATION_ORDER 2
&END QS
&KPOINTS
SCHEME GAMMA
&END
&SCF
EPS_SCF 1.0E-6
SCF_GUESS ATOMIC
MAX_SCF 6
&OT
PRECONDITIONER FULL_SINGLE_INVERSE
MINIMIZER DIIS
&END
MAX_SCF 60
&END SCF
&POISSON
&EWALD
ALPHA 10.0
ALPHA 1.0
EWALD_TYPE SPME
GMAX 75
&END EWALD
Expand Down
36 changes: 13 additions & 23 deletions tests/xTB/regtest-2/H2O-field-lsd.inp
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,32 @@
LSD
&PRINT
&MOMENTS
PERIODIC T
&END
&END
BASIS_SET_FILE_NAME GTH_BASIS_SETS
POTENTIAL_FILE_NAME POTENTIAL
&MGRID
CUTOFF 200
&END MGRID
&PERIODIC_EFIELD
POLARISATION 1 0 0
INTENSITY 0.001
&END
&QS
METHOD xTB
&XTB
DO_EWALD T
&END
EPS_DEFAULT 1.0E-12
EXTRAPOLATION PS
EXTRAPOLATION_ORDER 2
MAP_CONSISTENT
&END QS
&POISSON
&EWALD
ALPHA 1.0
EWALD_TYPE SPME
GMAX 75
&END EWALD
&END POISSON
&SCF
EPS_SCF 1.0E-6
SCF_GUESS ATOMIC
MAX_SCF 6
&OT
&END
MAX_SCF 60
&END SCF
&XC
&XC_FUNCTIONAL PADE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
Expand All @@ -42,14 +40,6 @@
H 0.000000 -0.757136 0.520545 H2O
H 0.000000 0.757136 0.520545 H2O
&END COORD
&KIND H
BASIS_SET DZVP-GTH
POTENTIAL GTH-BLYP-q1
&END KIND
&KIND O
BASIS_SET DZVP-GTH
POTENTIAL GTH-BLYP-q6
&END KIND
&END SUBSYS
&END FORCE_EVAL
&GLOBAL
Expand Down
20 changes: 6 additions & 14 deletions tests/xTB/regtest-2/H2O-field.inp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
&DFT
&PRINT
&MOMENTS
PERIODIC T
&END
&DERIVATIVES
&END
Expand All @@ -19,31 +20,22 @@
&SCF
EPS_SCF 1.e-8
MAX_SCF 90
&OT OFF
MINIMIZER CG
LINESEARCH 3PNT
PRECONDITIONER FULL_S_INVERSE
&END OT
&END SCF
&POISSON
&EWALD
ALPHA 10.0
ALPHA 1.0
EWALD_TYPE SPME
GMAX 75
&END EWALD
&END POISSON
&PERIODIC_EFIELD
POLARISATION 0 0 1
INTENSITY 0.05
INTENSITY 0.005
&END
#&EFIELD
# POLARISATION 0 0.5 1
# INTENSITY 0.05
#&END
&END DFT
&SUBSYS
&CELL
ABC 6.0 6.0 6.0
ABC 4.0 4.0 4.0
&END CELL
&COORD
O 0.000000 0.000000 -0.065587 H2O
Expand All @@ -61,7 +53,7 @@
&DEBUG
DEBUG_FORCES T
DEBUG_STRESS_TENSOR F
STOP_ON_MISMATCH F
DX 0.0001
STOP_ON_MISMATCH T
DX 0.001
&END DEBUG

46 changes: 16 additions & 30 deletions tests/xTB/regtest-2/HF-dfield-debug.inp
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,40 @@
PERIODIC T
&END
&END
BASIS_SET_FILE_NAME GTH_BASIS_SETS
POTENTIAL_FILE_NAME POTENTIAL
&MGRID
CUTOFF 300
&END MGRID
&PERIODIC_EFIELD
POLARISATION 1 2 5
INTENSITY 0.005
DISPLACEMENT_FIELD
DISPLACEMENT_FIELD F
&END
&QS
EPS_DEFAULT 1.0E-14
MAP_CONSISTENT
METHOD xTB
&XTB
DO_EWALD T
&END
&END QS
&POISSON
&EWALD
ALPHA 1.0
EWALD_TYPE SPME
GMAX 75
&END EWALD
&END POISSON
&SCF
EPS_SCF 1.0E-8
SCF_GUESS ATOMIC
MAX_SCF 100
&OT
MINIMIZER DIIS
&END
&OUTER_SCF
MAX_SCF 50
&END
&END SCF
&XC
&XC_FUNCTIONAL PADE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
A 6.0 0.0 0.0
B 0.0 6.0 0.0
C 0.0 0.0 6.0
A 4.0 0.0 0.0
B 0.0 4.0 0.0
C 0.0 0.0 4.0
&END CELL
&COORD
H 0.000000 0.000000 0.000000
F 0.940000 0.000000 0.000000
&END COORD
&KIND H
BASIS_SET DZVP-GTH
POTENTIAL GTH-BLYP-q1
&END KIND
&KIND F
BASIS_SET DZVP-GTH
POTENTIAL GTH-BLYP-q7
&END KIND
&END SUBSYS
&END FORCE_EVAL
&GLOBAL
Expand All @@ -64,6 +50,6 @@
&DEBUG
DEBUG_FORCES T
DEBUG_STRESS_TENSOR F
STOP_ON_MISMATCH T
STOP_ON_MISMATCH F
DX 0.0001
&END DEBUG
37 changes: 11 additions & 26 deletions tests/xTB/regtest-2/HF-dfield-gopt.inp
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,29 @@
PERIODIC T
&END
&END
BASIS_SET_FILE_NAME GTH_BASIS_SETS
POTENTIAL_FILE_NAME POTENTIAL
&MGRID
CUTOFF 300
NGRIDS 1
&END MGRID
&PERIODIC_EFIELD
POLARISATION 1 2 5
INTENSITY 0.005
DISPLACEMENT_FIELD
&END
&QS
EPS_DEFAULT 1.0E-14
MAP_CONSISTENT
METHOD xTB
&XTB
DO_EWALD T
&END
&END QS
&POISSON
&EWALD
ALPHA 1.0
EWALD_TYPE SPME
GMAX 75
&END EWALD
&END POISSON
&SCF
EPS_SCF 1.0E-8
SCF_GUESS ATOMIC
MAX_SCF 100
&OT
MINIMIZER DIIS
&END
&OUTER_SCF
MAX_SCF 50
&END
&END SCF
&XC
&XC_FUNCTIONAL PADE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
Expand All @@ -47,14 +40,6 @@
H 0.000000 0.000000 0.000000
F 0.940000 0.000000 0.000000
&END COORD
&KIND H
BASIS_SET DZVP-GTH
POTENTIAL GTH-BLYP-q1
&END KIND
&KIND F
BASIS_SET DZVP-GTH
POTENTIAL GTH-BLYP-q7
&END KIND
&END SUBSYS
&END FORCE_EVAL
&GLOBAL
Expand Down

0 comments on commit 68cf02e

Please sign in to comment.