Skip to content

Commit 6d56de8

Browse files
committed
WIP
1 parent 9839713 commit 6d56de8

File tree

26 files changed

+540
-677
lines changed

26 files changed

+540
-677
lines changed

src/dftbp/dftb/getenergies.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ subroutine calcEnergies(env, sccCalc, tblite, qOrb, q0, chargePerShell, multipol
7676
type(TMultipole), intent(in) :: multipole
7777

7878
!> DFTB multipole moments
79-
type(TMdftb), intent(inout), allocatable :: mdftb
79+
type(TMdftb), intent(in), allocatable :: mdftb
8080

8181
!> chemical species
8282
!> Chemical species

src/dftbp/dftb/mdftb.F90

Lines changed: 308 additions & 462 deletions
Large diffs are not rendered by default.

src/dftbp/dftb/shortgammafuncs.F90

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ end function gammaSubExprnPrime_
333333

334334

335335
!> Determines the value of a part of the short range contribution to the exponential gamma, when
336-
!> Ua /= Ub and R > 0
336+
!! Ua /= Ub and R > 0
337337
function gammaSubfExprn(rab,tau1,tau2)
338338

339339
!> separation of sites a and b
@@ -365,7 +365,7 @@ end function gammaSubfExprn
365365

366366

367367
!> Determines the value of a part of the short range contribution to the exponential gamma, when
368-
!> Ua /= Ub and R > 0
368+
!! Ua /= Ub and R > 0
369369
function gammaSubgExprn(rab,tauMean)
370370

371371
!> separation of sites a and b
@@ -391,7 +391,7 @@ end function gammaSubgExprn
391391

392392

393393
!> Determines the derivative of the value of a part of the short range contribution to the
394-
!> exponential gamma, when Ua /= Ub and R > 0
394+
!! exponential gamma, when Ua /= Ub and R > 0
395395
function gammaSubfExprnPrime(rab, tau1, tau2)
396396

397397
!> separation of sites a and b
@@ -423,7 +423,7 @@ end function gammaSubfExprnPrime
423423

424424

425425
!> Determines the value of a part of the short range contribution to the exponential gamma, when
426-
!> Ua /= Ub and R > 0
426+
!! Ua /= Ub and R > 0
427427
function gammaSubgExprnPrime(rab, tauMean)
428428

429429
!> separation of sites a and b
@@ -449,7 +449,7 @@ end function gammaSubgExprnPrime
449449

450450

451451
!> Determines the seconde derivative of the value of a part of the short range contribution to the
452-
!> exponential gamma, when Ua /= Ub and R > 0
452+
!! exponential gamma, when Ua /= Ub and R > 0
453453
function gammaSubfExprnDoublePrime(rab, tau1, tau2)
454454

455455
!> separation of sites a and b
@@ -479,7 +479,7 @@ function gammaSubfExprnDoublePrime(rab, tau1, tau2)
479479
end function gammaSubfExprnDoublePrime
480480

481481
!> Determines the value of a part of the short range contribution to the exponential gamma, when
482-
!> Ua /= Ub and R > 0
482+
!! Ua /= Ub and R > 0
483483
function gammaSubgExprnDoublePrime(rab, tauMean)
484484

485485
!> separation of sites a and b
@@ -503,7 +503,7 @@ end function gammaSubgExprnDoublePrime
503503

504504

505505
!> Determines the seconde derivative of the value of a part of the short range contribution to the
506-
!> exponential gamma, when Ua /= Ub and R > 0
506+
!! exponential gamma, when Ua /= Ub and R > 0
507507
function gammaSubfExprnTriplePrime(rab, tau1, tau2)
508508

509509
!> separation of sites a and b
@@ -533,7 +533,7 @@ function gammaSubfExprnTriplePrime(rab, tau1, tau2)
533533
end function gammaSubfExprnTriplePrime
534534

535535
!> Determines the value of a part of the short range contribution to the exponential gamma, when
536-
!> Ua /= Ub and R > 0
536+
!! Ua /= Ub and R > 0
537537
function gammaSubgExprnTriplePrime(rab, tauMean)
538538

539539
!> separation of sites a and b
@@ -556,7 +556,7 @@ end function gammaSubgExprnTriplePrime
556556

557557

558558
!> Determines the seconde derivative of the value of a part of the short range contribution to the
559-
!> exponential gamma, when Ua /= Ub and R > 0
559+
!! exponential gamma, when Ua /= Ub and R > 0
560560
function gammaSubfExprnQuadruplePrime(rab, tau1, tau2)
561561

562562
!> separation of sites a and b
@@ -586,7 +586,7 @@ function gammaSubfExprnQuadruplePrime(rab, tau1, tau2)
586586
end function gammaSubfExprnQuadruplePrime
587587

588588
!> Determines the value of a part of the short range contribution to the exponential gamma, when
589-
!> Ua /= Ub and R > 0
589+
!! Ua /= Ub and R > 0
590590
function gammaSubgExprnQuadruplePrime(rab, tauMean)
591591

592592
!> separation of sites a and b
@@ -609,7 +609,7 @@ end function gammaSubgExprnQuadruplePrime
609609

610610

611611
!> Determines the seconde derivative of the value of a part of the short range contribution to the
612-
!> exponential gamma, when Ua /= Ub and R > 0
612+
!! exponential gamma, when Ua /= Ub and R > 0
613613
function gammaSubfExprnQuintuplePrime(rab, tau1, tau2)
614614

615615
!> separation of sites a and b
@@ -639,7 +639,7 @@ function gammaSubfExprnQuintuplePrime(rab, tau1, tau2)
639639
end function gammaSubfExprnQuintuplePrime
640640

641641
!> Determines the value of a part of the short range contribution to the exponential gamma, when
642-
!> Ua /= Ub and R > 0
642+
!! Ua /= Ub and R > 0
643643
function gammaSubgExprnQuintuplePrime(rab, tauMean)
644644

645645
!> separation of sites a and b
@@ -662,7 +662,7 @@ end function gammaSubgExprnQuintuplePrime
662662

663663

664664
!> Determines the value of the second derivative of the short range contribution to gamma with the
665-
!> exponential form
665+
!! exponential form
666666
function expGammaDoublePrime(rab, Ua, Ub)
667667

668668
!> separation of sites a and b
@@ -726,7 +726,7 @@ end function expGammaDoublePrime
726726

727727

728728
!> Determines the value of the third derivative of the short range contribution to gamma with the
729-
!> exponential form
729+
!! exponential form
730730
function expGammaTriplePrime(rab, Ua, Ub)
731731

732732
!> separation of sites a and b
@@ -786,7 +786,7 @@ end function expGammaTriplePrime
786786

787787

788788
!> Determines the value of the fourth derivative of the short range contribution to gamma with the
789-
!> exponential form
789+
!! exponential form
790790
function expGammaQuadruplePrime(rab, Ua, Ub)
791791

792792
!> separation of sites a and b
@@ -856,7 +856,7 @@ end function expGammaQuadruplePrime
856856

857857

858858
!> Determines the value of the fifth derivative of the short range contribution to gamma with the
859-
!> exponential form
859+
!! exponential form
860860
function expGammaQuintuplePrime(rab, Ua, Ub)
861861

862862
!> separation of sites a and b

src/dftbp/dftbplus/initprogram.F90

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6996,6 +6996,9 @@ subroutine ensureMdftbCompatibility(this, input)
69966996
if (this%tExtChrg) then
69976997
call error("DFTB multipole expansion currently unsupported for external charges")
69986998
end if
6999+
if (allocated(this%eField)) then
7000+
call error("DFTB multipole expansion currently unsupported for external electric field")
7001+
end if
69997002
if (input%ctrl%tSpin) then
70007003
call error("DFTB multipole expansion currently unsupported for spin-polarised&
70017004
& calculations")
@@ -7013,6 +7016,17 @@ subroutine ensureMdftbCompatibility(this, input)
70137016
if (input%ctrl%tShellResolved) then
70147017
call error("DFTB multipole expansion currently incompatible with shell-resolved SCC")
70157018
end if
7019+
if (allocated(input%ctrl%elecDynInp)) then
7020+
call error("DFTB multipole expansion currently unsupported for electron dynamics&
7021+
& calculations")
7022+
end if
7023+
if (allocated(input%ctrl%perturbInp)) then
7024+
call error("DFTB multipole expansion currently incompatible with perturbation&
7025+
& calculations")
7026+
end if
7027+
if (allocated(this%reks)) then
7028+
call error("DFTB multipole expansion currently incompatible with REKS calculations")
7029+
end if
70167030
#:if WITH_TRANSPORT
70177031
! Check for incompatible options if this is a transport calculation
70187032
if (this%transpar%nCont > 0 .or. this%isAContactCalc) then

src/dftbp/dftbplus/mainio.F90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5952,6 +5952,8 @@ subroutine writeCosmoFile(solvation, species0, speciesNames, coords0, energy)
59525952

59535953
end subroutine writeCosmoFile
59545954

5955+
5956+
!> Prints out the total quadrupole moment of the system
59555957
subroutine printQuadrupoleMoment(quadrupoleMoment, outUnit)
59565958

59575959
!> quadrupole moment
@@ -5987,4 +5989,5 @@ subroutine printQuadrupoleMoment(quadrupoleMoment, outUnit)
59875989

59885990
end subroutine printQuadrupoleMoment
59895991

5992+
59905993
end module dftbp_dftbplus_mainio

src/dftbp/dftbplus/parser.F90

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,47 +2346,47 @@ subroutine readMdftb(node, ctrl, geo)
23462346

23472347
call getChild(value1, 'OneCenterAtomIntegrals', child2, requested=.true.)
23482348
do iSp1 = 1, geo%nSpecies
2349-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S_X_Px",&
2349+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S|X|Px",&
23502350
& ctrl%mdftbAtomicIntegrals%SXPx(iSp1), 0.0_dp)
2351-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Px_X_Dxx-yy",&
2351+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Px|X|Dxx-yy",&
23522352
& ctrl%mdftbAtomicIntegrals%PxXDxxyy (iSp1), 0.0_dp)
2353-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Px_X_Dzz",&
2353+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Px|X|Dzz",&
23542354
& ctrl%mdftbAtomicIntegrals%PxXDzz(iSp1), 0.0_dp)
2355-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Py_Y_Dxx-yy",&
2355+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Py|Y|Dxx-yy",&
23562356
& ctrl%mdftbAtomicIntegrals%PyYDxxyy(iSp1), 0.0_dp)
2357-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Pz_Z_Dzz",&
2357+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Pz|Z|Dzz",&
23582358
& ctrl%mdftbAtomicIntegrals%PzZDzz(iSp1), 0.0_dp)
2359-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S_XX_S",&
2359+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S|XX|S",&
23602360
& ctrl%mdftbAtomicIntegrals%SXXS(iSp1), 0.0_dp)
2361-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Px_XX_Px",&
2361+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Px|XX|Px",&
23622362
& ctrl%mdftbAtomicIntegrals%PxXXPx(iSp1), 0.0_dp)
2363-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Py_XX_Py",&
2363+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Py|XX|Py",&
23642364
& ctrl%mdftbAtomicIntegrals%PyXXPy(iSp1), 0.0_dp)
2365-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S_XX_Dxx-yy",&
2365+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S|XX|Dxx-yy",&
23662366
& ctrl%mdftbAtomicIntegrals%SXXDxxyy(iSp1), 0.0_dp)
2367-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S_XX_Dzz",&
2367+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S|XX|Dzz",&
23682368
& ctrl%mdftbAtomicIntegrals%SXXDzz(iSp1), 0.0_dp)
2369-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S_YY_Dxx-yy",&
2369+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S|YY|Dxx-yy",&
23702370
& ctrl%mdftbAtomicIntegrals%SYYDxxyy(iSp1), 0.0_dp)
2371-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S_ZZ_Dzz",&
2371+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":S|ZZ|Dzz",&
23722372
& ctrl%mdftbAtomicIntegrals%SZZDzz(iSp1), 0.0_dp)
2373-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dxy_XX_Dxy",&
2373+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dxy|XX|Dxy",&
23742374
& ctrl%mdftbAtomicIntegrals%DxyXXDxy(iSp1), 0.0_dp)
2375-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dyz_XX_Dyz",&
2375+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dyz|XX|Dyz",&
23762376
& ctrl%mdftbAtomicIntegrals%DyzXXDyz(iSp1), 0.0_dp)
2377-
!call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dxx-yy_XX_Dzz",&
2378-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dzz_XX_Dxx-yy",&
2377+
!call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dxx-yy|XX|Dzz",&
2378+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dzz|XX|Dxx-yy",&
23792379
& ctrl%mdftbAtomicIntegrals%DxxyyXXDzz(iSp1), 0.0_dp)
2380-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dzz_XX_Dzz",&
2380+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dzz|XX|Dzz",&
23812381
& ctrl%mdftbAtomicIntegrals%DzzXXDzz(iSp1), 0.0_dp)
2382-
!call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dxx-yy_YY_Dzz",&
2383-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dzz_YY_Dxx-yy",&
2382+
!call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dxx-yy|YY|Dzz",&
2383+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dzz|YY|Dxx-yy",&
23842384
& ctrl%mdftbAtomicIntegrals%DxxyyYYDzz(iSp1), 0.0_dp)
2385-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dzz_ZZ_Dzz",&
2385+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dzz|ZZ|Dzz",&
23862386
& ctrl%mdftbAtomicIntegrals%DzzZZDzz(iSp1), 0.0_dp)
2387-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dxz_XZ_Dzz",&
2387+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dxz|XZ|Dzz",&
23882388
& ctrl%mdftbAtomicIntegrals%DxzXZDzz(iSp1), 0.0_dp)
2389-
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dyz_YZ_Dxx-yy",&
2389+
call getChildValue(child2, trim(geo%speciesNames(iSp1))//":Dyz|YZ|Dxx-yy",&
23902390
& ctrl%mdftbAtomicIntegrals%DyzYZDxxyy(iSp1), 0.0_dp)
23912391
end do
23922392
case default

