Merge branch 'master' into cslib

This commit is contained in:
Steve Plimpton 2018-08-31 16:30:28 -06:00
commit 78301e5e93
445 changed files with 1954 additions and 1065 deletions

2
.gitignore vendored
View File

@ -1,6 +1,7 @@
*~
*.o
*.so
*.lo
*.cu_o
*.ptx
*_ptx.h
@ -32,6 +33,7 @@ log.cite
.Trashes
ehthumbs.db
Thumbs.db
.clang-format
#cmake
/build*

View File

@ -43,6 +43,29 @@ function(validate_option name values)
endif()
endfunction(validate_option)
function(get_lammps_version version_header variable)
file(READ ${version_header} line)
set(MONTHS x Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
string(REGEX REPLACE "#define LAMMPS_VERSION \"([0-9]+) ([A-Za-z]+) ([0-9]+)\"" "\\1" day "${line}")
string(REGEX REPLACE "#define LAMMPS_VERSION \"([0-9]+) ([A-Za-z]+) ([0-9]+)\"" "\\2" month "${line}")
string(REGEX REPLACE "#define LAMMPS_VERSION \"([0-9]+) ([A-Za-z]+) ([0-9]+)\"" "\\3" year "${line}")
string(STRIP ${day} day)
string(STRIP ${month} month)
string(STRIP ${year} year)
list(FIND MONTHS "${month}" month)
string(LENGTH ${day} day_length)
string(LENGTH ${month} month_length)
if(day_length EQUAL 1)
set(day "0${day}")
endif()
if(month_length EQUAL 1)
set(month "0${month}")
endif()
set(${variable} "${year}${month}${day}" PARENT_SCOPE)
endfunction()
get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h LAMMPS_VERSION)
# Cmake modules/macros are in a subdirectory to keep this file cleaner
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules)
@ -121,10 +144,10 @@ if(BUILD_LIB)
if(BUILD_SHARED_LIBS) # for all pkg libs, mpi_stubs and linalg
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
set(LIB_SUFFIX "" CACHE STRING "Suffix to append to liblammps and pkg-config file")
mark_as_advanced(LIB_SUFFIX)
if(LIB_SUFFIX)
set(LIB_SUFFIX "_${LIB_SUFFIX}")
set(LAMMPS_LIB_SUFFIX "" CACHE STRING "Suffix to append to liblammps and pkg-config file")
mark_as_advanced(LAMMPS_LIB_SUFFIX)
if(LAMMPS_LIB_SUFFIX)
set(LAMMPS_LIB_SUFFIX "_${LAMMPS_LIB_SUFFIX}")
endif()
endif()
@ -704,7 +727,9 @@ if(PKG_USER-OMP)
set(USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/thr_data.cpp
${USER-OMP_SOURCES_DIR}/thr_omp.cpp
${USER-OMP_SOURCES_DIR}/fix_nh_omp.cpp
${USER-OMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp)
${USER-OMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp
${USER-OMP_SOURCES_DIR}/domain_omp.cpp)
add_definitions(-DLMP_USER_OMP)
set_property(GLOBAL PROPERTY "OMP_SOURCES" "${USER-OMP_SOURCES}")
# detects styles which have USER-OMP version
@ -1037,7 +1062,9 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR})
######################################
set(temp "#ifndef LMP_INSTALLED_PKGS_H\n#define LMP_INSTALLED_PKGS_H\n")
set(temp "${temp}const char * LAMMPS_NS::LAMMPS::installed_packages[] = {\n")
foreach(PKG ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
set(temp_PKG_LIST ${DEFAULT_PACKAGES} ${ACCEL_PACKAGES} ${OTHER_PACKAGES})
list(SORT temp_PKG_LIST)
foreach(PKG ${temp_PKG_LIST})
if(PKG_${PKG})
set(temp "${temp} \"${PKG}\",\n")
endif()
@ -1062,14 +1089,14 @@ if(BUILD_LIB)
if(LAMMPS_DEPS)
add_dependencies(lammps ${LAMMPS_DEPS})
endif()
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LIB_SUFFIX})
if(BUILD_SHARED_LIBS)
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES ${LAMMPS_SOURCE_DIR}/library.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LIB_SUFFIX}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_LIB_SUFFIX})
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})
install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES ${LAMMPS_SOURCE_DIR}/library.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps)
configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
configure_file(FindLAMMPS.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/Module)
else()
list(APPEND LMP_SOURCES ${LIB_SOURCES})
endif()
@ -1087,6 +1114,7 @@ if(BUILD_EXE)
set_target_properties(lmp PROPERTIES OUTPUT_NAME lmp${LAMMPS_MACHINE})
install(TARGETS lmp DESTINATION ${CMAKE_INSTALL_BINDIR})
install(FILES ${LAMMPS_DOC_DIR}/lammps.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 RENAME lmp${LAMMPS_MACHINE}.1)
if(ENABLE_TESTING)
add_test(ShowHelp lmp${LAMMPS_MACHINE} -help)
endif()
@ -1156,7 +1184,7 @@ endif()
# Install potential files in data directory
###############################################################################
set(LAMMPS_POTENTIALS_DIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps/potentials)
install(DIRECTORY ${LAMMPS_SOURCE_DIR}/../potentials DESTINATION ${CMAKE_INSTALL_DATADIR}/lammps/potentials)
install(DIRECTORY ${LAMMPS_SOURCE_DIR}/../potentials/ DESTINATION ${LAMMPS_POTENTIALS_DIR})
configure_file(etc/profile.d/lammps.sh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.sh @ONLY)
configure_file(etc/profile.d/lammps.csh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.csh @ONLY)

48
cmake/FindLAMMPS.cmake.in Normal file
View File

@ -0,0 +1,48 @@
# - Find liblammps
# Find the native liblammps headers and libraries.
#
# The following variables will set:
# LAMMPS_INCLUDE_DIRS - where to find lammps/library.h, etc.
# LAMMPS_LIBRARIES - List of libraries when using lammps.
# LAMMPS_API_DEFINES - lammps library api defines
# LAMMPS_VERSION - lammps library version
# LAMMPS_FOUND - True if liblammps found.
#
# In addition a LAMMPS::LAMMPS imported target is getting created.
#
# 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.
#
find_package(PkgConfig)
pkg_check_modules(PC_LAMMPS liblammps@LAMMPS_LIB_SUFFIX@)
find_path(LAMMPS_INCLUDE_DIR lammps/library.h HINTS ${PC_LAMMPS_INCLUDE_DIRS} @CMAKE_INSTALL_FULL_INCLUDEDIR@)
set(LAMMPS_VERSION @LAMMPS_VERSION@)
set(LAMMPS_API_DEFINES @LAMMPS_API_DEFINES@)
find_library(LAMMPS_LIBRARY NAMES lammps@LAMMPS_LIB_SUFFIX@ HINTS ${PC_LAMMPS_LIBRARY_DIRS} @CMAKE_INSTALL_FULL_LIBDIR@)
set(LAMMPS_INCLUDE_DIRS "${LAMMPS_INCLUDE_DIR}")
set(LAMMPS_LIBRARIES "${LAMMPS_LIBRARY}")
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LAMMPS_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(LAMMPS REQUIRED_VARS LAMMPS_LIBRARY LAMMPS_INCLUDE_DIR VERSION_VAR LAMMPS_VERSION)
mark_as_advanced(LAMMPS_INCLUDE_DIR LAMMPS_LIBRARY)
if(LAMMPS_FOUND AND NOT TARGET LAMMPS::LAMMPS)
add_library(LAMMPS::LAMMPS UNKNOWN IMPORTED)
set_target_properties(LAMMPS::LAMMPS PROPERTIES IMPORTED_LOCATION "${LAMMPS_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${LAMMPS_INCLUDE_DIR}" INTERFACE_COMPILE_DEFINITIONS "${LAMMPS_API_DEFINES}")
endif()

View File

@ -48,8 +48,13 @@ function(CreateStyleHeader path filename)
set(temp "")
if(ARGC GREATER 2)
list(REMOVE_AT ARGV 0 1)
set(header_list)
foreach(FNAME ${ARGV})
get_filename_component(FNAME ${FNAME} NAME)
list(APPEND header_list ${FNAME})
endforeach()
list(SORT header_list)
foreach(FNAME ${header_list})
set(temp "${temp}#include \"${FNAME}\"\n")
endforeach()
endif()

View File

@ -4,7 +4,7 @@
# after you added @CMAKE_INSTALL_FULL_LIBDIR@/pkg-config to PKG_CONFIG_PATH,
# e.g. export PKG_CONFIG_PATH=@CMAKE_INSTALL_FULL_LIBDIR@/pkgconfig
prefix=@CMAKE_INSTALL_FULL_PREFIX@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
@ -13,6 +13,6 @@ Description: Large-scale Atomic/Molecular Massively Parallel Simulator Library
URL: http://lammps.sandia.gov
Version:
Requires:
Libs: -L${libdir} -llammps@LIB_SUFFIX@@
Libs: -L${libdir} -llammps@LAMMPS_LIB_SUFFIX@
Libs.private: -lm
Cflags: -I${includedir} @LAMMPS_API_DEFINES@

45
doc/lammps.1 Normal file
View File

@ -0,0 +1,45 @@
.TH LAMMPS "2018-08-22"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator.
.SH SYNOPSIS
.B lmp
-in in.file
or
mpirun \-np 2
.B lmp
-in in.file
.SH DESCRIPTION
.B LAMMPS
LAMMPS is a classical molecular dynamics code, and an acronym for Large-scale
Atomic/Molecular Massively Parallel Simulator. LAMMPS has potentials for soft
materials (biomolecules, polymers) and solid-state materials (metals,
semiconductors) and coarse-grained or mesoscopic systems. It can be used to
model atoms or, more generically, as a parallel particle simulator at the
atomic, meso, or continuum scale.
See http://lammps.sandia.gov/ for documentation.
.SH OPTIONS
See https://lammps.sandia.gov/doc/Run_options.html for details on
command-line options.
.SH COPYRIGHT
© 2003--2018 Sandia Corporation
This package 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 package 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.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.

View File

@ -33,6 +33,7 @@ OPT.
"agni (o)"_pair_agni.html,
"airebo (oi)"_pair_airebo.html,
"airebo/morse (oi)"_pair_airebo.html,
"atm"_pair_atm.html,
"awpmd/cut"_pair_awpmd.html,
"beck (go)"_pair_beck.html,
"body/nparticle"_pair_body_nparticle.html,

BIN
doc/src/Eqs/pair_atm.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

9
doc/src/Eqs/pair_atm.tex Normal file
View File

@ -0,0 +1,9 @@
\documentclass[12pt]{article}
\begin{document}
\begin{equation}
E=\nu\frac{1+3\cos\gamma_1\cos\gamma_2\cos\gamma_3}{r_{12}^3r_{23}^3r_{31}^3}
\end{equation}
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,7 +1,7 @@
<!-- HTML_ONLY -->
<HEAD>
<TITLE>LAMMPS Users Manual</TITLE>
<META NAME="docnumber" CONTENT="22 Aug 2018 version">
<META NAME="docnumber" CONTENT="31 Aug 2018 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 @@
:line
LAMMPS Documentation :c,h1
22 Aug 2018 version :c,h2
31 Aug 2018 version :c,h2
"What is a LAMMPS version?"_Manual_version.html

View File

@ -529,6 +529,7 @@ pair_write.html
pair_adp.html
pair_agni.html
pair_airebo.html
pair_atm.html
pair_awpmd.html
pair_beck.html
pair_body_nparticle.html

164
doc/src/pair_atm.txt Normal file
View File

@ -0,0 +1,164 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)
:line
pair_style atm command :h3
[Syntax:]
pair_style atm cutoff cutoff_triple :pre
cutoff = cutoff for each pair in 3-body interaction (distance units)
cutoff_triple = additional cutoff applied to product of 3 pairwise distances (distance units) :ul
[Examples:]
pair_style atm 4.5 2.5
pair_coeff * * * 0.072 :pre
pair_style hybrid/overlay lj/cut 6.5 atm 4.5 2.5
pair_coeff * * lj/cut 1.0 1.0
pair_coeff 1 1 atm 1 0.064
pair_coeff 1 1 atm 2 0.080
pair_coeff 1 2 atm 2 0.100
pair_coeff 2 2 atm 2 0.125 :pre
[Description:]
The {atm} style computes a 3-body "Axilrod-Teller-Muto"_#Axilrod
potential for the energy E of a system of atoms as
:c,image(Eqs/pair_atm.jpg)
where nu is the three-body interaction strength. The distances
between pairs of atoms r12, r23, r31 and the angles gamma1, gamma2,
gamma3 are as shown in this diagram:
:c,image(JPG/pair_atm_dia.jpg)
Note that for the interaction between a triplet of atoms I,J,K, there
is no "central" atom. The interaction is symmetric with respect to
permutation of the three atoms. Thus the nu value is
the same for all those permutations of the atom types of I,J,K
and needs to be specified only once, as discussed below.
The {atm} potential is typically used in combination with a two-body
potential using the "pair_style hybrid/overlay"_pair_hybrid.html
command as in the example above.
The potential for a triplet of atom is calculated only if all 3
distances r12, r23, r31 between the 3 atoms satisfy rIJ < cutoff.
In addition, the product of the 3 distances r12*r23*r31 <
cutoff_triple^3 is required, which excludes from calculation the
triplets with small contribution to the interaction.
The following coefficients must be defined for each pair of atoms
types via the "pair_coeff"_pair_coeff.html command as in the examples
above, or in the restart files read by the
"read_restart"_read_restart.html commands:
K = atom type of the third atom (1 to Ntypes)
nu = prefactor (energy/distance^9 units) :ul
K can be specified in one of two ways. An explicit numeric value can
be used, as in the 2nd example above. J <= K is required. LAMMPS
sets the coefficients for the other 5 symmetric interactions to the
same values. E.g. if I = 1, J = 2, K = 3, then these 6 values are set
to the specified nu: nu123, nu132, nu213, nu231, nu312, nu321. This
enforces the symmetry discussed above.
A wildcard asterisk can be used for K to set the coefficients for
multiple triplets of atom types. This takes the form "*" or "*n" or
"n*" or "m*n". If N = the number of atom types, then an asterisk with
no numeric values means all types from 1 to N. A leading asterisk
means all types from 1 to n (inclusive). A trailing asterisk means
all types from n to N (inclusive). A middle asterisk means all types
from m to n (inclusive). Note that only type triplets with J <= K are
considered; if asterisks imply type triplets where K < J, they are
ignored.
Note that a pair_coeff command can override a previous setting for the
same I,J,K triplet. For example, these commands set nu for all I,J.K
triplets, then overwrite nu for just the I,J,K = 2,3,4 triplet:
pair_coeff * * * 0.25
pair_coeff 2 3 4 0.1 :pre
Note that for a simulation with a single atom type, only a single
entry is required, e.g.
pair_coeff 1 1 1 0.25 :pre
For a simulation with two atom types, four pair_coeff commands will
specify all possible nu values:
pair_coeff 1 1 1 nu1
pair_coeff 1 1 2 nu2
pair_coeff 1 2 2 nu3
pair_coeff 2 2 2 nu4 :pre
For a simulation with three atom types, ten pair_coeff commands will
specify all possible nu values:
pair_coeff 1 1 1 nu1
pair_coeff 1 1 2 nu2
pair_coeff 1 1 3 nu3
pair_coeff 1 2 2 nu4
pair_coeff 1 2 3 nu5
pair_coeff 1 3 3 nu6
pair_coeff 2 2 2 nu7
pair_coeff 2 2 3 nu8
pair_coeff 2 3 3 nu9
pair_coeff 3 3 3 nu10 :pre
By default the nu value for all triplets is set to 0.0. Thus it is
not required to provide pair_coeff commands that enumerate triplet
interactions for all K types. If some I,J,K combination is not
speficied, then there will be no 3-body ATM interactions for that
combination and all its permutations. However, as with all pair
styles, it is required to specify a pair_coeff command for all I,J
combinations, else an error will result.
:line
[Mixing, shift, table, tail correction, restart, rRESPA info]:
This pair styles do not support the "pair_modify"_pair_modify.html
mix, shift, table, and tail options.
This pair style writes its information to "binary restart
files"_restart.html, so pair_style and pair_coeff commands do not need
to be specified in an input script that reads a restart file.
However, if the {atm} potential is used in combination with other
potentials using the "pair_style hybrid/overlay"_pair_hybrid.html
command then pair_coeff commands need to be re-specified
in the restart input script.
This pair style can only be used via the {pair} keyword of the
"run_style respa"_run_style.html command. It does not support the
{inner}, {middle}, {outer} keywords.
:line
[Restrictions:]
This pair style is part of the MANYBODY package. It is only enabled
if LAMMPS was built with that package. See the "Build
package"_Build_package.html doc page for more info.
[Related commands:]
"pair_coeff"_pair_coeff.html
[Default:] none
:line
:link(Axilrod)
[(Axilrod)]
Axilrod and Teller, J Chem Phys, 11, 299 (1943);
Muto, Nippon Sugaku-Buturigakkwaishi 17, 629 (1943).

View File

@ -103,6 +103,7 @@ pair"_Commands_pair.html doc page are followed by one or more of
"pair_style adp"_pair_adp.html - angular dependent potential (ADP) of Mishin
"pair_style airebo"_pair_airebo.html - AIREBO potential of Stuart
"pair_style airebo/morse"_pair_airebo.html - AIREBO with Morse instead of LJ
"pair_style atm"_pair_atm.html - Axilrod-Teller-Muto potential
"pair_style beck"_pair_beck.html - Beck potential
"pair_style body/nparticle"_pair_body_nparticle.html - interactions between body particles
"pair_style bop"_pair_bop.html - BOP potential of Pettifor

View File

@ -8,6 +8,7 @@ Pair Styles :h1
pair_adp
pair_agni
pair_airebo
pair_atm
pair_awpmd
pair_beck
pair_body_nparticle

View File

@ -59,6 +59,7 @@ sub-directories:
accelerate: use of all the various accelerator packages
airebo: polyethylene with AIREBO potential
atm: Axilrod-Teller-Muto potential
balance: dynamic load balancing, 2d system
body: body particles, 2d system
cmap: CMAP 5-body contributions to CHARMM force field

31
examples/atm/in.atm Normal file
View File

@ -0,0 +1,31 @@
# Axilrod-Teller-Muto potential example
variable x index 1
variable y index 1
variable z index 1
variable xx equal 10*$x
variable yy equal 10*$y
variable zz equal 10*$z
units lj
atom_style atomic
lattice fcc 0.65
region box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box 1 box
create_atoms 1 box
pair_style hybrid/overlay lj/cut 4.5 atm 4.5 2.5
pair_coeff * * lj/cut 1.0 1.0
pair_coeff * * atm * 0.072
mass * 1.0
velocity all create 1.033 12345678 loop geom
fix 1 all nvt temp 1.033 1.033 0.05
timestep 0.002
thermo 5
run 25

View File

@ -0,0 +1,100 @@
LAMMPS (22 Aug 2018)
# Axilrod-Teller-Muto potential example
variable x index 1
variable y index 1
variable z index 1
variable xx equal 10*$x
variable xx equal 10*1
variable yy equal 10*$y
variable yy equal 10*1
variable zz equal 10*$z
variable zz equal 10*1
units lj
atom_style atomic
lattice fcc 0.65
Lattice spacing in x,y,z = 1.83252 1.83252 1.83252
region box block 0 ${xx} 0 ${yy} 0 ${zz}
region box block 0 10 0 ${yy} 0 ${zz}
region box block 0 10 0 10 0 ${zz}
region box block 0 10 0 10 0 10
create_box 1 box
Created orthogonal box = (0 0 0) to (18.3252 18.3252 18.3252)
1 by 1 by 1 MPI processor grid
create_atoms 1 box
Created 4000 atoms
Time spent = 0.00139618 secs
pair_style hybrid/overlay lj/cut 4.5 atm 4.5 2.5
pair_coeff * * lj/cut 1.0 1.0
pair_coeff * * atm * 0.072
mass * 1.0
velocity all create 1.033 12345678 loop geom
fix 1 all nvt temp 1.033 1.033 0.05
timestep 0.002
thermo 5
run 25
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 4.8
ghost atom cutoff = 4.8
binsize = 2.4, bins = 8 8 8
2 neighbor lists, perpetual/occasional/extra = 2 0 0
(1) pair lj/cut, perpetual, half/full from (2)
attributes: half, newton on
pair build: halffull/newton
stencil: none
bin: none
(2) pair atm, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 11.47 | 11.47 | 11.47 Mbytes
Step Temp E_pair E_mol TotEng Press
0 1.033 -4.8404387 0 -3.291326 -4.1332095
5 1.0337247 -4.8402263 0 -3.290027 -4.1207962
10 1.0355935 -4.8425889 0 -3.2895869 -4.0870158
15 1.0376519 -4.84599 0 -3.2899013 -4.0278711
20 1.0382257 -4.8478854 0 -3.2909361 -3.9368052
25 1.0347886 -4.84473 0 -3.2929351 -3.8044469
Loop time of 15.95 on 1 procs for 25 steps with 4000 atoms
Performance: 270.846 tau/day, 1.567 timesteps/s
100.0% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 15.946 | 15.946 | 15.946 | 0.0 | 99.97
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.0015042 | 0.0015042 | 0.0015042 | 0.0 | 0.01
Output | 0.00013781 | 0.00013781 | 0.00013781 | 0.0 | 0.00
Modify | 0.0017776 | 0.0017776 | 0.0017776 | 0.0 | 0.01
Other | | 0.0006771 | | | 0.00
Nlocal: 4000 ave 4000 max 4000 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 10895 ave 10895 max 10895 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 640000 ave 640000 max 640000 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 1.28e+06 ave 1.28e+06 max 1.28e+06 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 1280000
Ave neighs/atom = 320
Neighbor list builds = 0
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:16

View File

@ -0,0 +1,100 @@
LAMMPS (22 Aug 2018)
# Axilrod-Teller-Muto potential example
variable x index 1
variable y index 1
variable z index 1
variable xx equal 10*$x
variable xx equal 10*1
variable yy equal 10*$y
variable yy equal 10*1
variable zz equal 10*$z
variable zz equal 10*1
units lj
atom_style atomic
lattice fcc 0.65
Lattice spacing in x,y,z = 1.83252 1.83252 1.83252
region box block 0 ${xx} 0 ${yy} 0 ${zz}
region box block 0 10 0 ${yy} 0 ${zz}
region box block 0 10 0 10 0 ${zz}
region box block 0 10 0 10 0 10
create_box 1 box
Created orthogonal box = (0 0 0) to (18.3252 18.3252 18.3252)
1 by 2 by 2 MPI processor grid
create_atoms 1 box
Created 4000 atoms
Time spent = 0.000900984 secs
pair_style hybrid/overlay lj/cut 4.5 atm 4.5 2.5
pair_coeff * * lj/cut 1.0 1.0
pair_coeff * * atm * 0.072
mass * 1.0
velocity all create 1.033 12345678 loop geom
fix 1 all nvt temp 1.033 1.033 0.05
timestep 0.002
thermo 5
run 25
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 4.8
ghost atom cutoff = 4.8
binsize = 2.4, bins = 8 8 8
2 neighbor lists, perpetual/occasional/extra = 2 0 0
(1) pair lj/cut, perpetual, half/full from (2)
attributes: half, newton on
pair build: halffull/newton
stencil: none
bin: none
(2) pair atm, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 5.532 | 5.532 | 5.532 Mbytes
Step Temp E_pair E_mol TotEng Press
0 1.033 -4.8404387 0 -3.291326 -4.1332095
5 1.0337247 -4.8402263 0 -3.290027 -4.1207962
10 1.0355935 -4.8425889 0 -3.2895869 -4.0870158
15 1.0376519 -4.84599 0 -3.2899013 -4.0278711
20 1.0382257 -4.8478854 0 -3.2909361 -3.9368052
25 1.0347886 -4.84473 0 -3.2929351 -3.8044469
Loop time of 4.34636 on 4 procs for 25 steps with 4000 atoms
Performance: 993.935 tau/day, 5.752 timesteps/s
99.6% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 3.9977 | 4.1036 | 4.209 | 4.9 | 94.41
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.13588 | 0.24134 | 0.34722 | 20.4 | 5.55
Output | 0.00013757 | 0.00015104 | 0.00016761 | 0.0 | 0.00
Modify | 0.00087953 | 0.00091547 | 0.00095582 | 0.0 | 0.02
Other | | 0.0003656 | | | 0.01
Nlocal: 1000 ave 1000 max 1000 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Nghost: 5835 ave 5835 max 5835 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Neighs: 160000 ave 160000 max 160000 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 320000 ave 320000 max 320000 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 1280000
Ave neighs/atom = 320
Neighbor list builds = 0
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:04

View File

