Previous  TOC  NextMolecularDescriptors/RingsCountDescriptors.pmCode | PDF | PDFA4




use MolecularDescriptors::RingsCountDescriptors;

use MolecularDescriptors::RingsCountDescriptors qw(:all);


RingsCountDescriptors class provides the following methods:

new, GenerateDescriptors, GetDescriptorNames, StringifyRingsCountDescriptors

RingsCountDescriptors is derived from MolecularDescriptors class which in turn is derived from ObjectProperty base class that provides methods not explicitly defined in RingsCountDescriptors, MolecularDescriptors or ObjectProperty classes using Perl's AUTOLOAD functionality. These methods are generated on-the-fly for a specified object property:

$PropertyValue = Get<PropertyName>();

RingsCountDescriptors class doesn't perform any ring or aromaticity detection before counting their number in a molecule. Instead, it assumes ring and aromaticity detection have been performed by caller using DetectRings [Ref 31] and DetectAromaticity methods available in Molecule.

DetectAromaticity method available in Molecule class assigns aromaticity to rings using Huckel rule as explained below:

o Ring aromaticity is determined using Huckel's rule: a ring containing 4n + 2 pi electrons is considered aromatic.

o Hetrocyclic rings containing N, O and S atoms fall into two classes: Basic aromatic and Non-basic aromatic. In Basic aromatic hetrocyclic rings, heteroatom itself is involved in a double bond. (e.g. Pyridine) However, in non-basic hetrocyclic rings, heteroatom might have an attached hydrogen atom and the remaining lone pair contribute to electron delocalization and contributes to 4n + 2 electrons. (e.g. Pyrrole, Furan)

o For molecules containing fused rings, each fused ring set is considered as one aromatic system for counting pi electrons to satisfy Huckel's rule; In case of a failure, rings in fused set are treated individually for aromaticity detection. Additionally, non-fused rings are handled on their own during aromaticity detection.


$NewRingsCountDescriptors = new MolecularDescriptors::

Using specified RingsCountDescriptors property names and values hash, new method creates a new object and returns a reference to newly created RingsCountDescriptors object. By default, the following properties are initialized:

Molecule = ''
Type = 'RingsCount'

@DescriptorNames = ('Rings', 'AromaticRings')
@DescriptorValues = ('None', 'None')


$RingsCountDescriptors = new MolecularDescriptors::RingsCountDescriptors( 'Molecule' => $Molecule);

$RingsCountDescriptors = new MolecularDescriptors::RingsCountDescriptors();

print "RingsCountDescriptors: $RingsCountDescriptors\n";

Calculate number of rings and aromatic rings in a molecule and returns RingsCountDescriptors.

@DescriptorNames = $RingsCountDescriptors->GetDescriptorNames();
@DescriptorNames = MolecularDescriptors::RingsCountDescriptors:: GetDescriptorNames();

Returns all available descriptor names as an array.

$String = $RingsCountDescriptors-> StringifyRingsCountDescriptors();

Returns a string containing information about RingsCountDescriptors object.


Manish Sud



Copyright (C) 2024 Manish Sud. All rights reserved.

This file is part of MayaChemTools.

MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.



Previous  TOC  NextMarch 27, 2024MolecularDescriptors/