Prism Pruner
PRISM (Pruning Interface for Similar Molecules) is the modular similarity pruning code originally from FIRECODE, in a polished standalone package. It filters out duplicate structures from conformational ensembles, leaving behind non-redundant states.
The code implements a cached, iterative, divide-and-conquer approach on increasingly large subsets of the ensemble and removes duplicates as assessed by one of three metrics:
- Relative deviation of the moments of inertia on the principal axes
- Heavy-atom RMSD and maximum deviation
- Rotamer-corrected heavy-atom RMSD and maximum deviation
Installation
The package is distributed through PyPI. Installation through uv is recommended.
uv pip install prism_pruner
Usage
The main pruning functions are in prism_pruner.pruning, and a wrapper that chains up to all three is also available. The functions return the pruned ensemble structures and the relative boolean mask.
from prism_pruner.conformer_ensemble import ConformerEnsemble
from prism_pruner.pruner import prune
ensemble = ConformerEnsemble.from_xyz("ensemble.xyz")
ensemble.coords.shape # (1086, 136, 3)
pruned, mask = prune(
ensemble.coords,
ensemble.atoms,
# the third pruning routine can be
# slow and is often not necessary,
# so it's off by default
rot_corr_rmsd_pruning=False,
debugfunction=print,
)
pruned.shape # (387, 136, 3)
mask.shape # (1086,)
# where pruned is ensemble.coords[mask]
For additional performance, it is also possible to read/provide energies to only evaluate the similarity of structures that are energetically close.
For additional usage, see the examples folder.
CLI usage
A simple CLI is also provided:
usage: prism_pruner [-h] [-e] [-t TIMEOUT] inputfile
Will write the pruned ensemble to inputfile_pruned.xyz.
Credits
This package was created with Cookiecutter and the jevandezande/pixi-cookiecutter project template.
Metadata
Release files for prism-pruner 0.1.2
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 |
|---|---|---|---|---|
| prism_pruner-0.1.2.tar.gz | 30.0 kB | Without provenance | Details for prism_pruner-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prism_pruner-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for prism_pruner-0.1.2-py3-none-any.whl |
Total release size: 60.5 kB
Release files / prism_pruner-0.1.2.tar.gz
| Download URL | prism_pruner-0.1.2.tar.gz |
|---|---|
| Size | 30.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7e81a512be61a78c492f20e5bfe9e82fa4aedc653f36ec108afab92178e96f8
|
|
BLAKE2b-256 checksum How to use checksums |
229d660b3e6743a46ccf382d1182e3d93cfc02463d61dae608715ff79dad8655
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / prism_pruner-0.1.2-py3-none-any.whl
| Download URL | prism_pruner-0.1.2-py3-none-any.whl |
|---|---|
| Size | 30.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f859dcde6b2a949d2740068fb426311dbe3c110ab5356a3a924a7c0b645bc6b5
|
|
BLAKE2b-256 checksum How to use checksums |
b8797eb34987fae388ff3447af7b996c120b0058543f952cfd2fdc243b21e8c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for prism-pruner 0.1.2
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.