Skip to content

feat: add disorder-aware CIF export demo - #96

Merged
IsaacSugden merged 4 commits into
ccdc-opensource:mainfrom
SchrodingersCattt:add-disorder-workflow-demo
Jul 10, 2026
Merged

feat: add disorder-aware CIF export demo#96
IsaacSugden merged 4 commits into
ccdc-opensource:mainfrom
SchrodingersCattt:add-disorder-workflow-demo

Conversation

@SchrodingersCattt

Copy link
Copy Markdown
Contributor

Summary

  • add a demo script showing how to export disordered CSD entries with occupancy, disorder assembly/group, ADP, and bond data preserved in a manually assembled CIF
  • add a companion README with usage and licensing notes

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.

@SchrodingersCattt SchrodingersCattt changed the title Add disorder-aware CIF export demo feat: add disorder-aware CIF export demo Jun 29, 2026
SchrodingersCattt and others added 2 commits June 29, 2026 10:10
- 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
@sonarqubecloud

Copy link
Copy Markdown

@IsaacSugden IsaacSugden left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@IsaacSugden
IsaacSugden merged commit 8cc6a94 into ccdc-opensource:main Jul 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants