RosettaCommons / RosettaCommons/atomworks
Bug/documentation issue: Requesting altloc ("label_alt_id") in `extra_fields` gets overwritten by `"first"` if occupancy is not also in `extra_fields`
Open
@nscorley is already working on this.
Since Dec 17, 2025.
- Dominant language
- Python
- Stars
- 446
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Description
I ran into an issue using load_any to parse a mmCIF file into an AtomArrayStack.
>>> # This is the mmCIF with PDB ID 6B8X downloaded from RCSB
>>> st = load_any('tests/resources/6b8x/6B8X.cif', altloc='all', extra_fields=["label_alt_id", ])
>>> # We know this has non-hetatm alt B records
>>> st[0].query("~hetero and label_alt_id == 'B'")
AtomArray([
])
The issue appears to be in the atomworks version of get_structure, which silently assumes the altloc is "first" unless occupancy is also specified as an extra field. This should be documented or fixed.
Preferably, this would return with "first" only if no additional altloc/occupancy related extra fields are provided.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.