Magnetic nano particles in microgel/polymer simulation

Is it possible to include magnetic dipol- dipol interaction and interactions with an external magnetic field to micogel/polymer simulations in LAMMPS?

I tried some simple script with spin/dipole/cut for dipol- dipol interactions and fix precession/spin for the Zeemann interaction. The equations in the LAMMPS documentation seemd to fit my expectations but spin/dipole/cut relies on metal units and now I’m not sure about the compatibility.

Input- script:
units lj
atom_style hybrid angle spin

boundary p p p

read_data spintest.dat

dump dum1 all custom 10 spintest3.lammpstrj id type xs ys zs ix iy iz

#relies on metal units?
#pair_style hybrid lj/cut 2.5 spin/dipole/cut 10.0
#pair_coeff * * lj/cut 1 1
#pair_coeff 1 1 lj/cut 1 1.1 2.8
#pair_coeff 2 2 lj/cut 1 1.1 2.8
#pair_coeff 1 2 lj/cut 1 1.1 2.8
#pair_coeff * * spin/dipole/cut 10.0
#pair_coeff 1 2 spin/dipole/cut 8.0

pair_style lj/cut 2.5
pair_modify shift yes
pair_coeff * * 1 1
pair_coeff 1 1 1 1.1 2.8
pair_coeff 2 2 1 1.1 2.8
pair_coeff 1 2 1 1.1 2.8

bond_style fene
special_bonds fene
bond_coeff 1 10.0 3.6 0.6 4.0

angle_style cosine
angle_coeff * 3.0

comm_modify cutoff 8

fix 1 all precession/spin zeeman 10000.1 0.0 0.0 1.0
fix 2 all nvt temp 1.0 1.0 0.3

thermo 100
thermo_style custom step temp epair emol press vol density
variable t equal step

timestep 0.01

run 10000

write_data spintest.final.data

Test- data:

3 atoms
2 bonds
1 angles

2 atom types
1 bond types
1 angle types

0.0000000000000000e+00 1e+01 xlo xhi
0.0000000000000000e+00 1e+01 ylo yhi
0.0000000000000000e+00 1e+01 zlo zhi

Masses

1 1
2 1

Atoms # hybrid: (ID,type,x,y,z) + molecule id + spx spy spz sp from angle:(atom-ID molecule-ID atom-type x y z) & spin:(atom-ID atom-type x y z spx spy spz sp)

1 1 3.89611 3.30174 3.68336 1 0.2 0.1 0.1 100.1
2 1 7.53428 6.75647 2.67756 1 0.2 0.1 0.1 100.1
3 2 5.7152 5.02911 3.18046 1 0.2 0.1 0.1 100.1

Velocities

1 1.0 0.0 0.0
2 0.0 1.0 0.0
3 0.0 0.0 1.0

Bonds

1 1 1 2
2 1 2 3

Angles

1 1 1 2 3

Using metal units is a “hard” requirement for the SPIN package commands.
Various internal constants are hardcoded using eV, Angstrom etc. as units.

So, if I understand correctly the combination should be possible with metal units?

I doubt it will work for the purposes you have in mind, but the only authoritative answer on this can be had from the developer of the SPIN package.

The topic of applying an external magnetic field on charges and point dipoles has come up a few times in the past, and it is my recollection that this not as easily implemented as an electric field as it requires writing new integrators. It would not fit into the the velocity verlet scheme used by LAMMPS in the current layout because you have positiong and velocity dependent forces and LAMMPS currently implicitly assumes that you have position dependent or velocity dependent forces.

1 Like

Hello!

My name is Julien Tranchida, I developed the SPIN package. My apologies for the late reply, I just signed up on the forum (and was mainly following the mailing list before).

I do not know much about those type of polymer simulations, so I cannot really help on the fundamental basis of this calculation. But overall, your script seem correct. Only two things:

  • as Axel said, the SPIN package was developed to work with metal units. You would need to convert everything to this unit system. Also, make sure the spins of you particles corresponds to scaled moments (which seems to be the case in your data file).
  • if you want you spin to evolve in time (through their dipole-dipole interactions and the effect of the Zeeman field), you need to replace “fix nvt” by a combination of “fix nve/spin” and “fix langevin”. In your case, this would look like:
    fix 1 all nve/spin lattice moving
    fix 2 all langevin 300.0 300.0 10.0 699483
    fix 3 all langevin/spin 300.0 0.1 21
    This way, both your spins and your particles should evolve.

Hope this helps. Let me know if you have other questions!
All the best,
Julien.