Unfortunately I think the task is quite complicated. In general, if you want to wrap a structure like graphene like this over a certain shape, you have to make sure the topology is correct. To take a simple example in 1D, if you want to put a string of equidistant (distance=a) beads along a sin(x) function, you have to ensure that the distance between the beads is correct (i.e. still equidistant) on the sin-curve, not on the x-axis. This means that to place the n-th bead (originally at x=n*a on the flat string), you have to compute the length of the string along the sin-function, find the corresponding x such that int(sin(t),0,x)=n*a, and put the bead in (t,sin(t)). That is, you have to solve the equation for t, for each n. That's is straightforward in this case because we can integrate the sin-function analytically, and more importantly there is an inverse function to the integral, arccos, so we can solve it more or less easily - but for a general shape this may not be true.
Now, in 2D, you have a similar problem for x and y separately (we can assume the problem is separable), and indeed the Gaussian function is integrable analytically - but solving the equation must be done numerically (as far as I can see).
Btw, the "Buckler" plugin I have presented elsewhere does NOT use this approach, it just shifts the graphene sheet in the Z direction. That's ok for small displacements, at least as long as you optimize the structure afterwards. But the kind of shape you indicate, the strain on the C-C bonds will be way too large, unless of course your Gaussian width is very large compared to the C-C bond length. In that case it's simpler - you can just compute Z(x,y) from the Gaussian and shift all coordinates, and that's the approach you have used.
I would strongly recommend not trying to make this as a Custom Builder, because this component is being retired soon, and we don't support it anymore. It would be a lot simpler to just write a regular Python script, compute the coordinates as you do already, and just save the structure in an NC file.
Note, however, that we can't really teach you programming here, so you should first take some basic courses in Python to understand the point about indentation for instance.