Skip to content

Always write intra-residue bonds if available#804

Merged
padix-key merged 4 commits intobiotite-dev:mainfrom
padix-key:pdbx-next-gen
May 20, 2025
Merged

Always write intra-residue bonds if available#804
padix-key merged 4 commits intobiotite-dev:mainfrom
padix-key:pdbx-next-gen

Conversation

@padix-key
Copy link
Copy Markdown
Member

With the addition of NextGen PDBx files the include_bonds parameter was previously added to pdbx.set_structure(). This option had the advantage that both the 'classical' PDBx file (without chem_comp_bond category) and 'next-gen' PDBx file (with chem_comp_bond category) could be written.

However, in the meantime the 'next-gen' files have become the new standard files in the PDB, i.e. downloaded PDBx files always contain the chem_comp_bond category. Hence, this parameter does not make sense anymore and in my opinion rather leads to confusion: the struct_conn category (inter-residue bonds) is always written, if bonds are available, but the chem_comp_bond category (intra-residue bonds) is only written if include_bonds=True.

In consequence, this PR deprecates the include_bonds parameter in pdbx.set_structure(). It does not have an effect anymore, and chem_comp_bond is always written if AtomArray.bonds is available.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented May 15, 2025

CodSpeed Performance Report

Merging #804 will degrade performances by 15.97%

Comparing padix-key:pdbx-next-gen (ad3fa31) with main (1d906ba)

Summary

⚡ 1 improvements
❌ 3 (👁 3) regressions
✅ 55 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
👁 benchmark_compress 570.4 ms 678.8 ms -15.97%
👁 benchmark_deserialize_pdbx[cif] 92 ms 107.6 ms -14.48%
👁 benchmark_serialize_pdbx[cif] 176.3 ms 203.5 ms -13.36%
benchmark_set_structure[bcif-False] 11.6 ms 7.9 ms +48.02%

@padix-key
Copy link
Copy Markdown
Member Author

The performance decreased in some benchmarks as the newly downloaded PDBx files have more categories than before.

@padix-key padix-key merged commit c602c14 into biotite-dev:main May 20, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant