Skip to content

Tutorial T10: 2D Melting & the Hexatic Phase Transition ​

Scripts: tutorials/T10_2d_melting_hexatic/run.jl · analyze.jl · plot.py

Unlike three-dimensional solids (which melt in a single first-order transition directly from a long-range crystal into an isotropic liquid), two-dimensional crystals are forbidden by the Mermin–Wagner theorem from possessing true long-range translational order at any finite temperature. Instead, as predicted by the Kosterlitz–Thouless–Halperin–Nelson–Young (KTHNY) theory and refined by large-scale simulations of hard and soft repulsive disks (Bernard & Krauth 2011; Kapfer & Krauth 2015; Khali, Chakraborty & Chaudhuri 2021), steep 2D disks (  with  , including the Weeks–Chandler–Andersen potential) melt through a two-step pathway mediated by an intermediate hexatic phase with quasi-long-range six-fold orientational order but only short-range positional order:

  1. Continuous Solid Hexatic Transition (KTHNY dislocation unbinding): Bound dislocation pairs unbind into free dislocations, converting quasi-long-range positional order (  with  ) into exponentially decaying translational correlations while preserving algebraic six-fold bond-orientational order.

  2. First-Order Hexatic Liquid Transition (Mayer–Wood coexistence loop): Across a narrow coexistence window, the 2D equation of state flattens and, in well-converged finite periodic boxes, develops a non-monotonic Mayer–Wood pressure loop (with the local pressure minimum toward the hexatic boundary due to liquid–hexatic interfacial tension) before relaxing to the isotropic liquid ( ,  ).

System-size scope (N = 4,096 vs. thermodynamic limit)

The primary 2D WCA sweep below uses   ( ) disks (  smaller than the    hard-disk simulations of Bernard & Krauth 2011). Accordingly, this tutorial demonstrates finite-size signatures of two-step 2D melting (equation-of-state plateau/compressibility collapse, sharp growth of , collapse of Voronoi defect density, and the qualitative crossover in and ) rather than thermodynamic-limit critical exponents or sharply resolved phase boundaries.

