Class Atom


  • public class Atom
    extends java.lang.Object
    The Atom type class provides static functions to perform atom typing on atoms in a Molecule. There are also several helper functions used in Atom typing provided here.
    • Constructor Summary

      Constructors 
      Constructor Description
      Atom()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int degree​(MMFFMolecule mol, int atom)
      Returns the total number of atoms connected to an atom, including implicit and explicit hydrogens.
      static int getType​(MMFFMolecule mol, int atom)
      Returns the MMFF type of an atom in a molecule.
      static boolean inRingOfSize​(MMFFMolecule mol, int atom, int size)
      Returns true if the atom is in any ring of a given size.
      static int inRings​(MMFFMolecule mol, int atom)
      Returns the number of rings that an atom is a member of in a molecule.
      static boolean inSameRing​(MMFFMolecule mol, int a1, int a2, int size)
      Returns true if two atoms are in the same ring of a given size.
      static boolean isInAromaticRingOfSize​(MMFFMolecule mol, int atom, int size)
      Returns true if the atom is in an aromatic ring of given size.
      static RingBoolean ringIsMMFFAromatic​(MMFFMolecule mol, int r)
      Determine if a ring is aromatic according to MMFF criteria.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Atom

        public Atom()
    • Method Detail

      • getType

        public static int getType​(MMFFMolecule mol,
                                  int atom)
        Returns the MMFF type of an atom in a molecule.
        Parameters:
        mol - The molecule that the atom is in.
        atom - The atom to assign a type for.
        Returns:
        The mmff atom type.
      • inRings

        public static int inRings​(MMFFMolecule mol,
                                  int atom)
        Returns the number of rings that an atom is a member of in a molecule.
        Parameters:
        mol - The molecule that the atom is in.
        atom - The atom to check.
        Returns:
        The nuber of rings that the atom is a member of.
      • isInAromaticRingOfSize

        public static boolean isInAromaticRingOfSize​(MMFFMolecule mol,
                                                     int atom,
                                                     int size)
        Returns true if the atom is in an aromatic ring of given size.
        Parameters:
        mol - The molecule that the atom is in.
        atom - The atom to check.
        size - The size of aromatic rings to check.
        Returns:
        True if the atom is in an aromatic ring of given size, false otherwise.
      • ringIsMMFFAromatic

        public static RingBoolean ringIsMMFFAromatic​(MMFFMolecule mol,
                                                     int r)
        Determine if a ring is aromatic according to MMFF criteria. Only designed to work with rings of size 5 and 6.
        Parameters:
        mol - The molecule that the ring is in.
        r - The ring.
        Returns:
        True if the ring is aromatic, false otherwise.
      • degree

        public static int degree​(MMFFMolecule mol,
                                 int atom)
        Returns the total number of atoms connected to an atom, including implicit and explicit hydrogens.
        Parameters:
        mol - The molecule that the atom is in.
        atom - The atom to count the neighbours of.
        Returns:
        The number of neighbours connected to this atom.
      • inRingOfSize

        public static boolean inRingOfSize​(MMFFMolecule mol,
                                           int atom,
                                           int size)
        Returns true if the atom is in any ring of a given size.
        Parameters:
        mol - The molecule that the atom is in.
        atom - The atom to check.
        size - The size of rings to check.
        Returns:
        True if the atom is in a ring of given size, false otherwise.
      • inSameRing

        public static boolean inSameRing​(MMFFMolecule mol,
                                         int a1,
                                         int a2,
                                         int size)
        Returns true if two atoms are in the same ring of a given size.
        Parameters:
        mol - The molecule that both atoms are in.
        a1 - The first atom.
        a2 - The second atom.
        size - The size of the ring both atoms must be a member of.
        Returns:
        True if both atoms are in a ring of given size, false otherwise.