Unverified Commit c50e49fc authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1967 from julient31/neel-rework

Correct issue #1959 and correct issues in SPIN package
parents 8daf0c56 5eee4cb1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ function for the same parameters.

.. image:: JPG/zeeman_langevin.jpg
   :align: center
   :width: 600

The temperature effects are accounted for by connecting the spin
:math:`i` to a thermal bath using a Langevin thermostat (see
@@ -154,6 +155,11 @@ The *precession/spin* style is part of the SPIN package. This style
is only enabled if LAMMPS was built with this package, and if the
atom_style "spin" was declared.  See the :doc:`Build package <Build_package>` doc page for more info.

The *precession/spin* style can only be declared once. If more
than one precession type (for example combining an anisotropy and a Zeeman interactions)
has to be declared, they have to be chained in the same command
line (as shown in the examples above). 

Related commands
""""""""""""""""

+1 −2
Original line number Diff line number Diff line
@@ -87,8 +87,7 @@ The choice of a norm can be modified for the min styles *cg*\ , *sd*\
the 2-norm (Euclidean length) of the global force vector:

.. math::

   || \vec{F} ||_{2} = \sqrt{\vec{F}_1+ \cdots + \vec{F}_N}
    || \vec{F} ||_{2} = \sqrt{\vec{F}_1^2+ \cdots + \vec{F}_N^2}

The *max* norm computes the length of the 3-vector force
for each atom  (2-norm), and takes the maximum value of those across
+4 −4
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@ pair_coeff * * spin/dmi dmi 4.5 0.00005 1.0 1.0 1.0
neighbor 	0.1 bin
neigh_modify 	every 10 check yes delay 20

fix 		1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0
fix 		1 all precession/spin zeeman 0.0 0.0 0.0 1.0 anisotropy 0.00033 0.0 0.0 1.0
fix_modify      1 energy yes
fix 		2 all langevin/spin 0.0 0.1 21
fix 		3 all nve/spin lattice frozen

@@ -43,9 +44,8 @@ variable magnorm equal c_out_mag[4]
variable 	emag	 equal c_out_mag[5]
variable 	tmag	 equal c_out_mag[6]

#thermo_style    custom step time v_magnorm v_emag temp etotal
thermo_style    custom step time v_magnorm pe ke v_emag temp etotal
thermo          10
thermo_style    custom step time v_magnorm pe v_emag temp etotal
thermo          50

compute outsp all property/atom spx spy spz sp fmx fmy fmz
dump 		1 all custom 100 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3]
+129 −0
Original line number Diff line number Diff line
LAMMPS (30 Oct 2019)
LAMMPS (19 Mar 2020)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:94)
  using 1 OpenMP thread(s) per MPI task
# layer sc iron atoms (in the [001] plane) in bismuth oxide

units 		metal
@@ -17,7 +19,7 @@ Created orthogonal box = (0 0 0) to (134.64 134.64 19.8)
  1 by 1 by 1 MPI processor grid
create_atoms 	1 box
Created 5780 atoms
  create_atoms CPU = 0.00226784 secs
  create_atoms CPU = 0.00263691 secs

# setting mass, mag. moments, and interactions for bfo

@@ -34,7 +36,8 @@ pair_coeff * * spin/dmi dmi 4.5 0.00005 1.0 1.0 1.0
neighbor 	0.1 bin
neigh_modify 	every 10 check yes delay 20

fix 		1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0
fix 		1 all precession/spin zeeman 0.0 0.0 0.0 1.0 anisotropy 0.00033 0.0 0.0 1.0
fix_modify      1 energy yes
fix 		2 all langevin/spin 0.0 0.1 21
fix 		3 all nve/spin lattice frozen

@@ -50,9 +53,8 @@ variable magnorm equal c_out_mag[4]
variable 	emag	 equal c_out_mag[5]
variable 	tmag	 equal c_out_mag[6]

#thermo_style    custom step time v_magnorm v_emag temp etotal
thermo_style    custom step time v_magnorm pe ke v_emag temp etotal
thermo          10
thermo_style    custom step time v_magnorm pe v_emag temp etotal
thermo          50

compute outsp all property/atom spx spy spz sp fmx fmy fmz
dump 		1 all custom 100 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3]
@@ -81,72 +83,32 @@ Neighbor list info ...
      stencil: none
      bin: none
Per MPI rank memory allocation (min/avg/max) = 8.154 | 8.154 | 8.154 Mbytes
Step Time v_magnorm PotEng KinEng v_emag Temp TotEng 
       0            0  0.010071723 -0.059343109            0  -0.13132609            0 -0.059343109 
      10        0.002   0.01003044  -0.18537022            0  -0.38338861            0  -0.18537022 
      20        0.004 0.0099890716  -0.31121926            0  -0.63509581            0  -0.31121926 
      30        0.006 0.0099475919  -0.43689013            0  -0.88644739            0  -0.43689013 
      40        0.008 0.0099059782   -0.5623833            0   -1.1374442            0   -0.5623833 
      50         0.01 0.0098642085  -0.68769978            0    -1.388088            0  -0.68769978 
      60        0.012 0.0098222618  -0.81284106            0   -1.6383818            0  -0.81284106 
      70        0.014 0.0097801186  -0.93780907            0   -1.8883294            0  -0.93780907 
      80        0.016 0.0097377603   -1.0626062            0   -2.1379352            0   -1.0626062 
      90        0.018 0.0096951693    -1.187235            0   -2.3872045            0    -1.187235 
     100         0.02 0.0096523288   -1.3116986            0   -2.6361432            0   -1.3116986 
     110        0.022 0.0096092227   -1.4360002            0   -2.8847577            0   -1.4360002 
     120        0.024  0.009565836   -1.5601431            0   -3.1330547            0   -1.5601431 
     130        0.026 0.0095221542   -1.6841309            0   -3.3810411            0   -1.6841309 
     140        0.028 0.0094781635   -1.8079673            0   -3.6287241            0   -1.8079673 
     150         0.03 0.0094338509   -1.9316557            0   -3.8761109            0   -1.9316557 
     160        0.032 0.0093892044   -2.0551997            0   -4.1232085            0   -2.0551997 
     170        0.034 0.0093442126    -2.178603            0    -4.370024            0    -2.178603 
     180        0.036 0.0092988654   -2.3018687            0   -4.6165639            0   -2.3018687 
     190        0.038 0.0092531537   -2.4250002            0   -4.8628348            0   -2.4250002 
     200         0.04 0.0092070698   -2.5480003            0   -5.1088426            0   -2.5480003 
     210        0.042 0.0091606073    -2.670872            0   -5.3545929            0    -2.670872 
     220        0.044 0.0091137617   -2.7936178            0   -5.6000909            0   -2.7936178 
     230        0.046 0.0090665298   -2.9162399            0   -5.8453412            0   -2.9162399 
     240        0.048 0.0090189108   -3.0387405            0   -6.0903478            0   -3.0387405 
     250         0.05 0.0089709056   -3.1611214            0   -6.3351146            0   -3.1611214 
     260        0.052 0.0089225173   -3.2833841            0   -6.5796445            0   -3.2833841 
     270        0.054 0.0088737511   -3.4055299            0   -6.8239403            0   -3.4055299 
     280        0.056 0.0088246147     -3.52756            0   -7.0680043            0     -3.52756 
     290        0.058 0.0087751176   -3.6494754            0   -7.3118383            0   -3.6494754 
     300         0.06  0.008725272   -3.7712768            0   -7.5554438            0   -3.7712768 
     310        0.062 0.0086750916   -3.8929648            0   -7.7988222            0   -3.8929648 
     320        0.064 0.0086245927   -4.0145399            0   -8.0419744            0   -4.0145399 
     330        0.066 0.0085737928   -4.1360026            0   -8.2849013            0   -4.1360026 
     340        0.068 0.0085227116   -4.2573532            0   -8.5276035            0   -4.2573532 
     350         0.07 0.0084713698    -4.378592            0   -8.7700818            0    -4.378592 
     360        0.072 0.0084197895   -4.4997194            0   -9.0123367            0   -4.4997194 
     370        0.074 0.0083679936   -4.6207358            0   -9.2543688            0   -4.6207358 
     380        0.076 0.0083160058   -4.7416414            0    -9.496179            0   -4.7416414 
     390        0.078 0.0082638503   -4.8624367            0   -9.7377681            0   -4.8624367 
     400         0.08 0.0082115512   -4.9831222            0   -9.9791371            0   -4.9831222 
     410        0.082 0.0081591329   -5.1036986            0   -10.220287            0   -5.1036986 
     420        0.084 0.0081066195   -5.2241665            0    -10.46122            0   -5.2241665 
     430        0.086 0.0080540347   -5.3445267            0   -10.701936            0   -5.3445267 
     440        0.088  0.008001402   -5.4647802            0   -10.942439            0   -5.4647802 
     450         0.09 0.0079487439   -5.5849281            0    -11.18273            0   -5.5849281 
     460        0.092 0.0078960829   -5.7049716            0   -11.422811            0   -5.7049716 
     470        0.094 0.0078434404    -5.824912            0   -11.662686            0    -5.824912 
     480        0.096 0.0077908378   -5.9447508            0   -11.902357            0   -5.9447508 
     490        0.098 0.0077382955   -6.0644896            0   -12.141828            0   -6.0644896 
     500          0.1 0.0076858338   -6.1841301            0   -12.381101            0   -6.1841301 
Loop time of 13.543 on 1 procs for 500 steps with 5780 atoms

Performance: 0.638 ns/day, 37.619 hours/ns, 36.919 timesteps/s
100.0% CPU use with 1 MPI tasks x no OpenMP threads
Step Time v_magnorm PotEng v_emag Temp TotEng 
       0            0  0.010071723  -0.69133656  -0.69133656            0  -0.69133656 
      50         0.01 0.0098309931   -1.3200811   -1.3200811            0   -1.3200811 
     100         0.02 0.0095903925   -1.9446727   -1.9446727            0   -1.9446727 
     150         0.03 0.0093489139   -2.5653446   -2.5653446            0   -2.5653446 
     200         0.04 0.0091051407   -3.1824298   -3.1824298            0   -3.1824298 
     250         0.05 0.0088575394   -3.7962506   -3.7962506            0   -3.7962506 
     300         0.06 0.0086053184   -4.4070501   -4.4070501            0   -4.4070501 
     350         0.07 0.0083490959   -5.0149813   -5.0149813            0   -5.0149813 
     400         0.08 0.0080907742   -5.6201417   -5.6201417            0   -5.6201417 
     450         0.09 0.0078327124    -6.222622    -6.222622            0    -6.222622 
     500          0.1 0.0075768488   -6.8225497   -6.8225497            0   -6.8225497 
Loop time of 12.9141 on 1 procs for 500 steps with 5780 atoms

Performance: 0.669 ns/day, 35.873 hours/ns, 38.717 timesteps/s
100.0% CPU use with 1 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 3.8138     | 3.8138     | 3.8138     |   0.0 | 28.16
Pair    | 3.1844     | 3.1844     | 3.1844     |   0.0 | 24.66
Neigh   | 0          | 0          | 0          |   0.0 |  0.00
Comm    | 0.011875   | 0.011875   | 0.011875   |   0.0 |  0.09
Output  | 0.049726   | 0.049726   | 0.049726   |   0.0 |  0.37
Modify  | 9.655      | 9.655      | 9.655      |   0.0 | 71.29
Other   |            | 0.01262    |            |       |  0.09
Comm    | 0.012542   | 0.012542   | 0.012542   |   0.0 |  0.10
Output  | 0.048014   | 0.048014   | 0.048014   |   0.0 |  0.37
Modify  | 9.6569     | 9.6569     | 9.6569     |   0.0 | 74.78
Other   |            | 0.01233    |            |       |  0.10

Nlocal:    5780 ave 5780 max 5780 min
Histogram: 1 0 0 0 0 0 0 0 0 0
@@ -164,4 +126,4 @@ Dangerous builds = 0

Please see the log.cite file for references relevant to this simulation

Total wall time: 0:00:13
Total wall time: 0:00:12
+129 −0
Original line number Diff line number Diff line
LAMMPS (30 Oct 2019)
LAMMPS (19 Mar 2020)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:94)
  using 1 OpenMP thread(s) per MPI task
# layer sc iron atoms (in the [001] plane) in bismuth oxide

units 		metal
@@ -17,7 +19,7 @@ Created orthogonal box = (0 0 0) to (134.64 134.64 19.8)
  2 by 2 by 1 MPI processor grid
create_atoms 	1 box
Created 5780 atoms
  create_atoms CPU = 0.00149798 secs
  create_atoms CPU = 0.000847816 secs

# setting mass, mag. moments, and interactions for bfo

@@ -34,7 +36,8 @@ pair_coeff * * spin/dmi dmi 4.5 0.00005 1.0 1.0 1.0
neighbor 	0.1 bin
neigh_modify 	every 10 check yes delay 20

fix 		1 all precession/spin anisotropy 0.0000033 0.0 0.0 1.0
fix 		1 all precession/spin zeeman 0.0 0.0 0.0 1.0 anisotropy 0.00033 0.0 0.0 1.0
fix_modify      1 energy yes
fix 		2 all langevin/spin 0.0 0.1 21
fix 		3 all nve/spin lattice frozen

@@ -50,9 +53,8 @@ variable magnorm equal c_out_mag[4]
variable 	emag	 equal c_out_mag[5]
variable 	tmag	 equal c_out_mag[6]

#thermo_style    custom step time v_magnorm v_emag temp etotal
thermo_style    custom step time v_magnorm pe ke v_emag temp etotal
thermo          10
thermo_style    custom step time v_magnorm pe v_emag temp etotal
thermo          50

compute outsp all property/atom spx spy spz sp fmx fmy fmz
dump 		1 all custom 100 dump_bfo.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3]
@@ -81,72 +83,32 @@ Neighbor list info ...
      stencil: none
      bin: none
Per MPI rank memory allocation (min/avg/max) = 7.744 | 7.744 | 7.744 Mbytes
Step Time v_magnorm PotEng KinEng v_emag Temp TotEng 
       0            0  0.010071723  -0.11868622            0  -0.12966919            0  -0.11868622 
      10        0.002  0.010030399  -0.37068593            0  -0.38171598            0  -0.37068593 
      20        0.004 0.0099889925   -0.6223216            0   -0.6334048            0   -0.6223216 
      30        0.006 0.0099474775  -0.87359359            0   -0.8847354            0  -0.87359359 
      40        0.008 0.0099058307   -1.1245034            0   -1.1357086            0   -1.1245034 
      50         0.01 0.0098640297   -1.3750538            0   -1.3863265            0   -1.3750538 
      60        0.012 0.0098220535   -1.6252482            0   -1.6365919            0   -1.6252482 
      70        0.014 0.0097798823   -1.8750914            0   -1.8865086            0   -1.8750914 
      80        0.016 0.0097374973   -2.1245886            0   -2.1360814            0   -2.1245886 
      90        0.018 0.0096948808   -2.3737458            0   -2.3853155            0   -2.3737458 
     100         0.02 0.0096520159   -2.6225698            0   -2.6342168            0   -2.6225698 
     110        0.022 0.0096088866   -2.8710677            0   -2.8827919            0   -2.8710677 
     120        0.024 0.0095654776   -3.1192469            0   -3.1310475            0   -3.1192469 
     130        0.026 0.0095217746    -3.367115            0   -3.3789906            0    -3.367115 
     140        0.028 0.0094777638     -3.61468            0   -3.6266285            0     -3.61468 
     150         0.03 0.0094334323   -3.8619496            0   -3.8739683            0   -3.8619496 
     160        0.032 0.0093887679   -4.1089316            0   -4.1210173            0   -4.1089316 
     170        0.034 0.0093437596   -4.3556335            0   -4.3677824            0   -4.3556335 
     180        0.036 0.0092983972   -4.6020625            0   -4.6142704            0   -4.6020625 
     190        0.038 0.0092526717   -4.8482255            0   -4.8604877            0   -4.8482255 
     200         0.04 0.0092065755   -5.0941291            0   -5.1064403            0   -5.0941291 
     210        0.042 0.0091601024   -5.3397792            0   -5.3521339            0   -5.3397792 
     220        0.044 0.0091132478   -5.5851813            0   -5.5975736            0   -5.5851813 
     230        0.046 0.0090660089   -5.8303404            0    -5.842764            0   -5.8303404 
     240        0.048 0.0090183847   -6.0752609            0   -6.0877092            0   -6.0752609 
     250         0.05 0.0089703764   -6.3199467            0   -6.3324129            0   -6.3199467 
     260        0.052 0.0089219873   -6.5644011            0   -6.5768782            0   -6.5644011 
     270        0.054 0.0088732228    -6.808627            0   -6.8211078            0    -6.808627 
     280        0.056 0.0088240906   -7.0526266            0   -7.0651038            0   -7.0526266 
     290        0.058 0.0087746006    -7.296402            0   -7.3088682            0    -7.296402 
     300         0.06 0.0087247648   -7.5399545            0   -7.5524024            0   -7.5399545 
     310        0.062 0.0086745976   -7.7832854            0   -7.7957077            0   -7.7832854 
     320        0.064 0.0086241149   -8.0263956            0    -8.038785            0   -8.0263956 
     330        0.066  0.008573335   -8.2692858            0    -8.281635            0   -8.2692858 
     340        0.068 0.0085222772   -8.5119564            0   -8.5242586            0   -8.5119564 
     350         0.07 0.0084709627   -8.7544078            0   -8.7666562            0   -8.7544078 
     360        0.072 0.0084194136   -8.9966403            0   -9.0088285            0   -8.9966403 
     370        0.074  0.008367653   -9.2386543            0   -9.2507761            0   -9.2386543 
     380        0.076 0.0083157046   -9.4804501            0   -9.4924997            0   -9.4804501 
     390        0.078 0.0082635925   -9.7220281            0   -9.7340001            0   -9.7220281 
     400         0.08 0.0082113412   -9.9633888            0   -9.9752784            0   -9.9633888 
     410        0.082 0.0081589747   -10.204533            0   -10.216336            0   -10.204533 
     420        0.084 0.0081065173   -10.445462            0   -10.457173            0   -10.445462 
     430        0.086 0.0080539925   -10.686176            0   -10.697793            0   -10.686176 
     440        0.088 0.0080014235   -10.926676            0   -10.938197            0   -10.926676 
     450         0.09 0.0079488329   -11.166966            0   -11.178387            0   -11.166966 
     460        0.092 0.0078962427   -11.407045            0   -11.418366            0   -11.407045 
     470        0.094 0.0078436743   -11.646917            0   -11.658136            0   -11.646917 
     480        0.096 0.0077911486   -11.886583            0     -11.8977            0   -11.886583 
     490        0.098  0.007738686   -12.126047            0   -12.137063            0   -12.126047 
     500          0.1 0.0076863062   -12.365311            0   -12.376226            0   -12.365311 
Loop time of 3.94852 on 4 procs for 500 steps with 5780 atoms

Performance: 2.188 ns/day, 10.968 hours/ns, 126.630 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads
Step Time v_magnorm PotEng v_emag Temp TotEng 
       0            0  0.010071723  -0.69133656  -0.69133656            0  -0.69133656 
      50         0.01  0.009830993   -1.3200811   -1.3200811            0   -1.3200811 
     100         0.02 0.0095903924   -1.9446727   -1.9446727            0   -1.9446727 
     150         0.03 0.0093489138   -2.5653446   -2.5653446            0   -2.5653446 
     200         0.04 0.0091051405   -3.1824298   -3.1824298            0   -3.1824298 
     250         0.05 0.0088575392   -3.7962506   -3.7962506            0   -3.7962506 
     300         0.06 0.0086053183   -4.4070501   -4.4070501            0   -4.4070501 
     350         0.07 0.0083490958   -5.0149813   -5.0149813            0   -5.0149813 
     400         0.08  0.008090774   -5.6201417   -5.6201417            0   -5.6201417 
     450         0.09 0.0078327123    -6.222622    -6.222622            0    -6.222622 
     500          0.1 0.0075768487   -6.8225497   -6.8225497            0   -6.8225497 
Loop time of 3.92182 on 4 procs for 500 steps with 5780 atoms

Performance: 2.203 ns/day, 10.894 hours/ns, 127.492 timesteps/s
99.9% CPU use with 4 MPI tasks x 1 OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 0.97416    | 0.98668    | 1.0022     |   1.0 | 24.99
Pair    | 0.80837    | 0.82745    | 0.8485     |   1.6 | 21.10
Neigh   | 0          | 0          | 0          |   0.0 |  0.00
Comm    | 0.032618   | 0.04948    | 0.062614   |   5.0 |  1.25
Output  | 0.014166   | 0.014229   | 0.014374   |   0.1 |  0.36
Modify  | 2.8947     | 2.8957     | 2.8965     |   0.0 | 73.34
Other   |            | 0.002385   |            |       |  0.06
Comm    | 0.045699   | 0.067487   | 0.090503   |   6.1 |  1.72
Output  | 0.01387    | 0.0139     | 0.01394    |   0.0 |  0.35
Modify  | 3.0065     | 3.0105     | 3.0138     |   0.2 | 76.76
Other   |            | 0.002516   |            |       |  0.06

Nlocal:    1445 ave 1445 max 1445 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Loading