Skip to content

Bond


bigsmiles.data_structures.bigsmiles.Bond(id_, symbol, atom1, atom2=None, ring_id=None, parent=None, **kwargs)

this class represents a bond

PARAMETER DESCRIPTION
id_

id of bond (id is limited to bonds). Range: [1, inf]

TYPE: int

symbol

bond symbol (e.g. '', '=', '#')

TYPE: str

atom1

atom that the bond starts at

TYPE: Atom | BondDescriptorAtom | StochasticObject

atom2

atom that the bond ends at

TYPE: Atom | BondDescriptorAtom | StochasticObject | None DEFAULT: None

ring_id

if the bond is closing a ring, this is the index for that ring

TYPE: int | None DEFAULT: None

parent

the owner of the bond

TYPE: BigSMILES | Branch | StochasticFragment | None DEFAULT: None

kwargs

any additional keyword arguments are accepted and set as additional attributes

DEFAULT: {}

aromatic: bool property

Limited accuracy

bond_order: int property writable

number of covalent bonds represented

details: str property

long string representation

root: BigSMILES property

the owner at the top of the parent tree

__eq__(other)

equality is based on the following parameters:

  • id_
  • symbol
  • ring_id
  • atom1.id_
  • atom2.id_

__iter__()

iterates over Atoms

delete()

deletes bond and removes it from atoms and root