add support for requesting SSA neighbor lists and update a few more styles
This commit is contained in:
@ -26,7 +26,6 @@
|
||||
#include "memory.h"
|
||||
#include "min.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "update.h"
|
||||
|
||||
@ -513,45 +512,18 @@ void PairAWPMDCut::init_style()
|
||||
|
||||
if (!atom->q_flag || !atom->spin_flag ||
|
||||
!atom->eradius_flag || !atom->erforce_flag ) // TO DO: adjust this to match approximation used
|
||||
error->all(FLERR,"Pair awpmd/cut requires atom attributes "
|
||||
"q, spin, eradius, erforce");
|
||||
|
||||
/*
|
||||
if (vflag_atom) { // can't compute virial per atom
|
||||
//warning->
|
||||
error->all(FLERR,"Pair style awpmd can't compute per atom virials");
|
||||
}*/
|
||||
error->all(FLERR,"Pair awpmd/cut requires atom attributes q, spin, eradius, erforce");
|
||||
|
||||
// add hook to minimizer for eradius and erforce
|
||||
|
||||
if (update->whichflag == 2)
|
||||
int ignore = update->minimize->request(this,1,0.01);
|
||||
|
||||
// make sure to use the appropriate timestep when using real units
|
||||
|
||||
/*if (update->whichflag == 1) {
|
||||
if (force->qqr2e == 332.06371 && update->dt == 1.0)
|
||||
error->all(FLERR,"You must lower the default real units timestep for pEFF ");
|
||||
}*/
|
||||
|
||||
// need a half neigh list and optionally a granular history neigh list
|
||||
|
||||
//int irequest = neighbor->request(this,instance_me);
|
||||
|
||||
//if (atom->tag_enable == 0)
|
||||
// error->all(FLERR,"Pair style reax requires atom IDs");
|
||||
|
||||
//if (force->newton_pair == 0)
|
||||
//error->all(FLERR,"Pair style awpmd requires newton pair on");
|
||||
|
||||
//if (strcmp(update->unit_style,"real") != 0 && comm->me == 0)
|
||||
//error->warning(FLERR,"Not using real units with pair reax");
|
||||
|
||||
int irequest = neighbor->request(this,instance_me);
|
||||
neighbor->requests[irequest]->newton = 2;
|
||||
neighbor->add_request(this, NeighConst::REQ_NEWTON_OFF);
|
||||
|
||||
if (force->e_mass==0. || force->hhmrr2e==0. || force->mvh2r==0.)
|
||||
error->all(FLERR,"Pair style awpmd requires e_mass and conversions hhmrr2e, mvh2r to be properly set for unit system");
|
||||
error->all(FLERR,"Pair style awpmd requires e_mass and conversions "
|
||||
"hhmrr2e, mvh2r to be properly set for unit system");
|
||||
|
||||
wpmd->me=force->e_mass;
|
||||
wpmd->h2_me=force->hhmrr2e/force->e_mass;
|
||||
|
||||
@ -45,7 +45,6 @@
|
||||
#include "memory.h"
|
||||
#include "modify.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "npair.h"
|
||||
#include "npair_half_bin_newton_ssa.h"
|
||||
@ -134,12 +133,8 @@ int FixShardlow::setmask()
|
||||
|
||||
void FixShardlow::init()
|
||||
{
|
||||
int irequest = neighbor->request(this,instance_me);
|
||||
neighbor->requests[irequest]->pair = 0;
|
||||
neighbor->requests[irequest]->fix = 1;
|
||||
neighbor->requests[irequest]->ghost = 1;
|
||||
neighbor->requests[irequest]->ssa = 1;
|
||||
neighbor->requests[irequest]->newton = 1; // SSA requires newton on
|
||||
// SSA requires newton on
|
||||
neighbor->add_request(this, NeighConst::REQ_GHOST|NeighConst::REQ_NEWTON_ON|NeighConst::REQ_SSA);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -45,7 +45,6 @@
|
||||
#include "memory.h"
|
||||
#include "modify.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "update.h"
|
||||
|
||||
@ -127,9 +126,7 @@ void PairReaxFFOMP::init_style()
|
||||
// need a half neighbor list w/ Newton off and ghost neighbors
|
||||
// built whenever re-neighboring occurs
|
||||
|
||||
int irequest = neighbor->request(this,instance_me);
|
||||
neighbor->requests[irequest]->newton = 2;
|
||||
neighbor->requests[irequest]->ghost = 1;
|
||||
neighbor->add_request(this, NeighConst::REQ_GHOST | NeighConst::REQ_NEWTON_OFF);
|
||||
|
||||
cutmax = MAX3(api->control->nonb_cut, api->control->hbond_cut, api->control->bond_cut);
|
||||
if ((cutmax < 2.0*api->control->bond_cut) && (comm->me == 0))
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
#include "memory.h"
|
||||
#include "modify.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "pair.h"
|
||||
#include "region.h"
|
||||
@ -419,10 +418,7 @@ void FixQEqReaxFF::init()
|
||||
// we need a half neighbor list w/ Newton off
|
||||
// built whenever re-neighboring occurs
|
||||
|
||||
int irequest = neighbor->request(this,instance_me);
|
||||
neighbor->requests[irequest]->pair = 0;
|
||||
neighbor->requests[irequest]->fix = 1;
|
||||
neighbor->requests[irequest]->newton = 2;
|
||||
neighbor->add_request(this, NeighConst::REQ_NEWTON_OFF);
|
||||
|
||||
init_shielding();
|
||||
init_taper();
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
#include "memory.h"
|
||||
#include "modify.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neigh_request.h"
|
||||
#include "neighbor.h"
|
||||
#include "update.h"
|
||||
#include "fix_acks2_reaxff.h"
|
||||
@ -366,9 +365,7 @@ void PairReaxFF::init_style()
|
||||
// need a half neighbor list w/ Newton off and ghost neighbors
|
||||
// built whenever re-neighboring occurs
|
||||
|
||||
int irequest = neighbor->request(this,instance_me);
|
||||
neighbor->requests[irequest]->newton = 2;
|
||||
neighbor->requests[irequest]->ghost = 1;
|
||||
neighbor->add_request(this, NeighConst::REQ_GHOST | NeighConst::REQ_NEWTON_OFF);
|
||||
|
||||
cutmax = MAX3(api->control->nonb_cut, api->control->hbond_cut, api->control->bond_cut);
|
||||
if ((cutmax < 2.0*api->control->bond_cut) && (comm->me == 0))
|
||||
|
||||
@ -273,6 +273,7 @@ void NeighRequest::apply_flags(int flags)
|
||||
if (flags & REQ_OCCASIONAL) { occasional = 1; }
|
||||
if (flags & REQ_RESPA_INOUT) { respainner = respaouter = 1; }
|
||||
if (flags & REQ_RESPA_ALL) { respainner = respamiddle = respaouter = 1; }
|
||||
if (flags & REQ_SSA) { ssa = 1; }
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
|
||||
@ -331,6 +331,7 @@ namespace NeighConst {
|
||||
REQ_RESPA_ALL = 1 << 6,
|
||||
REQ_NEWTON_ON = 1 << 8,
|
||||
REQ_NEWTON_OFF = 1 << 9,
|
||||
REQ_SSA = 1 << 10,
|
||||
};
|
||||
} // namespace NeighConst
|
||||
|
||||
|
||||
Reference in New Issue
Block a user