CoolFace
Apppublic

Hafnium49/crystal-embedder-quad

sourceHugging Facemitupdated 8mo agoView on Hugging Face
0likes
App README

Crystal-Embedder-Quad

Computes eSEN + l-MM + l-OFM physics embeddings for crystal structures.

Returns named vectors compatible with the crystal-chroma-fusion Qdrant collection.

API

POST /embed

Request:

json
{"cif": "<CIF file content>"}

Response:

json
{
  "vectors": {
    "esen": [0.12, -0.34, ...],
    "l_mm": [0.56, 0.78, ...],
    "l_ofm": [0.11, -0.22, ...]
  },
  "dims": {"esen": 128, "l_mm": 758, "l_ofm": 188}
}

GET /health

Returns model loading status and vector dimensions.

Vectors

VectorDimensionsDistanceModelSource
esen128CosineeSEN-MD-Direct (OC25)facebook/OC25
l_mm758Euclidl-MM_v1 (MEGNet)MatterVial
l_ofm188Euclidl-OFM_v1 (MEGNet)MatterVial

Architecture

  • —eSEN: Backbone forward hook → node_embedding → l=0 scalar invariants → mean-pool → 128-dim
  • —l-MM: MatMiner-encoded MEGNet autoencoder latent → 758-dim
  • —l-OFM: OFM-encoded MEGNet autoencoder latent → 188-dim

All vectors are L2-normalized before returning.

Companion Service

Use alongside Crystal-Embedder-Orb (crystal-embedder-orb) which provides the orb (1792-dim) vector. Call both services in parallel, then merge vectors for a complete 4-vector Qdrant query.

Local Development

bash
docker build -t crystal-embedder-quad .
docker run -p 7860:7860 crystal-embedder-quad
curl http://localhost:7860/health