Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3530 closed defect (not a bug)

setattr type conflict

Reported by: santiago.jus.are@… Owned by: pett
Priority: normal Milestone:
Component: Structure Analysis Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Windows-10-10.0.18362
ChimeraX Version: 1.0 (2020-06-04 23:15:07 UTC)
Description
Goog morning, setattr attribute is not able to recognize a value with fractional number?.
I am trying to set an attribute with for instance: 0.999362813814197, but we obtain an error.

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 6y2g

Summary of feedback from opening 6y2g fetched from pdb  
---  
warning | Unable to infer polymer connectivity due to unspecified label_seq_id
for residue "GLY" near line 6023  
notes | Fetching compressed mmCIF 6y2g from
http://files.rcsb.org/download/6y2g.cif  
Fetching CCD O6K from http://ligand-expo.rcsb.org/reports/O/O6K/O6K.cif  
  
6y2g title:  
Crystal structure (orthorhombic form) of the complex resulting from the
reaction between SARS-CoV-2 (2019-nCoV) main protease and tert-butyl
(1-((S)-1-(((S)-4-(benzylamino)-3,4-dioxo-1-((S)-2-oxopyrrolidin-3-yl)butan-2-yl)amino)-3-cyclopropyl-1-oxopropan-2-yl)-2-oxo-1,2-dihydropyridin-3-yl)carbamate
(alpha-ketoamide 13b) [more info...]  
  
Chain information for 6y2g #1  
---  
Chain | Description  
A B | Replicase polyprotein 1ab  
  
Non-standard residues in 6y2g #1  
---  
O6K — ~{tert}-butyl
~{N}-[1-[(2~{S})-3-cyclopropyl-1-oxidanylidene-1-[[(2~{S},3~{R})-3-oxidanyl-4-oxidanylidene-1-[(3~{S})-2-oxidanylidenepyrrolidin-3-yl]-4-[(phenylmethyl)amino]butan-2-yl]amino]propan-2-yl]-2-oxidanylidene-
pyridin-3-yl]carbamate  
  

> ~show

> select clear

> select 1

Expected an objects specifier or a keyword  

> select :1

12 atoms, 10 bonds, 1 model selected  

> setattr :1 residues identity 1 create true

Assigning identity attribute to 2 items  

> color byattribute identity /a palette 0,blue:1,red

2569 atoms, 496 residues, atom identity range 1 to 1  

> select clear

> color byattribute identity palette 0,blue:1,red

5072 atoms, 920 residues, atom identity range 1 to 1  

> setattr :1,:2 residues identity 1,1 create true

Expected a keyword  

> setattr :1-2 residues identity 1,1 create true

Assigning identity attribute to 4 items  
Traceback (most recent call last):  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\cmd_line\tool.py", line 258, in execute  
cmd.run(cmd_text)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\std_commands\setattr.py", line 94, in set_attr  
register_attr(session, items.object_class, attr_name, type(value))  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\std_commands\setattr.py", line 130, in register_attr  
class_obj.register_attr(session, attr_name, "setattr command",
attr_type=attr_type)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 50, in register_attr  
cls._attr_registration.register(session, attr_name, registerer, default_value,
(attr_type, can_return_none))  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 78, in register  
" registration by %s" % (attr_name, self.class_.__name__, registrant,
prev_registrant))  
ValueError: Registration of attr 'identity' with Residue by setattr command
conflicts with previous registration by setattr command  
  
ValueError: Registration of attr 'identity' with Residue by setattr command
conflicts with previous registration by setattr command  
  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 78, in register  
" registration by %s" % (attr_name, self.class_.__name__, registrant,
prev_registrant))  
  
See log for complete Python traceback.  
  

> setattr :1-2 residues identity 1 create true

Assigning identity attribute to 4 items  

> color byattribute identity palette 0,blue:1,red

5072 atoms, 920 residues, atom identity range 1 to 1  

> setattr :3 residues identity 1,1 create true

