the method to model randomly roughness surface

Dear Lammps User,

I am trying to model a randomly roughness carbon surface.

I have found a MATLAB code can generate randomly roughness surface.
https://ww2.mathworks.cn/matlabcentral/fileexchange/60817-surface-generator-artificial-randomly-rough-surfaces

Does anyone know how to save this surface as xyz format file for running MD simulation by LAMMPS.

Otherwise, can anyone suggest other method ways to create rough surface for lammps use?

It would be highly appreciated for any suggests.

Thank you very much

Liyi

If you have a mathematical model for creating such surfaces (i.e. diamond square algorithm), you could write a small script that will loop through all atom positions and delete all atoms above/below the generated surface.
You would have to be careful though, because cutting a surface like that may introduce a lot of problems (unstable surface, loose bonds etc), which will give bad simulation results unless handled properly.

Anders

You can also look at the create_atoms command and its var/set keywords. The
doc page has a picture of a sinusoidal surface created with a simple formula via
the variable command.

You could use the same idea to create a more “random” surface if you
were creative about the formula you defined - there is a also a random() function
available in the variable command.

Basically that command is doing what Anders suggested, it is generating
lots of atoms and discarding some by figuring out if they are above or below
the analytic surface.

Steve

Dear Anders,

Thank you very much for your advice.

I have made a smooth surface(several layers) and wrote a script too loop all the atom positions.
However, the most challenge technique is to define a formula to delete the atoms randomly.
Do you have any suggestions about this?

Thank you.
Best Wishes

Liyi

Anders Hafreager <andershaf@…24…> 于2018年11月30日周五 下午10:16写道:

Dear Steve,

Thank you very much for your helpful point.

Best Wishes

Liyi

Steve Plimpton <[email protected]> 于2018年12月1日周六 上午2:27写道: