Welcome to the tutorials! We’re thrilled to have you here. Please go through the code examples, and don’t hesitate to contact our team if you have questions or feedback.
ORCA QM/MM Multiscale Calculations Guide
CHEMSMART provides comprehensive tools for multiscale QM/MM calculations using ORCA. This section covers various QM/MM schemes including additive, subtractive ONIOM, and crystal QM/MM methods for large molecular systems.
Overview
ORCA QM/MM calculations allow you to treat large systems by combining quantum mechanical (QM) methods for chemically important regions with molecular mechanical (MM) force fields for the environment. CHEMSMART supports five types of multiscale calculations:
Additive QM/MM - Traditional QM/MM with electrostatic embedding
Subtractive QM/QM2 - Two-layer ONIOM scheme with different QM methods
Subtractive QM/QM2/MM - Three-layer ONIOM with QM, QM2, and MM layers
MOL-CRYSTAL-QMMM - QM/MM for molecular crystals
IONIC-CRYSTAL-QMMM - QM/MM for semiconductors and insulators
Basic QM/MM Command
The basic command structure for ORCA QM/MM calculations is:
chemsmart sub [OPTIONS] orca [ORCA_OPTIONS] <JOBTYPE> qmmm [QMMM_OPTIONS]
where <JOBTYPE> is one of opt, ts, sp, scan, modred, qrc, or neb. Or using the run
command with project settings:
chemsmart run [OPTIONS] orca -p qmmm -f <structure_file> opt qmmm [QMMM_OPTIONS]
Example with the run command:
chemsmart run --no-scratch --fake orca \
-p qmmm \
-f tests/data/StructuresTests/xyz/crest_best.xyz \
opt qmmm \
-j QM/QM2/MM \
-lm system.ORCAFF.prms \
-ha 1-15 \
-ct 0 \
-mt 1 \
-ch 0 \
-mh 1
Key Options:
--no-scratch: Disable scratch for this run (overrides YAML / class defaults; see Scratch Behavior)--fake: Dry run mode (don’t actually submit)-p qmmm: Load settings from~/.chemsmart/orca/qmmm.yaml-f: Input structure fileopt qmmm: Parent job type plus nested QM/MM subcommand
QM/MM-Specific Options
Job Type and Theory Level
Option |
Type |
Description |
|---|---|---|
|
Choice |
Multiscale calculation type: QMMM, QM/QM2, QM/QM2/MM, MOL-CRYSTAL-QMMM, IONIC-CRYSTAL-QMMM |
|
string |
DFT functional for high-level (QM) region (e.g., B3LYP, PBE0) |
|
string |
Basis set for high-level (QM) region (e.g., def2-SVP, def2-TZVP) |
|
string |
DFT functional for intermediate-level (QM2) region |
|
string |
Basis set for intermediate-level (QM2) region |
|
string |
Built-in method for intermediate-level (QM2) region (XTB, HF-3C, PBEH-3C, R2SCAN-3C, PM3, AM1) |
|
string |
ORCA force-field parameter file written as |
Atom Partitioning
Option |
Type |
Description |
|---|---|---|
|
string |
High-level (QM) atom indices (e.g., ‘1-15,20’ or ‘1:15 20’) |
|
string |
Intermediate-level (QM2) atom indices (e.g., ‘16-30’) |
|
string |
Active atom indices for optimization |
Charge and Multiplicity
High-level (-ch / -mh) charge and multiplicity are required. They are written to the ORCA coordinate section
(* xyz line). Total and intermediate values are written to the %qmmm block and are not used as a fallback for
the coordinate section.
Option |
Type |
Description |
|---|---|---|
|
int |
Required. High-level (QM) region charge for the |
|
int |
Required. High-level (QM) region multiplicity for the |
|
int |
Intermediate layer charge for the |
|
int |
Intermediate layer multiplicity for the |
|
int |
Total system charge for the |
|
int |
Total system multiplicity for the |
Advanced QM/MM Options
Option |
Type |
Description |
|---|---|---|
|
string |
Solvation model for intermediate-level (QM2) region (CPCM, SMD, ALPB) |
|
string |
Embedding type: electronic or mechanical |
|
string |
Custom high-level-H bond lengths, e.g. |
|
bool |
Remove bend/torsion double counting |
|
bool |
Remove bond double counting |
Optimization Controls
Option |
Type |
Description |
|---|---|---|
|
string |
Fixed atom indices in optimization |
|
string |
Use active atom info from PDB file |
Crystal QM/MM Options
Option |
Type |
Description |
|---|---|---|
|
bool |
Use converged charges for crystal QM/MM |
|
int |
Max cycles for charge convergence |
|
float |
Charge convergence threshold |
|
float |
MM atom charge scaling factor |
|
int |
Atoms per unit cell (MOL-CRYSTAL-QMMM) |
|
string |
ECP type for boundary region |
|
int |
Number of ECP layers around QM region |
|
float |
ECP atom charge scaling factor |
Usage Examples
Additive QM/MM
Basic additive QM/MM calculation with B3LYP for the QM region and an ORCA force-field parameter file for MM:
chemsmart sub orca -p protein_qmmm -f protein.pdb opt qmmm \
-j QMMM \
-hx B3LYP -hb def2-SVP \
-lm protein.ORCAFF.prms \
-ha 1-20 \
-ch 0 -mh 1 \
-ct 0 -mt 1
Subtractive QM/QM2 ONIOM
Two-layer ONIOM calculation with DFT for high level and semi-empirical for intermediate level:
chemsmart sub orca -p enzyme_oniom -f enzyme.xyz opt qmmm \
-j QM/QM2 \
-hx B3LYP -hb def2-TZVP \
-ix HF -ib STO-3G \
-ha 1-15 -ia 16-50 \
-ch 0 -mh 1 \
-ci 0 -mi 1
Three-Layer QM/QM2/MM ONIOM
Three-layer ONIOM with DFT, XTB, and MM:
chemsmart sub orca -p complex_system -f system.pdb opt qmmm \
-j QM/QM2/MM \
-hx B3LYP -hb def2-SVP \
-im XTB \
-lm system.ORCAFF.prms \
-ha 1-10 -ia 11-30 \
-ch 0 -mh 1 \
-ci 0 -mi 1 \
-ct 0 -mt 1
Crystal QM/MM for Molecular Crystals
QM/MM calculation for a molecular crystal:
chemsmart sub orca -p molecular_crystal -f crystal.cif opt qmmm \
-j MOL-CRYSTAL-QMMM \
-hx PBE -hb def2-SVP \
-ha 1-20 \
-ch 0 -mh 1 \
-nc 50 -cc true -xn 30
Advanced QM/MM with Custom Settings
QM/MM with custom bond lengths and embedding options:
chemsmart sub orca -p advanced_qmmm -f system.xyz opt qmmm \
-j QMMM \
-hx M06-2X -hb def2-TZVP \
-lm system.ORCAFF.prms \
-ha 1-25 \
-ch -1 -mh 2 \
-ct -1 -mt 2 \
-e electronic \
-h "{'C_H': 1.09, 'N_H': 1.01}" \
-d true
Project Configuration
You can configure QM/MM settings in a YAML file to avoid repetitive CLI options. This is especially useful for running
multiple jobs with similar settings. Charge and multiplicity are not set in the project YAML; pass them on the command
line (-ch, -mh, -ct, -mt, and for QM/QM2 jobs -ci, -mi).
YAML Configuration Location
Create a YAML file at ~/.chemsmart/orca/qmmm.yaml:
Basic 2-Layer QM/MM Configuration
# ~/.chemsmart/orca/qmmm.yaml - Basic QM/MM setup
qmmm:
jobtype: "QMMM"
high_level_functional: "B3LYP"
high_level_basis: "def2-SVP"
low_level_method: "system.ORCAFF.prms"
embedding_type: "Electronic"
freq: false
3-Layer ONIOM Configuration
# ~/.chemsmart/orca/qmmm.yaml - 3-Layer ONIOM
qmmm:
jobtype: "QM/QM2/MM"
# High-level (QM) region
high_level_functional: "PBE0"
high_level_basis: "def2-TZVP"
# Intermediate-level (QM2) region
intermediate_level_functional: "B3LYP"
intermediate_level_basis: "def2-SVP"
# Or use a built-in method:
# intermediate_level_method: "XTB"
# Low-level (MM) region
low_level_method: "system.ORCAFF.prms"
# Additional options
freq: false
embedding_type: "Electronic"
delete_la_double_counting: true
Using Built-in Methods
# ~/.chemsmart/orca/qmmm.yaml - Using XTB for intermediate level
qmmm:
jobtype: "QM/QM2"
high_level_functional: "PBE0"
high_level_basis: "def2-TZVP"
intermediate_level_method: "XTB" # Built-in method
Supported Built-in Methods:
XTB,XTB0,XTB1- xTB semi-empirical methodsHF-3C- Hartree-Fock with 3 correctionsPBEH-3C- PBEh-3c composite methodR2SCAN-3C- r²SCAN-3c composite methodPM3,AM1- Semi-empirical methods
Using YAML Configuration
Once you have a YAML file configured, use it with the -p flag:
# Theory from YAML; charge and multiplicity on the CLI
chemsmart run orca -p qmmm -f system.pdb opt qmmm \
-ha 1-20 \
-ch 0 -mh 1 -ct 0 -mt 1
# Override YAML settings with CLI options
chemsmart run orca -p qmmm -f system.pdb opt qmmm \
-ha 1-20 \
-hx M06-2X \
-ch 0 -mh 1 -ct 0 -mt 1
Settings Priority:
CLI options (highest priority)
YAML configuration file
Default settings (lowest priority)
Complete YAML Example
# ~/.chemsmart/orca/qmmm.yaml - Complete example
qmmm:
jobtype: "QM/QM2/MM"
# Theory levels
high_level_functional: "PBE0"
high_level_basis: "def2-TZVP"
intermediate_level_method: "XTB"
low_level_method: "system.ORCAFF.prms"
# Atom partitioning (optional, can be set via CLI)
# high_level_atoms: [1, 2, 3, 4, 5]
# intermediate_level_atoms: [6, 7, 8, 9, 10]
# QM/MM options
embedding_type: "Electronic"
intermediate_level_solvation: "CPCM(Water)"
delete_la_double_counting: true
# Job control
freq: false
chemsmart run orca -p qmmm -f system.pdb opt qmmm \
-ha 1-20 \
-ch 0 -mh 1 \
-ct 0 -mt 1
Next Steps
For more advanced QM/MM workflows, see:
Project Configuration: Set up custom QM/MM project settings
Server Configuration: Configure HPC settings for large QM/MM jobs
Force Field Setup: Prepare MM parameter files
Analysis Tools: Post-process QM/MM results
Tip
QM/MM calculations can be computationally demanding. Consider using HPC clusters with adequate memory and CPU resources, especially for large systems or crystal QM/MM calculations.
Warning
Ensure proper atom partitioning between QM and MM regions. The QM region should include chemically important areas like active sites, reaction centers, or defects in crystals.
Quick Reference
CLI Option Summary
qmmm is nested under a parent job type (opt, ts, sp, scan, modred, qrc, or neb).
Short |
Long |
Description |
|---|---|---|
|
|
High-level (QM) functional |
|
|
High-level (QM) basis set |
|
|
High-level atom indices |
|
|
Intermediate (QM2) functional |
|
|
Intermediate (QM2) basis set |
|
|
Intermediate built-in method |
|
|
Intermediate atom indices |
|
|
Intermediate charge |
|
|
Intermediate multiplicity |
|
|
ORCA force-field parameter file ( |
Intermediate Layer Options
Use -ix/-ib/-im/-ia/-ci/-mi for the intermediate (QM2) functional, basis, built-in method,
atoms, charge, and multiplicity. YAML keys are intermediate_level_*.
ORCAQMMMJobSettings Reference
The ORCAQMMMJobSettings class provides comprehensive configuration options for ORCA multiscale calculations with
enhanced equality comparison support. This class now includes proper __eq__ method implementation for accurate
settings comparison during job validation and configuration management.
Core Configuration Parameters
Job Type and Methods
Parameter |
Type |
Description |
|---|---|---|
|
str |
Calculation type (QMMM, QM/QM2, QM/QM2/MM, MOL-CRYSTAL-QMMM, IONIC-CRYSTAL-QMMM) |
|
str |
DFT functional for high-level (QM) region (B3LYP, PBE0, etc.) |
|
str |
Basis set for high-level (QM) region (def2-SVP, def2-TZVP, etc.) |
|
str |
DFT functional for intermediate-level (QM2) layer |
|
str |
Basis set for intermediate-level (QM2) layer |
|
str |
Built-in method for intermediate-level (QM2) (XTB, HF-3C, PBEH-3C, R2SCAN-3C, PM3, AM1) |
|
str |
ORCA force-field parameter file for |
Settings Comparison and Validation
The ORCAQMMMJobSettings class now supports robust equality comparison including:
Complete attribute comparison: All QMMM-specific parameters are included in equality checks
Configuration validation: Enables accurate detection of setting changes during job execution
Type safety: Proper type checking prevents invalid comparisons
Inheritance support: Maintains compatibility with parent ORCA settings class
This enhancement improves reliability when: - Comparing job configurations across multiple runs - Validating project settings consistency - Detecting configuration changes in automated workflows - Debugging multiscale calculation setup issues
Settings Atom Partitioning
Parameter |
Type |
Description |
|---|---|---|
|
list/str |
High-level (QM) region atom indices (e.g., [1,2,3] or “1-10,15”) |
|
list/str |
Intermediate-level (QM2) region atom indices |
|
list/str |
Active atoms for optimization (default: all atoms) |
Settings Charge and Multiplicity
charge_high and mult_high are required for input generation: they are written to the coordinate section.
charge_total / charge_intermediate (and their multiplicities) belong in the %qmmm block and do not
substitute for the high-level values.
Parameter |
Type |
Description |
|---|---|---|
|
int |
Required. High-level (QM) region charge ( |
|
int |
Required. High-level (QM) region spin multiplicity ( |
|
int |
Intermediate layer charge in the |
|
int |
Intermediate layer multiplicity in the |
|
int |
Total system charge in the |
|
int |
Total system multiplicity in the |
QM/MM Advanced Options
Link Atom and Interface Control
Parameter |
Type |
Description |
|---|---|---|
|
dict |
Custom QM-H bond distances {(atom1, atom2): distance} |
|
bool |
Remove bend/torsion double counting for link atoms |
|
bool |
Remove bond double counting for link atoms |
|
str |
Electronic or mechanical embedding (“electronic”/”mechanical”) |
Solvation and Environment
Parameter |
Type |
Description |
|---|---|---|
|
str |
Solvation model for QM2 region (CPCM, SMD, ALPB(Water)) |
Crystal QM/MM Parameters
Charge Convergence Control
Parameter |
Type |
Description |
|---|---|---|
|
bool |
Use converged charges for crystal QM/MM |
|
int |
Maximum cycles for charge convergence |
|
float |
Convergence threshold for charges |
|
float |
Scaling factor for MM atomic charges |
Crystal Structure Parameters
Parameter |
Type |
Description |
|---|---|---|
|
int |
Number of atoms per unit cell (MOL-CRYSTAL-QMMM) |
|
str |
ECP type for boundary region (IONIC-CRYSTAL-QMMM) |
|
int |
Number of ECP layers around QM region |
|
float |
Scaling factor for ECP atomic charges |
Optimization Controls
Parameter |
Type |
Description |
|---|---|---|
|
list/str |
Fixed atom indices in geometry optimization |
|
bool |
Use active atom information from PDB file |
Troubleshooting
Common Issues and Solutions
- Settings Comparison Errors
With the enhanced equality comparison, you can now reliably detect when settings have changed between job runs. The simplified comparison (without detailed difference logging) ensures faster execution.
- QM/MM Interface Optimization
If the QM/MM interface is problematic, adjust custom bond lengths or reconsider atom partitioning. The improved settings validation helps ensure consistent interface parameter application.
- Force Field and Method Compatibility
Ensure your system has required force field files and that QM methods are compatible. The enhanced error checking provides clearer messages about missing dependencies.
- Crystal QM/MM Setup
For crystal calculations, ensure proper unit cell definition and charge convergence settings. The validation methods help detect incompatible parameter combinations.
- Performance Optimization
Use appropriate basis sets for each layer (larger for QM, smaller for QM2)
Consider semi-empirical methods for large QM2 regions
Balance QM region size with available computational resources
Use mechanical embedding for very large systems to reduce computational cost
For additional support and examples, see the CHEMSMART community forums and documentation repository.