Enum TorsionRange

java.lang.Object
java.lang.Enum<TorsionRange>
pl.poznan.put.torsion.range.TorsionRange
All Implemented Interfaces:
Serializable, Comparable<TorsionRange>, java.lang.constant.Constable, Range

public enum TorsionRange extends Enum<TorsionRange> implements Range
A default torsion angle range as defined in Saenger's "Principles...".
  • Enum Constant Details

    • SYN_CIS

      public static final TorsionRange SYN_CIS
    • ANTI_TRANS

      public static final TorsionRange ANTI_TRANS
    • SYNCLINAL_GAUCHE_PLUS

      public static final TorsionRange SYNCLINAL_GAUCHE_PLUS
    • SYNCLINAL_GAUCHE_MINUS

      public static final TorsionRange SYNCLINAL_GAUCHE_MINUS
    • ANTICLINAL_PLUS

      public static final TorsionRange ANTICLINAL_PLUS
    • ANTICLINAL_MINUS

      public static final TorsionRange ANTICLINAL_MINUS
    • INVALID

      public static final TorsionRange INVALID
  • Method Details

    • values

      public static TorsionRange[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TorsionRange valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • rangeProvider

      public static RangeProvider rangeProvider()
      Returns:
      An instance of RangeProvider which will provide this ranges for angle values.
    • displayName

      public String displayName()
      Specified by:
      displayName in interface Range
      Returns:
      The name of this torsion angle range.
    • begin

      public Angle begin()
      Specified by:
      begin in interface Range
      Returns:
      The beginning value of the range.
    • end

      public Angle end()
      Specified by:
      end in interface Range
      Returns:
      The ending value of the range.
    • compare

      public RangeDifference compare(Range other)
      Calculate difference between two angle ranges. It will be either 0 (equal), 1 (neighbour), 2 (next to neighbour) or 3 (opposite). Because each range is exactly 60 degree wide, then difference between beginnings is also always a multiple of 60.
      Specified by:
      compare in interface Range
      Parameters:
      other - An object to compare to.
      Returns:
      RangeDifference object.