[2] J. Cheminform. 2026, DOI: https://link.springer.com/article/10.1186/s13321-026-01194-6, v2.0.0
[1] J. Chem. Inf. Model. 2024, DOI: https://pubs.acs.org/doi/10.1021/acs.jcim.4c01513#, v1.0.0
Our full documentation: https://torsionangularbinstrings.readthedocs.io/en/
Installation of the dependencies via mamba (conda) using the provided environment.yml file:
mamba env create -n tabs -f environment.yml
If you are only interested in using the basic TABS and nTABS functionality, you can also use the minimal environment file:
mamba env create -n tabs -f minimalEnvironment.yml
To activate the new environment and install tabs:
conda activate tabs
python -m pip install git+https://github.com/rinikerlab/TorsionAngularBinStrings
With version 2 of TABS, major changes in the API were introduced.
from tabs import DihedralInfoFromTorsionLib
from rdkit import Chem
from rdkit.Chem import rdDistGeom
mol = Chem.AddHs(Chem.MolFromSmiles("CCCCC"))
# build DihedralsInfo class object
info = DihedralInfoFromTorsionLib(mol)
# check the matched SMARTS, multiplicities, torsion types
info.smarts, info.multiplicities, info.torsionTypes, info.indices
# get the number of possible TABS (calculation based on the Burnside Lemma)
info.GetnTABS()
# embed molecule, get TABS
rdDistGeom.EmbedMultipleConfs(mol, randomSeed=42, numConfs=10)
infoEnsemble = DihedralInfoFromTorsionLib(mol)
infoEnsemble.GetTABS()
If you want to use the customTABS functionalities to analyze the ensemble observed in a trajectory, a complete walkthrough can be found in Demos/02_CustomTabs.ipynb.
Quickstart:
from rdkit import Chem
from tabs import custom
mol = Chem.RemoveHs(mol)
mol = Chem.AddHs(Chem.MolFromSmiles('COC(=O)c1ccccc1NC(=O)[C@@H]1CCCCC1=O'))
# get the list of dihedrals of interest
# OR define these by hand
info = DihedralInfoFromTorsionLib(mol)
indices = info.indices
# extract the torsion profiles for the identified dihedrals from the trajectory
customProfiles = custom.GetTorsionProfilesFromMDTraj(md.load("your_traj.h5"),indices)
# do the automated fitting to obtain the custom fits and bounds
infoCustom = custom.CustomDihedralInfo(mol, indices, customProfiles, showFits=True)
If you want to contribute, please make sure that all currently provided unittests run and that new unittests are provided for any new functionalities. Run the tests with
pytest
If you want to deseclect the CustomTABS functionalities, run the tests with
pytest -m "not custom"
The complete datasets used in the study can be reproduced by going to Data/TABS and Data/nTABS and running the provided conformer generation scripts as described in the respective READMEs.
The analysis notebooks to reproduce the plots shown in the study can be found in Analysis/.
This program uses software written by other people. We thank all their authors for their contributions.
Jessica Braun (@brje01), Djahan Lamei (@dlamei), Enrico Ruijsenaars, Greg Landrum (@greglandrum)
in development
