Open benedictsaunders opened 3 years ago
I'm currently working on solution in https://github.com/dftbplus/dftbplus/pull/862, this might be an option to try.
Are there any updates on this issue regarding xTB calculations in the native xtb interface for periodic systems? The SCC calculation with GFN1-xTB does not work. (I receive the same error as the OP.) Currently, it seems that the dftb+ interface is the only way to use xtb. Unfortunately, dftb+ to drive a xTB Hamiltonian is very slow (about 1.5 SCC steps per minute), whereas the same size system as a non-periodic molecule in the native xtb interface is about a second per SCC step. Despite trying several parallelization options for dftb+ (with OMP and MPI), it is still very slow.
Indeed, using DFTB+ to drive calculations using the xTB Hamiltonian introduces an overhead, my checks did show at least a factor of two slowdown with DFTB+ compared to xtb
or tblite
for molecular system, which is unfortunate. I raised this issue with the DFTB+ team, but the issue is rooted somewhat deep in the design of the sparse representation of the Hamiltonian.
On the other hand, for periodic calculations the difference to finite calculation is mainly originating from the calculation of the integrals as well as the Ewald summation and dispersion interactions, however those do not impact the performance of the self-consistent iterations for Γ-point periodic calculations. A quick check with DFTB+ (Γ-only), tblite
and xtb
for a CO2 molecular crystals shows similar runtimes are all three programs (Intel 2022, Release mode with -axAVX2 -Ofast -march=core-avx2 -fma
, MKL), but I will do some proper profiling to check for bottlenecks in tblite
.
I'm planning to introduce Γ-point periodic xTB in xtb
via the tblite
library in the course of this year before finishing my thesis. The full periodic boundary condition support, namely k-point sampling and lattice optimizations, will rely on the infrastructure available in DFTB+, since implementing this from scratch is time-consuming and error-prone.
This are my goals for enabling xTB with PBCs, of course this is not the only solution. This project as well as DFTB+ are open-source projects and contributions are always welcome. I'm also happy to provide pointers to the implementation in either xtb
, tblite
or DFTB+ regarding xTB with PBCs.
Hi,
Have you tried to use xTB-GFN 1 in CP2K package for periodic systems? It works for my systems.
发件人: gavinwinter @.> 发送时间: 2022年5月10日 16:35 收件人: grimme-lab/xtb @.> 抄送: Subscribed @.***> 主题: Re: [grimme-lab/xtb] GFN1 fails for PBC optimisation (Issue #536)
Are there any updates on this issue regarding xTB calculations in the native xtb interface for periodic systems? The SCC calculation with GFN1-xTB does not work. (I receive the same error as the OP.) Currently, it seems that the dftb+ interface is the only way to use xtb. Unfortunately, dftb+ to drive a xTB Hamiltonian is very slow (about 1.5 SCC steps per minute), whereas the same size system as a non-periodic molecule in the native xtb interface is about a second per SCC step. Despite trying several parallelization options for dftb+ (with OMP and MPI), it is still very slow.
― Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/grimme-lab/xtb/issues/536*issuecomment-1122835222__;Iw!!IrdRlI43zQ!d0fDMtLvg6ESbqIc4G1eS278HOMj_2v1bfb5AIl1JA0S0QYS0b2KoLab0Mx_I5tUzpO5IBUbQQhN6zzc-QOhLUBSQhwo1CNICUE$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/APN7ZMOUOEISC3PNVLSQZADVJLCAJANCNFSM5H5HK4EA__;!!IrdRlI43zQ!d0fDMtLvg6ESbqIc4G1eS278HOMj_2v1bfb5AIl1JA0S0QYS0b2KoLab0Mx_I5tUzpO5IBUbQQhN6zzc-QOhLUBSQhwoBfJwwuE$. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi, Have you tried to use xTB-GFN 1 in CP2K package for periodic systems? It works for my systems. … ____ 发件人: gavinwinter @.> 发送时间: 2022年5月10日 16:35 收件人: grimme-lab/xtb @.> 抄送: Subscribed @.> 主题: Re: [grimme-lab/xtb] GFN1 fails for PBC optimisation (Issue #536) Are there any updates on this issue regarding xTB calculations in the native xtb interface for periodic systems? The SCC calculation with GFN1-xTB does not work. (I receive the same error as the OP.) Currently, it seems that the dftb+ interface is the only way to use xtb. Unfortunately, dftb+ to drive a xTB Hamiltonian is very slow (about 1.5 SCC steps per minute), whereas the same size system as a non-periodic molecule in the native xtb interface is about a second per SCC step. Despite trying several parallelization options for dftb+ (with OMP and MPI), it is still very slow. ― Reply to this email directly, view it on GitHub<[https://urldefense.com/v3/__https://github.com/grimme-lab/xtb/issues/536issuecomment-1122835222;Iw!!IrdRlI43zQ!d0fDMtLvg6ESbqIc4G1eS278HOMj_2v1bfb5AIl1JA0S0QYS0b2KoLab0Mx_I5tUzpO5IBUbQQhN6zzc-QOhLUBSQhwo1CNICUE$](https://urldefense.com/v3/https://github.com/grimme-lab/xtb/issues/536*issuecomment-1122835222__;Iw!!IrdRlI43zQ!d0fDMtLvg6ESbqIc4G1eS278HOMj_2v1bfb5AIl1JA0S0QYS0b2KoLab0Mx_I5tUzpO5IBUbQQhN6zzc-QOhLUBSQhwo1CNICUE%24)>, or unsubscribe<https://urldefense.com/v3/https://github.com/notifications/unsubscribe-auth/APN7ZMOUOEISC3PNVLSQZADVJLCAJANCNFSM5H5HK4EA;!!IrdRlI43zQ!d0fDMtLvg6ESbqIc4G1eS278HOMj_2v1bfb5AIl1JA0S0QYS0b2KoLab0Mx_I5tUzpO5IBUbQQhN6zzc-QOhLUBSQhwoBfJwwuE$>. You are receiving this because you are subscribed to this thread.Message ID: *@.>
Hi Wentong, thanks for your response. How large is your system and how long does it take to complete one SC step with xTB-GFN1 in CP2K?
Got it. That makes sense. Thank you for your response.
Indeed, using DFTB+ to drive calculations using the xTB Hamiltonian introduces an overhead, my checks did show at least a factor of two slowdown with DFTB+ compared to
xtb
ortblite
for molecular system, which is unfortunate. I raised this issue with the DFTB+ team, but the issue is rooted somewhat deep in the design of the sparse representation of the Hamiltonian.On the other hand, for periodic calculations the difference to finite calculation is mainly originating from the calculation of the integrals as well as the Ewald summation and dispersion interactions, however those do not impact the performance of the self-consistent iterations for Γ-point periodic calculations. A quick check with DFTB+ (Γ-only),
tblite
andxtb
for a CO2 molecular crystals shows similar runtimes are all three programs (Intel 2022, Release mode with-axAVX2 -Ofast -march=core-avx2 -fma
, MKL), but I will do some proper profiling to check for bottlenecks intblite
.I'm planning to introduce Γ-point periodic xTB in
xtb
via thetblite
library in the course of this year before finishing my thesis. The full periodic boundary condition support, namely k-point sampling and lattice optimizations, will rely on the infrastructure available in DFTB+, since implementing this from scratch is time-consuming and error-prone.This are my goals for enabling xTB with PBCs, of course this is not the only solution. This project as well as DFTB+ are open-source projects and contributions are always welcome. I'm also happy to provide pointers to the implementation in either
xtb
,tblite
or DFTB+ regarding xTB with PBCs.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behaviour:
start
xtb
withPOSCAR --gfn 1 --opt
molecular fragmentation (1/2 indicates fragments): 12
atoms in fragment 1/2: 1 1
fragment masses (1/2) : 22.99 35.45 CMA distance (Bohr) : 9.197 constraining FC (au) : 0.0500
iter E dE RMSdq gap omega full diag ######################################################################## [ERROR] Program stopped due to fatal error -6- Single point calculation terminated -5- xtb_calculator_singlepoint: Electronic structure method terminated -4- scf: Self consistent charge iterator terminated -3- scc_core: Diagonalization of Hamiltonian failed -2- mctc_lapack_sygvd: Failed to solve eigenvalue problem -1- mctc_lapack_potrf: Factorisation of matrix failed ######################################################################## abnormal termination of xtb
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ CONSTRAINTS & SCANS: DEBUG SECTION $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ID Z sym. atoms 1 11 Na 1 2 17 Cl 2 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
molecular fragmentation (1/2 indicates fragments): 12
atoms in fragment 1/2: 1 1
fragment masses (1/2) : 22.99 35.45 CMA distance (Bohr) : 9.197 constraining FC (au) : 0.0500
iter E dE RMSdq gap omega full diag ######################################################################## [ERROR] Program stopped due to fatal error -6- Single point calculation terminated -5- xtb_calculator_singlepoint: Electronic structure method terminated -4- scf: Self consistent charge iterator terminated -3- scc_core: Diagonalization of Hamiltonian failed -2- mctc_lapack_sygvd: Failed to solve eigenvalue problem -1- mctc_lapack_potrf: Factorisation of matrix failed ######################################################################## abnormal termination of xtb
######################################################################## [ERROR] Program stopped due to fatal error -6- Single point calculation terminated -5- xtb_calculator_singlepoint: Electronic structure method terminated -4- scf: Self consistent charge iterator terminated -3- scc_core: Diagonalization of Hamiltonian failed -2- mctc_lapack_sygvd: Failed to solve eigenvalue problem -1- mctc_lapack_potrf: Factorisation of matrix failed ########################################################################
Generated by cif2cell 2.0.0. : Failed to get author information, No journal information. Species order: Nb O V S Li 5.943760 1.000000000000000 0.000000000000000 0.000000000000000 -0.492346036937469 0.877386200126650 0.000000000000000 0.491429882902069 0.242903566922128 0.843787021819361 Nb O V S Li 2 2 2 6 4 Direct 0.500010000000000 0.500010000000000 0.500000000000000 -0.000020000000000 0.499960000000000 0.500010000000000 0.506900000000000 0.242560000000000 0.252560000000000 0.466700000000000 0.724950000000000 0.288280000000000 0.499990000000000 -0.000010000000000 0.500000000000000 0.000000000000000 0.500010000000000 0.000000000000000 0.997000000000000 0.254570000000000 0.243660000000000 0.003000000000000 0.745420000000000 0.756330000000000 0.493080000000000 0.757450000000000 0.747450000000000 0.533320000000000 0.275060000000000 0.711710000000000 0.963890000000000 0.710660000000000 0.276340000000000 0.036120000000000 0.289350000000000 0.723660000000000 0.249030000000000 0.055450000000000 0.055550000000000 0.750980000000000 0.944570000000000 0.944450000000000 0.500010000000000 0.500010000000000 -0.000010000000000 -0.000010000000000 0.000000000000000 0.500010000000000