Tal

TAL – A New Step in Crystallography (and Faster Than Cooking Stuffed Cabbage!)

TAL – Crystallography software with cavity analysis, overlay and more

TAL is a modern crystallography application built for everyday structural work. It already covers most of Mercury’s essential functions and adds several things that go further: a high-precision cavity/void module, an intuitive molecule overlay, Hirshfeld surfaces, morphology with stereographic projection, and (from version 3.7) built-in MACE energy calculations.

It has been extensively tested, is stable, and produces correct results on synthetic benchmarks and against reference programs. The mathematics follows the International Tables for Crystallography.

Where does the name come from? Well, quite perversely: Thallium (TAL) comes right after Mercury in the periodic table (Hg -> Tl) 😉

Mercury has more than 20 years of development behind it. TAL is already stable, extensively tested, and delivers accurate results on synthetic benchmarks. It covers most of Mercury’s essential features and adds capabilities such as cavity analysis and overlay that go beyond the standard toolkit.

The program is fresh, raw, and waiting for your feedback. If you notice anything, encounter a bug, or have an idea for improvement – feel free to drop me a message!

What’s New in TAL? (A Few Jabs at the Competition)

New version supports POVRAY generator (simple and elegant)

  1. Overlaying molecules from different crystals (Killer feature): In Mercury, this feature is often paid or overly complicated. Since I use it often myself, I wrote it my way – exactly how it should work. It’s dead simple: select any 3 atoms from one structure, click the „Add molecule” button, do the same for any other structure (or the same one, if you prefer), and you’re done!
  2. Modern technology under the hood: TAL was built using .NET 8 (C#) and MonoGame, supported by an absolutely fantastic window manager modeled after Visual Studio 2022 – weifenluo WinForms Docking. This solution literally „buries” Mercury’s older architecture. The interface is extremely flexible and a joy to work with.

The Main Event: The Cavity Module

Although TAL was supposed to be just a pretty wrapper, its beating heart is my proprietary free-space calculation function (Cavity).

Traditional approaches (like spherical voids in older programs) often fail when dealing with irregular, elongated pores or channels. Cavity in TAL calculates free spaces in crystals with incredible precision – it is currently the best available method on the market.

I’ve described the technical details of how this algorithm works in a separate paper: Cavity Detector in CIF. You can also take a look at the CIF project.

Download and Test

BFDH morphology generator, like in Mercury, but TAL also provides stereographic projection with rotation and face indexing — an option I really love from another commercial package, SHAPE.

A completely new approach to molecule overlay. More intuitive, flexible and user-friendly.

Just a copy of the plane functionality from Mercury (this was already perfect).

A slightly more advanced powder diffraction pattern generator than the one in Mercury.

TAL’s Scene Quality panel (from version 1.9), shown alongside a molecular scene rendered with GPU sphere impostors and stacked supersampling. The engine combines SSAA (spatial supersampling) with Progressive AA (temporal accumulation) — two techniques borrowed from modern game rendering — to deliver smooth edges on atom spheres, bonds and cell edges without sacrificing interactivity. Note: the anti-aliasing quality shown here is limited by the low resolution of this web screenshot — the full effect only becomes visible at full screen resolution, when the camera stops and the image settles into a fully anti-aliased result.

TAL v. 2.2 the graphics is improved in all modes/export/PovRay. Extended H-bond options and more intuitive (only atoms not a groups like in other programs). Corrected small bugs related to selection, lasso, labels. Added new fonts. Improved presentation of disorder (transparency in function of occupancy, bonds to the corect molecular PART). CRYSTAL17 accepts only the standard space-group setting. TAL detects non-standard orientations (P 2₁/n, Pbnm, Cmca, …) and offers to convert the structure to the standard setting (P 2₁/c, Pnma, Cmcm) before export — leaving the original structure untouched (need testing).

Tal v. 2.3. Space group transformation between subgroup settings (e.g. P2₁/c → P2₁/n), reorganized menu bar, and a corrected CRYSTAL17 .d12 generator with proper symmetry handling.

TAL v.2.4. Improved labels menagement. Improved graphics.

Tal v.2.5. I finally managed to add the Hirshfeld surface generator window. It took a while, but it works! 🙂
Oh, and I also threw in an atom color manager on top — just as a little extra.

TAL version 2.6 brings a redesigned Hirshfeld surface engine: difficult cases are fully supported, calculations are substantially faster, and the workflow is streamlined. Graphics and the overall GUI have been refined for clearer 3D work. The aim is a smoother analysis experience—without the practical friction often encountered in CrystalExplorer.

TAL 3.0,3.1 Hirshfeld Surface Analysis added to the Advanced menu for studying intermolecular interactions in molecular crystals. The tool is self-contained — it does not depend on the packing mode or the 3D view state, since it rebuilds its own unit cell from the asymmetric part and symmetry operations. The promolecule density is computed from a Slater-Type Orbital (STO) basis using the analytical Roothaan–Hartree–Fock wave functions of Koga and coworkers: neutral atoms (Int. J. Quantum Chem. 71, 1999, 491), mono-cations (Phys. Rev. A 68, 2003, 032701) and mono-anions (J. Phys. B 29, 1996, 2973). Before generating the surface, Tal silently normalizes all hydrogens to neutron bond lengths (C–H 1.083 Å, N–H 1.009 Å, O–H 0.983 Å, F–H 0.950 Å), because X-ray H positions are biased by 0.10–0.20 Å and would distort both the surface and the contact decomposition. The user can control this manually in the new Calculate → Normalize Hydrogens… window, which lists current bond lengths, the neutron target, the difference, and provides Apply / Reset. The surface can be colored by d_i, d_e, d_norm (red-white-blue), charge (green-yellow-red) or hydrophobicity (blue-white-brown). Recommended publication settings: voxel 0.10 Å, iso level 0.50, grid margin 3–5 Å, STO mode with step = 0.03, exp_cutoff = 10.0, max_rmax = 15.0 in the Advanced panel. Contact types (C···H, O···H, H···H, etc.) can be filtered in the 2D fingerprint window, and the surface exported to PNG.

TAL v3.4 — Corrected ellipsoids after space-group transformation

The cavity detector now handles anisotropic displacement parameters (ADPs) correctly across space-group transformations such as P2₁/n ↔ P2₁/c. This was the application’s hardest consistency test: the same crystal, expressed in two equivalent settings of the same space group, must give the same void volume and void surface.

Result: the cavity volume and cavity surface now agree between settings, and the residual error decreases with voxel size — exactly as a correct, numerically convergent implementation should behave. Previously the difference was ≈ 9 % and did not shrink with resolution; it is now below 0.5 % at 0.06 Å resolution and falls further as the voxel size is reduced.

Also in this release: symmetry operations for the loaded crystal are now listed and visualized directly in the 3D view (rotation axes, screw axes, mirror and glide planes, inversion centers, rotoinversion axes), with per-element visibility, per-element colours, and on-the-fly updates.

New in TAL: MACE-Powered Energy Calculations (from version 3.7)

Starting with TAL 3.7, the application includes built-in support for MACE (Machine Learning Interatomic Potentials), letting you calculate energies and atomic forces directly from your crystallographic structures—no external quantum chemistry software required.

What is MACE?
MACE is a state-of-the-art machine learning potential that predicts energies and forces with accuracy approaching DFT, but at a fraction of the computational cost. It works by learning local atomic environments from large reference datasets, then generalizing to new structures in seconds rather than hours. For crystallography, this means you can screen, rank, or sanity-check structures without waiting for a full DFT run.

What TAL does with it
After loading a structure, you can select a MACE model and compute:

  • Total energy for the system.
  • Per-atom forces, giving you a sense of local strain and relaxation tendencies.

For periodic systems, TAL calculates energies using both 1×1×1 and 3×3×3 supercells. In the 3×3×3 case, the reported energy corresponds specifically to the central unit cell, which helps reduce artifacts from periodic boundary effects.

The five bundled models
TAL supports five MACE models covering both organic and inorganic chemistry:

Organic (MACE-OFF23 family):

  • mace_off23_small.pt — fastest, lowest cost.
  • mace_off23_medium.pt — balanced accuracy/speed.
  • mace_off23_large.pt — highest accuracy in the OFF23 set.

Inorganic / Materials (MACE-MP-0 family):

  • mace_mp0_medium.pt — general-purpose materials.
  • mace_mp0_large.pt — higher accuracy for solids.

Choose the model that fits your system. If you are unsure, start with the medium variants.

A note on the energy engine
The energy calculation engine (evaluate_energy.exe) is approximately 2 GB and cannot be hosted in the repository due to size limits. It can be supplied separately for testing—if you would like to try the MACE functionality, contact me and I will provide the engine and model files.

A note on scope
MACE integration is intended as a fast pre-screening and trend-checking tool, not a replacement for careful DFT validation. MACE can fail for unusual functional groups, organic salts, or systems far from its training distribution. Treat the energies accordingly. MACE uses NVIDIA graphics card for calculations.

As always, feedback is welcome. If a model fails to load, gives odd results, or if you need a specific model added, let me know.

What’s new in TAL v.3.7.1 — error calculations

  • Fixed parsing of parenthetical e.s.d.s from CIF/RES (correct decimal-place scaling).
  • Proper fractional → Cartesian covariance transformation (correct matrix orientation + quadratic propagation for non-orthogonal cells).
  • Full 3×3 position covariance (instead of independent axis variances).
  • Covariance is rotated for symmetry-generated atoms.
  • Cell-parameter uncertainties are now included in bond, angle, torsion and plane-distance errors.
  • Mean-plane distance errors also propagate uncertainties of the defining atoms.
  • StructureInfoWindow now uses the same error functions as on-screen measurements (consistent results).

All formulas were cross-checked against Monte-Carlo simulations on a monoclinic cell.

What’s new in TAL 3.7.2

  • Powder pattern hover shows all overlapping reflections with their multiplicities.
  • Faster powder pattern rendering (parallel calculation + precomputed peak ranges).
  • About dialog layout rebuilt (designer-based).
  • Help updated: clearer powder description, note that the single Debye–Waller factor is illustrative (per-atom B/U preferred), and non-orthogonal voxel grid illustration for cavity detection.
  • Powder diffraction: complete Cromer–Mann scattering factors (H–Cf); unsupported elements raise an error instead of contributing zero.
  • Powder diffraction: hkl range derived from the reciprocal-metric tensor (no hard index limit).
  • Powder diffraction: reflections grouped by true Laue-group equivalence (multiplicity = orbit size); overlapping but non-equivalent peaks remain separate until the profile stage.

TAL 3.7.3: what’s new

Cavity analysis

  • Exact periodic grid. The cell grid now holds exactly N voxels per axis, with step 1/N. Previously the planes at fractional coordinates 0 and 1 (the same physical plane) were both counted, so voxels on cell faces were counted twice.
  • Corrected void volumes. The sum of voxel volumes now equals the cell volume. Absolute void volumes and fill fractions of cavities touching the cell boundary were slightly too large in earlier versions (about 1 % for a 10 Å axis at 0.10 Å). Cavities inside the cell were not affected, and differences between runs (thermal motion on/off, VdW-scaling series) are unchanged. Re-run detection for absolute volumes.
  • Closed display surfaces. The surfaces still reach the +a, +b and +c cell faces, because the mesh is built on a display-only periodic copy and the calculation data are not touched.
  • Voxel micro-tuning (optional).
    • Resolution is the nominal voxel edge, and the number of voxels along a, b and c is chosen so that the voxel is as cube-like as possible.
    • Max deviation ± (%) limits how far each edge may differ from the nominal value (0 % means plain rounding).
  • Voxel edges panel. It shows the edges a, b, c, N per axis and the deviation from nominal. It updates immediately when the resolution, the micro-tuning option or the maximum deviation is changed.
  • Reports. Cavity and VdW reports now list the actual voxel edges and the micro-tuning state.
  • Default resolution changed from 0.15 Å to 0.10 Å.

Powder diffraction

  • Complete unit cell. F(hkl) is summed over the whole cell, built from all space-group operations including the inversion centre. It no longer depends on which symmetry operations are switched on in the 3D view. Images coinciding on special positions are counted once.
  • True multiplicities. Peaks are generated per symmetry-independent reflection from the Laue group (with inversion and Friedel’s law). Intensity is I = m·|F|²·LP, and equivalence is decided by symmetry, not by rounding 2θ.
  • Systematic absences. Screw-axis and glide-plane extinctions follow from F(hkl). The centring pre-filter uses the real Hermann–Mauguin symbol.
  • Reflection range. All lattice points inside the reciprocal-space limit are visited, which is correct for oblique cells. This replaces the former cap of 30 on each index.
  • Scattering factors. The Cromer–Mann table was verified against the IUCr dictionary. An element without tabulated coefficients now stops the calculation with a clear message instead of silently contributing nothing.
  • Displacement parameters. The Debye–Waller control is a global scale × applied to the atomic displacement parameters. Per-atom U (Uiso or Ueq) is taken from the file, and atoms without U use a reference B.
  • Profiles.
    • The pseudo-Voigt mixing parameter η is now actually applied.
    • Redrawing is much faster.
    • Calculations run on a worker thread, and a newer request cancels the running one.

Measurements (distance and atom-to-plane e.s.d.)

  • Correlated symmetry images. Atoms generated from the same refined atom are no longer treated as independent. A bond across an inversion centre now has σ = 2·σ(atom) instead of √2·σ(atom).
  • Full position covariance. Each atom carries a 3×3 Cartesian covariance, rotated with the symmetry operation, which accounts for oblique cells.
  • Atom → plane distance. For a mean plane, the e.s.d. includes the uncertainty of all atoms defining the plane. An atom that belongs to its own plane is counted once.
  • Unit-cell e.s.d. Cell parameters are propagated separately and added in quadrature, only when all atoms have refined e.s.d.’s.
  • Consistency. The Measure tool and the Structure Info window use the same code, so their values agree.

Summary — main build phase: done

The main phase of code construction is finally wrapped up. Took a bit longer than v.1 — but hey, it was also a fair bit more ambitious. All in all, 2 weeks from v.1 to v.2.5. Still a solid pace, considering this is just an after-hours passion project. 🙂

Validation

TAL has been tested against Mercury and Crystal Explorer as a reference — and for the core crystallographic calculations, it produces matching results.

The mathematics is based on the International Tables for Crystallography (Blue Book) — the standard reference in the field.

Additionally, the implementation was cross-checked using three different AI models in intensive testing. The results were consistent across all of them — a near tie.

In short: TAL doesn’t just look better. It computes correctly.