Class AminoAcidSgroup

All Implemented Interfaces:
Expandable, Serializable

@PublicApi public class AminoAcidSgroup extends SuperatomSgroup
Amino acid S-groups.
Since:
Marvin 6.1, 2013.05.27.
See Also:
  • Constructor Details

    • AminoAcidSgroup

      public AminoAcidSgroup(Molecule parent)
      Constructs an AminoAcidSgroup in expanded state. Please note the S-group is not added automatically to the parent molecule.
      Parameters:
      parent - the parent molecule
      See Also:
    • AminoAcidSgroup

      public AminoAcidSgroup(Molecule parent, boolean expanded)
      Constructs an aminoAcidSgroup. Its superatom is automatically created. Please note the S-group is not added automatically to the parent molecule.
      Parameters:
      parent - the parent molecule
      expanded - whether the S-group is created in expanded state or not
      See Also:
    • AminoAcidSgroup

      protected AminoAcidSgroup(AminoAcidSgroup aminoSg, Molecule m, Sgroup psg, int[] atomIndexMap)
      Copy constructor.
      Parameters:
      aminoSg - the amino acid s-group to copy
      m - the new molecule
      psg - the new parent s-group or null
      atomIndexMap - indices of cloned atoms in the original molecule or null
      Since:
      Marvin 6.1 2013.05.27.
    • AminoAcidSgroup

      protected AminoAcidSgroup(SuperatomSgroup sasg, Molecule m, Sgroup psg, int[] atomIndexMap)
      Copy constructor.
      Parameters:
      sasg - the superatom s-group to copy
      m - the new molecule
      psg - the new parent s-group or null
      atomIndexMap - indices of cloned atoms in the original molecule or null
      Since:
      Marvin 6.1 2013.05.27.
    • AminoAcidSgroup

      public AminoAcidSgroup(Molecule parent, String oneLetterName, String threeLetterName)
      Creates an expanded amino acid s-group with the given one and three letter names.
      Parameters:
      parent - the parent molecule
      oneLetterName - the one letter name of the amino acid
      threeLetterName - the three letter name of the amino acid
      Since:
      Marvin 6.1, 2013.05.27.
  • Method Details

    • getOneLetterName

      public String getOneLetterName()
      Returns the one letter name of the amino acid.
      Returns:
      the one letter name of the amino acid
      Since:
      Marvin 6.1, 2013.05.27.
    • setOneLetterName

      public final void setOneLetterName(String oneLetterName)
      Sets the one letter name of the amino acid.
      Parameters:
      oneLetterName - the one letter name of the amino acid
      Since:
      Marvin 6.1, 2013.05.27.
    • getThreeLetterName

      public String getThreeLetterName()
      Returns the three letter name of the amino acid.
      Returns:
      the three letter name of the amino acid
      Since:
      Marvin 6.1, 2013.05.27.
    • setThreeLetterName

      public final void setThreeLetterName(String threeLetterName)
      Sets the three letter name of the amino acid.
      Parameters:
      threeLetterName - the three letter name of the amino acid
      Since:
      Marvin 6.1, 2013.05.27.
    • isModified

      public boolean isModified()
      Checks whether the amino acid is modified or not.
      Returns:
      true if the amino acid is modified, false otherwise
      Since:
      Marvin 6.1, 2013.05.27.
    • clone

      public AminoAcidSgroup clone()
      Clones the AminoAcidSgroup (and not the Molecule).
      Overrides:
      clone in class SuperatomSgroup
      Returns:
      the cloned amino acid s-group
      Since:
      Marvin 6.1, 2013.05.27.
    • cloneSgroup

      protected Sgroup cloneSgroup(Molecule m, Sgroup psg, int[] atomIndexMap)
      Gets a new amino acid s-group instance.
      Overrides:
      cloneSgroup in class SuperatomSgroup
      Parameters:
      m - the new parent molecule
      psg - the new parent s-group
      atomIndexMap - indices of cloned atoms in the original molecule or null
      Returns:
      the new object
      Since:
      Marvin 6.1 2013.05.27.
    • getSubscript

      public String getSubscript()
      Gets the three letter name if it isn't empty, otherwise the one letter name (or empty String if both of them are empty). If the AminoAcid is modified, the string gets the "(mod)" suffix.
      Overrides:
      getSubscript in class Sgroup
      Returns:
      the subscript
    • createGroup

      protected AminoAcidSgroup createGroup()
      Overrides:
      createGroup in class SuperatomSgroup
    • calculateCoordinates

      protected void calculateCoordinates(Molecule parentMol, MolBond[] xbonds, MoleculeGraph g, int opts, boolean isContract, SelectionMolecule otherSgroup, List<Double> xBondLength)
      Description copied from class: SuperatomSgroup
      Calculates the coordinates during expand and contract.
      Overrides:
      calculateCoordinates in class SuperatomSgroup
      Parameters:
      parentMol - the parent molecule of the superatomSgroup
      xbonds - array of the crossing bonds
      g - graph of the sgroup
      opts - expand option
      isContract - true if it is called from contract, false if do so from expand
      otherSgroup - graph of the other sgroup in expandOther
    • getSgroupType

      public SgroupType getSgroupType()
      Description copied from class: Sgroup
      Gets the S-group type.
      Overrides:
      getSgroupType in class Sgroup
      Returns:
      the type of the S-group
      See Also: