DescriPyTor
Pick the atoms that matter and extract descriptors you can interpret.
DescriPyTor turns quantum-chemistry output (Gaussian, ORCA, xTB) into a feature table that you define atom by atom, and draws every descriptor on the molecule so you can see where a number comes from.
Modeled after the R package MoleculaR (docs).
Structure in, descriptors out.
Contents
- Install
- Five-minute tour
- The two pages
- Command line
- Python API
- Descriptors
- From SMILES on a cluster
- More tools
- Documentation
- Repository layout
Install
Python 3.9 to 3.11 (3.10 is what we test most). A conda environment is the easiest way to get RDKit.
conda create -n descripytor python=3.10 -y
conda activate descripytor
pip install descripytor
descripytor --help
From a clone (to change the code or run the tests):
git clone https://github.com/Milo-group/DescriPyTor.git
cd DescriPyTor
pip install -e ".[dev]"
pytest tests -q
Optional extra, added the same way (pip install "descripytor[engines]", or pip install -e ".[engines]" from a clone):
| Extra | Unlocks |
|---|---|
engines |
mordred, deepchem, ase: extra descriptor engines |
If RDKit fails on pip: conda install -c conda-forge rdkit. numpy<2 is required. Gaussian, ORCA, xTB and Open Babel
are external programs and are not installed by pip.
Five-minute tour
Everything below runs on data that ships with the package.
descripytor visual_extractor
The page opens at http://127.0.0.1:7432 with an example molecule. Use example set points it at the bundled feathers; Apply example picks selects the atoms; Extract CSV computes the table for every molecule in the folder.
The same without a browser:
descripytor logs_to_feather # Gaussian .log -> .feather (asks for the folder)
descripytor extractor -i input.json -o features -f feathers/ # the feature table
The two pages
Each page is one command, opens in the browser, and links to the other in its header. Both draw molecules with the same engine, the feature explorer, so a descriptor looks the same wherever you meet it.
| Page | Command | What it is for |
|---|---|---|
| Visual extractor | descripytor visual_extractor |
pick atoms, extract the feature table for a folder |
| Feature explorer | descripytor feature_explorer |
see any descriptor on the molecule, compare structures, make figures |
1. Visual extractor
descripytor visual_extractor # http://127.0.0.1:7432/visual
descripytor visual_extractor --port 8000 --no-browser
Load a .xyz or .feather (or drop it on the molecule), choose a descriptor field on the right, and click its atoms
in the figure. Pairs and triplets commit by themselves. Every selection is drawn as you make it: a Sterimol axis with
B1, B5, L and θ, the dipole in the frame you chose, a buried-volume sphere, and lengths, angles
and dihedrals with their values. Atom numbers are 1-based, as in Gaussian.
Pick a field, click atoms, see the construction and its value.
- Extract CSV runs the picks on every
.featherin the folder; Download CSV saves the table. - Save picks writes the input file that
descripytor extractorreplays on another set. - Check numbering confirms the picked atoms are the same element in every file.
- Further down the page: a conformer viewer that overlays an ensemble with RMSD, and a vibration-mode player.
- Tutorial (top right) is a short walkthrough.
2. Feature explorer
descripytor feature_explorer # http://127.0.0.1:7432/feature_explorer
descripytor feature_explorer --mol FL_lig_13 --preset "theta construction"
Every construction on the molecule itself: the Sterimol axis, the B1 plane and its scan, loc B5, θ, cone angle, %Vbur, dipole frames, charges as sites or as a map, lengths and angles. Stack and superpose several structures, each with its own descriptors; lay panels out on a sheet; export SVG or PNG. The numbers are computed in the page by a line-for-line port of the Python, checked against it on every pick when the server is running.
The θ construction on a built-in structure.
Left: stacked structures. Right: the B1 scan around the axis.
Open your own .xyz, .sdf, .feather or Gaussian .log with the file button; a feather or log brings the dipole
and the charges. A session (.featurescene.json) or an exported SVG reopens exactly as it was. Manual with every
control: docs/FEATURE_EXPLORER.md. Until October 2026 this page was called the Sterimol
theta explorer; descripytor theta and /theta still work.
Drawing molecules loads RDKit.js and fonts from the web, so the pages need an internet connection the first time
they open.
Command line
descripytor <command> [options] descripytor --help descripytor <command> --help
Pages
visual_extractor pick atoms on a molecule, extract descriptors for a folder (alias: visual)
feature_explorer draw any descriptor on the molecule (alias: theta)
Batch
extractor descriptors for a folder of .feather files, from an input file of atom choices
pipeline SMILES -> structures -> chained cluster stages (GOAT / UMA / xTB / ORCA / Gaussian)
Converters (they ask for their inputs)
logs_to_feather Gaussian .log files -> .feather
sterimol Sterimol from .xyz files
cube Sterimol from Gaussian cube files
| Command | Options |
|---|---|
visual_extractor |
--port (7432), --host, --no-browser |
feature_explorer |
--mol NAME, --preset NAME, --port, --host, --no-browser |
extractor |
-i input.json, -o output_name, -f feather_dir |
pipeline |
{build,adopt,submit,status,retry,reset,watch,fetch} protocol.json and its flags (docs/PIPELINE.md) |
Example:
# descriptors for the bundled benzenes, from the bundled atom choices (paths of a clone of this repository;
# after pip install, use your own input file and feather folder)
descripytor extractor -i descripytor/examples/feather_example/input_example.json \
-o feature_set -f descripytor/examples/feather_example
Python API
Extract a feature table on the bundled set of 18 substrates:
from M2_data_extractor.data_extractor import Molecules
from descripytor.examples import baptiste_example_dir
folder = baptiste_example_dir()
mols = Molecules(str(folder)) # every .feather in the folder
features = mols.get_molecules_features_set({
"Dipole": "23,24,25,26,27,28,23,1", # origin atoms (ring centroid), y-axis atom, plane atom
"Charges": "8,1",
"Charge difference": "8,3 8,1 3,1",
"Sterimol": "1,23 1,3",
"Bond length": "1,2 1,23 1,3 3,8",
"Bond angle": "23,1,3 23,1,2,3", # three atoms: angle; four: dihedral
})
features.to_csv("features.csv")
One molecule, one descriptor at a time:
mol = mols.molecules[0]
mol.get_sterimol([1, 23]) # B1, B5, L, loc_B1, loc_B5, B1_B5_angle (theta), ...
mol.get_dipole_gaussian_df([[23, 24, 25, 26, 27, 28], 23, 1])
mol.get_charge_df([8, 1]) # every charge type in the file
mol.get_bond_angle([[23, 1, 3], [23, 1, 2, 3]])
mol.get_stretch_vibration([1, 2]) # the pair must be bonded
mol.get_ring_vibrations([23]) # one ring atom; ortho / meta / para are found
mols.get_sterimol_dict([[1, 23], [1, 3]]) # the same for every molecule, as one table
Metal complexes, from a single structure or a conformer ensemble (docs/METAL_COMPLEX.md):
from M2_data_extractor.metal_complex import MetalComplex, MetalComplexEnsemble
geo = MetalComplex.from_xyz("026_lig_CuCl.xyz").geometric_features()
# fromM_* : Sterimol read from the metal; sub_* : from the stereocentre; bite, M-D distances, %Vbur, ...
ens = MetalComplexEnsemble.from_xyz("081_lig.finalensemble.xyz").geometric_features() # Boltzmann-averaged
Class reference: M2_data_extractor/README.md.
Descriptors
Most descriptor packages return thousands of columns. DescriPyTor asks which atoms matter and returns a few descriptors you already understand, each read in a frame you define.
Trim by symmetry, align to a shared frame, pick the descriptors that mean something.
| Family | What you give it | What you get |
|---|---|---|
| Sterimol | [origin, attached] atom pair |
L, B1, B5, where along the axis they sit (loc_B1, loc_B5), and θ, the angle between B1 and B5 |
| Cube Sterimol | a density .cube file |
Sterimol from the electron density instead of tabulated radii |
| Charges | single atoms | NBO / Hirshfeld / CM5 values per atom |
| Charge difference | atom pair [a, b] |
q_a − q_b, per charge scheme |
| Dipole | [origin(s), y-axis, xy-plane] |
dipole components in your frame, and the total |
| Bond length / angle | pairs, triads or quartets | distances, angles, dihedrals |
| Stretching vibration | a bonded pair | frequency and amplitude of the mode along that bond |
| Bending vibration | two atoms sharing a centre | frequency and amplitude of the bending mode |
| Ring vibration | one ring atom | cross / para frequencies and angles of the ring |
| Buried volume, cone angle, SASA, dispersion | metal or apex atom | via morfeus |
| Metal complex | complex XYZ, optional xTB output | fromM_*, sub_*, %Vbur, charges, bond orders, graph indices |
A common frame. Every molecule is rotated onto the same origin and axes, so "the dipole along y" means the same thing in every row. You pick three groups: the origin is their centroid, ŷ points at the y-atom, and x̂ is the plane atom with its ŷ part removed.
Sterimol. L runs along the chosen bond; B5 is the furthest reach from the axis; B1 is the smallest width,
found by turning a tangent line all the way round the group.
Vibrations. Each normal mode is scored by how much of its motion lies on the atoms you named; the best score inside a frequency window is taken. Keep the window tight, or a C–H stretch can beat your carbonyl.
What to decide and check at each step of an extraction: docs/EXTRACTION_PROTOCOL.md.
From SMILES on a cluster
descripytor pipeline takes a table of SMILES to numbered structures and chains conformer search and
quantum-chemistry stages (GOAT, UMA, xTB, ORCA, Gaussian) on an SGE cluster, one action at a time:
descripytor pipeline build protocol.json # SMILES -> numbered xyz
descripytor pipeline submit protocol.json --dry-run
descripytor pipeline status protocol.json
descripytor pipeline fetch protocol.json
Protocol format and every flag: docs/PIPELINE.md.
More tools
- Other descriptor engines in one pass (RDKit, Mordred, DeepChem, morfeus, AQME/xTB), merged into one CSV: descriptor_extraction_toolkit/README.md.
Documentation
| QUICKSTART.md | one page: install and first run |
| docs/WORKFLOW.md | logs → features, with every option |
| docs/EXTRACTION_PROTOCOL.md | what to decide and check at each step of an extraction |
| docs/FEATURE_EXPLORER.md | the feature explorer, control by control, with screenshots |
| docs/METAL_COMPLEX.md | descriptors of metal complexes from GOAT / xTB output |
| docs/PIPELINE.md | the cluster pipeline |
| Getting_started_with_examples/ | notebooks for extraction, example data |
| CHANGELOG.md | what changed, release by release |
Bundled data: 10 substituted benzenes (descripytor.examples.feather_example_dir()), 18 substrates with measured
outputs (descripytor.examples.baptiste_example_dir()), and density cubes for cube Sterimol.
Repository layout
descripytor/ the installable package: the command line, examples
M1_pre_calculations/ structures and calculation inputs; pipeline/ (the cluster pipeline)
M2_data_extractor/ descriptor extraction: Molecules, Molecule, MetalComplex
atom_picker.html the visual extractor's page, served by gui_server.py
feature_explorer/ the feature explorer: sources, build.py, and the gates that check it against the Python
utils/ shared file handling, geometry, visualization
Getting_started_with_examples/ notebooks, example data, the multi-engine toolkit
docs/ manuals, images, animations
tests/ pytest suite and its data
Atom indices are 1-based everywhere, matching Gaussian.
License
MIT. See LICENSE.
Metadata
Release files for descripytor 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| descripytor-0.5.0.tar.gz | 4.7 MB | Without provenance | Details for descripytor-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| descripytor-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for descripytor-0.5.0-py3-none-any.whl |
Total release size: 9.5 MB
Release files / descripytor-0.5.0.tar.gz
| Download URL | descripytor-0.5.0.tar.gz |
|---|---|
| Size | 4.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4095d65e627521852544798359dd1c1460dfbc80755b53a6e608989dadf3b20
|
|
BLAKE2b-256 checksum How to use checksums |
8ab0ee73a4055ab97ed1c9b67cb770a2db83b39894543b5f96b8308394141306
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|
Release files / descripytor-0.5.0-py3-none-any.whl
| Download URL | descripytor-0.5.0-py3-none-any.whl |
|---|---|
| Size | 4.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fdb3f1dfa5cab2f1703e5e35b4b6eeca094731813635320f0532a284782457f8
|
|
BLAKE2b-256 checksum How to use checksums |
2f93377ab7d784a245d5c51b3eb3df2fac0282998b6823ca2ce8eeeddea350a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.20
|
Security for descripytor 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.