Class GroupDefinition

java.lang.Object
chemaxon.standardizer.advancedactions.GroupDefinition
All Implemented Interfaces:
Cloneable, Comparable<GroupDefinition>

@PublicApi public class GroupDefinition extends Object implements Cloneable, Comparable<GroupDefinition>
Pattern of a group. Consists of an abbreviation as a text and a definition as a molecule.
Since:
5.7
  • Constructor Details

    • GroupDefinition

      public GroupDefinition()
      Creates an empty group pattern.
    • GroupDefinition

      public GroupDefinition(String abbreviation, Molecule original)
      Creates a new group pattern.
      Parameters:
      abbreviation - The abbreviation of the group.
      original - the original molecule of the group definition
  • Method Details

    • getAbbreviation

      public String getAbbreviation()
      Gets the abbreviation of the group.
      Returns:
      The abbreviation of the group.
    • setAbbreviation

      public void setAbbreviation(String abbreviation)
      Sets the abbreviation of the group.
      Parameters:
      abbreviation - The abbreviation of the group.
    • getGroup

      public Molecule getGroup()
      Gets the definition of the group.
      Returns:
      The definition of the group.
    • getOriginal

      public Molecule getOriginal()
      Gets the original molecule of the group.
      Returns:
      The original molecule of the group.
    • setOriginal

      public void setOriginal(Molecule original)
      Sets the original molecule of the group.
      Parameters:
      original - The original molecule of the group.
    • getGroupsOf

      public static List<GroupDefinition> getGroupsOf(String text, List<GroupDefinition> groupDefinition)
      Gets the group from a list of group definitions, based on the abbreviation.
      Parameters:
      text - The abbreviation of the group.
      groupDefinition - The list of group definitions
      Returns:
      The group molecule. (null if not found)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getConnectionAtoms

      public List<Integer> getConnectionAtoms()
      Gets the indexes of atoms connection to any atoms
      Returns:
      the indexes of atoms connection to any atoms
    • getAttachCount

      public int getAttachCount(Integer index)
      Gets the attachment point count for the atom specified by the index
      Returns:
      the attachment point count for the atom specified by the index
    • getAttachmentPointOrders

      public Collection<Integer> getAttachmentPointOrders(int atomIndex)
      Returns the attachment point orders of the atom specified by atomIndex.
    • clone

      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(GroupDefinition o)
      Specified by:
      compareTo in interface Comparable<GroupDefinition>
    • setAminoAcid

      public void setAminoAcid(boolean aminoAcid)
      Sets whether the group represents an amino-acid
      Parameters:
      aminoAcid - whether the group represents an amino-acid
    • isAminoAcid

      public boolean isAminoAcid()
      Gets whether the group represents an amino-acid
      Returns:
      whether the group represents an amino-acid