Skip to content

Tabular, time-series, scientific, and geometric deep learning · Molecular and scientific deep learning · SPE011 · Architecture

SchNet

SchNet learns molecular and material properties from atomic types and positions using continuous distance-dependent filters.

Needs a data type CodeSplash doesn't load yet Component demo, not a trained model CodeSplash's run and the reference's record

In CodeSplash

Running this needs images, audio, video, graphs or another data type CodeSplash doesn't load yet.

Availability
Needs a data type CodeSplash doesn't load yet
Code example
Component demo, not a trained model
Who ran it
CodeSplash's run and the reference's record
CodeSplash's run
The reference's example ran in Python and R here, and they agree.
The reference's record
Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

SchNet learns molecular and material properties from atomic types and positions using continuous distance-dependent filters. It can model energies and, through energy differentiation, forces without hand-crafting every geometric descriptor.

Question / hypotheses

The operative question is whether the specified representation, symmetry, likelihood or physical constraint improves held-out behavior for this data domain. This is a learning framework, not a null-hypothesis test; losses, attention weights and predictive confidence are not statistical p-values.

Architecture / computational structure

Atomic embeddings pass through interaction blocks whose continuous filters depend on pair distances expanded in radial basis functions. Atomwise outputs aggregate into molecular properties; differentiable scalar energy can yield conservative forces.

Assumptions

Distance-based scalar features provide rotational invariance but may limit geometric expressivity relative to richer equivariant models. Long-range physics, periodic boundaries, chemical coverage and smooth cutoff behavior must be explicitly handled.

Formula / computational definition

hil+1=hil+∑jhjl⊙Wl(∥ri−rj∥)h_i^{l+1}=h_i^l+\sum_j h_j^l\odot W_l(\|r_i-r_j\|) schematically describes continuous-filter interaction. For an energy model, E=∑iEi(hi)E=\sum_iE_i(h_i) and Fi=−∇riEF_i=-\nabla_{r_i}E.

Parameters and notation

Learned or estimated: Element embeddings, radial-filter networks, interaction projections and atomwise energy/property heads.

Hyperparameters and effects: Distance cutoff, radial-basis count/width, interaction depth, feature width, energy/force loss weights and unit conventions. Cutoffs trade locality against cost; force weighting changes which errors dominate fitting.

Fitting, fine-tuning, and adaptation

Fit property targets or combined energy/force losses on consistent reference calculations. Transfer chemical embeddings/interactions only for compatible species and units; adapt heads first, then unfreeze at lower rates. Recheck force derivatives, source chemical accuracy and stability after fine-tuning; a small energy loss does not guarantee useful dynamics.

How to use and calibrate

Define the independent evaluation unit before preprocessing: row/entity, whole set/object, molecule/trajectory, input function or chronological forecasting origin. Keep target construction and normalization within permitted training data. Use molecule-, scaffold- or trajectory-separated splits; report energy and force errors in physical units, rotation invariance, energy conservation behavior and out-of-domain chemistry.

Example application

Construct a molecular potential trained on quantum-reference energies and forces. This is a proposed use case, not a claim of validated performance on supplied real data.

Interpretation / pitfalls

Watch out

Assess model error against domain baselines and the stated assumptions. Component-level mathematical correctness does not establish paper reproduction or scientific validity. Invariance/equivariance checks validate transformation behavior; they do not establish correct physical dynamics or chemical accuracy.

Python and R code examples

Scope: SchNet-style radial-filter feature messages with rigid-rotation invariance. Use the shared setup. Dependencies: NumPy / base R. Validation: Python executed; R unexecuted.

Full-model route: Python: SchNetPack or an audited official implementation. R: small native torch radial interactions or a labeled bridge. The example computes radial-filter messages and verifies rigid-rotation invariance; it does not train an interatomic potential.

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Component demo, not a trained model — SchNet-style radial-filter feature messages with rigid-rotation invariance. Use the shared setup.

Shared setup for this chapter
import numpy as np
def sm(x):
    x=np.asarray(x); e=np.exp(x-x.max(axis=-1,keepdims=True)); return e/e.sum(axis=-1,keepdims=True)
P=np.array([[0.,0.],[1.,0.],[.2,.7]]); h=np.array([1.,.5,.8])
def radial(P):
    d=np.linalg.norm(P[:,None,:]-P[None,:,:],axis=-1)
    filt=np.exp(-2*(d-.7)**2); np.fill_diagonal(filt,0)
    return h+filt@h
R=np.array([[0.,-1.],[1.,0.]])
assert np.allclose(radial(P),radial(P@R.T))
print(radial(P))
R

Component demo, not a trained model — SchNet-style radial-filter feature messages with rigid-rotation invariance. Use the shared setup.

Shared setup for this chapter
sm <- function(x) {
  if(is.null(dim(x))) { e<-exp(x-max(x)); return(e/sum(e)) }
  t(apply(x,1,function(v) { e<-exp(v-max(v)); e/sum(e) }))
}
P<-matrix(c(0,0,1,0,.2,.7),3,byrow=TRUE); h<-c(1,.5,.8)
radial<-function(P) { d<-as.matrix(dist(P)); filt<-exp(-2*(d-.7)^2); diag(filt)<-0; h+as.vector(filt%*%h) }
R<-matrix(c(0,-1,1,0),2,byrow=TRUE)
stopifnot(max(abs(radial(P)-radial(P%*%t(R))))<1e-12); print(radial(P))

Sources

From the CodeSplash reference, entry SPE011.