About ERROR: Pair dipole/cut requires atom attributes q, mu, torque (pair_dipole_cut.cpp:357)

Yes, I have tested that example and it works fine. It hybrids atom_style sphere and dipole.
Should pair_style dipole/cut must work with atomstyle hybrid sphere dipole ? I don’t understand.
What’s wrong with my test script ?

Cun

From: Cun Zhang <[email protected]>
Date: Thu, Jul 5, 2012 at 4:14 PM
Subject: Re: [lammps-users] About ERROR: Pair dipole/cut requires atom
attributes q, mu, torque (pair_dipole_cut.cpp:357)
To: Steve Plimpton <[email protected]>

Yes, I have tested that example and it works fine. It hybrids atom_style
sphere and dipole.
Should pair_style dipole/cut must work with atomstyle hybrid sphere dipole ?
I don't understand.
What's wrong with my test script ?

why don't you just follow the example.
unlike what steve is saying, the example is
correct in requiring the sphere atom style as
additional contribution, without it, you won't
have support for torque in the atom vectors.

consequently, you have to modify the datafile
to include the two additional attributes (per atom
density and diameter, which are used to assign
a per-atom mass). there is a little bit of redundancy
here, but don't worry about it. if you use the correct
integrator fix with the proper settings, it should
work just fine.

axel.

Thank you, Axel and Steve. It’s solved now.

Dear Cun,

Could you please tell us how you solved the problem of dipole atom_style?

We have the same error of “Pair dipole/cut requires atom attributes q, mu, torque”. We are simulating Nitrogen molecules and it doesn’t need atom_style sphere.

Could you please write some first lines of the data file and the input script?

Thank you,

Mohyeddin

How are you using pair dipole/cut and not
using atom_style sphere? Dipole interactions
generate torque. If you don’t have an extended

spherical atom (aka atom-style sphere), then
then there is nothing to apply the torque to.
So the model is inconsistent.

Steve

Hi Mohyeddin,

As Steven said, to use “pair dipole/cut”, your atom style must cooperate with the “sphere” atom_style.

Following is my input script and the head lines of the data file.

Hope it be useful for you!

======In script
units metal
dimension 3
atom_style hybrid dipole sphere
boundary p p p
neighbor 2.0 nsq
neigh_modify every 1 one 10000 page 100000

read_data data.test

mass 1 12.011
set group all mass 12.011

set group all charge 0.0
set group all dipole/random 98934 0.75 #0.0 0.0 0.416

velocity all create 0.0 87287 mom no

pair_style dipole/cut 10.0 10.0
pair_coeff * * 0.00284 3.4

fix 1 all nve/sphere update dipole

timestep 0.001

thermo 1

run 1