﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
3583	Better feedback for loading CIF templates	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
Now that ISOLDE's veering towards allowing active addition of residues, I'm working on adding a button to allow users to load CIF templates for their own custom residues. A couple of stumbling blocks I've run across:

- `mmcif.load_mmCIF_templates()` is silent - so if I deliberately feed it a CIF file that doesn't contain templates (e.g. a model, or structure factors) there is no feedback to say I've done the wrong thing. Probably shouldn't throw an error - but would be really helpful if it could return a list of the templates it just loaded (and possibly add an argument to decide whether or not to replace any existing templates with the same name).

- the attached file is an example of the output from phenix.elbow, which is used to generate refinement restraints for new ligands by anyone using phenix.refine (that is, just about everyone in the community). Unfortunately (but unsurprisingly...) it's not strictly dictionary-compliant - it uses non-standard labels for the atomic coordinates:
{{{
_chem_comp_atom.x
_chem_comp_atom.y
_chem_comp_atom.z
}}}
The result is a bit pathological: mmcif.load_template_residues() creates a template called D3R, but with no atoms in it.

A couple of options I can think of that would help here:

- try to get Nigel Moriarty to fix this on the Phenix side
- make `load_template_residues()` lenient enough to handle these
- provide a method to convert an existing residue loaded in ChimeraX from some other format into a `TmplResidue` (and/or write it out to a template CIF file so it can be loaded back in)


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  
Successfully installed 'ChimeraX_ISOLDE-1.0rc1-cp37-cp37m-linux_x86_64.whl'  
Looking in indexes: https://pypi.org/simple,
https://cxtoolshed.rbvi.ucsf.edu/pypi/  
Processing
/home/tic20/.cache/ChimeraX/1.0/installers/ChimeraX_ISOLDE-1.0rc1-cp37-cp37m-linux_x86_64.whl  
Requirement already satisfied, skipping upgrade: ChimeraX-Clipper~=0.13.0 in
/home/tic20/.local/share/ChimeraX/1.0/site-packages (from ChimeraX-
ISOLDE==1.0rc1) (0.13.0)  
Requirement already satisfied, skipping upgrade: ChimeraX-Arrays~=1.0 in
/opt/UCSF/ChimeraX/lib/python3.7/site-packages (from ChimeraX-ISOLDE==1.0rc1)
(1.0)  
Requirement already satisfied, skipping upgrade: ChimeraX-Atomic>=1.0 in
/opt/UCSF/ChimeraX/lib/python3.7/site-packages (from ChimeraX-ISOLDE==1.0rc1)
(1.0)  
Requirement already satisfied, skipping upgrade: ChimeraX-
Core~=1.0rc202005052344 in /opt/UCSF/ChimeraX/lib/python3.7/site-packages
(from ChimeraX-ISOLDE==1.0rc1) (1.0)  
Requirement already satisfied, skipping upgrade: ChimeraX-Graphics~=1.0 in
/opt/UCSF/ChimeraX/lib/python3.7/site-packages (from ChimeraX-
Atomic>=1.0->ChimeraX-ISOLDE==1.0rc1) (1.0)  
Requirement already satisfied, skipping upgrade: ChimeraX-Geometry~=1.0 in
/opt/UCSF/ChimeraX/lib/python3.7/site-packages (from ChimeraX-
Atomic>=1.0->ChimeraX-ISOLDE==1.0rc1) (1.0)  
Installing collected packages: ChimeraX-ISOLDE  
Attempting uninstall: ChimeraX-ISOLDE  
Found existing installation: ChimeraX-ISOLDE 1.0rc1  
Uninstalling ChimeraX-ISOLDE-1.0rc1:  
Successfully uninstalled ChimeraX-ISOLDE-1.0rc1  
Successfully installed ChimeraX-ISOLDE-1.0rc1  
Lock 139783708619792 acquired on
/home/tic20/.cache/ChimeraX/1.0/toolshed/bundle_info.cache.lock  
Lock 139783708619792 released on
/home/tic20/.cache/ChimeraX/1.0/toolshed/bundle_info.cache.lock  
  

WARNING: You are using pip version 20.1; however, version 20.2 is available.  
You should consider upgrading via the '/usr/bin/chimerax -m pip install
--upgrade pip' command.  
  

> isolde start

> set selectionWidth 4

Done loading forcefield  
Loaded CIF templates for [r2ycgsf] from
/run/media/tic20/storage/Downloads/2ycg-sf.cif  
Loaded CIF templates for [r5lh0sf] from
/run/media/tic20/storage/Downloads/5lh0-sf.cif  
Loaded CIF templates for [r5lh7sf] from
/run/media/tic20/storage/Downloads/5lh7-sf.cif  
Loaded CIF templates for [6I2M] from
/run/media/tic20/storage/Downloads/6i2m.cif  
Loaded CIF templates for [r6i2mAsf] from
/run/media/tic20/storage/Downloads/6i2m-sf.cif  
Loaded CIF templates for [r6idosf] from
/run/media/tic20/storage/Downloads/6ido-sf.cif  
Loaded CIF templates for [6O24] from
/run/media/tic20/storage/Downloads/6o24_final.cif  
Loaded CIF templates for [comp_list, comp_BAM] from
/run/media/tic20/storage/Downloads/bam.cif  
Loaded CIF templates for [comp_list, comp_BAM] from
/run/media/tic20/storage/Downloads/BAM.cif  
Loaded CIF templates for [CDL] from /run/media/tic20/storage/Downloads/CDL.cif  
Loaded CIF templates for [D3R] from /run/media/tic20/storage/Downloads/D3R.cif  
You will now be able to add these residues to your model with ""isolde add
ligand {ID}"". To be able to simulate them, you will need to provide matching
ffXML MD parameterisations.  

> 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"")  

> open 1k82 format mmcif fromDatabase pdb

1k82 title:  
Crystal structure of E.coli formamidopyrimidine-DNA glycosylase (Fpg)
covalently trapped with DNA [more info...]  
  
Chain information for 1k82 #1  
---  
Chain | Description  
A B C D | formamidopyrimidine-DNA glycosylase  
E F G H | 5'-D(*GP*GP*CP*TP*TP*CP*CP*TP*CP*CP*TP*GP*G)-3'  
I J K L | 5'-D(*CP*CP*ap*GP*GP*ap*(ped)P*GP*ap*ap*GP*CP*C)-3'  
  
Non-standard residues in 1k82 #1  
---  
PED — pentane-3,4-diol-5-phosphate (open form of
1'-2'-dideoxyribofuranose-5'-phosphate)  
ZN — zinc ion  
  
1k82 mmCIF Assemblies  
---  
1| author_defined_assembly  
2| author_defined_assembly  
3| author_defined_assembly  
4| author_defined_assembly  
  
1k82 title:  
Crystal structure of E.coli formamidopyrimidine-DNA glycosylase (Fpg)
covalently trapped with DNA [more info...]  
  
Chain information for 1k82  
---  
Chain | Description  
1.2/A 1.2/B 1.2/C 1.2/D | formamidopyrimidine-DNA glycosylase  
1.2/E 1.2/F 1.2/G 1.2/H | 5'-D(*GP*GP*CP*TP*TP*CP*CP*TP*CP*CP*TP*GP*G)-3'  
1.2/I 1.2/J 1.2/K 1.2/L | 5'-D(*CP*CP*ap*GP*GP*ap*(ped)P*GP*ap*ap*GP*CP*C)-3'  
  
Non-standard residues in 1k82 #1.2  
---  
PED — pentane-3,4-diol-5-phosphate (open form of
1'-2'-dideoxyribofuranose-5'-phosphate)  
ZN — zinc ion  
  
1k82 mmCIF Assemblies  
---  
1| author_defined_assembly  
2| author_defined_assembly  
3| author_defined_assembly  
4| author_defined_assembly  
  

> close #1

Deleting atomic symmetry model...  




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        4.5G         49G        165M        8.7G         57G
	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: elbow.D3R_cif.001.cif

}}}

[attachment:""elbow.D3R_cif.001.cif""]
"	enhancement	assigned	normal		Input/Output								all	ChimeraX
