enum

Chem::Protein::SecondaryStructure

Inherits Enum / Comparable / Value / Object

Constants

Bend = 0
BetaBridge = 1
BetaStrand = 2
LeftHandedHelix3_10 = 3
LeftHandedHelixAlpha = 4
LeftHandedHelixGamma = 5
LeftHandedHelixPi = 6
None = 7
Polyproline = 8
RightHandedHelix3_10 = 9
RightHandedHelixAlpha = 10
RightHandedHelixGamma = 11
RightHandedHelixPi = 12
Turn = 13

Constructors

[](code : Char) : self

Returns the secondary structure by one-letter code.

Raises IndexError if code is invalid. See #code for a list of codes.

SecondaryStructure['H'] # => SecondaryStructure::RightHandedHelixAlpha
SecondaryStructure['h'] # => SecondaryStructure::LeftHandedHelixAlpha
SecondaryStructure['E'] # => SecondaryStructure::BetaStrand
SecondaryStructure['e'] # => SecondaryStructure::BetaStrand
SecondaryStructure['X'] # raises IndexError
Source

Class methods

[]?(code : Char) : self | Nil

Returns the secondary structure by one-letter code.

Returns nil if code is invalid. See #code for a list of codes.

SecondaryStructure['H']? # => SecondaryStructure::RightHandedHelixAlpha
SecondaryStructure['h']? # => SecondaryStructure::LeftHandedHelixAlpha
SecondaryStructure['E']? # => SecondaryStructure::BetaStrand
SecondaryStructure['e']? # => SecondaryStructure::BetaStrand
SecondaryStructure['X']? # => nil
Source

Instance methods

bend?

Returns true if this enum value equals Bend

Source
beta_bridge?

Returns true if this enum value equals BetaBridge

Source
beta_strand?

Returns true if this enum value equals BetaStrand

Source
code

Returns one-letter secondary structure code.

Codes are a superset of those defined by DSSP:

  • 'I' : Right-handed π-helix (5-turn)
  • 'H' : Right-handed α-helix (4-turn)
  • 'G' : Right-handed 3₁₀-helix (3-turn)
  • 'F' : Right-handed 2.2₇ (2-turn)
  • 'i' : Left-handed π-helix (5-turn)
  • 'h' : Left-handed α-helix (4-turn)
  • 'g' : Left-handed 3₁₀-helix (3-turn)
  • 'f' : Left-handed 2.2₇ (2-turn)
  • 'P' : Polyproline
  • 'E' : β-strand
  • 'B' : β-bridge
  • 'T' : Turn
  • 'S' : Bend
  • '0' : None
Source
color
Source
equals?(rhs : self, strict : Bool = true, handedness : Bool = true) : Bool

Returns true if secondary structures are equal.

If strict is true, secondary structures are compared by their identity, otherwise they're compared by their computed type.

SecondaryStructure::RightHandedHelixAlpha.equals?(:right_handed_helix_alpha) # => true
SecondaryStructure::RightHandedHelixAlpha.equals?(:right_handed_helix_pi)    # => false
SecondaryStructure::RightHandedHelixAlpha.equals?(:left_handed_helix_alpha)  # => false
SecondaryStructure::BetaStrand.equals?(:polyproline)                         # => true
SecondaryStructure::BetaStrand.equals?(:bend)                                # => false

SecondaryStructure::RightHandedHelixAlpha.equals?(:right_handed_helix_pi, strict: false) # => true
SecondaryStructure::BetaStrand.equals?(:polyproline, strict: false)                      # => true
SecondaryStructure::BetaStrand.equals?(:bend, strict: false)                             # => false
Source
handedness
Source
helix3_10?
Source
helix_alpha?
Source
helix_gamma?
Source
helix_pi?
Source
left_handed_helix3_10?

Returns true if this enum value equals LeftHandedHelix3_10

Source
left_handed_helix_alpha?

Returns true if this enum value equals LeftHandedHelixAlpha

Source
left_handed_helix_gamma?

Returns true if this enum value equals LeftHandedHelixGamma

Source
left_handed_helix_pi?

Returns true if this enum value equals LeftHandedHelixPi

Source
min_size

Returns nominal secondary structure's minimum size.

Source
none?

Returns true if this enum value equals None

Source
polyproline?

Returns true if this enum value equals Polyproline

Source
regular?

Returns true if it's a regular secondary structure, otherwise false.

See also SecondaryStructureType#regular?.

SecondaryStructure::RightHandedHelixAlpha.regular? # => true
SecondaryStructure::LeftHandedHelixAlpha.regular?  # => true
SecondaryStructure::BetaStrand.regular?            # => true
SecondaryStructure::Turn.regular?                  # => false
SecondaryStructure::Bend.regular?                  # => false
Source
right_handed_helix3_10?

Returns true if this enum value equals RightHandedHelix3_10

Source
right_handed_helix_alpha?

Returns true if this enum value equals RightHandedHelixAlpha

Source
right_handed_helix_gamma?

Returns true if this enum value equals RightHandedHelixGamma

Source
right_handed_helix_pi?

Returns true if this enum value equals RightHandedHelixPi

Source
turn?

Returns true if this enum value equals Turn

Source
type

Returns secondary structure type.

SecondaryStructure::RightHandedHelixAlpha.type # => Helical
SecondaryStructure::LeftHandedHelixAlpha.type  # => Helical
SecondaryStructure::BetaStrand.type            # => Extended
SecondaryStructure::Turn.type                  # => Coil
SecondaryStructure::Bend.type                  # => Coil
Source