Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#6524 closed defect (duplicate)

Loss of occupancy/bfactor

Reported by: mhunkeler@… Owned by: Eric Pettersen
Priority: normal Milestone:
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:        macOS-10.14.6-x86_64-i386-64bit
ChimeraX Version: 1.4.dev202202040724 (2022-02-04 07:24:35 UTC)
Description
Hi,

Thanks for actively developing this great piece of software! I encountered what I think is a bug.

When saving a pdb file chimeraX sets accupancy & B-factors of all atoms to 0! I can't imagine that this is the intended behavior, since it represents a loss of information and leads to a lot of problems in downstream applications in other software. In addition, also the space group information ('P 1' on the CRYST1 line) is lost after saving.

here snippets from two pdb files, before and after saving in chimeraX (literaly just opened the pdb and then saved it immediately):

BEFORE:
"HELIX    1   1 HIS A   32  MET A   35  1                                   4
CRYST1  396.000  396.000  396.000  90.00  90.00  90.00 P 1                      
ATOM      1  N   ASN A  31     207.656 273.296 178.276  1.00 30.00           N
ATOM      2  CA  ASN A  31     209.106 273.230 178.470  1.00 30.00           C
ATOM      3  C   ASN A  31     209.615 271.997 177.753  1.00 30.00           C
ATOM      4  O   ASN A  31     210.628 272.124 177.095  1.00 30.00           O
ATOM      5  CB  ASN A  31     209.476 273.204 179.954  1.00 30.00           C
ATOM      6  CG  ASN A  31     209.279 274.547 180.628  1.00 30.00           C
ATOM      7  OD1 ASN A  31     209.276 275.589 179.973  1.00 30.00           O
ATOM      8  ND2 ASN A  31     209.113 274.529 181.946  1.00 30.00           N"

AFTER SAVING:
"SEQRES   1 A    9  ASN HIS ASP ASN MET CYS LYS VAL LYS
HELIX    1   1 HIS A   32  MET A   35  1                                   4
CRYST1  396.000  396.000  396.000  90.00  90.00  90.00 
ATOM      1  N   ASN A  31     207.656 273.296 178.276  0.00  0.00           N
ATOM      2  CA  ASN A  31     209.106 273.230 178.470  0.00  0.00           C
ATOM      3  C   ASN A  31     209.615 271.997 177.753  0.00  0.00           C
ATOM      4  O   ASN A  31     210.628 272.124 177.095  0.00  0.00           O
ATOM      5  CB  ASN A  31     209.476 273.204 179.954  0.00  0.00           C
ATOM      6  CG  ASN A  31     209.279 274.547 180.628  0.00  0.00           C
ATOM      7  OD1 ASN A  31     209.276 275.589 179.973  0.00  0.00           O
ATOM      8  ND2 ASN A  31     209.113 274.529 181.946  0.00  0.00           N"

Best,

Moritz

OpenGL version: 4.1 INTEL-12.10.31
OpenGL renderer: Intel(R) Iris(TM) Pro Graphics 6200
OpenGL vendor: Intel Inc.

Locale: UTF-8
Qt version: PyQt5 5.15.2, Qt 5.15.2
Qt platform: cocoa
Hardware:

    Hardware Overview:

      Model Name: iMac
      Model Identifier: iMac16,2
      Processor Name: Intel Core i5
      Processor Speed: 3.1 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 4 MB
      Memory: 16 GB
      Boot ROM Version: 427.140.8.0.0
      SMC Version (system): 2.32f20

Software:

    System Software Overview:

      System Version: macOS 10.14.6 (18G9323)
      Kernel Version: Darwin 18.7.0
      Time since boot: 46 days 1:57

