rd.max_bond_count()
Get the maximum number of bonds to an atom.
Usage
rd.max_bond_count(
symbol,
*,
max_charge=1,
)Formal charges up to max_charge in magnitude are allowed, with a charged atom taking the valences of its isoelectronic neutral counterpart (as in from_connectivity), e.g. 4 for N (as N+), 3 for O (as O+), and 6 for S.
Parameters
symbol: str-
Atomic symbol.
max_charge: int = 1- Maximum magnitude of the formal charge.
Returns
float-
Maximum bond count, or
valence (e.g. for metals).math.infif RDKit places no limit on the