Unverified Commit a66d4c74 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1186 from akohlmey/various-small-fixes

Various small fixes
parents 1fccb391 75148387
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -193,6 +193,8 @@ if(PKG_MEAM OR PKG_USER-H5MD OR PKG_USER-QMMM OR PKG_USER-SCAFACOS)
  enable_language(C)
endif()

include_directories(${LAMMPS_SOURCE_DIR})

# do MPI detection after language activation, if MPI for these language is required
find_package(MPI QUIET)
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
@@ -1166,7 +1168,6 @@ set(LAMMPS_STYLE_HEADERS_DIR ${CMAKE_CURRENT_BINARY_DIR}/styles)

GenerateStyleHeaders(${LAMMPS_STYLE_HEADERS_DIR})

include_directories(${LAMMPS_SOURCE_DIR})
include_directories(${LAMMPS_STYLE_HEADERS_DIR})

######################################
+0 −2
Original line number Diff line number Diff line
@@ -78,7 +78,6 @@ def geturl(url,fname):

  if which('curl') != None:
    cmd = 'curl -L -o "%s" %s' % (fname,url)
    print(cmd)
    try:
      subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
      success = True
@@ -87,7 +86,6 @@ def geturl(url,fname):

  if not success and which('wget') != None:
    cmd = 'wget -O "%s" %s' % (fname,url)
    print(cmd)
    try:
      subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
      success = True
+2 −0
Original line number Diff line number Diff line
@@ -1477,8 +1477,10 @@ void CommBrick::free_multi()

void *CommBrick::extract(const char *str, int &dim)
{
  dim = 0;
  if (strcmp(str,"localsendlist") == 0) {
    int i, iswap, isend;
    dim = 1;
    if (!localsendlist)
      memory->create(localsendlist,atom->nlocal,"comm:localsendlist");
    else
+12 −11
Original line number Diff line number Diff line
@@ -46,14 +46,17 @@ enum{DEGREE, RADIAN, COSINE};
ComputeADF::ComputeADF(LAMMPS *lmp, int narg, char **arg) :
  Compute(lmp, narg, arg),
  ilo(NULL), ihi(NULL), jlo(NULL), jhi(NULL), klo(NULL), khi(NULL), 
  iatomcount(NULL), iatomcountall(NULL), 
  hist(NULL), histall(NULL),
  iatomflag(NULL), 
  jatomflag(NULL), rcutinnerj(NULL), rcutouterj(NULL), 
  katomflag(NULL), rcutinnerk(NULL), rcutouterk(NULL),
  maxjatom(NULL), numjatom(NULL), neighjatom(NULL), 
  maxkatom(NULL), numkatom(NULL), neighkatom(NULL), 
  maxjkatom(NULL), numjkatom(NULL), neighjkatom(NULL), bothjkatom(NULL)
  rcutinnerj(NULL), rcutinnerk(NULL),
  rcutouterj(NULL), rcutouterk(NULL),
  list(NULL),
  iatomcount(NULL), iatomcountall(NULL), iatomflag(NULL),
  maxjatom(NULL), maxkatom(NULL),
  numjatom(NULL), numkatom(NULL),
  neighjatom(NULL),neighkatom(NULL), 
  jatomflag(NULL), katomflag(NULL),
  maxjkatom(NULL), numjkatom(NULL),
  neighjkatom(NULL), bothjkatom(NULL), delrjkatom(NULL)
{
  int nargsperadf = 7;

@@ -358,9 +361,9 @@ void ComputeADF::init_list(int /*id*/, NeighList *ptr)
void ComputeADF::compute_array()
{
  int i,j,k,m,ii,jj,jatom,katom,jk,jjj,kkk;
  int inum,jnum,itype,jtype,ibin,ihisto;
  int inum,jnum,itype,jtype,ibin;
  double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
  int *ilist,*jlist,*klist,*numneigh,**firstneigh;
  int *ilist,*jlist,*numneigh,**firstneigh;
  double factor_lj,factor_coul;
  double delr1[3],delr2[3],rinv1,rinv2,rinv12,cs,theta;

@@ -394,11 +397,9 @@ void ComputeADF::compute_array()
  double **x = atom->x;
  int *type = atom->type;
  int *mask = atom->mask;
  int nlocal = atom->nlocal;

  double *special_coul = force->special_coul;
  double *special_lj = force->special_lj;
  int newton_pair = force->newton_pair;

  for (ii = 0; ii < inum; ii++) {
    i = ilist[ii];
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ enum{THETA,ENG,VARIABLE};

ComputeAngleLocal::ComputeAngleLocal(LAMMPS *lmp, int narg, char **arg) :
  Compute(lmp, narg, arg),
  bstyle(NULL), vstr(NULL), vvar(NULL), tstr(NULL), vlocal(NULL), alocal(NULL)
  bstyle(NULL), vvar(NULL), tstr(NULL), vstr(NULL), vlocal(NULL), alocal(NULL)
{
  if (narg < 4) error->all(FLERR,"Illegal compute angle/local command");

Loading