mfsig.com
API リファレンス

Python + HTTP API

両者で共通の語彙。ワイヤー上では Pydantic モデル、Python では FullOutput Pydantic。OpenAPI 仕様は /openapi.json に自動生成されます。

Python(インプロセス)

# Submit a SMILES, get a signed .mfsig.json
curl -X POST https://api.mfsig.com/v1/sigma_profile \
  -H "Authorization: Bearer $MFSIG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "smiles":  "CC(=O)Oc1ccccc1C(=O)O",
    "tier":    "pro",
    "solvent": "water"
  }'

# → 202 Accepted
#   { "job_id":"job_8K2…", "status":"queued",
#     "eta_s": 22 }

HTTP(FastAPI サービス)

# Poll, or supply a webhook_url and we POST on completion.
curl https://api.mfsig.com/v1/jobs/job_8K2... \
  -H "Authorization: Bearer $MFSIG_API_KEY"

# → 200 OK
#   { "status":   "done",
#     "mfsig_url":"https://mfsig.com/d/aspirin.mfsig.json",
#     "sha256":   "e3b0c44298fc1c14...",
#     "gates":    {"scf":true,"sigma":true,"audit":true,
#                  "geometry":true} }

ルート

GET/healthzops

活性プローブ。プロセスが稼働していれば常に 200 を返します。Kubernetes の livenessProbe として使用してください。

GET/readyzops

準備プローブ。インポート可能なバックエンドがない場合は 503。

GET/methodsinfo

グレード可用性マトリクス:Pro / Platinum / Reference + バージョン + プリセット。

POST/sigma_profilecompute

主役のルート — 1 つの SMILES に対する σ-profile。Pro / Platinum / Reference グレードと全オプション語彙。

POST/conformer_funnelcompute

柔軟な骨格向けのコンフォーマアンサンブル σ-profile。Boltzmann 加重出力。分子ごとに同一の .mfsig 監査証跡。

POST/convert/from_legacyconvert

ベンダー .cosmo → MolForge FullOutput JSON。コンテンツをインラインまたは server_path で渡します。ベンダーを自動検出するか、明示的に指定します。

POST/convert/to_legacyconvert

MolForge JSON → ベンダーテキスト形式。Turbomole / COSMOtherm σ / JSON / CSV。

POST/convert/databaseconvert

サーバー側のバッチディレクトリ移行。冪等・再開可能、ConversionReport にファイルごとの診断。

POST/mfsig/writeapex

σ-profile 結果を .mfsig.json v2.0-apex にラップ — SHA-256 監査 + 再現性 + オプションの legacy_vault。

POST/mfsig/verifyapex

SHA-256 トラストハッシュを検証。改ざん検知可能。

GET/openapi.jsondocs

機械可読な OpenAPI 3.x 仕様。

GET/docsdocs

対話的な探索のための Swagger UI。

GET/redocdocs

読みやすい閲覧のための Redoc UI。

認証 + セキュリティ

本サービスは認証なしで提供されます — リバースプロキシまたは VPN の背後にある信頼された内部デプロイを想定しています。/convert/database をインターネットに直接公開しないでください — サーバー側パスを受け付けます。CORS はデフォルトで許容的です。ALLOWED_ORIGINS 環境変数で制限してください。

可観測性

ログ行のサンプルjson
{
  "ts": "2026-05-12T01:24:01Z",
  "level": "INFO",
  "logger": "molforge_sigma.api",
  "msg": "sigma_profile smiles='O' method='dft' wall=12.4s n_atoms=3 n_segments=1432"
}