materia init

Create a new materials optimization project with domain templates.

Apr 1, 20265 min read
cli
init
project
scaffold

materia init

Create a new materials optimization project directory with a pre-configured MDL file and optional template.

Synopsis

bash
materia init <project-name> [options]

Arguments

| Argument | Required | Description | |—————|—————|——————-| | project-name | Yes | Name of the project directory to create |

Options

| Flag | Short | Type | Default | Description | |———|———-|———|————-|——————-| | —domain | -d | string | water | Material domain to use | | —template | -t | string | (default for domain) | Specific template within the domain | | —list-domains | | boolean | false | List all available domains and exit | | —list-templates | | boolean | false | List all templates (optionally filtered by domain) | | —no-git | | boolean | false | Skip git repository initialization | | —force | -f | boolean | false | Overwrite existing directory |

Examples

Basic initialization with a domain

bash
materia init my-membrane --domain water

Creates:

my-membrane/
  material.yaml      # MDL file with water domain defaults
  materia.toml        # Project configuration
  .gitignore          # Git ignore patterns
  results/            # Output directory (empty)

Using a specific template

bash
materia init cathode-study --template battery/nmc-cathode

Templates provide more specific parameter ranges and objectives for common optimization scenarios within a domain.

Listing available domains

bash
materia init --list-domains

Output:

Available domains (16):
  water          Water membrane optimization
  battery        Lithium-ion battery design
  solar          Solar cell efficiency
  catalyst       Heterogeneous catalysis
  hydrogen       Hydrogen storage materials
  thermoelectric Thermoelectric generators
  polymer        Polymer blends and composites
  ceramic        Structural and functional ceramics
  superconductor High-temperature superconductors
  steel          Steel alloy composition
  aluminum       Aluminum alloy optimization
  glass          Glass composition design
  concrete       Low-carbon concrete
  adhesive       Structural adhesives
  biomaterial    Biocompatible materials
  coating        Protective coatings

Listing templates for a domain

bash
materia init --list-templates --domain battery

Output:

Templates for 'battery':
  battery/nmc-cathode        NMC cathode composition optimization
  battery/solid-electrolyte  Solid-state electrolyte screening
  battery/anode-design       Silicon-graphite anode blending

Force overwrite an existing directory

bash
materia init my-project --domain solar --force

Generated MDL File

The generated material.yaml includes comments explaining each section:

yaml
# Material Definition Language (MDL) file
# Generated by: materia init --domain water
# Documentation: https://matcraft.ai/docs/mdl/specification

name: my-membrane
domain: water
description: Water membrane optimization campaign

# Design parameters -- adjust bounds for your specific problem
parameters:
  - name: polymer_concentration
    type: continuous
    bounds: [0.08, 0.40]
    description: Polymer weight fraction in casting solution
  # ... more parameters

# Optimization objectives
objectives:
  - name: permeability
    direction: maximize
    unit: L/(m2*h*bar)
  # ... more objectives

# Optimizer settings
optimizer:
  method: cma-es
  budget: 200
  batch_size: 10
  surrogate: mlp

After Initialization

After creating a project:

  1. Edit material.yaml to customize parameter bounds, objectives, and optimizer settings.
  2. Run materia validate material.yaml to check for errors.
  3. Run materia run to start the optimization.

See Also