test/app/dftb+/mdftb/2H2O/dftb_in.hsd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ Hamiltonian = DFTB {
3939
O = 3.0
4040
}
4141
OneCenterAtomIntegrals = {
42-
H:S_XX_S = 0.55976
43-
O:S_X_Px = 0.60894
44-
O:S_XX_S = 0.45215
45-
O:Px_XX_Px = 0.83893
46-
O:Py_XX_Py = 0.27964
42+
H:S|XX|S = 0.55976
43+
O:S|X|Px = 0.60894
44+
O:S|XX|S = 0.45215
45+
O:Px|XX|Px = 0.83893
46+
O:Py|XX|Py = 0.27964
4747
}
4848
}
4949

test/app/dftb+/mdftb/32H2O/dftb_in.hsd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ Hamiltonian = DFTB {
129129
O = 3.0
130130
}
131131
OneCenterAtomIntegrals = {
132-
H:S_XX_S = 0.55976
133-
O:S_X_Px = 0.60894
134-
O:S_XX_S = 0.45215
135-
O:Px_XX_Px = 0.83893
136-
O:Py_XX_Py = 0.27964
132+
H:S|XX|S = 0.55976
133+
O:S|X|Px = 0.60894
134+
O:S|XX|S = 0.45215
135+
O:Px|XX|Px = 0.83893
136+
O:Py|XX|Py = 0.27964
137137
}
138138
}
139139

