changes to files with THERMO_ENERGY mask in standard packages
This commit is contained in:
@ -70,8 +70,9 @@ FixLatte::FixLatte(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
virial_flag = 1;
|
energy_global_flag = 1;
|
||||||
thermo_virial = 1;
|
virial_global_flag = 1;
|
||||||
|
thermo_energy = thermo_virial = 1;
|
||||||
|
|
||||||
// store ID of compute pe/atom used to generate Coulomb potential for LATTE
|
// store ID of compute pe/atom used to generate Coulomb potential for LATTE
|
||||||
// null pointer means LATTE will compute Coulombic potential
|
// null pointer means LATTE will compute Coulombic potential
|
||||||
@ -117,12 +118,9 @@ FixLatte::~FixLatte()
|
|||||||
int FixLatte::setmask()
|
int FixLatte::setmask()
|
||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
//mask |= INITIAL_INTEGRATE;
|
|
||||||
//mask |= FINAL_INTEGRATE;
|
|
||||||
mask |= PRE_REVERSE;
|
mask |= PRE_REVERSE;
|
||||||
mask |= POST_FORCE;
|
mask |= POST_FORCE;
|
||||||
mask |= MIN_POST_FORCE;
|
mask |= MIN_POST_FORCE;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,9 +265,6 @@ void FixLatte::post_force(int vflag)
|
|||||||
// hardwire these unsupported flags for now
|
// hardwire these unsupported flags for now
|
||||||
|
|
||||||
int coulombflag = 0;
|
int coulombflag = 0;
|
||||||
// pe_peratom = 0;
|
|
||||||
// virial_global = 1; // set via vflag_global at some point
|
|
||||||
// virial_peratom = 0;
|
|
||||||
neighflag = 0;
|
neighflag = 0;
|
||||||
|
|
||||||
// set flags used by LATTE
|
// set flags used by LATTE
|
||||||
|
|||||||
@ -2334,9 +2334,9 @@ double FixGCMC::energy_full()
|
|||||||
if (modify->n_post_force) modify->post_force(vflag);
|
if (modify->n_post_force) modify->post_force(vflag);
|
||||||
if (modify->n_end_of_step) modify->end_of_step();
|
if (modify->n_end_of_step) modify->end_of_step();
|
||||||
|
|
||||||
// NOTE: all fixes with THERMO_ENERGY mask set and which
|
// NOTE: all fixes with energy_global_flag set and which
|
||||||
// operate at pre_force() or post_force() or end_of_step()
|
// operate at pre_force() or post_force() or end_of_step()
|
||||||
// and which user has enable via fix_modify thermo yes,
|
// and which user has enabled via fix_modify energy yes,
|
||||||
// will contribute to total MC energy via pe->compute_scalar()
|
// will contribute to total MC energy via pe->compute_scalar()
|
||||||
|
|
||||||
update->eflag_global = update->ntimestep;
|
update->eflag_global = update->ntimestep;
|
||||||
|
|||||||
@ -1061,9 +1061,9 @@ double FixWidom::energy_full()
|
|||||||
if (modify->n_pre_force) modify->pre_force(vflag);
|
if (modify->n_pre_force) modify->pre_force(vflag);
|
||||||
if (modify->n_end_of_step) modify->end_of_step();
|
if (modify->n_end_of_step) modify->end_of_step();
|
||||||
|
|
||||||
// NOTE: all fixes with THERMO_ENERGY mask set and which
|
// NOTE: all fixes with energy_global_flag set and which
|
||||||
// operate at pre_force() or post_force() or end_of_step()
|
// operate at pre_force() or post_force() or end_of_step()
|
||||||
// and which user has enable via fix_modify thermo yes,
|
// and which user has enabled via fix_modify energy yes,
|
||||||
// will contribute to total MC energy via pe->compute_scalar()
|
// will contribute to total MC energy via pe->compute_scalar()
|
||||||
|
|
||||||
update->eflag_global = update->ntimestep;
|
update->eflag_global = update->ntimestep;
|
||||||
|
|||||||
@ -42,7 +42,8 @@ FixClientMD::FixClientMD(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
{
|
{
|
||||||
if (lmp->clientserver != 1)
|
if (lmp->clientserver != 1)
|
||||||
error->all(FLERR,"Fix client/md requires LAMMPS be running as a client");
|
error->all(FLERR,"Fix client/md requires LAMMPS be running as a client");
|
||||||
if (atom->map_style == Atom::MAP_NONE) error->all(FLERR,"Fix client/md requires atom map");
|
if (atom->map_style == Atom::MAP_NONE)
|
||||||
|
error->all(FLERR,"Fix client/md requires atom map");
|
||||||
|
|
||||||
if (sizeof(tagint) != 4)
|
if (sizeof(tagint) != 4)
|
||||||
error->all(FLERR,"Fix client/md only supports 32-bit atom IDs");
|
error->all(FLERR,"Fix client/md only supports 32-bit atom IDs");
|
||||||
@ -54,8 +55,8 @@ FixClientMD::FixClientMD(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
virial_flag = 1;
|
energy_global_flag = virial_global_flag = 1;
|
||||||
thermo_virial = 1;
|
thermo_energy = thermo_virial = 1;
|
||||||
|
|
||||||
inv_nprocs = 1.0 / comm->nprocs;
|
inv_nprocs = 1.0 / comm->nprocs;
|
||||||
if (domain->dimension == 2)
|
if (domain->dimension == 2)
|
||||||
@ -89,7 +90,6 @@ int FixClientMD::setmask()
|
|||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= POST_FORCE;
|
mask |= POST_FORCE;
|
||||||
mask |= MIN_POST_FORCE;
|
mask |= MIN_POST_FORCE;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,6 +49,7 @@ FixEfield::FixEfield(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
vector_flag = 1;
|
vector_flag = 1;
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
size_vector = 3;
|
size_vector = 3;
|
||||||
|
energy_global_flag = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
extvector = 1;
|
extvector = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
@ -138,7 +139,6 @@ FixEfield::~FixEfield()
|
|||||||
int FixEfield::setmask()
|
int FixEfield::setmask()
|
||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
mask |= POST_FORCE;
|
mask |= POST_FORCE;
|
||||||
mask |= POST_FORCE_RESPA;
|
mask |= POST_FORCE_RESPA;
|
||||||
mask |= MIN_POST_FORCE;
|
mask |= MIN_POST_FORCE;
|
||||||
|
|||||||
@ -67,7 +67,7 @@ FixOrientBCC::FixOrientBCC(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
|
energy_global_flag = 1;
|
||||||
peratom_flag = 1;
|
peratom_flag = 1;
|
||||||
size_peratom_cols = 2;
|
size_peratom_cols = 2;
|
||||||
peratom_freq = 1;
|
peratom_freq = 1;
|
||||||
@ -202,7 +202,6 @@ int FixOrientBCC::setmask()
|
|||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= POST_FORCE;
|
mask |= POST_FORCE;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
mask |= POST_FORCE_RESPA;
|
mask |= POST_FORCE_RESPA;
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,7 +65,7 @@ FixOrientFCC::FixOrientFCC(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
|
energy_global_flag = 1;
|
||||||
peratom_flag = 1;
|
peratom_flag = 1;
|
||||||
size_peratom_cols = 2;
|
size_peratom_cols = 2;
|
||||||
peratom_freq = 1;
|
peratom_freq = 1;
|
||||||
@ -200,7 +200,6 @@ int FixOrientFCC::setmask()
|
|||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= POST_FORCE;
|
mask |= POST_FORCE;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
mask |= POST_FORCE_RESPA;
|
mask |= POST_FORCE_RESPA;
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -70,10 +70,10 @@ FixCMAP::FixCMAP(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
restart_global = 1;
|
restart_global = 1;
|
||||||
restart_peratom = 1;
|
restart_peratom = 1;
|
||||||
peatom_flag = 1;
|
energy_global_flag = energy_peratom_flag = 1;
|
||||||
virial_flag = 1;
|
virial_global_flag = virial_peratom_flag = 1;
|
||||||
|
thermo_energy = thermo_virial = 1;
|
||||||
centroidstressflag = CENTROID_NOTAVAIL;
|
centroidstressflag = CENTROID_NOTAVAIL;
|
||||||
thermo_virial = 1;
|
|
||||||
peratom_freq = 1;
|
peratom_freq = 1;
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
@ -154,7 +154,6 @@ int FixCMAP::setmask()
|
|||||||
mask |= PRE_NEIGHBOR;
|
mask |= PRE_NEIGHBOR;
|
||||||
mask |= PRE_REVERSE;
|
mask |= PRE_REVERSE;
|
||||||
mask |= POST_FORCE;
|
mask |= POST_FORCE;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
mask |= POST_FORCE_RESPA;
|
mask |= POST_FORCE_RESPA;
|
||||||
mask |= MIN_POST_FORCE;
|
mask |= MIN_POST_FORCE;
|
||||||
return mask;
|
return mask;
|
||||||
|
|||||||
@ -50,6 +50,7 @@ FixHyperGlobal::FixHyperGlobal(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
hyperflag = 1;
|
hyperflag = 1;
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
|
energy_global_flag = 1;
|
||||||
vector_flag = 1;
|
vector_flag = 1;
|
||||||
size_vector = 12;
|
size_vector = 12;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
@ -104,7 +105,6 @@ int FixHyperGlobal::setmask()
|
|||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= PRE_NEIGHBOR;
|
mask |= PRE_NEIGHBOR;
|
||||||
mask |= PRE_REVERSE;
|
mask |= PRE_REVERSE;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,6 @@
|
|||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
|
|
||||||
@ -63,6 +62,7 @@ FixHyperLocal::FixHyperLocal(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
hyperflag = 2;
|
hyperflag = 2;
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
|
energy_global_flag = 1;
|
||||||
vector_flag = 1;
|
vector_flag = 1;
|
||||||
size_vector = 26;
|
size_vector = 26;
|
||||||
//size_vector = 28; // can add 2 for debugging
|
//size_vector = 28; // can add 2 for debugging
|
||||||
@ -237,7 +237,6 @@ int FixHyperLocal::setmask()
|
|||||||
mask |= PRE_NEIGHBOR;
|
mask |= PRE_NEIGHBOR;
|
||||||
mask |= PRE_REVERSE;
|
mask |= PRE_REVERSE;
|
||||||
mask |= MIN_PRE_NEIGHBOR;
|
mask |= MIN_PRE_NEIGHBOR;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,6 +49,8 @@ FixRigidNH::FixRigidNH(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
eta_dot_b(nullptr), f_eta_b(nullptr), rfix(nullptr), id_temp(nullptr),
|
eta_dot_b(nullptr), f_eta_b(nullptr), rfix(nullptr), id_temp(nullptr),
|
||||||
id_press(nullptr), temperature(nullptr), pressure(nullptr)
|
id_press(nullptr), temperature(nullptr), pressure(nullptr)
|
||||||
{
|
{
|
||||||
|
if (tstat_flag || pstat_flag) ecouple_flag = 1;
|
||||||
|
|
||||||
// error checks: could be moved up to FixRigid
|
// error checks: could be moved up to FixRigid
|
||||||
|
|
||||||
if ((p_flag[0] == 1 && p_period[0] <= 0.0) ||
|
if ((p_flag[0] == 1 && p_period[0] <= 0.0) ||
|
||||||
@ -186,8 +188,6 @@ int FixRigidNH::setmask()
|
|||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask = FixRigid::setmask();
|
mask = FixRigid::setmask();
|
||||||
if (tstat_flag || pstat_flag) mask |= THERMO_ENERGY;
|
|
||||||
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,8 @@ FixRigidNHSmall::FixRigidNHSmall(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
f_eta_b(nullptr), rfix(nullptr), id_temp(nullptr), id_press(nullptr),
|
f_eta_b(nullptr), rfix(nullptr), id_temp(nullptr), id_press(nullptr),
|
||||||
temperature(nullptr), pressure(nullptr)
|
temperature(nullptr), pressure(nullptr)
|
||||||
{
|
{
|
||||||
|
if (tstat_flag || pstat_flag) ecouple_flag = 1;
|
||||||
|
|
||||||
// error checks
|
// error checks
|
||||||
|
|
||||||
if ((p_flag[0] == 1 && p_period[0] <= 0.0) ||
|
if ((p_flag[0] == 1 && p_period[0] <= 0.0) ||
|
||||||
@ -199,8 +201,6 @@ int FixRigidNHSmall::setmask()
|
|||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask = FixRigidSmall::setmask();
|
mask = FixRigidSmall::setmask();
|
||||||
if (tstat_flag || pstat_flag) mask |= THERMO_ENERGY;
|
|
||||||
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,6 @@
|
|||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
|
|
||||||
@ -55,6 +53,7 @@ FixMSST::FixMSST(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
extvector = 0;
|
extvector = 0;
|
||||||
|
ecouple_flag = 1;
|
||||||
|
|
||||||
// set defaults
|
// set defaults
|
||||||
|
|
||||||
@ -238,7 +237,6 @@ int FixMSST::setmask()
|
|||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= INITIAL_INTEGRATE;
|
mask |= INITIAL_INTEGRATE;
|
||||||
mask |= FINAL_INTEGRATE;
|
mask |= FINAL_INTEGRATE;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,6 @@
|
|||||||
#include "respa.h"
|
#include "respa.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
using namespace FixConst;
|
using namespace FixConst;
|
||||||
using namespace MathConst;
|
using namespace MathConst;
|
||||||
@ -47,12 +46,6 @@ FixLangevinSpin::FixLangevinSpin(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
{
|
{
|
||||||
if (narg != 6) error->all(FLERR,"Illegal langevin/spin command");
|
if (narg != 6) error->all(FLERR,"Illegal langevin/spin command");
|
||||||
|
|
||||||
dynamic_group_allow = 1;
|
|
||||||
scalar_flag = 1;
|
|
||||||
global_freq = 1;
|
|
||||||
extscalar = 1;
|
|
||||||
nevery = 1;
|
|
||||||
|
|
||||||
temp = utils::numeric(FLERR,arg[3],false,lmp);
|
temp = utils::numeric(FLERR,arg[3],false,lmp);
|
||||||
alpha_t = utils::numeric(FLERR,arg[4],false,lmp);
|
alpha_t = utils::numeric(FLERR,arg[4],false,lmp);
|
||||||
seed = utils::inumeric(FLERR,arg[5],false,lmp);
|
seed = utils::inumeric(FLERR,arg[5],false,lmp);
|
||||||
@ -77,7 +70,6 @@ FixLangevinSpin::FixLangevinSpin(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
// random = new RanPark(lmp,seed + comm->me);
|
// random = new RanPark(lmp,seed + comm->me);
|
||||||
random = new RanMars(lmp,seed + comm->me);
|
random = new RanMars(lmp,seed + comm->me);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
@ -92,10 +84,6 @@ FixLangevinSpin::~FixLangevinSpin()
|
|||||||
int FixLangevinSpin::setmask()
|
int FixLangevinSpin::setmask()
|
||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= POST_FORCE;
|
|
||||||
mask |= POST_FORCE_RESPA;
|
|
||||||
mask |= END_OF_STEP;
|
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +144,6 @@ 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*(2.0*random->uniform() - 1.0);
|
// double rx = sigma*(2.0*random->uniform() - 1.0);
|
||||||
// double ry = sigma*(2.0*random->uniform() - 1.0);
|
// double ry = sigma*(2.0*random->uniform() - 1.0);
|
||||||
// double rz = sigma*(2.0*random->uniform() - 1.0);
|
// double rz = sigma*(2.0*random->uniform() - 1.0);
|
||||||
@ -175,14 +162,4 @@ void FixLangevinSpin::add_temperature(double fmi[3])
|
|||||||
fmi[0] *= gil_factor;
|
fmi[0] *= gil_factor;
|
||||||
fmi[1] *= gil_factor;
|
fmi[1] *= gil_factor;
|
||||||
fmi[2] *= gil_factor;
|
fmi[2] *= gil_factor;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
void FixLangevinSpin::post_force_respa(int vflag, int ilevel, int /*iloop*/)
|
|
||||||
{
|
|
||||||
if (ilevel == nlevels_respa-1) post_force(vflag);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,8 @@ enum{CONSTANT,EQUAL};
|
|||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
FixPrecessionSpin::FixPrecessionSpin(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), emag(nullptr)
|
FixPrecessionSpin::FixPrecessionSpin(LAMMPS *lmp, int narg, char **arg) :
|
||||||
|
Fix(lmp, narg, arg), emag(nullptr)
|
||||||
{
|
{
|
||||||
if (narg < 7) error->all(FLERR,"Illegal precession/spin command");
|
if (narg < 7) error->all(FLERR,"Illegal precession/spin command");
|
||||||
|
|
||||||
@ -56,6 +57,7 @@ FixPrecessionSpin::FixPrecessionSpin(LAMMPS *lmp, int narg, char **arg) : Fix(lm
|
|||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
|
energy_global_flag = 1;
|
||||||
respa_level_support = 1;
|
respa_level_support = 1;
|
||||||
ilevel_respa = 0;
|
ilevel_respa = 0;
|
||||||
|
|
||||||
@ -165,12 +167,10 @@ int FixPrecessionSpin::setmask()
|
|||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= POST_FORCE;
|
mask |= POST_FORCE;
|
||||||
mask |= MIN_POST_FORCE;
|
mask |= MIN_POST_FORCE;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
mask |= POST_FORCE_RESPA;
|
mask |= POST_FORCE_RESPA;
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
void FixPrecessionSpin::init()
|
void FixPrecessionSpin::init()
|
||||||
@ -245,7 +245,6 @@ void FixPrecessionSpin::min_setup(int vflag)
|
|||||||
|
|
||||||
void FixPrecessionSpin::post_force(int /* vflag */)
|
void FixPrecessionSpin::post_force(int /* vflag */)
|
||||||
{
|
{
|
||||||
|
|
||||||
// update mag field with time (potential improvement)
|
// update mag field with time (potential improvement)
|
||||||
|
|
||||||
if (varflag != CONSTANT) {
|
if (varflag != CONSTANT) {
|
||||||
|
|||||||
@ -65,21 +65,20 @@ FixOrientECO::FixOrientECO(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
{
|
{
|
||||||
if (lmp->citeme) lmp->citeme->add(cite_fix_orient_eco);
|
if (lmp->citeme) lmp->citeme->add(cite_fix_orient_eco);
|
||||||
|
|
||||||
// get rank of this processor
|
|
||||||
MPI_Comm_rank(world, &me);
|
MPI_Comm_rank(world, &me);
|
||||||
|
|
||||||
// check for illegal command
|
|
||||||
if (narg != 7) error->all(FLERR, "Illegal fix orient/eco command");
|
if (narg != 7) error->all(FLERR, "Illegal fix orient/eco command");
|
||||||
|
|
||||||
// set fix flags
|
|
||||||
scalar_flag = 1; // computes scalar
|
scalar_flag = 1; // computes scalar
|
||||||
global_freq = 1; // values can be computed at every timestep
|
global_freq = 1; // values can be computed at every timestep
|
||||||
extscalar = 1; // scalar scales with # of atoms
|
extscalar = 1; // scalar scales with # of atoms
|
||||||
|
energy_global_flag = 1;
|
||||||
peratom_flag = 1; // quantities are per atom quantities
|
peratom_flag = 1; // quantities are per atom quantities
|
||||||
size_peratom_cols = 2; // # of per atom quantities
|
size_peratom_cols = 2; // # of per atom quantities
|
||||||
peratom_freq = 1; //
|
peratom_freq = 1; //
|
||||||
|
|
||||||
// parse input parameters
|
// parse input parameters
|
||||||
|
|
||||||
u_0 = utils::numeric(FLERR, arg[3],false,lmp);
|
u_0 = utils::numeric(FLERR, arg[3],false,lmp);
|
||||||
sign = (u_0 >= 0.0 ? 1 : -1);
|
sign = (u_0 >= 0.0 ? 1 : -1);
|
||||||
eta = utils::numeric(FLERR, arg[4],false,lmp);
|
eta = utils::numeric(FLERR, arg[4],false,lmp);
|
||||||
@ -87,6 +86,7 @@ FixOrientECO::FixOrientECO(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
// read reference orientations from file
|
// read reference orientations from file
|
||||||
// work on rank 0 only
|
// work on rank 0 only
|
||||||
|
|
||||||
int n = strlen(arg[6]) + 1;
|
int n = strlen(arg[6]) + 1;
|
||||||
dir_filename = new char[n];
|
dir_filename = new char[n];
|
||||||
strcpy(dir_filename, arg[6]);
|
strcpy(dir_filename, arg[6]);
|
||||||
@ -151,7 +151,6 @@ FixOrientECO::~FixOrientECO() {
|
|||||||
int FixOrientECO::setmask() {
|
int FixOrientECO::setmask() {
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
mask |= POST_FORCE;
|
mask |= POST_FORCE;
|
||||||
mask |= THERMO_ENERGY;
|
|
||||||
mask |= POST_FORCE_RESPA;
|
mask |= POST_FORCE_RESPA;
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user