A MATLAB–LAMMPS integrated framework for modeling, simulating, and analyzing nanoglass and metallic glass systems
This repository presents the MATLAB and LAMMPS workflow developed to simulate and analyze the molecular dynamics (MD) behavior of nanoglass structures — specifically a Cu–Zr metallic glass system — under various thermal and structural conditions.
The work originates from my undergraduate research project at IIT Bhubaneswar, titled:
“Modeling the Molecular Dynamics of Creep of a Nano-crystalline Material.”
The goal was to simulate the creep behavior (slow deformation under constant stress) of nanostructured metallic glasses, visualize atomic rearrangements, and quantitatively analyze grain-boundary diffusion and structural stability.
This project integrates:
- MATLAB preprocessing scripts to prepare and clean atomic coordinate data.
- LAMMPS molecular dynamics simulations for physical modeling.
- OVITO visualization for post-processing and defect/interface analysis.
- Construct and preprocess atomic configurations of nanoglass and metallic glass samples.
- Simulate atomic behavior using realistic thermodynamic conditions via LAMMPS.
- Investigate creep and diffusion properties across grain interfaces at high temperatures (up to 600 K).
- Visualize structural evolution and deformation using OVITO.
- Provide a reproducible workflow linking MATLAB, LAMMPS, and OVITO.
- The nanoglass consists of Cu and Zr atoms arranged in amorphous and crystalline regions.
- Atomic coordinates are generated and assembled in MATLAB, assigning:
- Atom IDs
- Atom types (Cu = 1, Zr = 2)
- Box bounds and spatial coordinates (x, y, z)
- Inter-facial atoms between grains are flagged for later visualization of strain and creep zones.
- The MATLAB script
matlab_project_final_code_600K.mgenerates a LAMMPS-readable.lmpfile (example_input/mg_550k_final_datafile_4000atoms.lmp). - It includes:
- Header with atom counts and box dimensions.
Massessection for Cu and Zr.Atomssection with atom type and position.
- Configurations correspond to ~4000 atoms, ideal for test simulations.
- The
.lmpdatafile is used as input for LAMMPS to perform MD simulations. - Typical input structure:
units metal atom_style atomic boundary p p p read_data example_input/mg_550k_final_datafile_4000atoms.lmp # Force field parameters pair_style eam/alloy pair_coeff * * CuZr.eam.alloy Cu Zr # Equilibration and run fix 1 all npt temp 600 600 0.1 iso 0 0 1 run 500000 write_dump all custom abc1 id type x y z
- Melting (Melt_Cu_Zr) → ~1200 K
- Quenching → 600 K
- Creep Simulation under stress/strain.
- Intermediate snapshots are saved as text dumps (abc1, abc10) and binary restarts (Melt_Cu_Zr.*).
- LAMMPS text dumps (abc*) are loaded in OVITO for visualization.
- Structural and dynamic properties analyzed:
- Interface atomic structure
- Atomic displacement and local strain
- Volume fraction of amorphous vs. crystalline regions
- Time evolution of potential energy and RDF (Radial Distribution Function)
🧩 5. Visualization Workflow (OVITO) To view simulation results:
- Open OVITO.
- Load example_output/abc1 (or abc10).
- Apply Color Coding → Atom Type to visualize Cu/Zr distribution.
- Use Atomic Strain modifier to see deformation.
- Optionally, export PNG snapshots or MP4 animations.
This MATLAB script performs the following:
- Defines physical constants and simulation box parameters.
- Generates or imports atom coordinate arrays.
- Assigns random positions for atoms following a uniform lattice or amorphous geometry.
- Converts physical positions to fractional coordinates.
- Writes an output .lmp file with correct LAMMPS header structure.
- Creep in Nanoglasses: The amorphous–crystalline interface facilitates localized deformation, leading to higher strain accommodation compared to fully crystalline systems.
- Thermal Evolution: Rapid quenching from melt creates under-cooled liquid states that mimic metallic glass structure.
- Interface Mechanics: Strain localizes at high-energy boundaries; diffusivity and creep resistance depend on temperature and cooling rate.
- Simulation Outcome: Verified stability of amorphous regions at 600 K; interface zones exhibit atom rearrangement similar to experimental observations of Cu–Zr nanoglasses.
- Greer, A. L., et al. Metallic glasses: structure, properties and applications, MRS Bulletin (2013).
- J. Ding et al. Nanoglass formation and deformation behavior in Cu–Zr alloys, Nature Materials (2012).
- LAMMPS documentation: https://docs.lammps.org
Developed as part of the B.Tech Major Project at the School of Minerals, Metallurgical and Materials Engineering, IIT Bhubaneswar, under the guidance of Prof. Kisor Kumar Sahu, Department of Metallurgical Engineering.
- MATLAB R2019b or newer
- LAMMPS (tested on version 23Jun2022)
- OVITO for visualization Tools and visualization supported by LAMMPS and OVITO open-source communities.