add compute vacf/chunk command

This commit is contained in:
Axel Kohlmeyer
2025-02-16 22:43:28 -05:00
parent 89abf65751
commit 9f02f20023
9 changed files with 411 additions and 5 deletions

View File

@ -21,6 +21,7 @@
#include "group.h"
#include "memory.h"
#include "modify.h"
#include "update.h"
using namespace LAMMPS_NS;
@ -30,7 +31,7 @@ ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) :
ComputeChunk(lmp, narg, arg), id_fix(nullptr), fix(nullptr), massproc(nullptr),
masstotal(nullptr), com(nullptr), comall(nullptr), msd(nullptr)
{
if (narg != 4) error->all(FLERR, "Illegal compute msd/chunk command");
if (narg != 4) error->all(FLERR, "Incorrect number of arguments for compute msd/chunk");
msdnchunk = 0;
array_flag = 1;
@ -114,6 +115,8 @@ void ComputeMSDChunk::setup()
void ComputeMSDChunk::compute_array()
{
invoked_array = update->ntimestep;
int index;
double massone;
double unwrap[3];
@ -127,7 +130,7 @@ void ComputeMSDChunk::compute_array()
if (firstflag)
msdnchunk = nchunk;
else if (msdnchunk != nchunk)
error->all(FLERR, "Compute msd/chunk nchunk is not static");
error->all(FLERR, Error::NOLASTLINE, "Compute msd/chunk nchunk is not static");
// zero local per-chunk values