Abnormal force of NVE ensemble

Hi, all

In the following in.file, I set up a silicon plate. The top layer is set as a rigid body, and the lower part uses nve ensemble, while langevin relaxation is carried out.

I calculated the resultant force on the y direction of the entire silicon plate (including the upper and lower parts). To my surprise, it is not zero, but a large value. I wonder if the atomic force modified by nve causes this situation, because if nvt system is adopted, the comprehensive force will be almost zero. But I still can’t accept it. After all, the whole silicon board is not affected by external forces.

If so, how can we use nve ensemble to simulate friction? Because even without any external force, the resultant force on the silicon plate is not zero, which does not meet Newton’s third law. However, that is what most papers use.

in.forcetest (3.9 KB)
Sisub
upboardshortForcetestlj0^0.2_friction.txt (55.5 KB)

Hello,

Could you describe what you want to achieve? Because this statement is a bit confusing:

I suppose by NVE ensemble you mean fix NVE right? Its very different. Also to which part to you apply the Langevin thermostat? the bottom part only?

Best,
Simon

Sorry, there are some problems with my statement.

Here’s what I want to say:

the top layer:fix move 0 0.2 0(default rigid, right?)
the bottom layer:fix nve, fix langevin

Sometimes it helps to simplify your system as much as possible.

Imagine two atoms – one moving at constant velocity with fix move and the other moving based on the force exerted by the first. How will the total momentum change over time? What will the long-term steady state be?

(As a bonus challenge, how can classical inertial frame invariance hold, since an external observer can straightforwardly measure what the fix moved particle’s velocity is, given a little knowledge of the interparticle potential?)

Cool video though! :slight_smile:

Hi @hgc,
A few comments on your question:

  1. You’re not providing the version of LAMMPS you’re using and the input file you shared is a bit complex. This makes it complicated to help you in a useful way.
  2. When you say:

The top layer is set as a rigid body, and the lower part uses nve ensemble, while langevin relaxation is carried out. […] I calculated the resultant force on the y direction of the entire silicon plate (including the upper and lower parts). To my surprise, it is not zero, but a large value

Why are you surprised? You forgot to mention that you apply constant velocity to the top layer which is, admittedly, not a trivial point. See also @srtee comments on the use of fix move.

I wonder if the atomic force modified by nve causes this situation, because if nvt system is adopted, the comprehensive force will be almost zero.

The NVE fix does not modify forces but integrates equations of motion. The NVT fix does the same with modified equation to thermostat the system. What is the difference then? Note that langevin thermostat also modifies the equation of motion with the addition of forces dependant on velocities. There is a detailed section on how to thermostating system with velocity “biases” in given directions in the manual.
Finally,

If so, how can we use nve ensemble to simulate friction? Because even without any external force, the resultant force on the silicon plate is not zero, which does not meet Newton’s third law. However, that is what most papers use.

Some papers do, some papers don’t. There are several ways to simulate friction or shear in MD. Which papers are you referring to, and how do they differ compared to what you are doing?

2021 version, I think this does not constitute a problem

If only from the perspective of Newton’s third law, the resultant force on all atoms should be zero. In fact, when I no longer apply velocity to the top atom(fix move), but use fix rigid/nve (the bottom atom still uses fix nve+langevin), the resultant force is still not zero.

I did make a clerical error. As you said, fix langevin changed the force on the bottom atom; Interestingly, if the nvt ensemble is used for the bottom atoms, the resultant force is almost zero.

Too many examples of friction between two plates are studied. As I said, nve+langevin is used. The reason why I conducted the current test is that I found some problems. As I described, even if the whole upper plate is not subjected to any external force, the resultant force is also a large negative value (opposite to the direction of motion), and when the speed increases, the force will also increase. This force attribute of the upper plate itself makes it impossible for me to continue to study the influence of materials between plates on its friction.

Here are some reference articles that you can read if you are interested.
[1]Sugimura N, Washizu H. Graphene as solid lubricant vertically buried into iron contact surface by annealing for superlubricity[J]. Tribology International, 2022, 165: 107288.
[2]Le Van Sang, Sugimura N, Khajeh K, et al. Solid lubricants of combined graphene and iron nanoparticles for study of friction and stability[J]. Langmuir, 2022, 38(5): 1860-1868.

