Chem::Templates::Residue
Inherits Reference / Object
Constructors
Creates a new residue template from an existing residue.
Every atom and bond is converted to a template, which are then passed down to the constructor along with the optional arguments. Information such as name, code, etc. is obtained from the residue.
If link_bond is nil, it will be obtained from the associated
residue template if exists. Otherwise, it will be guessed from the
connectivity. If the residue is connected to two other residues by
equivalent bonds, one of them will be chosen. The sense of the link
bond will be infered from the residue numbering.
Raises Error if there is missing connectivity (no bonds).
Instance methods
Returns the bond template between the given atoms. Raises KeyError
if the bond does not exist.
Returns the bond template between the given atoms. Raises KeyError
if the bond does not exist.
Returns the bond template between the given atoms if exists, else
nil.
Returns the bond template between the given atoms if exists, else
nil.
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("John", 32).to_s # => #<Person:0x10a199f20>