![]() |
Atom
use Atom;
Atom class provides the following methods:
new, AddHydrogens, Copy, DeleteAtom, DeleteHydrogens, DoesAtomNeighborhoodMatch , GetAtomicInvariantValue, GetAtomicWeight, GetBondToAtom, GetBonds , GetBondsToHeavyAtoms, GetBondsToHydrogenAtoms, GetBondsToNonHydrogenAtoms , GetExactMass, GetExplicitHydrogens, GetFormalCharge, GetGroupNumber , GetHeavyAtomNeighbors, GetHeavyAtomNeighborsAtomInformation , GetHeavyAtomNeighborsBondformation, GetHighestCommonValence , GetHydrogenAtomNeighbors, GetImplicitHydrogens, GetImplicitValence , GetLargestBondOrder, GetLargestBondOrderToHeavyAtoms , GetLargestBondOrderToNonHydrogenAtoms, GetLargestRing, GetLowestCommonValence , GetMassNumber, GetNeighbors, GetNeighborsUsingAtomSpecification , GetNonHydrogenAtomNeighbors, GetNonHydrogenAtomNeighborsAtomInformation , GetNonHydrogenAtomNeighborsBondInformation, GetNonHydrogenNeighborOfHydrogenAtom , GetNumOfAromaticBondsToHeavyAtoms, GetNumOfAromaticBondsToNonHydrogenAtoms , GetNumOfBondTypesToHeavyAtoms, GetNumOfBondTypesToNonHydrogenAtoms, GetNumOfBonds , GetNumOfBondsToHeavyAtoms, GetNumOfBondsToHydrogenAtoms , GetNumOfBondsToNonHydrogenAtoms, GetNumOfDoubleBondsToHeavyAtoms , GetNumOfDoubleBondsToNonHydrogenAtoms, GetNumOfHeavyAtomNeighbors , GetNumOfHydrogenAtomNeighbors, GetNumOfMissingHydrogens, GetNumOfNeighbors , GetNumOfNonHydrogenAtomNeighbors, GetNumOfRings, GetNumOfRingsWithEvenSize , GetNumOfRingsWithOddSize, GetNumOfRingsWithSize, GetNumOfRingsWithSizeGreaterThan , GetNumOfRingsWithSizeLessThan, GetNumOfSigmaAndPiBondsToHeavyAtoms , GetNumOfSigmaAndPiBondsToNonHydrogenAtoms, GetNumOfSingleBondsToHeavyAtoms , GetNumOfSingleBondsToNonHydrogenAtoms, GetNumOfTripleBondsToHeavyAtoms , GetNumOfTripleBondsToNonHydrogenAtoms, GetPeriodNumber, GetRings , GetRingsWithEvenSize, GetRingsWithOddSize, GetRingsWithSize , GetRingsWithSizeGreaterThan, GetRingsWithSizeLessThan, GetSizeOfLargestRing , GetSizeOfSmallestRing, GetSmallestRing, GetSumOfBondOrders , GetSumOfBondOrdersToHeavyAtoms, GetSumOfBondOrdersToHydrogenAtoms , GetSumOfBondOrdersToNonHydrogenAtoms, GetValence, GetValenceElectrons , GetValenceFreeElectrons, GetX, GetXYZ, GetXYZVector, GetY, GetZ, IsAmideCarbon , IsAmideNitrogen, IsAromatic, IsBromine, IsCarbon, IsCarboxylCarbon , IsCarboxylOxygen, IsCarboxylateCarbon, IsCarboxylateOxygen, IsChlorine , IsFluorine, IsFunctionalClassType, IsGuadiniumCarbon, IsGuadiniumNitrogen , IsHBondAcceptor, IsHBondDonor, IsHalogen, IsHetroAtom, IsHydrogen , IsHydrogenBondAcceptor, IsHydrogenBondDonor, IsHydrophobic, IsInRing , IsInRingOfSize, IsIodine, IsIsotope, IsLipophilic, IsMetallic , IsNegativelyIonizable, IsNitrogen, IsNonCarbonOrHydrogen, IsNotInRing , IsOnlyInOneRing, IsOxygen, IsPhosphateOxygen, IsPhosphatePhosphorus, IsPhosphorus , IsPolarAtom, IsPolarHydrogen, IsPositivelyIonizable, IsSaturated, IsSilicon , IsStereoCenter, IsSulfur, IsSulphur, IsTopologicalPharmacophoreType , IsUnsaturated, SetAtomSymbol, SetAtomicNumber, SetMassNumber , SetStereoCenter, SetStereochemistry, SetX, SetXYZ, SetY, SetZ, StringifyAtom
Atom class is derived from ObjectProperty base class which provides methods not explicitly defined in Atom or ObjectProperty class using Perl's AUTOLOAD 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.
Returns 1 or 0 based on whether atom matches central atom and its neighborhood using specified atom and bonds specifications. Neighborhood atom and bond specifications are specified as array references containing neighbor atom and bond specifications.
Let:
Then, atom specification corresponds to:
Except for AS which is a required atomic invariant in atom specification, all other atomic invariants are optional. For an atom specification to match an atom, the values of all specified atomic invariants must match. Exclamation in from of atomic invariant can be used to negate its effect during the match.
For FC value matching, the following value operators are also supported:
A comma delimited atom specification string is used to match any one of the specified atom specification.
Notes:
Examples:
Let:
Then, bond specification corresponds to:
For a bond specification to match bond between two atoms, the values of all specified bond symbols must match. Exclamation in from of bond symbol can be used to negate its effect during the match.
A comma delimited bond specification string is used to match any one of the specified atom specification.
Notes:
Examples:
Delete hydrogens from an Atom present in a Molecule object and returns the number of deleted hydrogens.
Returns atomic invariant value for a specified AtomicInvariant. The current release of MayaChemTools supports following abbreviations and descriptive names for AtomicInvarints:
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.
Returns formal charge of an Atom in a molecule.
Returns group number of an Atom in a molecule with a valid atomic number.
Return number of heavy atoms or an array of Atom objects corresponding to heavy atoms bonded to an Atom in a molecule.
Returns atoms information for all non-hydrogen atoms attached to an Atom in a molecule.
The following values are returned:
Returns bonds information for all non-hydrogen atoms attached to an Atom in a molecule.
The following values are returned:
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 largest bond order for an Atom among the bonds to other atoms in a molecule.
Returns largest bond order for an Atom among the bonds to other heavy atoms in a molecule.
Returns largest bond order for an Atom among the bonds to other non-hydrogen atoms in a molecule.
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 neighbor atoms or an array of Atom objects matching atom specification corresponding to atom neighbors of an Atom in a molecule. Optionally, Atom neighbors can be excluded from the neighbors list using ExcludeNeighbors.
Notes:
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 atoms information for all non-hydrogen atoms attached to an Atom in a molecule.
The following values are returned:
Returns bonds information for all non-hydrogen atoms attached to an Atom in a molecule.
The following values are returned:
Returns non-hydrogen or heavy atom neighbor of a hydrogen atom in a molecule..
Returns number of aromatic bonds from an Atom to other non-hydrogen or heavy atoms in a molecule.
Returns number of aromatic bonds from an Atom to other non-hydrogen or heavy atoms in a molecule.
Returns number of bonds from an Atom to other atoms in a molecule.
Returns number of bonds from an Atom to other heavy atoms in a molecule.
Returns number of bonds from an Atom to other hydrogen atoms in a molecule.
Returns number of bonds from an Atom to other non-hydrogen atoms in a molecule.
Get number of single, double, triple, and aromatic bonds from an Atom to all other non-hydrogen atoms in a molecule.
Value of CountAtomaticBonds parameter controls whether number of aromatic bonds is returned; default is not to count aromatic bonds. During counting of aromatic bonds, the bond marked aromatic is not included in the count of other bond types.
Get number of single, double, triple, and aromatic bonds from an Atom to all other non-hydrogen atoms in a molecule.
Value of CountAtomaticBonds parameter controls whether number of aromatic bonds is returned; default is not to count aromatic bonds. During counting of aromatic bonds, the bond marked aromatic is not included in the count of other bond types.
Returns number of double bonds from an Atom to other heavy atoms or non-hydrogen atoms in a molecule.
Returns number of double bonds from an Atom to other heavy atoms or 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.
Get number of sigma and pi bonds from an Atom to all other non-hydrogen atoms in a molecule.
Sigma and pi bonds are counted using the following methodology: a single bond correspond to one sigma bond; a double bond contributes one to sigma bond count and one to pi bond count; a triple bond contributes one to sigma bond count and two to pi bond count.
Get number of sigma and pi bonds from an Atom to all other non-hydrogen atoms in a molecule.
Sigma and pi bonds are counted using the following methodology: a single bond correspond to one sigma bond; a double bond contributes one to sigma bond count and one to pi bond count; a triple bond contributes one to sigma bond count and two to pi bond count.
Returns number of single bonds from an Atom to other heavy atoms or non-hydrogen atoms in a molecule.
Returns number of single bonds from an Atom to other heavy atoms or non-hydrogen atoms in a molecule.
Returns number of triple bonds from an Atom to other heavy atoms or non-hydrogen atoms in a molecule.
Returns number of triple bonds from an Atom to other heavy atoms or non-hydrogen atoms in a molecule.
Returns periodic table period number for an Atom in a molecule with a valid atomic number .
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 amide carbon Atom.
An amide group is defineds as:
where:
Returns 1 or 0 based on whether it's amide nitrogen 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 carboxyl carbon atom in carboxyl group: R-C(=O)-OH.
Returns 1 or 0 based on whether it's a carboxyl oxygen atom in carboxyl group: R-C(=O)-OH.
Returns 1 or 0 based on whether it's a carboxylate carbon atom in carboxyl group: R-C(=O)-O-.
Returns 1 or 0 based on whether it's a carboxylate oxygen atom in carboxyl group: R-C(=O)-O-.
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 1 or 0 based on whether it's a specified functional class Type.
The current release of MayaChemTools supports following abbreviations and descriptive names for FunctionalClassType:
The following definitions are used to determine functional class types: [ Ref 60-61, Ref 65-66 ]:
Returns 1 or 0 based on whether it's a guadinium carbon in guadinium group by checking its neighbors for a nitrogen in guadinium group.
Returns 1 or 0 based on whether it's a guadinium nitrogen in guadinium group.
A guadinium group is defined as:
where:
Returns 1 or 0 based on whether it's a hydrogen bond acceptor Atom.
Returns 1 or 0 based on whether it's a hydrogen bond donor Atom.
Returns 1 or 0 based on whether it's a hydrogen bond acceptor Atom.
Returns 1 or 0 based on whether it's a hydrogen bond donor Atom.
The current release of MayaChemTools supports identification of two types of hydrogen bond donor and acceptor atoms with these names:
The names of these hydrogen bond types are rather arbitrary. However, their definitions have specific meaning and are as follows:
By default, HydrogenBondsType1 is used to calculate number hydrogen bond donor and acceptor atoms. HydrogenBondsType2 corresponds to RuleOf5 definition of hydrogen bond donors and acceptors.
Returns 1 or 0 based on whether it's a halogen 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 it's a hydrophobic 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 an isotope Atom.
Returns 1 or 0 based on whether it's a lipophilic Atom.
Returns 1 or 0 based on whether it's a metallic Atom.
Returns 1 or 0 based on whether it's a negatively ionizable atom Atom.
Returns 1 or 0 based on whether it's a nitrogen Atom.
Returns 1 or 0 based on whether it's not a carbon or hydrogen 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 1 or 0 based on whether it's a phosphate oxygen in phosphate group.
A phosphate group is defined as:
Where:
Returns 1 or 0 based on whether it's a phosphate phosphorus in phosphate group.
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 1 or 0 based on whether it's a positively ionizable Atom.
Returns 1 or 0 based on whether it's a saturated Atom. An atom attached to other atoms with only single bonds is considered a saturated 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 silicon Atom.
Returns 0 or 1 based on whether it's a sulfur Atom.
Returns 0 or 1 based on whether it's a sulfur Atom.
Returns 1 or 0 based on whether it's as unsaturated Atom. An atom attached to other atoms with at least one non-single bond is considered an unsaturated atom.
Returns 1 or 0 based on whether it's any of the supportyed topological pharmacophore Atom type. See IsFunctionalClassType for a list of supported types.
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-2012 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.