GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CIF data incorrect · Issue #1116 · biojava/biojava

CIF data incorrect #1116

New issue
Copy link
New issue
Copy link
Closed
#1117
Closed
CIF data incorrect#1116
#1117
Copy link
Labels
bugBugs and bugfixesBugs and bugfixes

Description

@morellik
morellik
opened on Nov 6, 2025
Issue body actions

I use the following code to read CIF files.

       Structure structure = null;
      AtomCache cache = new AtomCache();
      cache.setPath(workdir);
      cache.setFiletype(StructureFiletype.CIF);
   
      StructureIO.setAtomCache(cache);
  
      structure = StructureIO.getStructure(pdbFile);

and structure.toMMCIF() to convert into a list of strings.

The original CIF has HETATM lines as

HETATM 1049 S S1 . 0KA C 2 . ? -5.639 -7.082 12.045 1.00 17.18 ? 101 0KA B S1 1
HETATM 1051 S S3 . 0KA C 2 . ? -6.031 -7.348 15.700 1.00 16.42 ? 101 0KA B S3 1
HETATM 1052 S S4 . 0KA C 2 . ? -9.120 -7.026 13.781 1.00 13.07 ? 101 0KA B S4 1

But after reading the CIF, I've

HETATM 1049 S S1 . 0KA C 2 101 ? -5.639 -7.082 12.045 1.00 17.18 101 0KA B S1 1
HETATM 1051 S S3 . 0KA C 2 101 ? -6.031 -7.348 15.700 1.00 16.42 101 0KA B S3 1
HETATM 1052 S S4 . 0KA C 2 101 ? -9.120 -7.026 13.781 1.00 13.07 101 0KA B S4 1

The 9th column in the original CIF is a dot; instead, in the structure object is 101 equals the 16th column (the _atom_site.auth_seq_id).

Is there a way to have the same original HETATM lines in the structure object?

Activity

  1. josemduarte commented on Nov 8, 2025

    @josemduarte
    josemduarte
    on Nov 8, 2025
    Contributor
    More actions

    Thanks for reporting. It seems that biojava outputs the residue number to both label_seq_id and auth_seq_id. In principle there's nothing wrong with that, but it is true that traditionally the PDB has not used label_seq_id for non-polymers. I had a quick look and it seems that we could make that the default behaviour with a patch. I'll submit a PR.

  2. josemduarte
    added a commit that references this issue on Nov 8, 2025

    Fix for #1116

    274a36a
  3. josemduarte
    added
    bugBugs and bugfixesBugs and bugfixes
    on Nov 8, 2025
  4. josemduarte
    closed this as completedin #1117on Nov 12, 2025
  5. josemduarte commented on Nov 13, 2025

    @josemduarte
    josemduarte
    on Nov 13, 2025
    Contributor
    More actions

    The fix is now released in BioJava 7.2.3

  6. josemduarte
    added a commit that references this issue on May 5, 2026

    Adding safeguard, bug introduced in #1116 and reported in Biojava-l

    7c3909f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs and bugfixesBugs and bugfixes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.