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
Class methods
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
Instance methods
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
color
Sourceequals?(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
handedness
Sourcehelix3_10?
Sourcehelix_alpha?
Sourcehelix_gamma?
Sourcehelix_pi?
Sourceregular?
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
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