Question about dipoles and spheres

Hi Everyone,
I have issues on changing dipole orientations.
I have read dipoles and sphere command, and I know for changing dipole directions by external electrical field I need to define spheres for each atom (which data file should include the diameter and density of each atom type). The electrical field will apply torque on each atom and in this way the initial dipole direction will be changed.

My first question is that how should I define density for each atom, is its atomic mass per volume of each atom type?
The second question is that why the direction of the dipole are not changing?

I have added my input file and part of my data file here,
I was wondering if anyone can help me to solve these problems?
Thanks in advance for your time and your help.

------------------------ INITIALIZATION ----------------------------

units metal
dimension 3
boundary s s s
atom_style hybrid dipole sphere
atom_modify map array

neighbor 2.0 bin
neigh_modify delay 10 check yes

read_data BiFeO3.dat

pair_style hybrid/overlay coul/streitz 12.0 wolf 0.20 meam/c lj/cut/dipole/cut 2.5
pair_coeff * * meam/c BiFeO3zigzag.library.meam Fe Bi O BiFeO3zigzag.parameter.meam Fe Bi O
pair_coeff * * coul/streitz FeBiO3.streitz Fe Bi O
pair_coeff * * lj/cut/dipole/cut 1.0 1.0

------------------------- SETTINGS ---------------------------------

compute new all temp
velocity all create 300.0 487639 temp new
fix 1 all nvt temp 300.0 300.0 100
#fix 2 all temp/rescale 10 300.0 300.0 0.01 1.0

fix 3 all qeq/slater 1 12.0 1.0e-6 100 coul/streitz

fix 4 all spring/self 500.0
fix_modify 4 energy yes

dump 1 all custom 1000 dump.atom id type q x y z mux muy muz
dump 2 all xyz 1000 dump.xyz

timestep 0.001

thermo_style custom step temp etotal pxx pyy pzz
thermo_modify flush yes
thermo 200

run 1000

#variable oscillate equal exp(-((step-5500)^2)/(2*((150)^2)))
fix 5 all efield -0.01 -0.01 -0.01

thermo_style custom step temp etotal pxx pyy pzz pe ke
thermo_modify flush yes
thermo 100

fix 6 all nve/sphere update dipole
compute 1 all dipole/atom mux muy muz

run 10000

unfix 5

thermo_style custom step temp etotal pxx pyy pzz pe ke
thermo_modify flush yes
thermo 100

run 20000

Hi Everyone,
I have issues on changing dipole orientations.
I have read dipoles and sphere command, and I know for changing dipole directions by external electrical field I need to define spheres for each atom (which data file should include the diameter and density of each atom type). The electrical field will apply torque on each atom and in this way the initial dipole direction will be changed.

My first question is that how should I define density for each atom, is its atomic mass per volume of each atom type?

it is per-atom not per-atom-type, but yes.

The second question is that why the direction of the dipole are not changing?

you need to use an integrator that updates orientation from the computed torques. e.g. fix nve/sphere or fix nvt/sphere. also you have to use different temperature computes (including for thermo output), since your number of degrees of freedom has changed. the default fixes and computes assume point particles and thus would result in incorrect numbers.

axel.