tmos#

tmos.tmos

Description

Sanitize and generate oxidation state and other properties for transition metal complexes.

This module uses function architectures originally produced in [xyz2mol_tm](jensengroup/xyz2mol_tm). However rather than using the Huckel method an arrow pushing script is produced here with custom checks for ferrocene structures.

Functions

assert_same_ring

Determine whether two atoms are in the same chemical ring

check_ligand_exception

Corrects formal charges and bonds for molecular exceptions.

cleave_mol_from_index

Given an atomic index of an RDKit molecule, cleave the attaching bonds and return the resulting molecules

compare_fingerprint

Compare molecular identity

compute_centroid_excluding

Compute the centroid of a molecule while excluding specified atom indices.

correct_ferrocene

Correct a ferrocene containing molecule to ensure that all hydrogens are included

detect_additional_bonds

Use the coordinates to check if any other bonds could be defined.

determine_bonds

Determine bond orders with OpenBabel, with MDA fallback.

find_metal_index

Find the molecule index for the metal

find_missing_coords

Determine if an RDKit molecule has a relevant geometry

fix_missing_coords

Add coordinates to RDKit molecule with missing coordinates

get_ligand_attributes

Analyze default valence and bonds to determine ligand attributes.

get_tm_attributes

Compute possible oxidation states, formal charges, and electron counts for a transition metal center.

mol_from_smiles

Convert a SMILES string into a RDKit Molecule

mol_to_smiles

Generate SMILES without isomeric information from a RDKit molecule

prepare_complex

Prepare complex removing anomalous substructs, adding additional metal connections, checking for missing coordinates, and possible addition of hydrogens.

reform_metal_complex

Reconnects ligands to a transition metal center to reform a metal complex.

sanitize_complex

Sanitize ligands, determining X-type and L-type, returning a sanitized complex with oxidation state, number of electrons, and metal formal charge.

sanitize_ligand

Delete atoms from a molecule and then redetermine bond orders.

sanitize_molecule

Sanitize TMC molecule by updating formal charges to apparent value based on connectivity and use RDKit sanitization without SANITIZE_SETAROMATICITY or SANITIZE_KEKULIZE.

wipe_molecule

Wipe all bond order and aromatic information from a molecule so that only single bonds remain.