How to add random dislocations in LAMMPS before compression?

Screenshot 2023-08-20 at 12.50.46 PM
I have created such a sample in LAMMPS. The blue part is CoAl and green is Ni. I wanted to induce random multiple dislocations in CoAl. Does anyone have any suggestions as to how I can do those? I want to avoid damaging the crystal too much before doing the compression test. Thanks.

There is the displace_atoms command — LAMMPS documentation that may be helpful here.
You can first define a (randomized?) region and then apply some displacements.

If you want to have some more well defined dislocation pattern, you probably will have to create a suitable structure from scratch.

Experimentalists have observed that there are dislocations in the CoAl (blue region) before compression. I wanted to simulate the same. But after minimization LAMMPS creates a sample with no dislocations. This is what I meant by random dislocations in the sample. Can displace atoms do that?

That is up to you to figure out. The documentation for the command says what it does. If that is sufficient, then yes, otherwise no. How to go about this and what specific simulation steps to perform to coax an MD simulation system into such a state is a matter of the specific area of research and thus something to be discussed with your adviser or colleagues or collaborators. It is not of concern to the simulation software itself and thus off-topic for this forum.

You have to be aware that people here are not experts in your area of research and particularly don’t know any details about what you want to replicate, so there is no advice that can be given beyond pointing out possibly useful features in LAMMPS and some general thermodynamic or statistical mechanical considerations.

For example, that those dislocations are not happening in a simulation spontaneously, is rather obvious from general statistical mechanical considerations. There are finite size effects to be considered, possible nucleation effects from impurities and more. In a simulation you create an idealized system at a degree of perfection impossible to achieve in experiments, but also at sizes far below the size of experimental setups. So you need to look into that as well. If you are looking for a “do this, not that” kind of response, you are definitely asking in the wrong place and talking to the wrong people here.