Configuration
Configure MDFactory databases, paths, and runtime settings
MDFactory uses INI files for global settings and YAML files for simulation-specific parameters.
Managing configuration with the CLI
The mdfactory config command group provides tools to manage your configuration:
mdfactory config init # interactive setup wizard
mdfactory config show # display active configuration
mdfactory config path # print config file path
mdfactory config edit # open config in $EDITORRunning mdfactory config init walks you through selecting a database backend and setting paths interactively.
Global configuration
The main config file lives at ~/.config/mdfactory/config.ini (or the platform-appropriate location determined by platformdirs).
You can always print the active path with:
mdfactory config pathDatabase settings
SQLite is the default backend:
[database]
TYPE = sqlite
[databases]
USE_RUN_DB = true
USE_ANALYSIS_DB = true
[sqlite]
RUN_DB_PATH = <platform data dir>/runs.db
ANALYSIS_DB_PATH = <platform data dir>/analysis.dbUse CSV files for simple setups:
[database]
TYPE = csv
[databases]
USE_RUN_DB = true
USE_ANALYSIS_DB = true
[csv]
RUN_DB_PATH = <platform data dir>/runs.csv
ANALYSIS_DB_PATH = <platform data dir>/analysisUse Foundry for enterprise deployments:
[database]
TYPE = foundry
[databases]
USE_RUN_DB = true
USE_ANALYSIS_DB = true
[foundry]
BASE_PATH = /Group Functions/mdfactory
ANALYSIS_NAME = analysis
RUN_DB_PATH = /Group Functions/mdfactory/runs
ANALYSIS_DB_PATH = /Group Functions/mdfactory/analysis
ARTIFACT_DB_PATH = /Group Functions/mdfactory/artifactsConfig wizard details (mdfactory config init)
The interactive wizard performs this flow in the current code:
- Optional CGenFF prompt:
Do you use CGenFF (SILCSBIO)?if yes, asks forSILCSBIODIR. - Parameter store prompt:
Parameter store directory: - Backend selection:
Database backend:with choicessqlite,csv,foundry. - Backend-specific prompts (below).
- Writes config to the user config path (
mdfactory config path). - Optional initialization:
Initialize databases now?
SQLite prompt details
When sqlite is selected, the wizard asks:
RUN_DATABASE path:ANALYSIS_DATABASE path:
Both are normalized to absolute local paths.
CSV prompt details
When csv is selected, the wizard asks:
RUN_DATABASE CSV path:ANALYSIS_DATABASE directory (for per-table CSV files):
For CSV mode, analyses/artifacts are stored as per-table CSV files in the analysis directory.
Foundry prompt details
When foundry is selected, the wizard:
- Runs
fdt configand exits on failure. - Verifies Foundry connectivity with
FoundryContext().multipass.get_user_info(). - Asks:
Foundry base directory (must already exist in Foundry):Analysis directory name:
- Derives:
ANALYSIS_DB_PATH = <base>/<analysis_name>RUN_DB_PATH = <base>/runsARTIFACT_DB_PATH = <base>/artifacts
- Prompts
Use these paths?and optionally allows manual overrides.
Validation rules:
- Base path must be absolute (start with
/). - Analysis directory name must not contain
/and must not start with..
Initialization defaults
Initialize databases now? defaults to:
trueforsqliteandcsvfalseforfoundry
If enabled, it initializes:
- systems backend storage
- analysis backend storage
- artifact backend storage
Simulation input schemas
Simulation YAML/CSV structure is documented here:
Run schedules
MDFactory uses run_schedules.yaml to define simulation protocols. This file specifies:
- Minimization steps
- Equilibration stages (NVT, NPT)
- Production run length
- Output frequencies
Find templates in config_templates/run_schedules.yaml.
Environment variables
Override config paths with environment variables:
export MDFACTORY_CONFIG=/path/to/config.ini # use a specific config file
export MDFACTORY_CONFIG_DIR=/path/to/config/dir # override config directory
export MDFACTORY_DATA_DIR=/path/to/data # override data directoryConfiguration precedence
Settings are loaded in this order (later values override earlier):
- Default values (computed at runtime, including platform-appropriate data paths)
- User config file (
~/.config/mdfactory/config.ini) - Config file specified via
MDFACTORY_CONFIGenvironment variable
