Prism Pruner
Project description
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.
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.
Credits
This package was created with Cookiecutter and the jevandezande/pixi-cookiecutter project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prism_pruner-0.0.9.tar.gz.
File metadata
- Download URL: prism_pruner-0.0.9.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ad2d9855dfc212650b35c67af0895424e13106ee69c4f4b847d5a58068dfdf0
|
|
| MD5 |
de1bae4164851bb796af6fcfe458a940
|
|
| BLAKE2b-256 |
7961ab30d6cbb1a65457b5636584561c5b533bf7828a1fc63b31165ce0fe79b0
|
File details
Details for the file prism_pruner-0.0.9-py3-none-any.whl.
File metadata
- Download URL: prism_pruner-0.0.9-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b12cb4b0737d26ec6bd786fdc1879f9e9ff575ed9f89fcfcc0dda43133546cdb
|
|
| MD5 |
58ee4a2e41a0ee15d62782c2f277db64
|
|
| BLAKE2b-256 |
d1efdfb7e7b54e7b15767f0540f3351bdf46a41c1b0a89b59674c3d1be097134
|