Assigning identity attribute to 2 items  
Traceback (most recent call last):  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\cmd_line\tool.py", line 258, in execute  
cmd.run(cmd_text)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\std_commands\setattr.py", line 94, in set_attr  
register_attr(session, items.object_class, attr_name, type(value))  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\std_commands\setattr.py", line 130, in register_attr  
class_obj.register_attr(session, attr_name, "setattr command",
attr_type=attr_type)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 50, in register_attr  
cls._attr_registration.register(session, attr_name, registerer, default_value,
(attr_type, can_return_none))  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 78, in register  
" registration by %s" % (attr_name, self.class_.__name__, registrant,
prev_registrant))  
ValueError: Registration of attr 'identity' with Residue by setattr command
conflicts with previous registration by setattr command  
  
ValueError: Registration of attr 'identity' with Residue by setattr command
conflicts with previous registration by setattr command  
  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 78, in register  
" registration by %s" % (attr_name, self.class_.__name__, registrant,
prev_registrant))  
  
See log for complete Python traceback.  
  

> setattr :3 residues identity 1 create true

Assigning identity attribute to 2 items  

> color byattribute identity palette 0,blue:1,red

5072 atoms, 920 residues, atom identity range 1 to 1  

> help help:devel

> ui tool show Shell

> close session

> open 6y2g format mmcif fromDatabase pdb

Summary of feedback from opening 6y2g fetched from pdb  
---  
warning | Unable to infer polymer connectivity due to unspecified label_seq_id
for residue "GLY" near line 6023  
  
6y2g title:  
Crystal structure (orthorhombic form) of the complex resulting from the
reaction between SARS-CoV-2 (2019-nCoV) main protease and tert-butyl
(1-((S)-1-(((S)-4-(benzylamino)-3,4-dioxo-1-((S)-2-oxopyrrolidin-3-yl)butan-2-yl)amino)-3-cyclopropyl-1-oxopropan-2-yl)-2-oxo-1,2-dihydropyridin-3-yl)carbamate
(alpha-ketoamide 13b) [more info...]  
  
Chain information for 6y2g #1  
---  
Chain | Description  
A B | Replicase polyprotein 1ab  
  
Non-standard residues in 6y2g #1  
---  
O6K — ~{tert}-butyl
~{N}-[1-[(2~{S})-3-cyclopropyl-1-oxidanylidene-1-[[(2~{S},3~{R})-3-oxidanyl-4-oxidanylidene-1-[(3~{S})-2-oxidanylidenepyrrolidin-3-yl]-4-[(phenylmethyl)amino]butan-2-yl]amino]propan-2-yl]-2-oxidanylidene-
pyridin-3-yl]carbamate  
  

> open script.cxs

No such file/path: script.cxs  
No such database 'C'  

> open C:\Users\Santiago\Escritorio\script.csx

Unrecognized file suffix '.csx'  

> open C:\Users\Santiago\Escritorio\script.cxc

> setattr :1 residues identity 1 create true

Assigning identity attribute to 2 items  

> color byattribute identity /a palette 0,blue:1,red

2569 atoms, 496 residues, atom identity range 1 to 1  
executed script.cxc  

> ~show

> open C:\Users\Santiago\Escritorio\script.cxc

> setattr :1 residues identity 1 create true

Assigning identity attribute to 2 items  

> color byattribute identity /a palette 0,blue:1,red

2569 atoms, 496 residues, atom identity range 1 to 1  
executed script.cxc  

> open C:\Users\Santiago\Escritorio\script.cxc

> setattr :1 residues identity 1 create true

Assigning identity attribute to 2 items  

> color byattribute identity /a palette 0,blue:1,red

2569 atoms, 496 residues, atom identity range 1 to 1  
executed script.cxc  

> open C:\Users\Santiago\Escritorio\script.cxc

> setattr :1 residues identity 1 create true

Assigning identity attribute to 2 items  

> color byattribute identity /a palette 0,blue:1,red

2569 atoms, 496 residues, atom identity range 1 to 1  
executed script.cxc  

> open C:\Users\Santiago\Escritorio\script.cxc

