enum Chem::Protein::SecondaryStructure

Defined in:

chem/protein/secondary_structure.cr

Enum Members

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

Class Method Summary

Instance Method Summary

Constructor Detail

def self.[](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

[View source]

Class Method Detail

def self.[]?(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

[View source]

Instance Method Detail

def bend? #

[View source]
def beta_bridge? #

[View source]
def beta_strand? #

[View source]
def code : Char #

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

[View source]
def color : Colorize::ColorRGB #

[View source]
def 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

[View source]
def handedness : Symbol | Nil #

[View source]
def helix3_10? #

[View source]
def helix_alpha? #

[View source]
def helix_gamma? #

[View source]
def helix_pi? #

[View source]
def left_handed_helix3_10? #

[View source]
def left_handed_helix_alpha? #

[View source]
def left_handed_helix_gamma? #

[View source]
def left_handed_helix_pi? #

[View source]
def min_size : Int32 #

Returns nominal secondary structure's minimum size.


[View source]
def none? #

[View source]
def polyproline? #

[View source]
def regular? : Bool #

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

[View source]
def right_handed_helix3_10? #

[View source]
def right_handed_helix_alpha? #

[View source]
def right_handed_helix_gamma? #

[View source]
def right_handed_helix_pi? #

[View source]
def turn? #

[View source]

Returns secondary structure type.

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

[View source]