Bond Distance Restraint

The Bond Distance Restraint is a potential restraint. However, in contrast with other Potential Restraints in ProtoSyn, a distance_matrix is not calculated. Instead, the Pose's Graph is iterated (See Counters and Iterators), and all bonds of an Atom are measured and evaluated according to a given potential.

ProtoSyn.Calculators.Restraints.calc_bond_distance_restraintFunction
calc_bond_distance_restraint([::Type{A}], pose::Pose, update_forces::Bool = false; x0::T = 2.0) where {A <: ProtoSyn.AbstractAccelerationType, T <: AbstractFloat}

Calculate the Pose pose bond distance restraint energy according to a quadratic potential, based on the cartesian coordinates (make sure the Pose pose is synched, see sync!). This potential defines a maximum distance for the bond, based on the elements involved in the bond (See ProtoSyn.max_bond_lengths). If the pair of elements is not found, a default x0 value is used instead. This function iterates over all Atom instances in the provided Pose pose (See Counters and Iterators) and checks all bonds in each Atom. This means that bonds energy and forces are usually checked twice, as both Atom instances involved in a bond have records on one another. This is usually not a problem, as the energy value is compared between frames in a simulation environment and therefore the scale of the value is not important. If the update_forces flag is set to true (false, by default), also return the calculated forces based on this potential. Note that this function assumes Atom.id entries are synched between the Graph and State (See Indexation). An optional parameter Type{<: AbstractAccelerationType} can be provided, stating the acceleration type used to calculate this energetic contribution (See ProtoSyn acceleration types).

Note:

As of ProtoSyn 1.0, this function's acceleration type defaults to SIMD_0 regardless of the requested acceleration type. This may be changed in future iterations.

See also

get_default_bond_distance_restraint

Examples

julia> ProtoSyn.Calculators.Restraints.calc_bond_distance_restraint(pose)
(0.0, nothing)
source
ProtoSyn.Calculators.Restraints.get_default_bond_distance_restraintFunction
get_default_bond_distance_restraint(;[α::T = 1.0]) where {T <: AbstractFloat}

Return the default bond distance restraint EnergyFunctionComponent. α sets the component weight (on an EnergyFunction instance, 1.0 by default). This function employs calc_bond_distance_restraint as the :calc function.

Settings

  • x0::Float64 - The maximum allowed bond distance. Any bond with a longer distance will be subjected to a quadratic energy penalty. This value is normally extracted from ProtoSyn.Units.max_bond_lengths. If the pair of Atom instances identified in a bond is not found in this table, use this default x0 value (Default: 2.0).

See also

calc_bond_distance_restraint

Examples

julia> ProtoSyn.Calculators.Restraints.get_default_bond_distance_restraint()
🞧  Energy Function Component:
+---------------------------------------------------+
| Name           | Bond_Distance_Rest               |
| Alpha (α)      | 1.0                              |
| Update forces  | true                             |
| Calculator     | calc_bond_distance_restraint     |
+---------------------------------------------------+
 |    +----------------------------------------------------------------------------------+
 ├──  ● Settings                      | Value                                            |
 |    +----------------------------------------------------------------------------------+
 |    | x0                            | 2.0                                              |
 |    +----------------------------------------------------------------------------------+
 |    
 └──  ○  Selection: nothing
source

ProtoSyn Bond Distance Restraint

Figure 1 | A diagram representation of the Bond Distance Restraint EnergyFunctionComponent. The applied potential is a quadratic function, with domain between [x0, +∞]. The x0 setting is parametrized based on observed distances between paits of Atom instances, according to the provided table (saved in ProtoSyn.Units.max_bond_lengths). If any given pair of atoms is not found in this table, the default x0 value of the EnergyFunctionComponent is used instead (2.0 Å, by default).