Skip to content

Instantly share code, notes, and snippets.

View Dialpuri's full-sized avatar

Jordan Dialpuri Dialpuri

View GitHub Profile
#!/usr/bin/env python3
"""
Precompute a conformation-density grid from a Cremer-Pople parameters CSV and
write it to a compact binary file that can be loaded in microseconds.
Usage:
python precompute_density.py <input.csv> <output.bin> [lat=128] [lon=128]
Binary format (all little-endian):
8 bytes magic "CPDENS\\x00\\x00"
@Dialpuri
Dialpuri / qscore.py
Created October 25, 2024 09:08
Q Score calculation with Gemmi
"""
Q Score with Gemmi
Author: Jordan Dialpuri
Date: October 2024
An implementation of the method described by Pintilie et al.:
Pintilie, G., Zhang, K., Su, Z. et al.
Measurement of atom resolvability in cryo-EM maps with Q-scores.
Nat Methods 17, 328–334 (2020).
@Dialpuri
Dialpuri / create_glossary.py
Last active October 17, 2024 08:24
Create a LaTeX Glossary from a tex file which contains \textit{WORD} for emphasis
"""
Create a LaTeX Glossary from a tex file which contains \textit{WORD} for emphasis
Jordan Dialpuri 2024
"""
import argparse
import re
from typing import List