new SNAP potential for W

This commit is contained in:
Steve Plimpton
2017-02-21 15:49:21 -07:00
parent cb982f2f28
commit 1cd4c48ccc
98 changed files with 13326 additions and 1081 deletions

View File

@ -13,6 +13,7 @@
#include "nstencil.h"
#include "neighbor.h"
#include "neigh_request.h"
#include "nbin.h"
#include "atom.h"
#include "update.h"
@ -88,6 +89,14 @@ NStencil::~NStencil()
delete [] distsq_multi;
}
/* ---------------------------------------------------------------------- */
void NStencil::post_constructor(NeighRequest *nrq)
{
cutoff_custom = 0.0;
if (nrq->cut) cutoff_custom = nrq->cutoff;
}
/* ----------------------------------------------------------------------
copy needed info from Neighbor class to this stencil class
------------------------------------------------------------------------- */
@ -98,6 +107,14 @@ void NStencil::copy_neighbor_info()
cutneighmax = neighbor->cutneighmax;
cutneighmaxsq = neighbor->cutneighmaxsq;
cuttypesq = neighbor->cuttypesq;
// overwrite Neighbor cutoff with custom value set by requestor
// only works for style = BIN (checked by Neighbor class)
if (cutoff_custom > 0.0) {
cutneighmax = cutoff_custom;
cutneighmaxsq = cutneighmax * cutneighmax;
}
}
/* ----------------------------------------------------------------------