I want to create a cuboid simulation box with lattice points at a regular lattice spacing and store the lattice point coordinates in an three dimensional array. I am a beginner in cpp and simulation so it would be helpful if you explain the code as well.
I am doing a Monte Carlo simulation of monomer interaction and study its growth into a polymer.
The simulation box with lattice points would be created and monomers would be randomly placed on those points. Metropolis algorithm is used to validate the interactions.
So I need to calculate the vertices and then use those co-ordinates to create a PDB file for visualizing the process in VMD.
From "regular lattice spacing" follows that one can compute every lattice point from one + indices + axes.
You probably don't need all the points, just the location of your "monomers" and even that can be stored as index of the lattice point, i.e tuple of three integral values.