Graphics/Displays:

    Intel Iris Pro Graphics 6200:

      Chipset Model: Intel Iris Pro Graphics 6200
      Type: GPU
      Bus: Built-In
      VRAM (Dynamic, Max): 1536 MB
      Vendor: Intel
      Device ID: 0x1622
      Revision ID: 0x000a
      Metal: Supported, feature set macOS GPUFamily1 v4
      Displays:
        DELL P2217H:
          Resolution: 1920 x 1080 (1080p FHD - Full High Definition)
          UI Looks like: 1920 x 1080 @ 60 Hz
          Framebuffer Depth: 30-Bit Color (ARGB2101010)
          Display Serial Number: 668VC77B81AB
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Automatically Adjust Brightness: No
          Connection Type: DisplayPort
        HP E190i:
          Resolution: 1280 x 1024 (SXGA - Super eXtended Graphics Array)
          UI Looks like: 1280 x 1024 @ 60 Hz
          Framebuffer Depth: 30-Bit Color (ARGB2101010)
          Display Serial Number: CN47280B9M  
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Automatically Adjust Brightness: No
        iMac:
          Display Type: Built-In Retina LCD
          Resolution: 4096 x 2304 Retina
          Framebuffer Depth: 30-Bit Color (ARGB2101010)
          Display Serial Number: 678221B832F23
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Automatically Adjust Brightness: No


