Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#1526 closed defect (fixed)

mmCIF _entity category not properly formatted

Reported by: lpravda@… Owned by: Greg Couch
Priority: normal Milestone: 1.0
Component: Input/Output Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Darwin-18.2.0-x86_64-i386-64bit
ChimeraX Version: 0.8 (2018-12-12)
Description
chimerax writes out invalid cif files. Category _entity is not properly formated when serialized in the mmcif format. E.g. 2qaf.

2 non-polymer URIDINE-5'-MONOPHOSPHATE
should read: 
2 non-polymer "URIDINE-5'-MONOPHOSPHATE" 

Log:
UCSF ChimeraX version: 0.8 (2018-12-12)  
How to cite UCSF ChimeraX  

> open 2qaf

Summary of feedback from opening 2qaf fetched from pdb  
---  
note | Fetching compressed mmCIF 2qaf from
http://files.rcsb.org/download/2qaf.cif  
  
2qaf title:  
Crystal structure of Plasmodium falciparum orotidine 5'-phosphate
decarboxylase covalently modified by 6-iodo-UMP [more info...]  
  
Chain information for 2qaf #1  
---  
Chain | Description  
A B | Orotidine 5' monophosphate decarboxylase  
  
Non-standard residues in 2qaf #1  
---  
SO4 — sulfate ion  
U5P — uridine-5'-monophosphate  
  
  

> help help:contact.html




OpenGL version: 4.1 ATI-2.4.9
OpenGL renderer: AMD Radeon Pro 560 OpenGL Engine
OpenGL vendor: ATI Technologies Inc.
File attachment: 2qaf_h.cif

2qaf_h.cif

Attachments (1)

2qaf_h.cif (942.8 KB ) - added by lpravda@… 7 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (9)

by lpravda@…, 7 years ago

Attachment: 2qaf_h.cif added

Added by email2trac

comment:1 by Eric Pettersen, 7 years ago

Component: UnassignedInput/Output
Milestone: 1.0
Owner: set to Greg Couch
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionmmCIF _entity category not properly formatted

Reported by Lukas Pravda

comment:2 by Greg Couch, 7 years ago

Status: assignedaccepted

comment:3 by Greg Couch, 7 years ago

Resolution: fixed
Status: acceptedclosed

Now quote a string if a quote is anywhere in it.

in reply to:  5 comment:4 by lpravda@…, 7 years ago

Hi Greg,

Thanks for looking into it so quickly. However, I'm afraid that the patch you have introduced is incorrect. If the field contains ' you cannot quote it with the same character. This mmcif is still invalid. Instead you need to use double quotes. So the field should look like:

"URIDINE-5'-MONOPHOSPHATE"

Best,
Lukas

On 12/12/2018, 23:35, "ChimeraX" <ChimeraX-bugs-admin@cgl.ucsf.edu> wrote:

    #1526: mmCIF _entity category not properly formatted
    -----------------------------------+--------------------
              Reporter:  lpravda@…     |      Owner:  gregc
                  Type:  defect        |     Status:  closed
              Priority:  normal        |  Milestone:  1.0
             Component:  Input/Output  |    Version:
            Resolution:  fixed         |   Keywords:
            Blocked By:                |   Blocking:
    Notify when closed:                |   Platform:  all
               Project:  ChimeraX      |
    -----------------------------------+--------------------
    Changes (by gregc):
    
     * status:  accepted => closed
     * resolution:   => fixed
    
    
    Comment:
    
     Now quote a string if a quote is anywhere in it.
    
    --
    Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/1526#comment:3>
    ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
    ChimeraX Issue Tracker
    


in reply to:  6 ; comment:5 by Greg Couch, 7 years ago

Look at section 15 of the CIF 1.1 specification, 
https://www.iucr.org/resources/cif/spec/version1.1/cifsyntax.  It 
explicitly says that using the same quote character is legal.

     -- Greg

On 12/13/2018 3:06 AM, Lukas Pravda wrote:

in reply to:  7 ; comment:6 by lpravda@…, 7 years ago

Hi Greg,

Wow that would never occurred to me that something like this is legal. However, the specs say that this is valid only in the case when a quote is followed by a non-whitespace character, so the previous line in the same file is still broken and needs to be double quoted. In PDB files all is double quoted in these cases, hence the confusion. 

Sorry, should have mentioned that example in the first place:

1 polymer     'Orotidine 5' monophosphate decarboxylase'

Best,
Lukas
 

On 13/12/2018, 16:37, "Greg Couch" <gregc@cgl.ucsf.edu> wrote:

    Look at section 15 of the CIF 1.1 specification, 
    https://www.iucr.org/resources/cif/spec/version1.1/cifsyntax.  It 
    explicitly says that using the same quote character is legal.
    
         -- Greg
    
    On 12/13/2018 3:06 AM, Lukas Pravda wrote:
    > Hi Greg,
    >
    > Thanks for looking into it so quickly. However, I'm afraid that the patch you have introduced is incorrect. If the field contains ' you cannot quote it with the same character. This mmcif is still invalid. Instead you need to use double quotes. So the field should look like:
    >
    > "URIDINE-5'-MONOPHOSPHATE"
    >
    > Best,
    > Lukas
    >
    > On 12/12/2018, 23:35, "ChimeraX" <ChimeraX-bugs-admin@cgl.ucsf.edu> wrote:
    >
    >      #1526: mmCIF _entity category not properly formatted
    >      -----------------------------------+--------------------
    >                Reporter:  lpravda@…     |      Owner:  gregc
    >                    Type:  defect        |     Status:  closed
    >                Priority:  normal        |  Milestone:  1.0
    >               Component:  Input/Output  |    Version:
    >              Resolution:  fixed         |   Keywords:
    >              Blocked By:                |   Blocking:
    >      Notify when closed:                |   Platform:  all
    >                 Project:  ChimeraX      |
    >      -----------------------------------+--------------------
    >      Changes (by gregc):
    >      
    >       * status:  accepted => closed
    >       * resolution:   => fixed
    >      
    >      
    >      Comment:
    >      
    >       Now quote a string if a quote is anywhere in it.
    >      
    >      --
    >      Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/1526#comment:3>
    >      ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
    >      ChimeraX Issue Tracker
    >      
    >
    >
    >
    


comment:7 by Greg Couch, 7 years ago

Ack. I though I tested that case. Yes it is a bug.

comment:8 by Greg Couch, 7 years ago

Fixed.

Note: See TracTickets for help on using tickets.