Skip to content

Pairs being lost #423

@tdudgeon

Description

@tdudgeon

When reading a Buster output CIF file I'm finding different behaviour in the way the file is read.

Originally I was getting the Document object using

doc = cif.read(input)

and the _refine pairs that are defined in the file, as expected, are all present in the Document.

Then I had to change to using:

struc = gemmi.read_structure(input)
doc = struc.make_mmcif_document()

as I needed to perform operations on the Structure before generating the Document.
But this way results in quite different behaviour.
Firstly the _refine data is now a one-row loop not pairs (surprising, but explainable), but more problematical a lot of the _refine data is missing.

In the source pairs I have:

_refine.entry_id
_refine.pdbx_refine_id
_refine.ls_d_res_high
_refine.ls_d_res_low'
_refine.ls_percent_reflns_obs
_refine.ls_number_reflns_obs
_refine.ls_number_reflns_R_free
_refine.ls_R_factor_obs
_refine.ls_R_factor_R_work
_refine.ls_R_factor_R_free
_refine.pdbx_ls_cross_valid_method
_refine.pdbx_R_Free_selection_details
_refine.B_iso_mean
_refine.aniso_B[1][1]
_refine.aniso_B[2][2]
_refine.aniso_B[3][3]_refine.aniso_B[1][2]
_refine.aniso_B[1][3]
_refine.aniso_B[2][3]
_refine.pdbx_overall_SU_R_Blow_DPI
_refine.pdbx_overall_SU_R_free_Blow_DPI
_refine.overall_SU_R_Cruickshank_DPI
_refine.pdbx_overall_SU_R_free_Cruickshank_DPI
_refine.correlation_coeff_Fo_to_Fc
_refine.correlation_coeff_Fo_to_Fc_free

But in the Document generated via the Structure I only have these in the loop:

_refine.entry_id
_refine.pdbx_refine_id
_refine.ls_d_res_high
_refine.ls_d_res_low
_refine.ls_percent_reflns_obs
_refine.ls_number_reflns_obs
_refine.ls_number_reflns_R_work
_refine.ls_number_reflns_R_free
_refine.ls_R_factor_obs
_refine.ls_R_factor_R_work
_refine.ls_R_factor_R_free
_refine.aniso_B[1][1]
_refine.aniso_B[2][2]
_refine.aniso_B[3][3]
_refine.aniso_B[1][2]
_refine.aniso_B[1][3]
_refine.aniso_B[2][3]

What is happening here? Presumably a bug?

Example file:
BUSTER_model.cif.txt

Example code:
cif_reader.py.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions