Replace Atom::count_words with utils::count_words

This commit is contained in:
Richard Berger
2020-05-15 16:18:24 -04:00
parent db46521d64
commit 4a2d3e95cb
56 changed files with 135 additions and 150 deletions

View File

@ -25,6 +25,7 @@
#include "sna.h"
#include "memory.h"
#include "error.h"
#include "utils.h"
using namespace LAMMPS_NS;
@ -526,7 +527,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
// strip comment, skip line if blank
if ((ptr = strchr(line,'#'))) *ptr = '\0';
nwords = atom->count_words(line);
nwords = utils::count_words(line);
}
if (nwords != 2)
error->all(FLERR,"Incorrect format in SNAP coefficient file");
@ -567,7 +568,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
MPI_Bcast(&n,1,MPI_INT,0,world);
MPI_Bcast(line,n,MPI_CHAR,0,world);
nwords = atom->count_words(line);
nwords = utils::count_words(line);
if (nwords != 3)
error->all(FLERR,"Incorrect format in SNAP coefficient file");
@ -609,7 +610,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
MPI_Bcast(&n,1,MPI_INT,0,world);
MPI_Bcast(line,n,MPI_CHAR,0,world);
nwords = atom->count_words(line);
nwords = utils::count_words(line);
if (nwords != 1)
error->all(FLERR,"Incorrect format in SNAP coefficient file");
@ -666,7 +667,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
// strip comment, skip line if blank
if ((ptr = strchr(line,'#'))) *ptr = '\0';
nwords = atom->count_words(line);
nwords = utils::count_words(line);
if (nwords == 0) continue;
if (nwords != 2)