MayaChemTools

Previous  TOC  NextMolecularDescriptors/WeightAndMassDescriptors.pmCode | PDF | PDFA4

NAME

WeightAndMassDescriptors

SYNOPSIS

use MolecularDescriptors::WeightAndMassDescriptors;

use MolecularDescriptors::WeightAndMassDescriptors qw(:all);

DESCRIPTION

WeightAndMassDescriptors class provides the following methods:

new, GenerateDescriptors, GetDescriptorNames, StringifyWeightAndMassDescriptors

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

Set<PropertyName>(<PropertyValue>);
$PropertyValue = Get<PropertyName>();
Delete<PropertyName>();

WeightAndMassDescriptors calculates molecular weight and exact mass descriptors using methods available in Molecule class.

METHODS

new
$NewWeightAndMassDescriptors = new MolecularDescriptors:: WeightAndMassDescriptors( %NamesAndValues);

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

Molecule = ''
Type = 'WeightAndMass'
WeightPrecision = 2;
MassPrecision = 4;

@DescriptorNames = ('MolecularWeight', 'ExactMass')
@DescriptorValues = ('None', 'None')

Examples:

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

$WeightAndMassDescriptors = new MolecularDescriptors::
                             WeightAndMassDescriptors();

$WeightAndMassDescriptors->SetMolecule($Molecule);
$WeightAndMassDescriptors->GenerateDescriptors();
print "WeightAndMassDescriptors: $WeightAndMassDescriptors\n";
GenerateDescriptors
$WeightAndMassDescriptors->GenerateDescriptors();

Calculates molecular weight and exact mass of a molecule and returns WeightAndMassDescriptors.

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

Returns all available descriptor names as an array.

SetMassPrecision
$WeightAndMassDescriptors->SetMassPrecision($Precision);

Sets precision for calculated exact mass value and returns WeightAndMassDescriptors.

SetWeightPrecision
$WeightAndMassDescriptors->SetWeightPrecision($Precision);

Sets precision for calculated molecular weight value and returns WeightAndMassDescriptors.

StringifyWeightAndMassDescriptors
$String = $WeightAndMassDescriptors->StringifyWeightAndMassDescriptors();

Returns a string containing information about WeightAndMassDescriptors object.

AUTHOR

Manish Sud

SEE ALSO

MolecularDescriptors.pm, MolecularDescriptorsGenerator.pm

COPYRIGHT

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  NextDecember 11, 2024MolecularDescriptors/WeightAndMassDescriptors.pm