Commit 51e3f9dc authored by julient31's avatar julient31
Browse files

Commit JT 033020

- modified all spin pairs (match nve)
- correct doc min_modify
- correct code max norm (square values)
- added draft nvt validation
parent a739b8c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,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 
+1 −1
Original line number Diff line number Diff line
@@ -65,6 +65,6 @@ for t in range (0,N):
  # calc. average magnetization
  Sm = (S1+S2)*0.5
  # calc. energy
  en = -J0*(np.dot(S1,S2))
  en = -2.0*J0*(np.dot(S1,S2))
  # print res. in ps for comparison with LAMMPS
  print(t*dt/1000.0,Sm[0],Sm[1],Sm[2],en)
+2 −2
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ en="$(echo "$en-$in" | bc -l)"
tail -n +$in log.lammps | head -n $en > res_lammps.dat

# compute Langevin
python3 -m llg_precession.py > res_llg.dat
python3 llg_precession.py > res_llg.dat

# plot results
python3 -m plot_precession.py res_lammps.dat res_llg.dat
python3 plot_precession.py res_lammps.dat res_llg.dat
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
units           metal
atom_style      spin
atom_modify     map array
boundary        p p p
boundary        f f f

# read_data     singlespin.data

+0 −5
Original line number Diff line number Diff line
#!/usr/bin/env python3

#Program fitting the exchange interaction
#Model curve: Bethe-Slater function
import numpy as np, pylab, tkinter
import matplotlib.pyplot as plt
import mpmath as mp
# from scipy.optimize import curve_fit
# from decimal import *

mub=5.78901e-5          # Bohr magneton (eV/T)
kb=8.617333262145e-5    # Boltzman constant (eV/K)
@@ -24,4 +20,3 @@ tf=20.0
for i in range (0,npoints): 
    temp=ti+i*(tf-ti)/npoints
    print('%lf %lf %lf' % (temp,func(temp),-g*mub*Hz*func(temp)))
Loading