Configuration File

OpenMECP reads a configuration file omecp_config.cfg at startup to customize program-wide behavior. Settings in the config file apply to all calculations run from that directory.

Creating a Config Template

omecp ci omecp_config.cfg

This generates a fully commented template with all available options.


File Locations and Precedence

Configuration files are loaded in hierarchical order. A setting in a higher-priority file overrides the same setting in a lower-priority file.

PriorityLocation
1 (highest)./omecp_config.cfg — current working directory
2~/.config/omecp/omecp_config.cfg (Unix) or %APPDATA%\omecp\omecp_config.cfg (Windows)
3/etc/omecp/omecp_config.cfg (Unix) or %PROGRAMDATA%\omecp\omecp_config.cfg (Windows)
4 (lowest)Built-in defaults

File Format

The config file uses INI format with four sections:

[extensions]
gaussian = log
orca     = out
custom   = log

[general]
max_memory     = 4GB
default_nprocs = 4
print_level    = 0

[logging]
level        = info
file_logging = false

[cleanup]
enabled              = true
preserve_extensions  = xyz,backup
verbose              = 1
cleanup_frequency    = 5

[extensions] Section

Configures the file extensions that OpenMECP looks for when parsing QM output.

KeyDefaultDescription
gaussianlogGaussian output file extension
orcaoutORCA output file extension
customlogCustom program output extension

[general] Section

KeyDefaultDescription
max_memory4GBDefault memory allocation (overridden by input mem)
default_nprocs4Default number of processors (overridden by input nprocs)
print_level0Output verbosity: 0=quiet, 1=normal, 2=verbose

[logging] Section

KeyDefaultDescription
levelinfoLog level: error, warn, info, debug, trace
file_loggingfalseWrite debug log to omecp_debug_{basename}.log

Enabling file_logging = true writes a detailed debug log named omecp_debug_{basename}.log (where {basename} is derived from the input file name). This is useful for diagnosing convergence issues.


[cleanup] Section

OpenMECP accumulates many intermediate QM input/output files during a long run. The cleanup system automatically removes unnecessary files to prevent disk saturation.

KeyDefaultDescription
enabledtrueEnable automatic file cleanup
preserve_extensionsxyz,backupComma-separated extensions to always keep
verbose1Cleanup verbosity: 0=silent, 1=summary, 2=each file
cleanup_frequency5Run cleanup every N optimization steps

Cleanup strategy: OpenMECP keeps the latest .engrad files and all .log / input files; it removes older intermediate files. Add custom extensions to preserve_extensions to protect specific file types.


Configuration Display at Startup

When OpenMECP starts, it prints:

  • Which configuration file was loaded (or "built-in defaults" if none found)
  • All input parameters and their values
  • All convergence thresholds
  • All configuration file settings

This ensures you always know exactly what settings are being used for a given run.