Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5e8061a
refactor: WIP initial attempt to clean up the script with LLMs
y1zhou Nov 30, 2025
c700025
ci: add pre-commit config
y1zhou Dec 1, 2025
c74d2c1
refactor: clean up main function
y1zhou Dec 1, 2025
649faaa
feat: refactor the file IO section
y1zhou Dec 1, 2025
3321ed9
refactor: WIP of cleaning up the calculate_scores beast
y1zhou Dec 1, 2025
1d8142c
fix(pdockq): fix bug where chain1 residue indices were not included i…
y1zhou Dec 1, 2025
775a33e
test: helper script to compare differences to the original script
y1zhou Dec 1, 2025
6f1ab17
perf: merge pDockQ and pDockQ2 functions to avoid recomputing masks
y1zhou Dec 2, 2025
392d1fb
fix: WIP get per-residue scores calculated correctly
y1zhou Dec 2, 2025
39fffbc
feat: reach parity with the orignal script for all except row orders …
y1zhou Dec 2, 2025
b3bdb67
feat: add cli arg for forcing the input model type and skip guessing
y1zhou Dec 2, 2025
2f365de
test: add example files because the original ones were missing iptm i…
y1zhou Dec 2, 2025
6f8412b
refactor: move per-residue line formatting to a separate dataclass
y1zhou Dec 2, 2025
efbbc5b
refactor: moving around code chunks for better readability
y1zhou Dec 2, 2025
5b27a26
Initial plan
Copilot Dec 2, 2025
256b52e
Refactor summary_lines to use SummaryResult dataclass
Copilot Dec 2, 2025
3b72ef1
Update aggregate_byres_scores docstring with return type details
Copilot Dec 2, 2025
1e11f5a
Rename SummaryResult to ChainPairScoreResults and update field names
Copilot Dec 2, 2025
443b43c
Merge pull request #1 from y1zhou/copilot/refactor-summary-lines-data…
y1zhou Dec 2, 2025
9c8ff68
fix: store input cutoffs in the returned object; save integers when w…
y1zhou Dec 3, 2025
37beeda
refactor: make it easier to see chain-pair and pymol script output to…
y1zhou Dec 3, 2025
723b596
build: runnable as a script, and useable as an installed package
y1zhou Dec 3, 2025
157c791
docs(readme): add introduction to the installed script
y1zhou Dec 3, 2025
7ae6525
fix: better handling of file IO and remove unused code
y1zhou Dec 3, 2025
5e4e1f1
Initial plan
Copilot Dec 4, 2025
c7949a2
Add --chain-groups CLI argument for calculating scores between specif…
Copilot Dec 4, 2025
d09cb52
Add tests for chain group functionality
Copilot Dec 4, 2025
5b87ff3
Address code review feedback - improve warning messages and documenta…
Copilot Dec 4, 2025
1dd0697
Refactor chain group scoring to reuse existing functions
Copilot Dec 4, 2025
f9c457f
Address review feedback: np.isin, g1/g2 naming, PyMOL script, ellipsi…
Copilot Dec 4, 2025
669ee85
fix: adjust ordering of chain groups
y1zhou Dec 5, 2025
0410ca9
fix: modify output whitespace to be as close to the original as possible
y1zhou Dec 5, 2025
4cf9598
refactor: remove unused functions and update variable names for clarity
y1zhou Dec 5, 2025
efdb80b
Fix value differences in output: correct ipTM_af max calc, max row na…
Copilot Dec 5, 2025
99f2168
Group chain pair outputs together: asym A->B, B->A, then max, with bl…
Copilot Dec 5, 2025
5526d87
style: add back the newlines separating chain pairs in the output
y1zhou Dec 5, 2025
b39e431
Add test_scoring.py with integration tests comparing output against s…
Copilot Dec 5, 2025
0c51f6b
Refactor: Extract normalize_whitespace function to module level
Copilot Dec 5, 2025
a1326ae
Refactor test_scoring.py to run ipsae once per input file set
Copilot Dec 5, 2025
969031b
Merge pull request #2 from y1zhou/copilot/add-cli-argument-chain-groups
y1zhou Dec 8, 2025
bd81a7a
fix: add safeguards on input model types to avoid misparsing files or…
y1zhou Dec 9, 2025
833619b
fix: raise error when input chain groups contain the same chain on bo…
y1zhou Dec 9, 2025
0a74430
feat: add support for Chai-1 models with all scores saved
y1zhou Dec 18, 2025
e5e2fef
fix: sort unique_chains by the order they appear in the structure, no…
y1zhou Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 194 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the enitre vscode folder
.vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Cursor
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
# refer to https://docs.cursor.com/context/ignore-files
.cursorignore
.cursorindexingignore
70 changes: 70 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
default_language_version:
python: python3

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# list of supported hooks: https://pre-commit.com/hooks.html
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: check-executables-have-shebangs
- id: check-toml
- id: check-case-conflict
- id: check-added-large-files
args: ["--maxkb", "16384"]

# python code formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.14.0"
hooks:
- id: ruff-format
- id: ruff-check
args:
[
"--select",
"D,E,F,W,I,S,UP",
"--extend-ignore",
"E402,E501,F401,F841,S101",
"--exclude",
"logs/*,data/*",
"--fix",
"--exit-non-zero-on-fix",
]
types_or: [python, pyi, jupyter]

# yaml formatting
# - repo: https://github.com/google/yamlfmt
# rev: v0.17.
# hooks:
# - id: yamlfmt

# shell scripts linter
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.11.0.1
hooks:
- id: shellcheck

# md formatting
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.22
hooks:
- id: mdformat
args: ["--number"]
additional_dependencies:
- mdformat-gfm
- mdformat-tables
- mdformat_frontmatter
# - mdformat-toc
# - mdformat-black

# jupyter notebook cell output clearing
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
args: ["--drop-empty-cells", "--keep-output"]

Large diffs are not rendered by default.

Loading