Mercurial > repos > deepakjadmin > mayatool3_test2
comparison docs/modules/txt/Bond.txt @ 0:4816e4a8ae95 draft default tip
Uploaded
| author | deepakjadmin |
|---|---|
| date | Wed, 20 Jan 2016 09:23:18 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4816e4a8ae95 |
|---|---|
| 1 NAME | |
| 2 Bond | |
| 3 | |
| 4 SYNOPSIS | |
| 5 use Bond; | |
| 6 | |
| 7 use Bond qw(:all); | |
| 8 | |
| 9 DESCRIPTION | |
| 10 Bond class provides the following methods: | |
| 11 | |
| 12 new, Copy, DeleteBond, GetAtoms, GetBondBeginAtom, GetBondEndAtom, | |
| 13 GetBondFromAtom, GetBondToAtom, GetBondedAtom, GetCommonAtom, | |
| 14 GetLargestRing, GetNumOfRings, GetNumOfRingsWithEvenSize, | |
| 15 GetNumOfRingsWithOddSize, GetNumOfRingsWithSize, | |
| 16 GetNumOfRingsWithSizeGreaterThan, GetNumOfRingsWithSizeLessThan, | |
| 17 GetRings, GetRingsWithEvenSize, GetRingsWithOddSize, GetRingsWithSize, | |
| 18 GetRingsWithSizeGreaterThan, GetRingsWithSizeLessThan, | |
| 19 GetSizeOfLargestRing, GetSizeOfSmallestRing, GetSmallestRing, | |
| 20 IsAromatic, IsBondStereochemistrySpecified, IsBondTypeSpecified, IsCis, | |
| 21 IsCisOrTrans, IsCoordinate, IsDative, IsDouble, IsDown, IsDownward, | |
| 22 IsHash, IsInRing, IsInRingOfSize, IsIonic, IsNotInRing, IsOnlyInOneRing, | |
| 23 IsQuadruple, IsQuintuple, IsSextuple, IsSingle, IsTautomeric, IsTrans, | |
| 24 IsTriple, IsUp, IsUpOrDown, IsUpward, IsWedge, IsWedgeOrHash, SetAtoms, | |
| 25 SetBondOrder, SetBondStereochemistry, SetBondType, StringifyBond, | |
| 26 SwitchBondFromAndToAtoms | |
| 27 | |
| 28 Bond class is derived from ObjectProperty base class which provides | |
| 29 methods not explicitly defined in Atom or ObjectProperty class using | |
| 30 Perl's AUTOLOAD functionality. These methods are generated on-the-fly | |
| 31 for a specified object property: | |
| 32 | |
| 33 Set<PropertyName>(<PropertyValue>); | |
| 34 $PropertyValue = Get<PropertyName>(); | |
| 35 Delete<PropertyName>(); | |
| 36 | |
| 37 METHODS | |
| 38 new | |
| 39 $NewBond = new Bond([%PropertyNameAndValues]); | |
| 40 | |
| 41 Using specified *Bond* property names and values hash, new method | |
| 42 creates a new object and returns a reference to newly created Bond | |
| 43 object. By default, following properties are initialized: | |
| 44 | |
| 45 ID = SequentialObjectID | |
| 46 @Atoms = (); | |
| 47 BondType = "" | |
| 48 BondOrder = "" | |
| 49 | |
| 50 Except for *ID* property, all other default properties and other | |
| 51 additional properties can be set during invocation of this method. | |
| 52 | |
| 53 Examples: | |
| 54 | |
| 55 $Bond = new Bond(); | |
| 56 $DoubleBond = new Bond('Atoms' => [$Atom2, $Atom1], | |
| 57 'BondOrder' => 2); | |
| 58 | |
| 59 Copy | |
| 60 $BondCopy = $Bond->Copy(); | |
| 61 | |
| 62 Copy *Bond* and its associated data using Storable::dclone and | |
| 63 return a new Bond object. | |
| 64 | |
| 65 DeleteBond | |
| 66 $Bond->DeleteBond(); | |
| 67 | |
| 68 Delete *Bond* between atoms in from a molecule. | |
| 69 | |
| 70 GetAtoms | |
| 71 @BondedAtoms = $Bond->GetAtoms(); | |
| 72 | |
| 73 Returns an array containing *Atoms* invoved in *Bond*. | |
| 74 | |
| 75 GetBondedAtom | |
| 76 $BondedAtom = $Bond->GetBondedAtom($Atom); | |
| 77 | |
| 78 Returns BondedAtom bonded to *Atom* in *Bond*. | |
| 79 | |
| 80 GetBondBeginAtom | |
| 81 $BeginAtom = $Bond->GetBondBeginAtom(); | |
| 82 | |
| 83 Returns BeginAtom corresponding to bond starting atom in *Bond*. | |
| 84 | |
| 85 GetBondEndAtom | |
| 86 $EndAtom = $Bond->GetBondEndAtom(); | |
| 87 | |
| 88 Returns EndAtom corresponding to bond ending atom in *Bond*. | |
| 89 | |
| 90 GetBondFromAtom | |
| 91 $FromAtom = $Bond->GetBondFromAtom(); | |
| 92 | |
| 93 Returns FromAtom corresponding to bond starting atom in *Bond*. | |
| 94 | |
| 95 GetBondToAtom | |
| 96 $ToAotm = $Bond->GetBondToAtom(); | |
| 97 | |
| 98 Returns ToAtom corresponding to bond ending atom in *Bond*. | |
| 99 | |
| 100 GetCommonAtom | |
| 101 $CommonAtom = $Bond->GetCommonAtom($OtherBond); | |
| 102 | |
| 103 Returns Atom common to both *Bond* and *$OtherBond*. | |
| 104 | |
| 105 GetLargestRing | |
| 106 @RingAtoms = $Bond->GetLargestRing(); | |
| 107 | |
| 108 Returns an array of ring *Atoms* corresponding to the largest ring | |
| 109 containing *Bond*. in a molecule | |
| 110 | |
| 111 GetNumOfRings | |
| 112 $NumOfRings = $Bond->GetNumOfRings(); | |
| 113 | |
| 114 Returns number of rings containing *Bond* in a molecule. | |
| 115 | |
| 116 GetNumOfRingsWithEvenSize | |
| 117 $NumOfRings = $Bond->GetNumOfRingsWithEvenSize(); | |
| 118 | |
| 119 Returns number of rings with even size containing *Bond* in a | |
| 120 molecule. | |
| 121 | |
| 122 GetNumOfRingsWithOddSize | |
| 123 $NumOfRings = $Bond->GetNumOfRingsWithOddSize(); | |
| 124 | |
| 125 Returns number of rings with odd size containing *Bond* in a | |
| 126 molecule. | |
| 127 | |
| 128 GetNumOfRingsWithSize | |
| 129 $NumOfRings = $Bond->GetNumOfRingsWithSize($RingSize); | |
| 130 | |
| 131 Returns number of rings with specific *RingSize* containing *Bond* | |
| 132 in a molecule. | |
| 133 | |
| 134 GetNumOfRingsWithSizeGreaterThan | |
| 135 $NumOfRings = $Bond->GetNumOfRingsWithSizeGreaterThan($RingSize); | |
| 136 | |
| 137 Returns number of rings with size greater than specific *RingSize* | |
| 138 containing *Bond* in a molecule. | |
| 139 | |
| 140 GetNumOfRingsWithSizeLessThan | |
| 141 $NumOfRings = $Bond->GetNumOfRingsWithSizeLessThan($RingSize); | |
| 142 | |
| 143 Returns number of rings with size less than specific *RingSize* | |
| 144 containing *Bond* in a molecule. | |
| 145 | |
| 146 GetRings | |
| 147 @Rings = $Bond->GetRings(); | |
| 148 | |
| 149 Returns an array of references to arrays containing ring atoms | |
| 150 corressponding to all rings containing *Bond* in a molecule. | |
| 151 | |
| 152 GetRingsWithEvenSize | |
| 153 @Rings = $Bond->GetRingsWithEvenSize(); | |
| 154 | |
| 155 Returns an array of references to arrays containing ring atoms | |
| 156 corressponding to all rings with even size containing *Bond* in a | |
| 157 molecule. | |
| 158 | |
| 159 GetRingsWithOddSize | |
| 160 @Rings = $Bond->GetRingsWithOddSize(); | |
| 161 | |
| 162 Returns an array of references to arrays containing ring atoms | |
| 163 corressponding to all rings with odd size containing *Bond* in a | |
| 164 molecule. | |
| 165 | |
| 166 GetRingsWithSize | |
| 167 @Rings = $Bond->GetRingsWithSize($RingSize); | |
| 168 | |
| 169 Returns an array of references to arrays containing ring atoms | |
| 170 corressponding to all rings with specific *RingSize *containing | |
| 171 *Bond* in a molecule. | |
| 172 | |
| 173 GetRingsWithSizeGreaterThan | |
| 174 @Rings = $Bond->GetRingsWithSizeGreaterThan($RingSize); | |
| 175 | |
| 176 Returns an array of references to arrays containing ring atoms | |
| 177 corressponding to all rings with size greater than specific | |
| 178 *RingSize *containing *Bond* in a molecule. | |
| 179 | |
| 180 GetRingsWithSizeLessThan | |
| 181 @Rings = $Bond->GetRingsWithSizeLessThan($RingSize); | |
| 182 | |
| 183 Returns an array of references to arrays containing ring atoms | |
| 184 corressponding to all rings with size less than specific *RingSize | |
| 185 *containing *Bond* in a molecule. | |
| 186 | |
| 187 GetSizeOfLargestRing | |
| 188 $Size = $Bond->GetSizeOfLargestRing(); | |
| 189 | |
| 190 Returns size of the largest ring containing *Bond* in a molecule. | |
| 191 | |
| 192 GetSizeOfSmallestRing | |
| 193 $Size = $Bond->GetSizeOfSmallestRing(); | |
| 194 | |
| 195 Returns size of the smallest ring containing *Bond* in a molecule. | |
| 196 | |
| 197 GetSmallestRing | |
| 198 @RingAtoms = $Bond->GetSmallestRing(); | |
| 199 | |
| 200 Returns an array of ring *Atoms* corresponding to the largest ring | |
| 201 containing *Bond* in a molecule. | |
| 202 | |
| 203 IsAromatic | |
| 204 $Status = $Bond->IsAromatic(); | |
| 205 | |
| 206 Returns 1 or 0 based on whether it's an aromatic *Bond*. | |
| 207 | |
| 208 IsBondStereochemistrySpecified | |
| 209 $Status = $Bond->IsBondStereochemistrySpecified(); | |
| 210 | |
| 211 Returns 1 or 0 based on whether *Bond*'s sterochemistry is | |
| 212 specified. | |
| 213 | |
| 214 IsBondTypeSpecified | |
| 215 $Status = $Bond->IsBondTypeSpecified(); | |
| 216 | |
| 217 Returns 1 or 0 based on whether *Bond*'s type is specified. | |
| 218 | |
| 219 IsCis | |
| 220 $Status = $Bond->IsCis(); | |
| 221 | |
| 222 Returns 1 or 0 based on whether it's a cis *Bond*. | |
| 223 | |
| 224 IsCisOrTrans | |
| 225 $Status = $Bond->IsCisOrTrans(); | |
| 226 | |
| 227 Returns 1 or 0 based on whether it's a cis or trans *Bond*. | |
| 228 | |
| 229 IsCoordinate | |
| 230 $Status = $Bond->IsCoordinate(); | |
| 231 | |
| 232 Returns 1 or 0 based on whether it's a coordinate or dative *Bond*. | |
| 233 | |
| 234 IsDative | |
| 235 $Status = $Bond->IsDative(); | |
| 236 | |
| 237 Returns 1 or 0 based on whether it's a coordinate or dative *Bond*. | |
| 238 | |
| 239 IsDouble | |
| 240 $Status =$Bond->IsDouble(); | |
| 241 | |
| 242 Returns 1 or 0 based on whether it's a double *Bond*. | |
| 243 | |
| 244 IsDown | |
| 245 $Status = $Bond->IsDown(); | |
| 246 | |
| 247 Returns 1 or 0 based on whether it's a hash or down single *Bond*. | |
| 248 | |
| 249 IsDownward | |
| 250 $Return = $Bond->IsDownward(); | |
| 251 | |
| 252 Returns 1 or 0 based on whether it's a downward *Bond*. | |
| 253 | |
| 254 IsHash | |
| 255 $Status = $Bond->IsHash(); | |
| 256 | |
| 257 Returns 1 or 0 based on whether it's a hash or down single *Bond*. | |
| 258 | |
| 259 IsInRing | |
| 260 $Status = $Bond->IsInRing(); | |
| 261 | |
| 262 Returns 1 or 0 based on whether *Bond* is present in a ring. | |
| 263 | |
| 264 IsInRingOfSize | |
| 265 $Status = $Bond->IsInRingOfSize($Size); | |
| 266 | |
| 267 Returns 1 or 0 based on whether *Bond* is present in a ring of | |
| 268 specific *Size*. | |
| 269 | |
| 270 IsIonic | |
| 271 $Status = $Bond->IsIonic(); | |
| 272 | |
| 273 Returns 1 or 0 based on whether it's an ionic *Bond*. | |
| 274 | |
| 275 IsNotInRing | |
| 276 $Status = $Bond->IsNotInRing(); | |
| 277 | |
| 278 Returns 1 or 0 based on whether *Bond* is not present in a ring. | |
| 279 | |
| 280 IsOnlyInOneRing | |
| 281 $Status = $Bond->IsOnlyInOneRing(); | |
| 282 | |
| 283 Returns 1 or 0 based on whether *Bond* is only present in one ring. | |
| 284 | |
| 285 IsQuadruple | |
| 286 $Status = $Bond->IsQuadruple(); | |
| 287 | |
| 288 Returns 1 or 0 based on whether it's a quadruple *Bond*. | |
| 289 | |
| 290 IsQuintuple | |
| 291 $Status = $Bond->IsQuintuple(); | |
| 292 | |
| 293 Returns 1 or 0 based on whether it's a quintuple *Bond*. | |
| 294 | |
| 295 IsSextuple | |
| 296 $Status = $Bond->IsSextuple(); | |
| 297 | |
| 298 Returns 1 or 0 based on whether it's a sextuple *Bond*. | |
| 299 | |
| 300 IsSingle | |
| 301 $Status =$Bond->IsSingle(); | |
| 302 | |
| 303 Returns 1 or 0 based on whether it's a single *Bond*. | |
| 304 | |
| 305 IsTriple | |
| 306 $Status =$Bond->IsTriple(); | |
| 307 | |
| 308 Returns 1 or 0 based on whether it's a triple *Bond*. | |
| 309 | |
| 310 IsTautomeric | |
| 311 $Status = $Bond->IsTautomeric(); | |
| 312 | |
| 313 Returns 1 or 0 based on whether it's a *Bond*. | |
| 314 | |
| 315 IsTrans | |
| 316 $Status = $Bond->IsTrans(); | |
| 317 | |
| 318 Returns 1 or 0 based on whether it's a trans *Bond*. | |
| 319 | |
| 320 IsUp | |
| 321 $Status = $Bond->IsUp(); | |
| 322 | |
| 323 Returns 1 or 0 based on whether it's a up *Bond*. | |
| 324 | |
| 325 IsUpOrDown | |
| 326 $Status = $Bond->IsUpOrDown(); | |
| 327 | |
| 328 Returns 1 or 0 based on whether it's an up or down *Bond*. | |
| 329 | |
| 330 IsUpward | |
| 331 $Status = $Bond->IsUpward(); | |
| 332 | |
| 333 Returns 1 or 0 based on whether it's an upward *Bond*. | |
| 334 | |
| 335 IsWedge | |
| 336 $Status = $Bond->IsWedge(); | |
| 337 | |
| 338 Returns 1 or 0 based on whether it's a wedge *Bond*. | |
| 339 | |
| 340 IsWedgeOrHash | |
| 341 $Status = $Bond->IsWedgeOrHash(); | |
| 342 | |
| 343 Returns 1 or 0 based on whether it's a wedge or hash *Bond*. | |
| 344 | |
| 345 SetAtoms | |
| 346 $Bond->SetAtoms($AtomsRef); | |
| 347 $Bond->SetAtoms(@Atoms); | |
| 348 | |
| 349 Set atoms of *Bond* to atoms in *Atoms* array or in a reference to | |
| 350 an array of atoms and return *Bond*. | |
| 351 | |
| 352 SetBondOrder | |
| 353 $Bond->SetBondOrder($BondOrder); | |
| 354 | |
| 355 Sets bond order of *Bond* to specified *BondOrder* and returns | |
| 356 *Bond*. Possible bond order values: 1 = Single, 1.5 = Aromatic, 2 = | |
| 357 Double, 3 = Triple, 4 = Quadruple, 5 = Quintuple, 6 = Sextuple, 7 = | |
| 358 Septuple | |
| 359 | |
| 360 Notes: | |
| 361 | |
| 362 . BondType property is automatically assigned using default BondType | |
| 363 values for specified BondOrder. | |
| 364 . BondType values can also be explicit set. | |
| 365 . To make bonds aromatic in a ring, explicitly set "Aromatic" | |
| 366 property for bond/atoms and make sure appropriate BondOrder | |
| 367 values are assigned. | |
| 368 . Dative or coordinate bond types are treated as single bond types with | |
| 369 explicit formal charge of + and - on first and second bond atoms. | |
| 370 | |
| 371 SetBondType | |
| 372 $Bond->SetBondType($BondType); | |
| 373 | |
| 374 Sets bond type for *Bond* to specified *BondType* and returns | |
| 375 *Bond*. Possible bond type values for different bond orders are: | |
| 376 | |
| 377 0: None, Ionic, Unspecified | |
| 378 1 : Single, Dative, Coordinate, SingleOrDouble, SingleOrAromatic, Tautomeric | |
| 379 2 : Double, SingleOrDouble, DoubleOrAromatic, Tautomeric | |
| 380 3 : Triple | |
| 381 4 : Quadruple | |
| 382 5 : Quintuple | |
| 383 6 : Sextuple | |
| 384 7 : Septuple | |
| 385 1.5 : Aromatic, Resonance, SingleOrAromatic, DoubleOrAromatic | |
| 386 | |
| 387 Notes: | |
| 388 | |
| 389 o BondType Any is valid for all BondOrders. | |
| 390 o BondOrder property is automatically assigned using default BondOrder | |
| 391 values for specified BondType. | |
| 392 | |
| 393 Possible bond stereochemistry values for different bond orders are: | |
| 394 | |
| 395 0 : None, Unspecified | |
| 396 1 : Wedge, Up, Hash, Down, Wavy, WedgeOrHash, UpOrDown, Upward, Downward, | |
| 397 None, Unspecified | |
| 398 2 : Cis, Trans, Z, E, DoubleCross, CisOrTrans, None, Unspecified | |
| 399 | |
| 400 SetBondStereochemistry | |
| 401 $Bond = $Bond->SetBondStereochemistry($BondStereochemistry); | |
| 402 | |
| 403 Sets bond stereochemistry of *Bond* to specified | |
| 404 *BondStereochemistry* and returns *Bond*. Possible | |
| 405 *BondStereoChemistry* values for different bond orders are: | |
| 406 | |
| 407 BondOrder: 1 | |
| 408 | |
| 409 None, Unspecified: Not a stereo bond or unspecified | |
| 410 | |
| 411 Wedge, Up : Wedge end pointing up | |
| 412 Hash, Down: Wedge end pointing down | |
| 413 Wavy, WedgeOrHash, UpOrDown: Wedge end up or down | |
| 414 | |
| 415 Upward: Single bond around cis/trans double bonds pointing upward | |
| 416 Downward: Single bond around cis/trans double bonds pointing upward | |
| 417 | |
| 418 Notes: | |
| 419 | |
| 420 o Wedge starts at begin atom of a bond making wedge pointed end always | |
| 421 at this atom. | |
| 422 o Upward/downward bonds start at atoms involved in cis/trans double bonds. | |
| 423 | |
| 424 BondOrder: 2 | |
| 425 | |
| 426 None, Unspecified: Not a stereo bond or unspecified | |
| 427 | |
| 428 Z, cis: Similar groups on same side of double bond | |
| 429 E, trans: Similar groups on different side of double bond | |
| 430 | |
| 431 CisOrTrans, DoubleCross: cis or trans | |
| 432 | |
| 433 StringifyBond | |
| 434 $BondString = $Bond->StringifyBond(); | |
| 435 | |
| 436 Returns a string containing information about *bond* object. | |
| 437 | |
| 438 SwitchBondFromAndToAtoms | |
| 439 $Bond = $Bond->SwitchBondFromAndToAtoms(); | |
| 440 | |
| 441 Swaps bond from and to atoms in *Bond* and returns *Bond*. | |
| 442 | |
| 443 AUTHOR | |
| 444 Manish Sud <msud@san.rr.com> | |
| 445 | |
| 446 SEE ALSO | |
| 447 Atom.pm, Molecule.pm | |
| 448 | |
| 449 COPYRIGHT | |
| 450 Copyright (C) 2015 Manish Sud. All rights reserved. | |
| 451 | |
| 452 This file is part of MayaChemTools. | |
| 453 | |
| 454 MayaChemTools is free software; you can redistribute it and/or modify it | |
| 455 under the terms of the GNU Lesser General Public License as published by | |
| 456 the Free Software Foundation; either version 3 of the License, or (at | |
| 457 your option) any later version. | |
| 458 |
