Compare commits

...

28 Commits

Author SHA1 Message Date
9954d5d346 forgot pair table change 2016-10-19 10:47:07 -06:00
3d254780de Merge branch 'master' of github.com:lammps/lammps 2016-10-19 08:58:22 -06:00
b0cf1ded38 Merge pull request #229 from akohlmey/small-corrections
collected various small corrections and updates
2016-10-19 08:57:54 -06:00
0891ed83a5 Merge pull request #228 from akohlmey/correct-prd-for-bigbig
make PRD code compatible with -DLAMMPS_BIGBIG
2016-10-19 08:56:19 -06:00
ffb8eb36da Revert "recognize any word starting with FP as FPRIME style table"
This reverts commit 86f5b51133.
2016-10-19 10:44:38 -04:00
1a10857244 make PRD code compatible with -DLAMMPS_BIGBIG 2016-10-19 10:43:25 -04:00
2634468676 dead code removal 2016-10-19 10:42:02 -04:00
58141e0559 text edit 2016-10-19 08:41:44 -06:00
393337e7cf Merge pull request #226 from akohlmey/pair-gauss-mixing
add mixing support for pair styles gauss and gauss/cut
2016-10-19 08:37:32 -06:00
e0ed218cc4 Merge pull request #224 from akohlmey/get-vars
provide an accessor for names of LAMMPS variables
2016-10-19 08:36:52 -06:00
efc7b23bd8 Merge pull request #216 from akohlmey/user-nc-dump
USER-NC-DUMP package
2016-10-19 08:33:59 -06:00
566effc9c9 account for new fix halt properly in PDF and online docs 2016-10-19 09:08:20 -04:00
86f5b51133 recognize any word starting with FP as FPRIME style table 2016-10-19 09:05:25 -04:00
ccca642b3a fix typo 2016-10-19 08:08:52 -04:00
019bc0ba0b fix typos in Makefile.lammps for NetCDF support 2016-10-19 07:39:03 -04:00
7b7cb297e6 add mixing for pair styles gauss and gauss/cut contributed by andrew jewett. also add support for write_data. 2016-10-18 22:26:47 -04:00
5a6dea7a22 Merge branch 'master' into user-nc-dump 2016-10-18 15:36:18 -04:00
27796b431e avoid distracting error output 2016-10-18 15:32:20 -04:00
6e54443d8c make plain nc dump style a compile time option as well
according to the package author, lars pastewka, some machines
may have only parallel netcdf and not the serial netcdf installed.
hence both netcdf dump styles neet to be optional depending on
the compile time setting in lib/netcdf/Makefile.lammps
The makefile has been set up to auto-detect the necessary flags
for most regular and correct installations.
2016-10-18 15:11:22 -04:00
2b47fa6653 update Makefile.lammps and add README according to suggestions by lars pastewka 2016-10-18 15:05:30 -04:00
ae77664bdd forgot to include USER-NC-DUMP in PACKUSER variable 2016-10-18 14:45:25 -04:00
4502d3276b updated Makefile.lammps for NetCDF support based on suggestions from lars pastewka 2016-10-18 14:45:06 -04:00
c5513c4f75 provide an accessor for names of LAMMPS variables 2016-10-17 19:56:18 -04:00
2e8edbd2b9 USER-SMD was missing from PACKLIB variable 2016-10-12 06:53:37 -04:00
da66c1e649 update #include directives to match current LAMMPS coding conventions 2016-10-12 00:07:52 -04:00
e10ea91c5f add doc file to toctree 2016-10-11 23:51:42 -04:00
69cb831705 import dump nc and dump nc/mpiio from lammps-netcdf as USER-NC-DUMP package by lars pastewka 2016-10-11 23:44:34 -04:00
ecb03dd2df import lammps-netcdf code as USER-NC-DUMP package 2016-10-11 23:03:18 -04:00
37 changed files with 2973 additions and 76 deletions

View File

@ -1,7 +1,7 @@
<!-- HTML_ONLY -->
<HEAD>
<TITLE>LAMMPS Users Manual</TITLE>
<META NAME="docnumber" CONTENT="18 Oct 2016 version">
<META NAME="docnumber" CONTENT="19 Oct 2016 version">
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
</HEAD>
@ -21,7 +21,7 @@
<H1></H1>
LAMMPS Documentation :c,h3
18 Oct 2016 version :c,h4
19 Oct 2016 version :c,h4
Version info: :h4

View File

@ -528,6 +528,8 @@ These are additional commands in USER packages, which can be used if
package"_Section_start.html#start_3.
"dump custom/vtk"_dump_custom_vtk.html,
"dump nc"_dump_nc.html,
"dump nc/mpiio"_dump_nc.html,
"group2ndx"_group2ndx.html,
"ndx2group"_group2ndx.html :tb(c=3,ea=c)

View File

@ -1854,13 +1854,19 @@ internal LAMMPS operations. Note that LAMMPS classes are defined
within a LAMMPS namespace (LAMMPS_NS) if you use them from another C++
application.
Library.cpp contains these 5 basic functions:
Library.cpp contains these functions for creating and destroying an
instance of LAMMPS and sending it commands to execute. See the
documentation in the src/library.cpp file for details:
void lammps_open(int, char **, MPI_Comm, void **)
void lammps_open_no_mpi(int, char **, void **)
void lammps_close(void *)
int lammps_version(void *)
void lammps_file(void *, char *)
char *lammps_command(void *, char *) :pre
char *lammps_command(void *, char *)
char *lammps_commands_list(void *, int, char **)
char *lammps_commands_concatenated(void *, char *)
void lammps_free(void *) :pre
The lammps_open() function is used to initialize LAMMPS, passing in a
list of strings as if they were "command-line
@ -1880,6 +1886,10 @@ half to the other code and run both codes simultaneously before
syncing them up periodically. Or it might instantiate multiple
instances of LAMMPS to perform different calculations.
The lammps_open_no_mpi() function is similar except that no MPI
communicator is passed from the caller. Instead, MPI_COMM_WORLD is
used to instantiate LAMMPS, and MPI is initialzed if necessary.
The lammps_close() function is used to shut down an instance of LAMMPS
and free all its memory.
@ -1891,16 +1901,33 @@ changes to the LAMMPS command syntax between versions. The returned
LAMMPS version code is an integer (e.g. 2 Sep 2015 results in
20150902) that grows with every new LAMMPS version.
The lammps_file() and lammps_command() functions are used to pass a
file or string to LAMMPS as if it were an input script or single
command in an input script. Thus the calling code can read or
generate a series of LAMMPS commands one line at a time and pass it
thru the library interface to setup a problem and then run it,
interleaving the lammps_command() calls with other calls to extract
information from LAMMPS, perform its own operations, or call another
The lammps_file(), lammps_command(), lammps_commands_list(),
lammps_commands_concatenated() functions are used to pass one or more
commands to LAMMPS to execute as if they were coming from an input
script.
The lammps_file() function passes the filename of an input script.
The lammps_command() function passes a single command as a string.
The lammps_commands_multiple() function passes multiple commands in a
char** list. The lammps_commands_concatentaed() function passes
multiple commands concatenated into one long string, separated by
newline characters. A single command can be spread across multiple
lines, if the last printable character of all but the last line is
"&", the same as if the lines appeared in an input script.
Via these library functions, the calling code can read or generate a
series of LAMMPS commands one or multiple at a time and pass it thru
the library interface to setup a problem and then run it, interleaving
the command function calls with operations performed within the
faller, calls to extract information from LAMMPS, or calls to another
code's library.
Other useful functions are also included in library.cpp. For example:
The lammps_free() is a clean-up function to free memory that the library
allocated previously.
Library.cpp also contains these functions for extracting information
from LAMMPS and setting value within LAMMPS. Again, see the
documentation in the src/library.cpp file for details:
void *lammps_extract_global(void *, char *)
void *lammps_extract_atom(void *, char *)
@ -1908,27 +1935,37 @@ void *lammps_extract_compute(void *, char *, int, int)
void *lammps_extract_fix(void *, char *, int, int, int, int)
void *lammps_extract_variable(void *, char *, char *)
int lammps_set_variable(void *, char *, char *)
double lammps_get_thermo(void *, char *)
int lammps_get_natoms(void *)
void lammps_get_coords(void *, double *)
void lammps_put_coords(void *, double *) :pre
void lammps_gather_atoms(void *, double *)
void lammps_scatter_atoms(void *, double *) :pre
These can extract various global or per-atom quantities from LAMMPS as
well as values calculated by a compute, fix, or variable. The
"set_variable" function can set an existing string-style variable to a
new value, so that subsequent LAMMPS commands can access the variable.
The "get" and "put" operations can retrieve and reset atom
coordinates. See the library.cpp file and its associated header file
library.h for details.
These functions can extract various global or per-atom quantities from
LAMMPS as well as values calculated by a compute, fix, or variable.
The lammps_set_variable() function can set an existing string-style variable
to a new value, so that subsequent LAMMPS commands can access the
variable. The lammps_get_thermo() function returns the current
value of a thermo keyword.
The key idea of the library interface is that you can write any
functions you wish to define how your code talks to LAMMPS and add
them to src/library.cpp and src/library.h, as well as to the "Python
The lammps_get_natoms() function returns the total number of atoms in
the system and can be used by the caller to allocate space for the
lammps_gather_atoms() and lammps_scatter_atoms() functions. The
gather function collects atom info of the requested type (atom coords,
types, forces, etc) from all procsesors, orders them by atom ID, and
returns a full list to each calling processor. The scatter function
does the inverse. It distributes the same kinds of values,
passed by the caller, to each atom owned by individual processors.
The examples/COUPLE and python directories have example C++ and C and
Python codes which show how a driver code can link to LAMMPS as a
library, run LAMMPS on a subset of processors, grab data from LAMMPS,
change it, and put it back into LAMMPS.
NOTE: You can write your own additional functions as needed to define
how your code talks to LAMMPS and add them to src/library.cpp and
src/library.h, as well as to the "Python
interface"_Section_python.html. The routines you add can access or
change any LAMMPS data you wish. The examples/COUPLE and python
directories have example C++ and C and Python codes which show how a
driver code can link to LAMMPS as a library, run LAMMPS on a subset of
processors, grab data from LAMMPS, change it, and put it back into
LAMMPS.
change any LAMMPS data you wish.
:line

View File

@ -534,10 +534,11 @@ from lammps import lammps :pre
These are the methods defined by the lammps module. If you look at
the files src/library.cpp and src/library.h you will see that they
correspond one-to-one with calls you can make to the LAMMPS library
from a C++ or C or Fortran program.
from a C++ or C or Fortran program, and which are described in
"Section 6.19"_Section_howto.html#howto_19 of the manual.
lmp = lammps() # create a LAMMPS object using the default liblammps.so library
4 optional args are allowed: name, cmdargs, ptr, comm
# 4 optional args are allowed: name, cmdargs, ptr, comm
lmp = lammps(ptr=lmpptr) # use lmpptr as previously created LAMMPS object
lmp = lammps(comm=split) # create a LAMMPS object with a custom communicator, requires mpi4py 2.0.0 or later
lmp = lammps(name="g++") # create a LAMMPS object using the liblammps_g++.so library
@ -549,6 +550,7 @@ version = lmp.version() # return the numerical version id, e.g. LAMMPS 2 Sep 20
lmp.file(file) # run an entire input script, file = "in.lj"
lmp.command(cmd) # invoke a single LAMMPS command, cmd = "run 100" :pre
lmp.commands_list(cmdlist) # invoke commands in cmdlist
xlo = lmp.extract_global(name,type) # extract a global quantity
# name = "boxxlo", "nlocal", etc
@ -580,6 +582,8 @@ var = lmp.extract_variable(name,group,flag) # extract value(s) from a variable
# 1 = atom-style variable :pre
flag = lmp.set_variable(name,value) # set existing named string-style variable to value, flag = 0 if successful
value = lmp.get_thermo(name) # return current value of a thermo keyword
natoms = lmp.get_natoms() # total # of atoms as int
data = lmp.gather_atoms(name,type,count) # return atom attribute of all atoms gathered into data, ordered by atom ID
# name = "x", "charge", "type", etc
@ -599,9 +603,10 @@ create an instance of LAMMPS, wrapped in a Python class by the lammps
Python module, and return an instance of the Python class as lmp. It
is used to make all subequent calls to the LAMMPS library.
Additional arguments can be used to tell Python the name of the shared
library to load or to pass arguments to the LAMMPS instance, the same
as if LAMMPS were launched from a command-line prompt.
Additional arguments to lammps() can be used to tell Python the name
of the shared library to load or to pass arguments to the LAMMPS
instance, the same as if LAMMPS were launched from a command-line
prompt.
If the ptr argument is set like this:

