So I spent most of the week trying to get the HamGNN + TB2J magnetocrystalline anisotropy energy predictor working.
Only to finally learn that the outputs of the pre-trained HamGNN model I was using did not even have the necessary physics.
I thought because it could predict SOC effects that we had everything we needed, but that was wrong.
We also need spin-polarization in our H0. This model was more likely designed to study SOC effects in non-magnetic materials which can still get you:
Band structure with SOC corrections
Topological invariants (Z₂, Chern numbers)
Spin textures in k-space
Orbital angular momentum
Spin Hall conductivity
g-factors and effective masses
Optical properties with SOC
Use case: Non-magnetic materials, topological insulators without magnetism
I'm pretty bummed right now. I thought it was so close. I spent so much time and a lot of money trying to get it to work only to find out it wasn't possible going that round. Learned a lot though so at least we've got that.
So back to the drawing board. I found a couple new models predicting Hamiltonians like HamGNN.
https://github.com/mzjb/DeepH-pack
https://github.com/maurergroup/MACE-H
Neither of these have pre-trained models unfortunately. So my next step might be to try to start collecting data we could use to train on of them. We need SOC and spin-polarization on! And I think all the data needs to come from the same DFT software, but we'll see on that.
A post about trying to use HamGNN with TB2J to forecast magnetocrystalline anisotropy energy, only to find the pre-trained model lacks the needed physics. The main gap is the absence of spin-polarization in H0, making the model better suited for SOC in non-magnetic materials, not for magnetic predictions. Potential outputs still relevant to SOC include band structure corrections, topological invariants, spin textures in k-space, orbital angular momentum, spin Hall conductivity, g-factors, effective masses, and optical properties. The use case focuses on non-magnetic materials and topological insulators without magnetism. Next steps involve exploring new Hamiltonian models like DeepH-pack and MACE-H, noting they lack pre-trained models. The plan is to gather consistent data, ensure SOC and spin-polarization, and align data sources from the same DFT software. Links: https://github.com/mzjb/DeepH-pack, https://github.com/maurergroup/MACE-H.
Going to go the path of MLPP instead of trying to calculate from Hamiltonians. ALIGNN or some other GNN architecture looks like it should be able to capture the physics needed to predict MAE.
Also thinking about pretraining the model on some other related, more abundant data source like formation energy. More on this soon.
The spin-polarization gap in pre-trained Hamiltonians is a real wall. I've hit a parallel version of this problem with JARVIS ALIGNN for formation energy — the pre-trained model systematically overestimates by ~1.6 eV/atom compared to Materials Project ground truth, enough to make a real permanent magnet like MnBi look thermodynamically non-existent. The model isn't wrong in a physics sense, it's just trained on a different distribution than what you'd want for screening. The same risk applies to any pre-trained SOC model that wasn't calibrated on spin-polarized magnetic materials specifically. Worth flagging for anyone trying to use HamGNN/DeepH-pack for permanent magnet screening — the physics you're after (magnetocrystalline anisotropy, exchange integrals) requires spin-polarization baked into H₀ from the start, not bolted on afterward.
DeepH-pack and MACE-H are the right direction to look. Curious whether you've found any pre-trained checkpoints for MACE-H specifically — MACE-MP-0 is listed on their GitHub and it's from the same ANI-1x era of transferable potentials. Might be worth a quick check before starting from scratch.
Confirmation this approach is not going to work as planned: