One atom got lost during scratching simulation


I was simulating a hard diamond-like structure sphere sliding on a bulk SiC. However, during the scratching, there was one Si atom got stuck on the back of the hard sphere and flied away afterwards. I would like to ask that whether it’s because of the potential between SiC and the hard C sphere (Here I used Morse potential with cutoff distance of 3 Angstrom), or the poor structure of the model used. The boundary condition is pps (The sliding happens along x direction), and the timestep is 0.001 ps. I think probably it’s due to the potential I used (maybe inappropriate coefficients) since that atom flied after sticking with the hard sphere for a while and is the only one got lost in the system. The rest part of the model looks fine. The energy minimization process also was completed without obvious issues. Any idea on it?

Thank you!

Have you discussed with with somebody? Like your adviser/supervisor and/or (experienced) colleagues?

This is the kind of item to discuss with them and show visualizations, inputs etc. Without being involved in your research and knowing more details, it is next to impossible to give reliable advice. The only option would be to speculate based on second hand information, which is not something that I personally like to do.

If at all, this would be a topic for a more general category about simulations on this forum (I don’t know if this already exists. @mkhorton any suggestions?) since this is not really about LAMMPS.

1 Like

Thank you Mr. Akohlmey for your reply! Unfortunately, there is nobody around me working with LAMMPS. So, I have to try to figure it out by myself. And yes, I think you’re right, although it’s about atom lost, but it’s not that general when comes to what I’ve met in this problem. I also checked the related topics on the forum and I can get the basic idea on the possible reasons of atom lost, but I feel like mine is just not common like that. I guess I will try my best to see if I can solve it or not. Thank you for the help!

Oh, One thing is that I’m not sure whether the size of the model could affect it or not. I used a small size of model at the beginning, and the whole simulation just looks fine. Then, I switched to a larger one with the same configuration, and it got an atom lost.

There must be somebody around that has experience in MD simulations. Otherwise you are in big trouble. There are so many practical details that are “residual knowledge” in groups doing MD simulations that you are bound to make many mistakes that people have done and learned from over the time the MD as a method exists (which is a lot). Text books and the internet are no replacement for that since a lot of that is not written down. Doing good MD is as much a craft as it is science and good craftsmanship you can only acquire from working with somebody that can pass that knowledge. Just like in other crafts where people do an apprenticeship (and later become a journeyman to have personal exchanges with others) to pick up those skills needed. If there really is nobody around (which I doubt, you probably just didn’t look hard enough or were too afraid to ask), then you should discuss with your adviser/supervisor about finding a suitable group with the necessary experience to collaborate with and transfer that kind of knowledge.

I strongly advise against trying to do this all on your own and from resources that you can find on the internet.


There is a general #talk category on (intentionally vague, it’s intended to be a general place to discuss anything relevant to the community), but as yet there hasn’t been a lot of engagement there.

Thank you for these suggestions! Yes, I cannot agree with you more that discussing the details with others around is very important, but it seems people in my school are more interested in FEM. There is only one group studying MD simulation but with Materials Studio only. I also think that I need to transfer to maybe another university for better study on MD in the future. So far, the only thing I can do is to learn it by myself with the help from the papers, textbooks and the internet. Thank you again for the help! I really appreciate it!

Hmmm… That may be too vague. Perhaps adding some subcategories like “MD Simulation”, “Visualization”, “Database queries”, “Data post-processing and Analysis” or similar (I don’t have a good handle of what kind of “generic” questions ask in other areas of the forum) may help to show people what kind of questions they can ask or discuss. Or perhaps use a term like “General discussion” or “Research Advice” or similar might seem more appropriate. “#talk” looks like it was an auto-generated default topic and may not be enticing enough.

1 Like

That’s fair, perhaps “#science-talk” at least would be better. Many posts in that category haven’t had responses yet either way. I think adding some general sub-categories is a nice idea.

1 Like

Interesting phenomenon, If I was you, I would look at the kinetic energy of the lost atom before its flying away. My experiences about lost atoms are often due to high kinetic energy. If the diamond sphere made from C atoms, you can try to do “fix temp/rescale” to make sure the temperature of sphere is cool during simulation and possibly no atom stuck with it.


Hi ddinhta! Thanks for your idea and suggestion!