Installed Packages:
    alabaster: 0.7.12
    appdirs: 1.4.4
    appnope: 0.1.2
    Babel: 2.9.1
    backcall: 0.2.0
    blockdiag: 3.0.0
    certifi: 2021.5.30
    cftime: 1.5.2
    charset-normalizer: 2.0.11
    ChimeraX-AddCharge: 1.2.3
    ChimeraX-AddH: 2.1.11
    ChimeraX-AlignmentAlgorithms: 2.0
    ChimeraX-AlignmentHdrs: 3.2
    ChimeraX-AlignmentMatrices: 2.0
    ChimeraX-Alignments: 2.2.3
    ChimeraX-AlphaFold: 1.0
    ChimeraX-AltlocExplorer: 1.0.1
    ChimeraX-AmberInfo: 1.0
    ChimeraX-Arrays: 1.0
    ChimeraX-Atomic: 1.35.1
    ChimeraX-AtomicLibrary: 5.0
    ChimeraX-AtomSearch: 2.0
    ChimeraX-AtomSearchLibrary: 1.0
    ChimeraX-AxesPlanes: 2.1
    ChimeraX-BasicActions: 1.1
    ChimeraX-BILD: 1.0
    ChimeraX-BlastProtein: 2.0
    ChimeraX-BondRot: 2.0
    ChimeraX-BugReporter: 1.0
    ChimeraX-BuildStructure: 2.6.1
    ChimeraX-Bumps: 1.0
    ChimeraX-BundleBuilder: 1.1
    ChimeraX-ButtonPanel: 1.0
    ChimeraX-CageBuilder: 1.0
    ChimeraX-CellPack: 1.0
    ChimeraX-Centroids: 1.2
    ChimeraX-ChemGroup: 2.0
    ChimeraX-Clashes: 2.2.2
    ChimeraX-ColorActions: 1.0
    ChimeraX-ColorGlobe: 1.0
    ChimeraX-ColorKey: 1.5.1
    ChimeraX-CommandLine: 1.2
    ChimeraX-ConnectStructure: 2.0
    ChimeraX-Contacts: 1.0
    ChimeraX-Core: 1.4.dev202202040724
    ChimeraX-CoreFormats: 1.1
    ChimeraX-coulombic: 1.3.2
    ChimeraX-Crosslinks: 1.0
    ChimeraX-Crystal: 1.0
    ChimeraX-CrystalContacts: 1.0
    ChimeraX-DataFormats: 1.2.2
    ChimeraX-Dicom: 1.0
    ChimeraX-DistMonitor: 1.1.5
    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.1
    ChimeraX-Hbonds: 2.1.2
    ChimeraX-Help: 1.2
    ChimeraX-HKCage: 1.3
    ChimeraX-IHM: 1.1
    ChimeraX-ImageFormats: 1.2
    ChimeraX-IMOD: 1.0
    ChimeraX-IO: 1.0.1
    ChimeraX-ItemsInspection: 1.0
    ChimeraX-Label: 1.1
    ChimeraX-ListInfo: 1.1.1
    ChimeraX-Log: 1.1.5
    ChimeraX-LookingGlass: 1.1
    ChimeraX-Maestro: 1.8.1
    ChimeraX-Map: 1.1
    ChimeraX-MapData: 2.0
    ChimeraX-MapEraser: 1.0
    ChimeraX-MapFilter: 2.0
    ChimeraX-MapFit: 2.0
    ChimeraX-MapSeries: 2.1
    ChimeraX-Markers: 1.0
    ChimeraX-Mask: 1.0
    ChimeraX-MatchMaker: 2.0.6
    ChimeraX-MDcrds: 2.6
    ChimeraX-MedicalToolbar: 1.0.1
    ChimeraX-Meeting: 1.0
    ChimeraX-MLP: 1.1
    ChimeraX-mmCIF: 2.6
    ChimeraX-MMTF: 2.1
    ChimeraX-Modeller: 1.5.1
    ChimeraX-ModelPanel: 1.3.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.2
    ChimeraX-OpenCommand: 1.8
    ChimeraX-PDB: 2.6.5
    ChimeraX-PDBBio: 1.0
    ChimeraX-PDBLibrary: 1.0.2
    ChimeraX-PDBMatrices: 1.0
    ChimeraX-PickBlobs: 1.0
    ChimeraX-Positions: 1.0
    ChimeraX-PresetMgr: 1.1
    ChimeraX-PubChem: 2.1
    ChimeraX-ReadPbonds: 1.0.1
    ChimeraX-Registration: 1.1
    ChimeraX-RemoteControl: 1.0
    ChimeraX-ResidueFit: 1.0
    ChimeraX-RestServer: 1.1
    ChimeraX-RNALayout: 1.0
    ChimeraX-RotamerLibMgr: 2.0.1
    ChimeraX-RotamerLibsDunbrack: 2.0
    ChimeraX-RotamerLibsDynameomics: 2.0
    ChimeraX-RotamerLibsRichardson: 2.0
    ChimeraX-SaveCommand: 1.5
    ChimeraX-SchemeMgr: 1.0
    ChimeraX-SDF: 2.0
    ChimeraX-Segger: 1.0
    ChimeraX-Segment: 1.0
    ChimeraX-SelInspector: 1.0
    ChimeraX-SeqView: 2.4.6
    ChimeraX-Shape: 1.0.1
    ChimeraX-Shell: 1.0
    ChimeraX-Shortcuts: 1.1
    ChimeraX-ShowAttr: 1.0
    ChimeraX-ShowSequences: 1.0
    ChimeraX-SideView: 1.0
    ChimeraX-Smiles: 2.1
    ChimeraX-SmoothLines: 1.0
    ChimeraX-SpaceNavigator: 1.0
    ChimeraX-StdCommands: 1.7.6
    ChimeraX-STL: 1.0
    ChimeraX-Storm: 1.0
    ChimeraX-StructMeasure: 1.0.1
    ChimeraX-Struts: 1.0.1
    ChimeraX-Surface: 1.0
    ChimeraX-SwapAA: 2.0
    ChimeraX-SwapRes: 2.1.1
    ChimeraX-TapeMeasure: 1.0
    ChimeraX-Test: 1.0
    ChimeraX-Toolbar: 1.1
    ChimeraX-ToolshedUtils: 1.2.1
    ChimeraX-Tug: 1.0
    ChimeraX-UI: 1.16
    ChimeraX-uniprot: 2.2
    ChimeraX-UnitCell: 1.0
    ChimeraX-ViewDockX: 1.1
    ChimeraX-VIPERdb: 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.4
    cxservices: 1.1
    cycler: 0.11.0
    Cython: 0.29.26
    debugpy: 1.5.1
    decorator: 5.1.1
    docutils: 0.17.1
    entrypoints: 0.4
    filelock: 3.4.2
    fonttools: 4.29.1
    funcparserlib: 1.0.0a0
    grako: 3.16.5
    h5py: 3.6.0
    html2text: 2020.1.16
    idna: 3.3
    ihm: 0.26
    imagecodecs: 2021.11.20
    imagesize: 1.3.0
    ipykernel: 6.6.1
    ipython: 7.31.1
    ipython-genutils: 0.2.0
    jedi: 0.18.1
    Jinja2: 3.0.3
    jupyter-client: 7.1.0
    jupyter-core: 4.9.1
    kiwisolver: 1.3.2
    line-profiler: 3.4.0
    lxml: 4.7.1
    lz4: 3.1.10
    MarkupSafe: 2.0.1
    matplotlib: 3.5.1
    matplotlib-inline: 0.1.3
    msgpack: 1.0.3
    nest-asyncio: 1.5.4
    netCDF4: 1.5.8
    networkx: 2.6.3
    numexpr: 2.8.1
    numpy: 1.22.1
    openvr: 1.16.802
    packaging: 21.0
    ParmEd: 3.4.3
    parso: 0.8.3
    pexpect: 4.8.0
    pickleshare: 0.7.5
    Pillow: 9.0.0
    pip: 21.3.1
    pkginfo: 1.8.2
    prompt-toolkit: 3.0.26
    psutil: 5.9.0
    ptyprocess: 0.7.0
    pycollada: 0.7.2
    pydicom: 2.2.2
    Pygments: 2.11.2
    PyOpenGL: 3.1.5
    PyOpenGL-accelerate: 3.1.5
    pyparsing: 3.0.7
    PyQt5-commercial: 5.15.2
    PyQt5-sip: 12.8.1
    PyQtWebEngine-commercial: 5.15.2
    python-dateutil: 2.8.2
    pytz: 2021.3
    pyzmq: 22.3.0
    qtconsole: 5.2.2
    QtPy: 2.0.1
    RandomWords: 0.3.0
    requests: 2.27.1
    scipy: 1.7.3
    setuptools: 59.8.0
    sfftk-rw: 0.7.1
    six: 1.16.0
    snowballstemmer: 2.2.0
    sortedcontainers: 2.4.0
    Sphinx: 4.3.2
    sphinx-autodoc-typehints: 1.15.2
    sphinxcontrib-applehelp: 1.0.2
    sphinxcontrib-blockdiag: 3.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-community: 1.0.0
    tables: 3.7.0
    tifffile: 2021.11.2
    tinyarray: 1.2.4
    tornado: 6.1
    traitlets: 5.1.1
    urllib3: 1.26.8
    wcwidth: 0.2.5
    webcolors: 1.11.1
    wheel: 0.37.1
    wheel-filename: 1.3.0