I have had a look through your input*. Your force compute has a nonzero total because your Langevin thermostat is improperly set up.

A Langevin thermostat acting on the lab frame velocities of an object with net motion will clearly exert an average non-zero total force on the whole body**. Only if the thermostat acts on the peculiar velocities will it exert zero total force on average. (You can achieve this by using fix_modify to attach a de-biasing temp/X compute to fix langevin – there are many such computes, and you will have to pick the most suitable one.)

This is a basic enough issue that I would advise you to be careful and read well before you proceed. It is good that you are reading state-of-the-art papers, but maybe you should solidify your foundations first.

*It was difficult to read your input – for example, it was not clear what your group names meant and how they corresponded to your simulation setup. Also, I happen to know Chinese, but those comments would not have helped many others here to read through your input file.

**A Langevin thermostat will almost never exert zero total force instantaneously. In LAMMPS, you need special options to enable that, which I don’t see in your script.

1 Like

Two things:

  1. If you use fix langevin, you are NOT running in an NVE ensemble. Fix nve is called the way it is not because it “creates” an NVE ensemble, but only because the resulting ensemble will only be NVE, if your system is a bulk system and there are no other manipulations of the system. This is certainly not true in your simulation. It is not in any of the well defined statistical mechanical ensembles. It is a display of the sad state of the knowledge of statistical mechanics in people that review journal articles that people get away with claiming they run in NVE because of fix nve. The same is true for NVT and NPT.

  2. Thermostatting a system under forced motion without removing the bias caused by that forced motion must lead to inconsistent results.

1 Like

Thank you for your answer. I know you are an expert in Lammps, but I still don’t understand what you said. According to the manual, using langevin does require nve ensemble. Why do you say that using langevin does not use nve ensemble?

Can you elaborate more? How to eliminate the force deviation caused by forced motion? Or is there any other setting that can achieve the same forced motion effect without force deviation?

The manual says that you should use fix nve to do time integration. What I am saying (and the documentation) is that using fix nve does not mean you are simulating an NVE ensemble. Using fix nve is a prerequisite but not the only one. Please study a text book on statistical mechanics to understand what a statistical mechanical ensemble is. Using the term incorrectly by people that lack this understanding has become a bad habit in the LAMMPS community that must be eliminated.

Please study the LAMMPS manual about thermostatting and removing biases. The information you need is all there.

I have read the section on thermostating, but I found no particularly useful information. I don’t know which section of the Lammps manual contains the information about removing biases. Can you give me some tips? Thank you.

Then you either must have read the wrong section or not read it properly.
Please note that reading the documentation will not automatically give you “do this, not that” kind of instructions. Sometimes you have to keep reading and collect multiple pieces of information from different parts of the manual into something that is useful for your specific needs. Since LAMMPS is a complex program, sometimes figuring out specific details can be more complex and thus the answer is not always spelled out for you right in front of you.

Search on Google?

^^

Thank you for your reply.

I read the document about ‘compute temp’, but I still don’t know which form is used to make the resultant force of the Langevin temperature control part zero. All forms seem to have no clear connection with resultant force. Maybe I can only try temp/com, which removes the speed of the center of mass. Do you have any other good suggestions?

Anyway, thank you again for your advice, which made me gain a lot of new knowledge.

Maybe I don’t need to make any changes to the langevin settings. The abnormality of force is the necessary condition to realize complete langevin temperature control. Even if this leads to additional resistance, which constitutes the main friction force, in any case, this is the reality, which is brought about by the langevin temperature control. This is completely normal. The requirement that the resultant force is zero is abnormal, because it will make the langevin temperature control no longer complete.

I can only advise you that you are wrong. If you want a body to have persistent overall motion (from the point of view of your simulation box), that motion should be subtracted from a Langevin thermostat, unless you are choosing to model Stokes friction from an implicit solvent.

In any case, when it is time to write up your publication, it will not matter what strangers are saying on an Internet forum. You will simply have to explain what equations of motion you chose, and if you cannot convince your reviewers that you chose correctly, you will have wasted all your time simulating and analysing your systems.

1 Like