There are no secrets in the plugin, the formula is given in the code:
def buckle(x, width, length, amplitude, z_start, z_end, periods_y, periods_z):
"""
Function for converting a nanosheet coordinate into a wobbled graphene nano-sheet
@param x : Coordinates of an atom
@param width : wave length of the buckling in the y-direction
@param length : wave length of the buckling in the z-direction
@param amplitude : Buckling in units of Angstrom
@param z_start : z value for starting the buckling
@param z_end : z value for ending the buckling
@param periods_y : number of periods in y
@param periods_z : number of periods in z
"""
# do not buckle for z > z_end
z = x[2]
z = min(z,z_end)
# do not buckle for z < z_start
z = z - z_start
z = max (z,0.0)
# find the buckling phase of the current atom in the y and z directions
if periods_y==0:
phase_y = math.pi/2
else:
phase_y = 2.*math.pi*(x[1]-width/2.)/width * periods_y
if periods_z==0:
phase_z = math.pi/2
else:
phase_z = 2.*math.pi*(z-length/2.)/length * periods_z
# return atom position of the wrapped atom
return x + numpy.array([amplitude*math.sin(phase_y)*math.sin(phase_z),0.0,0.0])
That is, a function f(y,z) is added to the x coordinate of each atoms, and essentially f(y,z)=A*sin(y)*sin(z), but with the small adjustment that
a) it's possible to specify an excluded zone on the edges in Z, where f=A*sin(Y); this is so we can easily ripple transport systems;
b) the Y and Z coordinates must of course be renormalized so we can use the sin() function normally; these are the "phase" coordinates.