Wrong info on unobserved residues in structures from ModelServer
Mol* doesn't distinguish unobserved residues in the sequence panel, when the structure data come from ModelServer.
Compare: Working: https://molstar.org/viewer/?structure-url-format=mmcif&structure-url=https://www.ebi.ac.uk/pdbe/static/entry/1tqn_updated.cif Not working: https://molstar.org/viewer/?structure-url-format=mmcif&structure-url=https://wwwdev.ebi.ac.uk/pdbe/model-server/v1/1tqn/full
This is probably because Mol* relies on the _pdbx_unobs_or_zero_occ_residues category, but ModelServer doesn't provide it. Should be fixed either in Mol* or in ModelServer.
You can use the copy_all_categories flag: https://molstar.org/viewer/?structure-url-format=mmcif&structure-url=https://wwwdev.ebi.ac.uk/pdbe/model-server/v1/1tqn/full?copy_all_categories=true
I think a two things should be done
-
export _pdbx_unobs_or_zero_occ_residues whenever _entity_poly_seq is exported.
-
change https://github.com/molstar/molstar/blob/745746f2431314ac8c61930a6641469702e88f6d/src/mol-model-formats/structure/basic/sequence.ts#L17-L18 to
if (!data.entity_poly_seq?._rowCount || !data.pdbx_unobs_or_zero_occ_residues?._rowCount) {plus some comment to explain it
As an addition/alternative to 2) you can modify https://github.com/molstar/molstar/blob/745746f2431314ac8c61930a6641469702e88f6d/src/mol-model-formats/structure/basic/properties.ts#L17-L38
Currently it only works when _pdbx_unobs_or_zero_occ_residues is present but we also have enough information to identify missing residues when _entity_poly_seq (which is what is causing the issue described). So in the case when _pdbx_unobs_or_zero_occ_residues is not present but _entity_poly_seq, you can loop over atom_site comp/seq to see for which coordinates are available.