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.
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) |
|
string |
ORCA force-field parameter file written as |
Atom Partitioning
Option |
Type |
Description |
|---|---|---|
|
string |
High-level atom indices (e.g., ‘1-15,20’ or ‘1:15 20’) |
|
string |
Intermediate-level 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 region (CPCM, SMD) |
|
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 low 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, semi-empirical, and MM:
chemsmart sub orca -p complex_system -f system.pdb opt qmmm -j QM/QM2/MM -hx B3LYP -hb def2-SVP -im HF-3C -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 also configure QM/MM settings in your project YAML file. Create a qmmm.yaml file in your project directory.
Charge and multiplicity are not set in the project YAML; pass them on the command line.
# ~/.chemsmart/orca/qmmm.yaml
qmmm:
jobtype: "QMMM"
high_level_functional: B3LYP
high_level_basis: def2-SVP
low_level_method: system.ORCAFF.prms
embedding_type: electronic
delete_la_double_counting: true
Then use it with the project flag:
chemsmart sub 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.
ORCAQMMMJobSettings Reference
The ORCAQMMMJobSettings class provides comprehensive configuration options for ORCA multiscale calculations. This
section provides detailed documentation for programmatic configuration.
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 (XTB, HF-3C, PBEH-3C) |
|
str |
ORCA force-field parameter file for |
Settings Atom Partitioning
Parameter |
Type |
Description |
|---|---|---|
|
list/str |
High-level 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. Charge of high-level (QM) region ( |
|
int |
Required. Multiplicity of high-level (QM) region ( |
|
int |
Intermediate (QM2) layer charge in the |
|
int |
Intermediate (QM2) layer multiplicity in the |
|
int |
Total system charge in the |
|
int |
Total system multiplicity in the |
Advanced Settings Options
Embedding and Interactions
Parameter |
Type |
Description |
|---|---|---|
|
str |
Electronic (default) or mechanical embedding |
|
str |
Solvation model for intermediate-level (CPCM, SMD, etc.) |
|
bool |
Remove bend/torsion double counting |
|
bool |
Remove bond double counting |
Custom Bond Parameters
Parameter |
Type |
Description |
|---|---|---|
|
dict |
Custom high-level-H bond lengths {(atom1, atom2): length} |
Settings Optimization Controls
Parameter |
Type |
Description |
|---|---|---|
|
list/str |
Fixed atom indices during optimization |
|
bool |
Use active atom info from PDB file |
Crystal QM/MM Parameters
For MOL-CRYSTAL-QMMM and IONIC-CRYSTAL-QMMM calculations:
Parameter |
Type |
Description |
|---|---|---|
|
bool |
Use converged charges (default: True) |
|
int |
Max charge convergence cycles |
|
float |
Charge convergence threshold |
|
float |
MM atom charge scaling factor |
|
int |
Atoms per unit cell (required for MOL-CRYSTAL-QMMM) |
|
str |
ECP type for boundary region |
|
int |
Number of ECP layers around QM region |
|
float |
ECP atom charge scaling factor |
Configuration Methods
YAML Configuration Files
Create project-specific QM/MM settings in YAML format. Charge and multiplicity are not set in the project YAML; pass
them on the command line (-ch, -mh, -ct, -mt).
Basic QM/MM Configuration (~/.chemsmart/orca/qmmm.yaml):
# Basic additive QM/MM settings
qmmm:
jobtype: "QMMM"
high_level_functional: "B3LYP"
high_level_basis: "def2-SVP"
low_level_method: "system.ORCAFF.prms"
embedding_type: "electronic"
delete_la_double_counting: true
ONIOM Configuration (~/.chemsmart/orca/oniom.yaml):
# Three-layer ONIOM settings
qmmm:
jobtype: "QM/QM2/MM"
high_level_functional: "B3LYP"
high_level_basis: "def2-TZVP"
intermediate_level_functional: "HF"
intermediate_level_basis: "STO-3G"
low_level_method: "system.ORCAFF.prms"
embedding_type: "electronic"
Crystal QM/MM Configuration (~/.chemsmart/orca/crystal.yaml):
# Molecular crystal QM/MM settings
qmmm:
jobtype: "MOL-CRYSTAL-QMMM"
high_level_functional: "PBE"
high_level_basis: "def2-SVP"
n_unit_cell_atoms: 50
conv_charges: true
conv_charges_max_n_cycles: 30
conv_charges_conv_thresh: 0.01
Using Project Configuration
Use the YAML configuration with the project flag:
chemsmart sub orca -p qmmm -f system.pdb opt qmmm -ha 1-20 -ch 0 -mh 1 -ct 0 -mt 1
Python Configuration
Programmatic configuration using the settings class:
from chemsmart.jobs.orca.settings import ORCAQMMMJobSettings
# Create basic QM/MM settings
qmmm_settings = ORCAQMMMJobSettings(
jobtype="QMMM",
high_level_functional="B3LYP",
high_level_basis="def2-SVP",
low_level_method="system.ORCAFF.prms",
high_level_atoms="1-20",
charge_high=0,
mult_high=1,
charge_total=0,
mult_total=1,
embedding_type="electronic",
)
# ONIOM configuration
oniom_settings = ORCAQMMMJobSettings(
jobtype="QM/QM2/MM",
high_level_functional="B3LYP",
high_level_basis="def2-TZVP",
intermediate_level_method="HF-3C",
low_level_method="system.ORCAFF.prms",
high_level_atoms=[1, 2, 3, 4, 5],
intermediate_level_atoms=list(range(6, 21)),
charge_high=0,
mult_high=1,
charge_intermediate=0,
mult_intermediate=1,
)
Best Practices and Validation
Required Parameters
QM region: Must specify
high_level_functionalandhigh_level_basis(unless using built-in methods)Atom partitioning: Must define
high_level_atomsfor all calculationsHigh-level charge/mult: Must specify
charge_highandmult_high(written to* xyz)Total/intermediate charges: Specify
charge_total/charge_intermediatefor the%qmmmblock as neededForce fields: Required for calculations involving MM regions
Validation Rules
Method conflicts: Cannot specify both functional/basis and built-in methods for the same layer
Crystal QM/MM: Multiplicity should not be specified for crystal calculations
Force field requirements: MM calculations require valid force field specification
Charge/multiplicity consistency: All layers must have compatible charge/multiplicity values
Performance Considerations
QM region size: Keep QM regions manageable (typically < 100 atoms for routine calculations)
Basis set selection: Balance accuracy vs. computational cost
Crystal calculations: Can be very demanding - ensure adequate computational resources
Convergence settings: Adjust charge convergence parameters for crystal QM/MM
Error Prevention
Atom indexing: Ensure atom indices are valid and don’t overlap inappropriately
File dependencies: Verify force field parameter files exist and are accessible
Resource allocation: Ensure sufficient memory/CPU for large QM/MM systems
Boundary effects: Carefully choose QM/MM boundaries to avoid artifacts
Advanced Features
Expanded 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
API Reference
- class chemsmart.jobs.orca.settings.ORCAQMMMJobSettings(jobtype=None, high_level_functional=None, high_level_basis=None, intermediate_level_functional=None, intermediate_level_basis=None, intermediate_level_method=None, low_level_method=None, high_level_atoms=None, intermediate_level_atoms=None, charge_total=None, mult_total=None, charge_intermediate=None, mult_intermediate=None, charge_high=None, mult_high=None, intermediate_level_solvation=None, intermediate_solv_scheme=None, active_atoms=None, use_active_info_from_pbc=False, optregion_fixed_atoms=None, high_level_h_bond_length=None, delete_la_double_counting=False, delete_la_bond_double_counting_atoms=False, embedding_type=None, conv_charges=True, conv_charges_max_n_cycles=None, conv_charges_conv_thresh=None, scale_formal_charge_mm_atom=None, n_unit_cell_atoms=None, ecp_layer_ecp=None, ecp_layer=None, scale_formal_charge_ecp_atom=None, parent_jobtype=None, **kwargs)[source]
Bases:
ORCAJobSettingsConfiguration for ORCA multiscale QM/MM calculations.
Supports five multiscale calculation types: 1. Additive QM/MM 2. Subtractive QM/QM2 (2-layer ONIOM) 3. Subtractive QM/QM2/MM (3-layer ONIOM) 4. MOL-CRYSTAL-QMMM (molecular crystals) 5. IONIC-CRYSTAL-QMMM (semiconductors/insulators)
- functional for intermediate-level
- Type:
QM2
- set for intermediate-level
- Type:
QM2
- method for intermediate-level
- Type:
XTB, HF-3C, etc.
- indices for intermediate-level
- Type:
QM2
- Solvation model for intermediate-level region
- delete_la_bond_double_counting_atoms
- (bool)
Remove bond double counting
- INTERMEDIATE_LEVEL_BUILT_IN_METHODS = ['XTB', 'XTB0', 'XTB1', 'XTB2', 'HF-3C', 'PBEH-3C', 'R2SCAN-3C', 'PM3', 'AM1']
- check_crystal_qmmm()[source]
Validate crystal QM/MM job settings.
Ensures required parameters are set for MOL-CRYSTAL-QMMM and IONIC-CRYSTAL-QMMM calculations.
- Raises:
AssertionError – If required parameters are missing or invalid
- property qmmm_block
- property qmmm_route_string
- validate_and_assign_level(functional, basis, built_in_method, level_name)[source]
Validate and assign level of theory for high/intermediate/low-level layers.
- Parameters:
functional – DFT functional
basis – Basis set
built_in_method – Built-in ORCA method (XTB, HF-3C, etc.)
level_name – Layer name (high_level, intermediate_level, low_level)
- Returns:
Validated level of theory string
- Return type:
- Raises:
ValueError – If incompatible options are specified
See Also
ORCA CLI Options - General ORCA CLI options
Project Settings - Project configuration guide
ORCA QM/MM Multiscale Calculations Guide - ORCA multiscale / QM/MM calculations