API Reference
MoC-JEPA is a pretrained framework — Moment-driven Charge Density Joint Embedding Predictive Architecture — that maps a structure into per-node latents, then into one of two SCF seeds: a charge-density grid (.chgcar / .cube) for plane-wave codes, or an initial density matrix (dm0 / mo_c) for GTO codes. Raw AUX coefficients remain available for power users. Billing is metered on Processed Atoms for every DEN or AUX prediction. The API is operated by 本征实验室 (Braketlab Inc.). All requests go over HTTPS to https://api.braketlab.ai/moc-jepa.
01
Upload structure
Crystal .cif / .xyz, or molecule .pdb / .xyz.
02
Encode latents
Backbone returns per-node latents as .h5.
03
Predict DEN or AUX
DEN writes .chgcar / .cube. :seed writes dm0 / mo_c. Raw AUX stays for power users.
04
Seed SCF
VASP: ICHARG=1 reads CHGCAR. GTO: pass dm0 from :seed to PySCF.
Authentication
Authenticate with a secret key in the Authorization header. Generate keys from your dashboard. Never expose a secret key in client-side code.
Authorization: Bearer moc-...Pretrained Backbones
Two independently pretrained backbones share the same architecture and versioning rule. Pick the one that matches your chemistry.
MoC-JEPA-M1-v1.0.pt
moc-jepa-m1Pretrained on crystal datasets in the Materials Project family. Built for solid-state chemistry and condensed-matter problems.
Inputs .cif / .xyz · crystal chemistry, materials discovery, periodic systems
MoC-JEPA-O1-v1.0.pt
moc-jepa-o1Pretrained on single-molecule organic datasets with more complex covalent topologies. Built for drug-discovery workflows.
Inputs .pdb / .xyz · drug discovery, small-molecule screening, ligand design
Density Prediction Models
DEN heads predict a real-space charge-density grid. That grid is native to plane-wave SCF: put CHGCAR next to ICHARG=1 in VASP. Do not project the grid onto an AO density matrix for PySCF or other GTO codes — use AUX :seed instead. Future heads (Band Gap Prediction, Potential Energy Prediction) will reuse the same naming slot.
MoC-JEPA-M1-DEN-v1.0.pt
moc-jepa-m1-denCharge-density grid for periodic cells. Default output is CHGCAR for VASP ICHARG=1. Do not project this grid onto an AO density matrix.
Default .chgcar · optional .cube · pin moc-jepa-m1-den-v1.0
MoC-JEPA-O1-DEN-v1.0.pt
moc-jepa-o1-denReal-space molecular density as Gaussian cube (optional CHGCAR). For GTO SCF (PySCF, Gaussian, TeraChem, PSI4) use AUX :seed for dm0 instead of this grid.
Default .cube · optional .chgcar · pin moc-jepa-o1-den-v1.0
Auxiliary Fitting Models
AUX heads predict density-fitting coefficients in def2-universal-jfit, stored in PySCF order. That vector is not an AO density matrix. The recommended path is :seed, which builds F₀ = h + J[ρ_aux] + Vxc[ρ_aux] server-side and returns dm0 / mo_c. Raw AUX stays for power users. See GTO Adapter (PySCF first-class). AUX is bound to O1 only and does not share checkpoints with DEN.
MoC-JEPA-O1-AUX-v1.0.pt
moc-jepa-o1-auxAuxiliary-basis density-fitting coefficients in def2-universal-jfit (PySCF order). Prefer :seed, which returns dm0 / mo_c after a server-side F₀ build. Raw AUX is not an AO density matrix.
Default .h5 · pin moc-jepa-o1-aux-v1.0
Naming & Versioning
Checkpoints follow a single pattern. The three-letter task slot is reserved so new applications can land without renaming the backbone.
- major — latent space is not backward compatible; every downstream head must be retrained.
- minor — same architecture, more or cleaner data; latents stay compatible.
- Heads at
DEN-v1.xandAUX-v1.xbind to backbone major linev1.x. - API ids are the lowercase kebab form. Unpinned ids (
moc-jepa-m1-den,moc-jepa-o1-aux) resolve to the latest minor within the current major. Pin withmoc-jepa-m1-den-v1.0/moc-jepa-o1-aux-v1.0. - Reserved task codes:
GAPBand Gap PredictionPESPotential Energy Prediction — documented, not shipping.
| Kind | Checkpoint | Meaning |
|---|---|---|
| Backbone | MoC-JEPA-M1-v1.0.pt | Materials pretrained model, first major line |
| Backbone | MoC-JEPA-O1-v1.0.pt | Organic pretrained model, first major line |
| Task head | MoC-JEPA-M1-DEN-v1.0.pt | Density grid head bound to M1 v1.x (CHGCAR / cube) |
| Task head | MoC-JEPA-O1-DEN-v1.0.pt | Density grid head bound to O1 v1.x (cube / CHGCAR) |
| Task head | MoC-JEPA-O1-AUX-v1.0.pt | Auxiliary-fitting head bound to O1 v1.x (def2-universal-jfit) |
Encode Latents
/moc-jepa/latentsMaps an input structure into the MoC-JEPA latent space and returns per-node latents as an .h5 file. The model is equivariant under the Euclidean group E(3), so for any rotation R the latents transform as z(Rx) = R · z(x).
Each Processed Atom yields a 256-dimensional latent vector. The full tensor has shape (N, 256) and dtype float32.
Request body
| Parameter | Type | Description |
|---|---|---|
modelrequired | string | Backbone id. Currently moc-jepa-m1 or moc-jepa-o1. |
structurerequired | file | Crystal geometry as .cif / .xyz, or molecular geometry as .pdb / .xyz. |
Predict Density
/moc-jepa/densityRuns a DEN head on a latents file and returns a charge-density grid. Use CHGCAR with VASP ICHARG=1. This is a billable call: one Processed Atom per atom in the encoded structure.
Request body
| Parameter | Type | Description |
|---|---|---|
model | string | DEN-head id. Defaults to the recommended density head for the latents' backbone. Currently moc-jepa-m1-den or moc-jepa-o1-den. Pin with a version suffix, e.g. moc-jepa-m1-den-v1.0. |
latentsrequired | file | Per-node latents .h5 from POST /moc-jepa/latents. Alternatively pass latents_id from a previous encode response. |
latents_id | string | Server-side handle returned by /moc-jepa/latents. Use instead of re-uploading the .h5 file. |
format | string | Output grid format: chgcar (M1 default) or cube (O1 default). |
One-shot Density
/moc-jepa/density:directEncodes latents and predicts a density grid in one request. Equivalent to /moc-jepa/latents then /moc-jepa/density. Prefer the two-step path when you want to reuse latents across DEN and AUX.
Request body
| Parameter | Type | Description |
|---|---|---|
modelrequired | string | DEN-head id (moc-jepa-m1-den or moc-jepa-o1-den). The matching backbone is selected automatically. |
structurerequired | file | Same structure formats as /moc-jepa/latents. |
format | string | Output grid format: chgcar (M1 default) or cube (O1 default). |
Predict Aux Density
/moc-jepa/auxdensityRuns the O1 AUX head and returns fitting coefficients as .h5. Dataset aux_coeff is float64 of length naux in PySCF order for def2-universal-jfit. It is not an AO density matrix. Prefer :seed for a ready-to-use dm0; this raw-aux endpoint stays for power users. Billable on Processed Atoms.
Request body
| Parameter | Type | Description |
|---|---|---|
model | string | AUX-head id. Currently moc-jepa-o1-aux. Pin with moc-jepa-o1-aux-v1.0. Bound to O1 only. |
latentsrequired | file | Per-node latents .h5 from POST /moc-jepa/latents (O1). Closed-shell H, C, N, O, F, P, S only. Alternatively pass latents_id. |
latents_id | string | Server-side handle returned by /moc-jepa/latents. Use instead of re-uploading the .h5 file. |
Server constraints
- Elements: H, C, N, O, F, P, S. Anything else returns
4xxunsupported_element. - Closed shell only. Open-shell is not supported; the implementation is RKS
spin=0. - Recommended QM: PBE / def2-SVP. Other functionals or bases are a cross-setting migration, not a trained target.
- Returned
.h5:aux_coeff(float64, naux, pyscf order),auxbasis,ordering,nao,naux,charge,spin,atom_numbers. Checklen(c) == auxmol.nao.
One-shot Aux Density
/moc-jepa/auxdensity:directEncodes O1 latents and predicts AUX coefficients in one request. Equivalent to /moc-jepa/latents then /moc-jepa/auxdensity. Same h5 fields and element / closed-shell constraints as /moc-jepa/auxdensity. For a ready-to-use dm0, call /moc-jepa/auxdensity:direct-seed instead.
Request body
| Parameter | Type | Description |
|---|---|---|
modelrequired | string | AUX-head id (moc-jepa-o1-aux). The O1 backbone is selected automatically. |
structurerequired | file | Molecular geometry as .pdb / .xyz (O1). Closed-shell molecules of H, C, N, O, F, P, S only; other elements return 4xx. |
Seed Initial Guess
/moc-jepa/auxdensity:seedSame inputs as /moc-jepa/auxdensity. The server builds F₀ = h + J[ρ_aux] + Vxc[ρ_aux] and returns an initial density matrix / MO coefficients, not raw aux coefficients. Pass dm0 straight to PySCF. Continue at GTO Adapter (PySCF first-class).
Billing is the same Processed-Atom metering as /moc-jepa/auxdensity. The F₀ build is included; we absorb that compute cost into the per-atom price. The returned guess_grid is the server quadrature only — set the client grid in SCF Grid Settings.
Request body
| Parameter | Type | Description |
|---|---|---|
model | string | AUX-head id. Currently moc-jepa-o1-aux. Pin with moc-jepa-o1-aux-v1.0. Bound to O1 only. |
latentsrequired | file | Per-node latents .h5 from POST /moc-jepa/latents (O1). Closed-shell H, C, N, O, F, P, S only. Alternatively pass latents_id. |
latents_id | string | Server-side handle returned by /moc-jepa/latents. Use instead of re-uploading the .h5 file. |
Returned .h5
dm0: float64, shape(nao, nao), PySCF AO order, spin=0 RKS.mo_c: float64, shape(nao, nmo)— occupied + virtual MO columns.mo_e: float64, shape(nmo,)— orbital energies in Hartree.- Metadata:
nao,naux,charge,spin,atom_numbers,model_version,qm_settings{"xc": "pbe", "basis": "def2-svp", "cart": false},guess_grid:level(integer, always 2),vxc_assembly("sparse"in production, or"dense"),xc_for_guess(always"pbe"). Recorded value:{ "level": 2, "vxc_assembly": "sparse", "xc_for_guess": "pbe" }. - Same element / closed-shell constraints as
/moc-jepa/auxdensity.
One-shot Seed
/moc-jepa/auxdensity:direct-seedStructure → dm0 in one request. Equivalent to /moc-jepa/latents then /moc-jepa/auxdensity:seed. Same h5 fields, QM settings, and element / closed-shell constraints as :seed. Same Processed-Atom billing; the F₀ build is included.
Request body
| Parameter | Type | Description |
|---|---|---|
modelrequired | string | AUX-head id (moc-jepa-o1-aux). The O1 backbone is selected automatically. |
structurerequired | file | Molecular geometry as .pdb / .xyz (O1). Closed-shell molecules of H, C, N, O, F, P, S only; other elements return 4xx. |
Returned .h5
dm0: float64, shape(nao, nao), PySCF AO order, spin=0 RKS.mo_c: float64, shape(nao, nmo)— occupied + virtual MO columns.mo_e: float64, shape(nmo,)— orbital energies in Hartree.- Metadata:
nao,naux,charge,spin,atom_numbers,model_version,qm_settings{"xc": "pbe", "basis": "def2-svp", "cart": false},guess_grid:level(integer, always 2),vxc_assembly("sparse"in production, or"dense"),xc_for_guess(always"pbe"). Recorded value:{ "level": 2, "vxc_assembly": "sparse", "xc_for_guess": "pbe" }. - Same element / closed-shell constraints as
/moc-jepa/auxdensity.
VASP (ICHARG=1)
Plane-wave DFT treats the charge-density grid as the SCF variable. Download CHGCAR from a DEN head (M1), place it in the VASP working directory, and set ICHARG=1. Do not convert CHGCAR into an AO density matrix for a GTO code.
- Call
/moc-jepa/density:directwithmoc-jepa-m1-denandformat=chgcar. - Write the body to
CHGCARin the VASP directory. - Set
ISTART=0andICHARG=1in INCAR. - Run VASP. It reads CHGCAR as the initial charge density.
GTO Adapter (PySCF first-class)
The :seed endpoint returns an initial density matrix dm0 already built from F₀ = h + J[ρ_aux] + Vxc[ρ_aux]. Pass it straight to your SCF solver and get a 1.28–1.41× end-to-end speedup over the default SAD guess (benchmarked on 33–117 atom drug-like molecules, PBE/def2-SVP).
You do not need to understand or implement the F₀ build. It runs on our GPU infrastructure. Your code only needs to hand dm0 to .kernel().
PySCF (first-class)
Three steps: get dm0, build mol with the same geometry, run SCF.
1from mocjepa import MoCJEPA2import pyscf34client = MoCJEPA(api_key="$MOCJEPA_API_KEY")56# Step 1: get dm0 — one API call, one file7seed = client.auxdensity.direct_seed(8 model="moc-jepa-o1-aux",9 structure=open("caffeine.xyz", "rb"),10)11seed.save("caffeine_seed.h5")12print(seed.guess_grid) # { "level": 2, "vxc_assembly": "sparse", "xc_for_guess": "pbe" }1314# Step 2: build mol — geometry must match the structure you uploaded15mol = pyscf.gto.M(16 atom=open("caffeine.xyz").read(),17 basis="def2-svp",18 charge=seed.charge,19 spin=seed.spin,20 verbose=0,21)2223# Step 3: run SCF with dm024import h5py, numpy as np25with h5py.File("caffeine_seed.h5") as f:26 dm0 = f["dm0"][:]2728mf = mol.RKS(xc="pbe")29mf.kernel(dm0=dm0)
- Released head:
PBE/def2-SVP,basis="def2-svp",cart=False, closed shell, elements H, C, N, O, F, P, S. New basis or protocol needs a retrained head — contact the developers. - Raw AUX coefficients stay on
/moc-jepa/auxdensityfor power users. Do not invert a DEN grid onto AOs: noS⁻¹PS⁻¹,grid_to_dm, orget_veff(mol, D_from_rho). - PySCF is the only first-class consumer. Gaussian, TeraChem, and PSI4 take the same
mo_cafter AO remapping. Without a permutation matrix those guides are experimental, not “supported”.
| Engine | What this reference promises |
|---|---|
| PySCFfirst-class | Pass dm0 from :seed / :direct-seed to mol.RKS(xc="pbe").kernel(). No client-side F₀ build. |
| Gaussianexperimental · PySCF bridge + AO remap | mo_c from :seed → AO remap → Guess=Cards + PBEPBE/Def2SVP 5D 7F. Not formchk/unfchk injection. |
| TeraChemexperimental · PySCF bridge + AO remap | mo_c from :seed → TeraChem AO order → version-specific c0 binary. Not a PySCF dump. |
| PSI4experimental · PySCF bridge + AO remap | mo_c from :seed → Ca, Da = C_occ C_occᵀ → Wavefunction API + energy("pbe/def2-svp"). |
Full Trajectory Acceleration (Geometry Optimization)
Geometry-optimization trajectories (5 drug-like molecules, 20–55 atoms, PBE/def2-SVP, geomeTRIC). Workflow: Geometry Optimization & Scans. Grid choice: SCF Grid Settings.
| Metric | Value | Test setup |
|---|---|---|
| Total trajectory wall-time reduction (MoC-JEPA initial guess vs SAD) | ~15–20% | 5 drug-like molecules, 20–55 atoms, grid level 2 |
| Per-step reduction | ~0–10% | Single-step timing at step 5, after GPU warmup |
| Step count vs SAD | No significant difference | Same optimizer, convergence criteria |
The server-side guess uses grid level 2, and the client SCF in this test used level 2 as well. Using level 3 on the client adds ~5–15% per-step time regardless of the initial guess, and does not change the geometry-optimization step count (level 2 and level 3 end in the same basin; see SCF Grid Settings).
PySCFfirst-class
GTO Adapter (PySCF first-class)
Read dm0 / mo_c from :seed. The F₀ build runs on our GPU. Pass dm0 from :seed / :direct-seed to mol.RKS(xc="pbe").kernel(). No client-side F₀ build.
PySCF is the only first-class GTO integration. GTO SCF iterates an AO density matrix, not a cube. Call :direct-seed, then pass dm0 to mol.RKS(xc="pbe").kernel. You do not implement the F₀ build — it runs on our GPU.
- Call
/moc-jepa/auxdensity:direct-seedand savecaffeine_seed.h5. - Build
molwith the same geometry,basis="def2-svp",cart=False, and the h5charge/spin. - Read
dm0and runmol.RKS(xc="pbe").kernel(dm0=dm0).
Released-model limits: PBE / def2-SVP, closed shell, H, C, N, O, F, P, S. Do not set cart=True. Do not use S⁻¹PS⁻¹, grid_to_dm, or get_veff(mol, D_from_rho). New basis or protocol needs a retrained head.
Gaussianexperimental · PySCF bridge + AO remap
GTO Adapter (PySCF first-class)
Read dm0 / mo_c from :seed. The F₀ build runs on our GPU. mo_c from :seed → AO remap → Guess=Cards + PBEPBE/Def2SVP 5D 7F. Not formchk/unfchk injection.
Without an AO permutation this is not a Gaussian integration — it is reading the wrong orbitals. formchk / unfchk only convert chk ↔ fchk; they cannot inject a foreign mo_c. Guess=Read on an empty chk is not a path. Gaussian PBE is PBEPBE; add 5D 7F so the basis is spherical like PySCF cart=False.
- Download
mo_cfrom/moc-jepa/auxdensity:direct-seed. - Remap PySCF AO order → Gaussian 5D/7F (d/f order and spherical-harmonic phases). Identity is the wrong guess.
- Write
Guess=Cardswith the remapped MOs (Fortran format line, IVec, coefficients, IVec=0). Or let Gaussian write a chk, edit Alpha MO coefficients in the fchk after remapping, thenunfchk.
TeraChemexperimental · PySCF bridge + AO remap
GTO Adapter (PySCF first-class)
Read dm0 / mo_c from :seed. The F₀ build runs on our GPU. mo_c from :seed → TeraChem AO order → version-specific c0 binary. Not a PySCF dump.
method pbe / basis def2-svp / guess read is the right direction, but c0 is TeraChem's own AO-order MO matrix. Binary layout depends on the TeraChem version (header, Fortran unformatted vs raw, row vs column major). It is not a dump of PySCF mo_c. Charge, spin, and closed-shell occupancy must match the PySCF molecule.
- Download
mo_cfrom/moc-jepa/auxdensity:direct-seed. - Remap to TeraChem AO order, then write
c0in that build's binary layout. - Run TeraChem with matching
chargeandspinmult(closed shell: 0 / 1).
PSI4experimental · PySCF bridge + AO remap
GTO Adapter (PySCF first-class)
Read dm0 / mo_c from :seed. The F₀ build runs on our GPU. mo_c from :seed → Ca, Da = C_occ C_occᵀ → Wavefunction API + energy("pbe/def2-svp").
Da = C_occ C_occᵀ is the alpha block — not PySCF's closed-shell dm0 = 2 C_occ C_occᵀ. Do not write into the PSI4 scratch wavefunction; that is not a stable public API. Set Ca / Da on psi4.core.Wavefunction, or to_file / from_file a wfn for the same molecule and same basis, then guess=read. PSI4 d/f AO order may still differ from PySCF — remap. Do not project a DEN cube onto PSI4 AOs.
- Download
mo_cfrom/moc-jepa/auxdensity:direct-seed. - Remap to PSI4 AO order. Set
Ca = CandDa = C_occ C_occᵀon apsi4.core.Wavefunction, then persist that same-molecule, same-basis wfn. set_optionswithbasis=def2-svp,scf_type, andguess=read, thenenergy("pbe/def2-svp")— notenergy("pbe").
Geometry Optimization & Scans
Geometry optimization is an ML-first warm restart: request dm0 once, inject it on the first SCF, then let later steps reuse mo_coeff. Grid choice is in SCF Grid Settings.
Geometry optimization (ML-first + warm restart)
- Request
dm0from:direct-seedfor the initial geometry. - Use that
dm0as the first SCF guess (mf.get_init_guess). - For later geometry steps, let SCF warm-restart from the previous
mo_coeff. - Run geomeTRIC, or any optimizer that drives the same SCF object.
1from mocjepa import MoCJEPA2import h5py3import pyscf4import gpu4pyscf.dft5import cupy as cp6from pyscf.geomopt.geometric_solver import kernel as geo_kernel78client = MoCJEPA(api_key="$MOCJEPA_API_KEY")910# 1) :direct-seed once on the starting geometry (server guess is level 2)11seed = client.auxdensity.direct_seed(12 model="moc-jepa-o1-aux",13 structure=open("mol.xyz", "rb"),14)15seed.save("mol_seed.h5")16print(seed.guess_grid) # { "level": 2, "vxc_assembly": "sparse", "xc_for_guess": "pbe" }1718with h5py.File("mol_seed.h5") as f:19 dm0_np = f["dm0"][:]2021# 2) client SCF — grid is independent of guess_grid22mol = pyscf.M(23 atom=open("mol.xyz").read(),24 basis="def2-svp",25 charge=seed.charge,26 spin=seed.spin,27)28mf = gpu4pyscf.dft.RKS(mol)29mf.xc = "pbe"30mf = mf.density_fit(auxbasis="def2-universal-jfit")31mf.grids.level = 2 # use 3 for force-sensitive work3233# 3) inject dm0 on the first SCF only; later steps warm-restart34dm0_cp = cp.asarray(dm0_np)35_dm0_injected = [False]3637def _ml_init_guess(mol_=None, key_=None):38 if not _dm0_injected[0]:39 _dm0_injected[0] = True40 return dm0_cp41 return type(mf).get_init_guess(mf, mol_ or mf.mol, key_ or mf.init_guess)4243mf.get_init_guess = _ml_init_guess4445# 4) geomeTRIC46mol_opt = geo_kernel(mf, maxsteps=200, assert_convergence=False)
Torsion / PES scan
For a torsion scan or PES sample, call :seed once per geometry. Each point is a fresh SCF from the ML initial guess. Warm restart does not apply across geometries.
1from mocjepa import MoCJEPA2import h5py3import pyscf4import gpu4pyscf.dft56client = MoCJEPA(api_key="$MOCJEPA_API_KEY")78# One :direct-seed per geometry. Do not warm-restart mo_coeff across points.9for xyz_path in scan_xyzs:10 seed = client.auxdensity.direct_seed(11 model="moc-jepa-o1-aux",12 structure=open(xyz_path, "rb"),13 )14 path = xyz_path + ".seed.h5"15 seed.save(path)16 with h5py.File(path) as f:17 dm0 = f["dm0"][:]18 mol = pyscf.M(atom=open(xyz_path).read(), basis="def2-svp",19 charge=seed.charge, spin=seed.spin)20 mf = gpu4pyscf.dft.RKS(mol)21 mf.xc = "pbe"22 mf = mf.density_fit(auxbasis="def2-universal-jfit")23 mf.grids.level = 224 mf.kernel(dm0=dm0)
Known limitations
- Small molecules (<15 atoms): the ML initial guess improves little over SAD. The gain grows with molecular size and conformational complexity.
- Far-from-equilibrium geometries (early steps from a poor start): the ML guess may be no better than SAD. The model is trained on near-equilibrium structures.
- Closed shell (restricted KS) only. Elements H, C, N, O, F, P, S. Open-shell requests return
400unsupported_spin.
SCF Grid Settings
MoC-JEPA returns an initial-guess density matrix dm0 from PBE/def2-SVP on grid level 2. The client SCF may use any grid level; this page is how to choose.
Decision table
| Task | System | Recommended grid | Notes |
|---|---|---|---|
| Single-point energy (SPE) | Any | level 2 | Max error vs lv3: 0.046 kcal/mol; ~15% faster |
| Torsion / PES scan | Any | level 2 | Relative error < 0.07 kcal/mol |
| Gradients / forces | Any | level 3 | lv2 force error occasionally exceeds 2×10⁻⁴ Ha/Bohr |
| GO: screening / conformer search | Any | level 2 | lv2 and lv3 never landed in different basins (0/18 tested pairs, including P/S systems) |
| GO: final deliverable structure | Any | level 2, then polish at level 3 | On a flat PES a pure-lv2 endpoint can sit ~0.1 Å / ~0.2 kcal/mol off the lv3 minimum |
| GO: flat PES / tight convergence | Any | level 3 | lv2 force noise is comparable to the default max-gradient threshold |
| Frequencies / Hessian | Any | level 3 or higher | Second derivatives are most sensitive to grid noise |
| Comparison with reference values | Any | level 3 | Match the grid level of the reference data; level 3 is the safe default for high-accuracy comparisons |
PySCF / gpu4pyscf
1import pyscf2import gpu4pyscf.dft34mol = pyscf.M(5 atom="C 0 0 0; H 0 0 1.089; H 1.027 0 -0.363; H -0.513 0.889 -0.363; H -0.514 -0.890 -0.363",6 basis="def2-svp",7)8mf = gpu4pyscf.dft.RKS(mol)9mf.xc = "pbe"10mf = mf.density_fit(auxbasis="def2-universal-jfit")1112# Level 2 — SPE and torsion / PES13mf.grids.level = 21415# Level 3 — gradients, frequencies, and reference comparisons16# mf.grids.level = 31718# Mix: level 2 base + level 3 angular for S and P19# mf.grids.level = 220# mf.grids.atom_grid = {"S": (80, 434), "P": (80, 434)}
The server-side initial-guess grid (level 2) and your client-side SCF grid are independent. Requesting dm0 with :seed and then running SCF at level 3 is valid and recommended for gradient calculations. guess_grid on the response is always { "level": 2, "vxc_assembly": "sparse", "xc_for_guess": "pbe" }.
Geometry optimization
Across 9 molecules × 2 starting conformers (including P/S-containing systems), level 2 and level 3 geometry optimizations never ended in different basins, and step counts were statistically similar. Level 2 force error (up to 2.7×10⁻⁴ Ha/Bohr) is comparable to the default max-gradient threshold (4.5×10⁻⁴), so on a flat potential energy surface level 2 can declare convergence early. In one case the level 2 endpoint sat 0.12 Å / 0.22 kcal/mol from the level 3 minimum; a short level 3 continuation removed the gap. Recommended pattern: optimize at level 2, then polish the final structure at level 3. See Geometry Optimization & Scans.
Comparison with reference values
When comparing your results against externally computed reference energies or orbital energies, use the same grid level as the reference calculation. If the reference grid is unknown, use level 3. Using level 2 for such comparisons introduces systematic energy offsets of up to 0.046 kcal/mol.
File Formats
| Stage | Formats | Notes |
|---|---|---|
| Crystal input | .cif / .xyz | Use with moc-jepa-m1 |
| Molecule input | .pdb / .xyz | Use with moc-jepa-o1 |
| Latents | .h5 | Per-node float32 tensor, shape (N, 256) |
| Charge density | .chgcar / .cube | CHGCAR for VASP ICHARG=1. Cube is a real-space grid — not a GTO guess, and there is no cube→D SDK. |
| SCF seed | .h5 | dm0 (nao×nao), mo_c (nao×nmo), mo_e (nmo), nao, naux, charge, spin, atom_numbers, qm_settings, guess_grid |
| Auxiliary coefficients | .h5 | Power-user raw AUX: aux_coeff (float64, naux, pyscf), auxbasis, ordering, nao, naux, charge, spin, atom_numbers |
Rate Limits
Limits are enforced per Processed Atom, not per request. /moc-jepa/latents, /moc-jepa/density, /moc-jepa/auxdensity, and /moc-jepa/auxdensity:seed count against the same quota. The F₀ build on :seed is included in the per-atom price. The default tier allows 10,000,000 Processed Atoms per month and 200 requests per minute. Crossing 200 rpm returns 429 rate_limit_exceeded with Retry-After. Contact us for research-scale throughput.
Errors
MoC-JEPA uses conventional HTTP response codes. 2xx indicates success, 4xx a client error (e.g. malformed structure, unsupported element, or unsupported format), and 5xx an error on our side.
| Status | Code | When |
|---|---|---|
| 400 | unsupported_element | AUX request contains an atom outside H, C, N, O, F, P, S |
| 400 | unsupported_spin | Open-shell / spin ≠ 0. Current path is RKS spin=0; do not treat that as UHF support. |
| 400 | malformed_structure | Unreadable geometry or unsupported file format |
| 429 | rate_limit_exceeded | More than 200 requests per minute. Retry after the interval in the Retry-After header. |
| 408 | scf_timeout | SCF did not converge within 300 s. A SAD fallback is returned with X-Fallback: sad. |
| 503 | queue_full | GPU worker queue at capacity (max 50 pending jobs). Retry after a few seconds. |
| 500 | gpu_oom | Molecule too large for GPU memory. Try splitting into smaller subsystems. |
Inline examples for the operational codes. The code field matches the table exactly.
1{2 "429": {3 "error": { "code": "rate_limit_exceeded", "message": "More than 200 requests per minute." },4 "headers": { "Retry-After": "12" }5 },6 "408": {7 "error": { "code": "scf_timeout", "message": "SCF did not converge within 300 s. SAD fallback returned." },8 "headers": { "X-Fallback": "sad" }9 },10 "503": {11 "error": { "code": "queue_full", "message": "GPU worker queue at capacity (max 50 pending jobs). Retry after a few seconds." }12 },13 "500": {14 "error": { "code": "gpu_oom", "message": "Molecule too large for GPU memory. Try splitting into smaller subsystems." }15 }16}