Fix rigid issue

Hello. I am attempting to create a simple rigid body composed of
Lennard-Jones spheres. While the attached script appears to be set up
correctly, I am unable to impart any velocity to the created rigid
bodies. Though this script invokes 'fix langevin', I have also
attempted using the velocity create command along with fix rigid/nvt.
If someone would be kind enough to point out what I am missing, it
would be a great help.

I am using LAMMPS 9 November 2011, downloaded via svn, with some
modified fixes and potentials (none of those being used.)

Thanks in advance.

in.lmp (1.22 KB)

Hello. I am attempting to create a simple rigid body composed of
Lennard-Jones spheres. While the attached script appears to be set up
correctly, I am unable to impart any velocity to the created rigid
bodies. Though this script invokes 'fix langevin', I have also
attempted using the velocity create command along with fix rigid/nvt.
If someone would be kind enough to point out what I am missing, it
would be a great help.

there is neither a fix rigid nor a fix langevin in the attached script.
it would be easier to read, if all irrelevant commands would
be removed.

also, the script is useless without the data file...

axel.

arrrrggh!!

sorry,
was looking at the wrong file.
my webbrowser silently renamed
the file, since there was a different
one with the same name already.
ouch! how stupid...

will check again.

axel.

Axel-

Thanks for your reply; In the process of attaching the output, I found that a velocity is there with the current script. However, the output of ‘thermo’ gives the following (wrong) information about the kinetic and total energy. Namely, it is clear that the positions and velocities are updated from the dump file, but this does not affect the thermodynamic information. Both outputs are attached inline below.

–dump–

ITEM: TIMESTEP
100
ITEM: NUMBER OF ATOMS
6
ITEM: BOX BOUNDS pp pp pp
-15 15
-15 15
-15 15
ITEM: ATOMS x y z vx vy vz
-5.90515 0.451051 0.26055 0.618314 0.606471 -0.113442
-5.00527 0.0149259 0.261817 0.376744 0.109299 0.325218
-4.10538 -0.421199 0.263085 0.135174 -0.387874 0.763878
4.5057 0.326095 0.0841215 0.818368 0.171839 -0.496988
5.3903 -0.132387 0.169449 0.570296 -0.276089 -0.332012
6.2749 -0.590869 0.254776 0.322224 -0.724017 -0.167035

–log–

LAMMPS (9 Nov 2011)

Axel-

Thanks for your reply; In the process of attaching the output, I found that
a velocity *is* there with the current script. However, the output of
'thermo' gives the following (wrong) information about the kinetic and total
energy. Namely, it is clear that the positions and velocities are updated
from the dump file, but this does not affect the thermodynamic information.
Both outputs are attached inline below.

nod. i got this far, too.
the problem seems to be
related to the

set shape

statements. if i comment them
out, there is information about
kinetic energy and temperature.

this will need some digging in
the sources to figure out the
reason for this inconsistency.

please have a little patience.

axel.

You have to use compute temp/asphere to calculate
the temperature correctly, whether using isolated
ellipsoids or ellipsoids in a rigid body. This is b/c
the temperature compute subtracts out the dof (degrees of freedom)
in the rigid body to leave 6 per body, assuming there are 6 dof
per aspherical particle. So if you use compute temp, it
will start with just 3 dof per particle, and you get
a negative final dof, which it reports as temp = 0.0.
If you use compute temp/asphere it starts with 6 dof per
particle and you the right answer.

Below is your script modified to run with current LAMMPS.
It produces non-zero temps, and the viz looks good.

Steve

atom_style ellipsoid

lattice sc 1.0
region simulation block -15.0 15.0 -15.0 15.0 -15.0 15.0 units box
region lessthan block -15.0 .0 -15.0 15.0 -15.0 15.0 units box
region grtrthan block .0 15.0 -15.0 15.0 -15.0 15.0 units box
create_box 2 simulation

create_atoms 1 single -5 0 0 units box
create_atoms 1 single 5 0 0 units box

#number one
create_atoms 2 single -4.0 0 0 units box
create_atoms 2 single -6.0 0 0 units box

#number two
create_atoms 2 single 4.0 0 0 units box
create_atoms 2 single 6.0 0 0 units box

#settings
set type 1 shape 4.0 4.0 4.0
set type 2 shape 1.0 1.0 1.0
set type 1 mass 1.000
set type 2 mass 0.001

#groups
group molecules type 1 2
group grpless region lessthan
group grpgrtr region grtrthan
group mol1 intersect grpgrtr molecules
group mol2 intersect grpless molecules

#coeffs
pair_style lj/cut 5.0
pair_coeff 1 1 1.0 4.0 4.48984819
pair_coeff 1 2 0.0 1.0 1.0
pair_coeff 2 2 1.0 1.0 3.0

#speed up neighbor calculations
neigh_modify exclude type 1 2

compute tmine all temp/asphere

timestep 0.01
thermo 100
thermo_style custom step temp c_tmine epair press

fix rigidnve molecules rigid/nve group 2 mol1 mol2
fix rigidlan molecules langevin 1.0 1.0 1.0 1

dump mydump all custom 100 tmp.dump id type x y z vx vy vz

run 1000