[lammps-users] Lammps: Point dipoles in a 2d box NVE

Hello, I still have some trouble with the point dipoles, here the script:

# Point dipoles in a 2d box

units lj
atom_style dipole
dimension 2

lattice sq2 0.3
region box block -7 7 -7 7 -0.5 0.5
create_box 1 box
create_atoms 1 box

mass 1 1.0
shape 1 1 1 1
dipole 1 0.75
set group all dipole/random 98934

velocity all create 0.5 87287 mom yes

pair_style dipole/cut 6.0
pair_coeff * * 1.0 1.0

neighbor 0.3 bin
neigh_modify delay 0

fix 1 all nve/sphere update dipole
fix 2 all enforce2d

timestep 0.001

compute erot all erotate/sphere

compute mytemp all temp/sphere

thermo_style custom step temp epair c_erot etotal press

thermo_modify temp mytemp

thermo 500

dump 1 all custom 1000 dump.dipole id type x y z mux muy muz

run 2000000

I have included the "compute mytemp all temp/sphere" and "thermo_modify
temp mytemp" commands to take the orientational degree of freedom into
account. Somehow the nve calculation give me a increasing energy every
timestep, with some plateaus. I don't know what else I have to change to
calculate the right values.

Thanks for help!

Gerald Rosenthal

Once the system equilibrates a bit, does the temperature
rise dramatically over time or slowly? Dipoles
have a long-range interaction, so you need a long
cutoff to avoid big energy changes at the cutoff distance.
You can also thermostat with fix nvt/sphere.

Steve

Hello,

I thought a cutoff of 6 diameters is long enough. I attach some plots of
the energies and temperatures, to give you a better impression.

The calculation was done with the same parameters / script as below.

Can it be, that within the nve calculation some other command must be
included to fix the total energy to a constant value (besides some noise
from numerical errors)

Best
Gerald Rosenthal

Dipoles2d_nve.pdf (629 KB)

That doesn't seem like a lot of energy rise for
2 milion steps of a system that is inherently
long range. I would say just thermostat with
fix langevin. We probably need to add an update
dipole keyword to fix nvt/sphere to allow that
also.

Steve