update electron radius velocities and radii in EFF NH fixes analog to fix nve/eff

This commit is contained in:
Axel Kohlmeyer
2024-03-18 23:36:41 -04:00
parent fb10881636
commit cbe2266e40

View File

@ -16,7 +16,6 @@
Contributing author: Andres Jaramillo-Botero (Caltech)
------------------------------------------------------------------------- */
#include "fix_nh_eff.h"
#include "atom.h"
@ -62,7 +61,7 @@ void FixNHEff::nve_v()
if (mask[i] & groupbit) {
if (abs(spin[i])==1) {
dtfm = dtf / mass[type[i]];
ervel[i] = dtfm * erforce[i] / mefactor;
ervel[i] += dtfm * erforce[i] / mefactor;
}
}
}
@ -79,15 +78,26 @@ void FixNHEff::nve_x()
FixNH::nve_x();
double *eradius = atom->eradius;
double *erforce = atom->erforce;
double *ervel = atom->ervel;
double *mass = atom->mass;
int *type = atom->type;
int *spin = atom->spin;
int *mask = atom->mask;
int nlocal = atom->nlocal;
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
double mefactor = domain->dimension/4.0;
double dtfm;
for (int i = 0; i < nlocal; i++)
if (mask[i] & groupbit)
if (abs(spin[i])==1) eradius[i] += dtv * ervel[i];
if (mask[i] & groupbit) {
dtfm = dtf / mass[type[i]];
if (abs(spin[i])==1) {
ervel[i] += dtfm * erforce[i] / mefactor;
eradius[i] += dtv * ervel[i];
}
}
}
/* ----------------------------------------------------------------------