class

Chem::Chain

Inherits Chem::ResidueCollection / Chem::AtomCollection / Reference / Object

Constructors

new(top : Topology, id : Char)
Source

Instance methods

<=>(rhs : self) : Int32

The comparison operator.

Returns -1, 0 or 1 depending on whether self precedes rhs, equals to rhs or comes after rhs. The comparison is done based on chain identifier.

chains = Structure.read(&quot;peptide.pdb&quot;).chains

chains[0] &lt;=&gt; chains[1] # =&gt; -1
chains[1] &lt;=&gt; chains[1] # =&gt; 0
chains[2] &lt;=&gt; chains[1] # =&gt; 1
Source
[](number : Int32, insertion_code : Char | Nil = nil) : Residue
Source
[]?(number : Int32, insertion_code : Char | Nil = nil) : Residue | Nil
Source
clear
Source
delete(residue : Residue) : Residue | Nil
Source
dig(number : Int32, insertion_code : Char | Nil) : Residue
Source
dig(number : Int32, insertion_code : Char | Nil, *subindexes)
Source
dig(number : Int32) : Residue
Source
dig(number : Int32, *subindexes)
Source
dig?(number : Int32, insertion_code : Char | Nil) : Residue | Nil
Source
dig?(number : Int32, insertion_code : Char | Nil, *subindexes)
Source
dig?(number : Int32) : Residue | Nil
Source
dig?(number : Int32, *subindexes)
Source
each_atom
Source
each_atom
Source
each_residue
Source
each_residue
Source
n_atoms
Source
n_residues
Source
polymer?
Source
renumber_residues_by

Renumber residues based on the order by the output value of the block.

Source
renumber_residues_by_connectivity

Renumber residues based on bond information. Residue ordering is computed based on the link bond if available.

Source
reset_cache
Source
spec(io : IO) : Nil

Writes the chain specification to the given IO.

Chain specification is a short string representation encoding chain information including the id.

Source
spec

Returns the chain specification.

Chain specification is a short string representation encoding chain information including the id.

Source
structure(*args, **options)
Source
structure(*args, **options, &)
Source
to_s(io : IO)

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new(&quot;John&quot;, 32).to_s # =&gt; #&lt;Person:0x10a199f20&gt;
Source