@ -62,7 +62,7 @@ void FixNVEAsphere::init()
/* ---------------------------------------------------------------------- */
void FixNVEAsphere::initial_integrate(int vflag)
void FixNVEAsphere::initial_integrate(int /*vflag*/)
{
double dtfm;
double inertia[3],omega[3];

View File

@ -64,7 +64,7 @@ void FixNVEAsphereNoforce::init()
/* ---------------------------------------------------------------------- */
void FixNVEAsphereNoforce::initial_integrate(int vflag)
void FixNVEAsphereNoforce::initial_integrate(int /*vflag*/)
{
AtomVecEllipsoid::Bonus *bonus;
if (avec) bonus = avec->bonus;

View File

@ -81,7 +81,7 @@ void FixNVELine::init()
/* ---------------------------------------------------------------------- */
void FixNVELine::initial_integrate(int vflag)
void FixNVELine::initial_integrate(int /*vflag*/)
{
double dtfm,dtirotate,length,theta;

View File

@ -75,7 +75,7 @@ void FixNVETri::init()
/* ---------------------------------------------------------------------- */
void FixNVETri::initial_integrate(int vflag)
void FixNVETri::initial_integrate(int /*vflag*/)
{
double dtfm;
double omega[3];

View File

@ -195,7 +195,7 @@ void BodyNparticle::data_body(int ibonus, int ninteger, int ndouble,
called by Molecule class which needs single body size
------------------------------------------------------------------------- */
double BodyNparticle::radius_body(int ninteger, int ndouble,
double BodyNparticle::radius_body(int /*ninteger*/, int ndouble,
int *ifile, double *dfile)
{
int nsub = ifile[0];
@ -258,7 +258,7 @@ void BodyNparticle::output(int ibonus, int m, double *values)
/* ---------------------------------------------------------------------- */
int BodyNparticle::image(int ibonus, double flag1, double flag2,
int BodyNparticle::image(int ibonus, double flag1, double /*flag2*/,
int *&ivec, double **&darray)
{
double p[3][3];

View File

@ -323,7 +323,7 @@ void BodyRoundedPolygon::data_body(int ibonus, int ninteger, int ndouble,
called by Molecule class which needs single body size
------------------------------------------------------------------------- */
double BodyRoundedPolygon::radius_body(int ninteger, int ndouble,
double BodyRoundedPolygon::radius_body(int /*ninteger*/, int ndouble,
int *ifile, double *dfile)
{
int nsub = ifile[0];
@ -392,7 +392,7 @@ void BodyRoundedPolygon::output(int ibonus, int m, double *values)
/* ---------------------------------------------------------------------- */
int BodyRoundedPolygon::image(int ibonus, double flag1, double flag2,
int BodyRoundedPolygon::image(int ibonus, double flag1, double /*flag2*/,
int *&ivec, double **&darray)
{
int j;

View File

@ -96,7 +96,7 @@ int BodyRoundedPolyhedron::nedges(AtomVecBody::Bonus *bonus)
{
int nvertices = bonus->ivalue[0];
int nedges = bonus->ivalue[1];
int nfaces = bonus->ivalue[2];
//int nfaces = bonus->ivalue[2];
if (nvertices == 1) return 0;
else if (nvertices == 2) return 1;
return nedges; //(nvertices+nfaces-2); // Euler's polyon formula: V-E+F=2
@ -381,7 +381,7 @@ void BodyRoundedPolyhedron::data_body(int ibonus, int ninteger, int ndouble,
called by Molecule class which needs single body size
------------------------------------------------------------------------- */
double BodyRoundedPolyhedron::radius_body(int ninteger, int ndouble,
double BodyRoundedPolyhedron::radius_body(int /*ninteger*/, int ndouble,
int *ifile, double *dfile)
{
int nsub = ifile[0];
@ -460,10 +460,10 @@ void BodyRoundedPolyhedron::output(int ibonus, int m, double *values)
/* ---------------------------------------------------------------------- */
int BodyRoundedPolyhedron::image(int ibonus, double flag1, double flag2,
int BodyRoundedPolyhedron::image(int ibonus, double flag1, double /*flag2*/,
int *&ivec, double **&darray)
{
int j, nelements;
int nelements;
double p[3][3];
double *x, rrad;
@ -488,7 +488,7 @@ int BodyRoundedPolyhedron::image(int ibonus, double flag1, double flag2,
nelements = nvertices;
} else {
int nfaces = bonus->ivalue[2];
//int nfaces = bonus->ivalue[2];
int nedges = bonus->ivalue[1]; //nvertices + nfaces - 2;
if (nvertices == 2) nedges = 1; // special case: rods
double* edge_ends = &bonus->dvalue[3*nvertices];

View File

@ -54,7 +54,7 @@ void FixNVEBody::init()
/* ---------------------------------------------------------------------- */
void FixNVEBody::initial_integrate(int vflag)
void FixNVEBody::initial_integrate(int /*vflag*/)
{
double dtfm;
double omega[3];

View File

@ -204,7 +204,7 @@ void FixWallBodyPolygon::setup(int vflag)
/* ---------------------------------------------------------------------- */
void FixWallBodyPolygon::post_force(int vflag)
void FixWallBodyPolygon::post_force(int /*vflag*/)
{
double vwall[3],dx,dy,dz,del1,del2,delxy,delr,rsq,eradi,rradi,wall_pos;
int i,ni,npi,ifirst,nei,iefirst,side;
@ -310,9 +310,6 @@ void FixWallBodyPolygon::post_force(int vflag)
rsq = dx*dx + dy*dy + dz*dz;
if (rsq > radius[i]*radius[i]) continue;
double r = sqrt(rsq);
double rsqinv = 1.0 / rsq;
if (dnum[i] == 0) body2space(i);
npi = dnum[i];
ifirst = dfirst[i];
@ -475,12 +472,11 @@ void FixWallBodyPolygon::body2space(int i)
int FixWallBodyPolygon::vertex_against_wall(int i, double wall_pos,
double** x, double** f, double** torque, int side,
Contact* contact_list, int &num_contacts, double* facc)
Contact* contact_list, int &num_contacts, double* /*facc*/)
{
int ni, npi, ifirst, interact;
double xpi[3], xpj[3], dist, eradi, rradi;
double fx, fy, fz, rx, ry, rz;
int nlocal = atom->nlocal;
double xpi[3], eradi, rradi;
double fx, fy, fz;
npi = dnum[i];
ifirst = dfirst[i];
@ -499,9 +495,9 @@ int FixWallBodyPolygon::vertex_against_wall(int i, double wall_pos,
xpi[1] = x[i][1] + discrete[ifirst+ni][1];
xpi[2] = x[i][2] + discrete[ifirst+ni][2];
int mode, contact, p2vertex;
double d, R, hi[3], t, delx, dely, delz, fpair, shift;
double xj[3], rij;
int mode, contact;
double d, R, hi[3], delx, dely, delz, fpair;
double rij;
// compute the distance from the vertex xpi to the wall
@ -671,7 +667,7 @@ void FixWallBodyPolygon::contact_forces(Contact& contact, double j_a,
double** x, double** v, double** angmom, double** f,
double** torque, double* vwall, double* facc)
{
int ibody,ibonus,ifirst, jefirst, ni;
int ibody,ibonus,ifirst, ni;
double fx,fy,fz,delx,dely,delz,rsq,rsqinv;
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
double fn[3],ft[3],vi[3];

View File

@ -211,9 +211,9 @@ void FixWallBodyPolyhedron::setup(int vflag)
/* ---------------------------------------------------------------------- */
void FixWallBodyPolyhedron::post_force(int vflag)
void FixWallBodyPolyhedron::post_force(int /*vflag*/)
{
double vwall[3],dx,dy,dz,del1,del2,delxy,delr,rsq,eradi,rradi,wall_pos;
double vwall[3],dx,dy,dz,del1,del2,rsq,eradi,rradi,wall_pos;
int i,ni,npi,ifirst,nei,iefirst,nfi,iffirst,side;
double facc[3];
@ -325,9 +325,6 @@ void FixWallBodyPolyhedron::post_force(int vflag)
rsq = dx*dx + dy*dy + dz*dz;
if (rsq > radius[i]*radius[i]) continue;
double r = sqrt(rsq);
double rsqinv = 1.0 / rsq;
if (dnum[i] == 0) body2space(i);
npi = dnum[i];
ifirst = dfirst[i];
@ -359,8 +356,7 @@ void FixWallBodyPolyhedron::post_force(int vflag)
edge[iefirst+ni][5] = 0;
}
int interact, num_contacts, done;
double delta_a, delta_ua, j_a;
int interact, num_contacts;
Contact contact_list[MAX_CONTACTS];
num_contacts = 0;
@ -485,7 +481,7 @@ void FixWallBodyPolyhedron::body2space(int i)
---------------------------------------------------------------------- */
int FixWallBodyPolyhedron::sphere_against_wall(int i, double wall_pos,
int side, double* vwall, double** x, double** v, double** f,
int /*side*/, double* vwall, double** x, double** v, double** f,
double** angmom, double** torque)
{
int mode;
@ -545,12 +541,11 @@ int FixWallBodyPolyhedron::sphere_against_wall(int i, double wall_pos,
---------------------------------------------------------------------- */
int FixWallBodyPolyhedron::edge_against_wall(int i, double wall_pos,
int side, double* vwall, double** x, double** f, double** torque,
Contact* contact_list, int &num_contacts, double* facc)
int side, double* vwall, double** x, double** /*f*/, double** /*torque*/,
Contact* /*contact_list*/, int &/*num_contacts*/, double* /*facc*/)
{
int ni, nei, mode, contact;
double rradi;
int nlocal = atom->nlocal;
nei = ednum[i];
rradi = rounded_radius[i];
@ -584,7 +579,7 @@ int FixWallBodyPolyhedron::edge_against_wall(int i, double wall_pos,
int FixWallBodyPolyhedron::compute_distance_to_wall(int ibody, int edge_index,
double *xmi, double rounded_radius_i, double wall_pos,
int side, double* vwall, int &contact)
int /*side*/, double* vwall, int &contact)
{
int mode,ifirst,iefirst,npi1,npi2;
double d1,d2,xpi1[3],xpi2[3],hi[3];
@ -698,14 +693,14 @@ int FixWallBodyPolyhedron::compute_distance_to_wall(int ibody, int edge_index,
------------------------------------------------------------------------- */
void FixWallBodyPolyhedron::contact_forces(int ibody,
double j_a, double *xi, double *xj, double delx, double dely, double delz,
double j_a, double *xi, double * /*xj*/, double delx, double dely, double delz,
double fx, double fy, double fz, double** x, double** v, double** angmom,
double** f, double** torque, double* vwall)
{
int ibonus,jbonus;
int ibonus;
double fxt,fyt,fzt,rsq,rsqinv;
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
double fn[3],ft[3],vi[3],vj[3];
double fn[3],ft[3],vi[3];
double *quat, *inertia;
AtomVecBody::Bonus *bonus;
@ -787,7 +782,7 @@ void FixWallBodyPolyhedron::contact_forces(Contact& contact, double j_a,
double** x, double** v, double** angmom, double** f,
double** torque, double* vwall, double* facc)
{
int ibody,ibonus,ifirst, jefirst, ni;
int ibody,ibonus,ifirst,ni;
double fx,fy,fz,delx,dely,delz,rsq,rsqinv;
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
double fn[3],ft[3],vi[3];

View File

@ -105,10 +105,9 @@ void PairBodyRoundedPolygon::compute(int eflag, int vflag)
int i,j,ii,jj,inum,jnum,itype,jtype;
int ni,nj,npi,npj,ifirst,jfirst;
int nei,nej,iefirst,jefirst;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fx,fy,fz;
double xtmp,ytmp,ztmp,delx,dely,delz,evdwl;
double rsq,rsqinv,r,radi,radj,eradi,eradj,rradi,rradj,k_nij,k_naij;
double xi[3],xj[3],fi[3],fj[3],ti[3],tj[3],facc[3];
double *dxi,*dxj;
double xi[3],xj[3],facc[3];
int *ilist,*jlist,*numneigh,**firstneigh;
evdwl = 0.0;
@ -598,7 +597,7 @@ void PairBodyRoundedPolygon::body2space(int i)
void PairBodyRoundedPolygon::sphere_against_sphere(int i, int j,
double delx, double dely, double delz, double rsq,
double k_n, double k_na, double** x, double** v,
double k_n, double k_na, double** /*x*/, double** v,
double** f, int evflag)
{
double eradi,eradj,rradi,rradj;
@ -709,9 +708,8 @@ int PairBodyRoundedPolygon::vertex_against_edge(int i, int j,
int ni, npi, ifirst, nei, iefirst;
int nj, npj, jfirst, nej, jefirst;
double xpi[3], xpj[3], dist, eradi, eradj, rradi, rradj;
double fx, fy, fz, rx, ry, rz, energy;
double fx, fy, fz, energy;
int interact;
int nlocal = atom->nlocal;
npi = dnum[i];
ifirst = dfirst[i];
@ -758,7 +756,7 @@ int PairBodyRoundedPolygon::vertex_against_edge(int i, int j,
int mode, contact, p2vertex;
double d, R, hi[3], t, delx, dely, delz, fpair, shift;
double xj[3], rij;
double rij;
// loop through body j's edges
@ -781,6 +779,7 @@ int PairBodyRoundedPolygon::vertex_against_edge(int i, int j,
if (mode == VERTEXI) p2vertex = edge[jefirst+nj][0];
else if (mode == VERTEXJ) p2vertex = edge[jefirst+nj][1];
// double xj[3];
// p2.body2space(p2vertex, xj);
xpj[0] = x[j][0] + discrete[jfirst+p2vertex][0];
xpj[1] = x[j][1] + discrete[jfirst+p2vertex][1];
@ -1166,7 +1165,7 @@ int PairBodyRoundedPolygon::compute_distance_to_vertex(int ibody,
void PairBodyRoundedPolygon::contact_forces(Contact& contact, double j_a,
double** x, double** v, double** angmom, double** f,
double** torque, double &evdwl, double* facc)
double** torque, double &/*evdwl*/, double* facc)
{
int ibody,jbody,ibonus,jbonus,ifirst,jefirst,ni,nj;
double fx,fy,fz,delx,dely,delz,rsq,rsqinv;

View File

@ -603,7 +603,7 @@ void PairBodyRoundedPolyhedron::sphere_against_sphere(int ibody, int jbody,
{
double rradi,rradj,contact_dist;
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
double rij,rsqinv,R,fx,fy,fz,fn[3],ft[3],fpair,shift,energy;
double rij,rsqinv,R,fx,fy,fz,fn[3],ft[3],fpair,energy;
int nlocal = atom->nlocal;
int newton_pair = force->newton_pair;
@ -685,7 +685,7 @@ void PairBodyRoundedPolyhedron::sphere_against_edge(int ibody, int jbody,
{
int ni,nei,ifirst,iefirst,npi1,npi2,ibonus;
double xi1[3],xi2[3],vti[3],h[3],fn[3],ft[3],d,t;
double delx,dely,delz,rsq,rij,rsqinv,R,fx,fy,fz,fpair,shift,energy;
double delx,dely,delz,rsq,rij,rsqinv,R,fx,fy,fz,fpair,energy;
double rradi,rradj,contact_dist;
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
double *quat, *inertia;
@ -835,7 +835,7 @@ void PairBodyRoundedPolyhedron::sphere_against_face(int ibody, int jbody,
{
int ni,nfi,inside,ifirst,iffirst,npi1,npi2,npi3,ibonus,tmp;
double xi1[3],xi2[3],xi3[3],ui[3],vi[3],vti[3],n[3],h[3],fn[3],ft[3],d;
double delx,dely,delz,rsq,rij,rsqinv,R,fx,fy,fz,fpair,shift,energy;
double delx,dely,delz,rsq,rij,rsqinv,R,fx,fy,fz,fpair,energy;
double rradi,rradj,contact_dist;
double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
double *quat, *inertia;
@ -988,7 +988,7 @@ int PairBodyRoundedPolyhedron::edge_against_edge(int ibody, int jbody,
int itype, int jtype, double** x, Contact* contact_list, int &num_contacts,
double &evdwl, double* facc)
{
int ni,nei,nj,nej,contact,interact;
int ni,nei,nj,nej,interact;
double rradi,rradj,energy;
nei = ednum[ibody];
@ -1045,7 +1045,7 @@ int PairBodyRoundedPolyhedron::edge_against_face(int ibody, int jbody,
int itype, int jtype, double** x, Contact* contact_list, int &num_contacts,
double &evdwl, double* facc)
{
int ni,nei,nj,nfj,contact,interact;
int ni,nei,nj,nfj,interact;
double rradi,rradj,energy;
nei = ednum[ibody];
@ -1118,7 +1118,7 @@ int PairBodyRoundedPolyhedron::interaction_edge_to_edge(int ibody,
int ifirst,iefirst,jfirst,jefirst,npi1,npi2,npj1,npj2,interact;
double xi1[3],xi2[3],xpj1[3],xpj2[3];
double r,t1,t2,h1[3],h2[3];
double contact_dist, shift;
double contact_dist;
double** x = atom->x;
double** v = atom->v;
@ -1314,7 +1314,7 @@ int PairBodyRoundedPolyhedron::interaction_face_to_edge(int ibody,
// determine the intersection of the edge to the face
double hi1[3], hi2[3], d1, d2, contact_dist, shift;
double hi1[3], hi2[3], d1, d2, contact_dist;
int inside1 = 0;
int inside2 = 0;
@ -2345,9 +2345,8 @@ void PairBodyRoundedPolyhedron::find_unique_contacts(Contact* contact_list,
void PairBodyRoundedPolyhedron::sanity_check()
{
double x1[3],x2[3],x3[3],x4[3],h_a[3],h_b[3],d_a,d_b,u[3],v[3],n[3];
double x1[3],x2[3],x3[3],x4[3],h_a[3],h_b[3],d_a,d_b;
double a[3],b[3],t_a,t_b;
int inside_a, inside_b;
x1[0] = 0; x1[1] = 3; x1[2] = 0;
x2[0] = 3; x2[1] = 0; x2[2] = 0;
@ -2364,9 +2363,11 @@ void PairBodyRoundedPolyhedron::sanity_check()
h_a[0], h_a[1], h_a[2], h_b[0], h_b[1], h_b[2], t_a, t_b, d_a, d_b);
*/
/*
int inside_a, inside_b;
int mode = edge_face_intersect(x1, x2, x3, a, b, h_a, h_b, d_a, d_b,
inside_a, inside_b);
double u[3],v[3],n[3];
MathExtra::sub3(x2, x1, u);
MathExtra::sub3(x3, x1, v);
MathExtra::cross3(u, v, n);

View File

@ -209,7 +209,7 @@ void BondClass2::write_data(FILE *fp)
/* ---------------------------------------------------------------------- */
double BondClass2::single(int type, double rsq, int i, int j, double &fforce)
double BondClass2::single(int type, double rsq, int /*i*/, int /*j*/, double &fforce)
{
double r = sqrt(rsq);
double dr = r - r0[type];

View File

@ -633,7 +633,7 @@ void ImproperClass2::read_restart(FILE *fp)
angle-angle interactions within improper
------------------------------------------------------------------------- */
void ImproperClass2::angleangle(int eflag, int vflag)
void ImproperClass2::angleangle(int eflag, int /*vflag*/)
{
int i1,i2,i3,i4,i,j,k,n,type;
double eimproper;

View File

@ -377,8 +377,8 @@ void PairLJClass2::write_data_all(FILE *fp)
/* ---------------------------------------------------------------------- */
double PairLJClass2::single(int i, int j, int itype, int jtype, double rsq,
double factor_coul, double factor_lj,
double PairLJClass2::single(int /*i*/, int /*j*/, int itype, int jtype, double rsq,
double /*factor_coul*/, double factor_lj,
double &fforce)
{
double r2inv,rinv,r3inv,r6inv,forcelj,philj;

View File

@ -469,8 +469,8 @@ void PairColloid::write_data_all(FILE *fp)
/* ---------------------------------------------------------------------- */
double PairColloid::single(int i, int j, int itype, int jtype, double rsq,
double factor_coul, double factor_lj,
double PairColloid::single(int /*i*/, int /*j*/, int itype, int jtype, double rsq,
double /*factor_coul*/, double factor_lj,
double &fforce)
{
double K[9],h[4],g[4];

View File

@ -749,7 +749,7 @@ void PairLubricate::read_restart_settings(FILE *fp)
/* ---------------------------------------------------------------------- */
int PairLubricate::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;
@ -797,7 +797,7 @@ void PairLubricate::unpack_forward_comm(int n, int first, double *buf)
if type pair setting, return -2 if no type pairs are set
------------------------------------------------------------------------- */
int PairLubricate::pre_adapt(char *name, int ilo, int ihi, int jlo, int jhi)
int PairLubricate::pre_adapt(char *name, int /*ilo*/, int /*ihi*/, int /*jlo*/, int /*jhi*/)
{
if (strcmp(name,"mu") == 0) return 0;
return -1;
@ -809,7 +809,7 @@ int PairLubricate::pre_adapt(char *name, int ilo, int ihi, int jlo, int jhi)
if type pair setting, set I-J and J-I coeffs
------------------------------------------------------------------------- */
void PairLubricate::adapt(int which, int ilo, int ihi, int jlo, int jhi,
void PairLubricate::adapt(int /*which*/, int /*ilo*/, int /*ihi*/, int /*jlo*/, int /*jhi*/,
double value)
{
mu = value;

View File

@ -2010,7 +2010,7 @@ void PairLubricateU::copy_uo_vec(int inum, double **f, double **torque,
/* ---------------------------------------------------------------------- */
int PairLubricateU::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -160,9 +160,9 @@ double PairYukawaColloid::init_one(int i, int j)
/* ---------------------------------------------------------------------- */
double PairYukawaColloid::single(int i, int j, int itype, int jtype,
double PairYukawaColloid::single(int /*i*/, int /*j*/, int itype, int jtype,
double rsq,
double factor_coul, double factor_lj,
double /*factor_coul*/, double factor_lj,
double &fforce)
{
double r,rinv,screening,forceyukawa,phi;

View File

@ -83,7 +83,7 @@ void FixFreeze::setup(int vflag)
/* ---------------------------------------------------------------------- */
void FixFreeze::post_force(int vflag)
void FixFreeze::post_force(int /*vflag*/)
{
double **f = atom->f;
double **torque = atom->torque;
@ -110,7 +110,7 @@ void FixFreeze::post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixFreeze::post_force_respa(int vflag, int ilevel, int iloop)
void FixFreeze::post_force_respa(int vflag, int /*ilevel*/, int /*iloop*/)
{
post_force(vflag);
}

View File

@ -302,7 +302,7 @@ void FixWallGran::setup(int vflag)
/* ---------------------------------------------------------------------- */
void FixWallGran::post_force(int vflag)
void FixWallGran::post_force(int /*vflag*/)
{
int i,j;
double dx,dy,dz,del1,del2,delxy,delr,rsq,rwall,meff;
@ -446,7 +446,7 @@ void FixWallGran::post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixWallGran::post_force_respa(int vflag, int ilevel, int iloop)
void FixWallGran::post_force_respa(int vflag, int ilevel, int /*iloop*/)
{
if (ilevel == nlevels_respa-1) post_force(vflag);
}
@ -1041,7 +1041,7 @@ void FixWallGran::grow_arrays(int nmax)
copy values within local atom-based arrays
------------------------------------------------------------------------- */
void FixWallGran::copy_arrays(int i, int j, int delflag)
void FixWallGran::copy_arrays(int i, int j, int /*delflag*/)
{
if (history)
for (int m = 0; m < sheardim; m++)
@ -1136,7 +1136,7 @@ int FixWallGran::maxsize_restart()
size of atom nlocal's restart data
------------------------------------------------------------------------- */
int FixWallGran::size_restart(int nlocal)
int FixWallGran::size_restart(int /*nlocal*/)
{
if (!history) return 0;
return 1 + sheardim;

View File

@ -130,7 +130,7 @@ void FixWallGranRegion::init()
/* ---------------------------------------------------------------------- */
void FixWallGranRegion::post_force(int vflag)
void FixWallGranRegion::post_force(int /*vflag*/)
{
int i,m,nc,iwall;
double dx,dy,dz,rsq,meff;
@ -347,7 +347,7 @@ void FixWallGranRegion::grow_arrays(int nmax)
copy values within local atom-based arrays
------------------------------------------------------------------------- */
void FixWallGranRegion::copy_arrays(int i, int j, int delflag)
void FixWallGranRegion::copy_arrays(int i, int j, int /*delflag*/)
{
int m,n,iwall;

View File

@ -306,9 +306,9 @@ void PairGranHertzHistory::settings(int narg, char **arg)
/* ---------------------------------------------------------------------- */
double PairGranHertzHistory::single(int i, int j, int itype, int jtype,
double PairGranHertzHistory::single(int i, int j, int /*itype*/, int /*jtype*/,
double rsq,
double factor_coul, double factor_lj,
double /*factor_coul*/, double /*factor_lj*/,
double &fforce)
{
double radi,radj,radsum;

View File

@ -219,8 +219,8 @@ void PairGranHooke::compute(int eflag, int vflag)
/* ---------------------------------------------------------------------- */
double PairGranHooke::single(int i, int j, int itype, int jtype, double rsq,
double factor_coul, double factor_lj,
double PairGranHooke::single(int i, int j, int /*itype*/, int /*jtype*/, double rsq,
double /*factor_coul*/, double /*factor_lj*/,
double &fforce)
{
double radi,radj,radsum,r,rinv,rsqinv;

View File

@ -587,9 +587,9 @@ void PairGranHookeHistory::reset_dt()
/* ---------------------------------------------------------------------- */
double PairGranHookeHistory::single(int i, int j, int itype, int jtype,
double PairGranHookeHistory::single(int i, int j, int /*itype*/, int /*jtype*/,
double rsq,
double factor_coul, double factor_lj,
double /*factor_coul*/, double /*factor_lj*/,
double &fforce)
{
double radi,radj,radsum;
@ -746,7 +746,7 @@ double PairGranHookeHistory::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
int PairGranHookeHistory::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -338,9 +338,9 @@ void PairCoulLong::read_restart_settings(FILE *fp)
/* ---------------------------------------------------------------------- */
double PairCoulLong::single(int i, int j, int itype, int jtype,
double PairCoulLong::single(int i, int j, int /*itype*/, int /*jtype*/,
double rsq,
double factor_coul, double factor_lj,
double factor_coul, double /*factor_lj*/,
double &fforce)
{
double r2inv,r,grij,expm2,t,erfc,prefactor;

View File

@ -169,9 +169,9 @@ void PairCoulMSM::compute(int eflag, int vflag)
/* ---------------------------------------------------------------------- */
double PairCoulMSM::single(int i, int j, int itype, int jtype,
double PairCoulMSM::single(int i, int j, int /*itype*/, int /*jtype*/,
double rsq,
double factor_coul, double factor_lj,
double factor_coul, double /*factor_lj*/,
double &fforce)
{
double r2inv,r,egamma,fgamma,prefactor;

View File

@ -8052,7 +8052,7 @@ void PPPMDisp::compute_rho_coeff(FFT_SCALAR **coeff , FFT_SCALAR **dcoeff,
extended to non-neutral systems (J. Chem. Phys. 131, 094107).
------------------------------------------------------------------------- */
void PPPMDisp::slabcorr(int eflag)
void PPPMDisp::slabcorr(int /*eflag*/)
{
// compute local contribution to global dipole moment

View File

@ -234,7 +234,7 @@ struct remap_plan_3d *remap_3d_create_plan(
int in_klo, int in_khi,
int out_ilo, int out_ihi, int out_jlo, int out_jhi,
int out_klo, int out_khi,
int nqty, int permute, int memory, int precision, int usecollective)
int nqty, int permute, int memory, int /*precision*/, int usecollective)
{

View File

@ -189,7 +189,7 @@ void FixLatte::init()
/* ---------------------------------------------------------------------- */
void FixLatte::init_list(int id, NeighList *ptr)
void FixLatte::init_list(int /*id*/, NeighList * /*ptr*/)
{
// list = ptr;
}
@ -223,13 +223,13 @@ void FixLatte::setup_pre_reverse(int eflag, int vflag)
integrate electronic degrees of freedom
------------------------------------------------------------------------- */
void FixLatte::initial_integrate(int vflag) {}
void FixLatte::initial_integrate(int /*vflag*/) {}
/* ----------------------------------------------------------------------
store eflag, so can use it in post_force to tally per-atom energies
------------------------------------------------------------------------- */
void FixLatte::pre_reverse(int eflag, int vflag)
void FixLatte::pre_reverse(int eflag, int /*vflag*/)
{
eflag_caller = eflag;
}

View File

@ -159,7 +159,7 @@ void FixQEQComb::min_post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixQEQComb::post_force(int vflag)
void FixQEQComb::post_force(int /*vflag*/)
{
int i,ii,iloop,loopmax,inum,*ilist;
double heatpq,qmass,dtq,dtq2;
@ -276,7 +276,7 @@ void FixQEQComb::post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixQEQComb::post_force_respa(int vflag, int ilevel, int iloop)
void FixQEQComb::post_force_respa(int vflag, int ilevel, int /*iloop*/)
{
if (ilevel == ilevel_respa) post_force(vflag);
}
@ -293,7 +293,7 @@ double FixQEQComb::memory_usage()
/* ---------------------------------------------------------------------- */
int FixQEQComb::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -424,7 +424,7 @@ void PairADP::allocate()
global settings
------------------------------------------------------------------------- */
void PairADP::settings(int narg, char **arg)
void PairADP::settings(int narg, char **/*arg*/)
{
if (narg > 0) error->all(FLERR,"Illegal pair_style command");
}
@ -521,7 +521,7 @@ void PairADP::init_style()
init for one type pair i,j and corresponding j,i
------------------------------------------------------------------------- */
double PairADP::init_one(int i, int j)
double PairADP::init_one(int /*i*/, int /*j*/)
{
// single global cutoff = max of cut from all files read in
// for funcfl could be multiple files
@ -935,7 +935,7 @@ void PairADP::grab(FILE *fp, int n, double *list)
/* ---------------------------------------------------------------------- */
int PairADP::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -425,7 +425,7 @@ void PairAIREBO::REBO_neigh()
REBO forces and energy
------------------------------------------------------------------------- */
void PairAIREBO::FREBO(int eflag, int vflag)
void PairAIREBO::FREBO(int eflag, int /*vflag*/)
{
int i,j,k,m,ii,inum,itype,jtype;
tagint itag,jtag;
@ -524,7 +524,7 @@ void PairAIREBO::FREBO(int eflag, int vflag)
find 3- and 4-step paths between atoms I,J via REBO neighbor lists
------------------------------------------------------------------------- */
void PairAIREBO::FLJ(int eflag, int vflag)
void PairAIREBO::FLJ(int eflag, int /*vflag*/)
{
int i,j,k,m,ii,jj,kk,mm,inum,jnum,itype,jtype,ktype,mtype;
int atomi,atomj,atomk,atomm;
@ -893,7 +893,7 @@ void PairAIREBO::FLJ(int eflag, int vflag)
torsional forces and energy
------------------------------------------------------------------------- */
void PairAIREBO::TORSION(int eflag, int vflag)
void PairAIREBO::TORSION(int eflag, int /*vflag*/)
{
int i,j,k,l,ii,inum;
tagint itag,jtag;
@ -2116,7 +2116,7 @@ but of the vector r_ij.
*/
double PairAIREBO::bondorderLJ(int i, int j, double rij_mod[3], double rijmag_mod,
double PairAIREBO::bondorderLJ(int i, int j, double /*rij_mod*/[3], double rijmag_mod,
double VA, double rij[3], double rijmag,
double **f, int vflag_atom)
{

374
src/MANYBODY/pair_atm.cpp Normal file
View File

@ -0,0 +1,374 @@
/* ----------------------------------------------------------------------
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.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing author: Sergey Lishchuk
------------------------------------------------------------------------- */
#include <cmath>
#include "pair_atm.h"
#include "atom.h"
#include "citeme.h"
#include "comm.h"
#include "error.h"
#include "force.h"
#include "memory.h"
#include "neigh_list.h"
#include "neigh_request.h"
#include "neighbor.h"
using namespace LAMMPS_NS;
static const char cite_atm_package[] =
"ATM package:\n\n"
"@Article{Lishchuk:2012:164501,\n"
" author = {S. V. Lishchuk},\n"
" title = {Role of three-body interactions in formation of bulk viscosity in liquid argon},\n"
" journal = {J.~Chem.~Phys.},\n"
" year = 2012,\n"
" volume = 136,\n"
" pages = {164501}\n"
"}\n\n";
/* ---------------------------------------------------------------------- */
PairATM::PairATM(LAMMPS *lmp) : Pair(lmp)
{
if (lmp->citeme) lmp->citeme->add(cite_atm_package);
single_enable = 0;
restartinfo = 1;
one_coeff = 0;
manybody_flag = 1;
}
/* ----------------------------------------------------------------------
check if allocated, since class can be destructed when incomplete
------------------------------------------------------------------------- */
PairATM::~PairATM()
{
if (copymode) return;
if (allocated) {
memory->destroy(setflag);
memory->destroy(cutsq);
memory->destroy(nu);
}
}
/* ----------------------------------------------------------------------
workhorse routine that computes pairwise interactions
------------------------------------------------------------------------- */
void PairATM::compute(int eflag, int vflag)
{
int i,j,k,ii,jj,kk,inum,jnum,jnumm1;
double xi,yi,zi,evdwl;
double rij2,rik2,rjk2;
double rij[3],rik[3],rjk[3],fj[3],fk[3];
double nu_local;
int *ilist,*jlist,*numneigh,**firstneigh;
evdwl = 0.0;
if (eflag || vflag) ev_setup(eflag,vflag);
else evflag = vflag_fdotr = 0;
double **x = atom->x;
double **f = atom->f;
int *type = atom->type;
double cutoff_squared = cut_global*cut_global;
double triple = cut_triple*cut_triple*cut_triple;
double cutoff_triple_sixth = triple*triple;
inum = list->inum;
ilist = list->ilist;
numneigh = list->numneigh;
firstneigh = list->firstneigh;
// triple loop over local atoms and neighbors twice
// must compute each IJK triplet interaction exactly once
// by proc that owns the triplet atom with smallest x coord
// special logic to break ties if multiple atoms have same x or y coords
// inner two loops for jj=1,Jnum and kk=jj+1,Jnum insure
// the pair of other 2 non-minimum-x atoms is only considered once
// triplet geometry criteria for calculation:
// each pair distance <= cutoff
// produce of 3 pair distances <= cutoff_triple^3
for (ii = 0; ii < inum; ii++) {
i = ilist[ii];
xi = x[i][0];
yi = x[i][1];
zi = x[i][2];
jlist = firstneigh[i];
jnum = numneigh[i];
jnumm1 = jnum - 1;
for (jj = 0; jj < jnumm1; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
rij[0] = x[j][0] - xi;
if (rij[0] < 0.0) continue;
rij[1] = x[j][1] - yi;
if (rij[0] == 0.0 and rij[1] < 0.0) continue;
rij[2] = x[j][2] - zi;
if (rij[0] == 0.0 and rij[1] == 0.0 and rij[2] < 0.0) continue;
rij2 = rij[0]*rij[0] + rij[1]*rij[1] + rij[2]*rij[2];
if (rij2 > cutoff_squared) continue;
for (kk = jj+1; kk < jnum; kk++) {
k = jlist[kk];
k &= NEIGHMASK;
rik[0] = x[k][0] - xi;
if (rik[0] < 0.0) continue;
rik[1] = x[k][1] - yi;
if (rik[0] == 0.0 and rik[1] < 0.0) continue;
rik[2] = x[k][2] - zi;
if (rik[0] == 0.0 and rik[1] == 0.0 and rik[2] < 0.0) continue;
rik2 = rik[0]*rik[0] + rik[1]*rik[1] + rik[2]*rik[2];
if (rik2 > cutoff_squared) continue;
rjk[0] = x[k][0] - x[j][0];
rjk[1] = x[k][1] - x[j][1];
rjk[2] = x[k][2] - x[j][2];
rjk2 = rjk[0]*rjk[0] + rjk[1]*rjk[1] + rjk[2]*rjk[2];
if (rjk2 > cutoff_squared) continue;
double r6 = rij2*rjk2*rik2;
if (r6 > cutoff_triple_sixth) continue;
nu_local = nu[type[i]][type[j]][type[k]];
if (nu_local == 0.0) continue;
interaction_ddd(nu_local,
r6,rij2,rik2,rjk2,rij,rik,rjk,fj,fk,eflag,evdwl);
f[i][0] -= fj[0] + fk[0];
f[i][1] -= fj[1] + fk[1];
f[i][2] -= fj[2] + fk[2];
f[j][0] += fj[0];
f[j][1] += fj[1];
f[j][2] += fj[2];
f[k][0] += fk[0];
f[k][1] += fk[1];
f[k][2] += fk[2];
if (evflag) ev_tally3(i,j,k,evdwl,0.0,fj,fk,rij,rik);
}
}
}
if (vflag_fdotr) virial_fdotr_compute();
}
/* ---------------------------------------------------------------------- */
void PairATM::allocate()
{
allocated = 1;
int n = atom->ntypes;
memory->create(setflag,n+1,n+1,"pair:setflag");
for (int i = 1; i <= n; i++)
for (int j = i; j <= n; j++)
setflag[i][j] = 0;
memory->create(cutsq,n+1,n+1,"pair:cutsq");
memory->create(nu,n+1,n+1,n+1,"pair:nu");
// initialize all nu values to 0.0
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
for (int k = 1; k <= n; k++)
nu[i][j][k] = 0.0;
}
/* ----------------------------------------------------------------------
global settings
------------------------------------------------------------------------- */
void PairATM::settings(int narg, char **arg)
{
if (narg != 2) error->all(FLERR,"Illegal pair_style command");
cut_global = force->numeric(FLERR,arg[0]);
cut_triple = force->numeric(FLERR,arg[1]);
}
/* ----------------------------------------------------------------------
set coefficients for one I,J,K type triplet
------------------------------------------------------------------------- */
void PairATM::coeff(int narg, char **arg)
{
if (narg != 4) error->all(FLERR,"Incorrect args for pair coefficients");
if (!allocated) allocate();
int ilo,ihi,jlo,jhi,klo,khi;
force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi);
force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi);
force->bounds(FLERR,arg[2],atom->ntypes,klo,khi);
double nu_one = force->numeric(FLERR,arg[3]);
int count = 0;
for (int i = ilo; i <= ihi; i++) {
for (int j = MAX(jlo,i); j<=jhi; j++) {
for (int k = MAX(klo,j); k<=khi; k++) {
nu[i][j][k] = nu_one;
count++;
}
setflag[i][j] = 1;
}
}
if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients");
}
/* ----------------------------------------------------------------------
init specific to this pair style
------------------------------------------------------------------------- */
void PairATM::init_style()
{
if (force->newton_pair == 0)
error->all(FLERR,"Pair style ATM requires newton pair on");
// need a full neighbor list
int irequest = neighbor->request(this,instance_me);
neighbor->requests[irequest]->half = 0;
neighbor->requests[irequest]->full = 1;
}
/* ----------------------------------------------------------------------
init for one i,j type pair and corresponding j,i
also for all k type permutations
------------------------------------------------------------------------- */
double PairATM::init_one(int i, int j)
{
if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
// set all 6 symmetric permutations of I,J,K types to same nu value
int ntypes = atom->ntypes;
for (int k = j; k <= ntypes; k++)
nu[i][k][j] = nu[j][i][k] = nu[j][k][i] = nu[k][i][j] = nu[k][j][i] =
nu[i][j][k];
return cut_global;
}
/* ----------------------------------------------------------------------
proc 0 writes to restart file
------------------------------------------------------------------------- */
void PairATM::write_restart(FILE *fp)
{
write_restart_settings(fp);
int i,j,k;
for (i = 1; i <= atom->ntypes; i++) {
for (j = i; j <= atom->ntypes; j++) {
fwrite(&setflag[i][j],sizeof(int),1,fp);
if (setflag[i][j])
for (k = j; k <= atom->ntypes; k++)
fwrite(&nu[i][j][k],sizeof(double),1,fp);
}
}
}
/* ----------------------------------------------------------------------
proc 0 reads from restart file, bcasts
------------------------------------------------------------------------- */
void PairATM::read_restart(FILE *fp)
{
read_restart_settings(fp);
allocate();
int i,j,k;
int me = comm->me;
for (i = 1; i <= atom->ntypes; i++) {
for (j = i; j <= atom->ntypes; j++) {
if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp);
MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world);
if (setflag[i][j]) for (k = j; k <= atom->ntypes; k++) {
if (me == 0) fread(&nu[i][j][k],sizeof(double),1,fp);
MPI_Bcast(&nu[i][j][k],1,MPI_DOUBLE,0,world);
}
}
}
}
/* ----------------------------------------------------------------------
proc 0 writes to restart file
------------------------------------------------------------------------- */
void PairATM::write_restart_settings(FILE *fp)
{
fwrite(&cut_global,sizeof(double),1,fp);
fwrite(&cut_triple,sizeof(double),1,fp);
}
/* ----------------------------------------------------------------------
proc 0 reads from restart file, bcasts
------------------------------------------------------------------------- */
void PairATM::read_restart_settings(FILE *fp)
{
int me = comm->me;
if (me == 0) {
fread(&cut_global,sizeof(double),1,fp);
fread(&cut_triple,sizeof(double),1,fp);
}
MPI_Bcast(&cut_global,1,MPI_DOUBLE,0,world);
MPI_Bcast(&cut_triple,1,MPI_DOUBLE,0,world);
}
/* ----------------------------------------------------------------------
Axilrod-Teller-Muto (dipole-dipole-dipole) potential
------------------------------------------------------------------------- */
void PairATM::interaction_ddd(double nu, double r6,
double rij2, double rik2, double rjk2,
double *rij, double *rik, double *rjk,
double *fj, double *fk, int eflag, double &eng)
{
double r5inv,rri,rrj,rrk,rrr;
r5inv = nu / (r6*r6*sqrt(r6));
rri = rik[0]*rij[0] + rik[1]*rij[1] + rik[2]*rij[2];
rrj = rij[0]*rjk[0] + rij[1]*rjk[1] + rij[2]*rjk[2];
rrk = rjk[0]*rik[0] + rjk[1]*rik[1] + rjk[2]*rik[2];
rrr = 5.0*rri*rrj*rrk;
for (int i = 0; i < 3; i++) {
fj[i] = rrj*(rrk - rri)*rik[i] -
(rrk*rri - rjk2*rik2 + rrr/rij2) * rij[i] +
(rrk*rri - rik2*rij2 + rrr/rjk2) * rjk[i];
fj[i] *= 3.0*r5inv;
fk[i] = rrk*(rri + rrj)*rij[i] +
(rri*rrj + rik2*rij2 - rrr/rjk2) * rjk[i] +
(rri*rrj + rij2*rjk2 - rrr/rik2) * rik[i];
fk[i] *= 3.0*r5inv;
}
if (eflag) eng = (r6 - 0.6*rrr)*r5inv;
}

77
src/MANYBODY/pair_atm.h Normal file
View File

@ -0,0 +1,77 @@
/* -*- c++ -*- ----------------------------------------------------------
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.
------------------------------------------------------------------------- */
#ifdef PAIR_CLASS
PairStyle(atm,PairATM)
#else
#ifndef LMP_PAIR_ATM_H
#define LMP_PAIR_ATM_H
#include "pair.h"
namespace LAMMPS_NS {
class PairATM : public Pair {
public:
PairATM(class LAMMPS *);
virtual ~PairATM();
virtual void compute(int, int);
void settings(int, char **);
virtual void coeff(int, char **);
virtual void init_style();
virtual double init_one(int, int);
void write_restart(FILE *);
void read_restart(FILE *);
void write_restart_settings(FILE *);
void read_restart_settings(FILE *);
protected:
double cut_global,cut_triple;
double ***nu;
void allocate();
void interaction_ddd(double, double, double, double, double, double *,
double *, double *, double *, double *, int, double &);
};
}
#endif
#endif
/* ERROR/WARNING messages:
E: Illegal pair_style command
Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Incorrect args for pair coefficients
Self-explanatory. Check the input script or data file.
E: Pair style ATM requires newton pair on
See the newton command. This is a restriction to use the ATM
potential.
E: All pair coeffs are not set
All pair coefficients must be set in the data file or by the
pair_coeff command before running a simulation.
*/

View File

@ -432,7 +432,7 @@ void PairComb::allocate()
global settings
------------------------------------------------------------------------- */
void PairComb::settings(int narg, char **arg)
void PairComb::settings(int narg, char **/*arg*/)
{
if (narg > 0) error->all(FLERR,"Illegal pair_style command");
}
@ -1542,7 +1542,7 @@ void PairComb::potal_calc(double &calc1, double &calc2, double &calc3)
void PairComb::tri_point(double rsq, int &mr1, int &mr2,
int &mr3, double &sr1, double &sr2,
double &sr3, int &itype)
double &sr3, int &/*itype*/)
{
double r, rin, dr, dd, rr1, rridr, rridr2;
@ -1572,7 +1572,7 @@ void PairComb::tri_point(double rsq, int &mr1, int &mr2,
void PairComb::direct(int inty, int mr1, int mr2, int mr3, double rsq,
double sr1, double sr2, double sr3,
double iq, double jq,
double potal, double fac11, double fac11e,
double /*potal*/, double fac11, double fac11e,
double &pot_tmp, double &pot_d)
{
double r,erfcc,fafbn1,potij,sme2,esucon;
@ -2002,7 +2002,7 @@ void PairComb::Over_cor(Param *param, double rsq1, int NCoi,
/* ---------------------------------------------------------------------- */
int PairComb::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -1569,7 +1569,7 @@ void PairComb3::compute(int eflag, int vflag)
/* ---------------------------------------------------------------------- */
void PairComb3::repulsive(Param *parami, Param *paramj, double rsq,
double &fforce,int eflag, double &eng, double iq, double jq)
double &fforce,int /*eflag*/, double &eng, double iq, double jq)
{
double r,tmp_fc,tmp_fc_d,Di,Dj;
double caj,vrcs,fvrcs;
@ -1614,7 +1614,7 @@ void PairComb3::repulsive(Param *parami, Param *paramj, double rsq,
/* ---------------------------------------------------------------------- */
double PairComb3::zeta(Param *parami, Param *paramj, double rsqij,
double rsqik, double *delrij, double *delrik, int i, double xcn)
double rsqik, double *delrij, double *delrik, int /*i*/, double xcn)
{
double rij,rik,costheta,arg,ex_delr,rlm3;
@ -1661,7 +1661,7 @@ void PairComb3::selfp6p(Param *parami, Param *paramj, double rsq,
/* ---------------------------------------------------------------------- */
double PairComb3::ep6p(Param *paramj, Param *paramk, double rsqij, double rsqik,
double *delrij, double *delrik , double &zet_add)
double *delrij, double *delrik , double &/*zet_add*/)
{
double comtt;
double pplp0 = paramj->p6p0;
@ -2109,7 +2109,7 @@ void PairComb3::coord(Param *param, double r, int i,
void PairComb3::cntri_int(int tri_flag, double xval, double yval,
double zval, int ixmin, int iymin, int izmin, double &vval,
double &dvalx, double &dvaly, double &dvalz, Param *param)
double &dvalx, double &dvaly, double &dvalz, Param * /*param*/)
{
double x;
vval = 0.0; dvalx = 0.0; dvaly = 0.0; dvalz = 0.0;
@ -2254,7 +2254,7 @@ void PairComb3::comb_gijk_d(double costheta, Param *param, double nco_tmp,
void PairComb3::attractive(Param *parami, Param *paramj , Param *paramk, double prefac_ij1,
double prefac_ij2, double prefac_ij3, double prefac_ij4,
double prefac_ij5, double rsqij, double rsqik, double *delrij,
double *delrik, double *fi, double *fj,double *fk, int i, double xcn)
double *delrik, double *fi, double *fj,double *fk, int /*i*/, double xcn)
{
double rij_hat[3],rik_hat[3];
double rij,rijinv,rik,rikinv;
@ -2867,7 +2867,7 @@ void PairComb3::field(Param *parami, Param *paramj, double rsq, double iq,
/* ---------------------------------------------------------------------- */
double PairComb3::rad_init(double rsq2,Param *param,int i,
double PairComb3::rad_init(double rsq2,Param *param,int /*i*/,
double &radtot, double cnconj)
{
double r, fc1k, radcut;
@ -2882,7 +2882,7 @@ double PairComb3::rad_init(double rsq2,Param *param,int i,
/* ---------------------------------------------------------------------- */
void PairComb3::rad_calc(double r, Param *parami, Param *paramj,
double kconjug, double lconjug, int i, int j, double xcn, double ycn)
double kconjug, double lconjug, int /*i*/, int /*j*/, double xcn, double ycn)
{
int ixmin, iymin, izmin;
int radindx;
@ -3061,7 +3061,7 @@ double PairComb3::bbtor1(int torindx, Param *paramk, Param *paraml,
/* ---------------------------------------------------------------------- */
void PairComb3::tor_calc(double r, Param *parami, Param *paramj,
double kconjug, double lconjug, int i, int j, double xcn, double ycn)
double kconjug, double lconjug, int /*i*/, int /*j*/, double xcn, double ycn)
{
int ixmin, iymin, izmin;
double vtor, dtorx, dtory, dtorz;
@ -3589,7 +3589,7 @@ void PairComb3::qfo_dipole(double fac11, int mr1, int mr2, int mr3,
void PairComb3::qfo_short(Param *parami, Param *paramj, double rsq,
double iq, double jq, double &fqij, double &fqji,
int i, int j, int nj)
int i, int /*j*/, int nj)
{
double r, tmp_fc;
double Di, Dj, dDi, dDj, Bsi, Bsj, dBsi, dBsj;
@ -3863,7 +3863,7 @@ double PairComb3::switching_d(double rr)
/* ---------------------------------------------------------------------- */
int PairComb3::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -347,7 +347,7 @@ void PairEAM::allocate()
global settings
------------------------------------------------------------------------- */
void PairEAM::settings(int narg, char **arg)
void PairEAM::settings(int narg, char **/*arg*/)
{
if (narg > 0) error->all(FLERR,"Illegal pair_style command");
}
@ -795,7 +795,7 @@ void PairEAM::grab(FILE *fptr, int n, double *list)
/* ---------------------------------------------------------------------- */
double PairEAM::single(int i, int j, int itype, int jtype,
double rsq, double factor_coul, double factor_lj,
double rsq, double /*factor_coul*/, double /*factor_lj*/,
double &fforce)
{
int m;
@ -829,7 +829,7 @@ double PairEAM::single(int i, int j, int itype, int jtype,
/* ---------------------------------------------------------------------- */
int PairEAM::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -539,7 +539,7 @@ void PairEAMCD::read_h_coeff(char *filename)
/* ---------------------------------------------------------------------- */
int PairEAMCD::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -342,7 +342,7 @@ void PairEIM::allocate()
global settings
------------------------------------------------------------------------- */
void PairEIM::settings(int narg, char **arg)
void PairEIM::settings(int narg, char **/*arg*/)
{
if (narg > 0) error->all(FLERR,"Illegal pair_style command");
}
@ -850,7 +850,7 @@ void PairEIM::array2spline()
/* ---------------------------------------------------------------------- */
void PairEIM::interpolate(int n, double delta, double *f,
double **spline, double origin)
double **spline, double /*origin*/)
{
for (int m = 1; m <= n; m++) spline[m][6] = f[m];
@ -1087,7 +1087,7 @@ double PairEIM::funccoul(int i, int j, double r)
/* ---------------------------------------------------------------------- */
int PairEIM::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -257,7 +257,7 @@ void PairGW::allocate()
global settings
------------------------------------------------------------------------- */
void PairGW::settings(int narg, char **arg)
void PairGW::settings(int narg, char **/*arg*/)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
}

View File

@ -121,7 +121,7 @@ void PairLCBOP::allocate()
global settings
------------------------------------------------------------------------- */
void PairLCBOP::settings(int narg, char **arg) {
void PairLCBOP::settings(int narg, char **/*arg*/) {
if( narg != 0 ) error->all(FLERR,"Illegal pair_style command");
}
@ -353,7 +353,7 @@ void PairLCBOP::SR_neigh()
Short range forces and energy
------------------------------------------------------------------------- */
void PairLCBOP::FSR(int eflag, int vflag)
void PairLCBOP::FSR(int eflag, int /*vflag*/)
{
int i,j,jj,ii,inum;
tagint itag,jtag;
@ -449,7 +449,7 @@ void PairLCBOP::FSR(int eflag, int vflag)
compute long range forces and energy
------------------------------------------------------------------------- */
void PairLCBOP::FLR(int eflag, int vflag)
void PairLCBOP::FLR(int eflag, int /*vflag*/)
{
int i,j,jj,ii;
tagint itag,jtag;

View File

@ -174,7 +174,7 @@ void PairNb3bHarmonic::allocate()
global settings
------------------------------------------------------------------------- */
void PairNb3bHarmonic::settings(int narg, char **arg)
void PairNb3bHarmonic::settings(int narg, char **/*arg*/)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
}
@ -454,7 +454,7 @@ void PairNb3bHarmonic::setup_params()
/* ---------------------------------------------------------------------- */
void PairNb3bHarmonic::threebody(Param *paramij, Param *paramik,
void PairNb3bHarmonic::threebody(Param * /*paramij*/, Param * /*paramik*/,
Param *paramijk,
double rsq1, double rsq2,
double *delr1, double *delr2,

View File

@ -450,7 +450,7 @@ void PairPolymorphic::allocate()
global settings
------------------------------------------------------------------------- */
void PairPolymorphic::settings(int narg, char **arg)
void PairPolymorphic::settings(int narg, char **/*arg*/)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
}

View File

@ -24,7 +24,7 @@ PairREBO::PairREBO(LAMMPS *lmp) : PairAIREBO(lmp) {}
global settings
------------------------------------------------------------------------- */
void PairREBO::settings(int narg, char **arg)
void PairREBO::settings(int narg, char **/*arg*/)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");

View File

@ -239,7 +239,7 @@ void PairSW::allocate()
global settings
------------------------------------------------------------------------- */
void PairSW::settings(int narg, char **arg)
void PairSW::settings(int narg, char **/*arg*/)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
}

View File

@ -280,7 +280,7 @@ void PairTersoff::allocate()
global settings
------------------------------------------------------------------------- */
void PairTersoff::settings(int narg, char **arg)
void PairTersoff::settings(int narg, char **/*arg*/)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
}

View File

@ -245,7 +245,7 @@ void PairVashishta::allocate()
global settings
------------------------------------------------------------------------- */
void PairVashishta::settings(int narg, char **arg)
void PairVashishta::settings(int narg, char **/*arg*/)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
}

View File

@ -695,7 +695,7 @@ void FixAtomSwap::update_swap_atoms_list()
/* ---------------------------------------------------------------------- */
int FixAtomSwap::pack_forward_comm(int n, int *list, double *buf, int pbc_flag, int *pbc)
int FixAtomSwap::pack_forward_comm(int n, int *list, double *buf, int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -693,7 +693,7 @@ int FixBondBreak::dedup(int nstart, int nstop, tagint *copy)
/* ---------------------------------------------------------------------- */
void FixBondBreak::post_integrate_respa(int ilevel, int iloop)
void FixBondBreak::post_integrate_respa(int ilevel, int /*iloop*/)
{
if (ilevel == nlevels_respa-1) post_integrate();
}
@ -701,7 +701,7 @@ void FixBondBreak::post_integrate_respa(int ilevel, int iloop)
/* ---------------------------------------------------------------------- */
int FixBondBreak::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,k,m,ns;

View File

@ -258,14 +258,14 @@ void FixBondCreate::init()
/* ---------------------------------------------------------------------- */
void FixBondCreate::init_list(int id, NeighList *ptr)
void FixBondCreate::init_list(int /*id*/, NeighList *ptr)
{
list = ptr;
}
/* ---------------------------------------------------------------------- */
void FixBondCreate::setup(int vflag)
void FixBondCreate::setup(int /*vflag*/)
{
int i,j,m;
@ -1206,7 +1206,7 @@ int FixBondCreate::dedup(int nstart, int nstop, tagint *copy)
/* ---------------------------------------------------------------------- */
void FixBondCreate::post_integrate_respa(int ilevel, int iloop)
void FixBondCreate::post_integrate_respa(int ilevel, int /*iloop*/)
{
if (ilevel == nlevels_respa-1) post_integrate();
}
@ -1214,7 +1214,7 @@ void FixBondCreate::post_integrate_respa(int ilevel, int iloop)
/* ---------------------------------------------------------------------- */
int FixBondCreate::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,k,m,ns;
@ -1347,7 +1347,7 @@ void FixBondCreate::grow_arrays(int nmax)
copy values within local atom-based arrays
------------------------------------------------------------------------- */
void FixBondCreate::copy_arrays(int i, int j, int delflag)
void FixBondCreate::copy_arrays(int i, int j, int /*delflag*/)
{
bondcount[j] = bondcount[i];
}

View File

@ -182,7 +182,7 @@ void FixBondSwap::init()
/* ---------------------------------------------------------------------- */
void FixBondSwap::init_list(int id, NeighList *ptr)
void FixBondSwap::init_list(int /*id*/, NeighList *ptr)
{
list = ptr;
}

View File

@ -158,7 +158,7 @@ void FixTFMC::init()
/* ---------------------------------------------------------------------- */
void FixTFMC::initial_integrate(int vflag)
void FixTFMC::initial_integrate(int /*vflag*/)
{
double boltz = force->boltz;
double **x = atom->x;

View File

@ -65,7 +65,7 @@ PairDSMC::~PairDSMC()
/* ---------------------------------------------------------------------- */
void PairDSMC::compute(int eflag, int vflag)
void PairDSMC::compute(int /*eflag*/, int /*vflag*/)
{
double **x = atom->x;
double *mass = atom->mass;
@ -405,7 +405,7 @@ void PairDSMC::read_restart_settings(FILE *fp)
the next nrezero timesteps
-------------------------------------------------------------------------*/
void PairDSMC::recompute_V_sigma_max(int icell)
void PairDSMC::recompute_V_sigma_max(int /*icell*/)
{
int i,j,k;
double Vsigma_max = 0;
@ -459,7 +459,7 @@ double PairDSMC::V_sigma(int i, int j)
generate new velocities for collided particles
-------------------------------------------------------------------------*/
void PairDSMC::scatter_random(int i, int j, int icell)
void PairDSMC::scatter_random(int i, int j, int /*icell*/)
{
double mag_delv,cos_phi,cos_squared,r,theta;
double delv[3],vcm[3];

View File

@ -325,7 +325,7 @@ void PairMEAM::allocate()
global settings
------------------------------------------------------------------------- */
void PairMEAM::settings(int narg, char **arg)
void PairMEAM::settings(int narg, char **/*arg*/)
{
if (narg != 0) error->all(FLERR,"Illegal pair_style command");
}
@ -448,7 +448,7 @@ void PairMEAM::init_list(int id, NeighList *ptr)
init for one type pair i,j and corresponding j,i
------------------------------------------------------------------------- */
double PairMEAM::init_one(int i, int j)
double PairMEAM::init_one(int /*i*/, int /*j*/)
{
return cutmax;
}
@ -734,7 +734,7 @@ void PairMEAM::read_files(char *globalfile, char *userfile)
/* ---------------------------------------------------------------------- */
int PairMEAM::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,k,m;

View File

@ -412,7 +412,7 @@ void FixEfield::post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixEfield::post_force_respa(int vflag, int ilevel, int iloop)
void FixEfield::post_force_respa(int vflag, int ilevel, int /*iloop*/)
{
if (ilevel == ilevel_respa) post_force(vflag);
}

View File

@ -217,7 +217,7 @@ void FixGLD::init()
First half of a timestep (V^{n} -> V^{n+1/2}; X^{n} -> X^{n+1})
------------------------------------------------------------------------- */
void FixGLD::initial_integrate(int vflag)
void FixGLD::initial_integrate(int /*vflag*/)
{
double dtfm;
double ftm2v = force->ftm2v;
@ -444,7 +444,7 @@ void FixGLD::final_integrate()
/* ---------------------------------------------------------------------- */
void FixGLD::initial_integrate_respa(int vflag, int ilevel, int iloop)
void FixGLD::initial_integrate_respa(int vflag, int ilevel, int /*iloop*/)
{
dtv = step_respa[ilevel];
dtf = 0.5 * step_respa[ilevel] * (force->ftm2v);
@ -458,7 +458,7 @@ void FixGLD::initial_integrate_respa(int vflag, int ilevel, int iloop)
/* ---------------------------------------------------------------------- */
void FixGLD::final_integrate_respa(int ilevel, int iloop)
void FixGLD::final_integrate_respa(int ilevel, int /*iloop*/)
{
dtf = 0.5 * step_respa[ilevel] * (force->ftm2v);
final_integrate();
@ -507,7 +507,7 @@ void FixGLD::grow_arrays(int nmax)
copy values within local atom-based arrays
------------------------------------------------------------------------- */
void FixGLD::copy_arrays(int i, int j, int delflag)
void FixGLD::copy_arrays(int i, int j, int /*delflag*/)
{
for (int k = 0; k < 3*prony_terms; k++) {
s_gld[j][k] = s_gld[i][k];
@ -588,7 +588,7 @@ void FixGLD::unpack_restart(int nlocal, int nth)
fixes on a given processor.
------------------------------------------------------------------------- */
int FixGLD::size_restart(int nlocal)
int FixGLD::size_restart(int /*nlocal*/)
{
return 3*prony_terms+1;
}

View File

@ -230,7 +230,7 @@ void FixOrientBCC::init()
/* ---------------------------------------------------------------------- */
void FixOrientBCC::init_list(int id, NeighList *ptr)
void FixOrientBCC::init_list(int /*id*/, NeighList *ptr)
{
list = ptr;
}
@ -250,7 +250,7 @@ void FixOrientBCC::setup(int vflag)
/* ---------------------------------------------------------------------- */
void FixOrientBCC::post_force(int vflag)
void FixOrientBCC::post_force(int /*vflag*/)
{
int i,j,k,ii,jj,inum,jnum,m,n,nn,nsort;
tagint id_self;
@ -471,7 +471,7 @@ void FixOrientBCC::post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixOrientBCC::post_force_respa(int vflag, int ilevel, int iloop)
void FixOrientBCC::post_force_respa(int vflag, int ilevel, int /*iloop*/)
{
if (ilevel == ilevel_respa) post_force(vflag);
}
@ -488,7 +488,7 @@ double FixOrientBCC::compute_scalar()
/* ---------------------------------------------------------------------- */
int FixOrientBCC::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,k,num;
tagint id;

View File

@ -228,7 +228,7 @@ void FixOrientFCC::init()
/* ---------------------------------------------------------------------- */
void FixOrientFCC::init_list(int id, NeighList *ptr)
void FixOrientFCC::init_list(int /*id*/, NeighList *ptr)
{
list = ptr;
}
@ -248,7 +248,7 @@ void FixOrientFCC::setup(int vflag)
/* ---------------------------------------------------------------------- */
void FixOrientFCC::post_force(int vflag)
void FixOrientFCC::post_force(int /*vflag*/)
{
int i,j,k,ii,jj,inum,jnum,m,n,nn,nsort;
tagint id_self;
@ -469,7 +469,7 @@ void FixOrientFCC::post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixOrientFCC::post_force_respa(int vflag, int ilevel, int iloop)
void FixOrientFCC::post_force_respa(int vflag, int ilevel, int /*iloop*/)
{
if (ilevel == ilevel_respa) post_force(vflag);
}
@ -486,7 +486,7 @@ double FixOrientFCC::compute_scalar()
/* ---------------------------------------------------------------------- */
int FixOrientFCC::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,k,num;
tagint id;

View File

@ -235,7 +235,7 @@ void FixTTM::setup(int vflag)
/* ---------------------------------------------------------------------- */
void FixTTM::post_force(int vflag)
void FixTTM::post_force(int /*vflag*/)
{
double **x = atom->x;
double **v = atom->v;
@ -287,7 +287,7 @@ void FixTTM::post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixTTM::post_force_setup(int vflag)
void FixTTM::post_force_setup(int /*vflag*/)
{
double **f = atom->f;
int *mask = atom->mask;
@ -306,14 +306,14 @@ void FixTTM::post_force_setup(int vflag)
/* ---------------------------------------------------------------------- */
void FixTTM::post_force_respa(int vflag, int ilevel, int iloop)
void FixTTM::post_force_respa(int vflag, int ilevel, int /*iloop*/)
{
if (ilevel == nlevels_respa-1) post_force(vflag);
}
/* ---------------------------------------------------------------------- */
void FixTTM::post_force_respa_setup(int vflag, int ilevel, int iloop)
void FixTTM::post_force_respa_setup(int vflag, int ilevel, int /*iloop*/)
{
if (ilevel == nlevels_respa-1) post_force_setup(vflag);
}
@ -685,7 +685,7 @@ int FixTTM::maxsize_restart()
size of atom nlocal's restart data
------------------------------------------------------------------------- */
int FixTTM::size_restart(int nlocal)
int FixTTM::size_restart(int /*nlocal*/)
{
return 4;
}

View File

@ -401,8 +401,8 @@ void PairNMCut::write_data_all(FILE *fp)
/* ---------------------------------------------------------------------- */
double PairNMCut::single(int i, int j, int itype, int jtype,
double rsq, double factor_coul, double factor_lj,
double PairNMCut::single(int /*i*/, int /*j*/, int itype, int jtype,
double rsq, double /*factor_coul*/, double factor_lj,
double &fforce)
{
double r2inv,r,forcenm,phinm;

View File

@ -650,7 +650,7 @@ xdrstdio_setpos (XDR *xdrs, unsigned int pos)
}
static xdr_int32_t *
xdrstdio_inline (XDR *xdrs, int len)
xdrstdio_inline (XDR * /*xdrs*/, int /*len*/)
{
/*
* Must do some work to implement this: must insure

View File

@ -172,7 +172,7 @@ void AngleCosine::coeff(int narg, char **arg)
/* ---------------------------------------------------------------------- */
double AngleCosine::equilibrium_angle(int i)
double AngleCosine::equilibrium_angle(int /*i*/)
{
return MY_PI;
}

View File

@ -222,7 +222,7 @@ void AngleCosinePeriodic::coeff(int narg, char **arg)
/* ---------------------------------------------------------------------- */
double AngleCosinePeriodic::equilibrium_angle(int i)
double AngleCosinePeriodic::equilibrium_angle(int /*i*/)
{
return MY_PI;
}

View File

@ -242,7 +242,7 @@ void BondFENE::write_data(FILE *fp)
/* ---------------------------------------------------------------------- */
double BondFENE::single(int type, double rsq, int i, int j,
double BondFENE::single(int type, double rsq, int /*i*/, int /*j*/,
double &fforce)
{
double r0sq = r0[type] * r0[type];

View File

@ -253,7 +253,7 @@ void BondFENEExpand::write_data(FILE *fp)
/* ---------------------------------------------------------------------- */
double BondFENEExpand::single(int type, double rsq, int i, int j,
double BondFENEExpand::single(int type, double rsq, int /*i*/, int /*j*/,
double &fforce)
{
double r = sqrt(rsq);

View File

@ -190,7 +190,7 @@ void BondGromos::write_data(FILE *fp)
/* ---------------------------------------------------------------------- */
double BondGromos::single(int type, double rsq, int i, int j,
double BondGromos::single(int type, double rsq, int /*i*/, int /*j*/,
double &fforce)
{
double dr = rsq - r0[type]*r0[type];

View File

@ -190,7 +190,7 @@ void BondHarmonic::write_data(FILE *fp)
/* ---------------------------------------------------------------------- */
double BondHarmonic::single(int type, double rsq, int i, int j,
double BondHarmonic::single(int type, double rsq, int /*i*/, int /*j*/,
double &fforce)
{
double r = sqrt(rsq);

View File

@ -196,7 +196,7 @@ void BondMorse::write_data(FILE *fp)
/* ---------------------------------------------------------------------- */
double BondMorse::single(int type, double rsq, int i, int j,
double BondMorse::single(int type, double rsq, int /*i*/, int /*j*/,
double &fforce)
{
double r = sqrt(rsq);

View File

@ -191,7 +191,7 @@ void BondNonlinear::write_data(FILE *fp)
/* ---------------------------------------------------------------------- */
double BondNonlinear::single(int type, double rsq, int i, int j,
double BondNonlinear::single(int type, double rsq, int /*i*/, int /*j*/,
double &fforce)
{
double r = sqrt(rsq);

View File

@ -251,7 +251,7 @@ void BondQuartic::init_style()
return an equilbrium bond length
------------------------------------------------------------------------- */
double BondQuartic::equilibrium_distance(int i)
double BondQuartic::equilibrium_distance(int /*i*/)
{
return 0.97;
}

View File

@ -244,7 +244,7 @@ void BondTable::read_restart(FILE *fp)
/* ---------------------------------------------------------------------- */
double BondTable::single(int type, double rsq, int i, int j,
double BondTable::single(int type, double rsq, int /*i*/, int /*j*/,
double &fforce)
{
double r = sqrt(rsq);

View File

@ -295,7 +295,7 @@ void FixCMAP::pre_neighbor()
store eflag, so can use it in post_force to tally per-atom energies
------------------------------------------------------------------------- */
void FixCMAP::pre_reverse(int eflag, int vflag)
void FixCMAP::pre_reverse(int eflag, int /*vflag*/)
{
eflag_caller = eflag;
}
@ -604,7 +604,7 @@ void FixCMAP::post_force(int vflag)
/* ---------------------------------------------------------------------- */
void FixCMAP::post_force_respa(int vflag, int ilevel, int iloop)
void FixCMAP::post_force_respa(int vflag, int ilevel, int /*iloop*/)
{
if (ilevel == nlevels_respa-1) post_force(vflag);
}
@ -1163,7 +1163,7 @@ void FixCMAP::read_data_section(char *keyword, int n, char *buf,
/* ---------------------------------------------------------------------- */
bigint FixCMAP::read_data_skip_lines(char *keyword)
bigint FixCMAP::read_data_skip_lines(char * /*keyword*/)
{
return ncmap;
}
@ -1173,7 +1173,7 @@ bigint FixCMAP::read_data_skip_lines(char *keyword)
only called by proc 0
------------------------------------------------------------------------- */
void FixCMAP::write_data_header(FILE *fp, int mth)
void FixCMAP::write_data_header(FILE *fp, int /*mth*/)
{
fprintf(fp,BIGINT_FORMAT " cmap crossterms\n",ncmap);
}
@ -1186,7 +1186,7 @@ void FixCMAP::write_data_header(FILE *fp, int mth)
ny = columns = type + 5 atom IDs
------------------------------------------------------------------------- */
void FixCMAP::write_data_section_size(int mth, int &nx, int &ny)
void FixCMAP::write_data_section_size(int /*mth*/, int &nx, int &ny)
{
int i,m;
@ -1206,7 +1206,7 @@ void FixCMAP::write_data_section_size(int mth, int &nx, int &ny)
buf allocated by caller as owned crossterms by 6
------------------------------------------------------------------------- */
void FixCMAP::write_data_section_pack(int mth, double **buf)
void FixCMAP::write_data_section_pack(int /*mth*/, double **buf)
{
int i,m;
@ -1237,7 +1237,7 @@ void FixCMAP::write_data_section_pack(int mth, double **buf)
only called by proc 0
------------------------------------------------------------------------- */
void FixCMAP::write_data_section_keyword(int mth, FILE *fp)
void FixCMAP::write_data_section_keyword(int /*mth*/, FILE *fp)
{
fprintf(fp,"\nCMAP\n\n");
}
@ -1249,7 +1249,7 @@ void FixCMAP::write_data_section_keyword(int mth, FILE *fp)
only called by proc 0
------------------------------------------------------------------------- */
void FixCMAP::write_data_section(int mth, FILE *fp,
void FixCMAP::write_data_section(int /*mth*/, FILE *fp,
int n, double **buf, int index)
{
for (int i = 0; i < n; i++)
@ -1383,7 +1383,7 @@ void FixCMAP::grow_arrays(int nmax)
copy values within local atom-based array
------------------------------------------------------------------------- */
void FixCMAP::copy_arrays(int i, int j, int delflag)
void FixCMAP::copy_arrays(int i, int j, int /*delflag*/)
{
num_crossterm[j] = num_crossterm[i];

View File

@ -468,7 +468,7 @@ double PairHbondDreidingLJ::init_one(int i, int j)
double PairHbondDreidingLJ::single(int i, int j, int itype, int jtype,
double rsq,
double factor_coul, double factor_lj,
double /*factor_coul*/, double /*factor_lj*/,
double &fforce)
{
int k,kk,ktype,knum,m;

View File

@ -371,7 +371,7 @@ void PairHbondDreidingMorse::init_style()
double PairHbondDreidingMorse::single(int i, int j, int itype, int jtype,
double rsq,
double factor_coul, double factor_lj,
double /*factor_coul*/, double /*factor_lj*/,
double &fforce)
{
int k,kk,ktype,knum,m;

View File

@ -443,7 +443,7 @@ void PairTIP4PCut::init_style()
init for one type pair i,j and corresponding j,i
------------------------------------------------------------------------- */
double PairTIP4PCut::init_one(int i, int j)
double PairTIP4PCut::init_one(int /*i*/, int /*j*/)
{
// include TIP4P qdist in full cutoff, qdist = 0.0 if not TIP4P

View File

@ -140,7 +140,7 @@ void FixPeriNeigh::init()
/* ---------------------------------------------------------------------- */
void FixPeriNeigh::init_list(int id, NeighList *ptr)
void FixPeriNeigh::init_list(int /*id*/, NeighList *ptr)
{
list = ptr;
}
@ -159,7 +159,7 @@ void FixPeriNeigh::min_setup(int vflag)
must be done in setup (not init) since fix init comes before neigh init
------------------------------------------------------------------------- */
void FixPeriNeigh::setup(int vflag)
void FixPeriNeigh::setup(int /*vflag*/)
{
int i,j,ii,jj,itype,jtype,inum,jnum;
double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
@ -441,7 +441,7 @@ void FixPeriNeigh::grow_arrays(int nmax)
copy values within local atom-based arrays
------------------------------------------------------------------------- */
void FixPeriNeigh::copy_arrays(int i, int j, int delflag)
void FixPeriNeigh::copy_arrays(int i, int j, int /*delflag*/)
{
npartner[j] = npartner[i];
for (int m = 0; m < npartner[j]; m++) {
@ -514,7 +514,7 @@ int FixPeriNeigh::unpack_exchange(int nlocal, double *buf)
/* ---------------------------------------------------------------------- */
int FixPeriNeigh::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -434,7 +434,7 @@ void PairPeriEPS::allocate()
global settings
------------------------------------------------------------------------- */
void PairPeriEPS::settings(int narg, char **arg)
void PairPeriEPS::settings(int narg, char **/*arg*/)
{
if (narg) error->all(FLERR,"Illegal pair_style command");
}
@ -799,7 +799,7 @@ double PairPeriEPS::compute_DeviatoricForceStateNorm(int i)
---------------------------------------------------------------------- */
int PairPeriEPS::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -364,7 +364,7 @@ void PairPeriLPS::allocate()
global settings
------------------------------------------------------------------------- */
void PairPeriLPS::settings(int narg, char **arg)
void PairPeriLPS::settings(int narg, char **/*arg*/)
{
if (narg) error->all(FLERR,"Illegal pair_style command");
}
@ -631,7 +631,7 @@ void PairPeriLPS::compute_dilatation()
---------------------------------------------------------------------- */
int PairPeriLPS::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

View File

@ -297,7 +297,7 @@ void PairPeriPMB::allocate()
global settings
------------------------------------------------------------------------- */
void PairPeriPMB::settings(int narg, char **arg)
void PairPeriPMB::settings(int narg, char **/*arg*/)
{
if (narg) error->all(FLERR,"Illegal pair_style command");
}
@ -441,7 +441,7 @@ void PairPeriPMB::read_restart(FILE *fp)
/* ---------------------------------------------------------------------- */
double PairPeriPMB::single(int i, int j, int itype, int jtype, double rsq,
double factor_coul, double factor_lj,
double /*factor_coul*/, double /*factor_lj*/,
double &fforce)
{
double delx0,dely0,delz0,rsq0;

View File

@ -411,7 +411,7 @@ void PairPeriVES::allocate()
global settings
------------------------------------------------------------------------- */
void PairPeriVES::settings(int narg, char **arg)
void PairPeriVES::settings(int narg, char **/*arg*/)
{
if (narg) error->all(FLERR,"Illegal pair_style command");
}
@ -697,7 +697,7 @@ void PairPeriVES::compute_dilatation()
---------------------------------------------------------------------- */
int PairPeriVES::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
int /*pbc_flag*/, int * /*pbc*/)
{
int i,j,m;

Some files were not shown because too many files have changed in this diff Show More