Skip to content

Write _atom_site.occupancy in mmCIF output (Fix #331)#341

Open
faustomilletari wants to merge 1 commit into
mainfrom
fm/fix-331
Open

Write _atom_site.occupancy in mmCIF output (Fix #331)#341
faustomilletari wants to merge 1 commit into
mainfrom
fm/fix-331

Conversation

@faustomilletari

Copy link
Copy Markdown
Collaborator

Biotite only emits an _atom_site column when the corresponding annotation is present on the AtomArray. Our writers set b_factor but not occupancy, so the occupancy column was omitted entirely. This broke downstream parsers that require it (e.g. BioPython's MMCIFParser, which raises KeyError: '_atom_site.occupancy').

Set occupancy=1.0 on atoms in ProteinChain.atom_array / atom_array_no_insertions (also covers ProteinComplex, which reuses chain.atom_array) and on the manually-built AtomArray in MolecularComplex.to_mmcif.

Biotite only emits an _atom_site column when the corresponding
annotation is present on the AtomArray. Our writers set b_factor but
not occupancy, so the occupancy column was omitted entirely. This broke
downstream parsers that require it (e.g. BioPython's MMCIFParser, which
raises KeyError: '_atom_site.occupancy').

Set occupancy=1.0 on atoms in ProteinChain.atom_array /
atom_array_no_insertions (also covers ProteinComplex, which reuses
chain.atom_array) and on the manually-built AtomArray in
MolecularComplex.to_mmcif.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Tests Skipped Failures Errors Time
28 1 💤 0 ❌ 0 🔥 17.405s ⏱️
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant