arXiv:2610.34029cond-mat.mtrl-sciOct 2026

Manuscript Offprint

arXiv:2610.34029

TCSP3.0: Template-Based Crystal Structure Prediction with Coefficient-Preserving Element Substitution and Structural Diversity

Ying Feng, Jeffrey Hu, Lai Wei, Liang Tao, Madeline Miklos, Dipannoy Das Gupta, Hossein Erfanshekooh, Jianjun Hu

Abstract

Template-based crystal structure prediction (CSP) transfers a known crystal structure to a new composition by element substitution, so its accuracy depends on retrieving suitable templates, mapping elements and ranking the resulting candidates correctly. Auditing the original TCSP2.0 implementation on the T180 benchmark, we found that 469 of its 2,347 selected structures (20%) have the wrong composition, caused by element mappings that ignore stoichiometric coefficients, and sequential text substitution that cascades or corrupts element symbols. Here we propose TCSP3.0, which enforces coefficient-preserving mappings, substitutes species simultaneously on parsed structures and validates every candidate's composition and cell. We further add periodic-number retrieval, soft oxidation-state evidence, radius-compatibility scoring and structural deduplication. It is further enhanced by adding ORB-v3 machine learning potential based relaxation and energy ranking of its exported candidates, widely used by the deep CSP baselines. TCSP3.0 achieves Top-1 and Top-20 match rates of 72.2% and 90.6% on T180, respectively, compared with 28.3% and 45.6% for TCSP2.0. On the new 800-target benchmark (T800), its Top-20 match rate is 74.0%. It also outperforms PNcsp+ and two leading deep learning based generative CSP models, CrystalFlow and MaskGXT, on T180 (Top-1 72.2% versus at most 63.9%); even without any relaxation, the native TCSP3.0 achieves 67.8% at Top-1 and 90.6% at Top-20 in a median of 28 s per target on two CPU cores, about ten times faster than the complete CrystalFlow job (290 s, including its ORB-v3 stage) on 60 additional targets outside T180. Paired ten-arm ablations of the native chemical-score stage on T180 and T800 show that most of the improvement comes from the correctness fixes while structural deduplication significantly improves Top-5 match rate, embedding-based retrieval is required for coverage, and the remaining scoring features have small or null effects on the match rate.

1 Introduction

Discovering new inorganic materials underpins progress in several critical industries, from lithium-ion and solid-state batteries for electric vehicles and grid storage to photovoltaics, catalysts for clean fuels, thermoelectrics and semiconductors. A material's properties are determined by its crystal structure, which fixes its coordination environments, bonding and electronic structure, yet for a compound that has not yet been synthesized this structure is unknown. Crystal structure prediction (CSP), which maps a chemical composition to a periodic arrangement of atoms, is therefore a key step in computational materials discovery. Reliable structure predictions allow promising compositions to be screened for stability and properties before synthesis, narrowing the experimental search and providing starting points for diffraction analysis and first-principles calculations. Recently, diffusion, flow and autoregressive deep learning models [1–4] have emerged as competitive methods that learn to generate structures, including the lattice parameters and atomic coordinates, directly. Template-based prediction algorithms such as TCSP and CSPML [5, 6] offer a complementary route when chemically related structures are available, mirroring how chemists reason by analogy (an unknown phase is assumed to adopt the structure type of a chemically similar known compound): they start from a known atomic arrangement of the templates and focus computation on selecting analogues, transferring elemental sites and ranking and relaxing the resulting candidates. These element-substitution based CSP algorithms have demonstrated highly competitive performance [6–8], which can be evaluated by checking whether a candidate prediction matches a designated reference structure under fixed StructureMatcher settings.