View File

@ -37,6 +37,7 @@ Commands :h1
dump_image
dump_modify
dump_molfile
dump_nc
echo
fix
fix_modify

View File

@ -12,6 +12,7 @@ dump command :h3
"dump image"_dump_image.html command :h3
"dump movie"_dump_image.html command :h3
"dump molfile"_dump_molfile.html command :h3
"dump nc"_dump_nc.html command :h3
[Syntax:]
@ -43,7 +44,9 @@ args = list of arguments for a particular style :l
{movie} args = discussed on "dump image"_dump_image.html doc page :pre
{molfile} args = discussed on "dump molfile"_dump_molfile.html doc page :pre
{molfile} args = discussed on "dump molfile"_dump_molfile.html doc page
{nc} args = discussed on "dump nc"_dump_nc.html doc page :pre
{local} args = list of local attributes
possible attributes = index, c_ID, c_ID\[I\], f_ID, f_ID\[I\]

66
doc/src/dump_nc.txt Normal file
View File

@ -0,0 +1,66 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
dump nc command :h3
dump nc/mpiio command :h3
[Syntax:]
dump ID group-ID nc N file.nc args
dump ID group-ID nc/mpiio N file.nc args :pre
ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be imaged :l
{nc} or {nc/mpiio} = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l
N = dump every this many timesteps :l
file.nc = name of file to write to :l
args = list of per atom data elements to dump, same as for the 'custom' dump style. :l,ule
[Examples:]
dump 1 all nc 100 traj.nc type x y z vx vy vz
dump_modify 1 append yes at -1 global c_thermo_pe c_thermo_temp c_thermo_press :pre
dump 1 all nc/mpiio 1000 traj.nc id type x y z :pre
[Description:]
Dump a snapshot of atom coordinates every N timesteps in Amber-style
NetCDF file format. NetCDF files are binary, portable and
self-describing. This dump style will write only one file on the root
node. The dump style {nc} uses the "standard NetCDF
library"_netcdf-home all data is collected on one processor and then
written to the dump file. Dump style {nc/mpiio} used the "parallel
NetCDF library"_pnetcdf-home and MPI-IO; it has better performance on
a larger number of processors. Note that 'nc' outputs all atoms sorted
by atom tag while 'nc/mpiio' outputs in order of the MPI rank.
In addition to per-atom data, also global (i.e. not per atom, but per
frame) quantities can be included in the dump file. This can be
variables, output from computes or fixes data prefixed with v_, c_ and
f_, respectively. These properties are included via
"dump_modify"_dump_modify.html {global}.
:link(netcdf-home,http://www.unidata.ucar.edu/software/netcdf/)
:link(pnetcdf-home,http://trac.mcs.anl.gov/projects/parallel-netcdf/)
:line
[Restrictions:]
The {nc} and {nc/mpiio} dump styles are part of the USER-NC-DUMP
package. It is only enabled if LAMMPS was built with that
package. See the "Making LAMMPS"_Section_start.html#start_3 section
for more info.
:line
[Related commands:]
"dump"_dump.html, "dump_modify"_dump_modify.html, "undump"_undump.html

View File

@ -190,6 +190,7 @@ of "this page"_Section_commands.html#cmd_5.
"gcmc"_fix_gcmc.html - grand canonical insertions/deletions
"gld"_fix_gcmc.html - generalized Langevin dynamics integrator
"gravity"_fix_gravity.html - add gravity to atoms in a granular simulation
"halt"_fix_halt.html - terminate a dynamics run or minimization
"heat"_fix_heat.html - add/subtract momentum-conserving heat
"indent"_fix_indent.html - impose force due to an indenter
"langevin"_fix_langevin.html - Langevin temperature control

View File

@ -48,6 +48,7 @@ Fixes :h1
fix_gld
fix_gle
fix_gravity
fix_halt
fix_heat
fix_imd
fix_indent

View File

@ -170,6 +170,7 @@ fix_gcmc.html
fix_gld.html
fix_gle.html
fix_gravity.html
fix_halt.html
fix_heat.html
fix_imd.html
fix_indent.html

View File

@ -106,8 +106,31 @@ more instructions on how to use the accelerated styles effectively.
[Mixing, shift, table, tail correction, restart, rRESPA info]:
These pair styles do not support mixing. Thus, coefficients for all
I,J pairs must be specified explicitly.
For atom type pairs I,J and I != J, the A, B, H, sigma_h, r_mh
parameters, and the cutoff distance for these pair styles can be mixed:
A (energy units)
sqrt(1/B) (distance units, see below)
H (energy units)
sigma_h (distance units)
r_mh (distance units)
cutoff (distance units):ul
The default mix value is {geometric}.
Only {arithmetic} and {geometric} mix values are supported.
See the "pair_modify" command for details.
The A and H parameters are mixed using the same rules normally
used to mix the "epsilon" parameter in a Lennard Jones interaction.
The sigma_h, r_mh, and the cutoff distance are mixed using the same
rules used to mix the "sigma" parameter in a Lennard Jones interaction.
The B parameter is converted to a distance (sigma), before mixing
(using sigma=B^-0.5), and converted back to a coefficient
afterwards (using B=sigma^2).
Negative A values are converted to positive A values (using abs(A))
before mixing, and converted back after mixing
(by multiplying by sign(Ai)*sign(Aj)).
This way, if either particle is repulsive (if Ai<0 or Aj<0),
then the default interaction between both particles will be repulsive.
The {gauss} style does not support the "pair_modify"_pair_modify.html
shift option. There is no effect due to the Gaussian well beyond the

View File

@ -0,0 +1,19 @@
# Settings that the LAMMPS build will import when a package using the
# netCDF library is installed. This tries to automate configuration
# via the nc-config tool, which is part of the netCDF installation.
netcdf_SYSINC =
netcdf_SYSLIB =
netcdf_SYSPATH =
ifneq ($(shell which nc-config 2>> /dev/null),)
netcdf_SYSINC += -DLMP_HAS_NETCDF $(shell nc-config --cflags)
netcdf_SYSLIB += $(shell nc-config --libs)
endif
ifneq ($(shell which ncmpidump 2>> /dev/null),)
PNETCDF_PATH = $(shell which ncmpidump | sed -e 's,bin/ncmpidump,,')
netcdf_SYSINC += -DLMP_HAS_PNETCDF -I$(PNETCDF_PATH)/include
netcdf_SYSLIB += -lpnetcdf
netcdf_SYSPATH += -L$(PNETCDF_PATH)/lib
endif

43
lib/netcdf/README Normal file
View File

@ -0,0 +1,43 @@
The Makefile.lammps file in this directory is used when building
LAMMPS with packages that make use of the NetCDF library or its
parallel version. The file has several settings needed to compile
and link LAMMPS with the NetCDF and parallel NetCDF support.
For any regular NetCDF installation, all required flags should be
autodetected. Please note that parallel NetCDF support is
beneficial only when you run on a machine with very many processors
like an IBM BlueGene or Cray. For most people regular NetCDF
support should be sufficient and not cause any performance
penalties.
If you have problems compiling or linking, you may have to set
the flags manually. There are three makefile variables
1) netcdf_SYSINC
This is for setting preprocessor options and include file paths.
Set -DLMP_HAS_NETCDF, if you have NetCDF installed.
Set -DLMP_HAS_PNETCDF, if you have parallel NetCDF installed.
You can have either or both defines set. If none of these are
set, LAMMPS will compile, but the NetCDF enabled functionality
will not be available.
In addition you may have to point to the folder with the include
with -I/path/to/netcdf/include
Example for a Fedora 24 machine with serial NetCDF installed as
netcdf-devel-4.4.0-3.fc24.x86_64 RPM package:
netcdf_SYSINC = -DLMP_HAS_NETCDF -I/usr/include -I/usr/include/hdf
2) netcdf_SYSLIB
This is the setting for all required libraries that need to be linked to.
Example for a Fedora 24 machine with serial NetCDF installed as
netcdf-devel-4.4.0-3.fc24.x86_64 RPM package:
netcdf_SYSLIB = -lnetcdf
3) netcdf_SYSPATH
This is the setting for the path of directories with the NetCDF libraries.
Typically, this will be of the form -L/path/to/netcdf/lib
In the example from above, it can be left empty, because the Linux
distribution provided libraries are installed in a system library location.

