Silicon-Backbone Ramachandran-Equivalent Dihedral Analysis for Molecular Dynamics Simulations (Karagol-Ramachandran Plots)
The characterisation of conformational space in silicon-backbone polymers via sliding dihedral windows may extend classical Ramachandran analysis beyond protein systems and improve the interpretation of non-biological polymer dynamics.
This repository contains the source code for computing φ/ψ-equivalent dihedral angles along homogeneous silicon backbones from GROMACS molecular dynamics trajectories. It serves as a direct replacement for gmx rama when carbon atoms are substituted by silicon.
Installation
pip install karagol-rama
Usage
Command Line
The CLI mirrors the gmx rama interface:
karagol-rama -s md.tpr -f md.xtc -o rama_out.xvg
This is the direct equivalent of:
gmx rama -s md.tpr -f md.xtc -o rama_md_0_1.xvg
All CLI options
| Flag | Long form | Default | Description |
|---|---|---|---|
-s |
--tpr |
(required) | Topology file (.tpr, .gro, or .pdb) |
-f |
--traj |
(required) | Trajectory file (.xtc, .trr, .dcd, …) |
-o |
--output |
rama_out.xvg |
Output .xvg file (GROMACS-compatible) |
--element |
Si |
Backbone element symbol for automatic selection | |
--selection |
Custom MDAnalysis selection string (overrides --element) |
||
-q |
--quiet |
Suppress all progress messages and summary | |
--no-summary |
Run silently but still print the statistics summary | ||
--version |
Show version and exit |
Examples
Run with default silicon selection:
karagol-rama -s md.tpr -f md.xtc -o rama_out.xvg
Use a different backbone element (e.g. germanium):
karagol-rama -s md.tpr -f md.xtc -o rama_out.xvg --element Ge
Provide a custom atom selection if silicon atoms are not detected automatically:
karagol-rama -s md.tpr -f md.xtc -o rama_out.xvg --selection "resname POL and name Si*"
Run quietly with no terminal output:
karagol-rama -s md.tpr -f md.xtc -o rama_out.xvg -q
Python API
You can also use karagol-rama directly in Python scripts or Colab/Jupyter notebooks.
One-shot run
from karagol_rama import KaragolRama
KaragolRama(
tpr_file="md.tpr",
traj_file="md.xtc",
output_file="rama_out.xvg",
element="Si",
).run_all()
Step-by-step
from karagol_rama import KaragolRama
analyser = KaragolRama(
tpr_file="md.tpr",
traj_file="md.xtc",
output_file="rama_out.xvg",
element="Si",
)
analyser.load() # load topology & trajectory
analyser.run() # compute phi/psi dihedrals
analyser.save() # write .xvg file
analyser.summary() # print statistics
Custom selection
analyser = KaragolRama(
tpr_file="md.tpr",
traj_file="md.xtc",
output_file="rama_out.xvg",
selection="resname POL and name Si*",
)
analyser.run_all()
Plotting the output
import numpy as np
import matplotlib.pyplot as plt
data = np.loadtxt("rama_out.xvg", comments=["#", "@"])
plt.figure(figsize=(6, 6))
plt.scatter(data[:, 0], data[:, 1], s=1, alpha=0.3, color="steelblue")
plt.xlabel("Phi (degrees)")
plt.ylabel("Psi (degrees)")
plt.title("Karagol-Ramachandran Plot – Silicon Backbone")
plt.xlim(-180, 180)
plt.ylim(-180, 180)
plt.tight_layout()
plt.show()
Requirements
- Python ≥ 3.8
- MDAnalysis ≥ 2.0.0
- NumPy ≥ 1.20.0
pip install MDAnalysis numpy
Citation
If you use this package in your research, please cite the MDAnalysis library:
- Gowers, R. J. et al. MDAnalysis: A Python Package for the Rapid Analysis of Molecular Dynamics Simulations. Proceedings of the 15th Python in Science Conference (2016).
- Michaud-Agrawal, N. et al. MDAnalysis: A toolkit for the analysis of molecular dynamics simulations. J. Comput. Chem. 32, 2319–2327 (2011).
License
This project is licensed under the MIT License — see the LICENSE file for details.
Metadata
Release files for karagol-rama 0.9.1
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 |
|---|---|---|---|---|
| karagol_rama-0.9.1.tar.gz | 8.3 kB | Without provenance | Details for karagol_rama-0.9.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| karagol_rama-0.9.1-py3-none-any.whl | Python 3 | none | any | Details for karagol_rama-0.9.1-py3-none-any.whl |
Total release size: 17.5 kB
Release files / karagol_rama-0.9.1.tar.gz
| Download URL | karagol_rama-0.9.1.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e271313541d55312034523dbd1d41eb482a1099c10e08ff30ab4bb0f6acca591
|
|
BLAKE2b-256 checksum How to use checksums |
85c20d645751e0c93fddb7a171075214f6f846c66254bab630d8069b2d94c644
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / karagol_rama-0.9.1-py3-none-any.whl
| Download URL | karagol_rama-0.9.1-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0bdc609ea4b79e2239cf1f0e15747bb297eba2818b380ca740057bd8a574337d
|
|
BLAKE2b-256 checksum How to use checksums |
739e74eb154448310620e5c8526f59f48f158fcff8e832591a76d8901bcfaf73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for karagol-rama 0.9.1
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.