Skip to content

Atom


bigsmiles.data_structures.bigsmiles.Atom(id_, symbol, isotope=None, stereo=None, hydrogens=None, charge=0, valence=None, class_=None, parent=None, **kwargs)

this class represents an atom

ATTRIBUTE DESCRIPTION
id_

id of atom (id is limited to atoms). Range: [1, inf]

TYPE: int

symbol

symbol symbol (e.g., H, C, O, Zn)

TYPE: str

isotope

isotope (e.g., [13C])

TYPE: int | None

stereo

stereochemistry [None, "@", "@@"] (None means not defined)

TYPE: str | None

hydrogens

number of explict hydrogens (e.g., [CH2])

TYPE: int | None

charge

symbol charge (e.g., [Fe+3])

TYPE: int

valence

The capacity to form bonds with other atoms

TYPE: int

class_

index of class (e.g., [C:1] class_ = 1)

TYPE: int | None

parent

the owner of the atom

TYPE: BigSMILES | Branch | StochasticFragment | None

kwargs

any additional keyword arguments are accepted and set as additional attributes

bond_capacity: float property

total capacity of the atom account for charge

bonds: list[Bond] property writable

list of bonds (excludes implicit hydrogens)

bonds_available: float property

number bonds that remain open for bonding

details: str property

long string representation

full_valence: bool property

returns true if the atom valence is full

implicit_hydrogens: float property

number of implicit hydrogens. (zero if explict hydrogens have been specified)

number_of_bonds: float property

number of bonds already formed (not including implicit hydrogens; but including explicit hydrogens)

ring_indexes: list[int] property

list of ring index

root: BigSMILES property

the owner at the top of the parent tree

__eq__(other)

equality is based on the following parameters:

  • id_
  • symbol
  • isotope
  • stereo
  • hydrogens
  • charge
  • valence
  • aromatic
  • bonds ~ bond.id_

delete_bond(delete_bond)

delete bond or bonds

PARAMETER DESCRIPTION
delete_bond

TYPE: Bond | list[Bond]