Yes, checking the kinetic energy is a good idea. About the diamond sphere, here I use fix setforce to make the C atoms fixed and treat the sphere as a hard indenter such that I just ignore the interactions among those C atoms in the sphere. During the scratching, its temperature would be 0 K. I’m not sure whether this is reasonable. Since then I’ve tried some ways to avoid the atom fly, and it looks like everything goes well after I reduced the cutoff distance a little bit for the Morse potential (from 3 Angstrom to 2.5 Angstrom), which is used to represent the interactions between the sphere atoms and SiC atoms. However, I cannot tell the reason, maybe it’s due to a smaller cutoff distance can remove some of the forces between C atoms and Si or C atoms form SiC?

Can you try:

  1. Fix temp/rescale for some layers on the surface (~10A)
  2. Slowdown the indenter’s speed when it contacts with the surface
  3. Create diamond structure for atoms in the sphere.
    (1)&(2) may help you with the issue of atom lost. (3) can help you to keep the interactions between atoms (in indenter, in specimen and between them)
1 Like

Thank you so much for your idea ddinhta!

Yes, I will try what you said. For the fix temp/rescale, I use it to the thermostat group, which is at the bottom several layers above the fixed layers to dissipate the heat. Do you mean I can also use it at the top layers? About the indenter, I actually created the diamond structure C atoms hemisphere like you said. Since I want it to be a hard tool, I just fix all of the atoms from the hemisphere so that I don’t have to consider the interactions between those C atoms in the indenter. The speed of the indenter is set to 20m/s. Do you think I still need to decrease it? I think the scratching speed would be one of the influences that I would like to study during the scratching process. But your idea is very useful to my study with LAMMPS!

Now the simulation works well without any atoms flying away. The only thing I modified is the cutoff distance of the Morse potential used for the interactions between the indenter atoms and SiC. This is where I’m not fully understand. But I will also run the simulations with different configurations like deeper scratching depth or higher system temperature to see whether this modification can work well under different circumstance. I will let you know if there is any updates.

Thank you very much!!

  1. It is also interesting that the control of cut off distance can solve your problem. I am not familiar with Morse potential.
  2. For indenter speed I think In dynamic conditions, strain rate is more important than absolute value. For example, if you want to use this speed (20m/s) for a specimen with 200nm depth. Your strain rate will be in order of 10^8/s. This rate is often much higher than any scratching speed in an experiment. Then you may want to decrease the speed, but slower penetration cost you more simulation time… So indenter speed is up to your choice.
  3. For thermostat, I prefer to apply to the top layers as well, because it looks similar to reality where heat dissipated from inside material to both free surfaces, not only the bottom one.
  4. It is fine for the hard indenter as your way, but there is no real hard tool in life. The hardest material is diamond. You already have potential for C so it cost nothing to you to see what happen if existed the interactions between atoms in the indenter.
1 Like

Sorry, this is not “interesting” but a bad idea™. The cutoff that is to be used with a set of potential parameters is usually determined by that parameterization. That is particularly important if it is a “short” cutoff, like in the given situation, as that would likely be set to the minimum of the potential and thus rendering it a repulsive only potential. Changing the cutoff in this case to a different value will significantly alter the behavior of the interaction and thus will render the calculation bogus.
If the cutoff is “long” it may be extended to a large distance for a small improvement of the behavior around the cutoff distance, but is should usually be chose so large that the discontinuity in forces is to small to be significant. Again, using a shorter than recommended cutoff is altering the behavior and thus not a good idea.

Again, this is also a bad idea™. It is not more realistic but less. Around a free surface the realistic interactions are only those between the atoms present in the system and their interactions and collisions are the only realistic way to transfer momentum and thus couple kinetic energy. Adding a thermostat will alter those dynamics by unphysically coupling those motions to an external heat bath and that would be bogus. In a slab configuration a (dissipative) thermostat coupled to the lower layers is usually needed for a realistic modeling because a) you have a truncated system, so there is no direct coupling to a bulk possible (or else you would have to significantly increase the system size and waste a lot of compute power of computing forces on atoms that you don’t really care much about) and particularly since you need to immobilize the bottom of the system to preserve the integrity of your model.

On top of that, I saw you mention fix temp/rescale, which is also a very bad idea™. Fix temp/rescale is the simplest but also the “worst” thermostat algorithm in LAMMPS. It should most certainly not be used for any production level simulations as it a (unphysically) enhances fluctuations (since it changes faster atoms more than slower atoms) and can produce (unphysical) behavior due to each rescaling being equivalent to giving the system a “kick”. There is a discussion of the history of thermostats in MD in the talk by Gary Grest at the most recent LAMMPS workshop, if I remember correctly that discusses (some of) their properties and shortcomings.


Thank you very much Dr. Axel Kohlmeyer for your clarification about the shortcomings of fix temp/rescale. It really helps me to learn about MD. As you mentioned temp/rescale is the worst thermostat algorithm, do you think, if I don’t want the temperature of an NVE system keep going up, instead of using “temp/rescale” I can use “fix heat” to dissipate a part of heat from the system?

1 Like

Thank you for these detailed explanation Mr. akohlmey! I think the longer the cutoff distance, the more precise the result will be usually, though it will cause more computational time. But I haven’t found a good place to really know how a recommend cutoff distance is determined. For Morse potential, I used 3.0 as the cutoff distance previously, now I changed back to 2.5 and the simulation system looked fine. I thought with larger cutoff, I should have been able to get a better result.

About the fix temp/rescale, it’s too bad that I’ve been keeping using it since I started to learn LAMMPS. I will check the discussion you mentioned to study more about the methods of adding thermostat.

Thank you very much Mr. dinhta for your idea! I will try different scratching speed, depth and study the details of this simulatioin.

I really appreciate both of your help!

1 Like

The value of a suitable cutoff must be mentioned in the original publication where you got the parameters from. From what I gather from your response both 2.5 and 3.0 are likely very wrong, since those are typical values used for “lj” units. in “metal” or “real” units cutoffs from 8 angstrom (very aggressive usually only mentioned in very old papers) to 14 angstrom are usually used, unless it is meant to be a repulsive-only potential, then the cutoff must be at exactly the minimum of the potential.

Please also note that atoms flying away from such operations is not exactly unusual. This can be quite “brutal”.

Please see a video of a simulated (with LAMMPS!) simplified AFM experiment from coupling a haptic device to VMD and using interactive real-time visualization here: Virtual Atomic Force Microscope using Interactive MD with LAMMPS and VMD - YouTube

And this is only a mild version of what is happening when an AFM tip hits surfaces. For practical reasons I had to scale the mass of the AFM tip atoms to 1000th of their original mass, so with a real AFM tip the atoms would fly around even more wildly (especially the weakly interacting green ones).

Please also note that for practical reasons I had to put a friction term on the free atoms (the experiment requires fixed boundaries, but the mechanism to visualize and interact with a haptic device to control the AFM tip required that no atoms may leave the simulation, and without the friction they would have just bounced off the walls and accelerated even more and ruined the visualization. without the requirement for constant number of atoms, one would just instruct LAMMPS to ignore and forget about atoms that left the simulation box)…

1 Like

LAMMPS has a whole bunch of thermostat algorithms included. Some of them are combined with an integrator. Please review the documentation and tutorial materials.

After your system is equilibrated, there should be no thermostat required to maintain the temperature for a system that does nothing else. Checking for proper energy conservation is a basic task for running MD simulations and especially something that people with little experience should be doing. Check the corresponding text book literature and also available tutorial materials on that subject (doesn’t need to be a tutorial about LAMMPS, these things are the same of any MD software).

This interaction also suggests that you need to get proper in person(!) tutoring on MD simulations. An internet forum is an insufficient substitute for that, and - more importantly in this case - I don’t have the time to be everybody’s tutor and advise them on items they should have already been trained on by their adviser/PI/colleagues/tutor/collaborators. I can give you some basic pointers, but the rest is not really a LAMMPS topic. If you feel like it, you can ask the forum maintainers to have a separate category created for people needing tutoring, but don’t expect this to work well. Tutoring (if done well) takes time and effort and people in this business are usually too busy doing their own thing to spend time on that as well.

The people best suited for tutoring, BTW, are not people like me (my patience is too short) but people that have just learned the corresponding lessons themselves. There is nothing better in learning stuff properly than trying to share it with somebody else when it is still fresh. Both will benefit a lot: the beginner will become and experienced beginner and eventually a skilled practitioner and the advanced/trained beginner will learn things much more thoroughly and better than it is ever possible with just being at the receiving end of training. I have been through such a process myself with multiple software packages and simulation methods and can vouch for the efficiency of it (you can see me responding to emails on different mailing lists going back for about 20 years now) and I am still learning and improving…


Thank you so much for your help Mr. akohlmey! Your explanation is very clear. I think I need to learn more about the potentials so that I can understand how to pick up reasonable parameters. And yes, I may just let LAMMPS ignore the flying atoms because it makes sense in my friction process. It’s good to know these things with that amazing video! Thanks for telling me the details about it and I really appreciate it!

1 Like