AI-assisted development of the xcif CIF parser for cctbx

Source article: Experiences developing structural biology tools with AI coding assistance

Large language models (LLMs) offer significant potential to accelerate scientific software development, yet their application to structural biology algorithms requires rigorous evaluation. This challenge is examined through the development of xcif, a new native parser for the crystallographic information file (CIF) format, designed to replace a stable but slow parser (ucif) in the Computational Crystallography Toolbox (cctbx). Using an expert-led, artificial intelligence (AI)-assisted workflow, implementation ti…

Experiences developing structural biology tools with AI coding assistance
A system of Fortran IV computer programs for crystal structure computations / Larry W. Finger, and Edward Prince. by Finger, Larry W.; Prince, Edward.. Public domain
Trace impact readingContested
P 68The P score combines the specificity and measured human impact of the grounded problem claim with the strength of this Trace’s cited sources.

Both sides are scored from claims and sources, not community votes.

G 69The G score combines the specificity and measured human impact of the grounded gain claim with the strength of this Trace’s cited sources.

In brief

Researchers described building xcif, a native parser for the crystallographic information file format, to replace the stable but slow ucif parser in the Computational Crystallography Toolbox. They used an expert-led workflow with an AI coding assistant and reported cutting the effort from months to roughly a week of active human work.

The case suggests AI can help modernize mature scientific software, but the speedup depended on experienced people who set constraints and checked results. The evidence comes from a single project, so how well the approach carries over to other tools or less experienced teams is not established.

Main points

  1. The target was a replacement for the ucif parser, which was stable but slow, inside cctbx.
  2. Human effort fell from an estimated several months to about one week.
  3. Testing on about 550 000 archive files showed output identical to both the legacy parser and GEMMI.
  4. xcif was about 10 times faster than the legacy parser and 1.3-1.5 times faster than GEMMI, with lower peak memory on larger files.
  5. The human burden moved from writing code to independent validation.

The gain

With expert-led AI assistance, a replacement CIF parser was built in about one week of active human effort instead of an estimated several months, and it runs much faster than the legacy parser.

The problem

AI-generated code was plausible but flawed, so the work depended entirely on domain experts to specify constraints, catch errors and design adversarial tests.

The rundown

The authors framed the project as a rigorous evaluation of large language models for structural biology algorithms. xcif was the test case, designed to replace the existing cctbx CIF parser.

Validation was a key step. Running the parser across roughly 550 000 archive files confirmed identical output to the legacy implementation and to GEMMI, a modern high-performance parser.

On performance, xcif was roughly an order of magnitude faster than the legacy cctbx parser and 1.3-1.5 times faster than GEMMI. It also reduced peak memory use for larger files.

The authors conclude that AI assistance is a practical, cost-effective route to renewing mature infrastructure, provided development is governed by expert oversight and objective verification.

What this doesn’t fix

The efficiency gain relied entirely on domain expertise to constrain the AI, catch flawed code and design adversarial tests, so the result may not hold without such oversight.

The debate