Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.5%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
📐 Symmetry-corrected RMSD in Python
Basic Info
- Host: GitHub
- Owner: RMeli
- License: mit
- Language: Python
- Default Branch: develop
- Homepage: https://spyrmsd.readthedocs.io
- Size: 787 KB
Statistics
- Stars: 101
- Watchers: 6
- Forks: 9
- Open Issues: 5
- Releases: 23
Topics
Metadata Files
README.md
sPyRMSD
Python tool for symmetry-corrected RMSD calculations.
If you find spyrmsd useful, please consider citing the following paper:
text
@article{spyrmsd2020,
Author = {Meli, Rocco and Biggin, Philip C.},
Journal = {Journal of Cheminformatics},
Number = {1},
Pages = {49},
Title = {spyrmsd: symmetry-corrected RMSD calculations in Python},
Volume = {12},
Year = {2020}
}
Installation
spyrmsd is available on PyPI and conda-forge and can be easily installed from source. See Dependencies for a description of all the dependencies.
[!NOTE]
spyrmsdwill install rustworkx when usingpiporconda. You can install other backends manually.[!WARNING] If
spyrmsdis used as a standalone tool, it is required to install either RDKit or Open Babel. Neither is automatically installed withpipnorconda.
PyPI
bash
pip install spyrmsd
conda
bash
conda install spyrmsd -c conda-forge
GitHub
bash
git clone https://github.com/RMeli/spyrmsd.git
cd spyrmsd
pip install .
Dependencies
spyrmsd can be used both as a module or as a standalone tool.
Module
The following packages are required to use spyrmsd as a module:
One of the following graph libraries is required: * graph-tool * rustworkx * NetworkX
[!NOTE]
spyrmsduses the following priority when multiple graph libraries are present: graph-tool, rustworkx, NetworkX. This order might change. Useset_backendto ensure you are always using the same backend, if needed.
Standalone Tool
Additionally, one of the following packages is required to use spyrmsd as a standalone tool:
Usage
Standalone Tool
spyrmsd provides a convenient CLI tool. See spyrmsd's --help for the usage:
bash
python -m spyrmsd -h
Module
python
from spyrmsd import rmsd
RMSD
The function rmsd.rmsd computes RMSD without symmetry correction. The atoms are expected to be in the same order for both molecules being compared (no atom matching is performed).
python
def rmsd(
coords1: np.ndarray, # Coordinates of molecule 1
coords2: np.ndarray, # Coordinates of molecule 2
aprops1: np.ndarray, # Atomic properties of molecule 1
aprops2: np.ndarray, # Atomic properties of molecule 2
center: bool = False, # Flag to center molecules at origin
minimize: bool = False, # Flag to compute minimum RMSD
atol: float = 1e-9, # Numerical tolerance for QCP method
)
[!NOTE] Atomic properties (
aprops) can be any Python object when using NetworkX and rustworkx, or integers, floats, or strings when using graph-tool.
Symmetry-Corrected RMSD
The function rmsd.symmrmsd computes symmetry-corrected RMSD using molecular graph isomorphisms. Symmetry correction requires molecular adjacency matrices describing the connectivity but needs not the atoms to be in the same order.
Atom matching is performed according to the molecular graph. This function should also be used when atoms in the molecules being compared are not in the same order (even if there is not symmetry to be accounted for).
python
def symmrmsd(
coordsref: np.ndarray, # Reference coordinated
coords: Union[np.ndarray, List[np.ndarray]], # Coordinates (one set or multiple sets)
apropsref: np.ndarray, # Reference atomic properties
aprops: np.ndarray, # Atomic properties
amref: np.ndarray, # Reference adjacency matrix
am: np.ndarray, # Adjacency matrix
center: bool = False, # Flag to center molecules at origin
minimize: bool = False, # Flag to compute minimum RMSD
cache: bool = True, # Cache graph isomorphisms
atol: float = 1e-9, # Numerical tolerance for QCP method
)
[!NOTE] Atomic properties (
aprops) can be any Python object when using NetworkX and rustworkx, or integers, floats, or strings when using graph-tool.
Select Backend
spyrmsd supports the following graph libraries for the calculation of graph isomorphisms:
* graph-tool
* NetworkX
* rustworkx
You can check which backend is being used with
python
spyrmsd.get_backend()
You can also manually select your preferred backend with
```python spyrmsd.set_backend("networkx")
spyrmsd uses NetworkX
spyrmsd.setbackend("graphtool")
spyrmsd uses graph_tool
```
The available backends (which depend on the installed dependencies) are stored in spyrmsd.available_backends.
Development
To ensure code quality and consistency the following tools are used during development:
Pre-commit git hooks can be installed with pre-commit.
Copyright
Copyright (c) 2019-2024, Rocco Meli.
References
References are tracked with duecredit. Run the credits.sh script in order to print up-to-date references.
Acknowledgements
Project based on the Computational Molecular Science Python Cookiecutter version 1.1.
Owner
- Name: Rocco Meli
- Login: RMeli
- Kind: user
- Location: Zurich, Switzerland
- Company: @eth-cscs
- Website: rmeli.github.io
- Twitter: roccomeli
- Repositories: 15
- Profile: https://github.com/RMeli
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Meli"
given-names: "Rocco"
orcid: "https://orcid.org/0000-0002-2845-3410"
- family-names: "Nelen"
given-names: "Jochem"
orcid: "https://orcid.org/0000-0002-9970-4950"
title: "spyrmsd"
version: 0.9.0
doi: 10.5281/zenodo.3631876
date-released: 2021-06-21
url: "https://github.com/RMeli/spyrmsd"
preferred-citation:
type: article
authors:
- family-names: "Meli"
given-names: "Rocco"
orcid: "https://orcid.org/0000-0002-2845-3410"
- family-names: "Biggin"
given-names: "Philip C."
orcid: "https://orcid.org/0000-0001-5100-8836"
doi: "10.1186/s13321-020-00455-2"
journal: "J. Cheminform."
title: "spyrmsd: symmetry-corrected RMSD calculations in Python"
volume: 12
year: 2020
GitHub Events
Total
- Issues event: 1
- Watch event: 17
- Delete event: 2
- Issue comment event: 2
- Push event: 8
- Pull request review comment event: 1
- Pull request review event: 4
- Pull request event: 8
- Fork event: 2
- Create event: 3
Last Year
- Issues event: 1
- Watch event: 17
- Delete event: 2
- Issue comment event: 2
- Push event: 8
- Pull request review comment event: 1
- Pull request review event: 4
- Pull request event: 8
- Fork event: 2
- Create event: 3
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Rocco Meli | r****i@b****h | 512 |
| dependabot[bot] | 4****] | 4 |
| Thomas Kluyver | t****l@g****m | 2 |
| Jochem Nelen | 7****n | 2 |
| Franz Goerlich | 1****3 | 1 |
Committer Domains (Top 20 + Academic)
Packages
- Total packages: 2
-
Total downloads:
- pypi 18,952 last-month
- Total docker downloads: 140
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 7
(may contain duplicates) - Total versions: 25
- Total maintainers: 1
pypi.org: spyrmsd
Python RMSD tool with symmetry correction.
- Homepage: https://spyrmsd.readthedocs.io
- Documentation: https://spyrmsd.readthedocs.io/
- License: MIT License
-
Latest release: 0.9.0
published 10 months ago
Rankings
Maintainers (1)
conda-forge.org: spyrmsd
Symmetry-corrected RMSD
- Homepage: https://github.com/RMeli/spyrmsd
- License: MIT
-
Latest release: 0.5.2
published almost 4 years ago
Rankings
Dependencies
- numpy *
- actions/checkout v3 composite
- actions/setup-python v1 composite
- actions/checkout v3 composite
- actions/setup-python v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pre-commit-ci/lite-action v1.0.1 composite
- pre-commit/action v3.0.0 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- codecov/codecov-action v3 composite
- conda-incubator/setup-miniconda v2 composite