Potentials¶
In order to compute the energy or the forces acting on a particle, two informations are needed : a potential energy function, and a computation algorithm. The potential function is a description of the variations of the potential with the particles positions, and a potential computation is a way to compute the values of this potential function. The following image shows the all the potentials functions types currently available in Jumos.
We can see these potentials are classified as four main categories: pair potentials, bond potentials, angles potentials (between 3 atoms) and dihedral potentials (between 4 atoms).
The only implemented pair potentials are shortrange potentials. Shortrange pair potentials go to zero faster than the \(1/r^3\) function, and longrange pair potentials go to zero at the same speed or more slowly than \(1/r^3\). A typical example of longrange pair potential is the Coulomb potential between charged particles.
Potential functions¶
Shortrange pair potential¶
Shortrange pair potential are subtypes of PairPotential. They only depends on the distance between the two particles they are acting on. They should have two main properties:
 They should go to zero when the distance goes to infinity;
 They should go to zero faster than the \(1/r^3\) function.
LennardJones potential¶
A LennardJones potential is defined by the following expression:

LennardJones
(epsilon, sigma)¶ Creates a LennardJones potential with \(\sigma = \text{sigma}\), and \(\epsilon = \text{epsilon}\).
sigma
should be in angstroms, andepsilon
in \(kJ/mol\).Typical values for Argon are: \(\sigma = 3.35\ A, \epsilon = 0.96\ kJ/mol\)
Bonded potential¶
Bonded potentials acts between two particles, but does no go to zero with an infinite distance. A contrario, they goes to infinity as the two particles goes apart of the equilibirum distance.
Harmonic¶
An harmonic potential have the following expression:
\(D_0\) is the depth of the potential well.

Harmonic
(k, r0, depth=0.0)¶ Creates an harmonic potential with a spring constant of k (in \(kJ.mol^{1}.A^{2}\)), an equilibrium distance \(r_0\) (in angstroms); and a well’s depth of \(D_0\) (in \(kJ/mol\)).
Potential computation¶
As stated at the begiging of this section, we need two informations to compute interactions between particles: a potential function, and a potential computation. The potential compuatation algorithms come in four flavors:
 The
DirectComputation
is only a small wrapper on the top of the potential functions, and directly calls the potential function methods for energy and force evaluations.  The
CutoffComputation
is used for short range potentials. All interactions at a longer distance than the cutoff distance are set to zero. The default cutoff is \(12\ A\), and this can be changed by passing acutoff
keyword argument to theadd_interaction
function. With this computation, the energy is shifted so that their is a continuity in the energy at the cutoff distance.  The
TableComputation
use table lookup to extrapolate the potential energy and the forces at a given point. This saves computation time at the cost of accuracy. This algorithm is parametrized by an integer, the size of the undelying array. Increases in this size will result in more accuracy, at the cost of more memory usage. The default size is 2000 points — which corresponds to roughly 15kb.TableComputation
has also a maximum distance for computations,rmax
. For any bigger distances, theTableComputation
will returns a null energy and null forces. SoTableComputation
can only be used if you are sure that the particles will never be at a greater distance thanrmax
.  The
LongRangeComputation
is not implemented yet.
Which computation for which potential ?¶
Not all computation algorithms are suitable for all potential functions. The usable associations are in the table below.
Function  DirectComputation  CutoffComputation  TableComputation 

ShortRangePotential  
BondedPotential  
AnglePotential  
DihedralPotential 