Hi Karsu
I hesitate to reply with more moltemplate spam. I periodically post spam-like replies telling people to build a DATA file, and point out a list of molecule builders they can use to do it. And I often take care to point out my own program, “moltemplate”, if I think it might be relevant to them.
In your case, I’m too clueless to know enough about the type of material you are trying to build to know if my program would help at all.
If you need to run a physically realistic reactive simulation to prepare a realistic starting geometry of your system, then I presume what you really need is a way to build a starting geometry for that simulation (even if its not the final simulation you intend to run).
If you just need to replacing side groups on the surface with randomly chosen chemical groups (or add random vacancies), this can easily be done with moltemplate using the “new random” command, explained in section 7.8 and 7.9 of the moltemplate manual:
http://moltemplate.org/doc/index.html
Examples from the manual below (for a coarse grained 2D membrane composed of random molecules):
You can use other commands to create the bulk (crystalline?) material below the surface (if applicable).
In addition, PACKMOL and moltemplate also can be used to create random mixtures of molecules on a surface, or in 3D. Examples:
http://moltemplate.org/examples/vesicle_Brannigan2005+Bellesia2010.html
http://moltemplate.org/visual_examples.html#martini_DPPC_bilayer
As Axel said, for more flexibility, try the python interface. The only issue is that I’m not sure how much functionality the python interface currently has for adding molecules and controlling their position and bond connectivity (yet). (I wish it did.) But python is a general programming language, and moltemplate is not. (Alas, moltemplate functionality is not yet available from within python. Unfortunately, you currently have to run moltemplate through the bash shell. Perhaps this will change one day.)
I don’t know if it’s relevant, but when I need complicated geometries, I currently use the clumsy procedure of writing a python script to create a file containing a list of moltemplate commands which explicitly define the positions and rotations of all the molecules and other building blocks in the system. (Moltemplate will allow you to customize position and orientation of individual molecules.) Then I run moltemplate on that file. Unfortunately, building a system like this with more than a million particles will take hours (but it works). Depending on your system size, perhaps that’s not an issue.
Other molecule builders for LAMMPS are listed here:
https://lammps.sandia.gov/prepost.html
Andrew