Hafnium49/crystal-embedder-quad
0
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:
{"cif": "<CIF file content>"}Response:
{
"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
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
docker build -t crystal-embedder-quad .
docker run -p 7860:7860 crystal-embedder-quad
curl http://localhost:7860/health