# md.bond

Overview

 Bond Constructs the bond potential. FENEWCA Bond potential that adds FENE to a WCA repulsive potential. Harmonic Harmonic bond potential. Table Tabulated bond potential. Tether Tethering bond potential.

Details

Bond potentials.

class hoomd.md.bond.Bond

Bases: hoomd.md.force.Force

Constructs the bond potential.

Note

Bond is the base class for all bond potentials. Users should not instantiate this class directly.

class hoomd.md.bond.FENEWCA

Bases: hoomd.md.bond.Bond

Bond potential that adds FENE to a WCA repulsive potential.

FENEWCA computes the energy and force from the FENE and WCA potentials between the two particles in each defined bond:

$V(r) = - \frac{1}{2} k r_0^2 \ln \left( 1 - \left( \frac{r - \Delta}{r_0} \right)^2 \right) + V_{\mathrm{WCA}}(r)$

where

\begin{eqnarray*} V_{\mathrm{WCA}}(r) = & 4 \varepsilon \left[ \left( \frac{\sigma}{r - \Delta} \right)^{12} - \left( \frac{\sigma}{r - \Delta} \right)^{6} \right] + \varepsilon; & r-\Delta < 2^{\frac{1}{6}}\sigma\\ = & 0; & r-\Delta \ge 2^{\frac{1}{6}}\sigma \end{eqnarray*}

, $$r$$ is the distance from one particle to the other in the bond, $$k$$ is the attractive force strength, $$r_0$$ is the size of the bond, $$\varepsilon$$ is the repulsive interaction energy, and $$sigma$$ is the repulsive interaction width.

params

The parameter of the FENE potential bonds. The dictionary has the following keys:

• k (float, required) - attractive force strength $$k$$ $$[\mathrm{energy} \cdot \mathrm{length}^{-2}]$$.

• r0 (float, required) - size parameter $$r_0$$ $$[\mathrm{length}]$$.

• epsilon (float, required) - repulsive force strength $$\varepsilon$$ $$[\mathrm{energy}]$$.

• sigma (float, required) - repulsive force interaction width $$\sigma$$ $$[\mathrm{length}]$$.

• delta (float, required) - radial shift $$\Delta$$ $$[\mathrm{length}]$$.

Type

TypeParameter[bond type, dict]

Examples:

fenewca = bond.FENEWCA()
fenewca.params['A-A'] = dict(k=3.0, r0=2.38, epsilon=1.0, sigma=1.0,
delta=0.0)
fenewca.params['A-B'] = dict(k=10.0, r0=1.0, epsilon=0.8, sigma=1.2,
delta=0.0)
class hoomd.md.bond.Harmonic

Bases: hoomd.md.bond.Bond

Harmonic bond potential.

Harmonic specifies a harmonic potential energy between the two particles in each defined bond.

$V(r) = \frac{1}{2} k \left( r - r_0 \right)^2$

where $$r$$ is the distance from one particle to the other in the bond.

params

The parameter of the harmonic bonds for each particle type. The dictionary has the following keys:

• k (float, required) - potential constant $$[\mathrm{energy} \cdot \mathrm{length}^{-2}]$$

• r0 (float, required) - rest length $$[\mathrm{length}]$$

Type

TypeParameter[bond type, dict]

Examples:

harmonic = bond.Harmonic()
harmonic.params['polymer'] = dict(k=3.0, r0=2.38)
harmonic.params['backbone'] = dict(k=10.0, r0=1.0)
class hoomd.md.bond.Table(width)

Bases: hoomd.md.bond.Bond

Tabulated bond potential.

Parameters

width (int) – Number of points in the table.

Table computes a user-defined potential and force between the two particles in each bond.

Note

For potentials that diverge near r=0, to set r_min to a non-zero value.

The force $$\vec{F}$$ is:

\begin{eqnarray*} \vec{F}(\vec{r}) = & 0; & r < r_{\mathrm{min}} \\ = & F_\mathrm{table}(r)\hat{r}; & r_{\mathrm{min}} \le r < r_{\mathrm{max}} \\ = & 0; & r \ge r_{\mathrm{max}} \\ \end{eqnarray*}

and the potential $$V(r)$$ is:

\begin{eqnarray*} V(r) = & 0; & r < r_{\mathrm{min}} \\ = & V_\mathrm{table}(r); & r_{\mathrm{min}} \le r < r_{\mathrm{max}} \\ = & 0; & r \ge r_{\mathrm{max}} \\ \end{eqnarray*}

where $$\vec{r}$$ is the vector pointing from one particle to the other in the bond.

Warning

Bonds that stretch to a length $$r \ge r_{\mathrm{max}}$$ result in an error.

Provide $$F_\mathrm{table}(r)$$ and $$V_\mathrm{table}(r)$$ on evenly spaced grid points points between $$r_{\mathrm{min}}$$ and $$r_{\mathrm{max}}$$. Table linearly interpolates values when $$r$$ lies between grid points and between the last grid point and $$r=r_{\mathrm{max}}$$. The force must be specificed commensurate with the potential: $$F = -\frac{\partial V}{\partial r}$$.

params

The potential parameters. The dictionary has the following keys:

• r_min (float, required) - the minimum distance to apply the tabulated potential, corresponding to the first element of the energy and force arrays $$[\mathrm{length}]$$.

• r_max (float, required) - the minimum distance to apply the tabulated potential, corresponding to the first element of the energy and force arrays $$[\mathrm{length}]$$.

• V ((width,) numpy.ndarray of float, required) - the tabulated energy values $$[\mathrm{energy}]$$. Must have a size equal to width.

• F ((width,) numpy.ndarray of float, required) - the tabulated force values $$[\mathrm{force}]$$. Must have a size equal to width.

Type

TypeParameter [bond type, dict]

width

Number of points in the table.

Type

int

class hoomd.md.bond.Tether

Bases: hoomd.md.bond.Bond

Tethering bond potential.

Tether specifies a Tethering potential energy between two particles in each defined bond.

$V(r) = V_{\mathrm{att}}(r) + V_{\mathrm{rep}}(r)$

where $$r$$ is the distance from one particle to the other in the bond.

\begin{eqnarray*} V_{\mathrm{att}}(r) = & k_b \frac{exp(1/(l_{c0}-r)}{l_{max}-r}; & r > l_{c0}\\ = & 0; & r \leq l_{c0} \end{eqnarray*}
$\begin{split}\begin{eqnarray*} V_{\mathrm{rep}}(r) = & k_b \frac{exp(1/(r-l_{c1})}{r-l_{min}}; & r < l_{c1}\\ = & 0; & r \ge l_{c1} \end{eqnarray*}\end{split}$
$l_{min} < l_{c1} < l_{c0} < l_{max}$
params

The parameter of the Tethering potential bonds. The dictionary has the following keys:

• k_b (float, required) - bond stiffness $$[\mathrm{energy}]$$

• l_min (float, required) - minimum bond length $$[\mathrm{length}]$$

• l_c1 (float, required) - cutoff distance of repulsive part $$[\mathrm{length}]$$

• l_c0 (float, required) - cutoff distance of attractive part $$[\mathrm{length}]$$

• l_max (float, required) - maximum bond length $$[\mathrm{length}]$$

Type

TypeParameter[bond type, dict]

Examples:

bond_potential = bond.Tether()
bond_potential.params['tether'] = dict(k_b=10.0, l_min=0.9, l_c1=1.2,
l_c0=1.8, l_max=2.1)