0
|
1 NAME
|
|
2 MolecularDescriptorsGenerator
|
|
3
|
|
4 SYNOPSIS
|
|
5 use MolecularDescriptors::MolecularDescriptorsGenerator;
|
|
6
|
|
7 use MolecularDescriptors::MolecularDescriptorsGenerator qw(:all);
|
|
8
|
|
9 DESCRIPTION
|
|
10 MolecularDescriptorsGenerator class provides the following methods:
|
|
11
|
|
12 new, GenerateDescriptors, GetAvailableClassAndDescriptorNames,
|
|
13 GetAvailableClassNameForDescriptorName,
|
|
14 GetAvailableDescriptorClassNames, GetAvailableDescriptorNames,
|
|
15 GetAvailableDescriptorNamesForDescriptorClass,
|
|
16 GetDescriptorClassParameters, GetDescriptorNames,
|
|
17 GetDescriptorNamesAndValues, GetDescriptorValueByName,
|
|
18 GetDescriptorValues, GetRuleOf3DescriptorNames,
|
|
19 GetRuleOf5DescriptorNames, IsDescriptorClassNameAvailable,
|
|
20 IsDescriptorNameAvailable, IsDescriptorsGenerationSuccessful,
|
|
21 SetDescriptorClassParameters, SetDescriptorNames, SetMode, SetMolecule,
|
|
22 StringifyMolecularDescriptorsGenerator
|
|
23
|
|
24 MolecularDescriptorsGenerator is derived from is derived from
|
|
25 ObjectProperty base class that provides methods not explicitly defined
|
|
26 in MolecularDescriptorsGenerator or ObjectProperty classes using Perl's
|
|
27 AUTOLOAD functionality. These methods are generated on-the-fly for a
|
|
28 specified object property:
|
|
29
|
|
30 Set<PropertyName>(<PropertyValue>);
|
|
31 $PropertyValue = Get<PropertyName>();
|
|
32 Delete<PropertyName>();
|
|
33
|
|
34 MolecularDescriptorsGenerator is designed to provide a plug-in
|
|
35 environment for molecular descriptors development. The molecular
|
|
36 descriptor class modules available in MolecularDescriptors directory
|
|
37 under MayaChemTools/lib directory are automatically detected and loaded
|
|
38 into the system. The descriptor names provided by each descriptor class
|
|
39 module through its GetDescriptorNames function are retrieved and are
|
|
40 made available for calculations of their values for a specified
|
|
41 molecule.
|
|
42
|
|
43 Any combination of available descriptor names can be specified during
|
|
44 calculation of descriptor values using GenerateDescriptors method. The
|
|
45 current release of MayaChemTools supports generation of four sets of
|
|
46 descriptors: All available descriptors, rule of 5 or 3 descriptors, or a
|
|
47 specified set of descriptor names.
|
|
48
|
|
49 RuleOf5 [ Ref 91 ] descriptor names are: MolecularWeight,
|
|
50 HydrogenBondDonors, HydrogenBondAcceptors, SLogP. RuleOf5 states:
|
|
51 MolecularWeight <= 500, HydrogenBondDonors <= 5, HydrogenBondAcceptors
|
|
52 <= 10, and logP <= 5.
|
|
53
|
|
54 RuleOf3 [ Ref 92 ] descriptor names are: MolecularWeight,
|
|
55 RotatableBonds, HydrogenBondDonors, HydrogenBondAcceptors, SLogP, TPSA.
|
|
56 RuleOf3 states: MolecularWeight <= 300, RotatableBonds <= 3,
|
|
57 HydrogenBondDonors <= 3, HydrogenBondAcceptors <= 3, logP <= 3, and TPSA
|
|
58 <= 60.
|
|
59
|
|
60 Before calculation of a specified set of descriptors by
|
|
61 GenerateDescriptors method, a set of descriptor calculation control
|
|
62 parameters for a specific descriptor class name can be set using
|
|
63 SetDescriptorClassParameters method. The specified control parameter
|
|
64 names and values are simply passed on to specified descriptor class
|
|
65 during instantiation of descriptor class object without performing any
|
|
66 validation of parameter names and associated values. It's up to the
|
|
67 appropriate descriptor class methods to validate these parameters and
|
|
68 values. In addition to specified parameter names and values, the
|
|
69 parameter hash must also contain descriptor class name as key and value
|
|
70 pair with DescriptorClassName as key with class name as value.
|
|
71
|
|
72 METHODS
|
|
73 new
|
|
74 $NewMolecularDescriptorsGenerator = new MolecularDescriptors::
|
|
75 MolecularDescriptorsGenerator(
|
|
76 %NamesAndValues);
|
|
77
|
|
78 Using specified *MolecularDescriptorsGenerator* property names and
|
|
79 values hash, new method creates a new object and returns a reference
|
|
80 to newly created MolecularDescriptorsGenerator object. By default,
|
|
81 the following properties are initialized:
|
|
82
|
|
83 Mode = 'All'
|
|
84 @{$This->{DescriptorNames}} = ()
|
|
85 %{$This->{DescriptorClassParameters}} = ()
|
|
86 @{$This->{DescriptorClassNames}} = ()
|
|
87 %{$This->{DescriptorClassObjects}} = ()
|
|
88 @{$This->{DescriptorValues}} = ()
|
|
89
|
|
90 Examples:
|
|
91
|
|
92 $MolecularDescriptorsGenerator = new MolecularDescriptors::
|
|
93 MolecularDescriptorsGenerator(
|
|
94 'Molecule' => $Molecule);
|
|
95
|
|
96 @DescriptorNames = qw(MolecularWeight HydrogenBondDonors Fsp3Carbons)
|
|
97 $MolecularDescriptorsGenerator = new MolecularDescriptors::
|
|
98 MolecularDescriptorsGenerator(
|
|
99 'Mode' => 'Specify',
|
|
100 'DescriptorNames' => \@DescriptorNames);
|
|
101
|
|
102 $MolecularDescriptorsGenerator->SetDescriptorClassParameters(
|
|
103 'DescriptorClassName' => 'WeightAndMassDescriptors',
|
|
104 'WeightPrecision' => 2,
|
|
105 'MassPrecision' => 2);
|
|
106
|
|
107 $MolecularDescriptorsGenerator->SetDescriptorClassParameters(
|
|
108 'DescriptorClassName' => 'HydrogenBondsDescriptors',
|
|
109 'HydrogenBondsType' => 'HBondsType1');
|
|
110
|
|
111 $MolecularDescriptorsGenerator->SetMolecule($Molecule);
|
|
112 $MolecularDescriptorsGenerator->GenerateDescriptors();
|
|
113 print "MolecularDescriptorsGenerator: $MolecularDescriptorsGenerator\n";
|
|
114
|
|
115 GenerateDescriptors
|
|
116 $MolecularDescriptorsGenerator->GenerateDescriptors();
|
|
117
|
|
118 Calculates descriptor values for specified descriptors and returns
|
|
119 *MolecularDescriptorsGenerator*.
|
|
120
|
|
121 Descriptor class objects are instantiated only once at first
|
|
122 invocation. During subsequent calls to GenerateDescriptors method,
|
|
123 descriptor values are initialized and GenerateDescriptors method
|
|
124 provided by descriptor class is used to calculate descriptor values
|
|
125 for specified descriptors.
|
|
126
|
|
127 GetAvailableClassAndDescriptorNames
|
|
128 %ClassAndDescriptorNames = $MolecularDescriptorsGenerator->
|
|
129 GetAvailableClassAndDescriptorNames();
|
|
130 %ClassAndDescriptorNames = MolecularDescriptors::
|
|
131 MolecularDescriptorsGenerator::
|
|
132 GetAvailableClassAndDescriptorNames();
|
|
133
|
|
134 Returns available descriptors class and descriptors names as a hash
|
|
135 containing key and value pairs corresponding to class name and an
|
|
136 array of descriptor names available for the class.
|
|
137
|
|
138 GetAvailableClassNameForDescriptorName
|
|
139 $DescriptorClassName = $MolecularDescriptorsGenerator->
|
|
140 GetAvailableClassNameForDescriptorName($DescriptorName);
|
|
141
|
|
142 $DescriptorClassName = MolecularDescriptors::MolecularDescriptorsGenerator::
|
|
143 GetAvailableClassNameForDescriptorName($DescriptorName);
|
|
144
|
|
145 Returns available descriptor class name for a descriptor name.
|
|
146
|
|
147 GetAvailableDescriptorClassNames
|
|
148 $Return = $MolecularDescriptorsGenerator->GetAvailableDescriptorClassNames();
|
|
149
|
|
150 @DescriptorClassNames = $MolecularDescriptorsGenerator->
|
|
151 GetAvailableDescriptorClassNames();
|
|
152 @DescriptorClassNames = MolecularDescriptors::
|
|
153 MolecularDescriptorsGenerator::
|
|
154 GetAvailableDescriptorClassNames();
|
|
155
|
|
156 Returns available descriptor class names as an array or number of
|
|
157 available descriptor class names in scalar context.
|
|
158
|
|
159 GetAvailableDescriptorNames
|
|
160 @DescriptorNames = $MolecularDescriptorsGenerator->
|
|
161 GetAvailableDescriptorNames();
|
|
162 @DescriptorNames = MolecularDescriptors::
|
|
163 MolecularDescriptorsGenerator::
|
|
164 GetAvailableDescriptorNames();
|
|
165
|
|
166 Returns available descriptor names as an array or number of
|
|
167 available descriptor names in scalar context.
|
|
168
|
|
169 GetAvailableDescriptorNamesForDescriptorClass
|
|
170 @DescriptorNames = $MolecularDescriptorsGenerator->
|
|
171 GetAvailableDescriptorNamesForDescriptorClass($DescriptorClassName);
|
|
172 @DescriptorNames = MolecularDescriptors::
|
|
173 MolecularDescriptorsGenerator::
|
|
174 GetAvailableDescriptorNamesForDescriptorClass($DescriptorClassName);
|
|
175
|
|
176 Returns available descriptors names for a descriptor class as an
|
|
177 array or number of available descriptor names in scalar context.
|
|
178
|
|
179 GetDescriptorClassParameters
|
|
180 $DescriptorClassParametersRef = $MolecularDescriptorsGenerator->
|
|
181 GetDescriptorClassParameters();
|
|
182 $DescriptorClassParametersRef = MolecularDescriptors::
|
|
183 MolecularDescriptorsGenerator::
|
|
184 GetDescriptorClassParameters();
|
|
185
|
|
186 Returns descriptor name parameters as a reference to hash of hashes
|
|
187 with hash keys corresponding to class name and class parameter name
|
|
188 with hash value as class parameter value.
|
|
189
|
|
190 GetDescriptorNames
|
|
191 @DescriptorNames = $MolecularDescriptorsGenerator->GetDescriptorNames();
|
|
192 @DescriptorNames = MolecularDescriptors::MolecularDescriptorsGenerator::
|
|
193 GetDescriptorNames();
|
|
194
|
|
195 Returns all available descriptor names as an array or number of
|
|
196 available descriptors in scalar context.
|
|
197
|
|
198 GetDescriptorNamesAndValues
|
|
199 %NamesAndValues = $MolecularDescriptorsGenerator->
|
|
200 GetDescriptorNamesAndValues();
|
|
201
|
|
202 Returns calculated molecular descriptor names and values as a hash
|
|
203 with descriptor names and values as hash key and value pairs.
|
|
204
|
|
205 GetDescriptorValueByName
|
|
206 $Value = $MolecularDescriptorsGenerator->
|
|
207 GetDescriptorValueByName($Name);
|
|
208
|
|
209 Returns calculated descriptor values for a specified descriptor
|
|
210 name.
|
|
211
|
|
212 GetDescriptorValues
|
|
213 @DescriptorValues = $MolecularDescriptorsGenerator->GetDescriptorValues();
|
|
214
|
|
215 Returns all calculated descriptor values as an array corresponding
|
|
216 to specified descriptor names.
|
|
217
|
|
218 GetRuleOf3DescriptorNames
|
|
219 @DescriptorNames = $MolecularDescriptorsGenerator->
|
|
220 GetRuleOf3DescriptorNames();
|
|
221 @DescriptorNames = MolecularDescriptors::
|
|
222 MolecularDescriptorsGenerator::
|
|
223 GetRuleOf3DescriptorNames();
|
|
224
|
|
225 Returns rule of 3 descriptor names as an array or number of rule of
|
|
226 3 descriptors in scalar context.
|
|
227
|
|
228 RuleOf3 [ Ref 92 ] descriptor names are: MolecularWeight,
|
|
229 RotatableBonds, HydrogenBondDonors, HydrogenBondAcceptors, SLogP,
|
|
230 TPSA. RuleOf3 states: MolecularWeight <= 300, RotatableBonds <= 3,
|
|
231 HydrogenBondDonors <= 3, HydrogenBondAcceptors <= 3, logP <= 3, and
|
|
232 TPSA <= 60.
|
|
233
|
|
234 GetRuleOf5DescriptorNames
|
|
235 @DescriptorNames = $MolecularDescriptorsGenerator->
|
|
236 GetRuleOf5DescriptorNames();
|
|
237 @DescriptorNames = $MolecularDescriptorsGenerator::
|
|
238 GetRuleOf5DescriptorNames();
|
|
239
|
|
240 Returns rule of 5 descriptor names as an array or number of rule of
|
|
241 4 descriptors in scalar context.
|
|
242
|
|
243 RuleOf5 [ Ref 91 ] descriptor names are: MolecularWeight,
|
|
244 HydrogenBondDonors, HydrogenBondAcceptors, SLogP. RuleOf5 states:
|
|
245 MolecularWeight <= 500, HydrogenBondDonors <= 5,
|
|
246 HydrogenBondAcceptors <= 10, and logP <= 5.
|
|
247
|
|
248 IsDescriptorClassNameAvailable
|
|
249 $Status = $MolecularDescriptorsGenerator->
|
|
250 IsDescriptorClassNameAvailable($ClassName);
|
|
251 $Status = MolecularDescriptors::
|
|
252 MolecularDescriptorsGenerator::
|
|
253 IsDescriptorClassNameAvailable($ClassName);
|
|
254
|
|
255 Returns 1 or 0 based on whether specified descriptor class name is
|
|
256 available.
|
|
257
|
|
258 IsDescriptorNameAvailable
|
|
259 $Status = $MolecularDescriptorsGenerator->
|
|
260 IsDescriptorNameAvailable($DescriptorName);
|
|
261 $Status = MolecularDescriptors::
|
|
262 MolecularDescriptorsGenerator::
|
|
263 IsDescriptorNameAvailable($DescriptorName);
|
|
264
|
|
265 Returns 1 or 0 based on whether specified descriptor name is
|
|
266 available.
|
|
267
|
|
268 IsDescriptorsGenerationSuccessful
|
|
269 $Status = $MolecularDescriptorsGenerator->
|
|
270 IsDescriptorsGenerationSuccessful();
|
|
271
|
|
272 Returns 1 or 0 based on whether descriptors generation is
|
|
273 successful.
|
|
274
|
|
275 SetDescriptorClassParameters
|
|
276 $MolecularDescriptorsGenerator->SetDescriptorClassParameters(
|
|
277 %NamesAndValues);
|
|
278
|
|
279 Sets descriptor calculation control parameters for a specified
|
|
280 descriptor class name and returns *MolecularDescriptorsGenerator*.
|
|
281
|
|
282 The specified parameter names and values are simply passed on to
|
|
283 specified descriptor class during instantiation of descriptor class
|
|
284 object without any performing any validation of parameter names and
|
|
285 associated values. It's up to the appropriate descriptor class
|
|
286 methods to validate these parameters and values.
|
|
287
|
|
288 In addition to specified parameter names and values, the parameter
|
|
289 hash must also contain descriptor class name as key and value pair
|
|
290 with DescriptorClassName as key with class name as value.
|
|
291
|
|
292 SetDescriptorNames
|
|
293 $MolecularDescriptorsGenerator->SetDescriptorNames(@Names);
|
|
294 $MolecularDescriptorsGenerator->SetDescriptorNames(\@Names);
|
|
295
|
|
296 Sets descriptor names to use for generating descriptor values using
|
|
297 an array or reference to an array and returns
|
|
298 *MolecularDescriptorsGenerator*.
|
|
299
|
|
300 SetMode
|
|
301 $MolecularDescriptorsGenerator->SetMode($Mode);
|
|
302
|
|
303 Sets descriptors generation mode and returns
|
|
304 *MolecularDescriptorsGenerator*. Possible *Mode* values: *All,
|
|
305 RuleOf5, RuleOf3, Specify*.
|
|
306
|
|
307 SetMolecule
|
|
308 $MolecularDescriptorsGenerator->SetMolecule($Molecule);
|
|
309
|
|
310 Sets molecule to use during calculation of molecular descriptors and
|
|
311 returns *MolecularDescriptorsGenerator*.
|
|
312
|
|
313 StringifyMolecularDescriptorsGenerator
|
|
314 $String = $MolecularDescriptorsGenerator->StringifyMolecularDescriptorsGenerator();
|
|
315
|
|
316 Returns a string containing information about
|
|
317 *MolecularDescriptorsGenerator* object.
|
|
318
|
|
319 AUTHOR
|
|
320 Manish Sud <msud@san.rr.com>
|
|
321
|
|
322 SEE ALSO
|
|
323 MolecularDescriptors.pm
|
|
324
|
|
325 COPYRIGHT
|
|
326 Copyright (C) 2015 Manish Sud. All rights reserved.
|
|
327
|
|
328 This file is part of MayaChemTools.
|
|
329
|
|
330 MayaChemTools is free software; you can redistribute it and/or modify it
|
|
331 under the terms of the GNU Lesser General Public License as published by
|
|
332 the Free Software Foundation; either version 3 of the License, or (at
|
|
333 your option) any later version.
|
|
334
|