CalculateModel

Module in charge of creating input files for QM-only or QM/MM calculations. This module integrates the AQME QPREP workflow.

QM Treatment

class QMzyme.CalculateModel.QM_Method(basis_set, functional, qm_input='', qm_end='', program='orca')

Bases: CalculationBase

Class to set a quantum mechanics method for a QMzymeRegion.

Parameters:
  • region (QMzymeRegion, required) -- QMzymeRegion to apply method to

  • basis_set -- Defines the basis set to use for calculation.

  • functional (str, required) -- Defines the functional to use for calculation.

  • charge (int) -- Charge of the region. If not provided in parameters, charge will be guessed.

  • mult (int, default=1) -- Multiplicity of the region.

  • qm_input (str, default='') -- Keywords to include in the input file route line to declare any details beyond the basis set and functional. E.g. "EmpiricalDispersion=GD3BJ opt freq". Not including anything here means the calculation will be a single-point energy calculation with no frequency analysis.

  • qm_end (str, default='') -- Final line(s) in the input file.

xTB Treatment

class QMzyme.CalculateModel.XTB_Method

Bases: CalculationBase

Class to set an xTB method for a QMzymeRegion.

MM Treatment

Under development.

Developer Classes

If you are interested in contributing to QMzyme by creating new calculation methods, you will need to interact with the classes.

class QMzyme.CalculateModel.CalculationBase

Base class for all single-method classes. Contains the inherited method assign_to_region().

assign_to_region(region, charge=None, mult=1)

Connects a calculation method instance to a QMzymeRegion. This method also searches for any atoms in the region with attribute is_fixed=True to store what atoms will be constrained in the calculation file.

Parameters:
  • region (QMzymeRegion, required) -- Region to assign method instance to.

  • charge (int, default=None) -- Charge of the region. If not specified and the QMzymeRegion instance does not have a charge attribute, the QMzymeRegion guess_charge() method will be called.

class QMzyme.CalculateModel.MultiscaleCalculationBase

Bases: CalculationBase

Base class for all multi-scale methods.

assign_to_region(region, charge=None, mult=1)

Connects a calculation method instance to a QMzymeRegion. This method also searches for any atoms in the region with attribute is_fixed=True to store what atoms will be constrained in the calculation file.

Parameters:
  • region (QMzymeRegion, required) -- Region to assign method instance to.

  • charge (int, default=None) -- Charge of the region. If not specified and the QMzymeRegion instance does not have a charge attribute, the QMzymeRegion guess_charge() method will be called.

class QMzyme.CalculateModel.CalculateModel

Class responsible for storing calculation type and associated region. This information is used to determine what type of calculation writer to call in the Writers module.

This class also determines if there are any model issues, such as guessing region charge if partial overlap between occurs between regions (you do not want to double-count charge from duplicate atoms).

This class will also alert you if you if the methods you are assigning to regions do not add up to a multi-scale calculation method that exists as a subclass of Writer, because QMzyme would not know how to write that input file without the corresponding writer class.

combine_regions_and_methods()

This method is triggered in GenerateModel when write_input() is called.

It ensures the overall multiscale method contains all atoms of the QMzymeModel regions that have been assigned a method.

class QMzyme.CalculateModel.CalculationFactory

Factory Class to Register Concrete Calculation Method Classes.