#5136 closed defect (fixed)
KeyError saving mmCIF file
| Reported by: | Owned by: | Greg Couch | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Input/Output | Version: | |
| Keywords: | Cc: | Eric Pettersen | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
The following bug report has been submitted:
Platform: Linux-5.8.0-59-generic-x86_64-with-glibc2.14
ChimeraX Version: 1.2.5 (2021-05-24 04:13:57 UTC)
Description
(Describe the actions that caused this problem to occur here)
Log:
UCSF ChimeraX version: 1.2.5 (2021-05-24)
© 2016-2021 Regents of the University of California. All rights reserved.
How to cite UCSF ChimeraX
> open wt-B10-a_sub2-C13.pdb
Chain information for wt-B10-a_sub2-C13.pdb
---
Chain | Description
1.1/a 1.2/a 1.3/a 1.4/a 1.5/a 1.6/a 1.7/a 1.8/a 1.9/a 1.10/a 1.11/a 1.12/a
1.13/a | No description available
> open /mnt/data/final2/adopted/fit/0-center/wt-c13/wt-B10-b_sub1-C13.pdb
Chain information for wt-B10-b_sub1-C13.pdb
---
Chain | Description
2.1/b 2.2/b 2.3/b 2.4/b 2.5/b 2.6/b 2.7/b 2.8/b 2.9/b 2.10/b 2.11/b 2.12/b
2.13/b | No description available
> select #1.1
87 atoms, 88 bonds, 11 residues, 1 model selected
> select #1.2
87 atoms, 88 bonds, 11 residues, 1 model selected
> select #1.3
87 atoms, 88 bonds, 11 residues, 1 model selected
> select #1.4
87 atoms, 88 bonds, 11 residues, 1 model selected
> select #1.5
87 atoms, 88 bonds, 11 residues, 1 model selected
> select #1.1
87 atoms, 88 bonds, 11 residues, 1 model selected
> color sel red
> select #2.1
87 atoms, 88 bonds, 11 residues, 1 model selected
> color sel blue
> setattr #1.1/a chain chain_id a1
Assigning chain_id attribute to 1 item
> setattr #1.1/a residue chain_id a1
Assigning chain_id attribute to 0 items
> setattr #1.5/a chain chain_id a2
Assigning chain_id attribute to 1 item
> setattr #1.6/a chain chain_id a3
Assigning chain_id attribute to 1 item
> setattr #1.7/a chain chain_id a4
Assigning chain_id attribute to 1 item
> setattr #1.8/a chain chain_id a5
Assigning chain_id attribute to 1 item
> setattr #1.9/a chain chain_id a6
Assigning chain_id attribute to 1 item
> setattr #1.10/a chain chain_id a7
Assigning chain_id attribute to 1 item
> setattr #1.11/a chain chain_id a8
Assigning chain_id attribute to 1 item
> setattr #1.12/a chain chain_id a9
Assigning chain_id attribute to 1 item
> setattr #1.13/a chain chain_id a10
Assigning chain_id attribute to 1 item
> setattr #1.2/a chain chain_id a11
Assigning chain_id attribute to 1 item
> setattr #1.3/a chain chain_id a12
Assigning chain_id attribute to 1 item
> setattr #1.4/a chain chain_id a13
Assigning chain_id attribute to 1 item
> setattr #2.1/b chain chain_id b1
Assigning chain_id attribute to 1 item
> setattr #2.5/b chain chain_id b2
Assigning chain_id attribute to 1 item
> setattr #2.6/b chain chain_id b3
Assigning chain_id attribute to 1 item
> setattr #2.7/b chain chain_id b4
Assigning chain_id attribute to 1 item
> setattr #2.8/b chain chain_id b5
Assigning chain_id attribute to 1 item
> setattr #2.9/b chain chain_id b6
Assigning chain_id attribute to 1 item
> setattr #2.10/b chain chain_id b7
Assigning chain_id attribute to 1 item
> setattr #2.11/b chain chain_id b8
Assigning chain_id attribute to 1 item
> setattr #2.12/b chain chain_id b9
Assigning chain_id attribute to 1 item
> setattr #2.13/b chain chain_id b10
Assigning chain_id attribute to 1 item
> setattr #2.2/b chain chain_id b11
Assigning chain_id attribute to 1 item
> setattr #2.3/b chain chain_id b12
Assigning chain_id attribute to 1 item
> setattr #2.4/b chain chain_id b13
Assigning chain_id attribute to 1 item
> select clear
> select clear
> save /mnt/data/final2/adopted/fit/0-center/wt-c13/wt-B10-a-b.cif
Not saving entity_poly_seq for non-authoritative sequences
Traceback (most recent call last):
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/save_command/dialog.py", line 116, in <lambda>
lambda *args, ses=session: show_save_file_dialog(ses), tool_tip="Save output
file",
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/save_command/dialog.py", line 127, in show_save_file_dialog
_dlg.display(session, **kw)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/save_command/dialog.py", line 51, in display
run(session, cmd)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/core/commands/run.py", line 36, in run
results = command.run(text, log=log, return_json=return_json)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/core/commands/cli.py", line 2852, in run
result = ci.function(session, **kw_args)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/save_command/cmd.py", line 75, in cmd_save
Command(session, registry=registry).run(provider_cmd_text, log=log)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/core/commands/cli.py", line 2852, in run
result = ci.function(session, **kw_args)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/save_command/cmd.py", line 87, in provider_save
provider_info.bundle_info.run_provider(session, provider_info.format_name,
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/mmcif/__init__.py", line 89, in save
mmcif_write.write_mmcif(session, path, **kw)
File "src/mmcif_write.pyx", line 145, in
chimerax.mmcif.mmcif_write.write_mmcif
File "src/mmcif_write.pyx", line 149, in
chimerax.mmcif.mmcif_write.write_mmcif
File "src/mmcif_write.pyx", line 542, in
chimerax.mmcif.mmcif_write.save_structure
KeyError: ('a1', 'RPGMMDSQEFS')
KeyError: ('a1', 'RPGMMDSQEFS')
File "src/mmcif_write.pyx", line 542, in
chimerax.mmcif.mmcif_write.save_structure
See log for complete Python traceback.
> ui tool show "Show Sequence Viewer"
> sequence chain #1.1/a1 #1.2/a11 #1.3/a12 #1.4/a13 #1.5/a2 #1.6/a3 #1.7/a4
> #1.8/a5 #1.9/a6 #1.10/a7 #1.11/a8 #1.12/a9 #1.13/a10 #2.1/b1 #2.2/b11
> #2.3/b12 #2.4/b13 #2.5/b2 #2.6/b3 #2.7/b4 #2.8/b5 #2.9/b6 #2.10/b7 #2.11/b8
> #2.12/b9 #2.13/b10
Alignment identifier is 1
> save /mnt/data/final2/adopted/fit/0-center/wt-c13/wt-B10-a-b.cif
Not saving entity_poly_seq for non-authoritative sequences
Traceback (most recent call last):
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/cmd_line/tool.py", line 280, in execute
cmd.run(cmd_text)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/core/commands/cli.py", line 2852, in run
result = ci.function(session, **kw_args)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/save_command/cmd.py", line 75, in cmd_save
Command(session, registry=registry).run(provider_cmd_text, log=log)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/core/commands/cli.py", line 2852, in run
result = ci.function(session, **kw_args)
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/save_command/cmd.py", line 87, in provider_save
provider_info.bundle_info.run_provider(session, provider_info.format_name,
File "/usr/lib/ucsf-chimerax/lib/python3.8/site-
packages/chimerax/mmcif/__init__.py", line 89, in save
mmcif_write.write_mmcif(session, path, **kw)
File "src/mmcif_write.pyx", line 145, in
chimerax.mmcif.mmcif_write.write_mmcif
File "src/mmcif_write.pyx", line 149, in
chimerax.mmcif.mmcif_write.write_mmcif
File "src/mmcif_write.pyx", line 542, in
chimerax.mmcif.mmcif_write.save_structure
KeyError: ('a1', 'RPGMMDSQEFS')
KeyError: ('a1', 'RPGMMDSQEFS')
File "src/mmcif_write.pyx", line 542, in
chimerax.mmcif.mmcif_write.save_structure
See log for complete Python traceback.
OpenGL version: 3.3.0 NVIDIA 460.73.01
OpenGL renderer: Quadro P2200/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
Manufacturer: Dell Inc.
Model: Precision 7820 Tower
OS: Ubuntu 20.04 focal
Architecture: 64bit ELF
Virutal Machine: none
CPU: 32 Intel(R) Xeon(R) Silver 4216 CPU @ 2.10GHz
Cache Size: 22528 KB
Memory:
total used free shared buff/cache available
Mem: 62Gi 35Gi 678Mi 164Mi 26Gi 26Gi
Swap: 975Mi 589Mi 386Mi
Graphics:
0000:b3:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106GL [Quadro P2200] [10de:1c31] (rev a1)
Subsystem: Dell GP106GL [Quadro P2200] [1028:131b]
Kernel driver in use: nvidia
Locale: ('en_US', 'UTF-8')
PyQt5 5.15.2, Qt 5.15.2
Installed Packages:
alabaster: 0.7.12
appdirs: 1.4.4
Babel: 2.9.1
backcall: 0.2.0
blockdiag: 2.0.1
certifi: 2020.12.5
cftime: 1.5.0
chardet: 3.0.4
ChimeraX-AddCharge: 1.0.1
ChimeraX-AddH: 2.1.3
ChimeraX-AlignmentAlgorithms: 2.0
ChimeraX-AlignmentHdrs: 3.2
ChimeraX-AlignmentMatrices: 2.0
ChimeraX-Alignments: 2.1
ChimeraX-AmberInfo: 1.0
ChimeraX-Arrays: 1.0
ChimeraX-Atomic: 1.13.2
ChimeraX-AtomicLibrary: 3.1.3
ChimeraX-AtomSearch: 2.0
ChimeraX-AtomSearchLibrary: 1.0
ChimeraX-AxesPlanes: 2.0
ChimeraX-BasicActions: 1.1
ChimeraX-BILD: 1.0
ChimeraX-BlastProtein: 1.1
ChimeraX-BondRot: 2.0
ChimeraX-BugReporter: 1.0
ChimeraX-BuildStructure: 2.5.2
ChimeraX-Bumps: 1.0
ChimeraX-BundleBuilder: 1.1
ChimeraX-ButtonPanel: 1.0
ChimeraX-CageBuilder: 1.0
ChimeraX-CellPack: 1.0
ChimeraX-Centroids: 1.1
ChimeraX-ChemGroup: 2.0
ChimeraX-Clashes: 2.1
ChimeraX-Clipper: 0.16.0
ChimeraX-ColorActions: 1.0
ChimeraX-ColorGlobe: 1.0
ChimeraX-ColorKey: 1.2.1
ChimeraX-CommandLine: 1.1.4
ChimeraX-ConnectStructure: 2.0
ChimeraX-Contacts: 1.0
ChimeraX-Core: 1.2.5
ChimeraX-CoreFormats: 1.0
ChimeraX-coulombic: 1.1.1
ChimeraX-Crosslinks: 1.0
ChimeraX-Crystal: 1.0
ChimeraX-CrystalContacts: 1.0
ChimeraX-Cytoscape: 0.1
ChimeraX-DataFormats: 1.1
ChimeraX-DevelExtras: 0.4.0
ChimeraX-Dicom: 1.0
ChimeraX-DistMonitor: 1.1.3
ChimeraX-DistUI: 1.0
ChimeraX-Dssp: 2.0
ChimeraX-EMDB-SFF: 1.0
ChimeraX-ExperimentalCommands: 1.0
ChimeraX-FileHistory: 1.0
ChimeraX-FunctionKey: 1.0
ChimeraX-Geometry: 1.1
ChimeraX-gltf: 1.0
ChimeraX-Graphics: 1.0
ChimeraX-Hbonds: 2.1
ChimeraX-Help: 1.1
ChimeraX-HKCage: 1.3
ChimeraX-IHM: 1.0
ChimeraX-ImageFormats: 1.1
ChimeraX-IMOD: 1.0
ChimeraX-IO: 1.0.1
ChimeraX-ISOLDE: 1.2.2
ChimeraX-Label: 1.0
ChimeraX-LinuxSupport: 1.0
ChimeraX-ListInfo: 1.1.1
ChimeraX-Log: 1.1.2
ChimeraX-LookingGlass: 1.1
ChimeraX-Maestro: 1.8.1
ChimeraX-Map: 1.0.2
ChimeraX-MapData: 2.0
ChimeraX-MapEraser: 1.0
ChimeraX-MapFilter: 2.0
ChimeraX-MapFit: 2.0
ChimeraX-MapSeries: 2.0
ChimeraX-Markers: 1.0
ChimeraX-Mask: 1.0
ChimeraX-MatchMaker: 1.2.1
ChimeraX-MDcrds: 2.2
ChimeraX-MedicalToolbar: 1.0.1
ChimeraX-Meeting: 1.0
ChimeraX-MLP: 1.1
ChimeraX-mmCIF: 2.3
ChimeraX-MMTF: 2.1
ChimeraX-Modeller: 1.0.1
ChimeraX-ModelPanel: 1.0.1
ChimeraX-ModelSeries: 1.0
ChimeraX-Mol2: 2.0
ChimeraX-Morph: 1.0
ChimeraX-MouseModes: 1.1
ChimeraX-Movie: 1.0
ChimeraX-Neuron: 1.0
ChimeraX-Nucleotides: 2.0.1
ChimeraX-OpenCommand: 1.5
ChimeraX-PDB: 2.4.1
ChimeraX-PDBBio: 1.0
ChimeraX-PDBLibrary: 1.0.1
ChimeraX-PDBMatrices: 1.0
ChimeraX-Phenix: 0.1
ChimeraX-PickBlobs: 1.0
ChimeraX-Positions: 1.0
ChimeraX-PresetMgr: 1.0.1
ChimeraX-PubChem: 2.0.1
ChimeraX-ReadPbonds: 1.0
ChimeraX-Registration: 1.1
ChimeraX-RemoteControl: 1.0
ChimeraX-ResidueFit: 1.0
ChimeraX-RestServer: 1.1
ChimeraX-RMF: 0.10
ChimeraX-RNALayout: 1.0
ChimeraX-RotamerLibMgr: 2.0
ChimeraX-RotamerLibsDunbrack: 2.0
ChimeraX-RotamerLibsDynameomics: 2.0
ChimeraX-RotamerLibsRichardson: 2.0
ChimeraX-SaveCommand: 1.4
ChimeraX-SchemeMgr: 1.0
ChimeraX-SDF: 2.0
ChimeraX-Segger: 1.0
ChimeraX-Segment: 1.0
ChimeraX-SeqView: 2.3
ChimeraX-Shape: 1.0.1
ChimeraX-Shell: 1.0
ChimeraX-Shortcuts: 1.0
ChimeraX-ShowAttr: 1.0
ChimeraX-ShowSequences: 1.0
ChimeraX-SideView: 1.0
ChimeraX-Smiles: 2.0.1
ChimeraX-SmoothLines: 1.0
ChimeraX-SpaceNavigator: 1.0
ChimeraX-StdCommands: 1.3.1
ChimeraX-STL: 1.0
ChimeraX-Storm: 1.0
ChimeraX-StrudelScore: 0.1.4
ChimeraX-Struts: 1.0
ChimeraX-Surface: 1.0
ChimeraX-SwapAA: 2.0
ChimeraX-SwapRes: 2.1
ChimeraX-TapeMeasure: 1.0
ChimeraX-Test: 1.0
ChimeraX-TestManager: 0.3
ChimeraX-Toolbar: 1.0.1
ChimeraX-ToolshedUtils: 1.2
ChimeraX-Tug: 1.0
ChimeraX-UI: 1.2.1
ChimeraX-uniprot: 2.1
ChimeraX-UnitCell: 1.0
ChimeraX-ViewDockX: 1.0
ChimeraX-Vive: 1.1
ChimeraX-VolumeMenu: 1.0
ChimeraX-VTK: 1.0
ChimeraX-WavefrontOBJ: 1.0
ChimeraX-WebCam: 1.0
ChimeraX-WebServices: 1.0
ChimeraX-Zone: 1.0
colorama: 0.4.3
comtypes: 1.1.7
cxservices: 1.0
cycler: 0.10.0
Cython: 0.29.21
decorator: 5.0.9
distlib: 0.3.1
distro: 1.5.0
docutils: 0.16
filelock: 3.0.12
funcparserlib: 0.3.6
grako: 3.16.5
h5py: 2.10.0
html2text: 2020.1.16
idna: 2.10
ihm: 0.17
imagecodecs: 2020.5.30
imagesize: 1.2.0
ipykernel: 5.3.4
ipython: 7.18.1
ipython-genutils: 0.2.0
jedi: 0.17.2
Jinja2: 2.11.2
jupyter-client: 6.1.7
jupyter-core: 4.7.1
kiwisolver: 1.3.1
line-profiler: 2.1.2
lxml: 4.6.2
lz4: 3.1.0
MarkupSafe: 2.0.1
matplotlib: 3.3.2
MolecularDynamicsViewer: 1.1
msgpack: 1.0.0
netCDF4: 1.5.4
networkx: 2.5
numexpr: 2.7.3
numpy: 1.19.2
numpydoc: 1.1.0
openvr: 1.14.1501
packaging: 20.9
ParmEd: 3.2.0
parso: 0.7.1
pexpect: 4.8.0
pickleshare: 0.7.5
Pillow: 7.2.0
pip: 21.0.1
pkginfo: 1.5.0.1
prompt-toolkit: 3.0.18
psutil: 5.7.2
ptyprocess: 0.7.0
pycollada: 0.7.1
pydicom: 2.0.0
Pygments: 2.7.1
PyOpenGL: 3.1.5
PyOpenGL-accelerate: 3.1.5
pyparsing: 2.4.7
PyQt5-commercial: 5.15.2
PyQt5-sip: 12.8.1
PyQtWebEngine-commercial: 5.15.2
python-dateutil: 2.8.1
pytz: 2021.1
pyzmq: 22.0.3
qtconsole: 4.7.7
QtPy: 1.9.0
RandomWords: 0.3.0
requests: 2.24.0
scipy: 1.5.2
SEQCROW: 1.0.2
setuptools: 50.3.2
sfftk-rw: 0.6.7.dev1
six: 1.15.0
snowballstemmer: 2.1.0
sortedcontainers: 2.2.2
Sphinx: 3.2.1
sphinxcontrib-applehelp: 1.0.2
sphinxcontrib-blockdiag: 2.0.0
sphinxcontrib-devhelp: 1.0.2
sphinxcontrib-htmlhelp: 2.0.0
sphinxcontrib-jsmath: 1.0.1
sphinxcontrib-qthelp: 1.0.3
sphinxcontrib-serializinghtml: 1.1.5
suds-jurko: 0.6
tables: 3.6.1
tifffile: 2020.9.3
tinyarray: 1.2.3
tornado: 6.1
traitlets: 5.0.5
urllib3: 1.25.11
wcwidth: 0.2.5
webcolors: 1.11.1
wheel: 0.36.0
wheel-filename: 1.2.0
Change History (7)
comment:1 by , 4 years ago
| Component: | Unassigned → Input/Output |
|---|---|
| Owner: | set to |
| Platform: | → all |
| Project: | → ChimeraX |
| Status: | new → assigned |
| Summary: | ChimeraX bug report submission → KeyError saving mmCIF file |
comment:2 by , 4 years ago
comment:3 by , 4 years ago
If you need to keep the data private, you can send it to me directly at gregc@….
comment:4 by , 4 years ago
Okay, so I see that the PDB files are NMR ensembles. And then you changed the chain identifiers, which are supposed to be same in each NMR model. That confuses the code.
My guess is that you really want one model. If so, after opening the two PDB files, give the command:
combine #1,2 name wt-B10-a-b save /mnt/data/final2/adopted/fit/0-center/wt-c13/wt-B10-a-b.cif model #3
Or some other name. That will automatically give you a different chain id for each chain.
comment:5 by , 4 years ago
| Cc: | added |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Eric, this is because after the setattr #1.1/a chain chain_id a1, chain.name != chain.chain_id in that structure. What is the semantic difference between the two?
comment:6 by , 4 years ago
chain.name is almost never equal to chain.chain_id. chain.name is typically something like "chain A" whereas chain.chain_id is 'A'. Chain inherits name from Sequence, and is an arbitrary identifier used next to the sequence in alignments and in other textual contexts. By default, Structures assign the name "Chain chain_id" to their chains. If you are using a reasonably recent version of atomic_lib, the name is updated when the chain_id is changed (as long as it was still in the default form).
Can you provide a ChimeraX session file with your modified PDB file that reproduces this error? That would help a lot.