forked from lijiext/lammps
Commit JT 052318
This commit is contained in:
parent
1641f78e3e
commit
102be8dd8b
|
@ -132,6 +132,7 @@ void ComputeSpin::compute_vector()
|
||||||
magtot[2] *= scale;
|
magtot[2] *= scale;
|
||||||
magtot[3] = sqrt((magtot[0]*magtot[0])+(magtot[1]*magtot[1])+(magtot[2]*magtot[2]));
|
magtot[3] = sqrt((magtot[0]*magtot[0])+(magtot[1]*magtot[1])+(magtot[2]*magtot[2]));
|
||||||
spintemperature = hbar*tempnumtot;
|
spintemperature = hbar*tempnumtot;
|
||||||
|
//spintemperature /= (2.0*kb*tempdenomtot);
|
||||||
spintemperature /= (kb*tempdenomtot);
|
spintemperature /= (kb*tempdenomtot);
|
||||||
|
|
||||||
vector[0] = magtot[0];
|
vector[0] = magtot[0];
|
||||||
|
|
|
@ -134,8 +134,10 @@ void FixLangevinSpin::init()
|
||||||
double hbar = force->hplanck/MY_2PI; // eV/(rad.THz)
|
double hbar = force->hplanck/MY_2PI; // eV/(rad.THz)
|
||||||
double kb = force->boltz; // eV/K
|
double kb = force->boltz; // eV/K
|
||||||
D = (MY_2PI*alpha_t*gil_factor*kb*temp);
|
D = (MY_2PI*alpha_t*gil_factor*kb*temp);
|
||||||
|
//D = (alpha_t*gil_factor*kb*temp);
|
||||||
D /= (hbar*dts);
|
D /= (hbar*dts);
|
||||||
sigma = sqrt(2.0*D);
|
sigma = sqrt(2.0*D);
|
||||||
|
//sigma = sqrt(D);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
@ -171,9 +173,14 @@ void FixLangevinSpin::add_tdamping(double spi[3], double fmi[3])
|
||||||
void FixLangevinSpin::add_temperature(double fmi[3])
|
void FixLangevinSpin::add_temperature(double fmi[3])
|
||||||
{
|
{
|
||||||
|
|
||||||
double rx = sigma*(-1.0+2.0*random->uniform());
|
double rx = sigma*(2.0*random->uniform() - 1.0);
|
||||||
double ry = sigma*(-1.0+2.0*random->uniform());
|
double ry = sigma*(2.0*random->uniform() - 1.0);
|
||||||
double rz = sigma*(-1.0+2.0*random->uniform());
|
double rz = sigma*(2.0*random->uniform() - 1.0);
|
||||||
|
//printf("test rd : %g \n",2.0*random->uniform() - 1.0);
|
||||||
|
//printf("test gaussian : %g \n", random->gaussian());
|
||||||
|
//double rx = sigma*(random->gaussian());
|
||||||
|
//double ry = sigma*(random->gaussian());
|
||||||
|
//double rz = sigma*(random->gaussian());
|
||||||
|
|
||||||
// adding the random field
|
// adding the random field
|
||||||
|
|
||||||
|
|
|
@ -164,6 +164,7 @@ void FixNVESpin::init()
|
||||||
dtv = update->dt;
|
dtv = update->dt;
|
||||||
dtf = 0.5 * update->dt * force->ftm2v;
|
dtf = 0.5 * update->dt * force->ftm2v;
|
||||||
dts = 0.25 * update->dt;
|
dts = 0.25 * update->dt;
|
||||||
|
npairs = npairspin = 0;
|
||||||
|
|
||||||
// set ptrs on Pair/Spin styles
|
// set ptrs on Pair/Spin styles
|
||||||
|
|
||||||
|
|
|
@ -173,6 +173,8 @@ void PairSpinExchange::init_style()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("test lattice flag: %d \n",lattice_flag);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|
|
@ -285,7 +285,7 @@ void PairSpinNeel::compute(int eflag, int vflag)
|
||||||
|
|
||||||
local_cut2 = cut_spin_neel[itype][jtype]*cut_spin_neel[itype][jtype];
|
local_cut2 = cut_spin_neel[itype][jtype]*cut_spin_neel[itype][jtype];
|
||||||
|
|
||||||
// compute magnetic and mechanical components of soc_neel
|
// compute magnetic and mechanical components of neel
|
||||||
|
|
||||||
if (rsq <= local_cut2) {
|
if (rsq <= local_cut2) {
|
||||||
compute_neel(i,j,rsq,eij,fmi,spi,spj);
|
compute_neel(i,j,rsq,eij,fmi,spi,spj);
|
||||||
|
|
Loading…
Reference in New Issue