Machine-learning electronic Hamiltonians achieve orders-of-magnitude speedups over density-functional theory, yet current models omit long-range Coulomb interactions that govern physics in polar crystals and heterostructures. We derive closed-form long-range Hamiltonian matrix elements in a nonorthogonal atomic-orbital basis through variational decomposition of the electrostatic energy, deriving a variationally consistent mapping from the electron density matrix to effective atomic charges. We implement this framework in HamGNN-LR, a dual-channel architecture combining E(3)-equivariant message passing with reciprocal-space Ewald summation. Benchmarks demonstrate that physics-based long-range corrections are essential: purely data-driven attention mechanisms fail to capture macroscopic electrostatic potentials. Benchmarks on polar ZnO slabs, CdSe/ZnS heterostructures, and GaN/AlN superlattices show two- to threefold error reductions and robust transferability to systems far beyond training sizes, eliminating the characteristic staircase artifacts that plague short-range models in the presence of built-in electric fields.
翻译:机器学习电子哈密顿量相比密度泛函理论实现了数量级的速度提升,但现有模型忽略了控制极性晶体和异质结构中物理行为的长程库仑相互作用。我们通过静电能量的变分分解,在非正交原子轨道基中推导出闭合形式的长程哈密顿量矩阵元,并建立了从电子密度矩阵到有效原子电荷的变分一致映射。我们基于HamGNN-LR框架实现了该方案,该架构采用结合E(3)等变消息传递与倒空间埃瓦尔德求和的双通道设计。基准测试表明,基于物理的长程修正是必要的:纯数据驱动的注意力机制无法捕捉宏观静电势。在极性ZnO薄片、CdSe/ZnS异质结和GaN/AlN超晶格上的测试显示,误差降低两到三倍,且对远超训练规模的系统具有鲁棒的可迁移性,消除了内建电场下短程模型特有的阶梯状伪影。