Quasi-Two-Dimensional Ice Classification

The trajectory file for this example is here on figshare. The trajectory file details the fMSI (flat Monolayer Square Ice) formed when quasi-one-dimensional water is cooled from 320 K to 310 K. In this example, the quasi-one-dimensional ice is almost entirely composed of 4-membered rings. The square ice (4-membered primitive rings) are identified according to a topological network criterion for confined ice [1]. On running the example, an output top-level directory named runOne is created.

Steps to Run the Example

In order to run this example, without making any changes to the example files, please follow the steps below.

  • Download the LAMMPS trajectory file from here on figshare. Copy the downloaded trajectory file, entitled dump-6-320-310.lammpstrj, into the traj folder inside the top-level directory input. Alternatively, you could change the path to the trajectory file in the conf.yaml file:
trajectory: "path/to/trajectory/file"
  • You can obtain the other input files required from example_lua/monolayer folder. Copy the contents of the monolayer into the top-level lua_inputs directory.
  • You can change the frames to be analyzed by updating the options in the vars.lua file. The starting and ending frames are inclusive, starting from 1 onwards, irrespective of the timestep number.
  • A custom volume slice can also be defined in the vars.lua file.
  • The functions.lua file actually contains the Lua functions which interface with the C++ backend.

Analyzing the Output

Inside the output directory, a directory called topoMonolayer is created. Inside the topoMonolayer directory, files called coverageAreaXY.dat, coverageAreaXZ.dat, and coverageAreaYZ.dat contain the number of rings and and the corresponding coverage area% [1], for each frame. Here, the confining sheet is in the XY plane, so the coverageAreaXY.dat contains the coverage area% and quantities of interest. Inside runOne/topoMonolayer/dataFiles, LAMMPS data files which are numbered according to the frame number are created. These data files can be visualized in OVITO or VMD, although OVITO is recommended for optimal type visualization.


  1. Goswami, A., & Singh, J. K. (2020). A general topological network criterion for exploring the structure of icy nanoribbons and monolayers. Physical Chemistry Chemical Physics. doi:10.1039/c9cp04902a