forked from lijiext/lammps
Merge pull request #622 from akohlmey/collected-small-fixes
Collected small fixes
This commit is contained in:
commit
f7a0a6eb70
|
@ -90,9 +90,14 @@ file specified by {qfile}. The file has the following format
|
|||
...
|
||||
Ntype chi eta gamma zeta qcore :pre
|
||||
|
||||
There is one line per atom type with the following parameters.
|
||||
There have to be parameters given for every atom type. Wildcard entries
|
||||
are possible using the same syntax as elsewhere in LAMMPS
|
||||
(i.e., n*m, n*, *m, *). Later entries will overwrite previous ones.
|
||||
Empty lines or any text following the pound sign (#) are ignored.
|
||||
Each line starts with the atom type followed by five parameters.
|
||||
Only a subset of the parameters is used by each QEq style as described
|
||||
below, thus the others can be set to 0.0 if desired.
|
||||
below, thus the others can be set to 0.0 if desired, but all five
|
||||
entries per line are required.
|
||||
|
||||
{chi} = electronegativity in energy units
|
||||
{eta} = self-Coulomb potential in energy units
|
||||
|
|
|
@ -50,17 +50,17 @@ fix ees_cube all wall/region/ees myCube 1.0 1.0 2.5 :pre
|
|||
Fix {wall/ees} bounds the simulation domain on one or more of its
|
||||
faces with a flat wall that interacts with the ellipsoidal atoms in the
|
||||
group by generating a force on the atom in a direction perpendicular to
|
||||
the wall and a torque parallel with the wall. The energy of
|
||||
the wall and a torque parallel with the wall. The energy of
|
||||
wall-particle interactions E is given by:
|
||||
|
||||
:c,image(Eqs/fix_wall_ees.jpg)
|
||||
|
||||
Introduced by Babadi and Ejtehadi in "(Babadi)"_#BabadiEjtehadi. Here,
|
||||
{r} is the distance from the particle to the wall at position {coord},
|
||||
and Rc is the {cutoff} distance at which the particle and wall no
|
||||
longer interact. Also, sigma_n is the distance between center of
|
||||
ellipsoid and the nearest point of its surface to the wall The energy
|
||||
of the wall (see the image below).
|
||||
and Rc is the {cutoff} distance at which the particle and wall no
|
||||
longer interact. Also, sigma_n is the distance between center of
|
||||
ellipsoid and the nearest point of its surface to the wall. The energy
|
||||
of the wall is:
|
||||
|
||||
:c,image(JPG/fix_wall_ees_image.jpg)
|
||||
|
||||
|
@ -68,21 +68,22 @@ Details of using this command and specifications are the same as
|
|||
fix/wall command. You can also find an example in USER/ees/ under
|
||||
examples/ directory.
|
||||
|
||||
The prefactor {epsilon} can be thought of as an
|
||||
effective Hamaker constant with energy units for the strength of the
|
||||
ellipsoid-wall interaction. More specifically, the {epsilon} pre-factor
|
||||
= 8 * pi^2 * rho_wall * rho_ellipsoid * epsilon
|
||||
* sigma_a * sigma_b * sigma_c, where epsilon is the LJ parameters for
|
||||
the constituent LJ particles and sigma_a, sigma_b, and sigma_c are radii
|
||||
of ellipsoidal particles. Rho_wall and rho_ellipsoid are the number
|
||||
The prefactor {epsilon} can be thought of as an
|
||||
effective Hamaker constant with energy units for the strength of the
|
||||
ellipsoid-wall interaction. More specifically, the {epsilon} pre-factor
|
||||
= 8 * pi^2 * rho_wall * rho_ellipsoid * epsilon
|
||||
* sigma_a * sigma_b * sigma_c, where epsilon is the LJ parameters for
|
||||
the constituent LJ particles and sigma_a, sigma_b, and sigma_c are radii
|
||||
of ellipsoidal particles. Rho_wall and rho_ellipsoid are the number
|
||||
density of the constituent particles, in the wall and ellipsoid
|
||||
respectively, in units of 1/volume.
|
||||
|
||||
NOTE: You must insure that r is always bigger than sigma_n for
|
||||
all particles in the group, or LAMMPS will generate an error. This
|
||||
all particles in the group, or LAMMPS will generate an error. This
|
||||
means you cannot start your simulation with particles touching the wall
|
||||
position {coord} (r = sigma_n) or with particles penetrating the wall (0 =< r < sigma_n) or with particles on the wrong side of the
|
||||
wall (r < 0).
|
||||
position {coord} (r = sigma_n) or with particles penetrating the wall
|
||||
(0 =< r < sigma_n) or with particles on the wrong side of the
|
||||
wall (r < 0).
|
||||
|
||||
|
||||
Fix {wall/region/ees} treats the surface of the geometric region defined
|
||||
|
@ -93,7 +94,7 @@ Other details of this command are the same as for the "fix
|
|||
wall/region"_fix_wall_region.html command. One may also find an example
|
||||
of using this fix in the examples/USER/misc/ees/ directory.
|
||||
|
||||
[Restrictions:]
|
||||
[Restrictions:]
|
||||
|
||||
This fix is part of the USER-MISC package. It is only enabled if
|
||||
LAMMPS was built with that package. See the "Making
|
||||
|
|
|
@ -21,6 +21,7 @@ Section_python.html
|
|||
Section_errors.html
|
||||
Section_history.html
|
||||
|
||||
tutorial_bash_on_windows.html
|
||||
tutorial_drude.html
|
||||
tutorial_github.html
|
||||
tutorial_pylammps.html
|
||||
|
|
|
@ -9,8 +9,8 @@ import sys,os,subprocess
|
|||
# help message
|
||||
|
||||
help = """
|
||||
Syntax from src dir: make lib-gpu args="-m machine -h hdir -a arch -p precision -e esuffix -m -o osuffix"
|
||||
Syntax from lib dir: python Install.py -m machine -h hdir -a arch -p precision -e esuffix -m -o osuffix
|
||||
Syntax from src dir: make lib-gpu args="-m machine -h hdir -a arch -p precision -e esuffix -b -o osuffix"
|
||||
Syntax from lib dir: python Install.py -m machine -h hdir -a arch -p precision -e esuffix -b -o osuffix
|
||||
|
||||
specify one or more options, order does not matter
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
/intel_buffers.cpp
|
||||
/intel_buffers.h
|
||||
/intel_intrinsics.h
|
||||
/intel_intrinsics_airebo.h
|
||||
/intel_preprocess.h
|
||||
/intel_simd.h
|
||||
|
||||
|
|
|
@ -692,11 +692,13 @@ void FixQEq::vector_add( double* dest, double c, double* v, int k )
|
|||
|
||||
void FixQEq::read_file(char *file)
|
||||
{
|
||||
int itype,ntypes;
|
||||
int i;
|
||||
int params_per_line = 6;
|
||||
char **words = new char*[params_per_line+1];
|
||||
|
||||
ntypes = atom->ntypes;
|
||||
int ntypes = atom->ntypes;
|
||||
int *setflag = new int[ntypes+1];
|
||||
for (i=0; i < params_per_line; ++i) setflag[i] = 0;
|
||||
|
||||
memory->create(chi,ntypes+1,"qeq:chi");
|
||||
memory->create(eta,ntypes+1,"qeq:eta");
|
||||
|
@ -719,10 +721,10 @@ void FixQEq::read_file(char *file)
|
|||
// read each line out of file, skipping blank lines or leading '#'
|
||||
// store line of params if all 3 element tags are in element list
|
||||
|
||||
int n,nwords,ielement,eof;
|
||||
int n,nwords,eof,nlo,nhi;
|
||||
char line[MAXLINE],*ptr;
|
||||
|
||||
eof = ielement = 0;
|
||||
eof = 0;
|
||||
|
||||
while (1) {
|
||||
if (comm->me == 0) {
|
||||
|
@ -737,28 +739,39 @@ void FixQEq::read_file(char *file)
|
|||
MPI_Bcast(&n,1,MPI_INT,0,world);
|
||||
MPI_Bcast(line,n,MPI_CHAR,0,world);
|
||||
|
||||
ielement ++;
|
||||
if (ielement > ntypes)
|
||||
error->all(FLERR,"Invalid fix qeq parameter file");
|
||||
|
||||
// strip comment, skip line if blank
|
||||
|
||||
if ((ptr = strchr(line,'#'))) *ptr = '\0';
|
||||
nwords = atom->count_words(line);
|
||||
if (nwords == 0) continue;
|
||||
|
||||
// words = ptrs to all words in line
|
||||
// must have 6 parameters per line.
|
||||
|
||||
nwords = 0;
|
||||
words[nwords++] = strtok(line," \t\n\r\f");
|
||||
while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue;
|
||||
if (nwords < 6)
|
||||
error->all(FLERR,"Invalid fix qeq parameter file");
|
||||
|
||||
itype = atoi(words[0]);
|
||||
chi[itype] = atof(words[1]);
|
||||
eta[itype] = atof(words[2]);
|
||||
gamma[itype] = atof(words[3]);
|
||||
zeta[itype] = atof(words[4]);
|
||||
zcore[itype] = atof(words[5]);
|
||||
// words = ptrs to first 6 words in line
|
||||
|
||||
for (n=0, words[n] = strtok(line," \t\n\r\f");
|
||||
n < 6;
|
||||
words[++n] = strtok(NULL," \t\n\r\f"));
|
||||
|
||||
force->bounds(FLERR,words[0],ntypes,nlo,nhi);
|
||||
for (n=nlo; n <=nhi; ++n) {
|
||||
chi[n] = force->numeric(FLERR,words[1]);
|
||||
eta[n] = force->numeric(FLERR,words[2]);
|
||||
gamma[n] = force->numeric(FLERR,words[3]);
|
||||
zeta[n] = force->numeric(FLERR,words[4]);
|
||||
zcore[n] = force->numeric(FLERR,words[5]);
|
||||
setflag[n] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// check if all types are set
|
||||
for (n=1; n <= ntypes; ++n)
|
||||
if (setflag[n] == 0)
|
||||
error->all(FLERR,"Invalid fix qeq parameter file");
|
||||
|
||||
delete [] words;
|
||||
delete [] setflag;
|
||||
}
|
||||
|
|
|
@ -70,6 +70,9 @@ const int THIS_IS_A_BIGINT = -4;
|
|||
|
||||
#define NCERR(x) ncerr(x, NULL, __LINE__)
|
||||
#define NCERRX(x, descr) ncerr(x, descr, __LINE__)
|
||||
#if !defined(NC_64BIT_DATA)
|
||||
#define NC_64BIT_DATA NC_64BIT_OFFSET
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -70,6 +70,9 @@ const int THIS_IS_A_BIGINT = -4;
|
|||
|
||||
#define NCERR(x) ncerr(x, NULL, __LINE__)
|
||||
#define NCERRX(x, descr) ncerr(x, descr, __LINE__)
|
||||
#if !defined(NC_64BIT_DATA)
|
||||
#define NC_64BIT_DATA NC_64BIT_OFFSET
|
||||
#endif
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -1234,7 +1234,7 @@ void Molecule::shakeflag_read(char *line)
|
|||
|
||||
void Molecule::shakeatom_read(char *line)
|
||||
{
|
||||
int tmp, nmatch, nwant;
|
||||
int tmp, nmatch=0, nwant=0;
|
||||
for (int i = 0; i < natoms; i++) {
|
||||
readline(line);
|
||||
if (shake_flag[i] == 1) {
|
||||
|
@ -1277,7 +1277,7 @@ void Molecule::shakeatom_read(char *line)
|
|||
|
||||
void Molecule::shaketype_read(char *line)
|
||||
{
|
||||
int tmp,nmatch,nwant;
|
||||
int tmp, nmatch=0, nwant=0;
|
||||
for (int i = 0; i < natoms; i++) {
|
||||
readline(line);
|
||||
if (shake_flag[i] == 1) {
|
||||
|
|
Loading…
Reference in New Issue