Available Modules

dpolfit.psi4.qmesps

dpolfit.fitting.polarizability

dpolfit.fitting.respdpol

Fit partial charges for typed polarizabilities

dpolfit.examples

This folder includes some examples to use this package.

dpolfit.openmm.ffxml

This module contains functions to customize openmm xml force field files.

dpolfit.utilities.constants

This module contains some conversion constants.

API Documentation

dpolfit.psi4.qmesps.generate_grid(wd: str, density: float = 17.0, layers: float = 10.0) 0[source]

[TODO:description]

Parameters:

wd (str) – [TODO:description]

Returns:

[TODO:description]

Return type:

0

dpolfit.psi4.qmesps.worker(input_file: str, wd: str, maxconf: int = 10, imposed_fields: dict = {'0': [0.0, 0.0, 0.0], 'x+': [0.01, 0.0, 0.0], 'x-': [-0.01, 0.0, 0.0], 'y+': [0.0, 0.01, 0.0], 'y-': [0.0, -0.01, 0.0], 'z+': [0.0, 0.0, 0.01], 'z-': [0.0, 0.0, -0.01]}) str[source]

The main function to carry out geometry optimization and QM ESPs generation.

This function requires a modified version of openff-recharge for customized grid setting and imposed external electric fields.

Parameters:
  • input_file (str) – input dataset

  • wd (str) – working directory

Returns:

working directory that contains all the output data

Return type:

str

dpolfit.fitting.polarizability.label_alpha(oemol: OEMol, smarts_pattern: str, index: bool = True) list[source]

Lable polarizability parameters on the molecule

Parameters:
  • oemol (OEMol) – openeye molecule object

  • smarts_pattern (string) – the smarts pattern used to match the molecule

Returns:

return matched SMARTs patterns

Return type:

list

dpolfit.fitting.polarizability.train(oedatabase: OEMolRecord, parameter_types: list) dict[source]

The main function to train polarizability against generated QM ESPs

Parameters:
  • oedatabase (.oedb) – The OE database object that contains all training data

  • parameter_types (List) – The polarizability typing scheme

Returns:

return derived polarizabilities and optimization details

Return type:

dict

Fit partial charges for typed polarizabilities

dpolfit.fitting.respdpol.calc_desp(natom: int, qs: ndarray, alphas: list, drjk: ndarray, r_ij: ndarray, r_ij3: ndarray) ndarray[source]

Calculate the ESP from induced dipoles of the molecule. Unit: e / bohr

dpolfit.fitting.respdpol.coulomb_scaling_rdkit(rdmol: Mol, coulomb14scale: float = 0.5) ndarray[source]
Parameters:
  • rdmol (Chem.rdchem.Mol) – An input rdkit molecule used for specifying connectivity

  • coulomb14scale (float)

Return type:

ndarray

dpolfit.fitting.respdpol.pair_equivalent(pattern: list) ndarray[source]

A function to pair related patterns together for use as constraints

Parameters:

pattern (list) – A list of patterns, could be elements, SMIRNOFF patterns

Returns:

Return pairs of related patterns in a nested numpy ndarry.

Return type:

ndarry