This code generates water.gro which contains water molecules in the gromacs supported format with user specified dimensions. User can also offset the water to a particular location by offset variables.
Sumith YD (2020). water gro file creation/generator in MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/47977-water-gro-file-creation-generator-in-matlab), MATLAB Central File Exchange. Retrieved .
The user can change the density according to the temperature. Also the water molecules are arranged with an inclination to provide a tight packing. I hope this will be helpful for novice programmers whose use gromacs for water simulation.
This version is updated after removing minor bugs which prevented bulk water of sizes above 25nm.