forked from lijiext/lammps
Merge pull request #737 from akohlmey/collected-bugfixes
Collected bugfixes and small updates for next patch
This commit is contained in:
commit
bae45e2493
|
@ -36,9 +36,9 @@ keyword = {mol} or {basis} or {remap} or {var} or {set} or {units} :l
|
|||
{set} values = dim name
|
||||
dim = {x} or {y} or {z}
|
||||
name = name of variable to set with x, y, or z atom position
|
||||
{rotate} values = Rx Ry Rz theta
|
||||
Rx,Ry,Rz = rotation vector for single molecule
|
||||
{rotate} values = theta Rx Ry Rz
|
||||
theta = rotation angle for single molecule (degrees)
|
||||
Rx,Ry,Rz = rotation vector for single molecule
|
||||
{units} value = {lattice} or {box}
|
||||
{lattice} = the geometry is defined in lattice units
|
||||
{box} = the geometry is defined in simulation box units :pre
|
||||
|
@ -242,15 +242,15 @@ write_dump all atom sinusoid.lammpstrj :pre
|
|||
|
||||
:c,image(JPG/sinusoid_small.jpg,JPG/sinusoid.jpg)
|
||||
|
||||
The {rotate} keyword can be used with the {single} style, when adding
|
||||
a single molecule to specify the orientation at which the molecule is
|
||||
inserted. The axis of rotation is determined by the rotation vector
|
||||
(Rx,Ry,Rz) that goes through the insertion point. The specified
|
||||
{theta} determines the angle of rotation around that axis. Note that
|
||||
the direction of rotation for the atoms around the rotation axis is
|
||||
consistent with the right-hand rule: if your right-hand's thumb points
|
||||
along {R}, then your fingers wrap around the axis in the direction of
|
||||
rotation.
|
||||
The {rotate} keyword can only be used with the {single} style and
|
||||
when adding a single molecule. It allows to specify the orientation
|
||||
at which the molecule is inserted. The axis of rotation is
|
||||
determined by the rotation vector (Rx,Ry,Rz) that goes through the
|
||||
insertion point. The specified {theta} determines the angle of
|
||||
rotation around that axis. Note that the direction of rotation for
|
||||
the atoms around the rotation axis is consistent with the right-hand
|
||||
rule: if your right-hand's thumb points along {R}, then your fingers
|
||||
wrap around the axis in the direction of rotation.
|
||||
|
||||
The {units} keyword determines the meaning of the distance units used
|
||||
to specify the coordinates of the one particle created by the {single}
|
||||
|
|
|
@ -18,7 +18,7 @@ style = {many} or {single/bond} or {single/angle} or {single/dihedral} :ule,l
|
|||
group2-ID = ID of second group, bonds will be between atoms in the 2 groups
|
||||
btype = bond type of created bonds
|
||||
rmin = minimum distance between pair of atoms to bond together
|
||||
rmax = minimum distance between pair of atoms to bond together
|
||||
rmax = maximum distance between pair of atoms to bond together
|
||||
{single/bond} args = btype batom1 batom2
|
||||
btype = bond type of new bond
|
||||
batom1,batom2 = atom IDs for two atoms in bond
|
||||
|
|
|
@ -356,7 +356,7 @@ DenseMatrix<T> Matrix<T>::pow(double n) const
|
|||
int sz=this->size(); for(INDEX i=0; i<sz; i++)
|
||||
{
|
||||
double val = R[i];
|
||||
R[i] = pow(val,n);
|
||||
R[i] = std::pow(val,n);
|
||||
}
|
||||
return R;
|
||||
}
|
||||
|
|
10
src/Makefile
10
src/Makefile
|
@ -17,12 +17,12 @@ SHLINK = liblammps.so
|
|||
OBJDIR = Obj_$@
|
||||
OBJSHDIR = Obj_shared_$@
|
||||
|
||||
SRC = $(wildcard *.cpp)
|
||||
INC = $(wildcard *.h)
|
||||
SRC = $(filter-out library.cpp,$(wildcard *.cpp))
|
||||
INC = $(filter-out library.h,$(wildcard *.h))
|
||||
OBJ = $(SRC:.cpp=.o)
|
||||
|
||||
SRCLIB = $(filter-out main.cpp,$(SRC))
|
||||
OBJLIB = $(filter-out main.o,$(OBJ))
|
||||
SRCLIB = $(filter-out main.cpp,$(SRC)) library.cpp
|
||||
OBJLIB = $(filter-out main.o,$(OBJ)) library.o
|
||||
|
||||
# Command-line options for mode: exe (default), shexe, lib, shlib
|
||||
|
||||
|
@ -176,7 +176,7 @@ help:
|
|||
then cp Makefile.package.settings.empty Makefile.package.settings; fi
|
||||
@cp Makefile.package Makefile.package.settings $(objdir)
|
||||
@cd $(objdir); rm -f .depend; \
|
||||
$(MAKE) $(MFLAGS) "SRC = $(SRC)" "INC = $(INC)" depend || :
|
||||
$(MAKE) $(MFLAGS) "SRC = $(SRC) library.cpp" "INC = $(INC) library.h" depend || :
|
||||
ifeq ($(mode),exe)
|
||||
@cd $(objdir); \
|
||||
$(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" "SHFLAGS =" \
|
||||
|
|
|
@ -356,7 +356,7 @@ void FixNeighHistoryOMP::pre_exchange_newton()
|
|||
#endif
|
||||
{
|
||||
maxpartner = MAX(m,maxpartner);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,4*maxpartner+1);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,(dnum+1)*maxpartner+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ void ComputeMSDChunk::setup()
|
|||
|
||||
if (fix->nrow == nchunk && fix->ncol == 3) return;
|
||||
fix->reset_global(nchunk,3);
|
||||
|
||||
|
||||
double **cominit = fix->astore;
|
||||
for (int i = 0; i < nchunk; i++) {
|
||||
cominit[i][0] = comall[i][0];
|
||||
|
|
|
@ -63,6 +63,7 @@ FixAveChunk::FixAveChunk(LAMMPS *lmp, int narg, char **arg) :
|
|||
strcpy(idchunk,arg[6]);
|
||||
|
||||
global_freq = nfreq;
|
||||
peratom_freq = nfreq;
|
||||
no_change_box = 1;
|
||||
|
||||
// expand args if any have wildcard character "*"
|
||||
|
|
|
@ -35,7 +35,7 @@ enum{DEFAULT,NPARTNER,PERPARTNER}; // also set in fix neigh/history/omp
|
|||
|
||||
FixNeighHistory::FixNeighHistory(LAMMPS *lmp, int narg, char **arg) :
|
||||
Fix(lmp, narg, arg),
|
||||
npartner(NULL), partner(NULL), valuepartner(NULL), pair(NULL),
|
||||
npartner(NULL), partner(NULL), valuepartner(NULL), pair(NULL),
|
||||
ipage_atom(NULL), dpage_atom(NULL), ipage_neigh(NULL), dpage_neigh(NULL)
|
||||
{
|
||||
if (narg != 4) error->all(FLERR,"Illegal fix NEIGH_HISTORY command");
|
||||
|
@ -295,7 +295,7 @@ void FixNeighHistory::pre_exchange_onesided()
|
|||
|
||||
// set maxpartner = max # of partners of any owned atom
|
||||
// bump up comm->maxexchange_fix if necessary
|
||||
|
||||
|
||||
maxpartner = 0;
|
||||
for (i = 0; i < nlocal_neigh; i++) maxpartner = MAX(maxpartner,npartner[i]);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,(dnum+1)*maxpartner+1);
|
||||
|
@ -318,7 +318,7 @@ void FixNeighHistory::pre_exchange_newton()
|
|||
int *allflags;
|
||||
double *allvalues,*onevalues,*jvalues;
|
||||
|
||||
// NOTE: all operations until very end are with
|
||||
// NOTE: all operations until very end are with
|
||||
// nlocal_neigh <= current nlocal and nall_neigh
|
||||
// b/c previous neigh list was built with nlocal_neigh & nghost_neigh
|
||||
// nlocal can be larger if other fixes added atoms at this pre_exchange()
|
||||
|
@ -424,7 +424,7 @@ void FixNeighHistory::pre_exchange_newton()
|
|||
|
||||
maxpartner = 0;
|
||||
for (i = 0; i < nlocal_neigh; i++) maxpartner = MAX(maxpartner,npartner[i]);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,4*maxpartner+1);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,(dnum+1)*maxpartner+1);
|
||||
|
||||
// zero npartner values from previous nlocal_neigh to current nlocal
|
||||
|
||||
|
@ -526,7 +526,7 @@ void FixNeighHistory::pre_exchange_no_newton()
|
|||
|
||||
// set maxpartner = max # of partners of any owned atom
|
||||
// bump up comm->maxexchange_fix if necessary
|
||||
|
||||
|
||||
maxpartner = 0;
|
||||
for (i = 0; i < nlocal_neigh; i++) maxpartner = MAX(maxpartner,npartner[i]);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,(dnum+1)*maxpartner+1);
|
||||
|
@ -571,9 +571,9 @@ void FixNeighHistory::post_neighbor()
|
|||
memory->sfree(firstflag);
|
||||
memory->sfree(firstvalue);
|
||||
maxatom = nall;
|
||||
firstflag = (int **)
|
||||
firstflag = (int **)
|
||||
memory->smalloc(maxatom*sizeof(int *),"neighbor_history:firstflag");
|
||||
firstvalue = (double **)
|
||||
firstvalue = (double **)
|
||||
memory->smalloc(maxatom*sizeof(double *),"neighbor_history:firstvalue");
|
||||
}
|
||||
|
||||
|
@ -720,7 +720,7 @@ int FixNeighHistory::pack_reverse_comm_size(int n, int first)
|
|||
last = first + n;
|
||||
|
||||
for (i = first; i < last; i++)
|
||||
m += 1 + 4*npartner[i];
|
||||
m += 1 + (dnum+1)*npartner[i];
|
||||
|
||||
return m;
|
||||
}
|
||||
|
|
|
@ -155,8 +155,7 @@ void FixStore::reset_global(int nrow_caller, int ncol_caller)
|
|||
else memory->create(astore,nrow,ncol,"fix/store:astore");
|
||||
memory->create(rbuf,nrow*ncol+2,"fix/store:rbuf");
|
||||
|
||||
|
||||
printf("AAA HOW GET HERE\n");
|
||||
// printf("AAA HOW GET HERE\n");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue