Bonds
Bonds represent connections between pairs of particles. In OVITO, they are managed as a separate topological data structure that stores connectivity information – a list of index pairs referring to the particle list – along with any additional bond properties.
The example below shows a simple molecule consisting of three atoms and two bonds. Note that indices are always zero-based.
The bond list is an optional component of a molecular dataset. Its presence depends on the imported simulation file format; some formats include bond data, while others do not. If bonds are missing, you can generate them dynamically in OVITO using the Create bonds modifier – or the file importer may provide a built-in way to create ad-hoc bonds based on the chemical species and separation of the atoms.
The visual representation of bonds is controlled by the bonds visual element settings, which appears in the top section of the pipeline editor.
Bond properties
Like particles, bonds can have additional attributes known as bond properties. One commonly used property is Bond Type
,
an integer identifier similar to Particle Type
. This property allows OVITO to associate different colors with different types of bonds
and is often used in molecular dynamics simulations to distinguish force field interaction types.
You can also control the display color on a per-bond basis by setting the Color
property in OVITO. The Color coding
modifier is a common tool for setting bond colors based on other quantities associated with the bonds.
The Topology
property, always present in bond datasets, defines the actual connectivity between particles as index pairs.
If particles are deleted from the system, OVITO automatically updates these indices to maintain consistency with the particles.
You can inspect all bond properties using the Bonds tab in the data inspector panel beneath the viewport(s). The Bond analysis modifier is a useful tool for computing statistical properties of the bond network, such as bond length or bond angle histograms.
Additional bond generation tools in OVITO include the Voronoi analysis modifier, which creates bonds between nearest-neighbor particles. Bonds and their properties can also be manipulated using general-purpose modifiers such as:
Compute property – Compute and assign new bond properties.
Expression selection – Select bonds based on property values or bond length.
Assign color – Assign a new color to selected bonds.
Delete selected – Remove selected bonds.
Expand selection – Find particles that are connected to already selected particles.
Special bond properties
Some bond properties play a key role in OVITO, affecting visualization of the bonds. The table below describes these special properties:
Bond property |
Data type (components) |
Description |
---|---|---|
|
int64 (A, B) |
Always present, this property stores the zero-based indices of the two connected particles. |
|
int32 |
Defines bond types, controlling the display color if the |
|
float32 (R, G, B) |
Controls individual bond colors. RGB values range from [0,1]. |
|
float32 |
Determines bond transparency (range: [0,1]). If absent, bonds are fully opaque. |
|
int8 |
Bond selection state (1 = selected, 0 = unselected). |
|
float32 |
Defines per-bond diameter (in simulation units). If absent, bond width is set via the bonds visual element. |
See also
ovito.data.Bonds
(Python API)