mtenn.readout.PKiReadout

class mtenn.readout.PKiReadout(*args, **kwargs)[source]

Bases: Readout

Readout implementation to convert \(\Delta \mathrm{G}\) values to \(\mathrm{pK_i}\) values. This new implementation assumes implicit energy units, WHICH WILL INVALIDATE MODELS TRAINED PRIOR TO v0.3.0.

Assuming implicit energy units:

\[ \begin{align}\begin{aligned}\mathrm{\Delta G} &= \mathrm{ln(K_i)}\\\mathrm{K_i} &= \mathrm{exp(\Delta G)}\\\mathrm{pK_i} &= \mathrm{-log10(K_i)}\\\mathrm{pK_i} &= \mathrm{-log10(exp(\Delta G))}\\\mathrm{pK_i} &= \frac{\mathrm{-ln(exp(\Delta G))}}{\mathrm{ln(10)}}\\\mathrm{pK_i} &= \frac{\mathrm{-\Delta G}}{\mathrm{ln(10)}}\end{aligned}\end{align} \]

Methods

forward(delta_g)

Method to convert a predicted \(\Delta \mathrm{G}\) value into a \(\mathrm{pK_i}\) value.

forward(delta_g)[source]

Method to convert a predicted \(\Delta \mathrm{G}\) value into a \(\mathrm{pK_i}\) value.

Parameters:

delta_g (torch.Tensor) – Input \(\Delta \mathrm{G}\) value.

Returns:

Calculated \(\mathrm{pK_i}\) value.

Return type:

torch.Tensor