Merge branch 'master' of https://github.com/lammps/lammps into team_opt
This commit is contained in:
@ -211,7 +211,7 @@ $(VENV):
|
||||
@( \
|
||||
$(VIRTUALENV) -p $(PYTHON) $(VENV); \
|
||||
. $(VENV)/bin/activate; \
|
||||
pip install Sphinx==1.7.6; \
|
||||
pip install Sphinx; \
|
||||
deactivate;\
|
||||
)
|
||||
|
||||
|
||||
@ -30,7 +30,6 @@ This is the list of packages that may require additional steps.
|
||||
"KIM"_#kim,
|
||||
"KOKKOS"_#kokkos,
|
||||
"LATTE"_#latte,
|
||||
"MEAM"_#meam,
|
||||
"MESSAGE"_#message,
|
||||
"MSCG"_#mscg,
|
||||
"OPT"_#opt,
|
||||
@ -351,49 +350,6 @@ the compiler you use on your system to build LATTE.
|
||||
|
||||
:line
|
||||
|
||||
MEAM package :h4,link(meam)
|
||||
|
||||
NOTE: the use of the MEAM package is discouraged, as it has been
|
||||
superseded by the USER-MEAMC package, which is a direct translation of
|
||||
the Fortran code in the MEAM library to C++. The code in USER-MEAMC
|
||||
should be functionally equivalent to the MEAM package, fully supports
|
||||
use of "pair_style hybrid"_pair_hybrid.html (the MEAM package does
|
||||
not), and has optimizations that make it significantly faster than the
|
||||
MEAM package.
|
||||
|
||||
[CMake build]:
|
||||
|
||||
No additional settings are needed besides "-D PKG_MEAM=yes".
|
||||
|
||||
[Traditional make]:
|
||||
|
||||
Before building LAMMPS, you must build the MEAM library in lib/meam.
|
||||
You can build the MEAM library manually if you prefer; follow the
|
||||
instructions in lib/meam/README. You can also do it in one step from
|
||||
the lammps/src dir, using a command like these, which simply invoke
|
||||
the lib/meam/Install.py script with the specified args:
|
||||
|
||||
make lib-meam # print help message
|
||||
make lib-meam args="-m mpi" # build with default Fortran compiler compatible with your MPI library
|
||||
make lib-meam args="-m serial" # build with compiler compatible with "make serial" (GNU Fortran)
|
||||
make lib-meam args="-m ifort" # build with Intel Fortran compiler using Makefile.ifort :pre
|
||||
|
||||
NOTE: You should test building the MEAM library with both the Intel
|
||||
and GNU compilers to see if a simulation runs faster with one versus
|
||||
the other on your system.
|
||||
|
||||
The build should produce two files: lib/meam/libmeam.a and
|
||||
lib/meam/Makefile.lammps. The latter is copied from an existing
|
||||
Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with
|
||||
Fortran (MEAM library). Typically the two compilers used for LAMMPS
|
||||
and the MEAM library need to be consistent (e.g. both Intel or both
|
||||
GNU compilers). If necessary, you can edit/create a new
|
||||
lib/meam/Makefile.machine file for your system, which should define an
|
||||
EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine
|
||||
file.
|
||||
|
||||
:line
|
||||
|
||||
MESSAGE package :h4,link(message)
|
||||
|
||||
This package can optionally include support for messaging via sockets,
|
||||
|
||||
@ -41,7 +41,6 @@ packages:
|
||||
"KIM"_Build_extras.html#kim,
|
||||
"KOKKOS"_Build_extras.html#kokkos,
|
||||
"LATTE"_Build_extras.html#latte,
|
||||
"MEAM"_Build_extras.html#meam,
|
||||
"MESSAGE"_Build_extras.html#message,
|
||||
"MSCG"_Build_extras.html#mscg,
|
||||
"OPT"_Build_extras.html#opt,
|
||||
|
||||
@ -9990,25 +9990,25 @@ quote. :dd
|
||||
|
||||
Self-explanatory. :dd
|
||||
|
||||
{Unexpected end of AngleCoeffs section} :dt
|
||||
{Unexpected empty line in AngleCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of BondCoeffs section} :dt
|
||||
{Unexpected empty line in BondCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of DihedralCoeffs section} :dt
|
||||
{Unexpected empty line in DihedralCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of ImproperCoeffs section} :dt
|
||||
{Unexpected empty line in ImproperCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of PairCoeffs section} :dt
|
||||
{Unexpected empty line in PairCoeffs section} :dt
|
||||
|
||||
Read a blank line. :dd
|
||||
Read a blank line where there should be coefficient data. :dd
|
||||
|
||||
{Unexpected end of custom file} :dt
|
||||
|
||||
|
||||
@ -52,13 +52,14 @@ Lowercase directories :h4
|
||||
|
||||
accelerate: run with various acceleration options (OpenMP, GPU, Phi)
|
||||
airebo: polyethylene with AIREBO potential
|
||||
atm: Axilrod-Teller-Muto potential example
|
||||
balance: dynamic load balancing, 2d system
|
||||
body: body particles, 2d system
|
||||
cmap: CMAP 5-body contributions to CHARMM force field
|
||||
colloid: big colloid particles in a small particle solvent, 2d system
|
||||
comb: models using the COMB potential
|
||||
coreshell: core/shell model using CORESHELL package
|
||||
controller: use of fix controller as a thermostat
|
||||
coreshell: core/shell model using CORESHELL package
|
||||
crack: crack propagation in a 2d solid
|
||||
deposit: deposit atoms and molecules on a surface
|
||||
dipole: point dipolar particles, 2d system
|
||||
@ -70,10 +71,13 @@ friction: frictional contact of spherical asperities between 2d surfaces
|
||||
gcmc: Grand Canonical Monte Carlo (GCMC) via the fix gcmc command
|
||||
granregion: use of fix wall/region/gran as boundary on granular particles
|
||||
hugoniostat: Hugoniostat shock dynamics
|
||||
hyper: global and local hyperdynamics of diffusion on Pt surface
|
||||
indent: spherical indenter into a 2d solid
|
||||
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
|
||||
latte: examples for using fix latte for DFTB via the LATTE library
|
||||
meam: MEAM test for SiC and shear (same as shear examples)
|
||||
melt: rapid melt of 3d LJ system
|
||||
message: demos for LAMMPS client/server coupling with the MESSAGE package
|
||||
micelle: self-assembly of small lipid-like molecules into 2d bilayers
|
||||
min: energy minimization of 2d LJ melt
|
||||
mscg: parameterize a multi-scale coarse-graining (MSCG) model
|
||||
@ -88,6 +92,7 @@ pour: pouring of granular particles into a 3d box, then chute flow
|
||||
prd: parallel replica dynamics of vacancy diffusion in bulk Si
|
||||
python: using embedded Python in a LAMMPS input script
|
||||
qeq: use of the QEQ package for charge equilibration
|
||||
rdf-adf: computing radial and angle distribution functions for water
|
||||
reax: RDX and TATB models using the ReaxFF
|
||||
rigid: rigid bodies modeled as independent or coupled
|
||||
shear: sideways shear applied to 2d solid, with and without a void
|
||||
@ -95,6 +100,7 @@ snap: NVE dynamics for BCC tantalum crystal using SNAP potential
|
||||
srd: stochastic rotation dynamics (SRD) particles as solvent
|
||||
streitz: use of Streitz/Mintmire potential with charge equilibration
|
||||
tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si
|
||||
threebody: regression test input for a variety of manybody potentials
|
||||
vashishta: use of the Vashishta potential
|
||||
voronoi: Voronoi tesselation via compute voronoi/atom command :tb(s=:)
|
||||
|
||||
@ -131,8 +137,10 @@ COUPLE: examples of how to use LAMMPS as a library
|
||||
DIFFUSE: compute diffusion coefficients via several methods
|
||||
ELASTIC: compute elastic constants at zero temperature
|
||||
ELASTIC_T: compute elastic constants at finite temperature
|
||||
HEAT: compute thermal conductivity for LJ and water via fix ehex
|
||||
KAPPA: compute thermal conductivity via several methods
|
||||
MC: using LAMMPS in a Monte Carlo mode to relax the energy of a system
|
||||
SPIN: examples for features of the SPIN package
|
||||
USER: examples for USER packages and USER-contributed commands
|
||||
VISCOSITY: compute viscosity via several methods :tb(s=:)
|
||||
|
||||
|
||||
@ -15,8 +15,9 @@ compute ID group-ID coord/atom cstyle args ... :pre
|
||||
ID, group-ID are documented in "compute"_compute.html command :ulb,l
|
||||
coord/atom = style name of this compute command :l
|
||||
cstyle = {cutoff} or {orientorder} :l
|
||||
{cutoff} args = cutoff typeN
|
||||
{cutoff} args = cutoff \[group group2-ID\] typeN
|
||||
cutoff = distance within which to count coordination neighbors (distance units)
|
||||
group {group2-ID} = select group-ID to restrict which atoms to consider for coordination number (optional)
|
||||
typeN = atom type for Nth coordination count (see asterisk form below)
|
||||
{orientorder} args = orientorderID threshold
|
||||
orientorderID = ID of an orientorder/atom compute
|
||||
@ -28,6 +29,7 @@ cstyle = {cutoff} or {orientorder} :l
|
||||
compute 1 all coord/atom cutoff 2.0
|
||||
compute 1 all coord/atom cutoff 6.0 1 2
|
||||
compute 1 all coord/atom cutoff 6.0 2*4 5*8 *
|
||||
compute 1 solute coord/atom cutoff 2.0 group solvent
|
||||
compute 1 all coord/atom orientorder 2 0.5 :pre
|
||||
|
||||
[Description:]
|
||||
@ -38,9 +40,14 @@ meaning of the resulting value depend on the {cstyle} keyword used.
|
||||
|
||||
The {cutoff} cstyle calculates one or more traditional coordination
|
||||
numbers for each atom. A coordination number is defined as the number
|
||||
of neighbor atoms with specified atom type(s) that are within the
|
||||
specified cutoff distance from the central atom. Atoms not in the
|
||||
specified group are included in the coordination number tally.
|
||||
of neighbor atoms with specified atom type(s), and optionally within
|
||||
the specified group, that are within the specified cutoff distance from
|
||||
the central atom. The compute group selects only the central atoms; all
|
||||
neighboring atoms, unless selected by type, type range, or group option,
|
||||
are included in the coordination number tally.
|
||||
|
||||
The optional {group} keyword allows to specify from which group atoms
|
||||
contribute to the coordination number. Default setting is group 'all'.
|
||||
|
||||
The {typeN} keywords allow specification of which atom types
|
||||
contribute to each coordination number. One coordination number is
|
||||
@ -122,7 +129,9 @@ explained above.
|
||||
"compute cluster/atom"_compute_cluster_atom.html
|
||||
"compute orientorder/atom"_compute_orientorder_atom.html
|
||||
|
||||
[Default:] none
|
||||
[Default:]
|
||||
|
||||
group = all
|
||||
|
||||
:line
|
||||
|
||||
|
||||
@ -2708,6 +2708,7 @@ Thiaville
|
||||
Thibaudeau
|
||||
Thijsse
|
||||
Thirumalai
|
||||
threebody
|
||||
thrid
|
||||
ThunderX
|
||||
thylakoid
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
This directory contains 4 input scripts for carrying out NEMD
|
||||
simulations of thermal gradients for a Lennard-Jones fluid and SPC/E
|
||||
water using the HEX/a (fix heat) and eHEX/a (fix ehex) algorithms.
|
||||
water using the HEX/a (fix ehex w/ hex option) and eHEX/a (fix ehex) algorithms.
|
||||
|
||||
All input scripts are part of the supplementary (open access) material
|
||||
supporting the publication of Wirnsberger et al. [J. Chem. Phys. 143,
|
||||
|
||||
@ -64,37 +64,37 @@ balance: dynamic load balancing, 2d system
|
||||
body: body particles, 2d system
|
||||
cmap: CMAP 5-body contributions to CHARMM force field
|
||||
colloid: big colloid particles in a small particle solvent, 2d system
|
||||
comb: models using the COMB potential
|
||||
comb: models using the COMB potential
|
||||
coreshell: adiabatic core/shell model
|
||||
controller: use of fix controller as a thermostat
|
||||
crack: crack propagation in a 2d solid
|
||||
crack: crack propagation in a 2d solid
|
||||
deposit: deposition of atoms and molecules onto a 3d substrate
|
||||
dipole: point dipolar particles, 2d system
|
||||
dreiding: methanol via Dreiding FF
|
||||
eim: NaCl using the EIM potential
|
||||
ellipse: ellipsoidal particles in spherical solvent, 2d system
|
||||
flow: Couette and Poiseuille flow in a 2d channel
|
||||
flow: Couette and Poiseuille flow in a 2d channel
|
||||
friction: frictional contact of spherical asperities between 2d surfaces
|
||||
gcmc: Grand Canonical Monte Carlo (GCMC) via the fix gcmc command
|
||||
granregion: use of fix wall/region/gran as boundary on granular particles
|
||||
hugoniostat: Hugoniostat shock dynamics
|
||||
hyper: global and local hyperdynamics of diffusion on Pt surface
|
||||
indent: spherical indenter into a 2d solid
|
||||
indent: spherical indenter into a 2d solid
|
||||
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
|
||||
latte: use of LATTE density-functional tight-binding quantum code
|
||||
meam: MEAM test for SiC and shear (same as shear examples)
|
||||
melt: rapid melt of 3d LJ system
|
||||
meam: MEAM test for SiC and shear (same as shear examples)
|
||||
melt: rapid melt of 3d LJ system
|
||||
message: client/server coupling of 2 codes
|
||||
micelle: self-assembly of small lipid-like molecules into 2d bilayers
|
||||
min: energy minimization of 2d LJ melt
|
||||
min: energy minimization of 2d LJ melt
|
||||
mscg: parameterize a multi-scale coarse-graining (MSCG) model
|
||||
msst: MSST shock dynamics
|
||||
msst: MSST shock dynamics
|
||||
nb3b: use of nonbonded 3-body harmonic pair style
|
||||
neb: nudged elastic band (NEB) calculation for barrier finding
|
||||
nemd: non-equilibrium MD of 2d sheared system
|
||||
neb: nudged elastic band (NEB) calculation for barrier finding
|
||||
nemd: non-equilibrium MD of 2d sheared system
|
||||
obstacle: flow around two voids in a 2d channel
|
||||
peptide: dynamics of a small solvated peptide chain (5-mer)
|
||||
peri: Peridynamic model of cylinder impacted by indenter
|
||||
peri: Peridynamic model of cylinder impacted by indenter
|
||||
pour: pouring of granular particles into a 3d box, then chute flow
|
||||
prd: parallel replica dynamics of vacancy diffusion in bulk Si
|
||||
python: use of PYTHON package to invoke Python code from input script
|
||||
@ -107,6 +107,7 @@ srd: stochastic rotation dynamics (SRD) particles as solvent
|
||||
snap: NVE dynamics for BCC tantalum crystal using SNAP potential
|
||||
streitz: Streitz-Mintmire potential for Al2O3
|
||||
tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si
|
||||
threebody: regression test input for a variety of manybody potentials
|
||||
vashishta: models using the Vashishta potential
|
||||
voronoi: Voronoi tesselation via compute voronoi/atom command
|
||||
|
||||
@ -117,9 +118,7 @@ cp ../../src/lmp_mpi . # copy LAMMPS executable to this dir
|
||||
lmp_mpi -in in.indent # run the problem
|
||||
|
||||
Running the simulation produces the files {dump.indent} and
|
||||
{log.lammps}. You can visualize the dump file as follows:
|
||||
|
||||
../../tools/xmovie/xmovie -scale dump.indent
|
||||
{log.lammps}.
|
||||
|
||||
If you uncomment the dump image line(s) in the input script a series
|
||||
of JPG images will be produced by the run. These can be viewed
|
||||
|
||||
@ -569,13 +569,13 @@ void PairEAMAlloyKokkos<DeviceType>::operator()(TagPairEAMAlloyKernelA<NEIGHFLAG
|
||||
d_rhor_spline(d_type2rhor_ji,m,5))*p + d_rhor_spline(d_type2rhor_ji,m,6);
|
||||
if (NEWTON_PAIR || j < nlocal) {
|
||||
const int d_type2rhor_ij = d_type2rhor(itype,jtype);
|
||||
rho[j] += ((d_rhor_spline(d_type2rhor_ij,m,3)*p + d_rhor_spline(d_type2rhor_ij,m,4))*p +
|
||||
a_rho[j] += ((d_rhor_spline(d_type2rhor_ij,m,3)*p + d_rhor_spline(d_type2rhor_ij,m,4))*p +
|
||||
d_rhor_spline(d_type2rhor_ij,m,5))*p + d_rhor_spline(d_type2rhor_ij,m,6);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
rho[i] += rhotmp;
|
||||
a_rho[i] += rhotmp;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -569,13 +569,13 @@ void PairEAMFSKokkos<DeviceType>::operator()(TagPairEAMFSKernelA<NEIGHFLAG,NEWTO
|
||||
d_rhor_spline(d_type2rhor_ji,m,5))*p + d_rhor_spline(d_type2rhor_ji,m,6);
|
||||
if (NEWTON_PAIR || j < nlocal) {
|
||||
const int d_type2rhor_ij = d_type2rhor(itype,jtype);
|
||||
rho[j] += ((d_rhor_spline(d_type2rhor_ij,m,3)*p + d_rhor_spline(d_type2rhor_ij,m,4))*p +
|
||||
a_rho[j] += ((d_rhor_spline(d_type2rhor_ij,m,3)*p + d_rhor_spline(d_type2rhor_ij,m,4))*p +
|
||||
d_rhor_spline(d_type2rhor_ij,m,5))*p + d_rhor_spline(d_type2rhor_ij,m,6);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
rho[i] += rhotmp;
|
||||
a_rho[i] += rhotmp;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -41,8 +41,6 @@ void PairREBOOMP::settings(int narg, char ** /* arg */)
|
||||
void PairREBOOMP::spline_init() {
|
||||
PairAIREBO::spline_init();
|
||||
|
||||
int i,j,k;
|
||||
|
||||
PCCf[0][2] = 0.007860700254745;
|
||||
PCCf[0][3] = 0.016125364564267;
|
||||
PCCf[1][1] = 0.003026697473481;
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#include "force.h"
|
||||
#include "pair.h"
|
||||
#include "comm.h"
|
||||
#include "group.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
@ -37,10 +38,12 @@ using namespace LAMMPS_NS;
|
||||
ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
Compute(lmp, narg, arg),
|
||||
typelo(NULL), typehi(NULL), cvec(NULL), carray(NULL),
|
||||
id_orientorder(NULL), normv(NULL)
|
||||
group2(NULL), id_orientorder(NULL), normv(NULL)
|
||||
{
|
||||
if (narg < 5) error->all(FLERR,"Illegal compute coord/atom command");
|
||||
|
||||
jgroup = group->find("all");
|
||||
jgroupbit = group->bitmask[jgroup];
|
||||
cstyle = NONE;
|
||||
|
||||
if (strcmp(arg[3],"cutoff") == 0) {
|
||||
@ -48,18 +51,29 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
double cutoff = force->numeric(FLERR,arg[4]);
|
||||
cutsq = cutoff*cutoff;
|
||||
|
||||
ncol = narg-5 + 1;
|
||||
int iarg = 5;
|
||||
if ((narg > 6) && (strcmp(arg[5],"group") == 0)) {
|
||||
int len = strlen(arg[6])+1;
|
||||
group2 = new char[len];
|
||||
strcpy(group2,arg[6]);
|
||||
iarg += 2;
|
||||
jgroup = group->find(group2);
|
||||
if (jgroup == -1)
|
||||
error->all(FLERR,"Compute coord/atom group2 ID does not exist");
|
||||
jgroupbit = group->bitmask[jgroup];
|
||||
}
|
||||
|
||||
ncol = narg-iarg + 1;
|
||||
int ntypes = atom->ntypes;
|
||||
typelo = new int[ncol];
|
||||
typehi = new int[ncol];
|
||||
|
||||
if (narg == 5) {
|
||||
if (narg == iarg) {
|
||||
ncol = 1;
|
||||
typelo[0] = 1;
|
||||
typehi[0] = ntypes;
|
||||
} else {
|
||||
ncol = 0;
|
||||
int iarg = 5;
|
||||
while (iarg < narg) {
|
||||
force->bounds(FLERR,arg[iarg],ntypes,typelo[ncol],typehi[ncol]);
|
||||
if (typelo[ncol] > typehi[ncol])
|
||||
@ -106,6 +120,7 @@ ComputeCoordAtom::ComputeCoordAtom(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
ComputeCoordAtom::~ComputeCoordAtom()
|
||||
{
|
||||
delete [] group2;
|
||||
delete [] typelo;
|
||||
delete [] typehi;
|
||||
memory->destroy(cvec);
|
||||
@ -143,12 +158,6 @@ void ComputeCoordAtom::init()
|
||||
neighbor->requests[irequest]->half = 0;
|
||||
neighbor->requests[irequest]->full = 1;
|
||||
neighbor->requests[irequest]->occasional = 1;
|
||||
|
||||
int count = 0;
|
||||
for (int i = 0; i < modify->ncompute; i++)
|
||||
if (strcmp(modify->compute[i]->style,"coord/atom") == 0) count++;
|
||||
if (count > 1 && comm->me == 0)
|
||||
error->warning(FLERR,"More than one compute coord/atom");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -229,13 +238,15 @@ void ComputeCoordAtom::compute_peratom()
|
||||
j = jlist[jj];
|
||||
j &= NEIGHMASK;
|
||||
|
||||
jtype = type[j];
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
if (rsq < cutsq && jtype >= typelo[0] && jtype <= typehi[0])
|
||||
n++;
|
||||
if (mask[j] & jgroupbit) {
|
||||
jtype = type[j];
|
||||
delx = xtmp - x[j][0];
|
||||
dely = ytmp - x[j][1];
|
||||
delz = ztmp - x[j][2];
|
||||
rsq = delx*delx + dely*dely + delz*delz;
|
||||
if (rsq < cutsq && jtype >= typelo[0] && jtype <= typehi[0])
|
||||
n++;
|
||||
}
|
||||
}
|
||||
|
||||
cvec[i] = n;
|
||||
|
||||
@ -45,6 +45,9 @@ class ComputeCoordAtom : public Compute {
|
||||
double *cvec;
|
||||
double **carray;
|
||||
|
||||
char *group2;
|
||||
int jgroup,jgroupbit;
|
||||
|
||||
class ComputeOrientOrderAtom *c_orientorder;
|
||||
char *id_orientorder;
|
||||
double threshold;
|
||||
@ -94,8 +97,4 @@ E: Compute coord/atom cutoff is longer than pairwise cutoff
|
||||
Cannot compute coordination at distances longer than the pair cutoff,
|
||||
since those atoms are not in the neighbor list.
|
||||
|
||||
W: More than one compute coord/atom
|
||||
|
||||
It is not efficient to use compute coord/atom more than once.
|
||||
|
||||
*/
|
||||
|
||||
@ -1768,7 +1768,8 @@ void ReadData::paircoeffs()
|
||||
next = strchr(buf,'\n');
|
||||
*next = '\0';
|
||||
parse_coeffs(buf,NULL,1,2,toffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of PairCoeffs section");
|
||||
if (narg == 0)
|
||||
error->all(FLERR,"Unexpected empty line in PairCoeffs section");
|
||||
force->pair->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1794,7 +1795,8 @@ void ReadData::pairIJcoeffs()
|
||||
next = strchr(buf,'\n');
|
||||
*next = '\0';
|
||||
parse_coeffs(buf,NULL,0,2,toffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of PairCoeffs section");
|
||||
if (narg == 0)
|
||||
error->all(FLERR,"Unexpected empty line in PairCoeffs section");
|
||||
force->pair->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1818,7 +1820,8 @@ void ReadData::bondcoeffs()
|
||||
next = strchr(buf,'\n');
|
||||
*next = '\0';
|
||||
parse_coeffs(buf,NULL,0,1,boffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of BondCoeffs section");
|
||||
if (narg == 0)
|
||||
error->all(FLERR,"Unexpected empty line in BondCoeffs section");
|
||||
force->bond->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1844,7 +1847,7 @@ void ReadData::anglecoeffs(int which)
|
||||
if (which == 0) parse_coeffs(buf,NULL,0,1,aoffset);
|
||||
else if (which == 1) parse_coeffs(buf,"bb",0,1,aoffset);
|
||||
else if (which == 2) parse_coeffs(buf,"ba",0,1,aoffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of AngleCoeffs section");
|
||||
if (narg == 0) error->all(FLERR,"Unexpected empty line in AngleCoeffs section");
|
||||
force->angle->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1873,7 +1876,8 @@ void ReadData::dihedralcoeffs(int which)
|
||||
else if (which == 3) parse_coeffs(buf,"at",0,1,doffset);
|
||||
else if (which == 4) parse_coeffs(buf,"aat",0,1,doffset);
|
||||
else if (which == 5) parse_coeffs(buf,"bb13",0,1,doffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of DihedralCoeffs section");
|
||||
if (narg == 0)
|
||||
error->all(FLERR,"Unexpected empty line in DihedralCoeffs section");
|
||||
force->dihedral->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -1898,7 +1902,7 @@ void ReadData::impropercoeffs(int which)
|
||||
*next = '\0';
|
||||
if (which == 0) parse_coeffs(buf,NULL,0,1,ioffset);
|
||||
else if (which == 1) parse_coeffs(buf,"aa",0,1,ioffset);
|
||||
if (narg == 0) error->all(FLERR,"Unexpected end of ImproperCoeffs section");
|
||||
if (narg == 0) error->all(FLERR,"Unexpected empty line in ImproperCoeffs section");
|
||||
force->improper->coeff(narg,arg);
|
||||
buf = next + 1;
|
||||
}
|
||||
@ -2092,6 +2096,10 @@ void ReadData::parse_coeffs(char *line, const char *addstr,
|
||||
word = strtok(NULL," \t\n\r\f");
|
||||
}
|
||||
|
||||
// to avoid segfaults on empty lines
|
||||
|
||||
if (narg == 0) return;
|
||||
|
||||
if (noffset) {
|
||||
int value = force->inumeric(FLERR,arg[0]);
|
||||
sprintf(argoffset1,"%d",value+offset);
|
||||
|
||||
@ -533,25 +533,25 @@ E: Too many lines in one body in data file - boost MAXBODY
|
||||
MAXBODY is a setting at the top of the src/read_data.cpp file.
|
||||
Set it larger and re-compile the code.
|
||||
|
||||
E: Unexpected end of PairCoeffs section
|
||||
E: Unexpected empty line in PairCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Unexpected end of BondCoeffs section
|
||||
E: Unexpected empty line in BondCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Unexpected end of AngleCoeffs section
|
||||
E: Unexpected empty line in AngleCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Unexpected end of DihedralCoeffs section
|
||||
E: Unexpected empty line in DihedralCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Unexpected end of ImproperCoeffs section
|
||||
E: Unexpected empty line in ImproperCoeffs section
|
||||
|
||||
Read a blank line.
|
||||
Read a blank line where there should be coefficient data.
|
||||
|
||||
E: Cannot open gzipped file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user