test/app/dftb+/mdftb/Glycine/dftb_in.hsd

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ Hamiltonian = DFTB {
5151
O = 3.0
5252
}
5353
OneCenterAtomIntegrals = {
54-
H:S_XX_S = 0.55976
55-
C:S_X_Px = 0.79621
56-
C:S_XX_S = 0.76689
57-
C:Px_XX_Px = 1.38550
58-
C:Py_XX_Py = 0.46183
59-
N:S_X_Px = 0.68857
60-
N:S_XX_S = 0.57638
61-
N:Px_XX_Px = 1.05308
62-
N:Py_XX_Py = 0.35103
63-
O:S_X_Px = 0.60894
64-
O:S_XX_S = 0.45215
65-
O:Px_XX_Px = 0.83893
66-
O:Py_XX_Py = 0.27964
54+
H:S|XX|S = 0.55976
55+
C:S|X|Px = 0.79621
56+
C:S|XX|S = 0.76689
57+
C:Px|XX|Px = 1.38550
58+
C:Py|XX|Py = 0.46183
59+
N:S|X|Px = 0.68857
60+
N:S|XX|S = 0.57638
61+
N:Px|XX|Px = 1.05308
62+
N:Py|XX|Py = 0.35103
63+
O:S|X|Px = 0.60894
64+
O:S|XX|S = 0.45215
65+
O:Px|XX|Px = 0.83893
66+
O:Py|XX|Py = 0.27964
6767
}
6868
}
6969

