H₂CO iResNet coordinate transformation — valence coordinates
Trained iResNet normalising-flow bijection that maps H₂CO valence internal coordinates (rCO, rCH₁, rCH₂, αOCH₁, αOCH₂, τ) to dimensionless flow coordinates (q̃₁, …, q̃₆) optimised for variational nuclear-motion calculations.
This model was published in:
Yahya Saleh, Álvaro Fernández Corral, Emil Vogt, Armin Iske, Jochen Küpper, and Andrey Yachmenev. Computing Excited States of Molecules Using Normalizing Flows. J. Chem. Theory Comput. 2025, 21 (10), 5221–5229. https://doi.org/10.1021/acs.jctc.5c00590
What this is
The coordinate transformation is an invertible residual network (iResNet) that learns a bijection from the physical internal coordinate space of H₂CO to a latent space. The latent space improves the accuracy of variational vibrational energy level calculations.
Input / output
| Symbol | Unit | Description | |
|---|---|---|---|
| Input | rCO | Å | C=O bond length |
| Input | rCH₁ | Å | C–H₁ bond length |
| Input | rCH₂ | Å | C–H₂ bond length |
| Input | αOCH₁ | rad | O–C–H₁ bond angle |
| Input | αOCH₂ | rad | O–C–H₂ bond angle |
| Input | τ | rad | H–C–H out-of-plane (dihedral) angle |
| Output | q̃₁, …, q̃₆ | dimensionless | iResNet flow coordinates |
Reference geometry
| Coordinate | Value |
|---|---|
| rCO | 1.20337419 Å |
| rCH₁, rCH₂ | 1.10377465 Å |
| αOCH₁, αOCH₂ | 2.1265833 rad |
| τ | π rad |
Architecture
- Type: invertible residual network (iResNet)
- Blocks: 10 residual blocks
- Dense layers per block: 3 (widths 8 → 8 → 6)
- Activation: LipSwish ( x·σ(x)/1.1 )
- Lipschitz constraint: SVD spectral clipping at 0.9 per layer
- Inversion: 30-step fixed-point iteration
All arithmetic is in float64. Both the forward and inverse passes are fully
JAX-traceable (jax.jit, jax.grad, jax.hessian, jax.vmap).
Repository contents
| File | Description |
|---|---|
config.json |
Architecture hyperparameters (model_type: "iresnet") |
flax_model.msgpack |
Trained parameters {"params": ...}, serialised with flax.serialization (float64) |
The repository contains no code. The architecture is defined once, for all
molecules, in pyhami as the flax module
pyhami.core.flax_iresnet.IResNetFlow. msgpack is plain data, so loading the
weights cannot execute code.
Loading and using the model
With pyhami (recommended):
import jax.numpy as jnp
from pyhami.molecules.h2co.coords import H2COIResNetTransformation
transf = H2COIResNetTransformation() # downloads config + weights once, then cached
q_phys = jnp.array([1.20337, 1.10377, 1.10377, 2.12658, 2.12658, 3.14159]) # (rCO, rCH1, rCH2 [Å], αOCH1, αOCH2, τ [rad])
q_tilde = transf.forward(q_phys) # → flow coords
q_back = transf.inverse(q_tilde) # → physical coords
# fine-tuning: parameters become JAX pytree leaves
transf = H2COIResNetTransformation(trainable=True)
The raw files can also be read directly with flax:
import json
from flax.serialization import msgpack_restore
from huggingface_hub import hf_hub_download
config = json.load(open(hf_hub_download("Robochimps/h2co-iresnet-valence", "config.json")))
variables = msgpack_restore(open(hf_hub_download("Robochimps/h2co-iresnet-valence", "flax_model.msgpack"), "rb").read())
Citation
If you use this model in your work, please cite:
@article{saleh2025flows,
author = {Saleh, Yahya and Fern{\'a}ndez Corral, {\'A}lvaro and Vogt, Emil
and Iske, Armin and K{\"u}pper, Jochen and Yachmenev, Andrey},
title = {Computing Excited States of Molecules Using Normalizing Flows},
journal = {Journal of Chemical Theory and Computation},
year = {2025},
volume = {21},
number = {10},
pages = {5221--5229},
doi = {10.1021/acs.jctc.5c00590},
}
- Downloads last month
- 8