LAMMPS input for carbon atoms, initially in the liquid state (high temperature). The temperature of the system is decreased progressively until hexagonal rings form. The final state is an amorphous nanoporous structure of carbon. This video has been made with this script.
Execute the input.lammps file using LAMMPS. Visualize the dump file using VMD.
If you are new to LAMMPS, you can find tutorials and instructions here.
Feel free to contact me by email if you have inquiries. You can find contact details on my personal page.