Skip to content

Commit

Permalink
Merge pull request dftbplus#1395 from bhourahine/skErrMessage
Browse files Browse the repository at this point in the history
Improve error message for provided SK files
  • Loading branch information
vanderhe authored Feb 15, 2024
2 parents 7530d37 + c986ed1 commit 432f4a7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/dftbp/dftbplus/parser.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1400,13 +1400,14 @@ subroutine readDFTBHam(node, ctrl, geo, slako, poisson, errStatus)
call setUnprocessed(value1)
do iSp1 = 1, geo%nSpecies
do iSp2 = 1, geo%nSpecies
strTmp = trim(geo%speciesNames(iSp1)) // "-" &
&// trim(geo%speciesNames(iSp2))
strTmp = trim(geo%speciesNames(iSp1)) // "-" // trim(geo%speciesNames(iSp2))
call init(lStr)
call getChildValue(child, trim(strTmp), lStr, child=child2)
if (len(lStr) /= len(angShells(iSp1)) * len(angShells(iSp2))) then
call detailedError(child2, "Incorrect number of Slater-Koster &
&files")
write(errorStr, "(A,I0,A,I0)")"Incorrect number of Slater-Koster files for " //&
& trim(strTmp) // ", expected ", len(angShells(iSp1)) * len(angShells(iSp2)),&
& " but received ", len(lStr)
call detailedError(child2, errorStr)

Check warning on line 1410 in src/dftbp/dftbplus/parser.F90

View check run for this annotation

Codecov / codecov/patch

src/dftbp/dftbplus/parser.F90#L1408-L1410

Added lines #L1408 - L1410 were not covered by tests
end if
do ii = 1, len(lStr)
call get(lStr, strTmp, ii)
Expand Down

0 comments on commit 432f4a7

Please sign in to comment.