Interface torchmdnet

Interface to the TorchMD-NET machine learning potentials (github.com/torchmd/torchmd-net).

PM6-ML

Together with the MOPAC and DFTD3 interfaces, it can be used to perform calculations using the delta-ML method PM6-ML [1]. The ML model file needed for that is available at github.com/Honza-R/mopac-ml.

Input files for performing PM6-ML calculations are shown in the following examples.

Dependencies

The interface needs a Python environment with torchmd-net library and all its dependencies installed. This can be done using conda:

conda create --name pm6-ml
conda activate pm6-ml
conda install -c conda-forge torchmd-net simple-dftd3 dftd3-python

References

  1. Nováček M., Řezáč J. ChemRxiv preprint, DOI: 10.26434/chemrxiv-2024-3nwwv-v2, 2024.

Methods and capabilities

The interface implements following methods (specified by keyword 'method'):

All the methods support calculation of following properties:

Keywords used

Keywords specific for this interface:

Examples

The following examples, along with all other files needed to run them, can be found in the directory cuby4/interfaces/torchmdnet/examples

#===============================================================================
# PM6-ML example 1: setup, interaction energy calculation
#===============================================================================
# Interaction energy in water dimer, the geometry is taken from the S66 dataset
job: interaction
geometry: S66:01

# The base calculation is PM6 in MOPAC, the corrections are added as modifiers
# This example assumes that the MOPAC interface is already configured
interface: mopac
method: pm6

# The PM6-ML method contains two additional terms, the ML correction and the
# D3 dispersion correction. These are added as modifiers:
modifiers: torchmdnet, dftd3

# Note that the torchmdnet interface requires a Python environment set up
# as described at https://github.com/Honza-R/mopac-ml
# The torchmdnet modifier needs a path to the ML model file which can be
# downloaded thre as well.
modifier_torchmdnet:
  torchmd_model: /path_to/PM6-ML_correction_seed8_best.ckpt

# Finally, the dftd3 interface is set up with the parameters for the D3 correction
modifier_dftd3:
  d3_hh_fix: no
  d3_damping: bj
  d3_s6: 1.0
  d3_s8: 0.3908
  d3_a1: 0.566
  d3_a2: 3.128
  d3_3body: yes

#===============================================================================
# PM6-ML example 2: dataset calculation
#===============================================================================
# This example computes and evaluates the SCONF data set from the GMTKN55
# database which features conformation energies of sugars
job: dataset
dataset: GMTKN55_SCONF

# For the GMTKN55 datasets, all the setup of the method has to be in a separate
# block named "calculation", with job type set to "energy"
calculation:
  job: energy
  # The setup of PM6-ML is teh same as in the first example:
  interface: mopac
  method: pm6
  modifiers: torchmdnet, dftd3
  modifier_torchmdnet:
    torchmd_model: /path_to/PM6-ML_correction_seed8_best.ckpt
  modifier_dftd3:
    d3_hh_fix: no
    d3_damping: bj
    d3_s6: 1.0
    d3_s8: 0.3908
    d3_a1: 0.566
    d3_a2: 3.128
    d3_3body: yes