# Bond order pro

Added in version 3.15.0.

This modifier assigns a bond order to each bond in a molecular structure. The algorithm mostly follows the methodology described in

> S. Artemova et al.
> Automatic Molecular Structure Perception for the Universal Force Field
> Journal of Computational Chemistry, 37, 1191-1205 (2016)
> doi:10.1002/jcc.24309

As input, the algorithm requires an existing bond topology. For best results, initial bonds should be created using the Covalent radii mode of OVITO’s Create bonds modifier, as both algorithms (bond creation and bond order assignment) are based on the same paper.

The modifier takes a bond topology as an input and determines a bond order value for each bond (output bond property `Bond Order`). The bond topology remains unchanged, i.e., no bonds will be added or removed in the process. OVITO will render bonds with a bond order of 1 as single cylinders, bonds with a bond order of 2 as double cylinders, and so on.

To find the optimum bond order assignment throughout the molecular structure, different possible configurations are explored and scored based on a cost table. This atomic penalty score table is defined in the original publication (Table 1). As the global optimization problem is not trivial, the modifier splits larger molecules into smaller fragments or chunks that are subsequently optimized separately. The maximum fragment size can be set using the Molecular fragment size limit parameter. Larger fragment sizes lead to improved penalty scores and therefore better results at the cost of increased computation time. This effect can be seen in Figure 3 of the paper. The computation always starts at a fragment size limit of 3, which is then incremented until the computation fully converges or the user-specified maximum size is reached. The final bond order assignment score is stored as a global attribute named `BondOrder.PenaltyScore`. A value of 0 indicates that the assignment was perfect everywhere. Non-zero penalty scores might still be correct, especially if the molecule has broken bonds or charged atoms.

Attention

The modifier requires explicit hydrogen atoms to be present in the system. It cannot work with implicit hydrogens often found in PDB files. Charges are ignored by the bond order assignment algorithm.

Caution

The bond order computation is a non-trivial optimization problem. Especially for highly interconnected systems, such as graphene sheets, carbon nanotubes, or fullerenes, the computation can take extremely long times. Reducing the fragment size limit can help address this, but there will always be systems where no solution can be found in a reasonable time.

## Aromatic perception

The modifier identifies aromatic 5- and 6-rings. Such rings are referenced against a database of known patterns for which the number of electrons contributed to the ring is tabulated. If the total number of electrons in the ring fulfills the Hückel rule (\(N_{\text{e}^-} = 4n+2\)), the ring and its atoms are tagged as aromatic.

These patterns are shown in Figure 6 in the paper. We have made two adjustments in OVITO to improve the aromatic perception:

> 1. Atoms that are already part of an adjacent aromatic ring are assumed to contribute one electron into the current ring.

> 2. Rings that contain 4-fold coordinated atoms, which are presumed to be \(\text{sp}^3\) hybridized, cannot be aromatic.

## Functional groups

The modifier also identifies functional groups “Amide”, “Nitro”, and “Carboxylate”. This information is output as “Functional Group” properties of Bonds and Particles. Numeric type IDs represent the different functional groups:

Numeric ID | Functional group
--- | ---
0 | No known functional group
1 | Amide
2 | Aromatic
3 | Carboxylate
4 | Nitro

## Fractional bond orders

By default, bond orders are all integer values, which means that the bonds in aromatic rings are assigned alternating bond orders of 1 and 2, for example. Activating the Redistribute bond orders option adjusts the bond orders of known functional groups to fractional values. This redistributes the original integer bond orders such that, for example, all bonds in an aromatic ring will have a uniform bond order of 1.5. OVITO will visualize such “fractional bonds” as dashed cylinders instead of solid ones. The representation can be customized in the settings of the Bonds visual element.

See also

`ovito.modifiers.BondOrderModifier` (Python API)