test/app/dftb+/mdftb/Glycine_Ordering/dftb_in.hsd

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ Hamiltonian = DFTB {
5151
O = 3.0
5252
}
5353
OneCenterAtomIntegrals = {
54-
H:S_XX_S = 0.55976
55-
C:S_X_Px = 0.79621
56-
C:S_XX_S = 0.76689
57-
C:Px_XX_Px = 1.38550
58-
C:Py_XX_Py = 0.46183
59-
N:S_X_Px = 0.68857
60-
N:S_XX_S = 0.57638
61-
N:Px_XX_Px = 1.05308
62-
N:Py_XX_Py = 0.35103
63-
O:S_X_Px = 0.60894
64-
O:S_XX_S = 0.45215
65-
O:Px_XX_Px = 0.83893
66-
O:Py_XX_Py = 0.27964
54+
H:S|XX|S = 0.55976
55+
C:S|X|Px = 0.79621
56+
C:S|XX|S = 0.76689
57+
C:Px|XX|Px = 1.38550
58+
C:Py|XX|Py = 0.46183
59+
N:S|X|Px = 0.68857
60+
N:S|XX|S = 0.57638
61+
N:Px|XX|Px = 1.05308
62+
N:Py|XX|Py = 0.35103
63+
O:S|X|Px = 0.60894
64+
O:S|XX|S = 0.45215
65+
O:Px|XX|Px = 0.83893
66+
O:Py|XX|Py = 0.27964
6767
}
6868
}
6969

0 commit comments

Comments
 (0)