Chem::Bond
Inherits Chem::Connectivity / Comparable / Reference / Object
A Bond provides a canonical representation of a covalent bond
between two atoms.
Constructors
new(atom : Atom, other : Atom, order : BondOrder = :single)
Creates a new Bond with the given atoms and order.
Instance methods
double?(*args, **options)
Sourcedouble?(*args, **options, &)
Sourceinspect(io : IO) : Nil
Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
matches?(bond_t : Templates::Bond) : Bool
Returns true if the bond matches the given template, else
false.
Check considers both atom matching (see Atom#match?) and bond
order.
order
Sourceorder=(order : BondOrder)
Sourceother(atom : Atom) : Atom
Returns the atom bonded to atom. Raises Error if atom is not
included in the bond.
single?(*args, **options)
Sourcesingle?(*args, **options, &)
Sourceto_s(io : IO) : 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>
triple?(*args, **options)
Sourcetriple?(*args, **options, &)
Sourcezero?(*args, **options)
Sourcezero?(*args, **options, &)
Source