Applying Depth (Z-coordinate)-Dependent Heat Pulse in Molecular Dynamics Simulations

This application demonstrates an advanced molecular dynamics (MD) simulation technique for applying localized heating to a specific layer of a material surface. The simulation applies periodic heat pulses with optional depth (z-coordinate)-dependent ramping to study surface heating, thermal transport, and associated effects in materials.

Important

QuantumATK Version: This application is designed for QuantumATK X-2025.06.

This application requires the ApplyHeatHook module for heat application functionality. The module is provided as a compiled Python file (.pye) and must be available in your Python path. You can download the required files below:

Key Features

  • Targeted heating: Heat is applied only to atoms tagged with a specific tag

  • Periodic pulsing: Heat is applied in controlled pulses with defined duration and period

  • Depth-dependent ramping: Optional gradient heating that varies with the z-coordinate

  • Momentum conservation: Center-of-mass momentum is preserved during heating

  • Multi-stage simulation: Initial equilibration followed by heat pulse application

System Overview

The simulated system consists of a silicon (100) surface supercell with:

  • Dimensions: 19.2 Å × 19.2 Å × 129.5 Å

  • Total atoms: 1600 silicon atoms arranged in a crystalline lattice

  • Four distinct functional layers (along z-direction):

    • Heated layer (top, 550 atoms, ~29 Å thickness): Target area for heat pulse application

    • Free layer (remaining 600 atoms, ~31 Å thickness): Unconstrained atoms for thermal transport

    • Thermostat layer (325 atoms, ~16 Å thickness): Temperature-controlled heat sink layer

    • Fixed layer (bottom, 125 atoms, ~5 Å thickness): Anchors the structure and prevents drift

Simulation Workflow

Step 1: Structure Setup and Initial Equilibration

The simulation begins by setting up the silicon structure with proper atomic tagging:

# Define three layers with tags
si_long.addTags('apply_heat', [1050, 1051, ...])      # Heated layer
si_long.addTags('fixed_layer', [0, 1, 2, ...])         # Fixed bottom
si_long.addTags('thermostat_layer', [125, 126, ...])  # Temperature control

A Tersoff potential (2005 parameterization) is used for describing silicon interactions efficiently:

potentialSet = Tersoff_Si_2005()
calculator = TremoloXCalculator(parameters=potentialSet)
si_long.setCalculator(calculator)

Initial equilibration runs for 10,000 steps using NVT ensemble with Nose-Hoover thermostat:

method = NVTNoseHoover()
constraints = [FixStrain(True, True, True), FixAtomConstraints('fixed_layer')]

md_trajectory = MolecularDynamics(
    configuration=si_long,
    constraints=constraints,
    steps=10000,
    log_interval=100,
    method=method,
)

This stage ensures the system reaches thermal equilibrium before heat pulses are applied.

Step 2: Heat Pulse Application

The main simulation applies periodic heat pulses using a custom hook function. The hook is called every MD step and controls the heating pattern:

def custom_hook_function(step, time, configuration):
    from ApplyHeatHook import apply_heat_hook

    pulse_period = 50000     # steps between pulse starts
    pulse_duration = 5       # steps per pulse
    heating_rate = 1 * eV/fs # energy addition rate
    time_step = 1 * fs       # timestep
    ramp = True              # enable z-dependent scaling

    configuration = apply_heat_hook(
        configuration, step, time_step, heating_rate,
        pulse_period, pulse_duration, ramp
    )
    return

Heat Pulse Parameters

  • pulse_period: 50000 steps (50 ps with 1 fs timestep)

  • pulse_duration: 5 steps (5 fs)

  • heating_rate: 1 eV/fs during active pulse

  • heating_fraction: 0.01% (heating for 5 out of every 50000 steps)

  • ramp: True Stronger heating at top of heated layer, tapering to bottom

The ApplyHeatHook Algorithm

The ApplyHeatHook module (provided as a compiled module) implements a sophisticated heating algorithm that maintains physical accuracy:

Algorithm Steps:

  1. Target Selection: Identifies atoms tagged with 'apply_heat' for heating

  2. Center-of-Mass Frame: Calculates velocities of tagged atoms relative to center-of-mass (CM) to prevent bulk translation

  3. Energy Addition:

    • Computes current kinetic energy in the CM frame

    • Determines target kinetic energy based on the specified heating rate

    • Calculates appropriate velocity scaling factor

  4. Z-Dependent Ramping (optional):

    • Applies stronger heating to atoms at top z-coordinates within the tagged layer

    • Gradually reduces heating intensity toward lower z-coordinates within the tagged layer

    • Creates controllable thermal gradients through the structure

  5. Momentum Conservation:

    • Computes total momentum in the CM frame

    • Applies velocity corrections to preserve total system momentum

    • Ensures no artificial forces are introduced by the heating process

The algorithm effectively adds thermal energy to tagged layers while maintaining fundamental conservation laws, making it suitable for realistic thermal transport studies.

Step 3: Production Run with Temperature Control

The production simulation runs for 100,000 steps with:

method = NVTBussiDonadioParrinello(
    reservoir_temperature=[
        ('thermostat_layer', 300.0 * Kelvin),
    ],
)

md_trajectory_1 = MolecularDynamics(
    configuration=last_image,
    constraints=constraints,
    steps=100000,
    log_interval=100,
    method=method,
    hook_functions=hook_functions,
    measurement_hook=md_measurement_hook,
)

Key features:

  • Bussi-Donadio-Parrinello thermostat: Applied only to the 'thermostat_layer' layer at 300 K

  • Selective thermalization: Heated layer evolves without direct temperature control

  • Temperature monitoring: MDMeasurement tracks temperature evolution

  • Hook integration: Heat pulses applied via pre-step hook functions. 2 pulses occur during this run.

Analysis and Observations

Temperature Profiles

The simulation allows observation of:

  • Temperature rise in the heated layer during pulses

  • Heat dissipation between pulses

  • Thermal gradient establishment when z-ramping is enabled

Energy Flow

The three-layer design enables study of:

  1. Heat generation: Controlled addition in the heated layer

  2. Heat transport: Through the intermediate layer

  3. Heat removal: Via the thermostat layer

Customization Options

Adjusting Heat Parameters

pulse_period = 25000       # More frequent pulses
pulse_duration = 10        # Longer pulse duration
heating_rate = 0.5 * eV/fs # Gentler heating
ramp = False               # Uniform heating (no z-gradient)

Temperature Control

Adjust thermostat temperature or change which layer is thermostated:

reservoir_temperature=[
    ('thermostat_layer', 400.0 * Kelvin),  # Higher bath temperature
]

Output Files

The simulation generates:

  • Apply_Heat_Z_Dep_Example_results.hdf5: Trajectory file containing:

    • Initial equilibrated structure (md_1)

    • Full trajectory with heat pulses (md_2)

    • Final configuration (md_3)

    • Temperature measurements

Using the NanoLab Workflow

For users who prefer a graphical interface, the complete simulation is available as a pre-configured NanoLab workflow. Simply download and open the workflow file in NanoLab:

Apply_Heat_Z_Dep_Example.hdf5

Running the Script

The complete QuantumATK script can be downloaded and executed directly:

Apply_Heat_Z_Dep_Example.py

To run the simulation, use Jobs tool in NanoLab or execute from the command line:

atkpython Apply_Heat_Z_Dep_Example.py

Note

Ensure that ApplyHeatHook.pye is in your Python path or the same directory as the main script before execution.

Performance Considerations

  • System size: 1600 atoms is manageable on standard workstations

  • Timestep: 1 fs is appropriate for silicon with Tersoff potential

  • Hook overhead: Minimal, as heating calculation is efficient

  • Total simulation time: ~110 ps (10 ps equilibration + 100 ps production)

  • Total Run Time: Completed in 56 minutes on a 12 core CPU.

Summary

This application demonstrates a sophisticated technique for applying controlled, localized heating in molecular dynamics simulations using QuantumATK. Key advantages include:

  • Physical accuracy: Momentum-conserving heating algorithm

  • Flexibility: Configurable pulse patterns and spatial heating profiles

  • Realistic modeling: Three-layer setup mimics experimental thermal transport conditions

  • Easy customization: Modular design allows adaptation to different materials and protocols

The z-dependent ramping capability and conservation-law-preserving algorithm make this approach particularly valuable for studying:

  • Directional heat transport in nanostructures

  • Heat application by pulsed sources

  • Temperature-dependent material properties

  • Thermal pulse induced defect formation and diffusion mechanisms

Note

The ApplyHeatHook.pye compiled module must be available in your Python path. Download all required files using the links provided at the top of this application.