Learning Objectives
- Understand the challenges of traditional materials exploration
- Learn what closed-loop automation means
- Get an overview of NIMO's features and capabilities
- Successfully install NIMO on your system
1.1 The Challenge of Materials Discovery
Materials science research faces a fundamental challenge: the search space is enormous. Consider developing a new alloy with 5 elements. If each element can have 100 different composition levels, the total number of possible combinations is:
$$N = 100^5 = 10^{10} \text{ (10 billion combinations)}$$
Even if each experiment takes just 1 hour, testing all combinations would require over 1 million years! This is known as the combinatorial explosion problem.
Combinatorial Explosion
The rapid growth of possible combinations as the number of variables increases. In materials science, this makes exhaustive search practically impossible.
Traditional Approaches and Their Limitations
| Approach | Method | Limitation |
|---|---|---|
| Random Search | Test random compositions | Inefficient, may miss optimal regions |
| Grid Search | Test systematic grid of values | Scales poorly with dimensions |
| Expert Intuition | Rely on researcher experience | Biased, limited by human knowledge |
| Trial and Error | Sequential manual experiments | Slow, no systematic optimization |
1.2 What is Closed-Loop Automation?
Closed-loop automation addresses these challenges by creating an intelligent feedback cycle between AI algorithms and experimental systems. The key insight is: instead of testing everything, let AI guide us to the most promising candidates.
This approach offers several advantages:
- Efficiency: AI learns from each experiment to propose better candidates
- Speed: Robots can run experiments 24/7 without fatigue
- Objectivity: Decisions based on data, not human bias
- Reproducibility: Automated processes are consistent and documented
1.3 Introducing NIMO
NIMO (formerly NIMS-OS: NIMS Orchestration System) is a Python library developed by the National Institute for Materials Science (NIMS) in Japan. It provides a complete framework for implementing closed-loop materials exploration.
What Can NIMO Do?
- Select optimal experiment candidates using 11 different AI algorithms
- Interface with 3 types of robotic experiment systems
- Track and visualize optimization progress in real-time
- Handle both single and multi-objective optimization
NIMO's Modular Architecture
Bayesian Opt] A2[BLOX
Random Forest] A3[PDC
Phase Diagram] A4[RE
Random] end subgraph Robot[Robot Modules] R1[STAN
Standard] R2[NAREE
Electrochemistry] R3[COMBAT
Custom] end subgraph Viz[Visualization] V1[History Plot] V2[Distribution] V3[Phase Diagram] end AI --> Core[NIMO Core] Robot --> Core Core --> Viz style Core fill:#667eea,color:#fff
1.4 Installing NIMO
NIMO can be installed easily via pip:
# Install NIMO from PyPI (recommended)
pip install nimo
# Verify installation
python -c "import nimo; print('NIMO installed successfully!')"
Requirements
- Python >= 3.6
- numpy < 2 (important version constraint)
- physbo >= 2.0
- scikit-learn, scipy, matplotlib
For development or custom modifications, you can install from source:
# Clone the repository
git clone https://github.com/NIMS-DA/nimo
# Navigate to the directory
cd nimo
# Install in development mode
pip install -e .
1.5 Your First NIMO Code
Let's verify that NIMO is working by examining its available modules:
import nimo
# Check available selection methods
print("NIMO provides the following optimization methods:")
methods = ["RE", "PHYSBO", "BLOX", "PDC", "SLESA", "PTR", "BOMP", "ES", "COMBI", "RSVM"]
for method in methods:
print(f" - {method}")
# Check visualization tools
print("\nVisualization tools:")
print(" - nimo.visualization.plot_history")
print(" - nimo.visualization.plot_distribution")
print(" - nimo.visualization.plot_phase_diagram")
Output:
NIMO provides the following optimization methods:
- RE
- PHYSBO
- BLOX
- PDC
- SLESA
- PTR
- BOMP
- ES
- COMBI
- RSVM
Visualization tools:
- nimo.visualization.plot_history
- nimo.visualization.plot_distribution
- nimo.visualization.plot_phase_diagram
1.6 A Simple Example: Random Selection
Let's see NIMO in action with a simple random selection:
import nimo
import pandas as pd
# Create a simple candidates file
# Format: descriptor columns + objective column (NaN for untested)
candidates_data = {
'x1': [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
'x2': [1.0, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1],
'objective': [float('nan')] * 10 # All untested
}
df = pd.DataFrame(candidates_data)
df.to_csv('candidates.csv', index=False)
# Use NIMO to randomly select 3 candidates
nimo.selection(
method="RE", # Random Exploration
input_file="candidates.csv",
output_file="proposals.csv",
num_objectives=1,
num_proposals=3,
re_seed=42 # For reproducibility
)
# Check the proposals
proposals = pd.read_csv('proposals.csv')
print("Selected candidates for experiments:")
print(proposals)
Output:
Selected candidates for experiments:
x1 x2 objective
0 0.7 0.4 NaN
1 0.2 0.9 NaN
2 0.5 0.6 NaN
Exercises
Exercise 1: Installation Check
Install NIMO on your system and run the following code to confirm everything works:
import nimo
import physbo
import numpy as np
print(f"NIMO ready! NumPy version: {np.__version__}")
If you see any errors, check that numpy version is less than 2.0.
Exercise 2: Create Your Own Candidates
Create a candidates CSV file with 20 rows and 3 descriptor columns (x1, x2, x3). Use NIMO's random selection to pick 5 candidates.
Summary
- Materials discovery faces the combinatorial explosion problem
- Closed-loop automation combines AI algorithms with robotic experiments
- NIMO is a modular Python library for automated materials exploration
- NIMO provides 11 AI algorithms, 3 robot interfaces, and visualization tools
- Installation is simple via
pip install nimo