diff --git a/doc/src/fix_precession_spin.rst b/doc/src/fix_precession_spin.rst index 783963af72..043c5cb200 100644 --- a/doc/src/fix_precession_spin.rst +++ b/doc/src/fix_precession_spin.rst @@ -62,7 +62,7 @@ with: The field value in Tesla is multiplied by the gyromagnetic ratio, :math:`g \cdot \mu_B/\hbar`, converting it into a precession frequency in -rad.THz (in metal units and with :math:`\mu_B = 5.788 eV/T`). +rad.THz (in metal units and with :math:`\mu_B = 5.788\cdot 10^{-5}` eV/T). As a comparison, the figure below displays the simulation of a single spin (of norm :math:`\mu_i = 1.0`) submitted to an external diff --git a/src/SPIN/pair_spin_dipole_cut.cpp b/src/SPIN/pair_spin_dipole_cut.cpp index cdae3c0bab..e18c24bcc0 100644 --- a/src/SPIN/pair_spin_dipole_cut.cpp +++ b/src/SPIN/pair_spin_dipole_cut.cpp @@ -48,9 +48,10 @@ PairSpinDipoleCut::PairSpinDipoleCut(LAMMPS *lmp) : PairSpin(lmp) hbar = force->hplanck/MY_2PI; // eV/(rad.THz) mub = 9.274e-4; // in A.Ang^2 - mu_0 = 785.15; // in eV/Ang/A^2 + // mu_0 = 785.15; // in eV/Ang/A^2 + mu_0 = 784.15; // in eV/Ang/A^2 mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV.Ang^3 - //mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV + // mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV mub2mu0hbinv = mub2mu0 / hbar; // in rad.THz } diff --git a/src/SPIN/pair_spin_dipole_long.cpp b/src/SPIN/pair_spin_dipole_long.cpp index aeb916cfae..5ac3b276d2 100644 --- a/src/SPIN/pair_spin_dipole_long.cpp +++ b/src/SPIN/pair_spin_dipole_long.cpp @@ -52,7 +52,7 @@ PairSpinDipoleLong::PairSpinDipoleLong(LAMMPS *lmp) : PairSpin(lmp) hbar = force->hplanck/MY_2PI; // eV/(rad.THz) mub = 9.274e-4; // in A.Ang^2 - mu_0 = 785.15; // in eV/Ang/A^2 + mu_0 = 784.15; // in eV/Ang/A^2 mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV.Ang^3 //mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV mub2mu0hbinv = mub2mu0 / hbar; // in rad.THz @@ -136,10 +136,11 @@ void PairSpinDipoleLong::init_style() // insure use of KSpace long-range solver, set g_ewald - if (force->kspace == NULL) - error->all(FLERR,"Pair style requires a KSpace style"); + // if (force->kspace == NULL) + // error->all(FLERR,"Pair style requires a KSpace style"); - g_ewald = force->kspace->g_ewald; + // g_ewald = force->kspace->g_ewald; + g_ewald = 1.0; } /* ---------------------------------------------------------------------- @@ -220,6 +221,9 @@ void PairSpinDipoleLong::compute(int eflag, int vflag) memory->grow(emag,nlocal_max,"pair/spin:emag"); } + + printf("test gewald %g \n",g_ewald); + pre1 = 2.0 * g_ewald / MY_PIS; pre2 = 4.0 * pow(g_ewald,3.0) / MY_PIS; pre3 = 8.0 * pow(g_ewald,5.0) / MY_PIS;