I want to prepare a system where I can embed a CNT on a copper slab up to a certain depth, just like in the image. Please what commands are useful in doing this? And is there a LAMMPS example/tutorial on this. I only use LAMMPS to run dynamics so I’m not too familiar with system generation aspect of LAMMPS. Thanks for your help.
Don’t worry, there’s honestly not that much to be familiar with. LAMMPS is primarily for running dynamics and doesn’t have much inbuilt system generation tools.
However, if you have pre-equilibrated copper slab and CNT LAMMPS data files, you may be able to start by trying the following approach:
read_data to input the copper slab
delete_atoms with a suitable region to “cut out” a hole for the CNT
change_box to accommodate the CNT
read_data ... add yes to add in the CNT
Please note that the “correct” way to do this will be very customized to your system, and so the best way to ask for help will be in the form of “I tried X, which according to the documentation and my inputs A, B and C, should do Y, but then Z happened instead” rather than “how do I do Y”.
get a data file for the CNT (there are tools for that). Make sure that it is suitable for the potential you want to use, i.e. with or without a bond topology and with or without charges
adjust the box dimensions in the data file as needed (using a text editor)
read the data file into LAMMPS with read_data and use the extra keyword to add two atom types (since your image suggests creating a binary alloy
define a region for your metal atoms
fill the region with atoms using create_atoms using the first additional atom type
use the set command to change a fraction of those atoms to the second additional atom type to get your allow
define groups for the CNT atoms and the metal atoms for use with the next command
use the command delete_atoms with the overlap keyword to remove metal atoms overlapping with CNT atoms.