forked from lijiext/lammps
Commit JT 051118 before CEA
This commit is contained in:
parent
eaaad3f6d5
commit
437e854741
|
@ -1,6 +1,3 @@
|
|||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
# start a spin-lattice simulation from a data file
|
||||
clear
|
||||
units metal
|
||||
dimension 3
|
||||
|
@ -10,36 +7,13 @@ atom_style spin
|
|||
|
||||
# necessary for the serial algorithm (sametag)
|
||||
atom_modify map array
|
||||
|
||||
read_data ../examples/SPIN/read_restart/Norm_randXY_8x8x32.data
|
||||
=======
|
||||
=======
|
||||
# start a spin-lattice simulation from a data file
|
||||
>>>>>>> Commit modifs before release 1 (03/26/18)
|
||||
clear
|
||||
units metal
|
||||
dimension 3
|
||||
boundary p p p
|
||||
|
||||
atom_style spin
|
||||
|
||||
# necessary for the serial algorithm (sametag)
|
||||
atom_modify map array
|
||||
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> Commit before meeting 032218
|
||||
=======
|
||||
read_data ../examples/SPIN/read_restart/Norm_randXY_8x8x32.data
|
||||
>>>>>>> Commit modifs before release 1 (03/26/18)
|
||||
|
||||
mass 1 58.93
|
||||
|
||||
# define magneto-mechanical potentials and forces
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0
|
||||
pair_style hybrid/overlay eam/alloy spin/exchange 4.0
|
||||
pair_coeff * * eam/alloy ../examples/SPIN/read_restart/Co_PurjaPun_2012.eam.alloy Co
|
||||
pair_coeff * * pair/spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
|
||||
pair_coeff * * spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
|
||||
|
||||
neighbor 1.0 bin
|
||||
neigh_modify every 1 check no delay 0
|
||||
|
@ -51,32 +25,6 @@ fix 3 all nve/spin lattice yes
|
|||
timestep 0.0001
|
||||
|
||||
# define outputs and computes
|
||||
=======
|
||||
pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0 pair/spin/soc/neel 4.0
|
||||
pair_coeff * * eam/alloy ../examples/SPIN/Co_PurjaPun_2012.eam.alloy Co
|
||||
pair_coeff * * pair/spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
|
||||
pair_coeff * * pair/spin/soc/neel neel 4.0 0.003330282 0.864159 2.13731
|
||||
=======
|
||||
pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0
|
||||
pair_coeff * * eam/alloy ../examples/SPIN/read_restart/Co_PurjaPun_2012.eam.alloy Co
|
||||
pair_coeff * * pair/spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
|
||||
>>>>>>> Commit modifs before release 1 (03/26/18)
|
||||
|
||||
neighbor 1.0 bin
|
||||
neigh_modify every 1 check no delay 0
|
||||
|
||||
fix 1 all precession/spin zeeman 0.0 0.0 0.0 1.0
|
||||
fix 2 all langevin/spin 0.0 0.0 21
|
||||
|
||||
fix 3 all nve/spin lattice yes
|
||||
timestep 0.0001
|
||||
|
||||
<<<<<<< HEAD
|
||||
# define outputs
|
||||
>>>>>>> Commit before meeting 032218
|
||||
=======
|
||||
# define outputs and computes
|
||||
>>>>>>> Commit modifs before release 1 (03/26/18)
|
||||
|
||||
compute out_mag all compute/spin
|
||||
compute out_pe all pe
|
||||
|
@ -92,21 +40,7 @@ thermo 10
|
|||
thermo_style custom step time v_magnorm v_emag v_tmag temp etotal
|
||||
thermo_modify format float %20.15g
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
compute outsp all property/atom spx spy spz sp fmx fmy fmz
|
||||
dump 100 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7]
|
||||
|
||||
run 100
|
||||
=======
|
||||
dump 1 all custom 1 dump.lammpstrj type x y z spx spy spz
|
||||
|
||||
run 10000
|
||||
>>>>>>> Commit before meeting 032218
|
||||
=======
|
||||
compute outsp all property/atom spx spy spz sp fmx fmy fmz
|
||||
dump 100 all custom 1 dump.lammpstrj type x y z c_outsp[1] c_outsp[2] c_outsp[3] c_outsp[4] c_outsp[5] c_outsp[6] c_outsp[7]
|
||||
|
||||
run 100
|
||||
>>>>>>> Commit modifs before release 1 (03/26/18)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ lattice fcc 3.54
|
|||
region box block 0.0 5.0 0.0 5.0 0.0 5.0
|
||||
create_box 1 box
|
||||
|
||||
read_dump ../examples/SPIN/Norm_randXY_8x8x32.dump 0 x y z box yes
|
||||
read_dump ../examples/SPIN/read_restart/Norm_randXY_8x8x32.dump 0 x y z box yes
|
||||
|
||||
create_atoms 1 box
|
||||
|
||||
|
@ -27,9 +27,9 @@ velocity all create 200 4928459 rot yes dist gaussian
|
|||
|
||||
# define magneto-mechanical potentials and forces
|
||||
|
||||
pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0
|
||||
pair_style hybrid/overlay eam/alloy spin/exchange 4.0
|
||||
pair_coeff * * eam/alloy ../examples/SPIN/Co_PurjaPun_2012.eam.alloy Co
|
||||
pair_coeff * * pair/spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
|
||||
pair_coeff * * spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
|
||||
|
||||
neighbor 1.0 bin
|
||||
neigh_modify every 1 check no delay 0
|
||||
|
|
|
@ -22,9 +22,9 @@ mass 1 58.93
|
|||
set group all spin/random 31 1.72
|
||||
velocity all create 100 4928459 rot yes dist gaussian
|
||||
|
||||
pair_style hybrid/overlay eam/alloy pair/spin/exchange 4.0
|
||||
pair_style hybrid/overlay eam/alloy spin/exchange 4.0
|
||||
pair_coeff * * eam/alloy ../examples/SPIN/cobalt_fcc/Co_PurjaPun_2012.eam.alloy Co
|
||||
pair_coeff * * pair/spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
|
||||
pair_coeff * * spin/exchange exchange 4.0 0.0446928 0.003496 1.4885
|
||||
|
||||
neighbor 0.1 bin
|
||||
neigh_modify every 10 check yes delay 20
|
||||
|
|
|
@ -74,7 +74,7 @@ void ComputeSpin::init()
|
|||
|
||||
void ComputeSpin::compute_vector()
|
||||
{
|
||||
int i, index;
|
||||
int i;
|
||||
int countsp, countsptot;
|
||||
double mag[4], magtot[4];
|
||||
double magenergy, magenergytot;
|
||||
|
@ -92,10 +92,7 @@ void ComputeSpin::compute_vector()
|
|||
tempdenom = tempdenomtot = 0.0;
|
||||
spintemperature = 0.0;
|
||||
|
||||
double **x = atom->x;
|
||||
int *mask = atom->mask;
|
||||
int *type = atom->type;
|
||||
imageint *image = atom->image;
|
||||
double **sp = atom->sp;
|
||||
double **fm = atom->fm;
|
||||
double tx,ty,tz;
|
||||
|
|
|
@ -117,7 +117,6 @@ void FixLangevinSpin::init()
|
|||
{
|
||||
// fix_langevin_spin has to be the last defined fix
|
||||
|
||||
int after = 0;
|
||||
int flag_force = 0;
|
||||
int flag_lang = 0;
|
||||
for (int i = 0; i < modify->nfix; i++) {
|
||||
|
|
|
@ -258,14 +258,11 @@ void FixNVESpin::init()
|
|||
|
||||
void FixNVESpin::initial_integrate(int vflag)
|
||||
{
|
||||
double dtfm,msq,scale,fm2,fmsq,sp2,spsq,energy;
|
||||
double spi[3], fmi[3];
|
||||
double dtfm;
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double **sp = atom->sp;
|
||||
double **fm = atom->fm;
|
||||
double *rmass = atom->rmass;
|
||||
double *mass = atom->mass;
|
||||
int nlocal = atom->nlocal;
|
||||
|
@ -422,17 +419,11 @@ void FixNVESpin::pre_neighbor()
|
|||
|
||||
void FixNVESpin::ComputeInteractionsSpin(int i)
|
||||
{
|
||||
const int nlocal = atom->nlocal;
|
||||
double spi[3], fmi[3];
|
||||
|
||||
double **sp = atom->sp;
|
||||
double **fm = atom->fm;
|
||||
|
||||
int eflag = 1;
|
||||
int vflag = 0;
|
||||
|
||||
int pair_compute_flag = 1;
|
||||
|
||||
// force computation for spin i
|
||||
|
||||
spi[0] = sp[i][0];
|
||||
|
@ -564,13 +555,12 @@ void FixNVESpin::AdvanceSingleSpin(int i)
|
|||
int *sametag = atom->sametag;
|
||||
double **sp = atom->sp;
|
||||
double **fm = atom->fm;
|
||||
double dtfm,msq,scale,fm2,fmsq,sp2,spsq,energy,dts2;
|
||||
double msq,scale,fm2,energy,dts2;
|
||||
double cp[3],g[3];
|
||||
|
||||
cp[0] = cp[1] = cp[2] = 0.0;
|
||||
g[0] = g[1] = g[2] = 0.0;
|
||||
fm2 = (fm[i][0]*fm[i][0])+(fm[i][1]*fm[i][1])+(fm[i][2]*fm[i][2]);
|
||||
fmsq = sqrt(fm2);
|
||||
energy = (sp[i][0]*fm[i][0])+(sp[i][1]*fm[i][1])+(sp[i][2]*fm[i][2]);
|
||||
dts2 = dts*dts;
|
||||
|
||||
|
@ -622,10 +612,8 @@ void FixNVESpin::AdvanceSingleSpin(int i)
|
|||
|
||||
void FixNVESpin::final_integrate()
|
||||
{
|
||||
double dtfm,msq,scale,fm2,fmsq,energy;
|
||||
double cp[3],g[3];
|
||||
double dtfm;
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
double **f = atom->f;
|
||||
double *rmass = atom->rmass;
|
||||
|
|
|
@ -80,10 +80,10 @@ friend class PairSpin;
|
|||
|
||||
// stacking variables for sectoring algorithm
|
||||
|
||||
int *stack_head; // index of first atom in backward_stacks
|
||||
int *stack_foot; // index of first atom in forward_stacks
|
||||
int *backward_stacks; // index of next atom in backward stack
|
||||
int *forward_stacks; // index of next atom in forward stack
|
||||
int *stack_head; // index of first atom in backward_stacks
|
||||
int *stack_foot; // index of first atom in forward_stacks
|
||||
int *backward_stacks; // index of next atom in backward stack
|
||||
int *forward_stacks; // index of next atom in forward stack
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -183,7 +183,6 @@ void FixPrecessionSpin::post_force(int vflag)
|
|||
double **fm = atom->fm;
|
||||
double spi[3], fmi[3];
|
||||
const int nlocal = atom->nlocal;
|
||||
double scalar;
|
||||
|
||||
eflag = 0;
|
||||
emag = 0.0;
|
||||
|
|
|
@ -283,9 +283,9 @@ void PairSpinDmi::compute(int eflag, int vflag)
|
|||
// compute magnetic and mechanical components of soc_dmi
|
||||
|
||||
if (rsq <= local_cut2) {
|
||||
compute_dmi(i,j,rsq,eij,fmi,spi,spj);
|
||||
compute_dmi(i,j,eij,fmi,spj);
|
||||
if (lattice_flag) {
|
||||
compute_dmi_mech(i,j,fi,spi,spj);
|
||||
compute_dmi_mech(fi);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -321,33 +321,25 @@ void PairSpinDmi::compute(int eflag, int vflag)
|
|||
|
||||
void PairSpinDmi::compute_single_pair(int ii, double fmi[3])
|
||||
{
|
||||
|
||||
const int nlocal = atom->nlocal;
|
||||
int *type = atom->type;
|
||||
double **x = atom->x;
|
||||
double **sp = atom->sp;
|
||||
double local_cut2;
|
||||
|
||||
double xi[3], rij[3], eij[3];
|
||||
double spi[3], spj[3];
|
||||
double spj[3];
|
||||
|
||||
int iexchange, idmi, ineel, ime;
|
||||
int i,j,jj,inum,jnum,itype,jtype;
|
||||
int i,j,jnum,itype,jtype;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
double rsq, inorm;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
i = ilist[ii];
|
||||
itype = type[i];
|
||||
|
||||
spi[0] = sp[i][0];
|
||||
spi[1] = sp[i][1];
|
||||
spi[2] = sp[i][2];
|
||||
|
||||
xi[0] = x[i][0];
|
||||
xi[1] = x[i][1];
|
||||
|
@ -378,7 +370,7 @@ void PairSpinDmi::compute_single_pair(int ii, double fmi[3])
|
|||
local_cut2 = cut_spin_dmi[itype][jtype]*cut_spin_dmi[itype][jtype];
|
||||
|
||||
if (rsq <= local_cut2) {
|
||||
compute_dmi(i,j,rsq,eij,fmi,spi,spj);
|
||||
compute_dmi(i,j,eij,fmi,spj);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -389,7 +381,7 @@ void PairSpinDmi::compute_single_pair(int ii, double fmi[3])
|
|||
compute the dmi interaction between spin i and spin j
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairSpinDmi::compute_dmi(int i, int j, double rsq, double eij[3], double fmi[3], double spi[3], double spj[3])
|
||||
void PairSpinDmi::compute_dmi(int i, int j, double eij[3], double fmi[3], double spj[3])
|
||||
{
|
||||
int *type = atom->type;
|
||||
int itype, jtype;
|
||||
|
@ -410,7 +402,7 @@ void PairSpinDmi::compute_dmi(int i, int j, double rsq, double eij[3], double fm
|
|||
compute the mechanical force due to the dmi interaction between atom i and atom j
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairSpinDmi::compute_dmi_mech(int i, int j, double fi[3], double spi[3], double spj[3])
|
||||
void PairSpinDmi::compute_dmi_mech(double fi[3])
|
||||
{
|
||||
fi[0] += 0.0;
|
||||
fi[1] += 0.0;
|
||||
|
|
|
@ -37,8 +37,8 @@ class PairSpinDmi : public PairSpin {
|
|||
void compute(int, int);
|
||||
void compute_single_pair(int, double *);
|
||||
|
||||
void compute_dmi(int, int, double, double *, double *, double *, double *);
|
||||
void compute_dmi_mech(int, int, double *, double *, double *);
|
||||
void compute_dmi(int, int, double *, double *, double *);
|
||||
void compute_dmi_mech(double *);
|
||||
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
|
|
|
@ -140,7 +140,7 @@ void PairSpinExchange::coeff(int narg, char **arg)
|
|||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
init specific to this pair style
|
||||
init specific to this pair style
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairSpinExchange::init_style()
|
||||
|
@ -273,7 +273,7 @@ void PairSpinExchange::compute(int eflag, int vflag)
|
|||
// compute exchange interaction
|
||||
|
||||
if (rsq <= local_cut2) {
|
||||
compute_exchange(i,j,rsq,fmi,spi,spj);
|
||||
compute_exchange(i,j,rsq,fmi,spj);
|
||||
if (lattice_flag) {
|
||||
compute_exchange_mech(i,j,rsq,eij,fi,spi,spj);
|
||||
}
|
||||
|
@ -316,22 +316,19 @@ void PairSpinExchange::compute(int eflag, int vflag)
|
|||
void PairSpinExchange::compute_single_pair(int ii, double fmi[3])
|
||||
{
|
||||
|
||||
const int nlocal = atom->nlocal;
|
||||
int *type = atom->type;
|
||||
double **x = atom->x;
|
||||
double **sp = atom->sp;
|
||||
double local_cut2;
|
||||
|
||||
double xi[3], rij[3];
|
||||
double spi[3], spj[3];
|
||||
double spj[3];
|
||||
|
||||
int iexchange, idmi, ineel, ime;
|
||||
int i,j,jj,inum,jnum,itype,jtype;
|
||||
int i,j,jnum,itype,jtype;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
double rsq;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
@ -339,10 +336,6 @@ void PairSpinExchange::compute_single_pair(int ii, double fmi[3])
|
|||
i = ilist[ii];
|
||||
itype = type[i];
|
||||
|
||||
spi[0] = sp[i][0];
|
||||
spi[1] = sp[i][1];
|
||||
spi[2] = sp[i][2];
|
||||
|
||||
xi[0] = x[i][0];
|
||||
xi[1] = x[i][1];
|
||||
xi[2] = x[i][2];
|
||||
|
@ -367,7 +360,7 @@ void PairSpinExchange::compute_single_pair(int ii, double fmi[3])
|
|||
rsq = rij[0]*rij[0] + rij[1]*rij[1] + rij[2]*rij[2];
|
||||
|
||||
if (rsq <= local_cut2) {
|
||||
compute_exchange(i,j,rsq,fmi,spi,spj);
|
||||
compute_exchange(i,j,rsq,fmi,spj);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -378,7 +371,7 @@ void PairSpinExchange::compute_single_pair(int ii, double fmi[3])
|
|||
compute exchange interaction between spins i and j
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void PairSpinExchange::compute_exchange(int i, int j, double rsq, double fmi[3], double spi[3], double spj[3])
|
||||
void PairSpinExchange::compute_exchange(int i, int j, double rsq, double fmi[3], double spj[3])
|
||||
{
|
||||
int *type = atom->type;
|
||||
int itype, jtype;
|
||||
|
|
|
@ -37,7 +37,7 @@ class PairSpinExchange : public PairSpin {
|
|||
void compute(int, int);
|
||||
void compute_single_pair(int, double *);
|
||||
|
||||
void compute_exchange(int, int, double, double *, double *, double *);
|
||||
void compute_exchange(int, int, double, double *, double *);
|
||||
void compute_exchange_mech(int, int, double, double *, double *, double *, double *);
|
||||
|
||||
void write_restart(FILE *);
|
||||
|
|
|
@ -282,7 +282,7 @@ void PairSpinMe::compute(int eflag, int vflag)
|
|||
// compute me interaction
|
||||
|
||||
if (rsq <= local_cut2) {
|
||||
compute_me(i,j,rsq,eij,fmi,spi,spj);
|
||||
compute_me(i,j,rsq,eij,fmi,spj);
|
||||
if (lattice_flag) {
|
||||
compute_me_mech(i,j,fi,spi,spj);
|
||||
}
|
||||
|
@ -320,23 +320,19 @@ void PairSpinMe::compute(int eflag, int vflag)
|
|||
|
||||
void PairSpinMe::compute_single_pair(int ii, double fmi[3])
|
||||
{
|
||||
|
||||
const int nlocal = atom->nlocal;
|
||||
int *type = atom->type;
|
||||
double **x = atom->x;
|
||||
double **sp = atom->sp;
|
||||
double local_cut2;
|
||||
|
||||
double xi[3], rij[3], eij[3];
|
||||
double spi[3], spj[3];
|
||||
double spj[3];
|
||||
|
||||
int iexchange, idmi, ineel, ime;
|
||||
int i,j,jj,inum,jnum,itype,jtype;
|
||||
int i,j,jnum,itype,jtype;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
double rsq, inorm;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
@ -344,10 +340,6 @@ void PairSpinMe::compute_single_pair(int ii, double fmi[3])
|
|||
i = ilist[ii];
|
||||
itype = type[i];
|
||||
|
||||
spi[0] = sp[i][0];
|
||||
spi[1] = sp[i][1];
|
||||
spi[2] = sp[i][2];
|
||||
|
||||
xi[0] = x[i][0];
|
||||
xi[1] = x[i][1];
|
||||
xi[2] = x[i][2];
|
||||
|
@ -378,7 +370,7 @@ void PairSpinMe::compute_single_pair(int ii, double fmi[3])
|
|||
eij[2] = inorm*rij[2];
|
||||
|
||||
if (rsq <= local_cut2) {
|
||||
compute_me(i,j,rsq,eij,fmi,spi,spj);
|
||||
compute_me(i,j,rsq,eij,fmi,spj);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -386,7 +378,7 @@ void PairSpinMe::compute_single_pair(int ii, double fmi[3])
|
|||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairSpinMe::compute_me(int i, int j, double rsq, double eij[3], double fmi[3], double spi[3], double spj[3])
|
||||
void PairSpinMe::compute_me(int i, int j, double rsq, double eij[3], double fmi[3], double spj[3])
|
||||
{
|
||||
int *type = atom->type;
|
||||
int itype, jtype;
|
||||
|
|
|
@ -37,7 +37,7 @@ class PairSpinMe : public PairSpin {
|
|||
void compute(int, int);
|
||||
void compute_single_pair(int, double *);
|
||||
|
||||
void compute_me(int, int, double, double *, double *, double *, double *);
|
||||
void compute_me(int, int, double, double *, double *, double *);
|
||||
void compute_me_mech(int, int, double *, double *, double *);
|
||||
|
||||
void write_restart(FILE *);
|
||||
|
|
|
@ -326,7 +326,6 @@ void PairSpinNeel::compute(int eflag, int vflag)
|
|||
|
||||
void PairSpinNeel::compute_single_pair(int ii, double fmi[3])
|
||||
{
|
||||
const int nlocal = atom->nlocal;
|
||||
int *type = atom->type;
|
||||
double **x = atom->x;
|
||||
double **sp = atom->sp;
|
||||
|
@ -335,13 +334,11 @@ void PairSpinNeel::compute_single_pair(int ii, double fmi[3])
|
|||
double xi[3], rij[3], eij[3];
|
||||
double spi[3], spj[3];
|
||||
|
||||
int iexchange, idmi, ineel, ime;
|
||||
int i,j,jj,inum,jnum,itype,jtype;
|
||||
int i,j,jnum,itype,jtype;
|
||||
int *ilist,*jlist,*numneigh,**firstneigh;
|
||||
|
||||
double rsq, rd, inorm;
|
||||
double rsq, inorm;
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
@ -379,6 +376,9 @@ void PairSpinNeel::compute_single_pair(int ii, double fmi[3])
|
|||
rij[2] = x[j][2] - xi[2];
|
||||
rsq = rij[0]*rij[0] + rij[1]*rij[1] + rij[2]*rij[2];
|
||||
inorm = 1.0/sqrt(rsq);
|
||||
eij[0] = inorm*rij[0];
|
||||
eij[1] = inorm*rij[1];
|
||||
eij[2] = inorm*rij[2];
|
||||
|
||||
if (rsq <= local_cut2) {
|
||||
compute_neel(i,j,rsq,eij,fmi,spi,spj);
|
||||
|
|
Loading…
Reference in New Issue