Opened 5 years ago
Closed 5 years ago
#3327 closed defect (fixed)
mmCIF output problem for inserted residues
| Reported by: | Tristan Croll | Owned by: | Eric Pettersen |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Input/Output | Version: | |
| Keywords: | Cc: | Greg Couch | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
The following bug report has been submitted:
Platform: Linux-3.10.0-1062.9.1.el7.x86_64-x86_64-with-centos-7.7.1908-Core
ChimeraX Version: 1.0rc202005270557 (2020-05-27 05:57:28 UTC)
Description
Residues inserted into the middle of a protein chain are appended to the *end* of the chain when writing to mmCIF, causing the model to be messed up on reloading. If I take 3io0, delete residue 299, then add it back using the method at
https://github.com/tristanic/isolde/blob/0d72c4cbd0a12cfce7671d618d62b115eb96220f/isolde/src/atomic/building/build_utils.py#L110
... using residue 298 as the "prev_res" argument and then adding the bond, then:
{{{
m = session.models.list()[0]
from chimerax.atomic import selected_residues
m.residues.numbers # Lists the residue numbers in the correct order
# With all atoms selected
selected_residues(session).numbers # puts the new residue at the end
}}}
I've attached a session containing the model before and after saving to mmCIF and reopening (ignore the terrible geometry - didn't bother to energy minimise) - on re-opening the bonding to the preceding and following residues is correct, but there's a spurious bond from the C-terminus back to the N atom of the new residue, and a missing-structure pseudobond from the preceding to following residue (it wasn't there in the model before saving).
Log:
UCSF ChimeraX version: 1.0rc202005270557 (2020-05-27)
© 2016-2020 Regents of the University of California. All rights reserved.
How to cite UCSF ChimeraX
> open 3io0
3io0 title:
Crystal structure of EtuB from Clostridium kluyveri [more info...]
Chain information for 3io0 #1
---
Chain | Description
A | EtuB protein
3io0 mmCIF Assemblies
---
1| author_and_software_defined_assembly
> show
> hide cartoons
> select /A:299@CA
1 atom, 1 model selected
> select up
8 atoms, 7 bonds, 1 model selected
> delete /A:299
> select /A:300@N
1 atom, 1 model selected
> ui tool show Shell
/opt/UCSF/ChimeraX/lib/python3.7/site-packages/IPython/core/history.py:226:
UserWarning: IPython History requires SQLite, your history will not be saved
warn("IPython History requires SQLite, your history will not be saved")
> select /A:298@C
1 atom, 1 model selected
> color sel bychain
> color sel byhetero
> color sel bychain
> color sel byhetero
> select /A:299@C
1 atom, 1 model selected
> preset custom "make bond"
> open /home/tic20/chimerax_presets/make_bond.py
executed make_bond.py
Preset implemented in Python; no expansion to individual ChimeraX commands
available.
> select #1
1667 atoms, 1689 bonds, 1 model selected
> pwd
Current working directory is: /home/tic20
> save build_test.cif #1
> select clear
> hide #1 models
> open build_test.cif
Chain information for build_test.cif #2
---
Chain | Description
A | EtuB protein
build_test.cif mmCIF Assemblies
---
1| author_and_software_defined_assembly
> show
> style #!2 stick
Changed 1667 atom styles
> hide #!2 cartoons
> hide #!2 models
> show #1 models
> show #!2 models
> save building_bug.cxs
OpenGL version: 3.3.0 NVIDIA 440.33.01
OpenGL renderer: TITAN Xp/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
Manufacturer: Dell Inc.
Model: Precision T5600
OS: CentOS Linux 7 Core
Architecture: 64bit ELF
CPU: 32 Intel(R) Xeon(R) CPU E5-2687W 0 @ 3.10GHz
Cache Size: 20480 KB
Memory:
total used free shared buff/cache available
Mem: 62G 5.3G 40G 433M 16G 56G
Swap: 4.9G 0B 4.9G
Graphics:
03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP102 [TITAN Xp] [10de:1b02] (rev a1)
Subsystem: NVIDIA Corporation Device [10de:11df]
Kernel driver in use: nvidia
PyQt version: 5.12.3
Compiled Qt version: 5.12.4
Runtime Qt version: 5.12.8
File attachment: building_bug.cxs
Attachments (1)
Change History (5)
by , 5 years ago
| Attachment: | building_bug.cxs added |
|---|
comment:1 by , 5 years ago
| Cc: | added |
|---|---|
| Component: | Unassigned → Input/Output |
| Owner: | set to |
| Platform: | → all |
| Project: | → ChimeraX |
| Status: | new → assigned |
| Summary: | ChimeraX bug report submission → mmCIF output problem for inserted residues |
When a residue is inserted, it is put in the proper position in the residue list, but its atoms and bonds are simply appended to those lists. This is why m.residues.numbers shows the right order but selected_residues(session).numbers, which is built up from the selected atoms and bonds, doesn't.
The mmCIF writer must somehow be considering the ordering of the atoms and bonds in its output (or maybe upon input) when it really shouldn't. The PDB writer simply loops through the residue list and therefore its atoms and bonds are output in residue order.
comment:2 by , 5 years ago
| Cc: | added; removed |
|---|---|
| Owner: | changed from to |
The mmCIF writer outputs the residues in the order that they are listed in the Chain objects.
If you list the residues in the Chain object, there is a None where residue 299 should be after the insert (ie., it's added to the end).
comment:3 by , 5 years ago
| Status: | assigned → accepted |
|---|
comment:4 by , 5 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
Okay, fixed AFAICT. My test case with a peptide stitched into a deleted stretch of 1gcn worked -- "worked" meaning that the chain came out in the right order, not that the resulting mmCIF was correct [didn't test that]. Tristan, I guess I'm relying on you to go to town and let us know if anything still doesn't work for you.
--Eric
Added by email2trac