torchani.cutoffs#

Collection of Cutoff functions

These can be used to envelope the outputs of torchani.potentials.PairPotential and torchani.aev.AEVComputer

Classes

Cutoff

Base class for cutoff functions

CutoffBiweight

Use a bi-weight function as a cutoff

CutoffCosine

Use a cosine function as a cutoff

CutoffDummy

Dummy cutoff that returns ones as factors

CutoffSmooth

Use an infinitely differentiable exponential cutoff

CutoffTriweight

Use a tri-weight function as a cutoff

class torchani.cutoffs.Cutoff(*args, **kwargs)[source]#

Base class for cutoff functions

forward(distances, cutoff)[source]#

Calculates factors that modify a scalar function, using pair distances

class torchani.cutoffs.CutoffDummy(*args, **kwargs)[source]#

Dummy cutoff that returns ones as factors

forward(distances, cutoff)[source]#

Calculates factors that modify a scalar function, using pair distances

class torchani.cutoffs.CutoffBiweight(*args, **kwargs)[source]#

Use a bi-weight function as a cutoff

The functional expression is: $(1 - (r/r_{cut})^2)^2$

forward(distances, cutoff)[source]#

Calculates factors that modify a scalar function, using pair distances

class torchani.cutoffs.CutoffTriweight(*args, **kwargs)[source]#

Use a tri-weight function as a cutoff

The functional expression is: $(1 - (r/r_{cut})^2)^3$

forward(distances, cutoff)[source]#

Calculates factors that modify a scalar function, using pair distances

class torchani.cutoffs.CutoffCosine[source]#

Use a cosine function as a cutoff

The functional expression is: $0.5 cos(pi r/r_{cut})) + 0.5$

forward(distances, cutoff)[source]#

Calculates factors that modify a scalar function, using pair distances

class torchani.cutoffs.CutoffSmooth(order=2, eps=1e-10)[source]#

Use an infinitely differentiable exponential cutoff

The functional expression is: $exp(1 - 1 / max(epsilon, (1 - (r/r_{cut})^n))$ where n is the order.

forward(distances, cutoff)[source]#

Calculates factors that modify a scalar function, using pair distances