Attachments (2)

1gcn_saved_again.pdb (19.2 KB ) - added by mhunkeler@… 4 years ago.
Added by email2trac
1gcn_saved.pdb (19.2 KB ) - added by mhunkeler@… 4 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (7)

comment:1 by Eric Pettersen, 4 years ago

Component: UnassignedInput/Output
Owner: set to Eric Pettersen
Platform: all
Project: ChimeraX
Status: newaccepted
Summary: ChimeraX bug report submissionLoss of occupancy/bfactor

comment:2 by Eric Pettersen, 4 years ago

Status: acceptedfeedback

Hi Moritz,

Thanks for reporting this problem. A simple test did not reproduce it for me. Can you try opening 1gcn and saving it? Do the occupancy/bfactors get zeroed out or do they keep their values? If the former, then try updating your ChimeraX. If the latter, then there's something specific about your PDB file that's making this happen, and I would need access to it (or at least part of it) to track this down.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab

in reply to:  3 ; comment:3 by mhunkeler@…, 4 years ago

Hi Eric, thanks for looking into this!

It is indeed more complicated than I thought, it does not happen every time. Took me a while, but I found a way to reproduce it using 1gcn:


  *   I start with a fresh session (‘close session’)
  *   ‘open 1gcn’
  *   Save it (‘1gcn_saved.pdb’)
  *   Open the just saved model
  *   Save it again (‘1gcn_saved_again.pdb’)

The first one will have the occupancy & bfactors normal, the second one will have them all set to 0. I’m on my laptop right now, but the original bug report was from my work desktop. On my laptop I am running the (I think) latest version, with the tile function ->  1.4.dev202202040724 (2022-02-04). I am pretty sure it’s the same version on my desktop. Below the log of my commands and attached the two pdb files. I saved it through the menu, but from the log file you see differences in the commands: and when saving the first time it is ‘relModel #1’ and when saving the second time, since there are two open models now, it’s saving with ‘models #2’ and not relModel. Also, there are warning when opening the pdb.

Best,
Moritz

-----
close session
open 1gcn

1gcn title:
X-ray analysis of glucagon and its relationship to receptor binding [more info...]
Chain information for 1gcn #1
Chain     Description         UniProt
A             glucagon              GLUC_PIG

