Karagol-Ramachandran plots: Silicon-backbone Ramachandran-equivalent dihedral analysis for MD simulations
Project description
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.
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 karagol_rama-0.9.1.tar.gz.
File metadata
- Download URL: karagol_rama-0.9.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e271313541d55312034523dbd1d41eb482a1099c10e08ff30ab4bb0f6acca591
|
|
| MD5 |
4b6e25750ac8989e2a469f0eca2d27d0
|
|
| BLAKE2b-256 |
85c20d645751e0c93fddb7a171075214f6f846c66254bab630d8069b2d94c644
|
File details
Details for the file karagol_rama-0.9.1-py3-none-any.whl.
File metadata
- Download URL: karagol_rama-0.9.1-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bdc609ea4b79e2239cf1f0e15747bb297eba2818b380ca740057bd8a574337d
|
|
| MD5 |
5e698183a1dc789470a5ddcf6ca864c1
|
|
| BLAKE2b-256 |
739e74eb154448310620e5c8526f59f48f158fcff8e832591a76d8901bcfaf73
|