Bonded Interactions
A bonded interaction is an interaction due to a bond between a group of particles. A bond describes an interaction exclusively between the group of particles using a potential. Tissue Forge currently supports bond and bond-like angle and dihedral. To optimize simulation performance, bonds are visualized with simple lines by default. However, three-dimensional visualization of bonded interactions can be enabled using the rendering interface.
Bonds
A bond describes an interaction between two particles in terms
of the distance between the two particles. A bond can be
created using the method create
on the class
Bond
, which returns a handle to the newly created bond.
A bond can be manually destroyed using the BondHandle
method destroy
.
import tissue_forge as tf
# Create a bond between particles "p0" and "p1" using the potential "pot_bond"
bond_handle = tf.Bond.create(pot_bond, p0, p1)
Bond
instances have an optional dissociation energy
that, when set, describes an energy threshold above which the
bond is automatically destroyed. Likewise, each Bond
instance has an optional half life that, when set, describes
the probability of destroying the bond at each simulation step,
which Tissue Forge automatically implements,
bond_handle.dissociation_energy = 1E-3
bond_handle.half_life = 10.0
All bonds in the universe are accessible using the Universe
property bonds
,
all_bonds = tf.Universe.bonds # Get updated list of all bonds
A bond is rendered as a line joining the two particles of the bond.
Angles
An angle describes an interaction between two particles in terms
of the angle made by their relative position vectors with respect
to a third particle. An angle can be created using the method
create
on the class Angle
,
which returns a handle to the newly created angle. An angle can be
manually destroyed using the AngleHandle
method
destroy
. Angle
instances
have analogous properties and methods to most of those defined for Bond
instances, including accessing each constituent particle
by indexing, and optional dissociation energy and half life.
All angles in the universe are accessible using the Universe
property angles
,
# Create a bond between particles "p0" and "p2" w.r.t.
# particle "p1" using the potential "pot_ang"
angle_handle = tf.Angle.create(pot_ang, p0, p1, p2)
all_angles = tf.Universe.angles # Get updated list of all angles
An angle is rendered as a line joining the center particle and each end particle, and a line joining the midpoint of those two lines.
Dihedrals
A dihedral describes an interaction between four particles in terms
of the angle between the planes made by their relative position vectors.
A dihedral can be created using the method create
on the class Dihedral
, which returns a handle
to the newly created dihedral. A dihedral can be manually destroyed using
the DihedralHandle
method destroy
.
Dihedral
instances have analogous properties and methods to most
of those defined for Bond
instances, including accessing each
constituent particle by indexing, and optional dissociation energy and half life.
All dihedrals in the universe are accessible using the Universe
property dihedrals
,
# Create a bond between the plane made by particles "p0", "p1" and "p2"
# and the plane made by particles "p1", "p2" and "p3"
# using the potential "pot_dih"
dihedral_handle = tf.Dihedral.create(pot_dih, p0, p1, p2, p3)
all_dihedrals = tf.Universe.dihedrals # Get updated list of all dihedrals
A dihedral is rendered as a line joining the first and second particles, a line joining the third and fourth particles, and a line joining the midpoint of those two lines.