This tutorial exercises the 2D GPU simulation stack of ParticleDynamics v1.2.0:

  1. Zero-strain 2D periodic geometry (PeriodicBox((Lx, Ly)) / Box2) and both 2D initializers: InitGenerators.hex_sites_in_box_2d (commensurate   triangular lattice with aspect ratio    ) and InitGenerators.hex_random_2d (isotropic liquid initialization).

  2. Built-in 2D WCA on :ell CellList paired with a custom GPU-isbits 2D AbstractPairPotential (InversePower12Potential) implementing Kapfer & Krauth's (2015) shifted soft-disk potential (pair_cutoff + @inline pair_eval, attached via attach_pair_potential!, verified to   relative force error against a direct host reference).

  3. 2D canonical & diagnostic workflow: BAOABFast() local canonical Langevin sampling (suppressing latent-heat gradients across coexisting domains), CSVR() + VelocityVerlet() cross-check in Float64, 2D VirialObservable vs. PressureObservable consistency (  ), and CollisionObservable tracking repulsive contact-entry rates across the melting window.

  4. End-to-end 2D GSDWriter read_gsd_frame! trajectory round-trip, analyzed with periodic 2D Voronoi tessellation (sanity-checked via Euler's torus identity        ) for , , Bragg positional order , topological defect fraction , and real-space phase-angle maps.

Trajectory Visualization ​

Live Fresnel Studio Dashboard (T10): 2D WCA melting coexistence (N = 4,096 disks colored by local six-fold bond-orientational angle arg(ψ₆)) paired with the 2D equation of state P*(ρ*) across coexistence and global hexatic order |Ψ₆(t)| (tutorials/render_movies.py --targets T10).

Studio Fresnel snapshot of 2D melting across liquid, coexistence, hexatic, and solid phases


1. Physical Model, Commensurate Box & 2D Melting Order Parameters ​

All quantities are reported in reduced 2D Lennard-Jones units ( ,  ,  ,  ,   ). The primary finite-size phase-diagram sweep models   repulsive Weeks–Chandler–Andersen (WCA) disks at  :

For the custom GPU potential benchmark (Kapfer & Krauth 2015), we additionally simulate   soft disks with shifted inverse-power repulsion:

whose melting window at   lies near the coupling parameter   .

Zero-Strain Commensurate Periodic Box ​

A triangular crystal is commensurate with a periodic rectangle when is even and the box lengths satisfy

With    ( , aspect ratio   ), the solid phase avoids periodic shear strain that would otherwise distort the crystal or bias the melting density.

2D Mechanical Pressure, Voronoi ψ₆, g₆(r), and g_G(r) ​

  1. 2D Clausius Virial Pressure: For a 2D periodic area  ,

  2. Local & Global 6-Fold Bond-Orientational Order: Using periodic 2D Voronoi neighbors (where Euler's topological theorem     on a torus guarantees   as a mesh sanity check, and   identifies 5-/7-fold disclinations),

  3. Orientational & Positional Correlation Functions:

    where are the three equivalent first-shell triangular reciprocal lattice vectors ( , rotated by from the instantaneous crystal bond axis  ). In KTHNY theory (thermodynamic limit):

    • Liquid: both   and   decay exponentially ( ).

    • Hexatic:   decays algebraically with  , while positional order decays faster than (exponentially at large ).

    • Solid:    (long-range orientational order), while   decays algebraically with  .


2. ParticleDynamics v1.2.0 2D API Walkthrough ​

Commensurate 2D Crystal Construction & Full Workflow Stack ​

PeriodicBox((Lx, Ly)) configures the ParticleDynamics GPU engine for 2D dynamics, 2D cell-list neighbor traversal, 2D virials, 2D collision counting, and 2D GSD trajectories:

julia
function make_commensurate_hex_2d(nx::Int, ny::Int, rho::Float64)
    N = nx * ny
    a = sqrt(2.0 / (sqrt(3.0) * rho))
    Lx = nx * a
    Ly = ny * (a * sqrt(3.0) / 2.0)
    xpad = 0.51 * a
    raw = hex_sites_in_box_2d((Lx + xpad, Ly + 1.0e-6 * a), a)
    pos = [SVector{2,Float64}(p[1] + 0.5 * xpad, p[2]) for p in raw]
    return (box=PeriodicBox((Lx, Ly)), positions=pos, N=N, Lx=Lx, Ly=Ly, a=a)
end

Each density point attaches WCA, BAOABFast, four observables (ThermodynamicObservable, VirialObservable, PressureObservable, CollisionObservable), and both TableWriter and GSDWriter:

julia
all_grp = Group(:all, AllSelection())
wca = WCA(
    epsilon=1.0, sigma=1.0, pairs=:neighborlist,
    neighborlist=CellList(buffer=0.45, capacity=48, rebuild_interval=10),
)

thermo = ThermodynamicObservable(all_grp; name=:thermo)
virial = VirialObservable(all_grp; name=:virial)
press  = PressureObservable(name=:press)
coll   = CollisionObservable(name=:coll)

sim = Simulation(
    system;
    groups=Groups(all_grp),
    integrator=Integrator(
        dt=0.004, scheme=BAOABFast(), forces=[wca],
        methods=[Langevin(all_grp; gamma=1.0, kT=1.0)],
    ),
    observables=Observable[thermo, virial, press, coll],
    writers=Writer[],
    precision=Float32,
)
prepare!(sim)

# GPU-batched equilibration (~22,000 steps/s at N = 4,096)
step_many!(state(sim), sim.lowlevel_integrator, 0.004, 160_000; compute_energy=false)

# Production logging: TableWriter (EOS + collisions) & 2D GSDWriter (Voronoi / g6 / gG)
sim.writers = Writer[
    TableWriter("thermo.csv"; every=700, observables=[
        thermo => [:temperature, :kinetic_energy, :potential_energy, :total_energy],
        virial => [:virial],
        press  => [:pressure, :volume, :density],
        coll   => [:counts, :rate],
    ]),
    GSDWriter("traj.gsd"; every=7_000, write_start=false),
]
prepare!(sim)
run!(sim, Stage(:production, steps=280_000; reset_step=0, reset_observables=true, progress=false))

In analyze.jl, every 2D frame is read back with read_gsd_frame!(gsd_path; frame=f) (frame.D == 2) for periodic Voronoi tessellation and radial/orientational/Bragg correlation analysis with contiguous-block jackknife SEMs on , , , and long-distance correlation values. We also cross-check an independent Float64 CSVR + hex_random_2d liquid run at   (  , ) and a liquid-quenched coexistence run at   (  , , consistent with the crystal-started run within statistical uncertainty).

Custom GPU-isbits 2D AbstractPairPotential (InversePower12Potential) ​

Any short-range pair law compiles directly into DeviceEngine's 2D :ell warp kernel by subtyping AbstractPairPotential and defining pair_cutoff and @inline pair_eval:

julia
struct InversePower12Potential{T<:AbstractFloat} <: AbstractPairPotential
    epsilon::T; sigma::T; rcut::T; rc2::T; ushift::T
end

SimulationCore.pair_cutoff(p::InversePower12Potential) = p.rcut

@inline function SimulationCore.pair_eval(p::InversePower12Potential, data, ctx, j, r2::T) where {T}
    inside = (r2 > zero(T)) & (r2 < T(p.rc2))
    inside || return false, zero(T), zero(T)
    invr2 = one(T) / r2
    s2 = T(p.sigma) * T(p.sigma) * invr2
    s6 = s2 * s2 * s2
    s12 = s6 * s6
    u = T(p.epsilon) * s12 - T(p.ushift)
    f_over_r = T(12) * T(p.epsilon) * s12 * invr2
    return true, f_over_r, u
end

attach_pair_potential!(st, InversePower12Potential(epsilon=1.0, sigma=1.0, rcut=2.0))

In Float64, InversePower12Potential matches a direct host reference to   relative force error and   relative energy error, and reproduces the liquid (  ) intermediate ordered/hexatic (  ) solid (  ) progression of Kapfer & Krauth (2015).


3. Results & Visual Verification ​

Equation of State, Order Parameters & Finite-Size Correlation Crossover ​

2D WCA Equation of State, coexistence plateau, bond-orientational order, collision rate, and g6(r) / gG(r) correlations

  • Coexistence equation-of-state plateau & finite-size pressure scatter (Panel a & inset): Across the liquid branch (  ), pressure rises steeply (  , slope    on ). Across the six densities in the transition window  , the measured pressures are  ,  ,  ,  ,  , and   (rounded: ), before turning steeply upward on the solid branch (   on ). The robust finite-size EOS signature is the compressibility/slope collapse across coexistence:     (slope ratio   relative to the liquid). By contrast, selecting the highest ( ) and lowest ( ) values out of six noisy points to quote a significance level would be post-hoc selection; while a true finite-size Mayer–Wood loop places its local pressure minimum toward the hexatic boundary , at   the non-monotonicity (10.12 -> 10.09 -> 10.08 -> 10.14 -> 10.04 -> 10.01) is noisy and the lowest point sits at the hexatic/solid boundary rather than tracing a clean liquid–hexatic loop.

  • Bond-orientational order, topological defects & collision rate (Panel b): Global increases from (liquid) through (coexistence) and (crossover/putative hexatic) to (solid), while the orientational susceptibility    peaks at the liquid–coexistence onset (  at  ). Simultaneously, the Voronoi   disclination fraction drops from to and the WCA contact-entry collision rate shows an S-shaped rise across coexistence ( ).

  • Orientational vs. positional correlation crossover & finite-size limits (Panels c & d):

    • In the liquid ( ), decays exponentially with short correlation length    (growing to   near coexistence) and falls rapidly to the finite-size noise floor.

    • At coexistence ( ), decays slowly (effective power-law slope  ) while positional correlations remain short-ranged ( ).

    • In the putative hexatic / solid crossover ( ) vs. 2D solid ( ): at   (  ), the curves for   and   are nearly indistinguishable in Panel (c), both flattening with near-zero fitted slope (  in the recorded table) due to finite-size rounding rather than resolving a thermodynamic-limit algebraic decay   . Likewise, the recorded hexatic label at   rested on a single point estimate   versus the KTHNY solid bound   without an uncertainty bar (and   already shows   ). On fresh runs, analyze.jl computes contiguous-block jackknife SEMs for both and and classifies regimes strictly from observables without density overrides.

    • Deep in the 2D solid ( ), maintains a flat plateau () and sits well above (  ), accompanied by split crystalline second-shell peaks in (inset of Panel d).

Real-Space 6-Fold Bond-Orientational Phase Maps ​

Real-space 2D bond-orientational phase angle maps across liquid, coexistence, hexatic, and triangular solid phases

Coloring all   disks by    (cyclic twilight_shifted palette) with dark rims highlighting Voronoi   topological defects illustrates the real-space progression at  :

  • (a) Isotropic Liquid ( ): Disordered patchwork of small, uncorrelated orientational domains ( ,  ).

  • (b) Liquid–Hexatic Coexistence ( ): Macroscopic phase separation into a crystal-axis-aligned ordered domain coexisting with disordered liquid pockets bordered by 5–7 defect strings ( ,  ).

  • (c) Putative Hexatic / Crossover Regime ( ): System-spanning orientational coherence punctuated by localized 5–7 defect clusters ( ,  , point estimate  ).

  • (d) 2D Triangular Solid ( ): Uniform single-crystal domain with isolated bound dislocation dipoles ( ,  ,  ).


4. Quantitative Production Summary ​

Production parameters:   (  zero-strain commensurate triangular box;   smaller than Bernard & Krauth 2011),  ,   , BAOABFast ( ), equilibration + production steps ( ) across  , 8-block standard errors, and 40 GSD frames per density. The recorded and entries below are point estimates from the original production run (fresh runs of analyze.jl additionally report contiguous-block jackknife SEMs for and ).

(2D Virial)Regime (finite-size)
0.80000.9988   0.800.38052.5200.504Liquid
0.85000.9964   1.180.31993.3020.448Liquid
0.88000.9986   4.550.25830.00662.0100.618Liquid
0.89200.9973   8.880.21500.02601.2740.523Liquid
0.89800.9991   29.680.18680.06750.8100.671Coexistence
0.90300.9988   10.300.14510.20150.2490.954Coexistence
0.90800.9985   5.390.10770.33580.0770.959Coexistence
0.91200.9986   4.030.08650.38390.0510.911Coexistence
0.91600.9985   2.660.04830.49430.361Putative hexatic
0.91900.9978   0.470.02960.53580.237Hexatic / Solid
0.92400.9986   0.180.01830.56420.232Solid
0.93500.9971   0.190.01200.60280.176Solid
0.95500.9979   0.100.00350.66660.151Solid

Software, API & Topological-Identity Checks ​

Software / Identity CheckMeasured (ParticleDynamics v1.2.0)ExpectedStatus
2D Clausius virial identity     (algebraic 2D virial identity)CHECK_OK
2D Voronoi Euler identity     ( )0.0000000.0 (topological mesh sanity check on torus)CHECK_OK
Custom 2D InversePower12Potential GPU force / energy parity  /   (Float64 vs. CPU ref)CHECK_OK

Physical Validation & Finite-Size Diagnostics ( ) {#Physical-Validation-and-Finite-Size-Diagnostics-N-4{,}096} ​

Physical Metric / DiagnosticMeasured (ParticleDynamics v1.2.0)Reference / ContextCategory
Canonical temperature accuracy   (BAOABFast,  )Validation (PASS)
CSVR (Float64, hex_random_2d) vs. BAOABFast ( )   ()Consistent within Validation (PASS)
Coexistence liquid-quench vs. crystal start ( )   ()Consistent within statistical uncertaintyValidation (PASS)
Coexistence EOS slope collapse   (  vs.  ) (coexistence plateau / flattening)Validation (PASS)
Liquid order & correlation length ( )  ,   ,   , short Validation (PASS)
Solid order & positional decay ( )  ,  ,   ,  ,  Validation (PASS)
Custom order progression (   )   Liquid Crossover ( ) Solid (Kapfer & Krauth 2015)Validation (PASS)
Coexistence pressure profile  Flat/noisy plateau at  ; extrema not a valid loop testDiagnostic
Putative hexatic positional slope ( )  (point est.;  )Near KTHNY without recorded SEM; finite-size ambiguous at  Diagnostic

5. Running the Tutorial ​

bash
# Quick GPU smoke verification (N = 576, 6 WCA densities + cross-checks + custom r^-12)
TUTORIAL_FAST=1 julia --project tutorials/T10_2d_melting_hexatic/run.jl
TUTORIAL_FAST=1 julia --project tutorials/T10_2d_melting_hexatic/analyze.jl

# Full production 2D melting sweep (N = 4,096, 13 WCA densities + cross-checks + custom r^-12)
julia --project tutorials/T10_2d_melting_hexatic/run.jl
julia --project tutorials/T10_2d_melting_hexatic/analyze.jl

# Regenerate 300-DPI documentation figures
python3 tutorials/T10_2d_melting_hexatic/plot.py

References ​

  1. É. P. Bernard & W. Krauth, "Two-Step Melting in Two Dimensions: First-Order Liquid-Hexatic Transition," Phys. Rev. Lett. 107, 155704 (2011).

  2. S. C. Kapfer & W. Krauth, "Two-Dimensional Melting: From Liquid-Hexatic Coexistence to Continuous Transitions," Phys. Rev. Lett. 114, 035702 (2015).

  3. S. S. Khali, D. Chakraborty & D. Chaudhuri, "Two-step melting of the Weeks–Chandler–Anderson system in two dimensions," Soft Matter 17, 3473–3485 (2021).

  4. B. I. Halperin & D. R. Nelson, "Theory of Two-Dimensional Melting," Phys. Rev. Lett. 41, 121–124 (1978); A. P. Young, Phys. Rev. B 19, 1855–1866 (1979).

ParticleDynamics v1.2.0 · GPU-native molecular dynamics in pure Julia · MIT License