The success of template-based CSP algorithms comes from the fact that many crystal materials reuse related structural prototypes. ICSD [9], the largest collection of experimentally synthesized crystals, records this recurrence through structure-type assignments: its 2019 account assigns about 159,000 entries, approximately 80% of the database, to 9,015 structure types shared by at least two compounds [10]. In a template-based CSP algorithm, successful transfer of structures across different chemistries depends on both structural similarity and chemical compatibility. Here the template structure specifies the spatial arrangement of sites, whereas composition and space-group labels provide only part of that information. The wide sharing of structures by different crystals is also reflected in research on structural prototype catalogues. AFLOW provides crystallographic descriptions for 1,783 structural prototypes in Part 4, with the 2026 Part 5 article adding 344 for a total of 2,127 [11, 12]. CSPD uses structure-similarity analysis to organize 26,023 inorganic prototypes across 8,097 composition types [13]. Perovskites are a prominent example: about 1,600 compounds have been identified experimentally as perovskites [14], and chemically different ones such as the oxides BaTiO₃ and SrTiO₃ and the halides CsPbI₃ and CH₃NH₃PbI₃ all adopt the same ABX₃ framework of corner-sharing BX₆ octahedra.

One of the key steps in template-based CSP algorithms is finding suitable templates for a given composition. First, chemical priors can help identify such transferable frameworks. An ABX3ABX_{3} perovskite arrangement, for example, supplies characteristic coordination environments that can be screened through charge balance and size compatibility. Statistical ionic substitution learns transfer probabilities from observed compounds [15]. Bartel and colleagues' tolerance factor classifies perovskite occurrence with 92% accuracy among 576 experimentally characterized oxide and halide ABX3ABX_{3} compounds [16]. Such priors guide candidate generation, with subsequent physical assessment addressing energy and stability. Following these ideas, TCSP and CSPML established composition-conditioned template prediction [5] and learned substitution similarity [6]. TCSP2.0 [8] added a large template library, BERTOS oxidation-state inference [17], element embeddings and chemistry heuristics. When we re-ran the published TCSP2.0 code on the T180 benchmark, however, it matched only 82 of 180 reference structures within its top 20 candidates. Tracing each of the 2,347 structures that TCSP2.0 predicted across the 180 targets (up to 20 per target) back to its source template showed why: 469 of them (one in five) do not have the requested composition. The code assigns elements without matching stoichiometric coefficients, rewrites CIF text with sequential string replacements that cascade (an inserted element is replaced again) or corrupt element symbols (F replaced inside Fe), and never checks the composition of its output. Another 24 queries crash (23 in an oxidation-state fallback, one in symmetry lookup).

TCSP3.0 fixes these errors and adds further features. Element mappings are restricted to pairs with equal coefficients, substitution acts on all parsed species simultaneously, and each candidate's source composition, output composition and cell size are validated before ranking. On this corrected core, TCSP3.0 adds a periodic-number retrieval route alongside embedding retrieval, multiple near-optimal mappings, probability-weighted oxidation-state evidence, coordination-dependent radius compatibility and structural deduplication of the ranked list. Together these changes double the Top-20 match rate on T180, from 45.6% to 90.6%, before any relaxation; ORB-v3 [18] relaxation and energy ranking of the exported candidates, the default final stage, then raises the Top-1 match rate to 72.2%, which beats the two best deep generative CSP models we evaluated on T180, CrystalFlow (Top-1 match rate 63.9%) and MaskGXT (62.8%).

Our contributions are: (i) a diagnosis of the original TCSP2.0 implementation that attributes all 469 wrong-composition selections to specific mapping and substitution defects; (ii) TCSP3.0, which corrects these defects and adds the further features described above; (iii) an evaluation on T46, T180 and an independent 800-target cohort (T800), with original TCSP2.0 and PNcsp+ compared on T180 and CrystalFlow and MaskGXT compared on T180 and T46 (T800 is used for TCSP3.0 and its ablations only), using a single StructureMatcher evaluator that keeps every failed target in the denominator [19–21]; and (iv) paired ten-arm ablations on T180 and T800 that separate the contribution of each added feature from that of the correctness fixes.

References (41)