save /Users/moritzhunkeler/Desktop/1gcn_saved.pdb relModel #1
open /Users/moritzhunkeler/Desktop/1gcn_saved.pdb
Summary of feedback from opening /Users/moritzhunkeler/Desktop/1gcn_saved.pdb
warnings              Ignored bad PDB record found on line 4


Ignored bad PDB record found on line 253
Chain information for 1gcn_saved.pdb #2
Chain     Description
A             No description available
save /Users/moritzhunkeler/Desktop/1gcn_saved_again.pdb models #2






From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Date: Monday, April 4, 2022 at 12:54
To:
Cc: mhunkeler@crystal.harvard.edu <mhunkeler@crystal.harvard.edu>, pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>
Subject: Re: [ChimeraX] #6524: Loss of occupancy/bfactor
#6524: Loss of occupancy/bfactor
-----------------------------------+----------------------
          Reporter:  mhunkeler@…   |      Owner:  pett
              Type:  defect        |     Status:  feedback
          Priority:  normal        |  Milestone:
         Component:  Input/Output  |    Version:
        Resolution:                |   Keywords:
        Blocked By:                |   Blocking:
Notify when closed:                |   Platform:  all
           Project:  ChimeraX      |
-----------------------------------+----------------------
Changes (by pett):

 * status:  accepted => feedback


Comment:

 Hi Moritz,
         Thanks for reporting this problem.  A simple test did not
 reproduce it for me.  Can you try opening 1gcn and saving it?  Do the
 occupancy/bfactors get zeroed out or do they keep their values?  If the
 former, then try updating your ChimeraX.  If the latter, then there's
 something specific about your PDB file that's making this happen, and I
 would need access to it (or at least part of it) to track this down.

 --Eric

         Eric Pettersen
         UCSF Computer Graphics Lab

--
Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/6524#comment:2>
ChimeraX <https://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

1gcn_saved_again.pdb

1gcn_saved.pdb

by mhunkeler@…, 4 years ago

Attachment: 1gcn_saved_again.pdb added

Added by email2trac

by mhunkeler@…, 4 years ago

Attachment: 1gcn_saved.pdb added

Added by email2trac

comment:4 by Eric Pettersen, 4 years ago

Resolution: duplicate
Status: feedbackclosed

Hi Moritz,

Update your version of ChimeraX. There was a period of 11 days (2/2-2/12, your current ChimeraX is from 2/4) where there was a chance that files with a .pdb suffix would be read by the ZDOCK file reader (which also uses the .pdb suffix) instead of the regular PDB file reader. The ZDOCK reader doesn't use/read the occupancy/bfactor columns. Sorry but it took me awhile to recollect that bug/fix.
If for some reason you can't upgrade right now, you can ensure that a file is read by the normal PDB reader by adding "format pdb" to the open command.

--Eric

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

Omg how unlucky.

Thanks a lot!

Moritz

From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Date: Monday, April 4, 2022 at 20:20
To:
Cc: mhunkeler@crystal.harvard.edu <mhunkeler@crystal.harvard.edu>, pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>
Subject: Re: [ChimeraX] #6524: Loss of occupancy/bfactor
#6524: Loss of occupancy/bfactor
-----------------------------------+--------------------
          Reporter:  mhunkeler@…   |      Owner:  pett
              Type:  defect        |     Status:  closed
          Priority:  normal        |  Milestone:
         Component:  Input/Output  |    Version:
        Resolution:  duplicate     |   Keywords:
        Blocked By:                |   Blocking:
Notify when closed:                |   Platform:  all
           Project:  ChimeraX      |
-----------------------------------+--------------------
Changes (by pett):

 * status:  feedback => closed
 * resolution:   => duplicate


Comment:

 Hi Moritz,
         Update your version of ChimeraX.  There was a period of 11 days
 (2/2-2/12, your current ChimeraX is from 2/4) where there was a chance
 that files with a .pdb suffix would be read by the ZDOCK file reader
 (which also uses the .pdb suffix) instead of the regular PDB file reader.
 The ZDOCK reader doesn't use/read the occupancy/bfactor columns.  Sorry
 but it took me awhile to recollect that bug/fix.
         If for some reason you can't upgrade right now, you can ensure
 that a file is read by the normal PDB reader by adding "format pdb" to the
 open command.

 --Eric

--
Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/6524#comment:4>
ChimeraX <https://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker
Note: See TracTickets for help on using tickets.