Add native score-only confidence CLI for existing structures#311
Open
taivu1998 wants to merge 1 commit into
Open
Add native score-only confidence CLI for existing structures#311taivu1998 wants to merge 1 commit into
taivu1998 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a native score-only workflow for Protenix so users can evaluate existing PDB/mmCIF coordinates with the model trunk and confidence heads without running diffusion sampling.
This addresses #227.
Motivation
Issue #227 asks whether Protenix can be used in a scoring-only mode, especially for complexes. The existing inference path always samples new coordinates through diffusion, while the confidence head already accepts predicted coordinates. This PR exposes that capability through a narrow, native workflow instead of requiring users to rely on a pinned external fork.
Changes
Protenix.forward()and_main_inference_loop()viascore_coordinates.InferenceRunner.score()to run the trunk, distogram, confidence head, and existing confidence summary code on supplied atom coordinates.protenix scoreCLI support for PDB/mmCIF inputs and directories.idfields,summary.csv,<sample>/summary_confidence.json,<sample>/chain_id_map.json,<sample>/full_confidence.json,<sample>/scored.cif,protenix scorein the README and training/inference instructions.Design Notes
The implementation deliberately keeps the first version small:
Validation
Ran:
Results:
tests/test_structure_scoring.pypassed: 7 tests.score --helpwithLAYERNORM_TYPE=torch.Local Environment Notes
I did not run a full model-backed
protenix scoreon an example structure locally because this machine is missing the Protenix CCD runtime data file at/Users/vuductai/common/components.cif, which blocks the repo's normal parser path. On this macOS host, CLI import smoke also requiresLAYERNORM_TYPE=torchto avoid the existing CUDA fused-layernorm compile path.