> setattr :1 residues identity 1 create true

Assigning identity attribute to 2 items  

> color byattribute identity palette 0,blue:1,red

5072 atoms, 920 residues, atom identity range 1 to 1  
executed script.cxc  
No such database 'G'  

> open C:\Users\Santiago\Escritorio\nsp5_attribute_chimerax.cxc

> setattr :1 identity_nsp5 1 create true

Expected a keyword  

> open C:\Users\Santiago\Escritorio\nsp5_attribute_chimerax.cxc

> setattr :1 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :2 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :3 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :4 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :5 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :6 residues identity_nsp5 0.999362813814197 create true

Assigning identity_nsp5 attribute to 2 items  
Traceback (most recent call last):  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\cmd_line\tool.py", line 258, in execute  
cmd.run(cmd_text)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\open_command\cmd.py", line 101, in cmd_open  
Command(session, registry=registry).run(provider_cmd_text, log=log)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\open_command\cmd.py", line 152, in provider_open  
name or model_name_from_path(fi.file_name)), provider_kw)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\open_command\cmd.py", line 365, in collated_open  
return func(*func_args, **func_kw)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core_formats\\__init__.py", line 37, in open  
return open_command_script(session, data, file_name)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\scripting.py", line 139, in open_command_script  
run(session, text)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\run.py", line 31, in run  
results = command.run(text, log=log)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\std_commands\setattr.py", line 94, in set_attr  
register_attr(session, items.object_class, attr_name, type(value))  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\std_commands\setattr.py", line 130, in register_attr  
class_obj.register_attr(session, attr_name, "setattr command",
attr_type=attr_type)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 50, in register_attr  
cls._attr_registration.register(session, attr_name, registerer, default_value,
(attr_type, can_return_none))  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 78, in register  
" registration by %s" % (attr_name, self.class_.__name__, registrant,
prev_registrant))  
ValueError: Registration of attr 'identity_nsp5' with Residue by setattr
command conflicts with previous registration by setattr command  
  
ValueError: Registration of attr 'identity_nsp5' with Residue by setattr
command conflicts with previous registration by setattr command  
  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 78, in register  
" registration by %s" % (attr_name, self.class_.__name__, registrant,
prev_registrant))  
  
See log for complete Python traceback.  
  

> close session

> open 6y2g format mmcif fromDatabase pdb

Summary of feedback from opening 6y2g fetched from pdb  
---  
warning | Unable to infer polymer connectivity due to unspecified label_seq_id
for residue "GLY" near line 6023  
  
6y2g title:  
Crystal structure (orthorhombic form) of the complex resulting from the
reaction between SARS-CoV-2 (2019-nCoV) main protease and tert-butyl
(1-((S)-1-(((S)-4-(benzylamino)-3,4-dioxo-1-((S)-2-oxopyrrolidin-3-yl)butan-2-yl)amino)-3-cyclopropyl-1-oxopropan-2-yl)-2-oxo-1,2-dihydropyridin-3-yl)carbamate
(alpha-ketoamide 13b) [more info...]  
  
Chain information for 6y2g #1  
---  
Chain | Description  
A B | Replicase polyprotein 1ab  
  
Non-standard residues in 6y2g #1  
---  
O6K — ~{tert}-butyl
~{N}-[1-[(2~{S})-3-cyclopropyl-1-oxidanylidene-1-[[(2~{S},3~{R})-3-oxidanyl-4-oxidanylidene-1-[(3~{S})-2-oxidanylidenepyrrolidin-3-yl]-4-[(phenylmethyl)amino]butan-2-yl]amino]propan-2-yl]-2-oxidanylidene-
pyridin-3-yl]carbamate  
  

> open C:\Users\Santiago\Escritorio\nsp5_attribute_chimerax.cxc

> setattr :1 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :2 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :3 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :4 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :5 residues identity_nsp5 1 create true

Assigning identity_nsp5 attribute to 2 items  

> setattr :6 residues identity_nsp5 0.999362813814197 create true

