feat: add disorder-aware CIF export demo - #96
Merged
IsaacSugden merged 4 commits intoJul 10, 2026
Merged
Conversation
- Validate refcode with strict alphanumeric regex before use as filename - Validate output-dir: reject path traversal (..), enforce cwd-relative - Break taint chain: CLI args no longer flow directly to filesystem ops
|
IsaacSugden
approved these changes
Jul 10, 2026
IsaacSugden
left a comment
Contributor
There was a problem hiding this comment.
This is a super cool contribution, thankyou! Its on our plans to improve cif writing for structures with disorder at some point, but this will really help the community for the foreseeable future. I've tested it on a handful of structures and it works as described, I've just taken out the License print statement since you have it in the readme, and our code should automatically print something similair if there's a License issue anyway.
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
Why
The existing examples do not show how to retrieve full atom-site occupancy/disorder metadata from the CSD Python API and reconstruct a CIF with explicit disorder tags for downstream workflows
This example was adapted from a broader open-source workflow developed in MolCrysKit. That project uses the same occupancy/disorder extraction step for downstream disorder-resolution workflows, and I thought a minimal standalone example could also be helpful in this repository.