How joseph-ellaway/ramachandran_plotter works
Project type and purpose
• This is an open-source, command-line Python tool for calculating dihedral (phi/psi) angles from PDB files and rendering Ramachandran plots.
• It reads a user-supplied PDB, computes angles, overlays them on a high-resolution background (Top8000 dataset), and outputs PNG/SVG/PDF figures and (optionally) a CSV of angles.
File structure
• Top level:
• DihedralCalculator.py – logic to compute phi/psi angles
• PlotterFunctions.py – routines to build contour backgrounds and scatter plots
• RamaArgumentParser.py – CLI argument parsing and validation
• RamachandranPlotter.py – orchestrator/main script
• Top8000_DihedralAngles.csv.gz – reference data for background contours
• example_data/ – sample PDB input
• example_plot/ – sample output images
• Ramachandran_Plotter.ipynb – exploratory notebook
• Support:
• __pycache__ for compiled bytecode
• .github for issue templates
• LICENSE, README
README for additional insights
• Workflow: parse arguments → load PDB via Biopython → calculate dihedrals → optionally save CSV → generate background contours (Pandas, SciPy) → scatter data points (Matplotlib, OpenCV) → write plot.
• External dependencies: Numpy, Pandas, Matplotlib, SciPy, OpenCV, Biopython, Argparse, OS.
Detailed coverage
• You capture every script (even the example notebook if relevant).
• Don’t over-complicate—stick to one page showing all major modules, data flows, and external resources.