Assigning identity_nsp5 attribute to 2 items  
Traceback (most recent call last):  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\cmd_line\tool.py", line 258, in execute  
cmd.run(cmd_text)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\open_command\cmd.py", line 101, in cmd_open  
Command(session, registry=registry).run(provider_cmd_text, log=log)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\open_command\cmd.py", line 152, in provider_open  
name or model_name_from_path(fi.file_name)), provider_kw)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\open_command\cmd.py", line 365, in collated_open  
return func(*func_args, **func_kw)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core_formats\\__init__.py", line 37, in open  
return open_command_script(session, data, file_name)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\scripting.py", line 139, in open_command_script  
run(session, text)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\run.py", line 31, in run  
results = command.run(text, log=log)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\std_commands\setattr.py", line 94, in set_attr  
register_attr(session, items.object_class, attr_name, type(value))  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\std_commands\setattr.py", line 130, in register_attr  
class_obj.register_attr(session, attr_name, "setattr command",
attr_type=attr_type)  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 50, in register_attr  
cls._attr_registration.register(session, attr_name, registerer, default_value,
(attr_type, can_return_none))  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 78, in register  
" registration by %s" % (attr_name, self.class_.__name__, registrant,
prev_registrant))  
ValueError: Registration of attr 'identity_nsp5' with Residue by setattr
command conflicts with previous registration by setattr command  
  
ValueError: Registration of attr 'identity_nsp5' with Residue by setattr
command conflicts with previous registration by setattr command  
  
File "C:\Program Files\ChimeraX 1.0\bin\lib\site-
packages\chimerax\atomic\attr_registration.py", line 78, in register  
" registration by %s" % (attr_name, self.class_.__name__, registrant,
prev_registrant))  
  
See log for complete Python traceback.  
  




OpenGL version: 3.3.0 NVIDIA 388.16
OpenGL renderer: GeForce GTX 1060/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
Manufacturer: Acer
Model: Predator G3-572
OS: Microsoft Windows 10 Home Single Language (Build 18362)
Memory: 17,057,812,480
MaxProcessMemory: 137,438,953,344
CPU: 8 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz"
PyQt version: 5.12.3
Compiled Qt version: 5.12.4
Runtime Qt version: 5.12.8

Change History (6)

comment:1 by pett, 5 years ago

Component: UnassignedStructure Analysis
Owner: set to pett
Platform: all
Project: ChimeraX
Status: newaccepted
Summary: ChimeraX bug report submissionsetattr type conflict

comment:2 by pett, 5 years ago

Resolution: not a bug
Status: acceptedclosed

Hi Santiago,

Values for attributes created with 'setattr' have to have the same type, and integers and floating-point values are considered different types for this purpose. Therefore the simplest way to do what you want is to set the the attribute to 1.0 instead of just '1', so that all values will be floating point. Sorry for the hassle.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab

in reply to:  3 ; comment:3 by santiago.jus.are@…, 5 years ago

Ok, i got it, thanks for your answer. I hope that you can implement soon
the 2d labels for scale colors.

Em seg., 20 de jul. de 2020 às 11:40, ChimeraX <
ChimeraX-bugs-admin@cgl.ucsf.edu> escreveu:

comment:4 by pett, 5 years ago

The color key is definitely a priority, but it is competing with several other priorities. So "soon-ish", but maybe not immediately.

in reply to:  5 ; comment:5 by santiago.jus.are@…, 5 years ago

if you are able to answer this question just as an user curiosity. Which
are the priorities in development for chimeraX?

Thank you very much in advance for your answer

Em seg., 20 de jul. de 2020 às 11:49, ChimeraX <
ChimeraX-bugs-admin@cgl.ucsf.edu> escreveu:

comment:6 by pett, 5 years ago

Well our funding sources determine our priorities to some extent, so things like partial charge determination and VR will get more development resources than other priorities that we might otherwise work on. Such other things, like color key, will get worked on -- just somewhat less than they would otherwise.

--Eric

Note: See TracTickets for help on using tickets.