Write a function that takes as input the grid size, N , and the number of monomers
we wish to consider M . The function should return a grid with the monomers placed
randomly. Monomers can only be placed in the solvent, not on top of other monomers.
Check that the grid has 2M non-zero values. M of these values represent positively
charged monomers, the other M represent negatively charged monomers.
Write a function that takes as input the grid size, N , and the number of monomers we wish to consider M . The function should return a grid with the monomers placed randomly. Monomers can only be placed in the solvent, not on top of other monomers. Check that the grid has 2M non-zero values. M of these values represent positively charged monomers, the other M represent negatively charged monomers.