On the Inclusion of Charge and Spin States in Cartesian Tensor Neural Network Potentials

Guillem Simeon, Antonio Mirarchi, Raúl P. Peláez, Raimondas Galvelis, Gianni De Fabritiis

Abstract

In this letter, we present an extension to TensorNet, a state-of-the-art equivariant Cartesian tensor neural network potential, allowing it to handle charged molecules and spin states without architectural changes or increased costs. By incorporating these attributes, we address input degeneracy issues, enhancing the model's predictive accuracy across diverse chemical systems. This advancement significantly broadens TensorNet's applicability, maintaining its efficiency and accuracy.

Introduction

Modern neural network potentials (NNPs) typically rely on atomic numbers and spatial coordinates to predict molecular energies and forces. However, this approach suffers from "input degeneracy": systems with identical geometries but different electronic states (e.g., a neutral molecule vs. its cation) appear identical to the model. Consequently, standard NNPs predict the same energy for both, leading to significant inaccuracies in charged or high-spin systems. Traditionally, addressing this requires complex, computationally expensive long-range modules like Ewald summations. This work introduces a "zero-cost" architectural modification to TensorNet to explicitly account for total charge and spin states.

Methodology

The proposed method extends TensorNet, an equivariant model representing atomic environments via rank-2 tensors. The core innovation involves modifying interaction layers with a state-dependent scalar factor. Tensor features are rescaled using the formula $(1 + \lambda_k \psi_k)$, where $\psi_k$ represents a molecular attribute (such as total charge $Q$ or spin $S$) and $\lambda_k$ is a learnable weighting parameter.

This approach offers several advantages:

  1. Equivariance: As a scalar multiplier, it preserves $O(3)$ rotational and reflection symmetry.
  2. Backward Compatibility: For neutral singlet states ($Q=0, S=0$), the model reduces to the original TensorNet architecture.
  3. Efficiency: The modification maintains $O(N)$ scaling, avoiding the $O(N^2)$ costs associated with explicit long-range terms.

Experimental Evaluation

The model was benchmarked across several datasets, including toy degeneracy sets, the SPICE PubChem dataset, chemical clusters, and solvated protein fragments.

Addressing Input Degeneracy

To specifically test the resolution of input degeneracy, the authors created Datasets A and B, consisting of pairs of molecules with identical geometries but differing charges.

Figure 1: Examples of neutral (Dataset A) and charged (Dataset B) molecular pairs used to evaluate input degeneracy.

As shown in the performance metrics, the original TensorNet fails significantly when these datasets are combined, yielding an energy error of 4437 meV. The modified version, TensorNet+0.1Q, reduces this error to 2.5 meV, effectively breaking the degeneracy.

Figure 2: Energy (E) and Force (F) errors on the toy degeneracy datasets. The inclusion of charge information (Q) drastically reduces the error on the combined dataset (A U B).

Broad Performance Gains

Beyond toy datasets, the inclusion of charge information improved accuracy even for neutral molecules in the SPICE dataset, suggesting the model learns a more physically robust representation. On solvated protein fragments, TensorNet+0.1Q achieved an energy MAE of 0.55 kcal/mol, outperforming the previous state-of-the-art, PhysNet (0.95 kcal/mol). Furthermore, incorporating spin states in the QMspin dataset resulted in a 10-fold accuracy improvement, reaching chemical accuracy (43 meV).

Conclusion

By incorporating global molecular attributes as scalar modifiers, TensorNet can accurately model charged and spin-polarized systems without the overhead of explicit physics-based terms. This simple extension resolves fundamental degeneracy issues and sets new performance benchmarks across diverse chemical domains while maintaining computational efficiency.

Summary updated

Abstract

In this letter, we present an extension to TensorNet, a state-of-the-art equivariant Cartesian tensor neural network potential, allowing it to handle charged molecules and spin states without architectural changes or increased costs. By incorporating these attributes, we address input degeneracy issues, enhancing the model's predictive accuracy across diverse chemical systems. This advancement significantly broadens TensorNet's applicability, maintaining its efficiency and accuracy.
BibTeX
@article{simeon2025inclusion,
  author = {Guillem Simeon and Antonio Mirarchi and Raúl P. Peláez and Raimondas Galvelis and Gianni De Fabritiis},
  title = {{On the Inclusion of Charge and Spin States in Cartesian Tensor Neural Network Potentials}},
  journal = {Journal of Chemical Theory and Computation},
  year = {2025},
  doi = {10.1021/acs.jctc.4c01625},
}
Figure