How mehradans92/dziner works
Project type and purpose
• dZiner is a Python-based, full-stack scientific library for rational inverse design of materials.
• It orchestrates AI agents (LLMs + retrieval), domain knowledge from literature, surrogate property predictors, and optional human feedback into a closed-loop design workflow.
File structure
• Top-level:
• dziner/ ← core package (agents, prompts, scoring, surrogates, tools, utils)
• docs/ ← Sphinx documentation source & build config
• examples/ ← Jupyter notebooks as user-facing clients
• gui/ ← minimal Python GUI entry point
• data/papers/ ← local PDF corpus for retrieval‐augmented generation (RAG)
• dziner/surrogates/ ← plugin folders for each surrogate model (CMC, Binding, MOFormer, docking, peptides)
• tests/ ← unit tests that exercise core functionality and fake LLM
• .github/workflows ← CI for docs build and tests
• setup.py, requirements.txt ← packaging & dependencies
README for additional insights
• Workflow stages:
a. Input material representation (as text)
b. Dynamic retrieval of design guidelines (RAG via FAISS index over data/papers + Internet)
c. Candidate generation & chemical feasibility check (via docking or SAS scorer)
d. Property estimation via surrogate model (+ uncertainty)
e. Optional human-in-the-loop feedback → modifies constraints or candidates
f. Iteration until convergence
Main components & interactions
a. User Interface Layer
• Jupyter notebooks & CLI (examples/)
• GUI app.py
b. Core Agent Layer (dziner package)
• agents.py: orchestrates workflow
• prompts.py: templating for LLM calls
• sascorer.py: synthetic accessibility scoring
• tools.py & utils.py: shared utilities
c. Retrieval Service
• FAISS index built over data/papers/
• External knowledge (web/API calls)
d. Language Model Providers
• OpenAI, Anthropic (via environment-keyed APIs)
e. Surrogate Model Plugins
• Each folder under dziner/surrogates: CMC, Binding, MOFormer, peptides, docking
• Each plugin supplies model loading, inference API
f. Data & Model Storage
• Local: PDF corpus, surrogate model weights/configs
• Remote: Optional external data sources
g. Results & Paper Outputs
• paper/results/: CSV outputs per benchmark
h. Documentation & CI/CD
• docs/: Sphinx static site
• .github/workflows: test.yml, docs.yml
Architectural patterns & design principles
• Modular, plugin-based surrogate architecture (each surrogate is a drop-in folder)
• Clear separation of concerns: UI ←→ Controller (agents) ←→ Services (LLM, RAG, Surrogates) ←→ Data
• Retrieval-Augmented Generation (RAG) for domain knowledge
• Iterative, closed-loop control pattern with optional human feedback
Essential elements to capture
• Component labels & module paths