---
name: "Chemistry::OpenSMILES::Aromaticity"
section: "3pm"
platform: "linux"
package: "libchemistry-opensmiles-perl"
version: "0.11.6-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Chemistry::OpenSMILES::Aromaticity"
---

# Chemistry::OpenSMILES::Aromaticity(3pm)

Aromaticity handling routines

## NAME

Chemistry::OpenSMILES::Aromaticity - Aromaticity handling routines

## DESCRIPTION

Chemistry::OpenSMILES::Aromaticity encodes some aromaticity handling subroutines for aromatisation and kekulisation. Both implementations are experimental, handle only some specific cases and are neither stable nor bug-free, thus should be used with caution.

## METHODS

- aromatise( $moiety )

  Mark electron cycles as aromatic.

- kekulise( $moiety, $order\_sub )

  Find nonfused even-length aromatic cycles consisting only of B, C, N, P, S and mark them with alternating single and double bonds. Subroutine as well accepts an optional subroutine reference `$order_sub`, providing external order for atoms. This is needed to stabilise the algorithm, as otherwise the outcomes of bond assignment may turn out different. `$order_sub` is called with an atom as `$_[0]` and is expected to return a value providing a distinct order indication for every atom. These can be any scalar values, comparable using Perl's `"cmp"` operator. If `$order_sub` is not given, initial atom order in input is consulted.

- electron\_cycles( $moiety )

  Find electron cycles according to "Finding Electron Cycles" algorithm from \<https://depth-first.com/articles/2021/06/30/writing-aromatic-smiles/\>. Use with caution: the implementation is experimental.
