Molecule doesn't move despite fix nve

Dear LAMMPS users and developers,
I have two cubes (polyhedrons), one is red from data.start, the other one is inserted from molecule.cube.
When I apply fix nve to the second cube only, none of the cubes moves. (It works fine vice versa and for both though).
Why is this ?
I am on Ubuntu 22.04.4 LTS, LAMMPS (2 Aug 2023 - Update 2)
in.script:

boundary    f f f
comm_modify vel yes

atom_style  body rounded/polyhedron 1 8
atom_modify map array


region          reg block 0 60 0 60 0 60 units box
create_box      4 reg

read_data     data.start add append


variable cut_inner  equal 0
variable k_n        equal 1000
variable k_na       equal 0
variable c_n        equal 10
variable c_t        equal 10
variable mu         equal 0
variable A_ua       equal 1

pair_style body/rounded/polyhedron ${c_n} ${c_t} ${mu} ${A_ua} ${cut_inner}
pair_coeff * * ${k_n} ${k_na}

neighbor     0.5 bin
neigh_modify every 1 delay 0 check yes

timestep     0.001



fix          g all gravity 1.0 vector 0 0 -1

molecule     object molecule.cube

region       slab block 5 45 5 45 25 35 units box
fix          ins all pour 1 2 4767548 vol 0.4 10 region slab mol object

group group1 type 1
group group2 type 2

fix          1 group2 nve/body

thermo_style custom step atoms ke pe etotal press
thermo       1000
thermo_modify lost ignore flush yes


dump         2 all image 1000 *.gif type type &
             zoom 1.5 adiam 1.5 body type 0 0 view 75 15
dump_modify  2 pad 6


run          10000

data.start:

1 atoms
1 bodies
1 atom types
0 50 xlo xhi
0 50 ylo yhi
0 50 zlo zhi

Atoms

1 1 1 1 35 30 30

Velocities

1 0 0 0 0 0 0

Bodies

1 3 79
8 12 6
1 1 1 0 0 0
0.75 0.75 0.75
0.75 -0.75 0.75
-0.75 -0.75 0.75
-0.75 0.75 0.75
0.75 0.75 -0.75
0.75 -0.75 -0.75
-0.75 -0.75 -0.75
-0.75 0.75 -0.75
0 1
1 2
2 3
3 0
4 5
5 6
6 7
7 4
0 4
1 5
2 6
3 7
0 1 2 3
4 5 6 7
0 1 5 4
1 2 6 5
2 3 7 6
3 0 4 7
0.5

molecule.cube:

# 3d polygon body: cubes, moment of inertia I = m edge^2/ 6

1 atoms
3 79 body

Coords

1 0 0 0

Types

1 2

Masses

1 1.0

Body Integers

8 12 6

Body Doubles

0.667 0.667 0.667 0 0 0
1 1 1
1 -1 1
-1 -1 1
-1 1 1
1 1 -1
1 -1 -1
-1 -1 -1
-1 1 -1
0 1
1 2
2 3
3 0
4 5
5 6
6 7
7 4
0 4
1 5
2 6
3 7
0 1 2 3
4 5 6 7
0 1 5 4
1 2 6 5
2 3 7 6
3 0 4 7
0.5

The only workaround I have found so far is to redefine group2:
group group2 subtract all group1
But I am still wondering why direct definition of the group by type doesn’t work.

Now I’ve got it. It adds the molecule as type 4, which seems to match create_box 4 reg.
Why? Is there a way to control the type to be added ?

Have a look at the log file. How many atoms are in group1? How many do you expect to be in it?

Have a look at the log file again. Same questions!
Please also have a look at the documentation for the group command. How are group members determined and when?

So how many atoms does this fix work on?

Is your input designed to have atoms leave the box? If not, this is a very, very bad idea. It will hide when bad things happen.

When exactly are atoms inserted and to which group(s) are they added?
How does fix pour determine the type of atom? and how is this different when using a molecule template?

That “workaround” is only a partial workaround. Have a look at the log file again. You can “save” the contents of all groups to a file with the “group2ndx” and have a closer look.

That is a coincidence. If you read the documentation for fix pour with more attention to detail you would know the answer yourself.

Of course there is, but for as long as you remain ignorant of the documentation you will not find it.

There is nothing unusual in your simulation. Everything you mention seems to be in complete accord with the documented behavior of the commands you are using.

1 Like

I am stupid and slow. Sorry for that.
But I can not refrain from mastering such a beautiful software masterpiece as LAMMPS, created by you!

Nobody asks you to do that, but you must learn how to solve problems by yourself and ask only questions that are not already answered by the documentation or can be easily resolved with some observations and some small tests. If you keep posting without, you will quickly exhaust the patience of people that are responding, as they want to see that their responses encourage people to resolve problems on their own rather than taking advantage of the forum responders for convenience.

1 Like