rdtools.atom#

A module contains functions to manipulate atoms in a molecule.

rdtools.atom.clear_rxn_prop(atom: Atom) None#

Clean up the atom props created by reaction conversion.

rdtools.atom.decrement_radical(atom: Atom) None#

Decrement the number of radical electrons on an atom by one.

Parameters:

atom (Chem.Atom) – The atom whose radical count is to be decremented.

Raises:

ValueError – If the radical count is already zero.

rdtools.atom.get_atom_mass(atom: Atom) float#

Get the mass of an atom given its atomic number.

Parameters:

atom (Chem.Atom) – The atom whose mass is to be returned.

Returns:

float – The mass of the atom.

rdtools.atom.get_electronegativity(atom: Atom) float#

Get the electronegativity of an atom.

Currently, only supports atom 1-35 and 53, others will return 1.0.

Parameters:

atom (Chem.Atom) – The atom whose electronegativity is to be returned.

Returns:

float – The electronegativity of the atom.

rdtools.atom.get_element_symbol(atom: Atom) str#

Get the element symbol of an atom.

Parameters:

atom (Chem.Atom) – The atom whose symbol is to be returned.

Returns:

str – The symbol of the atom.

rdtools.atom.get_lone_pair(atom: Atom) int#

Get the number of lone pairs on an atom.

Parameters:

atom (Chem.Atom) – The atom whose lone pair is to be returned.

Returns:

int – The number of lone pairs on the atom.

rdtools.atom.get_n_outer_electrons(atom: Atom) int#

Get the number of outer electrons of an atom.

Parameters:

atom (Chem.Atom) – The atom whose number of outer electrons is to be returned.

Returns:

int – The number of outer electrons of the atom.

rdtools.atom.get_num_occupied_orbitals(atom: Atom) int#

Get the number of occupied orbitals of an atom.

Parameters:

atom (Chem.Atom) – The atom whose number of occupied orbitals is to be returned.

Returns:

int – The number of occupied orbitals on the atom.

rdtools.atom.get_total_bond_order(atom: Atom) float#

Get the total bond order of an atom.

Parameters:

atom (Chem.Atom) – The atom whose total bond order is to be returned.

Returns:

float – The total bond order of the atom.

rdtools.atom.has_empty_orbitals(atom: Atom) bool#

Determine whether an atom has empty orbitals.

Parameters:

atom (Chem.Atom) – The atom to be checked.

Returns:

boolTrue if the atom has empty orbitals, False otherwise.

rdtools.atom.increment_radical(atom: Atom) None#

Increment the number of radical electrons on an atom by one.

It will increase the number of radical electrons by 1 despite whether valid. The cleaning step should be done later to ensure the validity of the molecule.

Parameters:

atom (Chem.Atom) – The atom whose radical count is to be incremented.