4
src/.gitignore vendored
View File

@ -271,6 +271,10 @@
/dump_custom_vtk.h
/dump_h5md.cpp
/dump_h5md.h
/dump_nc.cpp
/dump_nc.h
/dump_nc_mpiio.cpp
/dump_nc_mpiio.h
/dump_xtc.cpp
/dump_xtc.h
/dump_xyz_mpiio.cpp

View File

@ -50,14 +50,14 @@ PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \
PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars \
user-diffraction user-dpd user-drude user-eff user-fep user-h5md \
user-intel user-lb user-manifold user-mgpt \
user-misc user-molfile user-omp user-phonon user-qmmm user-qtb \
user-intel user-lb user-manifold user-mgpt user-misc user-molfile \
user-nc-dump user-omp user-phonon user-qmmm user-qtb \
user-quip user-reaxc user-smd user-smtbq user-sph user-tally \
user-vtk
PACKLIB = compress gpu kim kokkos meam mpiio poems python reax voronoi \
user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \
user-qmmm user-quip user-vtk
user-nc-dump user-qmmm user-quip user-smd user-vtk
PACKALL = $(PACKAGE) $(PACKUSER)

View File

@ -795,7 +795,7 @@ void PRD::replicate(int ireplica)
if (cmode == SINGLE_PROC_DIRECT) {
MPI_Bcast(atom->x[0],3*atom->nlocal,MPI_DOUBLE,ireplica,comm_replica);
MPI_Bcast(atom->image,atom->nlocal,MPI_INT,ireplica,comm_replica);
MPI_Bcast(atom->image,atom->nlocal,MPI_LMP_IMAGEINT,ireplica,comm_replica);
return;
}
@ -815,9 +815,9 @@ void PRD::replicate(int ireplica)
memcpy(imageall,image,nlocal*sizeof(imageint));
}
MPI_Bcast(tagall,natoms,MPI_INT,ireplica,comm_replica);
MPI_Bcast(tagall,natoms,MPI_LMP_TAGINT,ireplica,comm_replica);
MPI_Bcast(xall[0],3*natoms,MPI_DOUBLE,ireplica,comm_replica);
MPI_Bcast(imageall,natoms,MPI_INT,ireplica,comm_replica);
MPI_Bcast(imageall,natoms,MPI_LMP_IMAGEINT,ireplica,comm_replica);
for (i = 0; i < nlocal; i++) {
m = atom->map(tagall[i]);
@ -844,8 +844,8 @@ void PRD::replicate(int ireplica)
displacements[i+1] = displacements[i] + counts[i];
MPI_Gatherv(atom->tag,atom->nlocal,MPI_LMP_TAGINT,
tagall,counts,displacements,MPI_LMP_TAGINT,0,world);
MPI_Gatherv(atom->image,atom->nlocal,MPI_LMP_TAGINT,
imageall,counts,displacements,MPI_LMP_TAGINT,0,world);
MPI_Gatherv(atom->image,atom->nlocal,MPI_LMP_IMAGEINT,
imageall,counts,displacements,MPI_LMP_IMAGEINT,0,world);
for (i = 0; i < nprocs; i++) counts[i] *= 3;
for (i = 0; i < nprocs-1; i++)
displacements[i+1] = displacements[i] + counts[i];
@ -854,13 +854,13 @@ void PRD::replicate(int ireplica)
}
if (me == 0) {
MPI_Bcast(tagall,natoms,MPI_INT,ireplica,comm_replica);
MPI_Bcast(imageall,natoms,MPI_INT,ireplica,comm_replica);
MPI_Bcast(tagall,natoms,MPI_LMP_TAGINT,ireplica,comm_replica);
MPI_Bcast(imageall,natoms,MPI_LMP_IMAGEINT,ireplica,comm_replica);
MPI_Bcast(xall[0],3*natoms,MPI_DOUBLE,ireplica,comm_replica);
}
MPI_Bcast(tagall,natoms,MPI_INT,0,world);
MPI_Bcast(imageall,natoms,MPI_INT,0,world);
MPI_Bcast(tagall,natoms,MPI_LMP_TAGINT,0,world);
MPI_Bcast(imageall,natoms,MPI_LMP_IMAGEINT,0,world);
MPI_Bcast(xall[0],3*natoms,MPI_DOUBLE,0,world);
double **x = atom->x;

