![]() |
Atom
use Atom;
Atom class provides the following methods:
new, AddHydrogens, Copy, DeleteAtom, DeleteHydrogens, GetAtomicWeight , GetBondToAtom, GetBonds, GetBondsToHeavyAtoms, GetBondsToHydrogenAtoms , GetBondsToNonHydrogenAtoms, GetExactMass, GetExplicitHydrogens , GetHeavyAtomNeighbors, GetHighestCommonValence, GetHydrogenAtomNeighbors , GetImplicitHydrogens, GetImplicitValence, GetLargestRing, GetLowestCommonValence , GetMassNumber, GetNeighbors, GetNonHydrogenAtomNeighbors, GetNumOfBonds , GetNumOfBondsToHeavyAtoms, GetNumOfBondsToHydrogenAtoms , GetNumOfBondsToNonHydrogenAtoms, GetNumOfHeavyAtomNeighbors , GetNumOfHydrogenAtomNeighbors, GetNumOfMissingHydrogens, GetNumOfNeighbors , GetNumOfNonHydrogenAtomNeighbors, GetNumOfRings, GetNumOfRingsWithEvenSize , GetNumOfRingsWithOddSize, GetNumOfRingsWithSize, GetNumOfRingsWithSizeGreaterThan , GetNumOfRingsWithSizeLessThan, GetRings, GetRingsWithEvenSize , GetRingsWithOddSize, GetRingsWithSize, GetRingsWithSizeGreaterThan , GetRingsWithSizeLessThan, GetSizeOfLargestRing, GetSizeOfSmallestRing , GetSmallestRing, GetSumOfBondOrders, GetSumOfBondOrdersToHeavyAtoms , GetSumOfBondOrdersToHydrogenAtoms, GetSumOfBondOrdersToNonHydrogenAtoms , GetValence, GetValenceElectrons, GetValenceFreeElectrons, GetX, GetXYZ , GetXYZVector, GetY, GetZ, IsAromatic, IsBromine, IsCarbon, IsChlorine, IsFluorine , IsHetroAtom, IsHydrogen, IsInRing, IsInRingOfSize, IsIodine, IsNitrogen , IsNotInRing, IsOnlyInOneRing, IsOxygen, IsPhosphorus, IsPolarAtom , IsPolarHydrogen, IsStereoCenter, IsSulfur, SetAtomSymbol, SetAtomicNumber, SetID , SetMassNumber, SetStereoCenter, SetStereochemistry, SetX, SetXYZ, SetY, SetZ , StringifyAtom
Atom class is derived from ObjectProperty base class which provides methods not explictly defined in Atom or ObjectProperty class using Perl's AUTOLOD functionality. These methods are generated on-the-fly for a specified object property:
Using specified Atom property names and values hash, new method creates a new object and returns a reference to newly created Atom object. By default, following properties are initialized:
Except for ID property, all other default properties and other additional properties can be set during invocation of this method.
Examples:
Adds hydrogens to an Atom present in a Molecule object and returns the number of added hydrogens. The current release of MayaChemTools doesn't assign hydrogen positions.
Copy Atom and its associated data using Storable::dclone and return a new Atom object
Delete Atom from a molecule
Delete hydrogens from an Atom present in a Molecule object and returns the number of deleted hydrogens
Returns atomic weight of an Atom which corresponds to either explicity set AtomicWeight atom property or atomic weight of the corresponding element in the periodic table available by PeriodicTable module
Returns a Bond object corresponding to bond between Atom and OtherAtom in a molecule
Returns an array of Bond objects corresponding to all bonds from Atom to other bonded atoms in a molecule
Returns an array of Bond objects corresponding to bonds from Atom to other bonded non-hydrogen atoms in a molecule
Returns an array of Bond objects corresponding to bonds from Atom to any other hydrogen atom in a molecule
Returns an array of Bond objects corresponding to bonds from Atom to other bonded non-hydrogen atoms in a molecule
Returns exact mass of an Atom which correspond to one of these three values: explicity set ExactMass property; mass of natural isotope for an explicty set value of MassNumber; most abundant natural isotope mass for Atom with valid atomic number value available by PerodicTable module.
Returns number of hydrogens explicity bonded to an Atom in a molecule
Return number of heavy atoms or an array of Atom objects corresponding to heavy atoms bonded to an Atom in a molecule
Returns highest common valence of an Atom which corresponds to either explicity set HighestCommonValence atom property or highest common valence of the corresponding element in the periodic table available by PerodicTable module.
Return number of hydrogen atoms or an array of Atom objects corresponding to hydrogen atoms bonded to an Atom in a molecule
Returns number of implicit hydrogens for an Atom in a molecule. This value either corresponds to explicity set ImplicitHydrogens atom property or calculated as the difference between the value of implicit valence and sum of bond orders to explicit non-hydrogen atoms.
Returns implicit valence of an Atom in a molecule which corresponds to either explicity set ImplicitValence atom property or calculated as described below.
For atoms with only one possible value of common valence available by PeriodicTable module, ImplictValence corresponds to: CommonValence + FormalCharge + SpinMultiplicityCorrection.
For atoms with multiple values of common valence available by PeriodicTable module and formal charge, ImplictValence corresponds to: HighestCommonValence + FormalCharge + SpinMultiplicityCorrection.
For atoms with multiple values of common valence available by PeriodicTable module and no formal charge, ImplictValence corresponds to: First available valence higher than sum of bond orders to non-hydrogen atoms + SpinMultiplicityCorrection.
Notes:
For atoms with explicit assignment of SpinMultiplicity atom property values
SpinMultiplicityCorrection is calculated as follows:
Returns an array of ring Atom objects corresponding to the largest ring containing Atom in a molecule
Returns lowest common valence of an Atom which corresponds to either explicity set LowestCommonValence atom property or highest common valence of the corresponding element in the periodic table available by PerodicTable module
Returns atomic weight of an Atom which corresponds to either explicity set MassNumber atom property or mass number of the most abundant natural isotope of the corresponding element in the periodic table available by PeriodicTable module
Returns number of neighbor atoms or an array of Atom objects corresponding to all atoms bonded to an Atom in a molecule
Returns number of non-hydrogen atoms or an array of Atom objects corresponding to non-hydrogen atoms bonded to an Atom in a molecule
Returns number of bonds from Atom to other atoms in a molecule
Returns number of bonds from Atom to other heavy atoms in a molecule
Returns number of bonds from Atom to other hydrogen atoms in a molecule
Returns number of bonds from Atom to other non-hydrogen atoms in a molecule
Returns number heavy atom neighbors for an Atom in a molecule
Returns number hydrogens atom neighbors for an Atom in a molecule
Returns number of missing hydrogens for an Atom in a molecule correspoding to the difference between number of implicit and explicit hydrogens.
Returns number atom neighbors for an Atom in a molecule
Returns number non-hydrogens atom neighbors for an Atom in a molecule
Returns number of rings containing Atom in a molecule
Returns number of rings with even size containing Atom in a molecule
Returns number of rings with odd size containing Atom in a molecule
Returns number of rings with specific RingSize containing Atom in a molecule
Returns number of rings with size greater than specific RingSize containing Atom in a molecule
Returns number of rings with size less than specific RingSize containing Atom in a molecule
Returns an array of references to arrays containing ring atoms corressponding to all rings containing Atom in a molecule
Returns an array of references to arrays containing ring atoms corressponding to all rings with even size containing Atom in a molecule
Returns an array of references to arrays containing ring atoms corressponding to all rings with odd size containing Atom in a molecule
Returns an array of references to arrays containing ring atoms corressponding to all rings with specific RingSize containing Atom in a molecule
Returns an array of references to arrays containing ring atoms corressponding to all rings with size greater than specific RingSize containing Atom in a molecule
Returns an array of references to arrays containing ring atoms corressponding to all rings with size less than specific RingSize containing Atom in a molecule
Returns size of the largest ring containing Atom in a molecule
Returns size of the smallest ring containing Atom in a molecule
Returns an array of ring Atom objects corresponding to the largest ring containing Atom in a molecule
Returns sum of bond orders corresponding to all atoms bonded to an Atom in a molecule
Returns sum of bond orders corresponding to all heavy atoms bonded to an Atom in a molecule
Returns sum of bond orders corresponding to all hydrogen atoms bonded to an Atom in a molecule
Returns sum of bond orders corresponding to all non-hydrogen atoms bonded to an Atom in a molecule
Returns valence of an Atom in a molecule. Valence corresponds to number of electrons used by an atom in bonding:
Single, double and triple bonds with bond orders of 1, 2, and 3 correspond to contribution of 1, 2, and 3 bonding electrons. So:
where positive and negative values of FormalCharge increase and decrease the number of bonding electrons, respectively.
Notes:
Returns valence electrons for an Atom which corresponds to either explicity set ValenceElectrons atom property or valence electrons for the corresponding element in the periodic table available by PeriodicTable module
Returns valence frees electrons for an Atom in a molecule. It corresponds to:
Examples:
Returns value of X-coordinate for an Atom
Returns an array or a reference to an array containing values for Atom coordinates
Returns a Vector object containing values for Atom coordinates
Returns value of Y-coordinate for an Atom
Returns value of Z-coordinate for an Atom
Returns 1 or 0 based on whether it's an aromatic Atom
Returns 1 or 0 based on whether it's a bromine Atom
Returns 1 or 0 based on whether it's a carbon Atom
Returns 1 or 0 based on whether it's a chlorine Atom
Returns 1 or 0 based on whether it's a fluorine Atom
Returns 0 or 1 based on whether it's a hetro Atom. Following atoms are considered hetro atoms: N, O, F, P, S, Cl, Br, I
Returns 1 or 0 based on whether it's a hydrogen Atom
Returns 1 or 0 based on whether Atom is present in a ring
Returns 1 or 0 based on whether Atom is present in a ring of specific Size
Returns 1 or 0 based on whether it's an iodine Atom
Returns 1 or 0 based on whether it's a nitrogen Atom
Returns 1 or 0 based on whether Atom is not present in a ring
Returns 1 or 0 based on whether Atom is only present in one ring
Returns 0 or 1 based on whether it's an oxygen Atom
Returns 0 or 1 based on whether it's a phosphorus Atom
Returns 0 or 1 based on whether it's a polar Atom. Following atoms are considered polar atoms: N, O, P, S
Returns 0 or 1 based on whether it's a hydrogen Atom bonded to a polar atom
Returns 0 or 1 based on whether it's marked as a stero center Atom by explicit setting of StereoCenter atom propert to value of 1.
Returns 0 or 1 based on whether it's a sulfur Atom
Sets atom symbol for Atom and returns Atom object. The appropriate atomic number is also set automatically.
Sets atomic number for Atom and returns Atom object. The appropriate atom symbol is also set automatically.
Sets mass number for Atom and returns Atom object
Sets stereo center for Atom and returns Atom object.
Sets stereo chemistry for Atom and returns Atom object
Sets X-coordinate value for Atom and returns Atom object
Sets Atom coordinates using an array, reference to an array or a Vector object and returns Atom object
Sets Y-coordinate value for Atom and returns Atom object
Sets Z-coordinate value for Atom and returns Atom object
Returns a string containing information about Atom object
Bond.pm, Molecule.pm, MoleculeFileIO.pm
Copyright (C) 2004-2008 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.