MolecularDescriptorsGenerator
use MolecularDescriptors::MolecularDescriptorsGenerator;
use MolecularDescriptors::MolecularDescriptorsGenerator qw(:all);
MolecularDescriptorsGenerator class provides the following methods:
new, GenerateDescriptors, GetAvailableClassAndDescriptorNames, GetAvailableClassNameForDescriptorName, GetAvailableDescriptorClassNames, GetAvailableDescriptorNames, GetAvailableDescriptorNamesForDescriptorClass, GetDescriptorClassParameters, GetDescriptorNames, GetDescriptorNamesAndValues, GetDescriptorValueByName, GetDescriptorValues, GetRuleOf3DescriptorNames, GetRuleOf5DescriptorNames, IsDescriptorClassNameAvailable, IsDescriptorNameAvailable, IsDescriptorsGenerationSuccessful, SetDescriptorClassParameters, SetDescriptorNames, SetMode, SetMolecule, StringifyMolecularDescriptorsGenerator
MolecularDescriptorsGenerator is derived from is derived from ObjectProperty base class that provides methods not explicitly defined in MolecularDescriptorsGenerator or ObjectProperty classes using Perl's AUTOLOAD functionality. These methods are generated on-the-fly for a specified object property:
MolecularDescriptorsGenerator is designed to provide a plug-in environment for molecular descriptors development. The molecular descriptor class modules available in MolecularDescriptors directory under MayaChemTools/lib directory are automatically detected and loaded into the system. The descriptor names provided by each descriptor class module through its GetDescriptorNames function are retrieved and are made available for calculations of their values for a specified molecule.
Any combination of available descriptor names can be specified during calculation of descriptor values using GenerateDescriptors method. The current release of MayaChemTools supports generation of four sets of descriptors: All available descriptors, rule of 5 or 3 descriptors, or a specified set of descriptor names.
RuleOf5 [ Ref 91 ] descriptor names are: MolecularWeight, HydrogenBondDonors, HydrogenBondAcceptors, SLogP. RuleOf5 states: MolecularWeight <= 500, HydrogenBondDonors <= 5, HydrogenBondAcceptors <= 10, and logP <= 5.
RuleOf3 [ Ref 92 ] descriptor names are: MolecularWeight, RotatableBonds, HydrogenBondDonors, HydrogenBondAcceptors, SLogP, TPSA. RuleOf3 states: MolecularWeight <= 300, RotatableBonds <= 3, HydrogenBondDonors <= 3, HydrogenBondAcceptors <= 3, logP <= 3, and TPSA <= 60.
Before calculation of a specified set of descriptors by GenerateDescriptors method, a set of descriptor calculation control parameters for a specific descriptor class name can be set using SetDescriptorClassParameters method. The specified control parameter names and values are simply passed on to specified descriptor class during instantiation of descriptor class object without performing any validation of parameter names and associated values. It's up to the appropriate descriptor class methods to validate these parameters and values. In addition to specified parameter names and values, the parameter hash must also contain descriptor class name as key and value pair with DescriptorClassName as key with class name as value.
Using specified MolecularDescriptorsGenerator property names and values hash, new method creates a new object and returns a reference to newly created MolecularDescriptorsGenerator object. By default, the following properties are initialized:
Examples:
Calculates descriptor values for specified descriptors and returns MolecularDescriptorsGenerator.
Descriptor class objects are instantiated only once at first invocation. During subsequent calls to GenerateDescriptors method, descriptor values are initialized and GenerateDescriptors method provided by descriptor class is used to calculate descriptor values for specified descriptors.
Returns available descriptors class and descriptors names as a hash containing key and value pairs corresponding to class name and an array of descriptor names available for the class.
Returns available descriptor class name for a descriptor name.
Returns available descriptor class names as an array or number of available descriptor class names in scalar context.
Returns available descriptor names as an array or number of available descriptor names in scalar context.
Returns available descriptors names for a descriptor class as an array or number of available descriptor names in scalar context.
Returns descriptor name parameters as a reference to hash of hashes with hash keys corresponding to class name and class parameter name with hash value as class parameter value.
Returns all available descriptor names as an array or number of available descriptors in scalar context.
Returns calculated molecular descriptor names and values as a hash with descriptor names and values as hash key and value pairs.
Returns calculated descriptor values for a specified descriptor name.
Returns all calculated descriptor values as an array corresponding to specified descriptor names.
Returns rule of 3 descriptor names as an array or number of rule of 3 descriptors in scalar context.
RuleOf3 [ Ref 92 ] descriptor names are: MolecularWeight, RotatableBonds, HydrogenBondDonors, HydrogenBondAcceptors, SLogP, TPSA. RuleOf3 states: MolecularWeight <= 300, RotatableBonds <= 3, HydrogenBondDonors <= 3, HydrogenBondAcceptors <= 3, logP <= 3, and TPSA <= 60.
Returns rule of 5 descriptor names as an array or number of rule of 4 descriptors in scalar context.
RuleOf5 [ Ref 91 ] descriptor names are: MolecularWeight, HydrogenBondDonors, HydrogenBondAcceptors, SLogP. RuleOf5 states: MolecularWeight <= 500, HydrogenBondDonors <= 5, HydrogenBondAcceptors <= 10, and logP <= 5.
Returns 1 or 0 based on whether specified descriptor class name is available.
Returns 1 or 0 based on whether specified descriptor name is available.
Returns 1 or 0 based on whether descriptors generation is successful.
Sets descriptor calculation control parameters for a specified descriptor class name and returns MolecularDescriptorsGenerator.
The specified parameter names and values are simply passed on to specified descriptor class during instantiation of descriptor class object without any performing any validation of parameter names and associated values. It's up to the appropriate descriptor class methods to validate these parameters and values.
In addition to specified parameter names and values, the parameter hash must also contain descriptor class name as key and value pair with DescriptorClassName as key with class name as value.
Sets descriptor names to use for generating descriptor values using an array or reference to an array and returns MolecularDescriptorsGenerator.
Sets descriptors generation mode and returns MolecularDescriptorsGenerator. Possible Mode values: All, RuleOf5, RuleOf3, Specify.
Sets molecule to use during calculation of molecular descriptors and returns MolecularDescriptorsGenerator.
Returns a string containing information about MolecularDescriptorsGenerator object.
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.