View File

@ -39,6 +39,7 @@ using namespace MathConst;
PairGaussCut::PairGaussCut(LAMMPS *lmp) : Pair(lmp)
{
respa_enable = 0;
writedata = 1;
}
/* ---------------------------------------------------------------------- */
@ -96,7 +97,6 @@ void PairGaussCut::compute(int eflag, int vflag)
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
factor_lj = special_lj[sbmask(j)];
j &= NEIGHMASK;
@ -221,7 +221,21 @@ void PairGaussCut::coeff(int narg, char **arg)
double PairGaussCut::init_one(int i, int j)
{
if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
if (setflag[i][j] == 0) {
hgauss[i][j] = mix_energy(fabs(hgauss[i][i]), fabs(hgauss[j][j]),
fabs(sigmah[i][i]), fabs(sigmah[j][j]));
// If either of the particles is repulsive (ie, if hgauss > 0),
// then the interaction between both is repulsive.
double sign_hi = (hgauss[i][i] >= 0.0) ? 1.0 : -1.0;
double sign_hj = (hgauss[j][j] >= 0.0) ? 1.0 : -1.0;
hgauss[i][j] *= MAX(sign_hi, sign_hj);
sigmah[i][j] = mix_distance(sigmah[i][i], sigmah[j][j]);
rmh[i][j] = mix_distance(rmh[i][i], rmh[j][j]);
cut[i][j] = mix_distance(cut[i][i], cut[j][j]);
}
pgauss[i][j] = hgauss[i][j] / sqrt(MY_2PI) / sigmah[i][j];
if (offset_flag) {
@ -334,6 +348,27 @@ void PairGaussCut::read_restart_settings(FILE *fp)
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
}
/* ----------------------------------------------------------------------
proc 0 writes to data file
------------------------------------------------------------------------- */
void PairGaussCut::write_data(FILE *fp)
{
for (int i = 1; i <= atom->ntypes; i++)
fprintf(fp,"%d %g %g %g\n",i,hgauss[i][i],rmh[i][i],sigmah[i][i]);
}
/* ----------------------------------------------------------------------
proc 0 writes all pairs to data file
------------------------------------------------------------------------- */
void PairGaussCut::write_data_all(FILE *fp)
{
for (int i = 1; i <= atom->ntypes; i++)
for (int j = i; j <= atom->ntypes; j++)
fprintf(fp,"%d %d %g %g %g %g\n",i,j,hgauss[i][j],rmh[i][j],sigmah[i][j],cut[i][j]);
}
/* ---------------------------------------------------------------------- */
double PairGaussCut::single(int i, int j, int itype, int jtype, double rsq,

View File

@ -42,6 +42,8 @@ class PairGaussCut : public Pair {
virtual void read_restart(FILE *);
virtual void write_restart_settings(FILE *);
virtual void read_restart_settings(FILE *);
virtual void write_data(FILE *fp);
virtual void write_data_all(FILE *fp);
virtual double memory_usage();

View File

@ -0,0 +1,63 @@
# Install/unInstall package files in LAMMPS
# mode = 0/1/2 for uninstall/install/update
mode=$1
# enforce using portable C locale
LC_ALL=C
export LC_ALL
# arg1 = file, arg2 = file it depends on
action () {
if (test $mode = 0) then
rm -f ../$1
elif (! cmp -s $1 ../$1) then
if (test -z "$2" || test -e ../$2) then
cp $1 ..
if (test $mode = 2) then
echo " updating src/$1"
fi
fi
elif (test -n "$2") then
if (test ! -e ../$2) then
rm -f ../$1
fi
fi
}
for file in *.cpp *.h; do
action $file
done
# edit 2 Makefile.package files to include/exclude package info
if (test $1 = 1) then
if (test -e ../Makefile.package) then
sed -i -e 's/[^ \t]*netcdf[^ \t]* //g' ../Makefile.package
sed -i -e 's|^PKG_SYSINC =[ \t]*|&$(netcdf_SYSINC) |' ../Makefile.package
sed -i -e 's|^PKG_SYSLIB =[ \t]*|&$(netcdf_SYSLIB) |' ../Makefile.package
sed -i -e 's|^PKG_SYSPATH =[ \t]*|&$(netcdf_SYSPATH) |' ../Makefile.package
fi
if (test -e ../Makefile.package.settings) then
sed -i -e '/^include.*netcdf.*$/d' ../Makefile.package.settings
# multiline form needed for BSD sed on Macs
sed -i -e '4 i \
include ..\/..\/lib\/netcdf\/Makefile.lammps
' ../Makefile.package.settings
fi
elif (test $1 = 0) then
if (test -e ../Makefile.package) then
sed -i -e 's/[^ \t]*netcdf[^ \t]* //g' ../Makefile.package
fi
if (test -e ../Makefile.package.settings) then
sed -i -e '/^include.*netcdf.*$/d' ../Makefile.package.settings
fi
fi

39
src/USER-NC-DUMP/README Normal file
View File

@ -0,0 +1,39 @@
USER-NC-DUMP
============
This package provides the nc and (optionally) the nc/mpiio dump styles.
See the doc page for dump nc or dump nc/mpiio command for how to use them.
Compiling these dump styles requires having the netCDF library installed
on your system. See lib/netcdf/README for additional details.
PACKAGE DESCRIPTION
-------------------
This is a LAMMPS (http://lammps.sandia.gov/) dump style for output into a NetCDF
database. The database format follows the AMBER NetCDF trajectory convention
(http://ambermd.org/netcdf/nctraj.xhtml), but includes extensions to this
convention. These extension are:
* A variable "cell_origin" (of dimension "frame", "cell_spatial") that contains
the bottom left corner of the simulation cell.
* Any number of additional variables corresponding to per atom scalar, vector
or tensor quantities available within LAMMPS. Tensor quantities are written in
Voigt notation. An additional dimension "Voigt" of length 6 is created for
this purpose.
* Possibility to output to an HDF5 database.
NetCDF files can be directly visualized with the following tools:
* Ovito (http://www.ovito.org/). Ovito supports the AMBER convention and all of
the above extensions.
* VMD (http://www.ks.uiuc.edu/Research/vmd/).
* AtomEye (http://www.libatoms.org/). The libAtoms version of AtomEye contains
a NetCDF reader that is not present in the standard distribution of AtomEye.
The person who created these files is Lars Pastewka at
Karlsruhe Institute of Technology (lars.pastewka@kit.edu).
Contact him directly if you have questions.
Lars Pastewka
Institute for Applied Materials (IAM)
Karlsruhe Institute of Technology (KIT)
Kaiserstrasse 12, 76131 Karlsruhe
e-mail: lars.pastewka@kit.edu

1147
src/USER-NC-DUMP/dump_nc.cpp Normal file

File diff suppressed because it is too large Load Diff

143
src/USER-NC-DUMP/dump_nc.h Normal file
View File

@ -0,0 +1,143 @@
/* ======================================================================
LAMMPS NetCDF dump style
https://github.com/pastewka/lammps-netcdf
Lars Pastewka, lars.pastewka@kit.edu
Copyright (2011-2013) Fraunhofer IWM
Copyright (2014) Karlsruhe Institute of Technology
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
====================================================================== */
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#if defined(LMP_HAS_NETCDF)
#ifdef DUMP_CLASS
DumpStyle(nc,DumpNC)
#else
#ifndef LMP_DUMP_NC_H
#define LMP_DUMP_NC_H
#include "dump_custom.h"
namespace LAMMPS_NS {
const int NC_FIELD_NAME_MAX = 100;
const int DUMP_NC_MAX_DIMS = 100;
class DumpNC : public DumpCustom {
public:
DumpNC(class LAMMPS *, int, char **);
virtual ~DumpNC();
virtual void write();
private:
// per-atoms quantities (positions, velocities, etc.)
struct nc_perat_t {
int dims; // number of dimensions
int field[DUMP_NC_MAX_DIMS]; // field indices corresponding to the dim.
char name[NC_FIELD_NAME_MAX]; // field name
int var; // NetCDF variable
bool constant; // is this property per file (not per frame)
int ndumped; // number of enties written for this prop.
};
typedef void (DumpNC::*funcptr_t)(void *);
// per-frame quantities (variables, fixes or computes)
struct nc_perframe_t {
char name[NC_FIELD_NAME_MAX]; // field name
int var; // NetCDF variable
int type; // variable, fix, compute or callback
int index; // index in fix/compute list
funcptr_t compute; // compute function
int dim; // dimension
char id[NC_FIELD_NAME_MAX]; // variable id
bigint bigint_data; // actual data
double double_data; // actual data
};
int framei; // current frame index
int blocki; // current block index
int ndata; // number of data blocks to expect
bigint ntotalgr; // # of atoms
int n_perat; // # of netcdf per-atom properties
nc_perat_t *perat; // per-atom properties
int n_perframe; // # of global netcdf (not per-atom) fix props
nc_perframe_t *perframe; // global properties
bool double_precision; // write everything as double precision
bigint n_buffer; // size of buffer
int *int_buffer; // buffer for passing data to netcdf
double *double_buffer; // buffer for passing data to netcdf
int ncid;
int frame_dim;
int spatial_dim;
int Voigt_dim;
int atom_dim;
int cell_spatial_dim;
int cell_angular_dim;
int label_dim;
int spatial_var;
int cell_spatial_var;
int cell_angular_var;
int time_var;
int cell_origin_var;
int cell_lengths_var;
int cell_angles_var;
virtual void openfile();
void closefile();
virtual void write_header(bigint);
virtual void write_data(int, double *);
void write_prmtop();
virtual int modify_param(int, char **);
void ncerr(int, const char *, int);
void compute_step(void *);
void compute_elapsed(void *);
void compute_elapsed_long(void *);
};
}
#endif
#endif
#endif /* defined(LMP_HAS_NETCDF) */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,140 @@
/* ======================================================================
LAMMPS NetCDF dump style
https://github.com/pastewka/lammps-netcdf
Lars Pastewka, lars.pastewka@kit.edu
Copyright (2011-2013) Fraunhofer IWM
Copyright (2014) Karlsruhe Institute of Technology
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
====================================================================== */
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#if defined(LMP_HAS_PNETCDF)
#ifdef DUMP_CLASS
DumpStyle(nc/mpiio,DumpNCMPIIO)
#else
#ifndef LMP_DUMP_NC_MPIIO_H
#define LMP_DUMP_NC_MPIIO_H
#include "dump_custom.h"
namespace LAMMPS_NS {
const int NC_MPIIO_FIELD_NAME_MAX = 100;
const int DUMP_NC_MPIIO_MAX_DIMS = 100;
class DumpNCMPIIO : public DumpCustom {
public:
DumpNCMPIIO(class LAMMPS *, int, char **);
virtual ~DumpNCMPIIO();
virtual void write();
private:
// per-atoms quantities (positions, velocities, etc.)
struct nc_perat_t {
int dims; // number of dimensions
int field[DUMP_NC_MPIIO_MAX_DIMS]; // field indices corresponding to the dim.
char name[NC_MPIIO_FIELD_NAME_MAX]; // field name
int var; // NetCDF variable
};
typedef void (DumpNCMPIIO::*funcptr_t)(void *);
// per-frame quantities (variables, fixes or computes)
struct nc_perframe_t {
char name[NC_MPIIO_FIELD_NAME_MAX]; // field name
int var; // NetCDF variable
int type; // variable, fix, compute or callback
int index; // index in fix/compute list
funcptr_t compute; // compute function
int dim; // dimension
char id[NC_MPIIO_FIELD_NAME_MAX]; // variable id
bigint bigint_data; // actual data
double double_data; // actual data
};
int framei; // current frame index
int blocki; // current block index
int ndata; // number of data blocks to expect
bigint ntotalgr; // # of atoms
int n_perat; // # of netcdf per-atom properties
nc_perat_t *perat; // per-atom properties
int n_perframe; // # of global netcdf (not per-atom) fix props
nc_perframe_t *perframe; // global properties
bool double_precision; // write everything as double precision
bigint n_buffer; // size of buffer
int *int_buffer; // buffer for passing data to netcdf
double *double_buffer; // buffer for passing data to netcdf
int ncid;
int frame_dim;
int spatial_dim;
int Voigt_dim;
int atom_dim;
int cell_spatial_dim;
int cell_angular_dim;
int label_dim;
int spatial_var;
int cell_spatial_var;
int cell_angular_var;
int time_var;
int cell_origin_var;
int cell_lengths_var;
int cell_angles_var;
virtual void openfile();
void closefile();
void write_time_and_cell();
virtual void write_data(int, double *);
void write_prmtop();
virtual int modify_param(int, char **);
void ncerr(int, const char *, int);
void compute_step(void *);
void compute_elapsed(void *);
void compute_elapsed_long(void *);
};
}
#endif
#endif
#endif /* defined(LMP_HAS_PNETCDF) */

View File

@ -148,7 +148,7 @@ int ComputeBondLocal::compute_bonds(int flag)
double vvib,vrotsq;
double inertia,omegasq;
double mvv2e;
double engpot,engtrans,engvib,engrot,engtot,fbond;
double engpot,engtrans,engvib,engrot,fbond;
double *ptr;
double **x = atom->x;

View File

@ -874,7 +874,7 @@ void Dump::modify_params(int narg, char **arg)
format_float_user = NULL;
// pass format none to child classes which may use it
// not an error if they don't
int n = modify_param(narg-iarg,&arg[iarg]);
modify_param(narg-iarg,&arg[iarg]);
iarg += 2;
continue;
}

View File

@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------
LAMMRDS - Large-scale Atomic/Molecular Massively Parallel Simulator
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov

View File

@ -194,10 +194,8 @@ void FixHalt::post_run()
double FixHalt::bondmax()
{
double **x = atom->x;
double **f = atom->f;
int **bondlist = neighbor->bondlist;
int nbondlist = neighbor->nbondlist;
int nlocal = atom->nlocal;
int i1,i2;
double delx,dely,delz,rsq;

View File

@ -1079,3 +1079,10 @@ bool Info::has_exceptions() const {
return false;
#endif
}
/* ---------------------------------------------------------------------- */
char **Info::get_variable_names(int &num) {
num = input->variable->nvar;
return input->variable->names;
}

View File

@ -39,6 +39,8 @@ class Info : protected Pointers {
bool has_ffmpeg_support() const;
bool has_exceptions() const;
char **get_variable_names(int &num);
private:
void available_styles(FILE * out, int flags);

View File

@ -89,6 +89,7 @@ typedef int64_t bigint;
#define MAXBIGINT INT64_MAX
#define MPI_LMP_TAGINT MPI_INT
#define MPI_LMP_IMAGEINT MPI_INT
#define MPI_LMP_BIGINT MPI_LL
#define TAGINT_FORMAT "%d"
@ -120,6 +121,7 @@ typedef int64_t bigint;
#define MAXBIGINT INT64_MAX
#define MPI_LMP_TAGINT MPI_LL
#define MPI_LMP_IMAGEINT MPI_LL
#define MPI_LMP_BIGINT MPI_LL
#define TAGINT_FORMAT "%" PRId64
@ -150,6 +152,7 @@ typedef int bigint;
#define MAXBIGINT INT_MAX
#define MPI_LMP_TAGINT MPI_INT
#define MPI_LMP_IMAGEINT MPI_INT
#define MPI_LMP_BIGINT MPI_INT
#define TAGINT_FORMAT "%d"

View File

@ -232,8 +232,8 @@ void Neighbor::skip_from_granular(NeighList *list)
{
int i,j,ii,jj,m,n,nn,itype,jnum,joriginal,dnum,dnumbytes;
tagint jtag;
int *neighptr,*jlist,*touchptr,*touchptr_skip;
double *shearptr,*shearptr_skip;
int *neighptr,*jlist,*touchptr;
double *shearptr;
NeighList *listgranhistory;
int *npartner;
@ -364,8 +364,8 @@ void Neighbor::skip_from_granular_off2on(NeighList *list)
{
int i,j,ii,jj,m,n,nn,itype,jnum,joriginal,dnum,dnumbytes;
tagint itag,jtag;
int *neighptr,*jlist,*touchptr,*touchptr_skip;
double *shearptr,*shearptr_skip;
int *neighptr,*jlist,*touchptr;
double *shearptr;
NeighList *listgranhistory;
int *npartner;
@ -502,8 +502,8 @@ void Neighbor::skip_from_granular_off2on(NeighList *list)
void Neighbor::skip_from_granular_off2on_onesided(NeighList *list)
{
int i,j,ii,jj,m,n,nn,itype,jnum,joriginal,flip,dnum,dnumbytes,tmp;
tagint itag,jtag;
int *surf,*neighptr,*jlist;
tagint jtag;
int *surf,*jlist;
NeighList *listgranhistory;
int *npartner;
@ -571,7 +571,6 @@ void Neighbor::skip_from_granular_off2on_onesided(NeighList *list)
i = ilist_skip[ii];
itype = type[i];
if (iskip[itype]) continue;
itag = tag[i];
n = 0;
@ -625,7 +624,6 @@ void Neighbor::skip_from_granular_off2on_onesided(NeighList *list)
i = ilist_skip[ii];
itype = type[i];
if (iskip[itype]) continue;
itag = tag[i];
// loop over parent non-skip granular list and optionally its history info

View File

@ -34,10 +34,11 @@ using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
PairGauss::PairGauss(LAMMPS *lmp) :Pair(lmp)
PairGauss::PairGauss(LAMMPS *lmp) : Pair(lmp)
{
nextra = 1;
pvector = new double[1];
writedata = 1;
}
/* ---------------------------------------------------------------------- */
@ -187,7 +188,7 @@ void PairGauss::coeff(int narg, char **arg)
error->all(FLERR,"Incorrect args for pair coefficients");
if (!allocated) allocate();
int ilo, ihi, jlo, jhi;
int ilo,ihi,jlo,jhi;
force->bounds(arg[0],atom->ntypes,ilo,ihi);
force->bounds(arg[1],atom->ntypes,jlo,jhi);
@ -204,7 +205,7 @@ void PairGauss::coeff(int narg, char **arg)
b[i][j] = b_one;
cut[i][j] = cut_one;
setflag[i][j] = 1;
count++ ;
count++;
}
}
@ -217,12 +218,27 @@ void PairGauss::coeff(int narg, char **arg)
double PairGauss::init_one(int i, int j)
{
if (setflag[i][j] == 0) {
double sign_bi = (b[i][i] >= 0.0) ? 1.0 : -1.0;
double sign_bj = (b[j][j] >= 0.0) ? 1.0 : -1.0;
double si = sqrt(0.5/fabs(b[i][i]));
double sj = sqrt(0.5/fabs(b[j][j]));
double sij = mix_distance(si, sj);
b[i][j] = 0.5 / (sij*sij);
b[i][j] *= MAX(sign_bi, sign_bj);
// This error is triggered when ti is performed on lj/cut tail
// in presence of extra atom type for tether sites
// "i = 2 j = 1 ERROR: All pair coeffs are not set (pair_gauss.cpp:223)"
// if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
// Negative "a" values are useful for simulating repulsive particles.
// If either of the particles is repulsive (a<0), then the
// interaction between both is repulsive.
double sign_ai = (a[i][i] >= 0.0) ? 1.0 : -1.0;
double sign_aj = (a[j][j] >= 0.0) ? 1.0 : -1.0;
a[i][j] = mix_energy(fabs(a[i][i]), fabs(a[j][j]), si, sj);
a[i][j] *= MIN(sign_ai, sign_aj);
cut[i][j] = mix_distance(cut[i][i],cut[j][j]);
}
// cutoff correction to energy
if (offset_flag) offset[i][j] = a[i][j]*exp(-b[i][j]*cut[i][j]*cut[i][j]);
else offset[i][j] = 0.0;
@ -260,7 +276,6 @@ void PairGauss::write_restart(FILE *fp)
void PairGauss::read_restart(FILE *fp)
{
read_restart_settings(fp);
allocate();
int i,j;
@ -309,6 +324,27 @@ void PairGauss::read_restart_settings(FILE *fp)
MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
}
/* ----------------------------------------------------------------------
proc 0 writes to data file
------------------------------------------------------------------------- */
void PairGauss::write_data(FILE *fp)
{
for (int i = 1; i <= atom->ntypes; i++)
fprintf(fp,"%d %g %g\n",i,a[i][i],b[i][i]);
}
/* ----------------------------------------------------------------------
proc 0 writes all pairs to data file
------------------------------------------------------------------------- */
void PairGauss::write_data_all(FILE *fp)
{
for (int i = 1; i <= atom->ntypes; i++)
for (int j = i; j <= atom->ntypes; j++)
fprintf(fp,"%d %d %g %g %g\n",i,j,a[i][j],b[i][j],cut[i][j]);
}
/* ---------------------------------------------------------------------- */
double PairGauss::single(int i, int j, int itype, int jtype, double rsq,

View File

@ -36,6 +36,8 @@ class PairGauss : public Pair {
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
void write_data(FILE *fp);
void write_data_all(FILE *fp);
double single(int, int, int, int, double, double, double, double &);
void *extract(const char *, int &);

View File

@ -554,7 +554,7 @@ void PairTable::spline_table(Table *tb)
/* ----------------------------------------------------------------------
extract attributes from parameter line in table section
format of line: N value R/RSQ/BITMAP lo hi FP fplo fphi
format of line: N value R/RSQ/BITMAP lo hi FPRIME fplo fphi
N is required, other params are optional
------------------------------------------------------------------------- */
@ -578,7 +578,7 @@ void PairTable::param_extract(Table *tb, char *line)
tb->rlo = atof(word);
word = strtok(NULL," \t\n\r\f");
tb->rhi = atof(word);
} else if (strcmp(word,"FP") == 0) {
} else if (strcmp(word,"FPRIME") == 0) {
tb->fpflag = 1;
word = strtok(NULL," \t\n\r\f");
tb->fplo = atof(word);

View File

@ -517,7 +517,6 @@ void Region::set_velocity()
void Region::velocity_contact(double *vwall, double *x, int ic)
{
Contact c = contact[ic];
double xc[3];
vwall[0] = vwall[1] = vwall[2] = 0.0;

View File

@ -1 +1 @@
#define LAMMPS_VERSION "18 Oct 2016"
#define LAMMPS_VERSION "19 Oct 2016"