Class GroupDefinition

    • Constructor Detail

      • 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 Detail

      • 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
      • 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
        Parameters:
        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.
      • 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