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] qmmm [QMMM_OPTIONS]
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 medium-level (QM2) region |
|
string |
Basis set for medium-level (QM2) region |
|
string |
Built-in method for medium-level (QM2) region (XTB, HF-3C, PBEH-3C) |
|
string |
Force field for low-level (MM) region (MMFF, AMBER, CHARMM) |
Atom Partitioning
Option |
Type |
Description |
|---|---|---|
|
string |
High-level atom indices (e.g., ‘1-15,20’ or ‘1:15 20’) |
|
string |
Medium-level atom indices (e.g., ‘16-30’) |
|
string |
Active atom indices for optimization |
Charge and Multiplicity
Option |
Type |
Description |
|---|---|---|
|
int |
High-level region charge |
|
string |
High-level region multiplicity |
|
int |
Medium layer charge (for QM/QM2/MM) |
|
string |
Medium layer multiplicity |
|
int |
Total system charge |
|
string |
Total system multiplicity |
Advanced QM/MM Options
Option |
Type |
Description |
|---|---|---|
|
string |
Solvation model for medium-level region (CPCM, SMD) |
|
string |
Embedding type: electronic or mechanical |
|
dict |
Custom high-level-H bond lengths |
|
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 QM region and AMBER force field:
chemsmart sub orca -p protein_qmmm -f protein.pdb qmmm -j QMMM -hx B3LYP -hb def2-SVP -lf amber99 -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 qmmm -j QM/QM2 -hx B3LYP -hb def2-TZVP -mx HF -mb STO-3G -ha 1-15 -ma 16-50 -ch 0 -mh 1 -cm 0 -mm 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 qmmm -j QM/QM2/MM -hx B3LYP -hb def2-SVP -mm HF-3C -lf amber99 -ha 1-10 -ma 11-30 -ch 0 -mh 1 -cm 0 -mm 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 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 qmmm -j QMMM -hx M06-2X -hb def2-TZVP -lf charmm36 -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:
# ~/.chemsmart/orca/qmmm.yaml
high_level_functional: B3LYP
high_level_basis: def2-SVP
low_level_force_field: amber99
jobtype: opt
embedding_type: electronic
delete_la_double_counting: true
Then use it with the project flag:
chemsmart sub orca -p qmmm -f system.pdb 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 medium-level (QM2) intermediate layer |
|
str |
Basis set for medium-level (QM2) intermediate layer |
|
str |
Built-in method for medium-level (XTB, HF-3C, PBEH-3C) |
|
str |
Force field for low-level (MM) region (MMFF, AMBER, CHARMM) |
Settings Atom Partitioning
Parameter |
Type |
Description |
|---|---|---|
|
list/str |
High-level region atom indices (e.g., [1,2,3] or “1-10,15”) |
|
list/str |
Medium-level region atom indices |
|
list/str |
Active atoms for optimization (default: all atoms) |
Settings Charge and Multiplicity
Parameter |
Type |
Description |
|---|---|---|
|
int |
Charge of high-level (QM) region |
|
int |
Multiplicity of high-level (QM) region |
|
int |
Charge of medium system (QM2 layer) |
|
int |
Multiplicity of medium system |
|
int |
Total system charge |
|
int |
Total system multiplicity |
Advanced Settings Options
Embedding and Interactions
Parameter |
Type |
Description |
|---|---|---|
|
str |
Electronic (default) or mechanical embedding |
|
str |
Solvation model for medium-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:
Basic QM/MM Configuration (~/.chemsmart/orca/qmmm.yaml):
# Basic additive QM/MM settings
jobtype: "QMMM"
qm_functional: "B3LYP"
qm_basis: "def2-SVP"
mm_force_field: "amber99"
embedding_type: "electronic"
delete_la_double_counting: true
ONIOM Configuration (~/.chemsmart/orca/oniom.yaml):
# Three-layer ONIOM settings
jobtype: "QM/QM2/MM"
qm_functional: "B3LYP"
qm_basis: "def2-TZVP"
qm2_functional: "HF"
qm2_basis: "STO-3G"
mm_force_field: "amber99"
embedding_type: "electronic"
Crystal QM/MM Configuration (~/.chemsmart/orca/crystal.yaml):
# Molecular crystal QM/MM settings
jobtype: "MOL-CRYSTAL-QMMM"
qm_functional: "PBE"
qm_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 qmmm -qa 1-20 -cq 0 -mq 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",
qm_functional="B3LYP",
qm_basis="def2-SVP",
mm_force_field="amber99",
qm_atoms="1-20",
charge_qm=0,
mult_qm=1,
charge_total=0,
mult_total=1,
embedding_type="electronic",
)
# ONIOM configuration
oniom_settings = ORCAQMMMJobSettings(
jobtype="QM/QM2/MM",
qm_functional="B3LYP",
qm_basis="def2-TZVP",
qm2_method="HF-3C",
mm_force_field="charmm36",
qm_atoms=[1, 2, 3, 4, 5],
qm2_atoms=list(range(6, 21)),
charge_qm=0,
mult_qm=1,
charge_medium=0,
mult_medium=1,
)
Best Practices and Validation
Required Parameters
QM region: Must specify
qm_functionalandqm_basis(unless using built-in methods)Atom partitioning: Must define
qm_atomsfor all calculationsCharges: Must specify appropriate charge/multiplicity for each layer
Force 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_generalcliforallorcajobs - General ORCA CLI options
configuration_setuptheprojectsettings - Project configuration guide