This is a set of informal tools for internal use. We make no guarantees of versioning, functionality, or support.
This package provides tools for analyzing and determining the oxidation state of transition metal complexes from molecular representations. The core functionality is provided by the sanitize_complex function, which processes a molecular structure and outputs a sanitized version suitable for oxidation state assignment.
Key utilities are available in the tmos/utils directory, others include:
mol_to_smiles: Converts molecular objects to SMILES strings for easy representation and interoperability.mol_from_smiles: Generates molecular objects from SMILES strings, enabling flexible input formats.
As RDKit Molecule class instances of transition metal complexes must be handled carefully.
Together, these tools enable automated, reproducible workflows for transition metal chemistry analysis.
Python ≥ 3.10 is required. Core dependencies (rdkit, openbabel, networkx, qcelemental, periodictable, numpy, loguru) are declared in pyproject.toml and installed automatically by pip.
Note:
rdkitandopenbabelhave compiled C/C++ extensions. Installing via conda/mamba is strongly recommended to avoid build issues. Pure-pipinstalls may work on some platforms but are not guaranteed.
Clone the repository and create the bundled environment (includes all optional dependencies):
git clone https://github.com/openforcefield/tmos
cd tmos
micromamba env create -f requirements.yaml # or: conda env create -f requirements.yaml
micromamba activate tmos # or: conda activate tmos
pip install -e .git clone https://github.com/openforcefield/tmos
cd tmos
pip install .Add -e for an editable / development install.
Several features require extra packages that are not installed by default:
| Feature | Extra | Install command |
|---|---|---|
| Geometry (pymatgen, posym) | geometry |
pip install "tmos[geometry]" |
| 3-D visualization (py3Dmol) | viz |
pip install "tmos[viz]" |
| Documentation build | docs |
pip install "tmos[docs]" |
| Tests | test |
pip install "tmos[test]" |
Install multiple extras at once: pip install "tmos[geometry,viz,test]".
rylm is required for geometry mode="rylm" and is not on PyPI. Install it directly from GitHub:
pip install git+https://github.com/chrisiacovella/rylm.gitIf an optional dependency is absent, the relevant function raises a clear ImportError with the exact install command.
pip install "tmos[geometry,viz,test]"
pip install git+https://github.com/chrisiacovella/rylm.git
pre-commit installCopyright (c) 2025, Jennifer A Clark
Project based on the Computational Molecular Science Python Cookiecutter version 1.10.