﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
3636	mmcif_write fails with temporary/unopened structure	Tristan Croll	Greg Couch	"{{{
The following bug report has been submitted:
Platform:        Linux-3.10.0-1127.13.1.el7.x86_64-x86_64-with-centos-7.8.2003-Core
ChimeraX Version: 1.0 (2020-06-04 23:15:07 UTC)
Description
Saving to mmcif via provider_save() does not work for a model that isn't part of the session, since `model.id` is None.

Log:
UCSF ChimeraX version: 1.0 (2020-06-04)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open map_with_ligand.ccp4

Opened map_with_ligand.ccp4, grid size 250,250,96, pixel 0.464,0.464,0.46,
shown at level 3.62, step 1, values float32  

> open model_noligand.pdb

Chain information for model_noligand.pdb #2  
---  
Chain | Description  
A | No description available  
  

> open ligand_answer.pdb

> view :ATP

> phenix fit ligand #2 ATP A #1

Connected to Phenix server on localhost:15010  
Restraints written to
/run/media/tic20/storage/Downloads/ligand_fit/ATP_restraints.cif  
Traceback (most recent call last):  
File ""/opt/UCSF/ChimeraX/lib/python3.7/site-
packages/chimerax/cmd_line/tool.py"", line 258, in execute  
cmd.run(cmd_text)  
File ""/opt/UCSF/ChimeraX/lib/python3.7/site-
packages/chimerax/core/commands/cli.py"", line 2805, in run  
result = ci.function(session, **kw_args)  
File ""/home/tic20/.local/share/ChimeraX/1.0/site-
packages/chimerax/phenix/cmd.py"", line 146, in phenix_fit_ligand  
provider_save(session, model_file, models=[temp_model])  
File ""/opt/UCSF/ChimeraX/lib/python3.7/site-
packages/chimerax/save_command/cmd.py"", line 79, in provider_save  
mgr).save(session, path, **provider_kw)  
File ""/opt/UCSF/ChimeraX/lib/python3.7/site-
packages/chimerax/atomic/mmcif/__init__.py"", line 87, in save  
mmcif_write.write_mmcif(session, path, **kw)  
File ""/opt/UCSF/ChimeraX/lib/python3.7/site-
packages/chimerax/atomic/mmcif/mmcif_write.py"", line 118, in write_mmcif  
grouped.setdefault(m.id[:-1], []).append(m)  
TypeError: 'NoneType' object is not subscriptable  
  
TypeError: 'NoneType' object is not subscriptable  
  
File ""/opt/UCSF/ChimeraX/lib/python3.7/site-
packages/chimerax/atomic/mmcif/mmcif_write.py"", line 118, in write_mmcif  
grouped.setdefault(m.id[:-1], []).append(m)  
  
See log for complete Python traceback.  
  




OpenGL version: 3.3.0 NVIDIA 450.51.05
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.7G         45G        220M         11G         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

}}}
"	defect	closed	normal		Input/Output		fixed						all	ChimeraX
