Compare commits

...

703 Commits

Author SHA1 Message Date
aff5f06e8f Merge pull request #1612 from akohlmey/new_version
Step version string for next patch release
2019-08-02 14:27:13 -04:00
bd3ffe1321 Merge pull request #1603 from eagunn/iss1572clean
Iss1572clean: Clean fix for error handling, clarify data requirements for fix bocs input
2019-08-02 10:43:30 -04:00
11198e9d29 Merge pull request #1607 from giacomofiorin/colvars-update
Update Colvars to version 2019-08-01
2019-08-02 10:43:13 -04:00
a857e7f790 Merge pull request #1608 from wmbrownIntel/intel-eam-eatom-fix
Bug fix for eam/intel per-atom energy calculation.
2019-08-02 10:42:54 -04:00
9c691ddd0f Merge pull request #1610 from wmbrownIntel/intel-ncache-alias-fix
Bug fixes for use of uninitialized variable and strict-aliasing in USER-INTEL
2019-08-02 10:42:37 -04:00
828ddfd957 Merge pull request #1611 from evoyiatzis/patch-1
small clean-up of fix.txt
2019-08-02 10:42:20 -04:00
7ba6b8a06a Merge pull request #1604 from akohlmey/timeout-for-replica
Add support for timeouts to temper commands and a few small fixes
2019-08-02 10:41:44 -04:00
d750cc02c0 Changed the code in the read_F_table function to conform to the "expected behavior" description in #1572. Adopted a best-of-both-worlds approach, though, and processed the whole input file all the way through, emitting a message for each problem found, before issuing a final error message to stop processing. Updated doc to clarify requirement for uniform spacing of pressure correction points. 2019-08-02 08:46:04 -04:00
9ed43e55f0 add some more descriptions for fixes to list of style in fix command docs 2019-08-02 08:41:34 -04:00
8fd28cd78d fix typo 2019-08-02 08:40:59 -04:00
b5f19b93c2 Step version string for next patch release 2019-08-02 05:15:29 -04:00
5076f1a36c small clean-up of fix.txt 2019-08-02 10:55:18 +02:00
f61cd68ca4 add missing parenthesis 2019-08-01 20:43:33 -04:00
5b4b418289 use check_language() instead of enable_language() to get fortran compiler name 2019-08-01 18:24:14 -04:00
8df7f51470 Merge branch 'master' into timeout-for-replica 2019-08-01 16:56:49 -04:00
f9e34825f0 workaround for xcode oddity with compiling voro++ 2019-08-01 16:42:52 -04:00
52e2db44a1 Update Colvars to version 2019-08-01
One new feature (geometric path variables) and bugfixes.

Minimize occurrence of file-read errors in multiple-walker metadynamics
https://github.com/Colvars/colvars/pull/276

Better error messages for RMSD
https://github.com/Colvars/colvars/pull/272

Ensemble-biased metadynamics documentation
https://github.com/Colvars/colvars/pull/261

Fix bug on multiple walkers metadynamics, pmf included twice
https://github.com/Colvars/colvars/pull/259

Implementation of the geometric path collective variables (C++11-only feature)
https://github.com/Colvars/colvars/pull/249
2019-08-01 15:15:58 -04:00
de366c27e2 Merge pull request #1606 from oywg11/fix-ILP-bug
Fix a communication bug of potential #839
2019-08-01 15:01:13 -04:00
5fd323fe32 simplify example folder for ilp/graphene/hbn potential
- flatten directory structure
- remove CPU time and reduce excess precision from output
- delete redundant and unused files
- regenerate reference outputs
2019-08-01 14:24:47 -04:00
64b682b9f9 library compilation fix for clang with exceptions and -DLAMMPS_BIGBIG 2019-08-01 13:40:50 -04:00
083841ab2a another compilation fix 2019-08-01 13:34:05 -04:00
fa6a990536 reduce output precision to default and don't output per-step cpu time 2019-08-01 13:31:52 -04:00
73d2b824bd fix compilation issue of library.cpp with exceptions enabled 2019-08-01 13:31:13 -04:00
e17e6bb45d Merge pull request #1605 from akohlmey/fix-compilation-errors
Fix some compilation errors
2019-08-01 11:24:30 -04:00
2fe4a6490c restore include file cleanup changes 2019-08-01 11:20:06 -04:00
5fe457667e restore showing references to potential files without pathnames 2019-08-01 11:19:39 -04:00
02511a0ae5 Merge branch 'fix-compilation-errors' of https://github.com/akohlmey/lammps into fix-ILP-bug 2019-08-01 17:40:01 +03:00
76bac4cedc Fix communication bug of ILP 2019-08-01 16:39:42 +03:00
8f5cd8661f Fix communication bug of ILP 2019-08-01 16:38:19 +03:00
e57c3c04d0 Bug fixes for use of uninitialized variable and strict-aliasing in USER-INTEL. 2019-08-01 05:32:18 -07:00
c967c09561 correct compilation error with exceptions enabled in main.cpp 2019-08-01 08:14:27 -04:00
a6bd86eb77 make USER-OMP code compatible with pre-c++ 11 compilers again 2019-08-01 08:14:03 -04:00
e3c91626c8 need to include update.h when exceptions are enabled 2019-08-01 07:07:21 -04:00
2a74832a1e protect MPI library version detection from incompatible MPI libraries 2019-08-01 07:04:24 -04:00
86e3740fb3 use more common syntax for CPP's "defined" keyword 2019-08-01 07:03:51 -04:00
892e4759df protect Spectrum MPI detection from failing to compile with MPI libraries implementing MPI version 2 or 1 2019-08-01 07:02:55 -04:00
207976f4e9 avoid abort when timeout appears in temper commands 2019-08-01 06:11:05 -04:00
074ae06b36 Bug fix for eam/intel per-atom energy calculation. 2019-08-01 02:19:49 -07:00
75c1e28566 fix typo 2019-07-31 23:28:57 -04:00
58404946db add timer timeout support to temper commands 2019-07-31 23:26:13 -04:00
d09ca91627 Merge pull request #1599 from rbberger/collected-small-changes
Collected small changes
2019-07-31 19:13:41 -04:00
e89cedbd99 Merge pull request #1601 from akohlmey/cmake-list-portability
Improve compatibility to older CMake versions when building/installing LAMMPS library and headers
2019-07-31 12:19:41 -04:00
4011f6650d first step of adding timeout support to temper commands 2019-07-31 05:05:17 -04:00
0fa9cd5004 use utils::strmatch to simplify checks for compatible thermostat/barostat fixes 2019-07-31 05:03:59 -04:00
3cc8508795 Add missing definition of NULL in USER-PTM header 2019-07-31 03:22:22 -04:00
da3b91a744 Remove not existing files from USER-PHONON Install.sh 2019-07-31 03:11:44 -04:00
bc79412203 list(TRANSFORM ...) is not portable to older versions of cmake. work around it. 2019-07-30 22:54:02 -04:00
8803183b8b Merge pull request #1593 from akohlmey/next_version
Step version string for next patch release
2019-07-30 22:25:26 -04:00
11a3fd6ce4 Merge pull request #1556 from lammps/bug-maxexchange
more robust version of atom exchange size
2019-07-30 17:09:18 -04:00
e3b1673c8c Merge pull request #1597 from stanmoore1/eff_be_test
Fix failing regression test /examples/USER/eff/Be-solid/in.Be-solid.spe
2019-07-30 17:07:55 -04:00
69a5ff2240 Merge pull request #1592 from akohlmey/collected-small-changes
Collected small changes for next patch release
2019-07-30 17:06:48 -04:00
2b288bc9e0 add missing mode keyword for substitution 2019-07-30 16:53:27 -04:00
882b2301bb handle shared library extension on macosx for plumed runtime build 2019-07-30 16:48:50 -04:00
528ec75f88 special case for MacOSX not needed 2019-07-30 16:38:40 -04:00
f5bf86b32d more improvements to CMake build for USER-PLUMED on MacOSX
default to shared linkage on MacOSX to avoid linker issues from
configure/cmake library detection differences

link/depend on GSL and LAPACK explicitly only for static linkage
2019-07-30 16:27:00 -04:00
d4503a05a4 mention that cstdlib is included in lmptype.h now, too. 2019-07-30 14:22:33 -04:00
47fc31d005 move inline functions to the only place they are used. no need to use size_t for indices that are small 2019-07-30 14:21:53 -04:00
2d93a713e2 Merge branch 'master' into collected-small-changes 2019-07-30 14:14:11 -04:00
6d94fc1b3d include cstdlib in lmptype.h since we define ATOX() macros. 2019-07-30 14:07:30 -04:00
602b4a47c0 Fix failing regression test 2019-07-30 10:37:27 -06:00
8fa4efa08e Merge pull request #1440 from ellio167/kim-simulator-models
Develop native support for KIM simulator models
2019-07-30 10:53:58 -04:00
3eadfa15ef Merge pull request #1512 from mkanski/rotate_molecules
Extend support of "rotate" keyword to all styles of "create_atoms"
2019-07-30 10:53:37 -04:00
3548551479 Fix Kokkos package compile error 2019-07-30 08:49:58 -06:00
d1e8d7cbf8 Step version string for next patch release 2019-07-30 08:26:11 -04:00
b0bccfd8a1 fix typo 2019-07-30 06:55:47 -04:00
3559c25bd9 add missing parenthesis 2019-07-30 06:35:35 -04:00
3fdadb5875 add configuration for linking VTK 7.1 on Ubuntu 18.04 2019-07-30 06:02:47 -04:00
7ab7691c51 update PLUMED support to version 2.5.2 2019-07-30 05:57:57 -04:00
3ee86470bb correct documentation URL for PLUMED 2019-07-30 05:53:28 -04:00
d201d6c2d1 fix grammar error 2019-07-30 10:18:53 +02:00
88523fdd6e Merge pull request #1529 from rupertnash/compute_momentum
add compute momentum command
2019-07-29 22:51:29 -04:00
c9f3f99ee8 Update to kim-api-2.1.2 2019-07-29 21:48:12 -05:00
4289dbb78d clean up includes and whitespace 2019-07-29 22:28:29 -04:00
d2c4989dbf Merge pull request #1583 from evoyiatzis/gyration_shape
computing the eigenvalues of gyration tensor & shape parameters
2019-07-29 22:16:13 -04:00
edf64ed16c Merge pull request #1511 from jdevemy/master
Add keyword hybrid/pair for compute_pressure
2019-07-29 22:15:20 -04:00
9004ebc3fe one more fixup for compatibility for old PDF build scheme 2019-07-29 21:11:13 -04:00
90c678849a replace non-ascii characters with ASCII equivalents 2019-07-29 21:10:49 -04:00
9f276be0e5 fix up legacy doc building for final kim doc files 2019-07-29 20:48:47 -04:00
6833d6def6 Merge branch 'master' into kim-simulator-models
# Resolved Conflicts:
#	src/KIM/kim_query.cpp
#	src/KIM/pair_kim.cpp
2019-07-29 20:43:10 -04:00
5cb02781c2 simplify checking for per chunk compute 2019-07-29 20:35:24 -04:00
180c90acfb use utils::strmatch() to more safely detect gravity fix 2019-07-29 20:21:31 -04:00
2e6850835f Merge pull request #1542 from akohlmey/improve-include-consistency
Improve Consistency of Include Statements (mostly complete)
2019-07-29 20:12:41 -04:00
7043b9f620 Merge pull request #1548 from jrgissing/bond/react-clarify-how-stabilization-works
Bond/react clarify how stabilization works
2019-07-29 19:55:24 -04:00
91e0bebdfa Merge pull request #1576 from Adrian-Diaz/patch-rcb
patch niche rcb issue
2019-07-29 19:54:45 -04:00
d688624335 Merge pull request #1581 from akohlmey/comm-cutoff-with-bond
Include bonds in communication cutoff estimate when no pair style is present or print warning, if cutoff may be too small.
2019-07-29 19:54:24 -04:00
191044ab94 Merge pull request #1588 from akohlmey/cmake-installation-folder-bugfix
Fix bugs with CMake potentials and frc folder installation. Include base C++ headers for library install, too, so one can use the C++ interface as well.
2019-07-29 19:53:36 -04:00
c03e9c9711 Adjust write_echo() within kim_query 2019-07-29 16:11:29 -05:00
2ffc35297b make kim_query log of variable setting look more like other KIM log messages
this adds BEGIN/END marker comments and echoes the actual command line
that the kim_query command implicitly executes
2019-07-29 16:57:34 -04:00
514608b82f Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models 2019-07-29 16:40:29 -04:00
ea4107c4b4 add write_echo() method to Input class for logging implicit commands where the echo command would send explicit ones 2019-07-29 16:36:57 -04:00
0f059c56f9 Add details about installing models to KIM example input 2019-07-29 15:30:46 -05:00
0820ebc143 cleanup of compute gyration/shape code.
- use MathSpecial::square(x) instead of pow(x,2) for improved precision
and handling of small and negative numbers
- remove unused include statements
- no need to refetch the compute in every step. during init() is sufficient
2019-07-29 16:16:24 -04:00
0beb39c1af fully integrate compute gyration/shape into doc build system 2019-07-29 16:14:29 -04:00
2afc498a2b Add logging to kim_query (compile error at moment) 2019-07-29 15:04:15 -05:00
e0b20c4fd4 add false positive 2019-07-29 15:23:23 -04:00
6a1b61637b provide some more details about 'make install' with CMake 2019-07-29 13:43:06 -04:00
96e0b03ede .frc files only need to be installed if msi2lmp is built 2019-07-29 13:38:38 -04:00
5307558727 need to install some base C++ headers for C++ library use 2019-07-29 13:34:04 -04:00
a0abd270b5 kim_query check for empty query result 2019-07-29 11:41:01 -05:00
838ea2eca1 Merge branch 'improve-include-consistency' of github.com:akohlmey/lammps into improve-include-consistency 2019-07-29 10:55:24 -04:00
2fba3d027a fix small formatting issue 2019-07-28 14:44:47 -04:00
0f10c55c1c avoid recursive header inclusion 2019-07-26 17:26:59 -04:00
9477df4244 Merge branch 'master' into improve-include-consistency 2019-07-26 17:24:32 -04:00
863ae35658 Merge branch 'fix-plumed-issues' into collected-small-changes 2019-07-26 15:45:41 -04:00
94126e5424 use MPI_Get_library_version() API to provide a more detailed version info, not just the MPI standard level
very chatty output (e.g. from MPICH) is truncated to the next line after 80 characters.
2019-07-26 15:44:10 -04:00
a0e005f93c include LAMMPS version in STUBS library version string. 2019-07-26 15:43:01 -04:00
a5a1e27fb1 refactor commands in the STUBS folder for 'make serial' and 'make clean-serial'
make so that for the "serial" make target we not only automatically build
the STUBS library, if it is missing, but also update its compilation when
there are changes and remove it on the "clean-serial" target.
2019-07-26 15:42:34 -04:00
35cee904d7 Merge pull request #1580 from stanmoore1/kk_cuda_aware
Fix CUDA-aware MPI issues with KOKKOS package
2019-07-26 15:17:49 -04:00
f2dbe186ca Fix typo 2019-07-26 11:45:50 -06:00
e816f0e7a6 Cleanup of CUDA-aware MPI code 2019-07-26 11:24:15 -06:00
0ba854b4ab Add MPI_Get_library_version to STUBS library 2019-07-26 11:23:46 -06:00
f4a984175c Merge pull request #1587 from valleymouth/bug_nve
Fixing bugs in nve/kk when using rmass.
2019-07-26 13:15:30 -04:00
17d6b317a7 Better workaround for Spectrum MPI 2019-07-26 10:37:22 -06:00
6a5902ec48 Update kim_init to use KIM::Collections::GetItemType()
A bit of a cleaner solution.  Should be no visible change for users.
2019-07-26 11:14:46 -05:00
010cb0edf3 Add warning to cmake if PKG_KIM=ON but DOWNLOAD_KIM not set & KIM is not found
This can be a scenario where the user has KIM installed but does not have the
environment setup correctly to be found.  The config. step should provide some
warning of this.  Otherwise, it is easy to miss the fact that KIM is being
downloaded and built.
2019-07-26 11:10:54 -05:00
0bb9df76c2 correct shell profile variables to point to the installation directory 2019-07-26 09:58:18 -04:00
8d4f189699 Revert "new versions of jacobi() method"
This reverts commit 39315268e8.
2019-07-26 09:38:32 -04:00
ca1fece850 Fixing remaining wrong indexing of rmass in nve/kk. 2019-07-26 12:46:04 +01:00
e8d891c0dd simplify installation of data folders and make it consistent
fixes #1586
2019-07-26 06:06:03 -04:00
47689b4ad3 make include files independent of previously included headers. include them first in implementation files.
this is to be compliant with upcoming definition of include file policy
2019-07-26 06:03:21 -04:00
179b507107 Fixing bug in nve/kk when using rmass. 2019-07-26 10:55:27 +01:00
9bedd0d0d0 Merge pull request #1584 from akohlmey/bonded-hybrid-restart
Correct restarting of bonded hybrid styles for table styles
2019-07-25 21:26:17 -04:00
52e1755464 fix spelling errors and false positives 2019-07-25 21:20:42 -04:00
60dfa7daf8 doc spelling update 2019-07-25 18:31:40 -05:00
fe83e4de2e revise logic and documentation of communication cutoff selection one more time 2019-07-25 16:00:01 -04:00
fadb40051b Update kim_query & clear and update examples/kim 2019-07-25 14:03:35 -05:00
ab74bfef20 Small logic tweak 2019-07-25 12:52:16 -06:00
7c1fedff18 Fix var name 2019-07-25 12:30:45 -06:00
081780706c Store if comm flags are changed by turning off CUDA-aware MPI so they can be restored if using cuda/aware on 2019-07-25 12:15:29 -06:00
d0b442aca1 Rename file 2019-07-25 11:25:32 -06:00
df139bf32b Merge in suggestions from PR #1582 2019-07-25 11:17:45 -06:00
ca291f1015 Update to kim-api-2.1.1 2019-07-25 11:47:56 -05:00
183d92cad7 update comm_modify documentation 2019-07-25 08:49:49 -04:00
4586fd50af adjust logic for choosing the communication cutoff to requests from @sjplimp
limit cases where warning about adjusting the comm cutoff is printed.
2019-07-25 08:33:21 -04:00
18730e0f92 add documentation for the need to respecify coeff commands for bonded table styles 2019-07-25 08:15:18 -04:00
f86d2c9934 read/write settings in restart files for bonded hybrid styles
this allows to properly restart table styles, which require
additional settings unlike all other bonded styles.
2019-07-25 07:55:39 -04:00
5ca93e3651 move global settings in restart files for table styles to restart settings functions 2019-07-25 07:54:21 -04:00
b1a5444815 add (empty) read/write_restart_settings() functions to bond/angle/dihedral/improper base classes 2019-07-25 07:32:15 -04:00
114a754a72 Delete compute_gyration.cpp
It is not part of the new compute style
2019-07-25 11:48:04 +02:00
6710cc4052 cpp file for the compute command
The right file with the cpp code
2019-07-25 11:44:43 +02:00
6e9252c847 Add files via upload
The actual source code for the new compute
2019-07-25 11:10:36 +02:00
1cebc5516e Update README
Adding my e-mail to README
2019-07-25 11:05:35 +02:00
0be034ea46 Add files via upload
txt file with the documentation of the new compute style
2019-07-25 11:03:41 +02:00
aec43304f4 Add files via upload
tex file with the equations for the shape parameters
2019-07-25 11:02:51 +02:00
b5a066ecd0 Better error checking for kim_init log.cite behavior 2019-07-24 21:08:08 -05:00
d08477cc5f print warning, when explicitly specified communication cutoff is increased 2019-07-24 17:49:00 -04:00
c098582df8 refactor communication cutoff estimator. move it to Comm class. and adjust heuristics. 2019-07-24 17:27:35 -04:00
eaf2b59b1b adapt fix neigh/history/omp to changes for dynamic exchange buffer size 2019-07-24 16:53:03 -04:00
3c53efb1ca don't set MPI communicator when compiling in serial with MPI stubs 2019-07-24 16:03:11 -04:00
d59737299c whitespace cleanup 2019-07-24 16:02:49 -04:00
6ee38d4887 use ${CMAKE_SHARED_LIBRARY_SUFFIX) for better portability 2019-07-24 16:02:36 -04:00
24d9c537c0 only search for LAPACK when building in static mode and when it is not needed for something else 2019-07-24 16:01:46 -04:00
cb9facea8b add reset of dotmark 2019-07-24 13:43:12 -06:00
afab7d99c1 Fix variable name 2019-07-24 13:10:37 -06:00
1d310ad73e add half a bond length safety margin to bond length based cutoff estimates 2019-07-24 14:52:37 -04:00
20843f7476 add documentation for warning added to comm styles 2019-07-24 14:52:07 -04:00
be1522d16d add warning to Comm class against zero communication cutoff 2019-07-24 14:42:17 -04:00
985c959a91 include the bond length in communication cutoff considerations 2019-07-24 14:27:29 -04:00
4760cf868d Update docs to change GPU-direct to CUDA-aware MPI 2019-07-24 12:11:26 -06:00
4400257783 Change GPU-direct to CUDA-aware MPI and add workaround for IBM Spectrum MPI 2019-07-24 12:10:57 -06:00
3887a7f3d7 Updated KIM ID code for IFF SM 2019-07-24 12:07:38 -05:00
2d2c1954db Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models 2019-07-24 11:24:20 -05:00
3bc4a07c74 Corrections to kim_query in example 2019-07-24 11:23:51 -05:00
be86db9dd9 Update /lib/kim stuff 2019-07-23 21:06:02 -05:00
dd4368dd1b Fix bug in pair_kim.cpp for partialParticleVirial computation 2019-07-23 13:41:31 -05:00
ce9c5e41a8 Merge branch 'new-jacobi' into improve-include-consistency 2019-07-23 13:56:30 -04:00
b6b802d0b1 correct forward declaration of POEMS workspace class 2019-07-22 14:36:09 -04:00
320be3bcef undo changes to poems library and package as they fail regression testing 2019-07-22 14:22:36 -04:00
72797b3063 Merge branch 'master' into improve-include-consistency 2019-07-22 13:31:03 -04:00
36ac47c2c6 Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models 2019-07-22 10:55:30 -05:00
f5beb418e8 Put in KIM ID for IFF model in kim_commands usage examples 2019-07-22 10:54:53 -05:00
243ce8dbfc Merge branch 'master' into compute_momentum 2019-07-22 09:48:08 +01:00
c831cee21d Fix typos in documentation 2019-07-22 09:46:01 +01:00
f2978475af Update docs
* bring homebrew install notes up-to-date
* update openkim docs
2019-07-21 15:17:53 -05:00
03d26f6f6f Merge branch 'master' into kim-simulator-models 2019-07-21 13:59:48 -05:00
f4df51763d Merge pull request #1574 from akohlmey/next_version
Step version string for next patch release
2019-07-20 08:49:03 -04:00
9239c9dedb patch niche rcb issue 2019-07-19 17:13:44 -06:00
d52540ea31 Merge pull request #1571 from stanmoore1/kk_snap_opt
Add optimized version of Kokkos SNAP potential
2019-07-19 19:10:10 -04:00
a50d57bceb Merge branch 'master' into improve-include-consistency
# Conflicts:
#	src/utils.cpp
2019-07-19 17:57:58 -04:00
981b9a1f7a Merge pull request #1567 from akohlmey/collected-small-fixes
Collected small fixes and update for the next patch
2019-07-19 17:25:39 -04:00
895d4fa927 Merge pull request #1575 from akohlmey/better-error-checking-on-parsing
Better error checking on parsing files
2019-07-19 17:25:16 -04:00
502fbfb78a Fix memory issue 2019-07-19 15:20:22 -06:00
276e3b2df1 update fix tmd input similar to read_data 2019-07-19 14:00:24 -04:00
ceb2ce5814 Merge branch 'master' into improve-include-consistency
# Conflicts:
#	src/USER-CGDNA/pair_oxdna2_stk.cpp
2019-07-19 13:26:00 -04:00
67b74aea63 Merge pull request #1573 from ohenrich/user-cgdna
Update for USER-CGDNA package
2019-07-19 13:24:07 -04:00
e72aef2a96 more sscanf() return value checking 2019-07-19 12:01:16 -04:00
c7bccc5e7a Workaround for GCC internal compiler error 2019-07-19 09:40:19 -06:00
d730ef5b19 fix typo 2019-07-19 11:31:45 -04:00
44c9d3c1be Merge pull request #60 from evoyiatzis/patch-1
Update compute.txt with missing one line comments on compute commands
2019-07-19 11:26:03 -04:00
1de00aaab0 improve parsing of data file header
the header lines are now checked using regular expressions
instead of strstr() which allows for stricter checking, but
also is more forgiving in terms of extra or different whitespace

return value of sscanf() calls is checked and on failure LAMMPS errors out
2019-07-19 11:16:41 -04:00
8526e7a4cd checking return value of ?scanf() calls to detect problems parsing files 2019-07-19 11:14:39 -04:00
4f7c95d87e Update compute.txt
Addition of a few one-liners
2019-07-19 17:13:38 +02:00
4c328bf846 add metachars '\i' and '\f' to regexp for interger and floating point number chars 2019-07-19 10:39:06 -04:00
babbdaff2c step version string for next patch release 2019-07-19 08:31:04 -04:00
c2643a519e Clarified explanation of new example3 2019-07-19 13:29:39 +01:00
0ee0ea109c Removed references to pair_oxdna2_stk 2019-07-19 12:43:37 +01:00
57fd9723a5 Added comment on new duplex3 2019-07-19 12:30:01 +01:00
e2a7cdc4f7 Updated extended documentation 2019-07-19 12:20:56 +01:00
92b53c7bc2 Merge pull request #1570 from julient31/spin-update
Minor corrections in the SPIN package
2019-07-19 07:03:40 -04:00
7bf9757755 Updated input and log files, amended comment in data files 2019-07-19 11:57:58 +01:00
3acb09e3b1 Corrected virial, altered calculation of stacking strength 2019-07-19 11:09:47 +01:00
e5fffa59ef Add optimized version of Kokkos SNAP 2019-07-18 15:29:45 -06:00
87154da7f5 another Unix path correction 2019-07-17 23:24:12 -06:00
8cf1084dec bond/react: use Unix path in docs 2019-07-17 23:05:28 -06:00
92518e53f4 Revert "spelling: attempt add file paths to false positives"
This reverts commit 0c4af8b820.
2019-07-17 22:58:40 -06:00
22b73a316f Commit2 JT 071719
- added 'magnetons' to false-positive for doc
2019-07-17 22:15:23 -06:00
60ebc08d0f Commit JT 071719
- added doc for read_data spin
- corrected an error in pack/unpack data hybrid
- added mask flags in fix_nve_spin::initial_integrate
- removed spin renormalization in min_spin (was causing a bug)
2019-07-17 21:49:26 -06:00
856efa28aa fix issue #1568 2019-07-17 19:37:08 -04:00
02b0fb454f include rmass[] in border communication. will otherwise trigger issues with fix shake. 2019-07-17 16:34:43 -04:00
bcf600d781 let CMake configuration default to Release with debug settings
this way we can more easily get detailed stack traces from people compiling with CMake
2019-07-17 15:47:28 -04:00
06275b03c0 refactor FFT handling in CMake module for KSPACE.
This also improves the FFT info output in the PPPM styles
2019-07-17 15:46:39 -04:00
354f4d19fd Update to kim-api-2.1.0 release 2019-07-16 22:11:23 -05:00
5b4f77b919 kim_query check for explicit 'model=' key in arguments (give error if present). 2019-07-16 16:20:48 -05:00
b61b48235b Updated openkim.org documentation URLs to new /doc/* locations 2019-07-16 15:19:28 -05:00
658cda9b67 Updated kim_query documentation to new format 2019-07-16 15:02:24 -05:00
0a90032b4c Merge pull request #1563 from stanmoore1/kk_setforce
Fix segfault in fix_setforce_kokkos
2019-07-15 18:07:10 -04:00
2b5a6d3b7f clean up (some) includes in KOKKOS package 2019-07-15 18:05:20 -04:00
68626f577b Merge branch 'master' into improve-include-consistency 2019-07-12 19:59:56 -04:00
6742f371ad Merge pull request #1561 from akohlmey/fix-user-intel-nve-bug
Fix bug in fix nve/intel
2019-07-12 19:59:21 -04:00
61220f9b6c Merge pull request #1562 from athomps/langevin-rm-notemplate
Removed TEMPLATED_FIX_LANGEVIN ifdef and untemplated version of fix langevin
2019-07-12 19:58:34 -04:00
3e90b82c8e Merge pull request #1564 from akohlmey/gpu-lib-clang-cplusplus
Improve portability of GPU library to CLang compilers
2019-07-12 19:58:15 -04:00
3d157e5ab4 more include handling cleanup in USER packages 2019-07-12 18:00:59 -04:00
a1f0c0079d some cleanup for missed steps in previous change sets 2019-07-12 16:37:01 -04:00
e832b5d50b make clang++ happy when trying to compile the GPU library 2019-07-12 15:42:16 -04:00
a51479a62b Fix bug in fix_setforce_kokkos 2019-07-12 11:53:32 -06:00
08ed046a69 Removed TEMPLATED_FIX_LANGEVIN ifdef 2019-07-12 11:29:14 -06:00
2f64615087 more work on includes in USER-OMP 2019-07-11 22:56:05 -04:00
3a10486a40 Merge branch 'improve-include-consistency' of github.com:akohlmey/lammps into improve-include-consistency
# Conflicts:
#	src/USER-OMP/angle_cosine_shift_omp.cpp
#	src/USER-OMP/angle_fourier_omp.cpp
#	src/USER-OMP/angle_quartic_omp.cpp
#	src/USER-OMP/bond_gromos_omp.cpp
#	src/USER-OMP/dihedral_table_omp.cpp
#	src/USER-OMP/fix_gravity_omp.cpp
#	src/USER-OMP/fix_nvt_sllod_omp.cpp
#	src/USER-OMP/fix_qeq_reax_omp.cpp
#	src/USER-OMP/fix_rigid_nph_omp.cpp
#	src/USER-OMP/fix_rigid_npt_omp.cpp
#	src/USER-OMP/fix_rigid_omp.cpp
#	src/USER-OMP/msm_cg_omp.cpp
#	src/USER-OMP/msm_omp.cpp
#	src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp
#	src/USER-OMP/pppm_cg_omp.cpp
#	src/USER-OMP/pppm_disp_omp.cpp
#	src/USER-OMP/pppm_disp_tip4p_omp.cpp
#	src/USER-OMP/pppm_omp.cpp
2019-07-11 22:14:09 -04:00
b4f60ef477 starting to work on includes in USER-OMP 2019-07-11 22:12:01 -04:00
944c3bc91d fix bug reported by jesse carter on lammps-users 2019-07-11 17:42:58 -04:00
48c7356743 starting to work on includes in USER-OMP 2019-07-11 16:51:48 -04:00
9718b99af9 Clarification on what preceeds in kim_interactions 2019-07-11 13:23:46 -05:00
9f6bbe1d8e recover compilation of KOKKOS package 2019-07-11 14:21:55 -04:00
3349ed0013 Changed PM Page and SM Page to "Model Page" 2019-07-11 12:22:36 -05:00
358cec9a0c Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models 2019-07-11 12:05:21 -05:00
8e2f3e4883 Wording changes and removed duplicate text 2019-07-11 12:04:54 -05:00
dbd0158d3f Adjust/update kim_query do_query() routine 2019-07-11 12:01:35 -05:00
b1f8c3f38a silence some compiler warnings 2019-07-11 11:25:44 -04:00
b5fea1f4a7 no need to zero out Ec_meam twice 2019-07-11 09:19:26 -04:00
01524d9850 recover compilation of USER-OMP 2019-07-11 08:13:03 -04:00
ca4b26ddf8 fix up some leftover include issues that got overlooked in previous changes 2019-07-11 07:22:41 -04:00
d05787ab99 clean up include in USER-REAXC 2019-07-11 07:16:53 -04:00
7109c1013a Merge pull request #1560 from stanmoore1/kk_halffull
Fix memory issue in Kokkos neigh list when using half-from-full
2019-07-11 06:28:43 -04:00
1a0662c386 Some corrections and additions to kim_commands docs 2019-07-10 22:11:47 -05:00
789d6a991e Update comment 2019-07-10 17:01:46 -06:00
39873fb7a3 Fix issue in Kokkos neigh list when using half-from-full 2019-07-10 16:53:26 -06:00
956d21ec0e update include lists in packages USER-MISC, USER-MOFF, USER-PTM, and USER-SMD 2019-07-10 15:51:57 -04:00
ea68db964a trim (left and right) strings from kim_query xxxx split 2019-07-10 14:21:07 -05:00
2ca2d053fd Merge branch 'master' into improve-include-consistency 2019-07-10 14:18:42 -04:00
a1a7754961 Merge pull request #1559 from akohlmey/validate-more-data-file-numbers
Complete data file read validation change set
2019-07-10 14:08:43 -04:00
941607595a one more change 2019-07-10 08:48:33 -06:00
89af88bd10 more changes to robustify comm buf_send length 2019-07-10 08:41:27 -06:00
c5044d6484 continuing include file handling cleanup 2019-07-10 08:49:16 -04:00
872d43f02f recover compilation of USER-OMP package 2019-07-10 07:29:29 -04:00
0eba1c1cbc Merge pull request #1558 from lammps/bop-atomic-stress
add missing term to per-atom stress to pair style bop
2019-07-10 07:23:06 -04:00
0f691de031 include file cleanup in some more packages 2019-07-10 01:18:34 -04:00
054ff97a51 replace ATOTAGINT() calls with utils::tnumeric() in AtomVec classes 2019-07-10 00:27:31 -04:00
93748a18ae further clean up of AtomVec classes after merging PR #1552 to master 2019-07-10 00:22:03 -04:00
d6ed4ee1b1 add missing term to per-atom stress 2019-07-09 17:34:54 -06:00
39315268e8 new versions of jacobi() method 2019-07-09 16:53:19 -06:00
5236497932 Changed 'bohr_per_atu_si' to 'bohr_per_atu_electron_si' 2019-07-09 18:36:51 -04:00
2fd327d057 more robust version of atom exchange size 2019-07-09 16:17:54 -06:00
c2dc624ec9 update packages USER-SPH, USER-SMTBQ, USER-SDPD, USER-TALLY, USER-UEF, USER-YAFF 2019-07-09 16:11:25 -04:00
06dcc9e283 Merge branch 'master' into improve-include-consistency
# Conflicts:
#	src/USER-MESO/atom_vec_tdpd.cpp
2019-07-09 14:50:00 -04:00
691fc357a4 Merge pull request #1551 from martok/meamc-embedding
MEAM/C: embedding-function related refactoring
2019-07-09 14:46:53 -04:00
53b8e329a1 Merge pull request #1552 from akohlmey/validate-data-file-numbers
Validate more numbers read from data files
2019-07-09 14:46:21 -04:00
64faa6c667 Merge pull request #1553 from athomps/read_dump_xyz
Fixed a few problems with read_dump xyz
2019-07-09 14:45:48 -04:00
0d15c57fee Merge pull request #1555 from stanmoore1/kk_neigh
Fix issue in Kokkos neighbor binning when using non-Kokkos lists on GPUs
2019-07-09 14:45:23 -04:00
5013fd699f Fix issue in Kokkos neighor binning when using non-Kokkos lists on GPUs 2019-07-09 09:43:50 -06:00
30086950b8 Added preliminary doc for kim_interactions fixed_types 2019-07-09 09:43:34 -04:00
39c8a7de6e Updated kim_commands doc to descript kim_query split mode 2019-07-09 07:35:50 -04:00
7a62717051 Updated USER-MOLFILE 2019-07-08 19:40:31 -06:00
74414afdea Added the boxinfo argument 2019-07-08 17:25:23 -06:00
1f47da6c51 Add fixed_types to kim_init & split to kim_query 2019-07-08 17:46:47 -05:00
cbdc5dba13 fix bug in atom style wavepacket 2019-07-08 18:09:41 -04:00
cfaa537296 use alternate implementation of numeric conversion functions
these new functions allow to choose between aborting with Error::one()
and exiting with Error::all(). in the long run those should replace
all of the functions in Force.
2019-07-08 17:51:37 -04:00
31e19e0824 complete cleaning includes in some more packages 2019-07-08 16:45:21 -04:00
03418be645 minor tweaks to already processed files 2019-07-08 16:22:55 -04:00
60a808d25b bond/react: error->all vs. error->one
also, correct several incorrect instances of error printing, which could cause code to hang without explanation
2019-07-07 21:17:23 -06:00
5b7ae3713b clean up include handling for VORONOI package 2019-07-07 21:02:51 -04:00
65e281d661 Fixed a few problems with read_dump xyz 2019-07-07 18:00:07 -06:00
13d4fbdcfb clean up includes in QEQ, REPLICA, and RIGID packages 2019-07-07 16:27:59 -04:00
b469ff6791 need to include 'force.h' header for conversion functions 2019-07-07 16:06:30 -04:00
15e1b39531 validate more numbers read from data files through using force->numeric()/force->inumeric() instead of atof()/atoi() 2019-07-07 15:52:21 -04:00
57a5588549 cleaning up include file handling in packages MOLECULE and PERI 2019-07-07 15:46:34 -04:00
e5af9db84c clean up includes in MC and MISC package 2019-07-07 11:49:13 -04:00
35e2401099 clean up includes in MANYBODY package 2019-07-07 03:56:44 -04:00
61ed3b65b7 clean up includes in KSPACE package 2019-07-06 10:20:13 -04:00
316554297c clean up includes in packages DIPOLE and GRANULAR 2019-07-06 10:00:24 -04:00
a00d38572e clean up includes in packages CLASS2, COLLOID, COMPRESS, and CORESHELL 2019-07-06 06:29:22 -04:00
4db4833395 fix up includes for BODY package 2019-07-05 21:11:06 -04:00
c00f2adb42 Merge pull request #1544 from akohlmey/collected-small-fixes
Collected small changes and bugfixes for the next patch release
2019-07-05 20:33:55 -04:00
e123b6f02e Merge pull request #1550 from ndtrung81/lj96-fixes
Fixed a bug in lj96/cut/gpu involving missing the special_lj factor
2019-07-05 15:01:19 -04:00
b6bb980980 Merge branch 'improve-include-consistency' of github.com:akohlmey/lammps into improve-include-consistency 2019-07-05 14:59:17 -04:00
9f15ed1e61 Merge pull request #58 from eagunn/improve-include-consistency
Applied minor line edits to new documentation file
2019-07-05 14:59:05 -04:00
2c0eeeb976 one more chunk of files in src folder to be cleaned up 2019-07-05 14:43:20 -04:00
5d4016c285 cleaning up includes of ASPHERE package 2019-07-05 14:42:46 -04:00
5fffccb076 Apply minor line editing to new documentation file. 2019-07-05 12:08:57 -06:00
66390882fd Merge pull request #2 from akohlmey/improve-include-consistency
Improve include consistency from Axel's repo
2019-07-05 11:38:07 -06:00
46a9772a6d Minor clean-up 2019-07-05 12:12:29 -05:00
d07a49aeea add missing prototypes 2019-07-05 11:37:21 -04:00
7efb42f0d3 MEAM/C: code optimization for faster codegen 2019-07-05 12:03:43 +02:00
0d4bb86183 MEAM/C: code commenting 2019-07-05 12:03:43 +02:00
8dcb42d49c Check MEAM parameters for t0=1.0, mention this fact in documentation 2019-07-05 12:03:43 +02:00
2f72b9f120 Factor out embedding function, make sure documented logic for emb_lin_neg is obeyed 2019-07-05 12:03:43 +02:00
ce6fa0118a continuing to clean up include file lists 2019-07-04 08:39:17 -04:00
b4cf4b1ed7 recover compilation of KOKKOS package 2019-07-04 06:51:52 -04:00
732bd937e0 clean up includes in USER-COLVARS package 2019-07-04 01:16:56 -04:00
49f27573a7 Fixed a bug in lj96 involving missing the special_lj factor 2019-07-03 23:44:33 -05:00
fa15bf5edd recover compilation of USER-COLVARS package 2019-07-04 00:25:33 -04:00
e63fe1fe84 please POEMS library in namespace POEMS and remove "using namespace" from headers 2019-07-04 00:09:01 -04:00
95cb995336 recover compilation of MANYBODY package 2019-07-03 22:18:41 -04:00
416911aa7e more rearranging of include file order to put implementation headers first 2019-07-03 21:57:39 -04:00
6cf3bb3e4e recover compilation of KSPACE package 2019-07-03 21:56:29 -04:00
5b3a15bd94 putting implementation header first in package folder sources 2019-07-03 19:58:25 -04:00
256531a29a put implementation header first for all remaining main folder source files 2019-07-03 19:34:13 -04:00
bb5a1c5205 Adjust log.cite behavior 2019-07-03 13:38:08 -05:00
00d820dcf9 Added support for log.cite to kim_init 2019-07-03 13:20:55 -05:00
63dcd999d8 Switch to kim-api c-bindings for SimulatorModel 2019-07-03 11:49:38 -05:00
7967cb1133 put implementation header first to avoid issues with mpi.h and lmptype.h with OpenMPI 2019-07-03 06:16:16 -04:00
0c4af8b820 spelling: attempt add file paths to false positives 2019-07-02 22:13:06 -06:00
11708c8f96 continue cleaning up include files based on IWYU 2019-07-02 15:10:52 -04:00
9984cbc99a Recheck existence of pair style in init 2019-07-02 16:13:20 +02:00
350d8f5812 Missing some hybridpair replacement 2019-07-02 15:51:52 +02:00
fc1d8f2cbf more cleanup of include file handling. starting to work on files in packages 2019-07-02 05:15:30 -04:00
0761c4dbb9 Name change hybridpair->pair/hybrid 2019-07-02 10:47:36 +02:00
968335d4fd Remove useless things 2019-07-02 10:34:10 +02:00
6fc5810bb4 with the refactored include handling we can allow include in if/then/else 2019-07-02 01:31:19 -04:00
41e8cf3d69 Merge branch 'master' into kim-simulator-models
# Conflicts:
#	src/input.cpp
2019-07-02 01:15:29 -04:00
b727f0b126 Merge pull request #1537 from akohlmey/refactor-input-file-handling
Refactor input file processing flow of control
2019-07-01 17:28:15 -04:00
63fa63fb1c Merge pull request #1538 from dsbolin/gran_mods
Bug fixes to pair granular
2019-07-01 17:27:55 -04:00
f7329c0f43 Merge pull request #1540 from stanmoore1/kk_snap
Port Recent SNAP changes to Kokkos
2019-07-01 17:27:34 -04:00
7547e1dae6 make certain that the vector storage and the size_vector variable are consistent in computes 2019-07-01 17:25:02 -04:00
42c31227d9 continuing to clean up include file lists 2019-07-01 15:59:16 -04:00
559c187964 Update SNA::memory_usage() 2019-07-01 08:20:48 -06:00
61a7730bb5 Merge branch 'master' of github.com:lammps/lammps into kk_snap 2019-07-01 08:14:30 -06:00
a8d4ac74fa Remove temporary ulist variable 2019-07-01 08:13:53 -06:00
e91539d4b5 Cleanup 2019-07-01 08:11:49 -06:00
2443c8ad13 reduce IWYU warnings for lammps.cpp 2019-07-01 09:14:22 -04:00
32728375b9 add test script for compute momentum 2019-07-01 13:39:32 +01:00
fb5e7e6f3b add note about USER-MISC package 2019-07-01 12:06:40 +01:00
e9e7d995b2 move to user-misc 2019-07-01 11:37:13 +01:00
39f5b8c734 transform POEMS library to conform to IWYU conventions 2019-07-01 04:16:00 -04:00
af8103433c add stabilized vs unstabilized examples 2019-06-30 22:13:12 -06:00
62bddd47ee limit number of nested include file levels to 16 2019-07-01 00:01:41 -04:00
483b1dbef5 Update fix_bond_react.txt 2019-06-30 21:19:04 -06:00
44372f5236 more fixes for USER-OMP 2019-06-30 23:12:08 -04:00
e0c04355bb try to recover compiling of USER-OMP with OpenMP enabled 2019-06-30 22:59:44 -04:00
e8487ec0b9 Merge pull request #50 from lammps/master
rebase
2019-06-30 20:58:41 -06:00
78af594381 fix typos. restore compilation of LAMMPS class implementation with OpenMP 2019-06-30 22:45:41 -04:00
e29361523f recover compilation of the USER-PHONON package 2019-06-30 18:39:49 -04:00
3e88dacd3f recover broken compilation of the USER-EFF package 2019-06-30 17:27:29 -04:00
33d3bd7a8d Merge pull request #1547 from rbberger/docs_fix
Workaround to make formatting of code blocks consistent
2019-06-30 17:15:25 -04:00
8fdba2ded1 Merge pull request #1546 from stanmoore1/kk_update
Update Kokkos library in LAMMPS to v2.9.00
2019-06-30 17:15:06 -04:00
96744c4933 more include file cleanup 2019-06-30 15:53:17 -04:00
31cbccda85 continue cleaning up include file lists 2019-06-29 09:37:44 -04:00
a720aedabc Workaround to make formatting of code blocks consistent 2019-06-28 20:54:10 -04:00
5e3a705911 fix bug caused by a parameter shadowing a class variable 2019-06-28 14:28:45 -04:00
ea2e73119d Update Kokkos library in LAMMPS to v2.9.00 2019-06-28 11:23:24 -06:00
5eabc82024 Restore lost changes 2019-06-28 10:17:22 -06:00
d918432047 Fix issue with compute_duarray 2019-06-28 09:54:24 -06:00
73968f10d5 Merge branch 'kk_snap' of ssh://github.com/stanmoore1/lammps into kk_snap 2019-06-28 09:44:36 -06:00
400af0edac Merge branch 'master' of github.com:lammps/lammps into kk_snap 2019-06-28 09:02:07 -06:00
557a1274e4 even more include file cleanup 2019-06-28 07:09:57 -04:00
df7c56d881 use suffix compatible pair style matching when looking for ReaxFF pair style 2019-06-28 05:28:54 -04:00
378474c4e6 more include file cleanup suggested by IWYU 2019-06-28 02:07:18 -04:00
a5cb6ddd4a lammps.h must include cstdio and mpi.h 2019-06-27 22:14:06 -04:00
2c119551f7 add statement about order of include files 2019-06-27 22:13:42 -04:00
123bd57376 try to make KOKKOS compile again 2019-06-27 21:59:05 -04:00
4ec3a508fc bulk removal of #include <cstdio> from header files 2019-06-27 21:54:07 -04:00
86a9e4fca2 make body package compile again 2019-06-27 21:40:50 -04:00
9c53a5ca3f add first draft of a summary of the rules for include files 2019-06-27 21:40:28 -04:00
932f052cbf more header cleanup 2019-06-27 20:52:23 -04:00
2c0a66b7f8 increase buffer size of fix tune/kspace. header cleanup. remove use of iostreams 2019-06-27 20:50:25 -04:00
03099d6e54 some more include file consistency changes 2019-06-27 17:11:53 -04:00
121947e79d Added hcp query example to kim_commands 2019-06-27 12:52:20 -05:00
48220b39b5 include <cstdio> explicitly in .cpp files, though 2019-06-27 11:48:34 -04:00
1e2aeed2ac Remove no-op 2019-06-27 08:53:58 -06:00
60adaa24cb Remove redundant computation 2019-06-27 08:52:34 -06:00
333bec0222 headers that directly or indirectly include pointers.h may assume <cstdio> is loaded, too. 2019-06-27 10:12:53 -04:00
84e156d380 first batch of changes suggested by using include-what-you-use tool 2019-06-27 09:14:36 -04:00
312a1fa004 Added species to kim_queries in docs and some other edits 2019-06-27 07:58:32 -05:00
08ac695a06 move include statements from headers to implementation files where possible in USER-REAXC 2019-06-27 01:03:08 -04:00
17602b4c26 some more include file cleanup.
include cstdlib where functions like atoi() are used
remove unneeded include statements from headers
2019-06-27 01:02:17 -04:00
f7507512b1 apply memory alignment settings from my_page.h to my_pool_chunk.h 2019-06-27 00:39:47 -04:00
ff36bad099 cleanup includes in variable.h 2019-06-27 00:33:48 -04:00
7f342b1cd0 Merge pull request #1539 from junghans/fix_include_for_ppc64le
add missing include needed on ppc64le
2019-06-27 00:26:33 -04:00
2be0fd6180 Fix GPU issues 2019-06-26 16:22:37 -06:00
8c3d18520d add missing include needed on ppc64le 2019-06-26 10:45:31 -06:00
f1dfcaf514 WIP 2019-06-25 14:47:21 -06:00
f6319146b0 Update kim_query to new interface 2019-06-25 15:03:24 -05:00
e08146c31f Allow twisting torque to be used without rolling torque in pair granular 2019-06-25 12:06:18 -06:00
2fd924562b Spell correction 2019-06-25 15:15:30 +02:00
61ddc98a5a Missing compute_pressure.h 2019-06-25 13:30:41 +02:00
6a6d08e18e Better compute_pressure hybrid and doc 2019-06-25 12:01:29 +02:00
8fd1aaba7e Merge pull request #1535 from evoyiatzis/class2
Implementation of inner/middle/outer compute methods for lj/class2/coul/long
2019-06-25 06:00:06 -04:00
50e76ff7a1 restore virtual keyword and empty lines in comments 2019-06-25 05:59:29 -04:00
423eebda25 restore header 2019-06-25 05:57:48 -04:00
f6842e643e Merge pull request #1525 from akohlmey/collected-small-changes
Collected small changes and fixes for the next patch
2019-06-24 23:55:50 -04:00
5f7c4fb668 Merge pull request #1534 from uihsnv/archlinux_pkg
Archlinux install documentation
2019-06-24 23:55:09 -04:00
483353a017 Merge remote-tracking branch 'lammps/master' into kim-simulator-models 2019-06-24 15:35:06 -05:00
86d878a7eb Updated language on availability of ADP potentials in OpenKIM 2019-06-24 15:26:41 -05:00
4284a4fac4 Changed me to me_si and fixed some typos in comments 2019-06-24 14:51:35 -05:00
b653536750 Switched pair_style kim doc to "KIM Portable Model" terminology 2019-06-24 14:38:44 -05:00
1047d8f80e Change of terminology to "KIM Portable Model" and streamlining 2019-06-24 14:32:40 -05:00
c8a2f61c16 Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models 2019-06-24 13:55:22 -05:00
0ddcc023a5 Improvements and additions to kim_commands doc 2019-06-24 13:54:55 -05:00
f2380a24ef fix parallel processing input include bug 2019-06-24 14:27:05 -04:00
13237155c8 make processing of Input::file(const char* filename) more like processing an include file 2019-06-24 14:24:54 -04:00
7f26862f98 simplify nested include file handling
# Conflicts:
#	src/input.h
2019-06-24 14:16:51 -04:00
826a14f54a add workaround for handline include files
# Conflicts:
#	src/input.h
2019-06-24 14:16:00 -04:00
7afcfccf48 follow convention to list all commands in a file as header 2019-06-24 13:51:41 -04:00
a36d2573cf make certain, we are not mixing cutoff and long-range coulomb when looking cutoffs 2019-06-24 09:10:00 -04:00
8b49cac86a correct dimensionality of cut_coul property in Pair::extract() 2019-06-24 09:09:22 -04:00
2159a8c44a Arch specific words 2019-06-24 16:14:29 +05:30
3e93881e44 store compute_tally array in restart and read it back. fix memory leak. 2019-06-24 05:28:54 -04:00
bfd0c4228d Added text that ADP potentials are available in KIM as well as NIST 2019-06-23 18:29:59 -05:00
cf008c163d Corrected box rescaling 2019-06-23 18:01:35 -05:00
d150feb41a Small change to KIM package build 2019-06-23 17:46:00 -05:00
db13fedb89 Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models 2019-06-23 17:37:33 -05:00
94e1f87cb8 Moved some content from pair_kim docs to kim_commands 2019-06-23 17:36:36 -05:00
881f9ff043 Updated the pair_kim docs 2019-06-23 17:36:10 -05:00
b5d4cf4bfd Updated KIM package information 2019-06-23 17:23:21 -05:00
d10fdda676 simplify nested include file handling 2019-06-23 17:53:52 -04:00
6d54cf6a07 programming style changes 2019-06-23 17:53:12 -04:00
bfe6cc29e8 fix bug of not storing pointers 2019-06-23 17:52:43 -04:00
36649f0534 add workaround for handline include files 2019-06-23 16:47:12 -04:00
171d74f2f2 remove class member name clashes. Pointers contains infile so we rename other uses to inpfile 2019-06-23 16:43:54 -04:00
e42e1e64a8 Added explanation on Model and SM pages 2019-06-23 14:50:52 -05:00
c9160e66f2 Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models 2019-06-23 14:21:55 -04:00
b2ba0550d7 Some minor typo fixes in kim_commands.txt 2019-06-23 13:19:48 -05:00
f31faafeec modification in the doc file of lj/class2 style 2019-06-23 20:18:39 +02:00
493269431c add a few more false positives 2019-06-23 14:17:30 -04:00
3b6cc29f64 Implementation of inner/middle/outer compute methods for lj/class2/coul/long 2019-06-23 20:16:25 +02:00
c6d0f807b5 output messages that would otherwise only show up in logs only when logs are enable for screen or logfile 2019-06-23 14:13:24 -04:00
27d1f79fe3 simplify another case of stringstream to use plain std::string 2019-06-23 13:39:12 -04:00
065638edba remove unused macro and reformat to closer match LAMMPS programming style 2019-06-23 13:31:43 -04:00
c557c7492b adapt names of stored properties to code that uses fix STORE/KIM 2019-06-23 13:31:12 -04:00
ac82aa754b correct off-by-one error and simplify code by using std::string instead of std::stringstream 2019-06-23 13:13:05 -04:00
c9cb6e3658 remove obsolete files 2019-06-23 13:12:23 -04:00
7f00cf8c12 Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models
# Conflicts:
#	doc/src/kim_commands.txt
2019-06-23 13:11:56 -04:00
a6f6c9bed0 fix up links, spelling issues, and inconsistent names in kim commands docs 2019-06-23 12:41:29 -04:00
22e036a645 Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models 2019-06-23 11:39:31 -05:00
d08867ce0a Completed first version of kim_commands documentation 2019-06-23 11:39:06 -05:00
c11caf4509 update kim examples to temp. current state of code 2019-06-23 10:34:43 -05:00
33be7f259b Working on kim_commands documentation 2019-06-22 21:49:29 -05:00
27d83b878d Merge branch 'kim-simulator-models' of github.com:ellio167/lammps into kim-simulator-models 2019-06-22 15:25:40 -05:00
17fa2f787b Added kim_command documentation structure 2019-06-22 15:25:21 -05:00
4a22e3bf70 Implement kim_init, kim_interactions & various updates 2019-06-22 15:21:57 -05:00
f81c9c5322 Changed _u_* output to log to variable commands 2019-06-22 10:21:05 -05:00
58f9380c45 Archlinux install documentation
Link to #1495
2019-06-22 19:46:21 +05:30
dbfd1fd0e7 Added atom-type-num-list mapping to kim_style 2019-06-21 22:11:58 -05:00
f190647ab4 use snprintf() instead of sprintf() to avoid buffer overflows when copying style names 2019-06-21 21:23:20 -04:00
08cee18f32 Added code to define unit conversion factors 2019-06-21 18:39:18 -05:00
88994d813a Ignore kim.log in examples/kim 2019-06-21 18:38:48 -05:00
7a56a4be24 add option to pair_modify to explicitly turn off F dot r 2019-06-21 14:18:18 -04:00
1bb18ebde4 rollback unneeded change to Makefile.list per review 2019-06-21 15:50:52 +01:00
c79044c361 Merge pull request #1531 from athomps/snap-yarray-tweak
Added NULL initialization for snaptr
2019-06-21 10:38:43 -04:00
c460d05bc6 Added NULL initialization for snaptr 2019-06-21 00:26:44 -06:00
0613c10395 Work on kim_style for latest definition prototype 2019-06-20 16:45:45 -05:00
a01421db99 Merge branch 'master' into collected-small-changes
# Conflicts:
#	doc/src/pair_spin_dipole.txt
2019-06-20 14:38:51 -04:00
128d021c10 Update to latest prototype for SimulatorModel interface 2019-06-20 13:13:13 -05:00
f1034e982d Merge pull request #1530 from eagunn/iss1526
Minor cleanup for doc/src
2019-06-20 13:23:21 -04:00
6760866f44 integrate pair styles spin/dipole/cut and spin/dipole/long properly into docs 2019-06-20 11:49:53 -04:00
17bfed3590 move non-LaTeX images from doc/src/Eqs folder to doc/src/JPG
this also updates links in doc sources referencing them
2019-06-20 11:39:41 -04:00
bc224bc66e Eliminate a doc build warning. pair_spin_dipole.txt was recently edited. Much content was removed and it no longer contained any internal reference links. But it still had a link anchor at the bottom. This was generating a build warning. I've removed the unused link anchor and an unneeded line separator. 2019-06-20 09:15:40 -06:00
c9fc83ef6f Move two non-equation images from Eqs folder to JPG folder 2019-06-20 08:16:20 -06:00
f54ad09668 recreate missing LaTeX files for image-only equations 2019-06-19 17:53:40 -04:00
599ef78161 put dump_modify after the list of all dump variant doc pages 2019-06-19 17:13:06 -04:00
26347ec80c Add docs for compute momentum 2019-06-19 13:56:00 +01:00
959da9de01 Create a compute for the momentum of a group of atoms 2019-06-19 13:56:00 +01:00
f8f8e441b9 add missing cmake package module 2019-06-19 07:06:54 -04:00
bb11344424 Merge pull request #1522 from akohlmey/next_version
Step version string for next patch release
2019-06-18 22:01:42 -04:00
e754fb80a4 Merge pull request #1518 from akohlmey/collected-small-changes
Collected small changes and fixes for the next patch release
2019-06-18 16:21:41 -04:00
98fbaef406 workaround for ICE issue with gcc 4.8.x 2019-06-18 15:00:27 -04:00
d98c105d34 step version string to 18 June 2019 2019-06-18 11:52:09 -04:00
961dcfc261 mention alternate build environment generators for cmake 2019-06-18 11:50:06 -04:00
81cdce9b04 flag and document that USER-TALLY computes are not compatible with dynamic groups 2019-06-18 00:14:48 -04:00
995b6b31a2 flag a couple more packages that contain sub-builds of downloaded code 2019-06-17 16:05:54 -04:00
e9666f585f update log files for kolmogorov/crespi/full potential 2019-06-17 15:46:54 -04:00
f4f4a7c850 adapt for Ninja build tool, which cannot handle sub-builds and fortran
so builds of downloaded libraries are not supported right now
2019-06-17 14:24:51 -04:00
5fc3081a55 make building tools (msi2lmp, chain.x) an option, which is off by default 2019-06-17 14:23:30 -04:00
a39a35af20 Merge pull request #1517 from jrgissing/bond/react-clarify-template-check-messages
Bond/react: clarify reaction-template warning messages
2019-06-17 14:14:53 -04:00
1452d3d25b Merge pull request #1516 from gtribello/master
Using PLUMED to compute committor with LAMMPS
2019-06-17 14:14:37 -04:00
2dea4eb0e9 Merge pull request #1513 from akohlmey/user-tally-vs-hybrid
Make USER-TALLY compute styles compatible with hybrid pair styles
2019-06-17 14:14:06 -04:00
5d73b0790f Merge pull request #1510 from evoyiatzis/respa_class_2
Implementation of inner/middle/outer compute methods for lj/class2
2019-06-17 14:13:47 -04:00
93fd33aad9 Merge pull request #1507 from athomps/yarray
Back-porting of Zombie SNAP improvements
2019-06-17 14:13:28 -04:00
6536399fc3 Merge pull request #1476 from uihsnv/log_spacing
A function logfreq3(), for logarithmic spacing
2019-06-17 14:12:59 -04:00
2f29bd29f4 Merge pull request #1430 from ndtrung81/gpu-neigh-hybrid
Enable neighbor build on the device for pair hybrid substyles
2019-06-17 14:12:40 -04:00
b1458ceebf fix typo 2019-06-17 07:42:18 -04:00
92615bda3a update kolmogorov/crespi/full example input for recent change in REBO 2019-06-17 07:38:11 -04:00
4c0cd0a019 remove memory leak by freeing custom MPI data types 2019-06-17 07:36:03 -04:00
fd93c27dcb make valgrind happy by fully initializing line buffer for thermo output 2019-06-17 07:35:30 -04:00
4178c5167b clarify template error/warning message 2019-06-16 14:47:07 -06:00
fd20a0606a Merge pull request #49 from lammps/master
rebase
2019-06-16 14:19:50 -06:00
75e2981bda Using force_timeout call instead of throwing error for plumed stop 2019-06-16 17:52:20 +01:00
98d9a9a4d2 Added call to PLUMED with setStopFlag so that PLUMED can stop LAMMPS if it needs to. This would be needed if you were computing committors for example 2019-06-16 16:09:32 +01:00
e73b34a5b1 do not run tally callback setup multiple times per time step 2019-06-14 15:46:28 -04:00
3611cfdaf8 All styles support setting molecules' orientation 2019-06-14 19:58:31 +02:00
7fab12c36f Add keyword hybridpair for compute_pressure only on a certain pair of a hybrid pair 2019-06-14 16:53:26 +02:00
ac57b41b4d fix line endings and missing EOL at end 2019-06-14 07:13:06 -04:00
43e3c1520b cleaning pair_lj_class2.h of windows line endings
removing DOS/Windows style CR/LF line endings
2019-06-14 11:50:56 +02:00
e7116c8680 Update pair_class2.txt
Addition of a few lines in the documentation file
2019-06-14 09:04:03 +02:00
4d7d3a5d53 Switched algorithm for compute_yi to one based on zlist ordering 2019-06-13 15:56:18 -06:00
c1550ba29b implementation of inner/middle/outer for lj/class2
Implementation of inner/middle/outer functions in style lj/class2 to enable integration with respa
2019-06-13 22:23:01 +02:00
5fb505ca8c Fixed typo 2019-06-13 10:24:18 -06:00
67a1a63f5f Removed old text 2019-06-13 10:10:37 -06:00
65b87fa278 Updated SNAP in KOKKOS package so it compiles and runs 2019-06-13 09:54:56 -06:00
c5c03230cb Not part of this pull request 2019-06-12 17:05:47 -06:00
be5d3d6a19 Not part of this pull request 2019-06-12 17:04:22 -06:00
f8e257d219 Not part of this pull request 2019-06-12 17:04:05 -06:00
3f523ea906 Not part of this pull request 2019-06-12 17:02:59 -06:00
a973700295 Completed back-porting of Zombie SNAP improvements, particularly noteworthy is reduction in memory footprint, elimination of most multidimensional arrays, elimination of diagonal_style, elimination of Z array in force calculation. 2019-06-12 16:42:28 -06:00
daa53e3008 Merge pull request #1469 from julient31/pppm_spin
Adding PPPM and Ewald solvers for electric dipoles and magnetic spins
2019-06-12 14:50:18 -04:00
7a33d1e328 Code cleanup 2019-06-12 11:36:42 -06:00
0559e155f2 Implemented lists instead of multidim arrays 2019-06-11 18:24:02 -06:00
0b25d2feef Merge pull request #1504 from akohlmey/collected-small-fixes
Collected small bugfixes and changes
2019-06-11 20:20:19 -04:00
1c1491eebf Merge pull request #1506 from sniblett402/patch-1
Bugfix for bond_style table with MPI
2019-06-11 19:10:41 -04:00
400751f30f remove redundant call to broadcast r0 2019-06-11 19:09:23 -04:00
4fbf96a353 Bugfix for bond_style table with MPI
Summary

Very small bug fix - an incorrect MPI datatype was causing undefined behaviour for tabulated bond potentials (bond_style table).

Author(s)

Sam Niblett, LBNL

Licensing

By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Backward Compatibility

No impact

Implementation Notes

The equilibrium bond length of the tabulated potential (tb->r0) was incorrectly specified as an MPI_INT during a broadcast. Therefore, all non-root processes received a truncated value of this parameter. This simple fix produced the expected behaviour for me.
2019-06-11 13:48:01 -07:00
1dc8bb163d Merge pull request #1485 from Adrian-Diaz/memcpy2memmove
replace some calls to `memcpy()` with calls to `memmove()`
2019-06-11 14:07:46 -04:00
bb0240d8eb Merge pull request #1501 from uihsnv/vim_files
Simplify and update vim syntax highlighting files
2019-06-11 14:06:58 -04:00
fd592d510f Merge branch 'collected-small-fixes' of github.com:akohlmey/lammps into collected-small-fixes
# Conflicts:
#	cmake/CMakeLists.txt
2019-06-11 14:03:27 -04:00
dbafb92dd5 cmake minor cleanup and removal of redundant code and empty lines 2019-06-11 14:02:41 -04:00
83060f0902 Merge branch 'master' into collected-small-fixes 2019-06-11 13:35:42 -04:00
fd55d7d367 update list of known LAMMPS keywords 2019-06-11 11:15:04 -04:00
3d5db63381 minor cleanup 2019-06-11 10:36:04 -04:00
42b0cb5e3e Merge pull request #1502 from rbberger/cmake_cleanup
Refactor CMake configuration
2019-06-11 10:19:07 -04:00
4cee333c07 need to use C++ compiler when checking for includes
this is the same bugfix as in PR #1504
2019-06-11 07:12:39 -04:00
7f4c611e21 must use C++ compiler to check for include files 2019-06-11 06:51:03 -04:00
fe29572737 Merge pull request #1496 from akkamesh/enh-ext-reaxc
reaxc/qeq optimization - using kokkos hierarchical parallelism
2019-06-10 21:37:12 -04:00
9421466f57 Merge branch 'master' into enh-ext-reaxc
Resolved Merge Conflict in src/KOKKOS/kokkos.cpp
2019-06-10 20:14:40 -04:00
8d985e53f4 Merge pull request #1494 from mkanski/extep_hybrid
Fix for extep when NULL or only some elements from potential file are used.
2019-06-10 20:04:24 -04:00
e72ac92a7f Merge pull request #1422 from stanmoore1/team_opt
Optimize KOKKOS package for small systems
2019-06-10 20:03:53 -04:00
3e2f3a8058 avoid a case of mixing malloc()/free() with new/delete 2019-06-10 18:22:04 -04:00
72b295d7f4 add support for internal style variables to info command 2019-06-10 18:21:17 -04:00
fa76472135 Add Kamesh as contributing author to fix_qeq_reax_kokkos 2019-06-10 15:48:53 -06:00
664b938ed1 document kim_style changes 2019-06-10 17:45:07 -04:00
9a428217d9 prototype implementation of unit conversion variable support 2019-06-10 17:19:18 -04:00
22fd12b56c support storing unit conversion variable setting between kim_style calls 2019-06-10 17:14:17 -04:00
b368b11d60 Move ShowHelp test into Testing.cmake 2019-06-09 22:31:56 -04:00
591e6836fd Move CMake configuration for USER-H5MD into its own file 2019-06-09 22:24:59 -04:00
4ac100fe69 Define additional LAMMPS_*_DIRS to remove relative paths later 2019-06-09 22:05:53 -04:00
4ecd81f81b Move CMake configuration of PYTHON package into its own file 2019-06-09 21:48:05 -04:00
203c6d122b Move KSPACE CMake configuration into its own file 2019-06-09 21:37:34 -04:00
e788d32678 Move autogen check into utility function 2019-06-09 04:02:08 -04:00
ae59ffe83e Move more CMake configurations to own files 2019-06-09 03:54:52 -04:00
99a8d3c2ed Create CMake files for several packages
This remove the CMake configuration of several larger packages and places
it into their own files in the Modules/Packages folder.
 - COMPRESS
 - KIM
 - LATTE
 - MESSAGE
 - MSCG
 - USER-MOLFILE
 - USER-NETCDF
 - USER-PLUMED
 - USER-QMMM
 - USER-QUIP
 - USER-SCAFACOS
 - USER-SMD
 - USER-VTK
2019-06-09 03:35:25 -04:00
ca1445788e Move CMake configuration of VORONOI package into its own file 2019-06-09 03:23:23 -04:00
0908bd7aaf Move code coverage and testing into their own files 2019-06-09 03:18:20 -04:00
239dfe163c Simplify vim-files
Resolves #1500
2019-06-08 17:11:20 +05:30
cea1bd9cd9 Merging to stay up-to-date after patch 5Jun2019 2019-06-08 16:47:02 +05:30
31dc5dbb51 Fix variable type 2019-06-07 17:00:43 -06:00
9e3dc26599 Fix name in pair_exp6_rx_kokkos 2019-06-07 16:41:41 -06:00
8da75c2040 Merge branch 'master' of github.com:lammps/lammps into enh-ext-reaxc 2019-06-07 16:33:44 -06:00
85999fc4a7 Restore original compute_h in fix_qeq_reax_kokkos 2019-06-07 16:31:31 -06:00
73fa8d4055 Rename Kokkos variables 2019-06-07 16:30:02 -06:00
bd237a05b8 Tweak scalar view allocation 2019-06-07 15:46:04 -06:00
4941f11ad4 Remove unused tag 2019-06-07 15:37:49 -06:00
afab5ef303 Move CMake part on coverage into its own file 2019-06-07 12:24:35 -04:00
a7c02e699e Move CMake utilities into LAMMPSUtils.cmake 2019-06-07 12:18:49 -04:00
8fed39d726 Move CMake documentation build section into its own file 2019-06-07 12:16:01 -04:00
b9e10d55e2 Merge pull request #1492 from akohlmey/collected-small-changes
Collected small changes for the next patch
2019-06-07 11:07:10 -04:00
1f1a0f95b2 Merge pull request #1497 from junghans/check_for_immintrin
cmake: check for immintrin.h
2019-06-07 10:57:56 -04:00
61e9dc4c8d more accurate checking for styles using utils::strmatch() instead of strcmp() or strncmp() 2019-06-07 07:14:57 -04:00
b53df3dd63 disable optimization on functions building factories for many entries
this will speed up compilation and also avoid spurious warnings with gcc 4.4 and later
2019-06-06 20:37:17 -04:00
56e3b1d1f4 remove dead code 2019-06-06 20:22:08 -04:00
fde7e2de3c switch to use alternate flag 2019-06-06 15:08:26 -04:00
e2391edce6 turn off only variable tracking and make people wait again 2019-06-06 14:44:28 -04:00
f7026491f1 Code reformat 2019-06-06 09:59:41 -06:00
40a2f275c2 Fix a few more issues resulting from "nelements != atom->types"
this also detects in a more safely fashion, whether there is data in the second part of the input file, that is still formatted for he first part.
2019-06-05 17:11:53 -04:00
e549f911f7 turn off variable tracking through turning off optimization for GCC 4.4 and later
This will avoid a difficult to interpret warning and in
addition speed up compilation of this one file by avoiding
to try to optimize something, that needs no optimization.
2019-06-05 14:36:08 -04:00
34dca6dc79 advance warning message about collecting styles and packages info to an earlier slot in the process 2019-06-05 14:32:02 -04:00
2ebc40deb3 cmake: check for immintrin.h 2019-06-05 11:13:48 -06:00
e9b4ab7363 Fixed potential file parsing when NULL or only some elements are used. 2019-06-05 16:12:24 +02:00
8e43a45925 Detect and error out on invalid kspace mesh settings. make coulomb and dispersion settings consistent 2019-06-05 01:10:44 -04:00
92f078cfff nicer typesetting of "none, zero, hybrid" potential styles in commands lists 2019-06-04 22:29:25 -04:00
708052dc81 reaxc/qeq optimization - using kokkos hierarchical parallelism 2019-06-04 14:22:43 -07:00
960a975e2a Added compact arrays, removed unused openmp stuff 2019-06-03 19:50:40 -06:00
3b7c15a8b2 Merging to stay up-to-date
Merge remote-tracking branch 'lammps_upstream/master' into log_spacing
2019-06-01 10:33:27 +05:30
76900b8325 avoids the possibility of undefined behavior with memcpy having the same source and destination arrays; this is not every instance of this issue in the source code 2019-05-31 11:53:58 -06:00
edecd2b760 fix typo and update list of false positives for updated docs 2019-05-30 22:19:47 -04:00
df1308ad92 add kim_style error messages to Errors_messages.txt doc file 2019-05-30 21:58:18 -04:00
c9fe5810c1 add log outputs for updated kim_style command input examples 2019-05-30 21:52:23 -04:00
24a63f0f31 update kim_style command semantics as discussed in PR #1440
this also adds documentation of error messages in the kim_style header
2019-05-30 21:51:13 -04:00
113b8b4be2 Fixes two bugs in pair granular: 1. User-set cutoffs did not work 2. Restarts not working 2019-05-30 14:21:11 -06:00
b88158fc3b Fix issue in npair_kokkos 2019-05-29 11:16:38 -06:00
3b60686827 Small tweak to verlet_kokkos 2019-05-29 09:43:50 -06:00
35be1724e3 Commit JT 052819
- corrected examples in examples/SPIN/dipole_spin
- modified warning message in src/SPIN/pair_spin_dipole_*.cpp
2019-05-28 15:31:03 -06:00
d717101e94 Merge branch 'master' of https://github.com/lammps/lammps into team_opt 2019-05-28 14:02:22 -06:00
e44c877738 Add missing tag sync in fix_qeq_reax_kokkos 2019-05-28 10:21:29 -06:00
b3a01694b7 remove leftover fix qeq/reax command 2019-05-27 23:34:05 -04:00
eb6287d2e8 correctly check for supported species 2019-05-27 23:26:46 -04:00
4619018ead provide more simulator model variant input examples 2019-05-27 23:26:26 -04:00
c2a200fe85 A function logfreq3(), for logarithmical spacing
Unlike logfreq(), this also allows for fractional ratios
Resolves #1471
2019-05-26 14:00:21 +05:30
264f6e1630 whitespace cleanup 2019-05-24 22:44:41 -04:00
c3897212e2 must call ClearTemplateMap(), so kim_style define may be called multiple times 2019-05-24 22:44:03 -04:00
5a929aff6e error out if kim_style init is required but wasn't called 2019-05-24 22:42:40 -04:00
ee5fa04732 create internal fix via modify->add_fix() so it does not get logged 2019-05-24 22:41:28 -04:00
fc8a639d58 add documentation for kim_style command. update a few KIM related doc files 2019-05-24 19:42:16 -04:00
b91b3c18cf remove references to simulator models from pair style kim 2019-05-24 11:52:38 -04:00
ce46d52c8a add new 'kim_style' command as front end for KIM simulator (and regular) models 2019-05-24 10:23:26 -04:00
eea67bf3bf Add sync/modify for growing dvector 2019-05-22 08:52:57 -06:00
1e2ceb88da complete basic simulator model proxy class creation and setup. 2019-05-21 15:57:14 -04:00
439e7da03f Need auto-sync on for initialization 2019-05-21 11:47:55 -06:00
ed7c09ac81 Add missing character 2019-05-21 10:30:33 -06:00
0ee1daa46d Add Lenz to false-positive list 2019-05-21 10:24:24 -06:00
2fbc4f504d Per-atom virial is not yet supported with pppm/dipole 2019-05-21 10:16:13 -06:00
95ab056576 Add PPPM dipole reference 2019-05-21 10:07:41 -06:00
a0bc619550 Need to call atomKK version of sync/modified in Kokkos atom_vec styles 2019-05-21 09:21:55 -06:00
82b50706bd Commit2 JT 052019
- some corrections in the examples
- deleted an old doc files (now redundant)
2019-05-20 22:09:59 -06:00
e90eed9120 Commit JT 052019
- deleted old doc
- renamed new doc files
2019-05-20 21:48:05 -06:00
5f2f7d1575 Merge branch 'pppm_spin' of github.com:julient31/lammps into pppm_spin 2019-05-20 21:35:52 -06:00
3e60ec9be1 Merge branch 'clean-master2' of github.com:julient31/lammps into pppm_spin 2019-05-20 21:35:16 -06:00
92b042552e Revert "add JSON tokenizer to utils library"
This reverts commit 32379d2d84.
2019-05-20 22:54:33 -04:00
38a8c765f0 add support species checking 2019-05-20 22:54:20 -04:00
56cf97e497 hard code creation of simulator model pair style for now 2019-05-20 13:53:17 -04:00
b779bf524a use KIM-API calls to query simulator model info 2019-05-19 10:09:25 -04:00
32379d2d84 add JSON tokenizer to utils library 2019-05-18 21:07:15 -04:00
dc8b43a95f update docs and sources and for changes in this branch 2019-05-18 15:16:10 -04:00
601746b565 restore lost changes to fix gpu from upstream 2019-05-18 13:09:25 -04:00
fbb78e7b78 Commit JT 051719
- removed qsymp pair style
- cleaned doc (pair/spin/diole and kspace_style)
- cleaned kspace .cpp/h files
2019-05-17 15:04:14 -06:00
803e0631c5 Added bispectrum compute 2019-05-16 22:11:06 -06:00
51a6bfd579 Added bispectrum compute 2019-05-16 22:01:45 -06:00
5b71b3fc57 Added bispectrum compute 2019-05-16 21:51:24 -06:00
e2ed9330b7 Merge branch 'master' into team_opt 2019-05-16 12:31:26 -06:00
41872e37e6 Merge branch 'pppm_spin' of github.com:julient31/lammps into pppm_spin
Conflicts:
	doc/src/pair_spin_dipole.txt
2019-05-16 10:34:33 -06:00
0c0b106924 Commit2 JT 051519
- started doc pair_spin_dipole.txt
- renamed all pair/spin/dipole
- created and tested example pair/spin/dipole/cut
2019-05-15 20:49:05 -06:00
98d9c45ad9 compute_bispectrum 2019-05-15 17:18:24 -06:00
084bb3c35b Commit JT 051519
- start doc pair_spin_dipole
2019-05-15 08:34:12 -06:00
31789ad03b Commit JT 051419
- added beginning doc
- removed a remaining dipolar
2019-05-14 17:44:35 -06:00
fd168068a1 Merge branch 'clean-master2' of github.com:julient31/lammps into pppm_spin
Conflicts:
	src/SPIN/fix_nve_spin.h
2019-05-14 17:41:58 -06:00
a0cc6b5b59 Forgot to change pair style to nn/snap 2019-05-11 14:04:21 -06:00
f2d881470d Added placeholder for neural network SNAP potential 2019-05-11 12:55:11 -06:00
e13c661f77 Added placeholder for neural network SNAP potential 2019-05-11 12:54:18 -06:00
a1f421cd54 Moved compute_beta outside of main force loop 2019-05-11 12:41:54 -06:00
6d84bd6138 Added compute_beta() 2019-05-10 10:34:01 -06:00
11407a165b reformat pair style kim to LAMMPS style and add some existing simiulator model code (non-functional) 2019-05-07 18:21:58 -04:00
99430767df Start devel of native support for KIM simulator models
* CMake change to use KIM-API SimulatorModels branch
* Minimal changes to pair_kim to illustrate use of KIM API
  interface. Only c++ interface is implemented for development.
* Added example input: in.kim.simulator-model
2019-04-30 21:48:50 -05:00
cb6b498127 Commit JT 042219
- change ntot -> nlocal
2019-04-22 14:43:01 -06:00
a243be2dc9 Added bare-bones yarray algorithm, 2x speedup 2019-04-21 22:10:03 -06:00
a696b26301 Merge branch 'clean-master2' of github.com:julient31/lammps into pppm_spin
Conflicts:
	src/SPIN/pair_spin_exchange.cpp
	src/atom.cpp
	src/pair.cpp
2019-04-19 15:02:25 -06:00
4a4297591e Did some more cleanups 2019-04-17 12:04:31 -05:00
1f43efc111 Cleaned up the changes in Device and the base class of the pair styles 2019-04-17 00:09:49 -05:00
c55009a0ac Enabled neighbor list build on the device with pair_style hybrid and hybrid/overlay 2019-04-16 23:30:25 -05:00
e4e2249b63 Fix issue in comm_kokkos 2019-04-10 10:17:14 -06:00
cf35ebe5fa Revert optimization that is causing regression tests to fail 2019-04-09 16:17:37 -06:00
073f003470 Doc tweak 2019-04-09 15:17:40 -06:00
618547b72e Reduce DELTA and revert subview change 2019-04-09 14:40:39 -06:00
a01bce46bb Reduce GPU/CPU data transfer 2019-04-09 10:23:37 -06:00
82be3ee32c Only use team with full neigh list 2019-04-09 09:17:07 -06:00
16b17f812c Update docs 2019-04-09 08:51:24 -06:00
22b7e12baf Merge branch 'kk_binsize' into team_opt 2019-04-08 16:40:20 -06:00
b8d3c9e01b Rename team option to neigh/thread 2019-04-08 16:02:18 -06:00
149a57f3ae Add threshold for using Kokkos teams 2019-04-08 15:21:42 -06:00
7f2c81657b Merge from upstream 2019-04-08 14:14:52 -06:00
f2ef02b6d9 Comm exchange is a no-op for 1 MPI rank 2019-03-21 09:27:18 -06:00
c3adfcbc15 Add missing sync in comm_kokkos 2019-03-21 08:56:12 -06:00
744a8215dd Fix compile error in comm_kokkos and indent in atom_vec_kokkos 2019-03-20 15:08:08 -06:00
1f44dc2498 Remove unused array in comm_kokkos 2019-03-20 15:01:47 -06:00
d1e751d717 Fix thread safety issue in fused forward comm 2019-03-20 14:32:03 -06:00
08273c40d7 Fix compile issue in comm_kokkos 2019-03-19 14:29:45 -06:00
e2d28f5160 Only copy pbc info in comm setup 2019-03-18 15:27:35 -06:00
b50ef59a19 Optimize Kokkos comm for small systems 2019-03-18 13:17:32 -06:00
36836598b1 Reduce data transfer in exchange 2019-03-18 10:45:14 -06:00
8c4baac3f1 Only copy force on ghost atoms if newton on 2019-03-15 14:25:24 -06:00
179026dd44 Reduce GPU data movement in npair_kokkos 2019-03-14 17:13:12 -06:00
71a6227240 Optimize KOKKOS package for small system sizes 2019-03-14 15:43:50 -06:00
aecef752e8 Remove unnecessary data movement in fix_nve_kokkos 2019-03-11 13:41:20 -06:00
e422e886de Add error check for team on and full neighborlist 2019-03-08 11:33:29 -07:00
069853fd10 Merge branch 'master' into team 2019-03-08 11:32:31 -07:00
84773f9d1d Merge branch 'master' of github.com:stanmoore1/lammps into team 2019-03-08 08:31:48 -07:00
ff7276e494 Clean up the fused comm 2019-03-07 08:56:13 -07:00
553714b0bb Merge branch 'master' into team 2019-03-07 08:42:24 -07:00
5d8e3c6cb4 Optimize reneighbor for small systems 2019-02-28 10:14:35 -07:00
29073f7d0e Merge branch 'team' into comm_squash 2019-02-25 09:20:13 -07:00
38c6c1907b Merge branch 'master' into team 2019-02-25 09:19:54 -07:00
85a14ebcb8 Fix issue with comm squash 2019-02-25 09:17:34 -07:00
0a02097e20 Add squashed comm forward for Kokkos 2019-02-25 08:39:54 -07:00
a72f3cfb58 Merge branch 'master' into team 2019-02-11 14:45:34 -07:00
58905525bf Add team-based calcs to some KOKKOS package pair_styles 2019-02-06 14:42:37 -07:00
7a2d326103 Commit JT 010819
- commit before co
2019-01-08 09:19:49 -07:00
ddd5e61254 Commit JT 111418
- removed muk table (size kmax3d, mem fault)
2018-11-14 09:46:16 -07:00
d66a1ac054 Commit JT 111318
- corrections pair/spin/dipolar/long
2018-11-13 17:03:32 -07:00
9727fdc473 Commit JT 110818
- correct bug (match ewald/disp results for vir)
- started correct mag. part
2018-11-08 16:17:43 -07:00
d5fe8857cc Commit JT 100518
- correction torque ewald_dipole
- idem ewald_dipole_spin to check
2018-10-05 14:01:29 -06:00
a745a0aed0 Commit JT 100318
- correction forces ewald_dipole
- correction mag. dipolar energy
2018-10-03 10:23:58 -06:00
19aaf294e5 Commit JT 092718
- renamed pair/spin/long functions
- started to work on debugging ewald_dipole (force errors)
2018-09-27 10:46:52 -06:00
6b4303c405 Commit2 JT 092418
- initialized g_ewald before Newton solver
- mu2 is now adim in ewald_dipole_spin
2018-09-24 16:40:59 -06:00
53a779067e Commit JT 092418
- ewald_dipole_spin added
- accuracy problem (with eval of gewald and Newton solver)
2018-09-24 10:59:17 -06:00
cce9fe4a34 Commit2 JT 092118
- created pair_spin_dipolar_cut
- real-space short-range calc of the spin dipolar interaction
- run and check valgrind ok
2018-09-21 09:55:41 -06:00
407392f6bf Commit JT 092118
- ewald_dipole with virial, torque and slabcorr
- run and valgrind test ok

Merge branch 'pppm_spin' of github.com:julient31/lammps into pppm_spin

Conflicts:
	src/KSPACE/ewald_dipole.cpp
2018-09-21 08:33:02 -06:00
cdde878d60 Commit JT 091618
- merge with modifs Stan 1
- energy correction

Merge branch 'pppm_spin' of github.com:julient31/lammps into pppm_spin

Conflicts:
	src/KSPACE/ewald_dipole.cpp
2018-09-16 09:42:27 -06:00
b9e33e631f Fix bug in ewald_dipole forces 2018-09-15 13:34:24 -06:00
82a5346ab1 Commit JT 091418
- created pair_spin_long_qsymp
- modified ewald_dipole
2018-09-14 15:09:59 -06:00
a76457ef22 Fix bug in ewald_dipole structure factor 2018-09-14 13:05:48 -06:00
e6b5112ddc Fix issues in ewald_dipole 2018-09-13 14:36:54 -06:00
16911adcea Commit1 JT 083018
- started to work on ewald_dipole (not yet triclinic)
- compiles and runs (no memory issue)
- check the energy accuracy
2018-08-30 07:33:25 -06:00
cf1d421e10 Commit JT 082318
- corrected memory errors in pppm_dipole and pppm_dipole_spin
- created fm_long in atom_vec_spin
- fm_long added to fm in initial_integrate (in ComputeInteractionsSpin)
2018-08-23 15:18:30 -06:00
8d79db03d3 Commit1 JT 082118
- created pppm_dipole_spin.h/cpp (child-class of pppm_dipole)
- improved pair_spin_long.h/cpp
- created documentation for pair_spin_long
- new 3xN fm_long vector in atom_vec_spin (with associated comm)
2018-08-21 13:47:38 -06:00
5e287033f7 Commit1 JT 081618
- converted pppm_spin for long range spin-spin interactions
- modified kspace, pair,and pair_hybrid to add spinflag
2018-08-16 10:13:18 -06:00
e1ab38439b Commit2 JT 081418
- converted pppm_dipole toward spin quantities
- need to check if can handle ferrimagnets
2018-08-14 17:09:44 -06:00
062c1a04fc Commit JT 081418
- initial commit pppm_spin branch
- copied short_range spin files (src/SPIN)
- copied/renamed Stan's file (from pppm_dipole branch)
2018-08-14 14:42:01 -06:00
2369 changed files with 84088 additions and 29444 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
###############################################################################
# Coverage
#
# Requires latest gcovr (for GCC 8.1 support):#
# pip install git+https://github.com/gcovr/gcovr.git
###############################################################################
if(ENABLE_COVERAGE)
find_program(GCOVR_BINARY gcovr)
find_package_handle_standard_args(GCOVR DEFAULT_MSG GCOVR_BINARY)
if(GCOVR_FOUND)
get_filename_component(ABSOLUTE_LAMMPS_SOURCE_DIR ${LAMMPS_SOURCE_DIR} ABSOLUTE)
add_custom_target(
gen_coverage_xml
COMMAND ${GCOVR_BINARY} -s -x -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Generating XML Coverage Report..."
)
add_custom_target(
gen_coverage_html
COMMAND ${GCOVR_BINARY} -s --html --html-details -r ${ABSOLUTE_LAMMPS_SOURCE_DIR} --object-directory=${CMAKE_BINARY_DIR} -o coverage.html
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Generating HTML Coverage Report..."
)
endif()
endif()

View File

@ -0,0 +1,59 @@
###############################################################################
# Build documentation
###############################################################################
option(BUILD_DOC "Build LAMMPS documentation" OFF)
if(BUILD_DOC)
include(ProcessorCount)
ProcessorCount(NPROCS)
find_package(PythonInterp 3 REQUIRED)
set(VIRTUALENV ${PYTHON_EXECUTABLE} -m virtualenv)
file(GLOB DOC_SOURCES ${LAMMPS_DOC_DIR}/src/[^.]*.txt)
file(GLOB PDF_EXTRA_SOURCES ${LAMMPS_DOC_DIR}/src/lammps_commands*.txt ${LAMMPS_DOC_DIR}/src/lammps_support.txt ${LAMMPS_DOC_DIR}/src/lammps_tutorials.txt)
list(REMOVE_ITEM DOC_SOURCES ${PDF_EXTRA_SOURCES})
add_custom_command(
OUTPUT docenv
COMMAND ${VIRTUALENV} docenv
)
set(DOCENV_BINARY_DIR ${CMAKE_BINARY_DIR}/docenv/bin)
add_custom_command(
OUTPUT requirements.txt
DEPENDS docenv
COMMAND ${CMAKE_COMMAND} -E copy ${LAMMPS_DOC_DIR}/utils/requirements.txt requirements.txt
COMMAND ${DOCENV_BINARY_DIR}/pip install -r requirements.txt --upgrade
COMMAND ${DOCENV_BINARY_DIR}/pip install --upgrade ${LAMMPS_DOC_DIR}/utils/converters
)
set(RST_FILES "")
set(RST_DIR ${CMAKE_BINARY_DIR}/rst)
file(MAKE_DIRECTORY ${RST_DIR})
foreach(TXT_FILE ${DOC_SOURCES})
get_filename_component(FILENAME ${TXT_FILE} NAME_WE)
set(RST_FILE ${RST_DIR}/${FILENAME}.rst)
list(APPEND RST_FILES ${RST_FILE})
add_custom_command(
OUTPUT ${RST_FILE}
DEPENDS requirements.txt docenv ${TXT_FILE}
COMMAND ${DOCENV_BINARY_DIR}/txt2rst -o ${RST_DIR} ${TXT_FILE}
)
endforeach()
add_custom_command(
OUTPUT html
DEPENDS ${RST_FILES}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LAMMPS_DOC_DIR}/src ${RST_DIR}
COMMAND ${DOCENV_BINARY_DIR}/sphinx-build -j ${NPROCS} -b html -c ${LAMMPS_DOC_DIR}/utils/sphinx-config -d ${CMAKE_BINARY_DIR}/doctrees ${RST_DIR} html
)
add_custom_target(
doc ALL
DEPENDS html
SOURCES ${LAMMPS_DOC_DIR}/utils/requirements.txt ${DOC_SOURCES}
)
install(DIRECTORY ${CMAKE_BINARY_DIR}/html DESTINATION ${CMAKE_INSTALL_DOCDIR})
endif()

View File

@ -0,0 +1,71 @@
# Utility functions
function(list_to_bulletpoints result)
list(REMOVE_AT ARGV 0)
set(temp "")
foreach(item ${ARGV})
set(temp "${temp}* ${item}\n")
endforeach()
set(${result} "${temp}" PARENT_SCOPE)
endfunction(list_to_bulletpoints)
function(validate_option name values)
string(TOLOWER ${${name}} needle_lower)
string(TOUPPER ${${name}} needle_upper)
list(FIND ${values} ${needle_lower} IDX_LOWER)
list(FIND ${values} ${needle_upper} IDX_UPPER)
if(${IDX_LOWER} LESS 0 AND ${IDX_UPPER} LESS 0)
list_to_bulletpoints(POSSIBLE_VALUE_LIST ${${values}})
message(FATAL_ERROR "\n########################################################################\n"
"Invalid value '${${name}}' for option ${name}\n"
"\n"
"Possible values are:\n"
"${POSSIBLE_VALUE_LIST}"
"########################################################################")
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()
function(check_for_autogen_files source_dir)
message(STATUS "Running check for auto-generated files from make-based build system")
file(GLOB SRC_AUTOGEN_FILES ${source_dir}/style_*.h)
file(GLOB SRC_AUTOGEN_PACKAGES ${source_dir}/packages_*.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/lmpinstalledpkgs.h ${source_dir}/lmpgitversion.h)
foreach(_SRC ${SRC_AUTOGEN_FILES})
get_filename_component(FILENAME "${_SRC}" NAME)
if(EXISTS ${source_dir}/${FILENAME})
message(FATAL_ERROR "\n########################################################################\n"
"Found header file(s) generated by the make-based build system\n"
"\n"
"Please run\n"
"make -C ${source_dir} purge\n"
"to remove\n"
"########################################################################")
endif()
endforeach()
endfunction()
macro(pkg_depends PKG1 PKG2)
if(PKG_${PKG1} AND NOT (PKG_${PKG2} OR BUILD_${PKG2}))
message(FATAL_ERROR "${PKG1} package needs LAMMPS to be build with ${PKG2}")
endif()
endmacro()

View File

@ -0,0 +1,5 @@
if(PKG_COMPRESS)
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIRS})
list(APPEND LAMMPS_LINK_LIBS ${ZLIB_LIBRARIES})
endif()

View File

@ -0,0 +1,13 @@
if(PKG_CORESHELL)
set(CORESHELL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/CORESHELL)
set(CORESHELL_SOURCES)
set_property(GLOBAL PROPERTY "CORESHELL_SOURCES" "${CORESHELL_SOURCES}")
# detects styles which have a CORESHELL version
RegisterStylesExt(${CORESHELL_SOURCES_DIR} cs CORESHELL_SOURCES)
get_property(CORESHELL_SOURCES GLOBAL PROPERTY CORESHELL_SOURCES)
list(APPEND LIB_SOURCES ${CORESHELL_SOURCES})
include_directories(${CORESHELL_SOURCES_DIR})
endif()

View File

@ -0,0 +1,194 @@
if(PKG_GPU)
if (CMAKE_VERSION VERSION_LESS "3.1")
message(FATAL_ERROR "For the GPU package you need at least cmake-3.1")
endif()
set(GPU_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/GPU)
set(GPU_SOURCES ${GPU_SOURCES_DIR}/gpu_extra.h
${GPU_SOURCES_DIR}/fix_gpu.h
${GPU_SOURCES_DIR}/fix_gpu.cpp)
set(GPU_API "opencl" CACHE STRING "API used by GPU package")
set(GPU_API_VALUES opencl cuda)
set_property(CACHE GPU_API PROPERTY STRINGS ${GPU_API_VALUES})
validate_option(GPU_API GPU_API_VALUES)
string(TOUPPER ${GPU_API} GPU_API)
set(GPU_PREC "mixed" CACHE STRING "LAMMPS GPU precision")
set(GPU_PREC_VALUES double mixed single)
set_property(CACHE GPU_PREC PROPERTY STRINGS ${GPU_PREC_VALUES})
validate_option(GPU_PREC GPU_PREC_VALUES)
string(TOUPPER ${GPU_PREC} GPU_PREC)
if(GPU_PREC STREQUAL "DOUBLE")
set(GPU_PREC_SETTING "DOUBLE_DOUBLE")
elseif(GPU_PREC STREQUAL "MIXED")
set(GPU_PREC_SETTING "SINGLE_DOUBLE")
elseif(GPU_PREC STREQUAL "SINGLE")
set(GPU_PREC_SETTING "SINGLE_SINGLE")
endif()
file(GLOB GPU_LIB_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cpp)
file(MAKE_DIRECTORY ${LAMMPS_LIB_BINARY_DIR}/gpu)
if(GPU_API STREQUAL "CUDA")
find_package(CUDA REQUIRED)
find_program(BIN2C bin2c)
if(NOT BIN2C)
message(FATAL_ERROR "Could not find bin2c, use -DBIN2C=/path/to/bin2c to help cmake finding it.")
endif()
option(CUDPP_OPT "Enable CUDPP_OPT" ON)
option(CUDA_MPS_SUPPORT "Enable tweaks to support CUDA Multi-process service (MPS)" OFF)
if(CUDA_MPS_SUPPORT)
set(GPU_CUDA_MPS_FLAGS "-DCUDA_PROXY")
endif()
set(GPU_ARCH "sm_30" CACHE STRING "LAMMPS GPU CUDA SM primary architecture (e.g. sm_60)")
file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu ${CMAKE_CURRENT_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_pppm.cu)
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu ${LAMMPS_LIB_BINARY_DIR}/gpu)
if(CUDPP_OPT)
cuda_include_directories(${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
file(GLOB GPU_LIB_CUDPP_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cpp)
file(GLOB GPU_LIB_CUDPP_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini/[^.]*.cu)
endif()
# build arch/gencode commands for nvcc based on CUDA toolkit version and use choice
# --arch translates directly instead of JIT, so this should be for the preferred or most common architecture
set(GPU_CUDA_GENCODE "-arch=${GPU_ARCH} ")
# Fermi (GPU Arch 2.x) is supported by CUDA 3.2 to CUDA 8.0
if((CUDA_VERSION VERSION_GREATER "3.1") AND (CUDA_VERSION VERSION_LESS "9.0"))
string(APPEND GPU_CUDA_GENCODE "-gencode arch=compute_20,code=[sm_20,compute_20] ")
endif()
# Kepler (GPU Arch 3.x) is supported by CUDA 5 and later
if(CUDA_VERSION VERSION_GREATER "4.9")
string(APPEND GPU_CUDA_GENCODE "-gencode arch=compute_30,code=[sm_30,compute_30] -gencode arch=compute_35,code=[sm_35,compute_35] ")
endif()
# Maxwell (GPU Arch 5.x) is supported by CUDA 6 and later
if(CUDA_VERSION VERSION_GREATER "5.9")
string(APPEND GPU_CUDA_GENCODE "-gencode arch=compute_50,code=[sm_50,compute_50] -gencode arch=compute_52,code=[sm_52,compute_52] ")
endif()
# Pascal (GPU Arch 6.x) is supported by CUDA 8 and later
if(CUDA_VERSION VERSION_GREATER "7.9")
string(APPEND GPU_CUDA_GENCODE "-gencode arch=compute_60,code=[sm_60,compute_60] -gencode arch=compute_61,code=[sm_61,compute_61] ")
endif()
# Volta (GPU Arch 7.0) is supported by CUDA 9 and later
if(CUDA_VERSION VERSION_GREATER "8.9")
string(APPEND GPU_CUDA_GENCODE "-gencode arch=compute_70,code=[sm_70,compute_70] ")
endif()
# Turing (GPU Arch 7.5) is supported by CUDA 10 and later
if(CUDA_VERSION VERSION_GREATER "9.9")
string(APPEND GPU_CUDA_GENCODE "-gencode arch=compute_75,code=[sm_75,compute_75] ")
endif()
cuda_compile_fatbin(GPU_GEN_OBJS ${GPU_LIB_CU} OPTIONS
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DNV_KERNEL -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING})
cuda_compile(GPU_OBJS ${GPU_LIB_CUDPP_CU} OPTIONS ${CUDA_REQUEST_PIC}
-DUNIX -O3 --use_fast_math -Wno-deprecated-gpu-targets -DUCL_CUDADR ${GPU_CUDA_GENCODE} -D_${GPU_PREC_SETTING})
foreach(CU_OBJ ${GPU_GEN_OBJS})
get_filename_component(CU_NAME ${CU_OBJ} NAME_WE)
string(REGEX REPLACE "^.*_lal_" "" CU_NAME "${CU_NAME}")
add_custom_command(OUTPUT ${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}_cubin.h
COMMAND ${BIN2C} -c -n ${CU_NAME} ${CU_OBJ} > ${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}_cubin.h
DEPENDS ${CU_OBJ}
COMMENT "Generating ${CU_NAME}_cubin.h")
list(APPEND GPU_LIB_SOURCES ${LAMMPS_LIB_BINARY_DIR}/gpu/${CU_NAME}_cubin.h)
endforeach()
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${LAMMPS_LIB_BINARY_DIR}/gpu/*_cubin.h")
add_library(gpu STATIC ${GPU_LIB_SOURCES} ${GPU_LIB_CUDPP_SOURCES} ${GPU_OBJS})
target_link_libraries(gpu ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_BINARY_DIR}/gpu ${CUDA_INCLUDE_DIRS})
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -DMPI_GERYON -DUCL_NO_EXIT ${GPU_CUDA_MPS_FLAGS})
if(CUDPP_OPT)
target_include_directories(gpu PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/gpu/cudpp_mini)
target_compile_definitions(gpu PRIVATE -DUSE_CUDPP)
endif()
list(APPEND LAMMPS_LINK_LIBS gpu)
add_executable(nvc_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
target_compile_definitions(nvc_get_devices PRIVATE -DUCL_CUDADR)
target_link_libraries(nvc_get_devices PRIVATE ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
target_include_directories(nvc_get_devices PRIVATE ${CUDA_INCLUDE_DIRS})
elseif(GPU_API STREQUAL "OPENCL")
find_package(OpenCL REQUIRED)
set(OCL_TUNE "generic" CACHE STRING "OpenCL Device Tuning")
set(OCL_TUNE_VALUES intel fermi kepler cypress generic)
set_property(CACHE OCL_TUNE PROPERTY STRINGS ${OCL_TUNE_VALUES})
validate_option(OCL_TUNE OCL_TUNE_VALUES)
string(TOUPPER ${OCL_TUNE} OCL_TUNE)
include(OpenCLUtils)
set(OCL_COMMON_HEADERS ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_preprocessor.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_aux_fun1.h)
file(GLOB GPU_LIB_CU ${LAMMPS_LIB_SOURCE_DIR}/gpu/[^.]*.cu)
list(REMOVE_ITEM GPU_LIB_CU
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared_lj.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl.cu
${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod.cu
)
foreach(GPU_KERNEL ${GPU_LIB_CU})
get_filename_component(basename ${GPU_KERNEL} NAME_WE)
string(SUBSTRING ${basename} 4 -1 KERNEL_NAME)
GenerateOpenCLHeader(${KERNEL_NAME} ${CMAKE_CURRENT_BINARY_DIR}/gpu/${KERNEL_NAME}_cl.h ${OCL_COMMON_HEADERS} ${GPU_KERNEL})
list(APPEND GPU_LIB_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/gpu/${KERNEL_NAME}_cl.h)
endforeach()
GenerateOpenCLHeader(gayberne ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne.cu)
GenerateOpenCLHeader(gayberne_lj ${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_lj_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_gayberne_lj.cu)
GenerateOpenCLHeader(re_squared ${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared.cu)
GenerateOpenCLHeader(re_squared_lj ${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_lj_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_ellipsoid_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_re_squared_lj.cu)
GenerateOpenCLHeader(tersoff ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff.cu)
GenerateOpenCLHeader(tersoff_zbl ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_zbl_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_zbl.cu)
GenerateOpenCLHeader(tersoff_mod ${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_mod_cl.h ${OCL_COMMON_HEADERS} ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod_extra.h ${LAMMPS_LIB_SOURCE_DIR}/gpu/lal_tersoff_mod.cu)
list(APPEND GPU_LIB_SOURCES
${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/gayberne_lj_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/re_squared_lj_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_zbl_cl.h
${CMAKE_CURRENT_BINARY_DIR}/gpu/tersoff_mod_cl.h
)
add_library(gpu STATIC ${GPU_LIB_SOURCES})
target_link_libraries(gpu ${OpenCL_LIBRARIES})
target_include_directories(gpu PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/gpu ${OpenCL_INCLUDE_DIRS})
target_compile_definitions(gpu PRIVATE -D_${GPU_PREC_SETTING} -D${OCL_TUNE}_OCL -DMPI_GERYON -DUCL_NO_EXIT)
target_compile_definitions(gpu PRIVATE -DUSE_OPENCL)
list(APPEND LAMMPS_LINK_LIBS gpu)
add_executable(ocl_get_devices ${LAMMPS_LIB_SOURCE_DIR}/gpu/geryon/ucl_get_devices.cpp)
target_compile_definitions(ocl_get_devices PRIVATE -DUCL_OPENCL)
target_link_libraries(ocl_get_devices PRIVATE ${OpenCL_LIBRARIES})
target_include_directories(ocl_get_devices PRIVATE ${OpenCL_INCLUDE_DIRS})
endif()
# GPU package
FindStyleHeaders(${GPU_SOURCES_DIR} FIX_CLASS fix_ FIX)
set_property(GLOBAL PROPERTY "GPU_SOURCES" "${GPU_SOURCES}")
# detects styles which have GPU version
RegisterStylesExt(${GPU_SOURCES_DIR} gpu GPU_SOURCES)
get_property(GPU_SOURCES GLOBAL PROPERTY GPU_SOURCES)
list(APPEND LIB_SOURCES ${GPU_SOURCES})
include_directories(${GPU_SOURCES_DIR})
endif()

View File

@ -0,0 +1,49 @@
if(PKG_KIM)
find_package(CURL)
if(CURL_FOUND)
include_directories(${CURL_INCLUDE_DIRS})
list(APPEND LAMMPS_LINK_LIBS ${CURL_LIBRARIES})
add_definitions(-DLMP_KIM_CURL)
endif()
find_package(KIM-API QUIET)
if(KIM-API_FOUND)
set(DOWNLOAD_KIM_DEFAULT OFF)
else()
if (NOT DOWNLOAD_KIM)
message(WARNING "KIM-API package not found. We will download and build our own")
endif()
set(DOWNLOAD_KIM_DEFAULT ON)
endif()
option(DOWNLOAD_KIM "Download KIM-API from OpenKIM instead of using an already installed one" ${DOWNLOAD_KIM_DEFAULT})
if(DOWNLOAD_KIM)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded KIM-API library with Ninja build tool")
endif()
message(STATUS "KIM-API download requested - we will build our own")
include(CheckLanguage)
include(ExternalProject)
enable_language(C)
check_language(Fortran)
if(NOT CMAKE_Fortran_COMPILER)
message(FATAL_ERROR "Compiling the KIM-API library requires a Fortran compiler")
endif()
ExternalProject_Add(kim_build
URL https://s3.openkim.org/kim-api/kim-api-2.1.2.txz
URL_MD5 6ac52e14ef52967fc7858220b208cba5
BINARY_DIR build
CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER}
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
)
ExternalProject_get_property(kim_build INSTALL_DIR)
set(KIM-API_INCLUDE_DIRS ${INSTALL_DIR}/include/kim-api)
set(KIM-API_LDFLAGS ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/libkim-api${CMAKE_SHARED_LIBRARY_SUFFIX})
list(APPEND LAMMPS_DEPS kim_build)
else()
find_package(KIM-API REQUIRED)
endif()
list(APPEND LAMMPS_LINK_LIBS "${KIM-API_LDFLAGS}")
include_directories(${KIM-API_INCLUDE_DIRS})
endif()

View File

@ -0,0 +1,53 @@
if(PKG_KOKKOS)
set(LAMMPS_LIB_KOKKOS_SRC_DIR ${LAMMPS_LIB_SOURCE_DIR}/kokkos)
set(LAMMPS_LIB_KOKKOS_BIN_DIR ${LAMMPS_LIB_BINARY_DIR}/kokkos)
add_definitions(-DLMP_KOKKOS)
add_subdirectory(${LAMMPS_LIB_KOKKOS_SRC_DIR} ${LAMMPS_LIB_KOKKOS_BIN_DIR})
set(Kokkos_INCLUDE_DIRS ${LAMMPS_LIB_KOKKOS_SRC_DIR}/core/src
${LAMMPS_LIB_KOKKOS_SRC_DIR}/containers/src
${LAMMPS_LIB_KOKKOS_SRC_DIR}/algorithms/src
${LAMMPS_LIB_KOKKOS_BIN_DIR})
include_directories(${Kokkos_INCLUDE_DIRS})
list(APPEND LAMMPS_LINK_LIBS kokkos)
set(KOKKOS_PKG_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/KOKKOS)
set(KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/atom_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/atom_vec_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/comm_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/comm_tiled_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/neighbor_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/neigh_list_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/neigh_bond_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/fix_nh_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/nbin_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/domain_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/modify_kokkos.cpp)
if(PKG_KSPACE)
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/gridcomm_kokkos.cpp)
endif()
set_property(GLOBAL PROPERTY "KOKKOS_PKG_SOURCES" "${KOKKOS_PKG_SOURCES}")
# detects styles which have KOKKOS version
RegisterStylesExt(${KOKKOS_PKG_SOURCES_DIR} kokkos KOKKOS_PKG_SOURCES)
# register kokkos-only styles
RegisterNBinStyle(${KOKKOS_PKG_SOURCES_DIR}/nbin_kokkos.h)
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.h)
if(PKG_USER-DPD)
get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES)
list(APPEND KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.cpp)
RegisterNPairStyle(${KOKKOS_PKG_SOURCES_DIR}/npair_ssa_kokkos.h)
set_property(GLOBAL PROPERTY "KOKKOS_PKG_SOURCES" "${KOKKOS_PKG_SOURCES}")
endif()
get_property(KOKKOS_PKG_SOURCES GLOBAL PROPERTY KOKKOS_PKG_SOURCES)
list(APPEND LIB_SOURCES ${KOKKOS_PKG_SOURCES})
include_directories(${KOKKOS_PKG_SOURCES_DIR})
endif()

View File

@ -0,0 +1,42 @@
if(PKG_KSPACE)
option(FFT_SINGLE "Use single precision FFTs instead of double precision FFTs" OFF)
set(FFTW "FFTW3")
if(FFT_SINGLE)
set(FFTW "FFTW3F")
add_definitions(-DFFT_SINGLE)
endif()
find_package(${FFTW} QUIET)
if(${FFTW}_FOUND)
set(FFT "FFTW3" CACHE STRING "FFT library for KSPACE package")
else()
set(FFT "KISS" CACHE STRING "FFT library for KSPACE package")
endif()
set(FFT_VALUES KISS FFTW3 MKL)
set_property(CACHE FFT PROPERTY STRINGS ${FFT_VALUES})
validate_option(FFT FFT_VALUES)
string(TOUPPER ${FFT} FFT)
if(FFT STREQUAL "FFTW3")
find_package(${FFTW} REQUIRED)
add_definitions(-DFFT_FFTW3)
include_directories(${${FFTW}_INCLUDE_DIRS})
list(APPEND LAMMPS_LINK_LIBS ${${FFTW}_LIBRARIES})
elseif(FFT STREQUAL "MKL")
find_package(MKL REQUIRED)
add_definitions(-DFFT_MKL)
include_directories(${MKL_INCLUDE_DIRS})
list(APPEND LAMMPS_LINK_LIBS ${MKL_LIBRARIES})
else()
# last option is KISSFFT
add_definitions(-DFFT_KISS)
endif()
set(FFT_PACK "array" CACHE STRING "Optimization for FFT")
set(FFT_PACK_VALUES array pointer memcpy)
set_property(CACHE FFT_PACK PROPERTY STRINGS ${FFT_PACK_VALUES})
validate_option(FFT_PACK FFT_PACK_VALUES)
if(NOT FFT_PACK STREQUAL "array")
string(TOUPPER ${FFT_PACK} FFT_PACK)
add_definitions(-DFFT_PACK_${FFT_PACK})
endif()
endif()

View File

@ -0,0 +1,38 @@
if(PKG_LATTE)
enable_language(Fortran)
find_package(LATTE)
if(LATTE_FOUND)
set(DOWNLOAD_LATTE_DEFAULT OFF)
else()
set(DOWNLOAD_LATTE_DEFAULT ON)
endif()
option(DOWNLOAD_LATTE "Download the LATTE library instead of using an already installed one" ${DOWNLOAD_LATTE_DEFAULT})
if(DOWNLOAD_LATTE)
if (CMAKE_VERSION VERSION_LESS "3.7") # due to SOURCE_SUBDIR
message(FATAL_ERROR "For downlading LATTE you need at least cmake-3.7")
endif()
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded LATTE library with Ninja build tool")
endif()
message(STATUS "LATTE download requested - we will build our own")
include(ExternalProject)
ExternalProject_Add(latte_build
URL https://github.com/lanl/LATTE/archive/v1.2.1.tar.gz
URL_MD5 85ac414fdada2d04619c8f936344df14
SOURCE_SUBDIR cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC}
-DBLAS_LIBRARIES=${BLAS_LIBRARIES} -DLAPACK_LIBRARIES=${LAPACK_LIBRARIES}
-DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} -DCMAKE_Fortran_FLAGS=${CMAKE_Fortran_FLAGS}
-DCMAKE_Fortran_FLAGS_${BTYPE}=${CMAKE_Fortran_FLAGS_${BTYPE}} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
)
ExternalProject_get_property(latte_build INSTALL_DIR)
set(LATTE_LIBRARIES ${INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/liblatte.a)
list(APPEND LAMMPS_DEPS latte_build)
else()
find_package(LATTE)
if(NOT LATTE_FOUND)
message(FATAL_ERROR "LATTE library not found, help CMake to find it by setting LATTE_LIBRARY, or set DOWNLOAD_LATTE=ON to download it")
endif()
endif()
list(APPEND LAMMPS_LINK_LIBS ${LATTE_LIBRARIES} ${LAPACK_LIBRARIES})
endif()

View File

@ -0,0 +1,29 @@
if(PKG_MESSAGE)
option(MESSAGE_ZMQ "Use ZeroMQ in MESSAGE package" OFF)
file(GLOB_RECURSE cslib_SOURCES ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.F
${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.c
${LAMMPS_LIB_SOURCE_DIR}/message/cslib/[^.]*.cpp)
add_library(cslib STATIC ${cslib_SOURCES})
if(BUILD_MPI)
target_compile_definitions(cslib PRIVATE -DMPI_YES)
set_target_properties(cslib PROPERTIES OUTPUT_NAME "csmpi")
else()
target_compile_definitions(cslib PRIVATE -DMPI_NO)
target_include_directories(cslib PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src/STUBS_MPI)
set_target_properties(cslib PROPERTIES OUTPUT_NAME "csnompi")
endif()
if(MESSAGE_ZMQ)
target_compile_definitions(cslib PRIVATE -DZMQ_YES)
find_package(ZMQ REQUIRED)
target_include_directories(cslib PRIVATE ${ZMQ_INCLUDE_DIRS})
target_link_libraries(cslib PUBLIC ${ZMQ_LIBRARIES})
else()
target_compile_definitions(cslib PRIVATE -DZMQ_NO)
target_include_directories(cslib PRIVATE ${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src/STUBS_ZMQ)
endif()
list(APPEND LAMMPS_LINK_LIBS cslib)
include_directories(${LAMMPS_LIB_SOURCE_DIR}/message/cslib/src)
endif()

View File

@ -0,0 +1,45 @@
if(PKG_MSCG)
find_package(GSL REQUIRED)
find_package(MSCG QUIET)
if(MSGC_FOUND)
set(DOWNLOAD_MSCG_DEFAULT OFF)
else()
set(DOWNLOAD_MSCG_DEFAULT ON)
endif()
option(DOWNLOAD_MSCG "Download MSCG library instead of using an already installed one)" ${DOWNLOAD_MSCG_DEFAULT})
if(DOWNLOAD_MSCG)
if (CMAKE_VERSION VERSION_LESS "3.7") # due to SOURCE_SUBDIR
message(FATAL_ERROR "For downlading MSCG you need at least cmake-3.7")
endif()
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded MSCG library with Ninja build tool")
endif()
include(ExternalProject)
if(NOT LAPACK_FOUND)
set(EXTRA_MSCG_OPTS "-DLAPACK_LIBRARIES=${CMAKE_CURRENT_BINARY_DIR}/liblinalg.a")
endif()
ExternalProject_Add(mscg_build
URL https://github.com/uchicago-voth/MSCG-release/archive/1.7.3.1.tar.gz
URL_MD5 8c45e269ee13f60b303edd7823866a91
SOURCE_SUBDIR src/CMake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> ${CMAKE_REQUEST_PIC} ${EXTRA_MSCG_OPTS}
BUILD_COMMAND make mscg INSTALL_COMMAND ""
)
ExternalProject_get_property(mscg_build BINARY_DIR)
set(MSCG_LIBRARIES ${BINARY_DIR}/libmscg.a)
ExternalProject_get_property(mscg_build SOURCE_DIR)
set(MSCG_INCLUDE_DIRS ${SOURCE_DIR}/src)
list(APPEND LAMMPS_DEPS mscg_build)
if(NOT LAPACK_FOUND)
file(MAKE_DIRECTORY ${MSCG_INCLUDE_DIRS})
add_dependencies(mscg_build linalg)
endif()
else()
find_package(MSCG)
if(NOT MSCG_FOUND)
message(FATAL_ERROR "MSCG not found, help CMake to find it by setting MSCG_LIBRARY and MSCG_INCLUDE_DIRS, or set DOWNLOAD_MSCG=ON to download it")
endif()
endif()
list(APPEND LAMMPS_LINK_LIBS ${MSCG_LIBRARIES} ${GSL_LIBRARIES} ${LAPACK_LIBRARIES})
include_directories(${MSCG_INCLUDE_DIRS})
endif()

View File

@ -0,0 +1,13 @@
if(PKG_OPT)
set(OPT_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/OPT)
set(OPT_SOURCES)
set_property(GLOBAL PROPERTY "OPT_SOURCES" "${OPT_SOURCES}")
# detects styles which have OPT version
RegisterStylesExt(${OPT_SOURCES_DIR} opt OPT_SOURCES)
get_property(OPT_SOURCES GLOBAL PROPERTY OPT_SOURCES)
list(APPEND LIB_SOURCES ${OPT_SOURCES})
include_directories(${OPT_SOURCES_DIR})
endif()

View File

@ -0,0 +1,6 @@
if(PKG_PYTHON)
find_package(PythonLibs REQUIRED)
add_definitions(-DLMP_PYTHON)
include_directories(${PYTHON_INCLUDE_DIR})
list(APPEND LAMMPS_LINK_LIBS ${PYTHON_LIBRARY})
endif()

View File

@ -0,0 +1,20 @@
# Fix qeq/fire requires MANYBODY (i.e. COMB and COMB3) to be installed
if(PKG_QEQ)
set(QEQ_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/QEQ)
file(GLOB QEQ_HEADERS ${QEQ_SOURCES_DIR}/fix*.h)
file(GLOB QEQ_SOURCES ${QEQ_SOURCES_DIR}/fix*.cpp)
if(NOT PKG_MANYBODY)
list(REMOVE_ITEM QEQ_HEADERS ${QEQ_SOURCES_DIR}/fix_qeq_fire.h)
list(REMOVE_ITEM QEQ_SOURCES ${QEQ_SOURCES_DIR}/fix_qeq_fire.cpp)
endif()
set_property(GLOBAL PROPERTY "QEQ_SOURCES" "${QEQ_SOURCES}")
foreach(MY_HEADER ${QEQ_HEADERS})
AddStyleHeader(${MY_HEADER} FIX)
endforeach()
get_property(QEQ_SOURCES GLOBAL PROPERTY QEQ_SOURCES)
list(APPEND LIB_SOURCES ${QEQ_SOURCES})
include_directories(${QEQ_SOURCES_DIR})
endif()

View File

@ -0,0 +1,8 @@
if(PKG_USER-H5MD)
enable_language(C)
find_package(HDF5 REQUIRED)
target_link_libraries(h5md ${HDF5_LIBRARIES})
target_include_directories(h5md PRIVATE ${HDF5_INCLUDE_DIRS})
include_directories(${HDF5_INCLUDE_DIRS})
endif()

View File

@ -0,0 +1,118 @@
if(PKG_USER-INTEL)
check_include_file_cxx(immintrin.h FOUND_IMMINTRIN)
if(NOT FOUND_IMMINTRIN)
message(FATAL_ERROR "immintrin.h header not found, Intel package won't work without it")
endif()
add_definitions(-DLMP_USER_INTEL)
set(INTEL_ARCH "cpu" CACHE STRING "Architectures used by USER-INTEL (cpu or knl)")
set(INTEL_ARCH_VALUES cpu knl)
set_property(CACHE INTEL_ARCH PROPERTY STRINGS ${INTEL_ARCH_VALUES})
validate_option(INTEL_ARCH INTEL_ARCH_VALUES)
string(TOUPPER ${INTEL_ARCH} INTEL_ARCH)
find_package(Threads QUIET)
if(Threads_FOUND)
set(INTEL_LRT_MODE "threads" CACHE STRING "Long-range threads mode (none, threads, or c++11)")
else()
set(INTEL_LRT_MODE "none" CACHE STRING "Long-range threads mode (none, threads, or c++11)")
endif()
set(INTEL_LRT_VALUES none threads c++11)
set_property(CACHE INTEL_LRT_MODE PROPERTY STRINGS ${INTEL_LRT_VALUES})
validate_option(INTEL_LRT_MODE INTEL_LRT_VALUES)
string(TOUPPER ${INTEL_LRT_MODE} INTEL_LRT_MODE)
if(INTEL_LRT_MODE STREQUAL "THREADS")
if(Threads_FOUND)
add_definitions(-DLMP_INTEL_USELRT)
list(APPEND LAMMPS_LINK_LIBS ${CMAKE_THREAD_LIBS_INIT})
else()
message(FATAL_ERROR "Must have working threads library for Long-range thread support")
endif()
endif()
if(INTEL_LRT_MODE STREQUAL "C++11")
add_definitions(-DLMP_INTEL_USERLRT -DLMP_INTEL_LRT11)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
message(FATAL_ERROR "USER-INTEL needs at least a 2016 Intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
endif()
else()
message(WARNING "USER-INTEL gives best performance with Intel compilers")
endif()
find_package(TBB QUIET)
if(TBB_FOUND)
list(APPEND LAMMPS_LINK_LIBS ${TBB_MALLOC_LIBRARIES})
else()
add_definitions(-DLMP_INTEL_NO_TBB)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(WARNING "USER-INTEL with Intel compilers should use TBB malloc libraries")
endif()
endif()
find_package(MKL QUIET)
if(MKL_FOUND)
add_definitions(-DLMP_USE_MKL_RNG)
list(APPEND LAMMPS_LINK_LIBS ${MKL_LIBRARIES})
else()
message(STATUS "Pair style dpd/intel will be faster with MKL libraries")
endif()
if((NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "64") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "128") AND (NOT ${LAMMPS_MEMALIGN} STREQUAL "256"))
message(FATAL_ERROR "USER-INTEL only supports memory alignment of 64, 128 or 256 on this platform")
endif()
if(INTEL_ARCH STREQUAL "KNL")
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(FATAL_ERROR "Must use Intel compiler with USER-INTEL for KNL architecture")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -xHost -qopenmp -qoffload")
set(MIC_OPTIONS "-qoffload-option,mic,compiler,\"-fp-model fast=2 -mGLOB_default_function_attrs=\\\"gather_scatter_loop_unroll=4\\\"\"")
add_compile_options(-xMIC-AVX512 -qoffload -fno-alias -ansi-alias -restrict -qoverride-limits ${MIC_OPTIONS})
add_definitions(-DLMP_INTEL_OFFLOAD)
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xCOMMON-AVX512")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -xHost")
endif()
include(CheckCXXCompilerFlag)
foreach(_FLAG -O2 -fp-model fast=2 -no-prec-div -qoverride-limits -qopt-zmm-usage=high -qno-offload -fno-alias -ansi-alias -restrict)
check_cxx_compiler_flag("${__FLAG}" COMPILER_SUPPORTS${_FLAG})
if(COMPILER_SUPPORTS${_FLAG})
add_compile_options(${_FLAG})
endif()
endforeach()
else()
add_compile_options(-O3 -ffast-math)
endif()
endif()
# collect sources
set(USER-INTEL_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-INTEL)
set(USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/fix_intel.cpp
${USER-INTEL_SOURCES_DIR}/fix_nh_intel.cpp
${USER-INTEL_SOURCES_DIR}/intel_buffers.cpp
${USER-INTEL_SOURCES_DIR}/nbin_intel.cpp
${USER-INTEL_SOURCES_DIR}/npair_intel.cpp)
set_property(GLOBAL PROPERTY "USER-INTEL_SOURCES" "${USER-INTEL_SOURCES}")
# detect styles which have a USER-INTEL version
RegisterStylesExt(${USER-INTEL_SOURCES_DIR} intel USER-INTEL_SOURCES)
RegisterNBinStyle(${USER-INTEL_SOURCES_DIR}/nbin_intel.h)
RegisterNPairStyle(${USER-INTEL_SOURCES_DIR}/npair_intel.h)
RegisterFixStyle(${USER-INTEL_SOURCES_DIR}/fix_intel.h)
get_property(USER-INTEL_SOURCES GLOBAL PROPERTY USER-INTEL_SOURCES)
if(PKG_KSPACE)
list(APPEND USER-INTEL_SOURCES ${USER-INTEL_SOURCES_DIR}/verlet_lrt_intel.cpp)
RegisterIntegrateStyle(${USER-INTEL_SOURCES_DIR}/verlet_lrt_intel.h)
endif()
list(APPEND LIB_SOURCES ${USER-INTEL_SOURCES})
include_directories(${USER-INTEL_SOURCES_DIR})
endif()

View File

@ -0,0 +1,10 @@
if(PKG_USER-MOLFILE)
set(MOLFILE_INCLUDE_DIRS "${LAMMPS_LIB_SOURCE_DIR}/molfile" CACHE STRING "Path to VMD molfile plugin headers")
add_library(molfile INTERFACE)
target_include_directories(molfile INTERFACE ${MOLFILE_INCLUDE_DIRS})
# no need to link with -ldl on windows
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
target_link_libraries(molfile INTERFACE ${CMAKE_DL_LIBS})
endif()
list(APPEND LAMMPS_LINK_LIBS molfile)
endif()

View File

@ -0,0 +1,6 @@
if(PKG_USER-NETCDF)
find_package(NetCDF REQUIRED)
include_directories(${NETCDF_INCLUDE_DIRS})
list(APPEND LAMMPS_LINK_LIBS ${NETCDF_LIBRARIES})
add_definitions(-DLMP_HAS_NETCDF -DNC_64BIT_DATA=0x0020)
endif()

View File

@ -0,0 +1,42 @@
if(PKG_USER-OMP)
set(USER-OMP_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/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_omp.cpp
${USER-OMP_SOURCES_DIR}/fix_nh_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
RegisterStylesExt(${USER-OMP_SOURCES_DIR} omp OMP_SOURCES)
RegisterFixStyle(${USER-OMP_SOURCES_DIR}/fix_omp.h)
get_property(USER-OMP_SOURCES GLOBAL PROPERTY OMP_SOURCES)
# manually add package dependent source files from USER-OMP that do not provide styles
if(PKG_ASPHERE)
list(APPEND USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/fix_nh_asphere_omp.cpp)
endif()
if(PKG_RIGID)
list(APPEND USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/fix_rigid_nh_omp.cpp)
endif()
if(PKG_USER-REAXC)
list(APPEND USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/reaxc_bond_orders_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_hydrogen_bonds_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_nonbonded_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_bonds_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_init_md_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_torsion_angles_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_forces_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_multi_body_omp.cpp
${USER-OMP_SOURCES_DIR}/reaxc_valence_angles_omp.cpp)
endif()
list(APPEND LIB_SOURCES ${USER-OMP_SOURCES})
include_directories(${USER-OMP_SOURCES_DIR})
endif()

View File

@ -0,0 +1,91 @@
if(PKG_USER-PLUMED)
set(PLUMED_MODE "static" CACHE STRING "Linkage mode for Plumed2 library")
set(PLUMED_MODE_VALUES static shared runtime)
set_property(CACHE PLUMED_MODE PROPERTY STRINGS ${PLUMED_MODE_VALUES})
validate_option(PLUMED_MODE PLUMED_MODE_VALUES)
string(TOUPPER ${PLUMED_MODE} PLUMED_MODE)
set(PLUMED_LINK_LIBS "")
if(PLUMED_MODE STREQUAL "STATIC")
find_package(LAPACK REQUIRED)
find_package(BLAS REQUIRED)
find_package(GSL REQUIRED)
list(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES})
list(APPEND PLUMED_LINK_LIBS ${LAPACK_LIBRARIES} ${GSL_LIBRARIES})
find_package(ZLIB QUIET)
if(ZLIB_FOUND)
list(APPEND PLUMED_LINK_LIBS ${ZLIB_LIBRARIES})
endif()
endif()
find_package(PkgConfig QUIET)
set(DOWNLOAD_PLUMED_DEFAULT ON)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PLUMED QUIET plumed)
if(PLUMED_FOUND)
set(DOWNLOAD_PLUMED_DEFAULT OFF)
endif()
endif()
option(DOWNLOAD_PLUMED "Download Plumed package instead of using an already installed one" ${DOWNLOAD_PLUMED_DEFAULT})
if(DOWNLOAD_PLUMED)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded Plumed library with Ninja build tool")
endif()
if(BUILD_MPI)
set(PLUMED_CONFIG_MPI "--enable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
set(PLUMED_CONFIG_CXX ${CMAKE_MPI_CXX_COMPILER})
else()
set(PLUMED_CONFIG_MPI "--disable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_C_COMPILER})
set(PLUMED_CONFIG_CXX ${CMAKE_CXX_COMPILER})
endif()
if(BUILD_OMP)
set(PLUMED_CONFIG_OMP "--enable-openmp")
else()
set(PLUMED_CONFIG_OMP "--disable-openmp")
endif()
message(STATUS "PLUMED download requested - we will build our own")
include(ExternalProject)
ExternalProject_Add(plumed_build
URL https://github.com/plumed/plumed2/releases/download/v2.5.2/plumed-src-2.5.2.tgz
URL_MD5 bd2f18346c788eb54e1e52f4f6acf41a
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
${CONFIGURE_REQUEST_PIC}
--enable-modules=all
${PLUMED_CONFIG_MPI}
${PLUMED_CONFIG_OMP}
CXX=${PLUMED_CONFIG_CXX}
CC=${PLUMED_CONFIG_CC}
)
ExternalProject_get_property(plumed_build INSTALL_DIR)
set(PLUMED_INSTALL_DIR ${INSTALL_DIR})
list(APPEND LAMMPS_DEPS plumed_build)
if(PLUMED_MODE STREQUAL "STATIC")
add_definitions(-D__PLUMED_WRAPPER_CXX=1)
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed.a ${PLUMED_LINK_LIBS} ${CMAKE_DL_LIBS})
elseif(PLUMED_MODE STREQUAL "SHARED")
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumed${CMAKE_SHARED_LIBRARY_SUFFIX} ${PLUMED_INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX} ${CMAKE_DL_LIBS})
elseif(PLUMED_MODE STREQUAL "RUNTIME")
add_definitions(-D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_INSTALL_DIR}/lib/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX})
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_INSTALL_DIR}/lib/libplumedWrapper.a -rdynamic ${CMAKE_DL_LIBS})
endif()
set(PLUMED_INCLUDE_DIRS "${PLUMED_INSTALL_DIR}/include")
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(PLUMED REQUIRED plumed)
if(PLUMED_MODE STREQUAL "STATIC")
add_definitions(-D__PLUMED_WRAPPER_CXX=1)
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.static)
elseif(PLUMED_MODE STREQUAL "SHARED")
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.shared)
elseif(PLUMED_MODE STREQUAL "RUNTIME")
add_definitions(-D__PLUMED_HAS_DLOPEN=1 -D__PLUMED_DEFAULT_KERNEL=${PLUMED_LIBDIR}/libplumedKernel${CMAKE_SHARED_LIBRARY_SUFFIX})
include(${PLUMED_LIBDIR}/plumed/src/lib/Plumed.cmake.runtime)
endif()
list(APPEND LAMMPS_LINK_LIBS ${PLUMED_LOAD})
endif()
include_directories(${PLUMED_INCLUDE_DIRS})
endif()

View File

@ -0,0 +1,9 @@
if(PKG_USER-QMMM)
enable_language(Fortran)
enable_language(C)
message(WARNING "Building QMMM with CMake is still experimental")
find_package(QE REQUIRED)
include_directories(${QE_INCLUDE_DIRS})
list(APPEND LAMMPS_LINK_LIBS ${QE_LIBRARIES})
endif()

View File

@ -0,0 +1,5 @@
if(PKG_USER-QUIP)
enable_language(Fortran)
find_package(QUIP REQUIRED)
list(APPEND LAMMPS_LINK_LIBS ${QUIP_LIBRARIES} ${LAPACK_LIBRARIES})
endif()

View File

@ -0,0 +1,62 @@
if(PKG_USER-SCAFACOS)
enable_language(Fortran)
enable_language(C)
find_package(GSL REQUIRED)
find_package(PkgConfig QUIET)
set(DOWNLOAD_SCAFACOS_DEFAULT ON)
if(PKG_CONFIG_FOUND)
pkg_check_modules(SCAFACOS QUIET scafacos)
if(SCAFACOS_FOUND)
set(DOWNLOAD_SCAFACOS_DEFAULT OFF)
endif()
endif()
option(DOWNLOAD_SCAFACOS "Download ScaFaCoS library instead of using an already installed one" ${DOWNLOAD_SCAFACOS_DEFAULT})
if(DOWNLOAD_SCAFACOS)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded ScaFaCoS library with Ninja build tool")
endif()
message(STATUS "ScaFaCoS download requested - we will build our own")
include(ExternalProject)
ExternalProject_Add(scafacos_build
URL https://github.com/scafacos/scafacos/releases/download/v1.0.1/scafacos-1.0.1.tar.gz
URL_MD5 bd46d74e3296bd8a444d731bb10c1738
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> --disable-doc
--enable-fcs-solvers=fmm,p2nfft,direct,ewald,p3m
--with-internal-fftw --with-internal-pfft
--with-internal-pnfft ${CONFIGURE_REQUEST_PIC}
FC=${CMAKE_MPI_Fortran_COMPILER}
CXX=${CMAKE_MPI_CXX_COMPILER}
CC=${CMAKE_MPI_C_COMPILER}
F77=
)
ExternalProject_get_property(scafacos_build INSTALL_DIR)
set(SCAFACOS_BUILD_DIR ${INSTALL_DIR})
set(SCAFACOS_INCLUDE_DIRS ${SCAFACOS_BUILD_DIR}/include)
list(APPEND LAMMPS_DEPS scafacos_build)
# list and order from pkg_config file of ScaFaCoS build
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_direct.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_ewald.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_fmm.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_p2nfft.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_p3m.a)
list(APPEND LAMMPS_LINK_LIBS ${GSL_LIBRARIES})
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_near.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_gridsort.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_resort.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_redist.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_common.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_pnfft.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_pfft.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_fftw3_mpi.a)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_fftw3.a)
list(APPEND LAMMPS_LINK_LIBS ${MPI_Fortran_LIBRARIES})
list(APPEND LAMMPS_LINK_LIBS ${MPI_C_LIBRARIES})
else()
find_package(PkgConfig REQUIRED)
pkg_check_modules(SCAFACOS REQUIRED scafacos)
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_LDFLAGS})
endif()
include_directories(${SCAFACOS_INCLUDE_DIRS})
endif()

View File

@ -0,0 +1,13 @@
# Fix rigid/meso requires RIGID to be installed
if(PKG_USER-SDPD)
set(USER-SDPD_SOURCES_DIR ${LAMMPS_SOURCE_DIR}/USER-SDPD)
get_property(hlist GLOBAL PROPERTY FIX)
if(NOT PKG_RIGID)
list(REMOVE_ITEM hlist ${USER-SDPD_SOURCES_DIR}/fix_rigid_meso.h)
list(REMOVE_ITEM LIB_SOURCES ${USER-SDPD_SOURCES_DIR}/fix_rigid_meso.cpp)
endif()
set_property(GLOBAL PROPERTY FIX "${hlist}")
include_directories(${USER-SDPD_SOURCES_DIR})
endif()

View File

@ -0,0 +1,28 @@
if(PKG_USER-SMD)
find_package(Eigen3 NO_MODULE)
if(EIGEN3_FOUND)
set(DOWNLOAD_EIGEN3_DEFAULT OFF)
else()
set(DOWNLOAD_EIGEN3_DEFAULT ON)
endif()
option(DOWNLOAD_EIGEN3 "Download Eigen3 instead of using an already installed one)" ${DOWNLOAD_EIGEN3_DEFAULT})
if(DOWNLOAD_EIGEN3)
message(STATUS "Eigen3 download requested - we will build our own")
include(ExternalProject)
ExternalProject_Add(Eigen3_build
URL http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz
URL_MD5 f2a417d083fe8ca4b8ed2bc613d20f07
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
)
ExternalProject_get_property(Eigen3_build SOURCE_DIR)
set(EIGEN3_INCLUDE_DIR ${SOURCE_DIR})
list(APPEND LAMMPS_DEPS Eigen3_build)
else()
find_package(Eigen3 NO_MODULE)
mark_as_advanced(Eigen3_DIR)
if(NOT EIGEN3_FOUND)
message(FATAL_ERROR "Eigen3 not found, help CMake to find it by setting EIGEN3_INCLUDE_DIR, or set DOWNLOAD_EIGEN3=ON to download it")
endif()
endif()
include_directories(${EIGEN3_INCLUDE_DIR})
endif()

View File

@ -0,0 +1,6 @@
if(PKG_USER-VTK)
find_package(VTK REQUIRED NO_MODULE)
include(${VTK_USE_FILE})
add_definitions(-DLAMMPS_VTK)
list(APPEND LAMMPS_LINK_LIBS ${VTK_LIBRARIES})
endif()

View File

@ -0,0 +1,45 @@
if(PKG_VORONOI)
find_package(VORO)
if(VORO_FOUND)
set(DOWNLOAD_VORO_DEFAULT OFF)
else()
set(DOWNLOAD_VORO_DEFAULT ON)
endif()
option(DOWNLOAD_VORO "Download and compile the Voro++ library instead of using an already installed one" ${DOWNLOAD_VORO_DEFAULT})
if(DOWNLOAD_VORO)
if(CMAKE_GENERATOR STREQUAL "Ninja")
message(FATAL_ERROR "Cannot build downloaded Voro++ library with Ninja build tool")
endif()
message(STATUS "Voro++ download requested - we will build our own")
include(ExternalProject)
if(BUILD_SHARED_LIBS)
set(VORO_BUILD_CFLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}")
else()
set(VORO_BUILD_CFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTYPE}}")
endif()
if(APPLE)
get_filename_component(VORO_CXX ${CMAKE_CXX_COMPILER} NAME_WE)
set(VORO_BUILD_OPTIONS CXX=${VORO_CXX} CFLAGS=${VORO_BUILD_CFLAGS})
else()
set(VORO_BUILD_OPTIONS CXX=${CMAKE_CXX_COMPILER} CFLAGS=${VORO_BUILD_CFLAGS})
endif()
ExternalProject_Add(voro_build
URL https://download.lammps.org/thirdparty/voro++-0.4.6.tar.gz
URL_MD5 2338b824c3b7b25590e18e8df5d68af9
CONFIGURE_COMMAND "" BUILD_COMMAND make ${VORO_BUILD_OPTIONS} BUILD_IN_SOURCE 1 INSTALL_COMMAND ""
)
ExternalProject_get_property(voro_build SOURCE_DIR)
set(VORO_LIBRARIES ${SOURCE_DIR}/src/libvoro++.a)
set(VORO_INCLUDE_DIRS ${SOURCE_DIR}/src)
list(APPEND LAMMPS_DEPS voro_build)
else()
find_package(VORO)
if(NOT VORO_FOUND)
message(FATAL_ERROR "Voro++ library not found. Help CMake to find it by setting VORO_LIBRARY and VORO_INCLUDE_DIR, or set DOWNLOAD_VORO=ON to download it")
endif()
endif()
include_directories(${VORO_INCLUDE_DIRS})
list(APPEND LAMMPS_LINK_LIBS ${VORO_LIBRARIES})
endif()

View File

@ -0,0 +1,52 @@
###############################################################################
# Testing
###############################################################################
option(ENABLE_TESTING "Enable testing" OFF)
if(ENABLE_TESTING AND BUILD_EXE)
enable_testing()
option(LAMMPS_TESTING_SOURCE_DIR "Location of lammps-testing source directory" "")
option(LAMMPS_TESTING_GIT_TAG "Git tag of lammps-testing" "master")
mark_as_advanced(LAMMPS_TESTING_SOURCE_DIR LAMMPS_TESTING_GIT_TAG)
if (CMAKE_VERSION VERSION_GREATER "3.10.3" AND NOT LAMMPS_TESTING_SOURCE_DIR)
include(FetchContent)
FetchContent_Declare(lammps-testing
GIT_REPOSITORY https://github.com/lammps/lammps-testing.git
GIT_TAG ${LAMMPS_TESTING_GIT_TAG}
)
FetchContent_GetProperties(lammps-testing)
if(NOT lammps-testing_POPULATED)
message(STATUS "Downloading tests...")
FetchContent_Populate(lammps-testing)
endif()
set(LAMMPS_TESTING_SOURCE_DIR ${lammps-testing_SOURCE_DIR})
elseif(NOT LAMMPS_TESTING_SOURCE_DIR)
message(WARNING "Full test-suite requires CMake >= 3.11 or copy of\n"
"https://github.com/lammps/lammps-testing in LAMMPS_TESTING_SOURCE_DIR")
endif()
add_test(ShowHelp ${CMAKE_BINARY_DIR}/${LAMMPS_BINARY} -help)
if(EXISTS ${LAMMPS_TESTING_SOURCE_DIR})
message(STATUS "Running test discovery...")
file(GLOB_RECURSE TEST_SCRIPTS ${LAMMPS_TESTING_SOURCE_DIR}/tests/core/*/in.*)
foreach(script_path ${TEST_SCRIPTS})
get_filename_component(TEST_NAME ${script_path} EXT)
get_filename_component(SCRIPT_NAME ${script_path} NAME)
get_filename_component(PARENT_DIR ${script_path} DIRECTORY)
string(SUBSTRING ${TEST_NAME} 1 -1 TEST_NAME)
string(REPLACE "-" "_" TEST_NAME ${TEST_NAME})
string(REPLACE "+" "_" TEST_NAME ${TEST_NAME})
set(TEST_NAME "test_core_${TEST_NAME}_serial")
add_test(${TEST_NAME} ${CMAKE_BINARY_DIR}/${LAMMPS_BINARY} -in ${SCRIPT_NAME})
set_tests_properties(${TEST_NAME} PROPERTIES WORKING_DIRECTORY ${PARENT_DIR})
endforeach()
list(LENGTH TEST_SCRIPTS NUM_TESTS)
message(STATUS "Found ${NUM_TESTS} tests.")
endif()
endif()

View File

@ -1,4 +1,4 @@
# set environment for LAMMPS and msi2lmp executables
# to find potential and force field files
if ( "$?LAMMPS_POTENTIALS" == 0 ) setenv LAMMPS_POTENTIALS @LAMMPS_POTENTIALS_DIR@
if ( "$?MSI2LMP_LIBRARY" == 0 ) setenv MSI2LMP_LIBRARY @LAMMPS_FRC_FILES_DIR@
if ( "$?LAMMPS_POTENTIALS" == 0 ) setenv LAMMPS_POTENTIALS @LAMMPS_INSTALL_DATADIR@/potentials
if ( "$?MSI2LMP_LIBRARY" == 0 ) setenv MSI2LMP_LIBRARY @LAMMPS_INSTALL_DATADIR@/frc_files

View File

@ -1,5 +1,5 @@
# set environment for LAMMPS and msi2lmp executables
# to find potential and force field files
LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS-@LAMMPS_POTENTIALS_DIR@}
MSI2LMP_LIBRARY=${MSI2LMP_LIBRARY-@LAMMPS_FRC_FILES_DIR@}
LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS-@LAMMPS_INSTALL_DATADIR@/potentials}
MSI2LMP_LIBRARY=${MSI2LMP_LIBRARY-@LAMMPS_INSTALL_DATADIR@/frc_files}
export LAMMPS_POTENTIALS MSI2LMP_LIBRARY

View File

@ -0,0 +1,133 @@
# Outline of include file conventions in LAMMPS
This purpose of this document is to provide a point of reference
for LAMMPS developers and contributors as to what include files
and definitions to put where into LAMMPS source.
Last change 2019-07-05
## Table of Contents
* [Motivation](#motivation)
* [Rules](#rules)
* [Tools](#tools)
* [Legacy Code](#legacy-code)
## Motivation
The conventions outlined in this document are supposed to help make
maintenance of the LAMMPS software easier. By trying to achieve
consistency across files contributed by different developers, it will
become easier for the code maintainers to modify and adjust files and,
overall, the chance for errors or portability issues will be reduced.
The rules employed are supposed to minimize naming conflicts and
simplify dependencies between files and thus speed up compilation. They
may, as well, make otherwise hidden dependencies visible.
## Rules
Below are the various rules that are applied. Not all are enforced
strictly and automatically. If there are no significant side effects,
exceptions may be possible for cases where a full compliance to the
rules may require a large effort compared to the benefit.
### Core Files Versus Package Files
All rules listed below are most strictly observed for core LAMMPS files,
which are the files that are not part of a package, and the files of the
packages MOLECULE, MANYBODY, KSPACE, and RIGID. On the other end of
the spectrum are USER packages and legacy packages that predate these
rules and thus may not be fully compliant. Also, new contributions
will be checked more closely, while existing code will be incrementally
adapted to the rules as time and required effort permits.
### System Versus Local Header Files
All system- or library-provided include files are included with angular
brackets (examples: `#include <cstring>` or `#include <mpi.h>`) while
include files provided with LAMMPS are included with double quotes
(examples: `#include "pointers.h"` or `#include "compute_temp.h"`).
For headers declaring functions of the C-library, the corresponding
C++ versions should be included (examples: `#include <cstdlib>` or
`#include <cctypes>`). However, these includes are limited to those defined
in the C++98 standard. Some files thus must use the older style until
the minimum C++ standard requirement of LAMMPS is lifted to C++11 or
even beyond (examples: `#include <stdint.h>` versus `#include <cstdint>`
or `#include <inttypes.h>` versus `#include <cinttypes>`).
### C++ Standard Compliance
LAMMPS core files currently correspond to the C++98 standard. Files
requiring C++11 or later are only permitted in (optional) packages
and particularly packages that are not part of the list of commonly
used packages such as MOLECULE, KSPACE, MANYBODY, or RIGID.
Also, LAMMPS uses the C-style stdio library for I/O instead of iostreams.
Since using both at the same time can cause problems, iostreams should
be avoided where possible.
### Lean Header Files
Header files will typically contain the definition of a (single) class.
These header files should have as few include statements as possible.
This is particularly important for classes that implement a "style" and
thus use a macro of the kind `SomeStyle(some/name,SomeName)`. These will
all be included in the auto-generated `"some_style.h"` files which
results in a high potential for direct or indirect symbol name clashes.
In the ideal case, the header would only include one file defining the
parent class. That would typically be either `#include "pointers.h"` for
the `Pointers` class, or a header of a class derived from it like
`#include "pair.h"` for the `Pair` class and so on. References to other
classes inside the class should be make through pointers, for which forward
declarations (inside the `LAMMPS_NS` or the new class' namespace) can
be employed. The full definition will then be included into the corresponding
implementation file. In the given example from above, the header file
would be called `some_name.h` and the implementation `some_name.cpp` (all
lower case with underscores, while the class itself would be in camel case
and no underscores `SomeName`, and the style name with lower case names separated by
a forward slash).
### Implementation Files
In the implementation files (typically, those would have the same base name
as the corresponding header with a .cpp extension instead of .h) include
statements should follow the "include what you use" principle.
### Order of Include Statements
Include files should be included in this order:
* the header matching the implementation (`some_class.h` for file `some_class.cpp`)
* mpi.h
* system and library headers (anything that is using angular brackets; C-library headers first, then C++)
* LAMMPS local headers (preferably in alphabetical order)
### Special Cases and Exceptions
#### pointers.h
The `pointer.h` header file also includes `cstdio` and `lmptype.h`
(and through it `stdint.h`, `intttypes.h`, cstdlib, and `climits`).
This means any header including `pointers.h` can assume that `FILE`,
`NULL`, `INT_MAX` are defined.
## Tools
The [Include What You Use tool](https://include-what-you-use.org/)
can be used to provide supporting information about compliance with
the rules listed here. There are some limitations and the IWYU tool
may give incorrect advice. The tools is activated by setting the
CMake variable `CMAKE_CXX_INCLUDE_WHAT_YOU_USE` variable to the
path of the `include-what-you-use` command. When activated, the
tool will be run after each compilation and provide suggestions for
which include files should be added or removed.
## Legacy Code
A lot of code predates the application of the rules in this document
and the rules themselves are a moving target. So there are going to be
significant chunks of code that do not fully comply. This applies
for example to the USER-REAXC, or the USER-ATC package. The LAMMPS
developers are dedicated to make an effort to improve the compliance
and welcome volunteers wanting to help with the process.

View File

@ -1,4 +1,4 @@
.TH LAMMPS "5 June 2019" "2019-06-05"
.TH LAMMPS "2 August 2019" "2019-08-02"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator.

View File

@ -32,10 +32,18 @@ cmake \[options ...\] ../cmake # configuration with (command-line) cmake
make # compilation :pre
The cmake command will detect available features, enable selected
packages and options, and will generate the build environment. The make
command will then compile and link LAMMPS, producing (by default) an
executable called "lmp" and a library called "liblammps.a" in the
"build" folder.
packages and options, and will generate the build environment. By default
this build environment will be created for "Unix Makefiles" on most
platforms and particularly on Linux. However, alternate build tools
(e.g. Ninja) and support files for Integrated Development Environments
(IDE) like Eclipse, CodeBlocks, or Kate can be generated, too. This is
selected via the "-G" command line flag. For the rest of the documentation
we will assume that the build environment is generated for makefiles
and thus the make command will be used to compile and link LAMMPS as
indicated above, producing (by default) an executable called "lmp" and
a library called "liblammps.a" in the "build" folder. When generating
a build environment for the "Ninja" build tool, the build command would
be "ninja" instead of "make".
If your machine has multiple CPU cores (most do these days), using a
command like "make -jN" (with N being the number of available local
@ -44,11 +52,17 @@ LAMMPS or need to re-compile LAMMPS repeatedly, installation of the
ccache (= Compiler Cache) software may speed up repeated compilation
even more.
After compilation, you can optionally copy the LAMMPS executable and
library into your system folders (by default under $HOME/.local) with:
After compilation, you may optionally install the LAMMPS executable into
your system with:
make install # optional, copy LAMMPS executable & library elsewhere :pre
This will install the lammps executable and library (if requested), some
tools (if configured) and additional files like library API headers,
manpages, potential and force field files. The location of the installation
tree is set by the CMake variable "CMAKE_INSTALL_PREFIX" which defaults
to $\{HOME\}/.local
:line
There are 3 variants of CMake: a command-line version (cmake), a text mode

View File

@ -172,22 +172,17 @@ KIM package :h4,link(kim)
To build with this package, the KIM library with API v2 must be downloaded
and built on your system. It must include the KIM models that you want to
use with LAMMPS. If you want to use the "kim_query"_kim_query.html
use with LAMMPS. If you want to use the "kim_query"_kim_commands.html
command, you also need to have libcurl installed with the matching
development headers and the curl-config tool.
Note that in LAMMPS lingo, a KIM model driver is a pair style
(e.g. EAM or Tersoff). A KIM model is a pair style for a particular
element or alloy and set of parameters, e.g. EAM for Cu with a
specific EAM potential file. Also note that downloading and installing
the KIM API library with all its models, may take a long time (10s of
minutes to hours) to build. Of course you only need to do that once.
See "Obtaining KIM Models"_http://openkim.org/doc/usage/obtaining-models to
learn how to install a pre-build binary of the OpenKIM Repository of Models.
See the list of all KIM models here: https://openkim.org/browse/models
See the list of KIM model drivers here:
https://openkim.org/browse/model-drivers/alphabetical
See the list of all KIM models here:
https://openkim.org/browse/models/by-model-drivers
(Also note that when downloading and installing from source
the KIM API library with all its models, may take a long time (tens of
minutes to hours) to build. Of course you only need to do that once.)
[CMake build]:

View File

@ -50,11 +50,11 @@ An alphabetic list of all general LAMMPS commands.
"dump"_dump.html,
"dump adios"_dump_adios.html,
"dump image"_dump_image.html,
"dump_modify"_dump_modify.html,
"dump movie"_dump_image.html,
"dump netcdf"_dump_netcdf.html,
"dump netcdf/mpiio"_dump_netcdf.html,
"dump vtk"_dump_vtk.html,
"dump_modify"_dump_modify.html,
"dynamical_matrix"_dynamical_matrix.html,
"echo"_echo.html,
"fix"_fix.html,
@ -68,7 +68,9 @@ An alphabetic list of all general LAMMPS commands.
"improper_style"_improper_style.html,
"include"_include.html,
"jump"_jump.html,
"kim_query"_kim_query.html,
"kim_init"_kim_commands.html,
"kim_interactions"_kim_commands.html,
"kim_query"_kim_commands.html,
"kspace_modify"_kspace_modify.html,
"kspace_style"_kspace_style.html,
"label"_label.html,

View File

@ -28,8 +28,12 @@ OPT.
"none"_bond_none.html,
"zero"_bond_zero.html,
"hybrid"_bond_hybrid.html :tb(c=3,ea=c)
"hybrid"_bond_hybrid.html,
,
,
,
,
,
"class2 (ko)"_bond_class2.html,
"fene (iko)"_bond_fene.html,
"fene/expand (o)"_bond_fene_expand.html,
@ -56,8 +60,12 @@ OPT.
"none"_angle_none.html,
"zero"_angle_zero.html,
"hybrid"_angle_hybrid.html :tb(c=3,ea=c)
"hybrid"_angle_hybrid.html,
,
,
,
,
,
"charmm (iko)"_angle_charmm.html,
"class2 (ko)"_angle_class2.html,
"class2/p6"_angle_class2.html,
@ -89,8 +97,12 @@ OPT.
"none"_dihedral_none.html,
"zero"_dihedral_zero.html,
"hybrid"_dihedral_hybrid.html :tb(c=3,ea=c)
"hybrid"_dihedral_hybrid.html,
,
,
,
,
,
"charmm (iko)"_dihedral_charmm.html,
"charmmfsw"_dihedral_charmm.html,
"class2 (ko)"_dihedral_class2.html,
@ -117,8 +129,12 @@ OPT.
"none"_improper_none.html,
"zero"_improper_zero.html,
"hybrid"_improper_hybrid.html :tb(c=3,ea=c)
"hybrid"_improper_hybrid.html,
,
,
,
,
,
"class2 (ko)"_improper_class2.html,
"cossq (o)"_improper_cossq.html,
"cvff (io)"_improper_cvff.html,

View File

@ -66,6 +66,7 @@ KOKKOS, o = USER-OMP, t = OPT.
"group/group"_compute_group_group.html,
"gyration"_compute_gyration.html,
"gyration/chunk"_compute_gyration_chunk.html,
"gyration/shape"_compute_gyration_shape.html,
"heat/flux"_compute_heat_flux.html,
"heat/flux/tally"_compute_tally.html,
"hexorder/atom"_compute_hexorder_atom.html,
@ -80,6 +81,7 @@ KOKKOS, o = USER-OMP, t = OPT.
"meso/e/atom"_compute_meso_e_atom.html,
"meso/rho/atom"_compute_meso_rho_atom.html,
"meso/t/atom"_compute_meso_t_atom.html,
"momentum"_compute_momentum.html,
"msd"_compute_msd.html,
"msd/chunk"_compute_msd_chunk.html,
"msd/nongauss"_compute_msd_nongauss.html,

View File

@ -27,8 +27,11 @@ OPT.
"none"_pair_none.html,
"zero"_pair_zero.html,
"hybrid (k)"_pair_hybrid.html,
"hybrid/overlay (k)"_pair_hybrid.html :tb(c=4,ea=c)
"hybrid/overlay (k)"_pair_hybrid.html,
,
,
,
,
"adp (o)"_pair_adp.html,
"agni (o)"_pair_agni.html,
"airebo (io)"_pair_airebo.html,
@ -219,6 +222,8 @@ OPT.
"sph/rhosum"_pair_sph_rhosum.html,
"sph/taitwater"_pair_sph_taitwater.html,
"sph/taitwater/morris"_pair_sph_taitwater_morris.html,
"spin/dipole/cut"_pair_spin_dipole.html,
"spin/dipole/long"_pair_spin_dipole.html,
"spin/dmi"_pair_spin_dmi.html,
"spin/exchange"_pair_spin_exchange.html,
"spin/magelec"_pair_spin_magelec.html,

View File

@ -0,0 +1,15 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
$$
E_{a} = K_2\left(\theta - \theta_0\right)^2 + K_3\left(\theta - \theta_0\right)^3 + K_4\left(\theta - \theta_0\right)^4 + K_5\left(\theta - \theta_0\right)^5 + K_6\left(\theta - \theta_0\right)^6
$$
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

View File

@ -0,0 +1,15 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
$$
E = K \left[ 1 + \cos(n\theta - \theta_0)\right]
$$
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -0,0 +1,13 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
\begin{eqnarray*}
c = l_z - 0.5(l_y+l_x) \\
b = l_y - l_x \\
k = \frac{3}{2} \frac{l_x^2+l_y^2+l_z^2}{(l_x+l_y+l_z)^2} - \frac{1}{2}
\end{eqnarray*}
\end{document}

View File

@ -0,0 +1,15 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
$$
E = K \left(\theta - \theta_0\right)^2
$$
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

18
doc/src/Eqs/pair_agni.tex Normal file
View File

@ -0,0 +1,18 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
\begin{eqnarray*}
F_i^u & = & \sum_t^{N_t}\alpha_t \cdot \exp\left[-\frac{\left(d_{i,t}^u\right)^2}{2l^2}\right] \\
d_{i,t}^u & = & \left|\left| V_i^u(\eta) - V_t^u(\eta) \right|\right| \\
V_i^u(\eta) & = & \sum_{j \neq i}\frac{r^u_{ij}}{r_{ij}} \cdot e^{-\left(\frac{r_{ij}}{\eta} \right)^2} \cdot f_d\left(r_{ij}\right) \\
f_d\left(r_{ij}\right) & = & \frac{1}{2} \left[\cos\left(\frac{\pi r_{ij}}{R_c}\right) + 1 \right]
\end{eqnarray*}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

View File

@ -1,6 +1,7 @@
\documentclass[12pt]{article}
\begin{document}
\pagestyle{empty}
\begin{eqnarray*}
E = A e^{-\kappa r} - \frac{C}{r^6} \cdot \frac{1}{1 + D r^{14}} \qquad r < r_c \\

View File

@ -0,0 +1,15 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
$$
E = \frac{C_{q_i q_j}}{\epsilon r_{ij}}\,\, \textrm{erf}\left(\alpha_{ij} r_{ij}\right)\quad\quad\quad r < r_c
$$
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 49 KiB

View File

@ -27,7 +27,7 @@
V_{ij} & = & e^{-\lambda (r_{ij} -z_0)} \left [ C + f(\rho_{ij}) + f(\rho_{ji}) - A \left ( \frac{r_{ij}}{z_0}\right )^{-6} \right ] \\
\rho_{ij}^2 & = & r_{ij}^2 - ({\bf r}_{ij}\cdot {\bf n}_{i})^2 \\[15pt]
\rho_{ji}^2 & = & r_{ij}^2 - ({\bf r}_{ij}\cdot {\bf n}_{j})^2 \\[15pt]
f(\rho) & = & e^{-(\rho/\delta)^2} \sum_{n=0}^2 C_{2n} { \rho/\delta }^{2n}
f(\rho) & = & e^{-(\rho/\delta)^2} \sum_{n=0}^2 C_{2n} { (\rho/\delta) }^{2n}
\end{eqnarray*}
\endgroup
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -0,0 +1,42 @@
\documentclass[preview]{standalone}
\usepackage{varwidth}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,amssymb,graphics,bm,setspace}
\begin{document}
\begin{varwidth}{50in}
\begin{equation}
\mathcal{H}_{\rm long}=
-\frac{\mu_{0} \left( \mu_B\right)^2}{4\pi}
\sum_{i,j,i\neq j}^{N}
\frac{g_i g_j}{r_{ij}^3}
\Big(3
\left(\bm{e}_{ij}\cdot \bm{s}_{i}\right)
\left(\bm{e}_{ij}\cdot \bm{s}_{j}\right)
-\bm{s}_i\cdot\bm{s}_j \Big)
\nonumber
\end{equation}
\begin{equation}
\bm{\omega}_i =
\frac{\mu_0 (\mu_B)^2}{4\pi\hbar}\sum_{j}
\frac{g_i g_j}{r_{ij}^3}
\, \Big(
3\,(\bm{e}_{ij}\cdot\bm{s}_{j})\bm{e}_{ij}
-\bm{s}_{j} \Big) \nonumber
\end{equation}
\begin{equation}
\bm{F}_i =
\frac{3\, \mu_0 (\mu_B)^2}{4\pi} \sum_j
\frac{g_i g_j}{r_{ij}^4}
\Big[\big( (\bm{s}_i\cdot\bm{s}_j)
-5(\bm{e}_{ij}\cdot\bm{s}_i)
(\bm{e}_{ij}\cdot\bm{s}_j)\big) \bm{e}_{ij}+
\big(
(\bm{e}_{ij}\cdot\bm{s}_i)\bm{s}_j+
(\bm{e}_{ij}\cdot\bm{s}_j)\bm{s}_i
\big)
\Big]
\nonumber
\end{equation}
\end{varwidth}
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,20 @@
\documentclass[preview]{standalone}
\usepackage{varwidth}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,amssymb,graphics,bm,setspace}
\begin{document}
\begin{varwidth}{50in}
\begin{equation}
\mathcal{H}_{\rm long}=
-\frac{\mu_{0} \left( \mu_B\right)^2}{4\pi}
\sum_{i,j,i\neq j}^{N}
\frac{g_i g_j}{r_{ij}^3}
\Big(3
\left(\bm{e}_{ij}\cdot \bm{s}_{i}\right)
\left(\bm{e}_{ij}\cdot \bm{s}_{j}\right)
-\bm{s}_i\cdot\bm{s}_j \Big)
\nonumber
\end{equation}
\end{varwidth}
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,23 @@
\documentclass[preview]{standalone}
\usepackage{varwidth}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,amssymb,graphics,bm,setspace}
\begin{document}
\begin{varwidth}{50in}
\begin{equation}
\bm{F}_i =
\frac{\mu_0 (\mu_B)^2}{4\pi} \sum_j
\frac{g_i g_j}{r_{ij}^4}
\Big[\big( (\bm{s}_i\cdot\bm{s}_j)
-5(\bm{e}_{ij}\cdot\bm{s}_i)
(\bm{e}_{ij}\cdot\bm{s}_j)\big) \bm{e}_{ij}+
\big(
(\bm{e}_{ij}\cdot\bm{s}_i)\bm{s}_j+
(\bm{e}_{ij}\cdot\bm{s}_j)\bm{s}_i
\big)
\Big]
\nonumber
\end{equation}
\end{varwidth}
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@ -0,0 +1,17 @@
\documentclass[preview]{standalone}
\usepackage{varwidth}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath,amssymb,graphics,bm,setspace}
\begin{document}
\begin{varwidth}{50in}
\begin{equation}
\bm{\omega}_i =
\frac{\mu_0 (\mu_B)^2}{4\pi\hbar}\sum_{j}
\frac{g_i g_j}{r_{ij}^3}
\, \Big(
3\,(\bm{e}_{ij}\cdot\bm{s}_{j})\bm{e}_{ij}
-\bm{s}_{j} \Big) \nonumber
\end{equation}
\end{varwidth}
\end{document}

View File

@ -636,12 +636,12 @@ Please ensure reaction map files are properly formatted. :dd
{Bond/react: Atom affected by reaction too close to template edge} :dt
This means an atom which changes type during the reaction is too close
to an 'edge' atom defined in the superimpose file. This could cause
incorrect assignment of bonds, angle, etc. Generally, this means you
must include more atoms in your templates, such that there are at
least two atoms between each atom involved in the reaction and an edge
atom. :dd
This means an atom which changes type or connectivity during the
reaction is too close to an 'edge' atom defined in the superimpose
file. This could cause incorrect assignment of bonds, angle, etc.
Generally, this means you must include more atoms in your templates,
such that there are at least two atoms between each atom involved in
the reaction and an edge atom. :dd
{Bond/react: Fix bond/react needs ghost atoms from farther away} :dt
@ -2202,10 +2202,6 @@ Self-explanatory. :dd
This is a current restriction in LAMMPS. :dd
{Cannot use pair hybrid with GPU neighbor list builds} :dt
Neighbor list builds must be done on the CPU for this pair style. :dd
{Cannot use pair tail corrections with 2d simulations} :dt
The correction factors are only currently defined for 3d systems. :dd
@ -2442,6 +2438,14 @@ Self-explanatory. :dd
Self-explanatory. :dd
{Compute gyration ID does not exist for compute gyration/shape} :dt
Self-explanatory. Provide a valid compute ID. :dd
{Compute gyration/shape compute ID does not point to a gyration compute} :dt
Self-explanatory. Provide and ID of a compute gyration command. :dd
{Compute ID for compute reduce does not exist} :dt
Self-explanatory. :dd
@ -5523,10 +5527,6 @@ Self-explanatory. :dd
For this pair style, you cannot run part of the force calculation on
the host. See the package command. :dd
{GPU split param must be positive for hybrid pair styles} :dt
See the package gpu command. :dd
{GPUs are requested but Kokkos has not been compiled for CUDA} :dt
Re-compile Kokkos with CUDA support to use GPUs. :dd
@ -5785,6 +5785,16 @@ definitions. :dd
The data file header lists improper but no improper types. :dd
{Incompatible KIM Simulator Model} :dt
The requested KIM Simulator Model was defined for a different MD code
and thus is not compatible with LAMMPS. :dd
{Incompatible units for KIM Simulator Model} :dt
The selected unit style is not compatible with the requested KIM
Simulator Model. :dd
{Incomplete use of variables in create_atoms command} :dt
The var and set options must be used together. :dd
@ -5898,6 +5908,11 @@ The element names in the ADP file do not match those requested. :dd
The element names in the EAM file do not match those requested. :dd
{Incorrect format of ... section in data file} :dt
Number or type of values per line in the given section of the data file
is not consistent with the requirements for this section. :dd
{Incorrect format in COMB potential file} :dt
Incorrect number of words per line in the potential file. :dd
@ -7050,6 +7065,12 @@ The atom style defined does not have this attribute. :dd
The atom style defined does not have these attributes. :dd
{KIM Simulator Model has no Model definition} :dt
There is no model definition (key: model-defn) in the KIM Simulator
Model. Please contact the OpenKIM database maintainers to verify
and potentially correct this. :dd
{KOKKOS package does not yet support comm_style tiled} :dt
Self-explanatory. :dd
@ -7097,6 +7118,18 @@ Self-explanatory. :dd
One or more GPUs must be used when Kokkos is compiled for CUDA. :dd
{Kspace_modify mesh parameter must be all zero or all positive} :dt
Valid kspace mesh parameters are >0. The code will try to auto-detect
suitable values when all three mesh sizes are set to zero (the default). :dd
{Kspace_modify mesh/disp parameter must be all zero or all positive} :dt
Valid kspace mesh/disp parameters are >0. The code will try to auto-detect
suitable values when all three mesh sizes are set to zero [and]
the required accuracy via {force/disp/real} as well as
{force/disp/kspace} is set. :dd
{Kspace style does not support compute group/group} :dt
Self-explanatory. :dd
@ -7542,6 +7575,18 @@ Self-explanatory. :dd
Self-explanatory. :dd
{Must use 'kim_style init' command before simulation box is defined} :dt
Self-explanatory. :dd
{Must use 'kim_style define' command after simulation box is defined} :dt
Self-explanatory. :dd
{Must use 'kim_style init' command before 'kim_style define'} :dt
Self-explanatory. :dd
{Must use 'kspace_modify pressure/scalar no' for rRESPA with kspace_style MSM} :dt
The kspace scalar pressure option cannot (yet) be used with rRESPA. :dd
@ -9485,6 +9530,11 @@ See the "read_data extra/special/per/atom" command
for info on how to leave space in the special bonds
list to allow for additional bonds to be formed. :dd
{Species XXX is not supported by this KIM Simulator Model} :dt
The kim_style define command was referencing a species that is not
present in the requested KIM Simulator Model. :dd
{Specified processors != physical processors} :dt
The 3d grid of processors defined by the processors command does not

View File

@ -82,10 +82,14 @@ bond/angle/dihedral. LAMMPS computes this by taking the maximum bond
length, multiplying by the number of bonds in the interaction (e.g. 3
for a dihedral) and adding a small amount of stretch. :dd
{Bond/react: An atom in 'react #%d' changes bond connectivity but not atom type} :dt
{Bond/react: Atom affected by reaction too close to template edge} :dt
You may want to double-check that all atom types are properly assigned
in the post-reaction template. :dd
This means an atom which changes type or connectivity during the
reaction is too close to an 'edge' atom defined in the superimpose
file. This could cause incorrect assignment of bonds, angle, etc.
Generally, this means you must include more atoms in your templates,
such that there are at least two atoms between each atom involved in
the reaction and an edge atom. :dd
{Both groups in compute group/group have a net charge; the Kspace boundary correction to energy will be non-zero} :dt
@ -125,6 +129,16 @@ Self-explanatory. :dd
Self-explanatory. :dd
{Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost} :dt
The communication cutoff defaults to the maximum of what is inferred from
pair and bond styles (will be zero, if none are defined) and what is specified
via "comm_modify cutoff"_comm_modify.html (defaults to 0.0). If this results
to 0.0, no ghost atoms will be generated and LAMMPS may lose atoms or use
incorrect periodic images of atoms in interaction lists. To avoid, either use
"pair style zero"_pair_zero.html with a suitable cutoff or use "comm_modify
cutoff"_comm_modify.html. :dd
{Communication cutoff is too small for SNAP micro load balancing, increased to %lf} :dt
Self-explanatory. :dd

View File

@ -73,7 +73,7 @@ granregion: use of fix wall/region/gran as boundary on granular particles
hugoniostat: Hugoniostat shock dynamics
hyper: global and local hyperdynamics of diffusion on Pt surface
indent: spherical indenter into a 2d solid
kim: use of potentials in Knowledge Base for Interatomic Models (KIM)
kim: use of potentials from the "OpenKIM Repository"_openkim
latte: examples for using fix latte for DFTB via the LATTE library
meam: MEAM test for SiC and shear (same as shear examples)
melt: rapid melt of 3d LJ system
@ -153,3 +153,5 @@ illustrate how to use the command(s) provided in that package. Many
of the sub-directories have their own README files which give further
instructions. See the "Packages_details"_Packages_details.html doc
page for more info on specific USER packages.
:link(openkim,https://openkim.org)

View File

@ -15,7 +15,8 @@ Binaries are available for different versions of Linux:
"Pre-built Fedora Linux executables"_#fedora
"Pre-built EPEL Linux executables (RHEL, CentOS)"_#epel
"Pre-built OpenSuse Linux executables"_#opensuse
"Gentoo Linux executable"_#gentoo :all(b)
"Gentoo Linux executable"_#gentoo
"Arch Linux build-script"_#arch :all(b)
:line
@ -168,3 +169,31 @@ for details.
Thanks to Nicolas Bock and Christoph Junghans (LANL) for setting up
this Gentoo capability.
:line
Archlinux build-script :h4,link(arch)
LAMMPS is available via Arch's unofficial Arch User repository (AUR).
There are three scripts available, named lammps, lammps-beta and lammps-git.
They respectively package the stable, patch and git releases.
To install, you will need to have the git package installed. You may use
any of the above names in-place of lammps.
$ git clone https://aur.archlinux.org/lammps.git :pre
$ cd lammps :pre
$ makepkg -s :pre
# makepkg -i :pre
To update, you may repeat the above, or change into the cloned directory,
and execute the following, after which, if there are any changes, you may
use makepkg as above.
$ git pull :pre
Alternatively, you may use an AUR helper to install these packages.
Note that the AUR provides build-scripts that download the source and
the build the package on your machine.

View File

@ -10,47 +10,34 @@ Documentation"_ld - "LAMMPS Commands"_lc :c
Download an executable for Mac :h3
LAMMPS can be downloaded, built, and configured for OS X on a Mac with
"Homebrew"_homebrew. Only four of the LAMMPS packages are unavailable
at this time because of additional needs not yet met: KIM, GPU,
USER-INTEL, USER-ATC.
"Homebrew"_homebrew. The following LAMMPS packages are unavailable at this
time because of additional needs not yet met: GPU, KOKKOS, LATTE, MSCG,
MESSAGE, MPIIO POEMS VORONOI.
After installing Homebrew, you can install LAMMPS on your system with
the following commands:
% brew tap homebrew/science
% brew install lammps # serial version
% brew install lammps --with-mpi # mpi support :pre
% brew install lammps :pre
This will install the executable "lammps", a python module named
"lammps", and additional resources with all the standard packages. To
get the location of the additional resources type this:
% brew info lammps :pre
This command also tells you additional installation options available.
The user-packages are available as options, just install them like
this example for the USER-OMP package:
% brew install lammps --enable-user-omp :pre
It is usually best to install LAMMPS with the most up to date source
files, which can be done with the "--HEAD" option:
% brew install lammps --HEAD :pre
To re-install the LAMMPS HEAD, run this command occasionally (make sure
to use the desired options).
% brew install --force lammps --HEAD $\{options\} :pre
This will install the executables "lammps_serial" and "lammps_mpi", as well as
the LAMMPS "doc", "potentials", "tools", "bench", and "examples" directories.
Once LAMMPS is installed, you can test the installation with the
Lennard-Jones benchmark file:
% brew test lammps -v :pre
The LAMMPS binary is built with the "KIM package"_Build_extras#kim which
results in Homebrew also installing the `kim-api` binaries when LAMMPS is
installed. In order to use potentials from "openkim.org"_openkim, you can
install the `openkim-models` package
% brew install openkim-models :pre
If you have problems with the installation you can post issues to
"this link"_homebrew.
Thanks to Derek Thomas (derekt at cello.t.u-tokyo.ac.jp) for setting
up the Homebrew capability.
:link(homebrew,https://github.com/Homebrew/homebrew-science/issues)
:link(homebrew,https://github.com/Homebrew/homebrew-core/issues)
:link(openkim,https://openkim.org)

View File

@ -92,8 +92,8 @@ commands)
implicit solvent potentials: hydrodynamic lubrication, Debye
force-field compatibility with common CHARMM, AMBER, DREIDING, \
OPLS, GROMACS, COMPASS options
access to "KIM archive"_http://openkim.org of potentials via \
"pair kim"_pair_kim.html
access to the "OpenKIM Repository"_http://openkim.org of potentials via \
"kim_init, kim_interactions, and kim_query"_kim_commands.html commands
hybrid potentials: multiple pair, bond, angle, dihedral, improper \
potentials can be used in one simulation
overlaid potentials: superposition of multiple pair potentials :ul

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,7 +1,7 @@
<!-- HTML_ONLY -->
<HEAD>
<TITLE>LAMMPS Users Manual</TITLE>
<META NAME="docnumber" CONTENT="5 Jun 2019 version">
<META NAME="docnumber" CONTENT="2 Aug 2019 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
5 Jun 2019 version :c,h2
2 Aug 2019 version :c,h2
"What is a LAMMPS version?"_Manual_version.html

Binary file not shown.

View File

@ -338,22 +338,37 @@ KIM package :link(PKG-KIM),h4
[Contents:]
A "pair_style kim"_pair_kim.html command which is a wrapper on the
Knowledge Base for Interatomic Models (KIM) repository of interatomic
potentials, enabling any of them to be used in LAMMPS simulations.
Also a "kim_query"_kim_query.html command, which allows to query
the OpenKIM database for stored properties.
This package contains a set of commands that serve as a wrapper on the
"Open Knowledgebase of Interatomic Models (OpenKIM)"_https://openkim.org
repository of interatomic models (IMs)
enabling compatible ones to be used in LAMMPS simulations.
This includes "kim_init and kim_interactions"_kim_commands.html
commands to select, initialize and instantiate the IM, and a
"kim_query"_kim_commands.html command to perform web queries
for material property predictions of OpenKIM IMs.
Support for KIM IMs that conform to the
"KIM Application Programming Interface (API)"_https://openkim.org/kim-api/
is provided by the "pair_style kim"_pair_kim.html command.
To use this package you must have the KIM library available on your
system.
NOTE: The command {pair_style kim} is called by {kim_interactions} and
is not recommended to be directly used in input scripts.
To use this package you must have the KIM API library available on your
system. The KIM API is available for download on the
"OpenKIM website"_https://openkim.org/kim-api/.
When installing LAMMPS from binary, the kim-api package
is a dependency that is automatically downloaded and installed.
Information about the KIM project can be found at its website:
https://openkim.org. The KIM project is led by Ellad Tadmor and Ryan
Elliott (U Minnesota).
"https://openkim.org"_https://openkim.org.
The KIM project is led by Ellad Tadmor and Ryan Elliott (U Minnesota)
and is funded by the "National Science Foundation"_https://www.nsf.gov/.
[Authors:] Ryan Elliott (U Minnesota) is the main developer for the KIM
API which the "pair_style kim"_pair_kim.html command uses. He
developed the pair style.
API and the {pair_style kim} command. Axel Kohlmeyer (Temple U) and
Ellad Tadmor (U Minnesota) contributed to the "kim_commands"_kim_commands.html
interface in close collaboration with Ryan Elliott.
[Install:]
@ -363,10 +378,11 @@ extras"_Build_extras.html doc page.
[Supporting info:]
"kim_commands"_kim_commands.html
"pair_style kim"_pair_kim.html
src/KIM: filenames -> commands
src/KIM/README
lib/kim/README
"pair_style kim"_pair_kim.html
examples/kim :ul
:line
@ -911,6 +927,8 @@ the usual manner via MD. Various pair, fix, and compute styles.
src/SPIN: filenames -> commands
"Howto spins"_Howto_spins.html
"pair_style spin/dipole/cut"_pair_spin_dipole.html
"pair_style spin/dipole/long"_pair_spin_dipole.html
"pair_style spin/dmi"_pair_spin_dmi.html
"pair_style spin/exchange"_pair_spin_exchange.html
"pair_style spin/magelec"_pair_spin_magelec.html
@ -982,9 +1000,9 @@ USER-ADIOS package :link(PKG-USER-ADIOS),h4
[Contents:]
ADIOS is a high-performance I/O library. This package implements the
ADIOS is a high-performance I/O library. This package implements the
dump "atom/adios" and dump "custom/adios" commands to write data using
the ADIOS library.
the ADIOS library.
[Authors:] Norbert Podhorszki (ORNL) from the ADIOS developer team.

View File

@ -104,7 +104,7 @@ code (with a performance penalty due to having data transfers between
host and GPU). :ulb,l
The GPU package requires neighbor lists to be built on the CPU when using
exclusion lists, hybrid pair styles, or a triclinic simulation box. :l
exclusion lists, or a triclinic simulation box. :l
The GPU package can be compiled for CUDA or OpenCL and thus supports
both, Nvidia and AMD GPUs well. On Nvidia hardware, using CUDA is typically

View File

@ -46,16 +46,15 @@ software version 7.5 or later must be installed on your system. See
the discussion for the "GPU package"_Speed_gpu.html for details of how
to check and do this.
NOTE: Kokkos with CUDA currently implicitly assumes, that the MPI
library is CUDA-aware and has support for GPU-direct. This is not
always the case, especially when using pre-compiled MPI libraries
provided by a Linux distribution. This is not a problem when using
only a single GPU and a single MPI rank on a desktop. When running
with multiple MPI ranks, you may see segmentation faults without
GPU-direct support. These can be avoided by adding the flags "-pk
kokkos gpu/direct off"_Run_options.html to the LAMMPS command line or
by using the command "package kokkos gpu/direct off"_package.html in
the input file.
NOTE: Kokkos with CUDA currently implicitly assumes that the MPI library
is CUDA-aware. This is not always the case, especially when using
pre-compiled MPI libraries provided by a Linux distribution. This is not
a problem when using only a single GPU with a single MPI rank. When
running with multiple MPI ranks, you may see segmentation faults without
CUDA-aware MPI support. These can be avoided by adding the flags "-pk
kokkos cuda/aware off"_Run_options.html to the LAMMPS command line or by
using the command "package kokkos cuda/aware off"_package.html in the
input file.
[Building LAMMPS with the KOKKOS package:]
@ -207,19 +206,20 @@ supports.
[Running on GPUs:]
Use the "-k" "command-line switch"_Run_options.html to
specify the number of GPUs per node. Typically the -np setting of the
mpirun command should set the number of MPI tasks/node to be equal to
the number of physical GPUs on the node. You can assign multiple MPI
tasks to the same GPU with the KOKKOS package, but this is usually
only faster if significant portions of the input script have not
been ported to use Kokkos. Using CUDA MPS is recommended in this
scenario. Using a CUDA-aware MPI library with support for GPU-direct
is highly recommended. GPU-direct use can be avoided by using
"-pk kokkos gpu/direct no"_package.html.
As above for multi-core CPUs (and no GPU), if N is the number of
physical cores/node, then the number of MPI tasks/node should not
exceed N.
Use the "-k" "command-line switch"_Run_options.html to specify the
number of GPUs per node. Typically the -np setting of the mpirun command
should set the number of MPI tasks/node to be equal to the number of
physical GPUs on the node. You can assign multiple MPI tasks to the same
GPU with the KOKKOS package, but this is usually only faster if some
portions of the input script have not been ported to use Kokkos. In this
case, also packing/unpacking communication buffers on the host may give
speedup (see the KOKKOS "package"_package.html command). Using CUDA MPS
is recommended in this scenario.
Using a CUDA-aware MPI library is highly recommended. CUDA-aware MPI use can be
avoided by using "-pk kokkos cuda/aware no"_package.html. As above for
multi-core CPUs (and no GPU), if N is the number of physical cores/node,
then the number of MPI tasks/node should not exceed N.
-k on g Ng :pre

View File

@ -143,6 +143,16 @@ instructions on how to use the accelerated styles effectively.
:line
[Restart info:]
This angle style writes the settings for the "angle_style table"
command to "binary restart files"_restart.html, so a angle_style
command does not need to specified in an input script that reads a
restart file. However, the coefficient information is not stored in
the restart file, since it is tabulated in the potential files. Thus,
angle_coeff commands do need to be specified in the restart input
script.
[Restrictions:]
This angle style can only be used if LAMMPS was built with the

View File

@ -140,6 +140,16 @@ instructions on how to use the accelerated styles effectively.
:line
[Restart info:]
This bond style writes the settings for the "bond_style table"
command to "binary restart files"_restart.html, so a bond_style
command does not need to specified in an input script that reads a
restart file. However, the coefficient information is not stored in
the restart file, since it is tabulated in the potential files. Thus,
bond_coeff commands do need to be specified in the restart input
script.
[Restrictions:]
This bond style can only be used if LAMMPS was built with the MOLECULE

View File

@ -69,9 +69,15 @@ processors. By default the ghost cutoff = neighbor cutoff = pairwise
force cutoff + neighbor skin. See the "neighbor"_neighbor.html command
for more information about the skin distance. If the specified Rcut is
greater than the neighbor cutoff, then extra ghost atoms will be acquired.
If the provided cutoff is smaller, the provided value will be ignored
and the ghost cutoff is set to the neighbor cutoff. Specifying a
cutoff value of 0.0 will reset any previous value to the default.
If the provided cutoff is smaller, the provided value will be ignored,
the ghost cutoff is set to the neighbor cutoff and a warning will be
printed. Specifying a cutoff value of 0.0 will reset any previous value
to the default. If bonded interactions exist and equilibrium bond length
information is available, then also a heuristic based on that bond length
is computed. It is used as communication cutoff, if there is no pair
style present and no {comm_modify cutoff} command used. Otherwise a
warning is printed, if this bond based estimate is larger than the
communication cutoff used. A
The {cutoff/multi} option is equivalent to {cutoff}, but applies to
communication mode {multi} instead. Since in this case the communication

View File

@ -53,7 +53,7 @@ Commands :h1
include
info
jump
kim_query
kim_commands
kspace_modify
kspace_style
label

View File

@ -171,42 +171,40 @@ The individual style names on the "Commands
compute"_Commands_compute.html doc page are followed by one or more of
(g,i,k,o,t) to indicate which accelerated styles exist.
"ackland/atom"_compute_ackland_atom.html -
"ackland/atom"_compute_ackland_atom.html - determines the local lattice structure based on the Ackland formulation
"adf"_compute_adf.html - angular distribution function of triples of atoms
"aggregate/atom"_compute_cluster_atom.html - aggregate ID for each atom
"angle"_compute_angle.html -
"angle/local"_compute_angle_local.html -
"angle/local"_compute_bond_local.html - theta and energy of each angle
"angle"_compute_angle.html - energy of each angle sub-style
"angle/local"_compute_angle_local.html - theta and energy of each angle
"angmom/chunk"_compute_angmom_chunk.html - angular momentum for each chunk
"basal/atom"_compute_basal_atom.html -
"basal/atom"_compute_basal_atom.html - calculates the hexagonal close-packed "c" lattice vector of each atom
"body/local"_compute_body_local.html - attributes of body sub-particles
"bond"_compute_bond.html - values computed by a bond style
"bond"_compute_bond.html - energy of each bond sub-style
"bond/local"_compute_bond_local.html - distance and energy of each bond
"centro/atom"_compute_centro_atom.html - centro-symmetry parameter for each atom
"chunk/atom"_compute_chunk_atom.html - assign chunk IDs to each atom
"chunk/spread/atom"_compute_chunk_spread_atom.html - spreads chunk values to each atom in chunk
"cluster/atom"_compute_cluster_atom.html - cluster ID for each atom
"cna/atom"_compute_cna_atom.html - common neighbor analysis (CNA) for each atom
"cnp/atom"_compute_cnp_atom.html -
"cnp/atom"_compute_cnp_atom.html - common neighborhood parameter (CNP) for each atom
"com"_compute_com.html - center-of-mass of group of atoms
"com/chunk"_compute_com_chunk.html - center-of-mass for each chunk
"contact/atom"_compute_contact_atom.html - contact count for each spherical particle
"coord/atom"_compute_coord_atom.html - coordination number for each atom
"damage/atom"_compute_damage_atom.html - Peridynamic damage for each atom
"dihedral"_compute_dihedral.html -
"dihedral"_compute_dihedral.html - energy of each dihedral sub-style
"dihedral/local"_compute_dihedral_local.html - angle of each dihedral
"dilatation/atom"_compute_dilatation_atom.html - Peridynamic dilatation for each atom
"dipole/chunk"_compute_dipole_chunk.html -
"dipole/chunk"_compute_dipole_chunk.html - dipole vector and total dipole for each chunk
"displace/atom"_compute_displace_atom.html - displacement of each atom
"dpd"_compute_dpd.html -
"dpd/atom"_compute_dpd_atom.html -
"edpd/temp/atom"_compute_edpd_temp_atom.html -
"entropy/atom"_compute_entropy_atom.html -
"edpd/temp/atom"_compute_edpd_temp_atom.html - per-atom temperature for each eDPD particle in a group
"entropy/atom"_compute_entropy_atom.html - pair entropy fingerprint of each atom
"erotate/asphere"_compute_erotate_asphere.html - rotational energy of aspherical particles
"erotate/rigid"_compute_erotate_rigid.html - rotational energy of rigid bodies
"erotate/sphere"_compute_erotate_sphere.html - rotational energy of spherical particles
"erotate/sphere/atom"_compute_erotate_sphere.html - rotational energy for each spherical particle
"erotate/sphere/atom"_compute_erotate_sphere_atom.html -
"erotate/sphere/atom"_compute_erotate_sphere_atom.html - rotational energy for each spherical particle
"event/displace"_compute_event_displace.html - detect event on atom displacement
"fep"_compute_fep.html -
"force/tally"_compute_tally.html -
@ -215,20 +213,22 @@ compute"_Commands_compute.html doc page are followed by one or more of
"group/group"_compute_group_group.html - energy/force between two groups of atoms
"gyration"_compute_gyration.html - radius of gyration of group of atoms
"gyration/chunk"_compute_gyration_chunk.html - radius of gyration for each chunk
"gyration/shape"_compute_gyration_shape.html - compute shape parameters from radius of gyration tensor
"heat/flux"_compute_heat_flux.html - heat flux through a group of atoms
"heat/flux/tally"_compute_tally.html -
"hexorder/atom"_compute_hexorder_atom.html - bond orientational order parameter q6
"improper"_compute_improper.html -
"improper"_compute_improper.html - energy of each improper sub-style
"improper/local"_compute_improper_local.html - angle of each improper
"inertia/chunk"_compute_inertia_chunk.html - inertia tensor for each chunk
"ke"_compute_ke.html - translational kinetic energy
"ke/atom"_compute_ke_atom.html - kinetic energy for each atom
"ke/atom/eff"_compute_ke_atom_eff.html -
"ke/eff"_compute_ke_eff.html -
"ke/atom/eff"_compute_ke_atom_eff.html - per-atom translational and radial kinetic energy in the electron force field model
"ke/eff"_compute_ke_eff.html - kinetic energy of a group of nuclei and electrons in the electron force field model
"ke/rigid"_compute_ke_rigid.html - translational kinetic energy of rigid bodies
"meso/e/atom"_compute_meso_e_atom.html -
"meso/rho/atom"_compute_meso_rho_atom.html -
"meso/t/atom"_compute_meso_t_atom.html -
"meso/e/atom"_compute_meso_e_atom.html - per-atom internal energy of Smooth-Particle Hydrodynamics atoms
"meso/rho/atom"_compute_meso_rho_atom.html - per-atom mesoscopic density of Smooth-Particle Hydrodynamics atoms
"meso/t/atom"_compute_meso_t_atom.html - per-atom internal temperature of Smooth-Particle Hydrodynamics atoms
"momentum"_compute_momentum.html - translational momentum
"msd"_compute_msd.html - mean-squared displacement of group of atoms
"msd/chunk"_compute_msd_chunk.html - mean-squared displacement for each chunk
"msd/nongauss"_compute_msd_nongauss.html - MSD and non-Gaussian parameter of group of atoms
@ -242,73 +242,72 @@ compute"_Commands_compute.html doc page are followed by one or more of
"pe/tally"_compute_tally.html -
"plasticity/atom"_compute_plasticity_atom.html - Peridynamic plasticity for each atom
"pressure"_compute_pressure.html - total pressure and pressure tensor
"pressure/cylinder"_compute_pressure_cylinder.html -
"pressure/uef"_compute_pressure_uef.html -
"pressure/cylinder"_compute_pressure_cylinder.html - pressure tensor in cylindrical coordinates
"pressure/uef"_compute_pressure_uef.html - pressure tensor in the reference frame of an applied flow field
"property/atom"_compute_property_atom.html - convert atom attributes to per-atom vectors/arrays
"property/chunk"_compute_property_chunk.html - extract various per-chunk attributes
"property/local"_compute_property_local.html - convert local attributes to localvectors/arrays
"ptm/atom"_compute_ptm_atom.html -
"ptm/atom"_compute_ptm_atom.html - determines the local lattice structure based on the Polyhedral Template Matching method
"rdf"_compute_rdf.html - radial distribution function g(r) histogram of group of atoms
"reduce"_compute_reduce.html - combine per-atom quantities into a single global value
"reduce/chunk"_compute_reduce_chunk.html - reduce per-atom quantities within each chunk
"reduce/region"_compute_reduce.html - same as compute reduce, within a region
"rigid/local"_compute_rigid_local.html - extract rigid body attributes
"saed"_compute_saed.html -
"saed"_compute_saed.html - electron diffraction intensity on a mesh of reciprocal lattice nodes
"slice"_compute_slice.html - extract values from global vector or array
"smd/contact/radius"_compute_smd_contact_radius.html -
"smd/damage"_compute_smd_damage.html -
"smd/damage"_compute_smd_damage.html - damage status of SPH particles in Smooth Mach Dynamics
"smd/hourglass/error"_compute_smd_hourglass_error.html -
"smd/internal/energy"_compute_smd_internal_energy.html -
"smd/plastic/strain"_compute_smd_plastic_strain.html -
"smd/plastic/strain/rate"_compute_smd_plastic_strain_rate.html -
"smd/rho"_compute_smd_rho.html -
"smd/tlsph/defgrad"_compute_smd_tlsph_defgrad.html -
"smd/tlsph/dt"_compute_smd_tlsph_dt.html -
"smd/internal/energy"_compute_smd_internal_energy.html - per-particle enthalpy in Smooth Mach Dynamics
"smd/plastic/strain"_compute_smd_plastic_strain.html - equivalent plastic strain per particle in Smooth Mach Dynamics
"smd/plastic/strain/rate"_compute_smd_plastic_strain_rate.html - time rate of the equivalent plastic strain in Smooth Mach Dynamics
"smd/rho"_compute_smd_rho.html - per-particle mass density in Smooth Mach Dynamics
"smd/tlsph/defgrad"_compute_smd_tlsph_defgrad.html - deformation gradient in Smooth Mach Dynamics
"smd/tlsph/dt"_compute_smd_tlsph_dt.html - CFL-stable time increment per particle in Smooth Mach Dynamics
"smd/tlsph/num/neighs"_compute_smd_tlsph_num_neighs.html -
"smd/tlsph/shape"_compute_smd_tlsph_shape.html -
"smd/tlsph/strain"_compute_smd_tlsph_strain.html -
"smd/tlsph/strain/rate"_compute_smd_tlsph_strain_rate.html -
"smd/tlsph/stress"_compute_smd_tlsph_stress.html -
"smd/triangle/vertices"_compute_smd_triangle_vertices.html -
"smd/tlsph/stress"_compute_smd_tlsph_stress.html - per-particle Cauchy stress tensor for SPH particles
"smd/triangle/vertices"_compute_smd_triangle_vertices.html -
"smd/ulsph/num/neighs"_compute_smd_ulsph_num_neighs.html -
"smd/ulsph/strain"_compute_smd_ulsph_strain.html -
"smd/ulsph/strain/rate"_compute_smd_ulsph_strain_rate.html -
"smd/ulsph/stress"_compute_smd_ulsph_stress.html -
"smd/vol"_compute_smd_vol.html -
"smd/ulsph/stress"_compute_smd_ulsph_stress.html - per-particle Cauchy stress tensor and von Mises equivalent stress in Smooth Mach Dynamics
"smd/vol"_compute_smd_vol.html - per-particle volumes and their sum in Smooth Mach Dynamics
"sna/atom"_compute_sna_atom.html - calculate bispectrum coefficients for each atom
"snad/atom"_compute_sna_atom.html - derivative of bispectrum coefficients for each atom
"snav/atom"_compute_sna_atom.html - virial contribution from bispectrum coefficients for each atom
"spin"_compute_spin.html -
"spin"_compute_spin.html - magnetic quantities for a system of atoms having spins
"stress/atom"_compute_stress_atom.html - stress tensor for each atom
"stress/mop"_compute_stress_mop.html -
"stress/mop/profile"_compute_stress_mop.html -
"stress/mop"_compute_stress_mop.html - normal components of the local stress tensor using the method of planes
"stress/mop/profile"_compute_stress_mop.html - profile of the normal components of the local stress tensor using the method of planes
"stress/tally"_compute_tally.html -
"tdpd/cc/atom"_compute_tdpd_cc_atom.html -
"tdpd/cc/atom"_compute_tdpd_cc_atom.html - per-atom chemical concentration of a specified species for each tDPD particle
"temp"_compute_temp.html - temperature of group of atoms
"temp/asphere"_compute_temp_asphere.html - temperature of aspherical particles
"temp/body"_compute_temp_body.html - temperature of body particles
"temp/chunk"_compute_temp_chunk.html - temperature of each chunk
"temp/com"_compute_temp_com.html - temperature after subtracting center-of-mass velocity
"temp/cs"_compute_temp_cs.html -
"temp/cs"_compute_temp_cs.html - temperature based on the center-of-mass velocity of atom pairs that are bonded to each other
"temp/deform"_compute_temp_deform.html - temperature excluding box deformation velocity
"temp/deform/eff"_compute_temp_deform_eff.html -
"temp/drude"_compute_temp_drude.html -
"temp/eff"_compute_temp_eff.html -
"temp/deform/eff"_compute_temp_deform_eff.html - temperature excluding box deformation velocity in the electron force field model
"temp/drude"_compute_temp_drude.html - temperature of Core-Drude pairs
"temp/eff"_compute_temp_eff.html - temperature of a group of nuclei and electrons in the electron force field model
"temp/partial"_compute_temp_partial.html - temperature excluding one or more dimensions of velocity
"temp/profile"_compute_temp_profile.html - temperature excluding a binned velocity profile
"temp/ramp"_compute_temp_ramp.html - temperature excluding ramped velocity component
"temp/region"_compute_temp_region.html - temperature of a region of atoms
"temp/region/eff"_compute_temp_region_eff.html -
"temp/rotate"_compute_temp_rotate.html -
"temp/region/eff"_compute_temp_region_eff.html - temperature of a region of nuclei and electrons in the electron force field model
"temp/rotate"_compute_temp_rotate.html - temperature of a group of atoms after subtracting out their center-of-mass and angular velocities
"temp/sphere"_compute_temp_sphere.html - temperature of spherical particles
"temp/uef"_compute_temp_uef.html -
"temp/uef"_compute_temp_uef.html - kinetic energy tensor in the reference frame of an applied flow field
"ti"_compute_ti.html - thermodynamic integration free energy values
"torque/chunk"_compute_torque_chunk.html - torque applied on each chunk
"vacf"_compute_vacf.html - velocity auto-correlation function of group of atoms
"vcm/chunk"_compute_vcm_chunk.html - velocity of center-of-mass for each chunk
"voronoi/atom"_compute_voronoi_atom.html - Voronoi volume and neighbors for each atom
"xrd"_compute_xrd.html - :ul
"xrd"_compute_xrd.html - x-ray diffraction intensity on a mesh of reciprocal lattice nodes :ul
[Restrictions:] none

View File

@ -67,6 +67,7 @@ distance^2 "units"_units.html respectively.
[Related commands:]
"compute gyration/chunk"_compute_gyration_chunk.html
"compute gyration/chunk"_compute_gyration_chunk.html,
"compute gyration/shape"_compute_gyration_shape.html
[Default:] none

View File

@ -0,0 +1,86 @@
"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
compute gyration/shape command :h3
[Syntax:]
compute ID group-ID gyration compute-ID :pre
ID, group-ID are documented in "compute"_compute.html command
gyration/shape = style name of this compute command
compute-ID = ID of "compute gyration"_compute_gyration.html command :ul
[Examples:]
compute 1 molecule gyration/shape pe :pre
[Description:]
Define a computation that calculates the eigenvalues of the gyration tensor of a
group of atoms and three shape parameters. The computation includes all effects
due to atoms passing thru periodic boundaries.
The three computed shape parameters are the asphericity, b, the acylindricity, c,
and the relative shape anisotropy, k:
:c,image(Eqs/compute_shape_parameters.jpg)
where lx <= ly <= lz are the three eigenvalues of the gyration tensor.
The asphericity is always non-negative and zero only when the three principal
moments are equal. This zero condition is met when the distribution of particles
is spherically symmetric (hence the name asphericity) but also whenever the particle
distribution is symmetric with respect to the three coordinate axes, e.g.,
when the particles are distributed uniformly on a cube, tetrahedron or other Platonic
solid. The acylindricity is always non-negative and zero only when the two principal
moments are equal. This zero condition is met when the distribution of particles is
cylindrically symmetric (hence the name, acylindricity), but also whenever the particle
distribution is symmetric with respect to the two coordinate axes, e.g., when the
particles are distributed uniformly on a regular prism. the relative shape anisotropy
is bounded between zero (if all points are spherically symmetric) and one
(if all points lie on a line).
NOTE: The coordinates of an atom contribute to the gyration tensor in
"unwrapped" form, by using the image flags associated with each atom.
See the "dump custom"_dump.html command for a discussion of "unwrapped"
coordinates. See the Atoms section of the "read_data"_read_data.html
command for a discussion of image flags and how they are set for each
atom. You can reset the image flags (e.g. to 0) before invoking this
compute by using the "set image"_set.html command.
[Output info:]
This compute calculates a global vector of
length 6, which can be accessed by indices 1-6. The first three values are the
eigenvalues of the gyration tensor followed by the asphericity, the acylindricity
and the relative shape anisotropy. The computed values can be used by any command
that uses global vector values from a compute as input. See the "Howto
output"_Howto_output.html doc page for an overview of LAMMPS output
options.
The vector values calculated by this compute are
"intensive". The first five vector values will be in
distance^2 "units"_units.html while the sixth one is dimensionless.
[Restrictions:]
This compute is part of the USER-MISC 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:]
"compute gyration"_compute_gyration.html
[Default:] none
:line
:link(Theodorou)
[(Theodorou)] Theodorou, Suter, Macromolecules, 18, 1206 (1985).

View File

@ -65,7 +65,7 @@ In an isotropic liquid, local neighborhoods may still exhibit
weak hexagonal symmetry, but because the orientational correlation
decays quickly with distance, the value of phi will be different for
different atoms, and so when {q}6 is averaged over all the atoms
in the system, \|<{q}6>\| << 1.
in the system, |<{q}6>| << 1.
The value of {qn} is set to zero for atoms not in the
specified compute group, as well as for atoms that have less than

View File

@ -0,0 +1,49 @@
"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
compute momentum command :h3
[Syntax:]
compute ID group-ID momentum :pre
ID, group-ID are documented in "compute"_compute.html command
momentum = style name of this compute command :ul
[Examples:]
compute 1 all momentum :pre
[Description:]
Define a computation that calculates the translational momentum
of a group of particles.
The momentum of each particles is computed as m v, where m and v are
the mass and velocity of the particle.
[Output info:]
This compute calculates a global vector (the summed momentum) of
length 3. This value can be used by any command that uses a global
vector value from a compute as input. See the "Howto
output"_Howto_output.html doc page for an overview of LAMMPS output
options.
The vector value calculated by this compute is "extensive". The vector
value will be in mass*velocity "units"_units.html.
[Restrictions:]
This compute is part of the USER-MISC 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:]
[Default:] none

View File

@ -16,12 +16,13 @@ ID, group-ID are documented in "compute"_compute.html command
pressure = style name of this compute command
temp-ID = ID of compute that calculates temperature, can be NULL if not needed
zero or more keywords may be appended
keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} or {virial} :ul
keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} or {virial} or {pair/hybrid} :ul
[Examples:]
compute 1 all pressure thermo_temp
compute 1 all pressure NULL pair bond :pre
compute 1 all pressure NULL pair bond
compute 1 all pressure NULL pair/hybrid lj/cut :pre
[Description:]
@ -67,6 +68,9 @@ extra keywords are listed, then only those components are summed to
compute temperature or ke and/or the virial. The {virial} keyword
means include all terms except the kinetic energy {ke}.
The {pair/hybrid} keyword means to only include contribution
from a sub-style in a {hybrid} or {hybrid/overlay} pair style.
Details of how LAMMPS computes the virial efficiently for the entire
system, including for many-body potentials and accounting for the
effects of periodic boundary conditions are discussed in

View File

@ -24,12 +24,7 @@ twojmax = band limit for bispectrum components (non-negative integer) :l
R_1, R_2,... = list of cutoff radii, one for each type (distance units) :l
w_1, w_2,... = list of neighbor weights, one for each type :l
zero or more keyword/value pairs may be appended :l
keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} or {quadraticflag} :l
{diagonal} value = {0} or {1} or {2} or {3}
{0} = all j1, j2, j <= twojmax, j2 <= j1
{1} = subset satisfying j1 == j2
{2} = subset satisfying j1 == j2 == j3
{3} = subset satisfying j2 <= j1 <= j
keyword = {rmin0} or {switchflag} or {bzeroflag} or {quadraticflag} :l
{rmin0} value = parameter in distance to angle conversion (distance units)
{switchflag} value = {0} or {1}
{0} = do not use switching function
@ -44,7 +39,7 @@ keyword = {diagonal} or {rmin0} or {switchflag} or {bzeroflag} or {quadraticflag
[Examples:]
compute b all sna/atom 1.4 0.99363 6 2.0 2.4 0.75 1.0 diagonal 3 rmin0 0.0
compute b all sna/atom 1.4 0.99363 6 2.0 2.4 0.75 1.0 rmin0 0.0
compute db all sna/atom 1.4 0.95 6 2.0 1.0
compute vb all sna/atom 1.4 0.95 6 2.0 1.0 :pre
@ -151,7 +146,7 @@ The argument {rfac0} and the optional keyword {rmin0} define the
linear mapping from radial distance to polar angle {theta0} on the
3-sphere.
The argument {twojmax} and the keyword {diagonal} define which
The argument {twojmax} defines which
bispectrum components are generated. See section below on output for a
detailed explanation of the number of bispectrum components and the
ordered in which they are listed.
@ -192,23 +187,18 @@ command that includes all pairs in the neighbor list.
Compute {sna/atom} calculates a per-atom array, each column
corresponding to a particular bispectrum component. The total number
of columns and the identity of the bispectrum component contained in
each column depend on the values of {twojmax} and {diagonal}, as
each column depend of the value of {twojmax}, as
described by the following piece of python code:
for j1 in range(0,twojmax+1):
if(diagonal==2):
print j1/2.,j1/2.,j1/2.
elif(diagonal==1):
for j in range(0,min(twojmax,2*j1)+1,2):
print j1/2.,j1/2.,j/2.
elif(diagonal==0):
for j2 in range(0,j1+1):
for j in range(j1-j2,min(twojmax,j1+j2)+1,2):
print j1/2.,j2/2.,j/2.
elif(diagonal==3):
for j2 in range(0,j1+1):
for j in range(j1-j2,min(twojmax,j1+j2)+1,2):
if (j>=j1): print j1/2.,j2/2.,j/2. :pre
for j2 in range(0,j1+1):
for j in range(j1-j2,min(twojmax,j1+j2)+1,2):
if (j>=j1): print j1/2.,j2/2.,j/2. :pre
NOTE: the {diagonal} keyword allowing other possible choices
for the number of bispectrum components was removed in 2019,
since all potentials use the value of 3, corresponding to the
above set of bispectrum components.
Compute {snad/atom} evaluates a per-atom array. The columns are
arranged into {ntypes} blocks, listed in order of atom type {I}. Each
@ -259,7 +249,7 @@ package"_Build_package.html doc page for more info.
[Default:]
The optional keyword defaults are {diagonal} = 0, {rmin0} = 0,
The optional keyword defaults are {rmin0} = 0,
{switchflag} = 1, {bzeroflag} = 1, {quadraticflag} = 0,
:line

View File

@ -88,6 +88,8 @@ potentials only include the pair potential portion of the EAM
interaction when used by this compute, not the embedding term. Also
bonded or Kspace interactions do not contribute to this compute.
The computes in this package are not compatible with dynamic groups.
[Related commands:]
{compute group/group}_compute_group_group.html, {compute

View File

@ -44,6 +44,7 @@ Computes :h1
compute_group_group
compute_gyration
compute_gyration_chunk
compute_gyration_shape
compute_heat_flux
compute_hexorder_atom
compute_improper
@ -57,6 +58,7 @@ Computes :h1
compute_meso_e_atom
compute_meso_rho_atom
compute_meso_t_atom
compute_momentum
compute_msd
compute_msd_chunk
compute_msd_nongauss

View File

@ -242,9 +242,8 @@ write_dump all atom sinusoid.lammpstrj :pre
:c,image(JPG/sinusoid_small.jpg,JPG/sinusoid.jpg)
The {rotate} keyword can only be used with the {single} style and
when adding a single molecule. It allows to specify the orientation
at which the molecule is inserted. The axis of rotation is
The {rotate} keyword allows specification of the orientation
at which molecules are inserted. The axis of rotation is
determined by the rotation vector (Rx,Ry,Rz) that goes through the
insertion point. The specified {theta} determines the angle of
rotation around that axis. Note that the direction of rotation for

View File

@ -191,6 +191,16 @@ switch"_Run_options.html when you invoke LAMMPS, or you can use the
See the "Speed packages"_Speed_packages.html doc page for more
instructions on how to use the accelerated styles effectively.
[Restart info:]
This dihedral style writes the settings for the "dihedral_style table"
command to "binary restart files"_restart.html, so a dihedral_style
command does not need to specified in an input script that reads a
restart file. However, the coefficient information is not stored in
the restart file, since it is tabulated in the potential files. Thus,
dihedral_coeff commands do need to be specified in the restart input
script.
[Restrictions:]
This dihedral style can only be used if LAMMPS was built with the

View File

@ -189,6 +189,16 @@ Note that one file can contain many sections, each with a tabulated
potential. LAMMPS reads the file section by section until it finds one
that matches the specified keyword.
[Restart info:]
This dihedral style writes the settings for the "dihedral_style table/cut"
command to "binary restart files"_restart.html, so a dihedral_style
command does not need to specified in an input script that reads a
restart file. However, the coefficient information is not stored in
the restart file, since it is tabulated in the potential files. Thus,
dihedral_coeff commands do need to be specified in the restart input
script.
[Restrictions:]
This dihedral style can only be used if LAMMPS was built with the

View File

@ -165,40 +165,40 @@ page are followed by one or more of (g,i,k,o,t) to indicate which
accelerated styles exist.
"adapt"_fix_adapt.html - change a simulation parameter over time
"adapt/fep"_fix_adapt_fep.html -
"adapt/fep"_fix_adapt_fep.html - enhanced version of fix adapt
"addforce"_fix_addforce.html - add a force to each atom
"addtorque"_fix_addtorque.html -
"addtorque"_fix_addtorque.html - add a torque to a group of atoms
"append/atoms"_fix_append_atoms.html - append atoms to a running simulation
"atc"_fix_atc.html -
"atc"_fix_atc.html - initiates a coupled MD/FE simulation
"atom/swap"_fix_atom_swap.html - Monte Carlo atom type swapping
"ave/atom"_fix_ave_atom.html - compute per-atom time-averaged quantities
"ave/chunk"_fix_ave_chunk.html - compute per-chunk time-averaged quantities
"ave/correlate"_fix_ave_correlate.html - compute/output time correlations
"ave/correlate/long"_fix_ave_correlate_long.html -
"ave/histo"_fix_ave_histo.html - compute/output time-averaged histograms
"ave/histo/weight"_fix_ave_histo.html -
"ave/histo/weight"_fix_ave_histo.html - weighted version of fix ave/histo
"ave/time"_fix_ave_time.html - compute/output global time-averaged quantities
"aveforce"_fix_aveforce.html - add an averaged force to each atom
"balance"_fix_balance.html - perform dynamic load-balancing
"bocs"_fix_bocs.html -
"bocs"_fix_bocs.html - NPT style time integration with pressure correction
"bond/break"_fix_bond_break.html - break bonds on the fly
"bond/create"_fix_bond_create.html - create bonds on the fly
"bond/react"_fix_bond_react.html -
"bond/react"_fix_bond_react.html - apply topology changes to model reactions
"bond/swap"_fix_bond_swap.html - Monte Carlo bond swapping
"box/relax"_fix_box_relax.html - relax box size during energy minimization
"client/md"_fix_client_md.html -
"cmap"_fix_cmap.html -
"colvars"_fix_colvars.html -
"controller"_fix_controller.html -
"client/md"_fix_client_md.html - MD client for client/server simulations
"cmap"_fix_cmap.html - enables CMAP cross-terms of the CHARMM force field
"colvars"_fix_colvars.html - interface to the collective variables “Colvars” library
"controller"_fix_controller.html - apply control loop feedback mechanism
"deform"_fix_deform.html - change the simulation box size/shape
"deposit"_fix_deposit.html - add new atoms above a surface
"dpd/energy"_fix_dpd_energy.html -
"dpd/energy"_fix_dpd_energy.html - constant energy dissipative particle dynamics
"drag"_fix_drag.html - drag atoms towards a defined coordinate
"drude"_fix_drude.html -
"drude/transform/direct"_fix_drude_transform.html -
"drude/transform/inverse"_fix_drude_transform.html -
"drude"_fix_drude.html - part of Drude oscillator polarization model
"drude/transform/direct"_fix_drude_transform.html - part of Drude oscillator polarization model
"drude/transform/inverse"_fix_drude_transform.html - part of Drude oscillator polarization model
"dt/reset"_fix_dt_reset.html - reset the timestep based on velocity, forces
"edpd/source"_fix_dpd_source.html -
"edpd/source"_fix_dpd_source.html - add heat source to eDPD simulations
"efield"_fix_efield.html - impose electric field on system
"ehex"_fix_ehex.html - enhanced heat exchange algorithm
"electron/stopping"_fix_electron_stopping.html - electronic stopping power as a friction force
@ -208,27 +208,26 @@ accelerated styles exist.
"eos/table/rx"_fix_eos_table_rx.html -
"evaporate"_fix_evaporate.html - remove atoms from simulation periodically
"external"_fix_external.html - callback to an external driver program
"ffl"_fix_ffl.html -
"filter/corotate"_fix_filter_corotate.html -
"flow/gauss"_fix_flow_gauss.html -
"ffl"_fix_ffl.html - apply a Fast-Forward Langevin equation thermostat
"filter/corotate"_fix_filter_corotate.html - implement corotation filter to allow larger timesteps with r-RESPA
"flow/gauss"_fix_flow_gauss.html - Gaussian dynamics for constant mass flux
"freeze"_fix_freeze.html - freeze atoms in a granular simulation
"gcmc"_fix_gcmc.html - grand canonical insertions/deletions
"gld"_fix_gcmc.html - generalized Langevin dynamics integrator
"gld"_fix_gld.html -
"gle"_fix_gle.html -
"gld"_fix_gld.html - generalized Langevin dynamics integrator
"gle"_fix_gle.html - generalized Langevin equation thermostat
"gravity"_fix_gravity.html - add gravity to atoms in a granular simulation
"grem"_fix_grem.html -
"grem"_fix_grem.html - implements the generalized replica exchange method
"halt"_fix_halt.html - terminate a dynamics run or minimization
"heat"_fix_heat.html - add/subtract momentum-conserving heat
"hyper/global"_fix_hyper_global.html - global hyperdynamics
"hyper/local"_fix_hyper_local.html - local hyperdynamics
"imd"_fix_imd.html -
"imd"_fix_imd.html - implements the “Interactive MD” (IMD) protocol
"indent"_fix_indent.html - impose force due to an indenter
"ipi"_fix_ipi.html -
"ipi"_fix_ipi.html - enable LAMMPS to run as a client for i-PI path-integral simulations
"langevin"_fix_langevin.html - Langevin temperature control
"langevin/drude"_fix_langevin_drude.html -
"langevin/eff"_fix_langevin_eff.html -
"langevin/spin"_fix_langevin_spin.html -
"langevin/drude"_fix_langevin_drude.html - Langevin temperature control of Drude oscillators
"langevin/eff"_fix_langevin_eff.html - Langevin temperature control for the electron force field model
"langevin/spin"_fix_langevin_spin.html - Langevin temperature control for a spin or spin-lattice system
"latte"_fix_latte.html - wrapper on LATTE density-functional tight-binding code
"lb/fluid"_fix_lb_fluid.html -
"lb/momentum"_fix_lb_momentum.html -
@ -236,64 +235,60 @@ accelerated styles exist.
"lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html -
"lb/viscous"_fix_lb_viscous.html -
"lineforce"_fix_lineforce.html - constrain atoms to move in a line
"manifoldforce"_fix_manifoldforce.html -
"meso"_fix_meso.html -
"meso"_fix_meso_move.html - move mesoscopic SPH/SDPD particles in a prescribed fashion
"meso/move"_fix_meso_move.html -
"manifoldforce"_fix_manifoldforce.html - restrain atoms to a manifold during minimization
"meso"_fix_meso.html - time integration for SPH/DPDE particles
"meso/move"_fix_meso_move.html - move mesoscopic SPH/SDPD particles in a prescribed fashion
"meso/stationary"_fix_meso_stationary.html -
"momentum"_fix_momentum.html - zero the linear and/or angular momentum of a group of atoms
"move"_fix_move.html - move atoms in a prescribed fashion
"mscg"_fix_mscg.html -
"mscg"_fix_mscg.html - apply MSCG method for force-matching to generate coarse grain models
"msst"_fix_msst.html - multi-scale shock technique (MSST) integration
"mvv/dpd"_fix_mvv_dpd.html -
"mvv/edpd"_fix_mvv_dpd.html -
"mvv/tdpd"_fix_mvv_dpd.html -
"mvv/dpd"_fix_mvv_dpd.html - DPD using the modified velocity-Verlet integration algorithm
"mvv/edpd"_fix_mvv_dpd.html - constant energy DPD using the modified velocity-Verlet algrithm
"mvv/tdpd"_fix_mvv_dpd.html - constant temperature DPD using the modified velocity-Verlet algorithm
"neb"_fix_neb.html - nudged elastic band (NEB) spring forces
"nph"_fix_nh.html - constant NPH time integration via Nose/Hoover
"nph/asphere"_fix_nph_asphere.html - NPH for aspherical particles
"nph/body"_fix_nph_body.html -
"nph/body"_fix_nve_body.html - NPH for body particles
"nph/eff"_fix_nh_eff.html -
"nph/body"_fix_nph_body.html - NPH for body particles
"nph/eff"_fix_nh_eff.html - NPH for nuclei and electrons in the electron force field model
"nph/sphere"_fix_nph_sphere.html - NPH for spherical particles
"nphug"_fix_nphug.html - constant-stress Hugoniostat integration
"npt"_fix_nh.html - constant NPT time integration via Nose/Hoover
"npt/asphere"_fix_npt_asphere.html - NPT for aspherical particles
"npt/body"_fix_npt_body.html -
"npt/body"_fix_nve_body.html - NPT for body particles
"npt/eff"_fix_nh_eff.html -
"npt/body"_fix_npt_body.html - NPT for body particles
"npt/eff"_fix_nh_eff.html - NPT for nuclei and electrons in the electron force field model
"npt/sphere"_fix_npt_sphere.html - NPT for spherical particles
"npt/uef"_fix_nh_uef.html -
"npt/uef"_fix_nh_uef.html - NPT style time integration with diagonal flow
"nve"_fix_nve.html - constant NVE time integration
"nve/asphere"_fix_nve_asphere.html - NVE for aspherical particles
"nve/asphere/noforce"_fix_nve_asphere_noforce.html - NVE for aspherical particles without forces"
"nve/awpmd"_fix_nve_awpmd.html -
"nve/asphere/noforce"_fix_nve_asphere_noforce.html - NVE for aspherical particles without forces
"nve/awpmd"_fix_nve_awpmd.html - NVE for the Antisymmetrized Wave Packet Molecular Dynamics model
"nve/body"_fix_nve_body.html - NVE for body particles
"nve/dot"_fix_nve_dot.html -
"nve/dotc/langevin"_fix_nve_dotc_langevin.html -
"nve/eff"_fix_nve_eff.html -
"nve/dot"_fix_nve_dot.html - rigid body constant energy time integrator for coarse grain models
"nve/dotc/langevin"_fix_nve_dotc_langevin.html - Langevin style rigid body time integrator for coarse grain models
"nve/eff"_fix_nve_eff.html - NVE for nuclei and electrons in the electron force field model
"nve/limit"_fix_nve_limit.html - NVE with limited step length
"nve/line"_fix_nve_line.html - NVE for line segments
"nve/manifold/rattle"_fix_nve_manifold_rattle.html -
"nve/noforce"_fix_nve_noforce.html - NVE without forces (v only)
"nve/sphere"_fix_nve_sphere.html - NVE for spherical particles
"nve/spin"_fix_nve_spin.html -
"nve/spin"_fix_nve_spin.html - NVE for a spin or spin-lattice system
"nve/tri"_fix_nve_tri.html - NVE for triangles
"nvk"_fix_nvk.html -
"nvt"_fix_nh.html - constant NVT time integration via Nose/Hoover
"nvk"_fix_nvk.html - constant kinetic energy time integration
"nvt"_fix_nh.html - NVT time integration via Nose/Hoover
"nvt/asphere"_fix_nvt_asphere.html - NVT for aspherical particles
"nvt/body"_fix_nve_body.html - NVT for body particles
"nvt/body"_fix_nvt_body.html -
"nvt/eff"_fix_nh_eff.html -
"nvt/body"_fix_nvt_body.html - NVT for body particles
"nvt/eff"_fix_nh_eff.html - NVE for nuclei and electrons in the electron force field model
"nvt/manifold/rattle"_fix_nvt_manifold_rattle.html -
"nvt/sllod"_fix_nvt_sllod.html - NVT for NEMD with SLLOD equations
"nvt/sllod/eff"_fix_nvt_sllod_eff.html -
"nvt/sllod/eff"_fix_nvt_sllod_eff.html - NVT for NEMD with SLLOD equations for the electron force field model
"nvt/sphere"_fix_nvt_sphere.html - NVT for spherical particles
"nvt/uef"_fix_nh_uef.html -
"nvt/uef"_fix_nh_uef.html - NVT style time integration with diagonal flow
"oneway"_fix_oneway.html - constrain particles on move in one direction
"orient/bcc"_fix_orient.html - add grain boundary migration force for BCC
"orient/fcc"_fix_orient.html - add grain boundary migration force for FCC
"phonon"_fix_phonon.html -
"pimd"_fix_pimd.html -
"phonon"_fix_phonon.html - calculate dynamical matrix from MD simulations
"pimd"_fix_pimd.html - Feynman path integral molecular dynamics
"planeforce"_fix_planeforce.html - constrain atoms to move in a plane
"plumed"_fix_plumed.html - wrapper on PLUMED free energy library
"poems"_fix_poems.html - constrain clusters of atoms to move as coupled rigid bodies
@ -302,24 +297,24 @@ accelerated styles exist.
"press/berendsen"_fix_press_berendsen.html - pressure control by Berendsen barostat
"print"_fix_print.html - print text and variables during a simulation
"property/atom"_fix_property_atom.html - add customized per-atom values
"python/invoke"_fix_python_invoke.html -
"python/move"_fix_python_move.html -
"qbmsst"_fix_qbmsst.html -
"python/invoke"_fix_python_invoke.html - call a Python function during a simulation
"python/move"_fix_python_move.html - call a Python function during a simulation run
"qbmsst"_fix_qbmsst.html - quantum bath multi-scale shock technique time integrator
"qeq/comb"_fix_qeq_comb.html - charge equilibration for COMB potential
"qeq/dynamic"_fix_qeq.html - charge equilibration via dynamic method
"qeq/fire"_fix_qeq.html - charge equilibration via FIRE minimizer
"qeq/point"_fix_qeq.html - charge equilibration via point method
"qeq/reax"_fix_qeq_reax.html -
"qeq/reax"_fix_qeq_reax.html - charge equilibration for ReaxFF potential
"qeq/shielded"_fix_qeq.html - charge equilibration via shielded method
"qeq/slater"_fix_qeq.html - charge equilibration via Slater method
"qmmm"_fix_qmmm.html -
"qtb"_fix_qtb.html -
"qmmm"_fix_qmmm.html - functionality to enable a quantum mechanics/molecular mechanics coupling
"qtb"_fix_qtb.html - implement quantum thermal bath scheme
"rattle"_fix_shake.html - RATTLE constraints on bonds and/or angles
"reax/c/bonds"_fix_reaxc_bonds.html - write out ReaxFF bond information
"reax/c/species"_fix_reaxc_species.html - write out ReaxFF molecule information
"recenter"_fix_recenter.html - constrain the center-of-mass position of a group of atoms
"restrain"_fix_restrain.html - constrain a bond, angle, dihedral
"rhok"_fix_rhok.html -
"rhok"_fix_rhok.html - add bias potential for long-range ordered systems
"rigid"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NVE integration
"rigid/meso"_fix_rigid_meso.html - constrain clusters of mesoscopic SPH/SDPD particles to move as a rigid body
"rigid/nph"_fix_rigid.html - constrain one or more clusters of atoms to move as a rigid body with NPH integration
@ -332,11 +327,11 @@ accelerated styles exist.
"rigid/nvt/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NVT integration
"rigid/small"_fix_rigid.html - constrain many small clusters of atoms to move as a rigid body with NVE integration
"rx"_fix_rx.html -
"saed/vtk"_fix_saed_vtk.html -
"saed/vtk"_fix_saed_vtk.html -
"setforce"_fix_setforce.html - set the force on each atom
"shake"_fix_shake.html - SHAKE constraints on bonds and/or angles
"shardlow"_fix_shardlow.html -
"smd"_fix_smd.html -
"shardlow"_fix_shardlow.html - integration of DPD equations of motion using the Shardlow splitting
"smd"_fix_smd.html - applied a steered MD force to a group
"smd/adjust_dt"_fix_smd_adjust_dt.html -
"smd/integrate_tlsph"_fix_smd_integrate_tlsph.html -
"smd/integrate_ulsph"_fix_smd_integrate_ulsph.html -
@ -355,13 +350,13 @@ accelerated styles exist.
"temp/csld"_fix_temp_csvr.html - canonical sampling thermostat with Langevin dynamics
"temp/csvr"_fix_temp_csvr.html - canonical sampling thermostat with Hamiltonian dynamics
"temp/rescale"_fix_temp_rescale.html - temperature control by velocity rescaling
"temp/rescale/eff"_fix_temp_rescale_eff.html -
"temp/rescale/eff"_fix_temp_rescale_eff.html - temperature control by velocity rescaling in the electron force field model
"tfmc"_fix_tfmc.html - perform force-bias Monte Carlo with time-stamped method
"thermal/conductivity"_fix_thermal_conductivity.html - Muller-Plathe kinetic energy exchange for thermal conductivity calculation
"ti/spring"_fix_ti_spring.html -
"tmd"_fix_tmd.html - guide a group of atoms to a new configuration
"ttm"_fix_ttm.html - two-temperature model for electronic/atomic coupling
"ttm/mod"_fix_ttm.html -
"ttm/mod"_fix_ttm.html - enhanced two-temperature model with additional options
"tune/kspace"_fix_tune_kspace.html - auto-tune KSpace parameters
"vector"_fix_vector.html - accumulate a global vector every N timesteps
"viscosity"_fix_viscosity.html - Muller-Plathe momentum exchange for viscosity calculation
@ -369,7 +364,7 @@ accelerated styles exist.
"wall/body/polygon"_fix_wall_body_polygon.html -
"wall/body/polyhedron"_fix_wall_body_polyhedron.html -
"wall/colloid"_fix_wall.html - Lennard-Jones wall interacting with finite-size particles
"wall/ees"_fix_wall_ees.html -
"wall/ees"_fix_wall_ees.html - wall for ellipsoidal particles
"wall/gran"_fix_wall_gran.html - frictional wall(s) for granular simulations
"wall/gran/region"_fix_wall_gran_region.html -
"wall/harmonic"_fix_wall.html - harmonic spring wall
@ -379,7 +374,7 @@ accelerated styles exist.
"wall/piston"_fix_wall_piston.html - moving reflective piston wall
"wall/reflect"_fix_wall_reflect.html - reflecting wall(s)
"wall/region"_fix_wall_region.html - use region surface as wall
"wall/region/ees"_fix_wall_ees.html -
"wall/region/ees"_fix_wall_ees.html - use region surface as wall for ellipsoidal particles
"wall/srd"_fix_wall_srd.html - slip/no-slip wall for SRD particles :ul
[Restrictions:]

View File

@ -149,8 +149,7 @@ meaning of these parameters:
"spin/neel"_pair_spin_neel.html: coulombic_cutoff: type global:
"table"_pair_table.html: table_cutoff: type pairs:
"ufm"_pair_ufm.html: epsilon,sigma: type pairs:
"soft"_pair_soft.html: a: type pairs:
"kim"_pair_kim.html: PARAM_FREE_*&#58i,j,...: global :tb(c=3,s=:)
"soft"_pair_soft.html: a: type pairs: :tb(c=3,s=:)
NOTE: It is easy to add new pairwise potentials and their parameters
to this list. All it typically takes is adding an extract() method to

View File

@ -47,13 +47,13 @@ or {cubic_spline}.
With either spline method, the only argument that needs to follow it
is the name of a file that contains the desired pressure correction
as a function of volume. The file should be formatted so each line has:
as a function of volume. The file must be formatted so each line has:
Volume_i, PressureCorrection_i :pre
Note both the COMMA and the SPACE separating the volume's
value and its corresponding pressure correction. The volumes in the file
should be uniformly spaced. Both the volumes and the pressure corrections
must be uniformly spaced. Both the volumes and the pressure corrections
should be provided in the proper units, e.g. if you are using {units real},
the volumes should all be in cubic angstroms, and the pressure corrections
should all be in atmospheres. Furthermore, the table should start/end at a

View File

@ -24,7 +24,7 @@ common_keyword = {stabilization} :l
{stabilization} values = {no} or {yes} {group-ID} {xmax}
{no} = no reaction site stabilization
{yes} = perform reaction site stabilization
{group-ID} = user-assigned prefix for the dynamic group of non-reacting atoms
{group-ID} = user-assigned prefix for the dynamic group of atoms not currently involved in a reaction
{xmax} = xmax value that is used by an internally-created "nve/limit"_fix_nve_limit.html integrator :pre
react = mandatory argument indicating new reaction specification :l
react-ID = user-assigned name for the reaction :l
@ -52,6 +52,8 @@ react = mandatory argument indicating new reaction specification :l
[Examples:]
For unabridged example scripts and files, see examples/USER/misc/bond_react.
molecule mol1 pre_reacted_topology.txt
molecule mol2 post_reacted_topology.txt
fix 5 all bond/react react myrxn1 all 1 0 3.25 mol1 mol2 map_file.txt :pre
@ -106,6 +108,20 @@ involved in any new reactions. The {xmax} value keyword should
typically be set to the maximum distance that non-reacting atoms move
during the simulation.
Fix bond/react creates and maintains two important dynamic groups of
atoms when using the {stabilization} keyword. The first group contains
all atoms currently involved in a reaction; this group is
automatically thermostatted by an internally-created
"nve/limit"_fix_nve_limit.html integrator. The second group contains
all atoms currently not involved in a reaction. This group should be
used by a thermostat in order to time integrate the system. The name
of this group of non-reacting atoms is created by appending '_REACT'
to the group-ID argument of the {stabilization} keyword, as shown in
the second example above.
NOTE: When using reaction stabilization, you should generally not have
a separate thermostat which acts on the 'all' group.
The group-ID set using the {stabilization} keyword can be an existing
static group or a previously-unused group-ID. It cannot be specified
as 'all'. If the group-ID is previously unused, the fix bond/react
@ -116,20 +132,17 @@ internally-created dynamic group. In both cases, this new dynamic
group is named by appending '_REACT' to the group-ID, e.g.
nvt_grp_REACT. By specifying an existing group, you may thermostat
constant-topology parts of your system separately. The dynamic group
contains only non-reacting atoms at a given timestep, and therefore
should be used by a subsequent system-wide time integrator such as
nvt, npt, or nve, as shown in the second example above. The time
integration command should be placed after the fix bond/react command
due to the internal dynamic grouping performed by fix bond/react.
contains only atoms not involved in a reaction at a given timestep,
and therefore should be used by a subsequent system-wide time
integrator such as nvt, npt, or nve, as shown in the second example
above (full examples can be found at examples/USER/misc/bond_react).
The time integration command should be placed after the fix bond/react
command due to the internal dynamic grouping performed by fix
bond/react.
NOTE: If the group-ID is an existing static group, react-group-IDs
should also be specified as this static group, or a subset.
NOTE: If the group-ID is previously unused, the internally-created
group applies to all atoms in the system, i.e. you should generally
not have a separate thermostat which acts on the 'all' group, or any
other group.
The following comments pertain to each {react} argument (in other
words, can be customized for each reaction, or reaction step):
@ -352,12 +365,13 @@ an atom that is not deleted. In addition to deleting unwanted reaction
by-products, this feature can be used to remove specific topologies,
such as small rings, that may be otherwise indistinguishable.
Also, it may be beneficial to ensure reacting atoms are at a certain
temperature before being released to the overall thermostat. For this,
you can use the internally-created dynamic group named
"bond_react_MASTER_group." For example, adding the following command
would thermostat the group of all atoms currently involved in a
reaction:
Optionally, you can enforce additional behaviors on reacting atoms.
For example, it may be beneficial to force reacting atoms to remain at
a certain temperature. For this, you can use the internally-created
dynamic group named "bond_react_MASTER_group", which consists of all
atoms currently involved in a reaction. For example, adding the
following command would add an additional thermostat to the group of
all currently-reacting atoms:
fix 1 bond_react_MASTER_group temp/rescale 1 300 300 10 1 :pre

View File

@ -114,5 +114,5 @@ The default options are plumedfile = NULL and outfile = NULL
:link(PLUMED)
[(PLUMED)] G.A. Tribello, M. Bonomi, D. Branduardi, C. Camilloni and G. Bussi, Comp. Phys. Comm 185, 604 (2014)
:link(plumeddocs,http://www.plumed.org/documentation)
:link(plumeddocs,http://www.plumed.org/doc.html)
:link(plumedhome,http://www.plumed.org/)

View File

@ -39,8 +39,8 @@ An example of using the interface pinning method is located in the
[Restrictions:]
This fix is part of the MISC package. It is only enabled if LAMMPS
was built with that package. See the "Build
This fix is part of the USER-MISC 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:]

View File

@ -57,8 +57,7 @@ Boolean expression is FALSE, then no commands are executed.
The syntax for Boolean expressions is described below.
Each command (t1, f1, e1, etc) can be any valid LAMMPS input script
command, except an "include"_include.html command, which is not
allowed. If the command is more than one word, it must enclosed in
command. If the command is more than one word, it must enclosed in
quotes, so it will be treated as a single argument, as in the examples
above.

View File

@ -27,7 +27,7 @@ The {fourier} improper style uses the following potential:
where K is the force constant and omega is the angle between the IL
axis and the IJK plane:
:c,image(Eqs/umbrella.jpg)
:c,image(JPG/umbrella.jpg)
If all parameter (see bellow) is not zero, the all the three possible angles will taken in account.

View File

@ -28,7 +28,7 @@ where K is the force constant and omega is the angle evaluated for
all three axis-plane combinations centered around the atom I. For
the IL axis and the IJK plane omega looks as follows:
:c,image(Eqs/umbrella.jpg)
:c,image(JPG/umbrella.jpg)
Note that the {inversion/harmonic} angle term evaluation differs to
the "improper_umbrella"_improper_umbrella.html due to the cyclic

View File

@ -29,7 +29,7 @@ commonly referred to as a classic inversion and used in the
where K is the force constant and omega is the angle between the IL
axis and the IJK plane:
:c,image(Eqs/umbrella.jpg)
:c,image(JPG/umbrella.jpg)
If omega0 = 0 the potential term has a minimum for the planar
structure. Otherwise it has two minima at +/- omega0, with a barrier

522
doc/src/kim_commands.txt Normal file
View File

@ -0,0 +1,522 @@
"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
kim_init command :h3
kim_interactions command :h3
kim_query command :h3
[Syntax:]
kim_init model user_units unitarg
kim_interactions typeargs
kim_query variable formatarg query_function queryargs :pre
model = name of the KIM interatomic model (the KIM ID for models archived in OpenKIM)
user_units = the LAMMPS "units"_units.html style assumed in the LAMMPS input script
unitarg = {unit_conversion_mode} (optional)
typeargs = atom type to species mapping (one entry per atom type) or {fixed_types} for models with a preset fixed mapping
variable = name of a (string style) variable where the result of the query is stored
formatarg = {split} (optional)
query_function = name of the OpenKIM web API query function to be used
queryargs = a series of {keyword=value} pairs that represent the web query; supported keywords depend on the query function :ul
[Examples:]
kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 metal
kim_interactions Si
kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 metal unit_conversion_mode
kim_interactions C H O
Sim_LAMMPS_IFF_PCFF_HeinzMishraLinEmami_2015Ver1v5_FccmetalsMineralsSolvents Polymers__SM_039297821658_000 real
kim_interactions fixed_types
kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\] :pre
[Description:]
The set of {kim_commands} provide a high-level wrapper around the
"Open Knowledgebase of Interatomic Models (OpenKIM)"_https://openkim.org
repository of interatomic models (IMs) (potentials and force fields),
so that they can be used by LAMMPS scripts. These commands do not implement
any computations directly, but rather generate LAMMPS input commands based
on the information retrieved from the OpenKIM repository to initialize and
activate OpenKIM IMs and query their predictions for use in the LAMMPS script.
All LAMMPS input commands generated and executed by {kim_commands} are
echoed to the LAMMPS log file.
Benefits of Using OpenKIM IMs :h4
Employing OpenKIM IMs provides LAMMPS users with multiple benefits:
Reliability :h5
All content archived in OpenKIM is reviewed by the "KIM Editor"_https://openkim.org/governance/ for quality.
IMs in OpenKIM are archived with full provenance control. Each is associated with a maintainer responsible for the integrity of the content. All changes are tracked and recorded.
IMs in OpenKIM are exhaustively tested using "KIM Tests"_https://openkim.org/doc/evaluation/kim-tests/ that compute a host of material properties, and "KIM Verification Checks"_https://openkim.org/doc/evaluation/kim-verification-checks/ that provide the user with information on various aspects of the IM behavior and coding correctness. This information is displayed on the IM's page accessible through the "OpenKIM browse interface"_https://openkim.org/browse. :ul
Reproducibility :h5
Each IM in OpenKIM is issued a unique identifier ("KIM ID"_https://openkim.org/doc/schema/kim-ids/), which includes a version number (last three digits). Any changes that can result in different numerical values lead to a version increment in the KIM ID. This makes it possible to reproduce simulations since the specific version of a specific IM used can be retrieved using its KIM ID.
OpenKIM is a member organization of "DataCite"_https://datacite.org/ and issues digital object identifiers (DOIs) to all IMs archived in OpenKIM. This makes it possible to cite the IM code used in a simulation in a publications to give credit to the developers and further facilitate reproducibility. :ul
Convenience :h5
IMs in OpenKIM are distributed in binary form along with LAMMPS and can be used in a LAMMPS input script simply by providing their KIM ID in the {kim_init} command documented on this page.
The {kim_query} web query tool provides the ability to use the predictions of IMs for supported material properties (computed via "KIM Tests"_https://openkim.org/doc/evaluation/kim-tests/) as part of a LAMMPS input script setup and analysis.
Support is provided for unit conversion between the "unit style"_units.html used in the LAMMPS input script and the units required by the OpenKIM IM. This makes it possible to use a single input script with IMs using different units without change and minimizes the likelihood of errors due to incompatible units. :ul
:link(IM_types)
Types of IMs in OpenKIM :h4
There are two types of IMs archived in OpenKIM:
The first type is called a {KIM Portable Model} (PM). A KIM PM is an independent computer implementation of an IM written in one of the languages supported by KIM (C, C++, Fortran) that conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/) Portable Model Interface (PMI) standard. A KIM PM will work seamlessly with any simulation code that supports the KIM API/PMI standard (including LAMMPS; see "complete list of supported codes"_https://openkim.org/projects-using-kim/).
The second type is called a {KIM Simulator Model} (SM). A KIM SM is an IM that is implemented natively within a simulation code ({simulator}) that supports the KIM API Simulator Model Interface (SMI); in this case LAMMPS. A separate SM package is archived in OpenKIM for each parameterization of the IM, which includes all of the necessary parameter files, LAMMPS commands, and metadata (supported species, units, etc.) needed to run the IM in LAMMPS. :ol
With these two IM types, OpenKIM can archive and test almost all IMs that
can be used by LAMMPS. (It is easy to contribute new IMs to OpenKIM, see
the "upload instructions"_https://openkim.org/doc/repository/adding-content/.)
OpenKIM IMs are uniquely identified by a
"KIM ID"_https://openkim.org/doc/schema/kim-ids/.
The extended KIM ID consists of
a human-readable prefix identifying the type of IM, authors, publication year,
and supported species, separated by two underscores from the KIM ID itself,
which begins with an IM code
({MO} for a KIM Portable Model, and {SM} for a KIM Simulator Model)
followed by a unique 12-digit code and a 3-digit version identifier.
By convention SM prefixes begin with {Sim_} to readily identify them.
SW_StillingerWeber_1985_Si__MO_405512056662_005
Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 :pre
Each OpenKIM IM has a dedicated "Model Page" on "OpenKIM"_https://openkim.org
providing all the information on the IM including a title, description,
authorship and citation information, test and verification check results,
visualizations of results, a wiki with documentation and user comments, and
access to raw files, and other information.
The URL for the Model Page is constructed from the
"extended KIM ID"_https://openkim.org/doc/schema/kim-ids/ of the IM:
https://openkim.org/id/extended_KIM_ID
:pre
For example for the Stillinger-Weber potential
listed above the Model Page is located at:
"https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005"_https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005
:pre
See the "current list of KIM PMs and SMs archived in OpenKIM"_https://openkim.org/browse/models/by-species.
This list is sorted by species and can be filtered to display only
IMs for certain species combinations.
See "Obtaining KIM Models"_http://openkim.org/doc/usage/obtaining-models to
learn how to install a pre-build binary of the OpenKIM Repository of Models.
NOTE: It is also possible to locally install IMs not archived in OpenKIM,
in which case their names do not have to conform to the KIM ID format.
Using OpenKIM IMs with LAMMPS :h4
Two commands are employed when using OpenKIM IMs, one to select the
IM and perform necessary initialization ({kim_init}), and the second
to set up the IM for use by executing any necessary LAMMPS commands
({kim_interactions}). Both are required.
See the {examples/kim} directory for example input scripts that use KIM PMs
and KIM SMs.
OpenKIM IM Initialization ({kim_init}) :h5
The {kim_init} mode command must be issued [before]
the simulation box is created (normally at the top of the file).
This command sets the OpenKIM IM that will be used and may issue
additional commands changing LAMMPS default settings that are required
for using the selected IM (such as "units"_units.html or
"atom_style"_atom_style.html). If needed, those settings can be overridden,
however, typically a script containing a {kim_init} command
would not include {units} and {atom_style} commands.
The required arguments of {kim_init} are the {model} name of the
IM to be used in the simulation (for an IM archived in OpenKIM this is
its "extended KIM ID"_https://openkim.org/doc/schema/kim-ids/, and
the {user_units}, which are the LAMMPS "units style"_units.html used
in the input script. (Any dimensioned numerical values in the input
script and values read in from files are expected to be in the
{user_units} system.)
The selected IM can be either a "KIM PM or a KIM SM"_#IM_types.
For a KIM SM, the {kim_init} command verifies that the SM is designed
to work with LAMMPS (and not another simulation code).
In addition, the LAMMPS version used for defining
the SM and the LAMMPS version being currently run are
printed to help diagnose any incompatible changes to input script or
command syntax between the two LAMMPS versions.
Based on the selected model {kim_init} may modify the
"atom_style"_atom_style.html.
Some SMs have requirements for this setting. If this is the case, then
{atom_style} will be set to the required style. Otherwise, the value is left
unchanged (which in the absence of an {atom_style} command in the input script
is the "default atom_style value"_atom_style.html).
Regarding units, the {kim_init} command behaves in different ways depending
on whether or not {unit conversion mode} is activated as indicated by the
optional {unitarg} argument.
If unit conversion mode is [not] active, then {user_units} must
either match the required units of the IM or the IM must be able
to adjust its units to match. (The latter is only possible with some KIM PMs;
SMs can never adjust their units.) If a match is possible, the LAMMPS
"units"_units.html command is called to set the units to
{user_units}. If the match fails, the simulation is terminated with
an error.
Here is an example of a LAMMPS script to compute the cohesive energy
of a face-centered cubic (fcc) lattice for the Ercolessi and Adams (1994)
potential for Al:
kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
boundary p p p
lattice fcc 4.032
region simbox block 0 1 0 1 0 1 units lattice
create_box 1 simbox
create_atoms 1 box
mass 1 26.981539
kim_interactions Al
run 0
variable Ec equal (pe/count(all))/$\{_u_energy\}
print "Cohesive Energy = $\{EcJ\} eV"
:pre
The above script will end with an error in the {kim_init} line if the
IM is changed to another potential for Al that does not work with {metal}
units. To address this {kim_init} offers the {unit_conversion_mode}.
If unit conversion mode {is} active, then {kim_init} calls the LAMMPS
"units"_units.html command to set the units to the IM's required or
preferred units. Conversion factors between the IM's units and the {user_units}
are defined for all "physical quantities"_units.html (mass, distance, etc.).
(Note that converting to or from the "lj" unit style is not supported.)
These factors are stored as "internal style variables"_variable.html with
the following standard names:
_u_mass
_u_distance
_u_time
_u_energy
_u_velocity
_u_force
_u_torque
_u_temperature
_u_pressure
_u_viscosity
_u_charge
_u_dipole
_u_efield
_u_density :pre
If desired, the input script can be designed to work with these conversion
factors so that the script will work without change with any OpenKIM IM.
(This approach is used in the
"OpenKIM Testing Framework"_https://openkim.org/doc/evaluation/kim-tests/.)
For example, the script given above for the cohesive energy of fcc Al
can be rewritten to work with any IM regardless of units. The following
script constructs an fcc lattice with a lattice parameter defined in
meters, computes the total energy, and prints the cohesive energy in
Joules regardless of the units of the IM.
kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 si unit_conversion_mode
boundary p p p
lattice fcc 4.032e-10*$\{_u_distance\}
region simbox block 0 1 0 1 0 1 units lattice
create_box 1 simbox
create_atoms 1 box
mass 1 4.480134e-26*$\{_u_mass\}
kim_interactions Al
run 0
variable Ec_in_J equal (pe/count(all))/$\{_u_energy\}
print "Cohesive Energy = $\{Ec_in_J\} J" :pre
Note the multiplication by $\{_u_distance\} and $\{_u_mass\} to convert
from SI units (specified in the {kim_init} command) to whatever units the
IM uses (metal in this case), and the division by $\{_u_energy\}
to convert from the IM's energy units to SI units (Joule). This script
will work correctly for any IM for Al (KIM PM or SM) selected by the
{kim_init} command.
Care must be taken to apply unit conversion to dimensional variables read in
from a file. For example if a configuration of atoms is read in from a
dump file using the "read_dump"_read_dump.html command, the following can
be done to convert the box and all atomic positions to the correct units:
variable xyfinal equal xy*$\{_u_distance\}
variable xzfinal equal xz*$\{_u_distance\}
variable yzfinal equal yz*$\{_u_distance\}
change_box all x scale $\{_u_distance\} &
y scale $\{_u_distance\} &
z scale $\{_u_distance\} &
xy final $\{xyfinal\} &
xz final $\{xzfinal\} &
yz final $\{yzfinal\} &
remap :pre
NOTE: Unit conversion will only work if the conversion factors are placed in
all appropriate places in the input script. It is up to the user to do this
correctly.
OpenKIM IM Execution ({kim_interactions}) :h5
The second and final step in using an OpenKIM IM is to execute the
{kim_interactions} command. This command must be preceded by a {kim_init}
command and a command that defines the number of atom types {N} (such as
"create_box"_create_box.html).
The {kim_interactions} command has one argument {typeargs}. This argument
contains either a list of {N} chemical species, which defines a mapping between
atom types in LAMMPS to the available species in the OpenKIM IM, or the
keyword {fixed_types} for models that have a preset fixed mapping (i.e.
the mapping between LAMMPS atom types and chemical species is defined by
the model and cannot be changed). In the latter case, the user must consult
the model documentation to see how many atom types there are and how they
map to the chemical species.
For example, consider an OpenKIM IM that supports Si and C species.
If the LAMMPS simulation has four atom types, where the first three are Si,
and the fourth is C, the following {kim_interactions} command would be used:
kim_interactions Si Si Si C
:pre
Alternatively, for a model with a fixed mapping the command would be:
kim_interactions fixed_types
:pre
The {kim_interactions} command performs all the necessary steps to set up
the OpenKIM IM selected in the {kim_init} command. The specific actions depend
on whether the IM is a KIM PM or a KIM SM. For a KIM PM,
a "pair_style kim"_pair_kim.html command is executed followed by
the appropriate {pair_coeff} command. For example, for the
Ercolessi and Adams (1994) KIM PM for Al set by the following commands:
kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
...
... box specification lines skipped
...
kim_interactions Al :pre
the {kim_interactions} command executes the following LAMMPS input commands:
pair_style kim EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005
pair_coeff * * Al :pre
For a KIM SM, the generated input commands may be more complex
and require that LAMMPS is built with the required packages included
for the type of potential being used. The set of commands to be executed
is defined in the SM specification file, which is part of the SM package.
For example, for the Strachan et al. (2003) ReaxFF SM
set by the following commands:
kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real
...
... box specification lines skipped
...
kim_interactions C H N O :pre
the {kim_interactions} command executes the following LAMMPS input commands:
pair_style reax/c lmp_control safezone 2.0 mincap 100
pair_coeff * * ffield.reax.rdx C H N O
fix reaxqeq all qeq/reax 1 0.0 10.0 1.0e-6 param.qeq :pre
Note that the files {lmp_control}, {ffield.reax.rdx} and {param.qeq}
are specific to the Strachan et al. (2003) ReaxFF parameterization
and are archived as part of the SM package in OpenKIM.
Note also that parameters like cutoff radii and charge tolerances,
which have an effect on IM predictions, are also included in the
SM definition ensuring reproducibility.
NOTE: When using {kim_init} and {kim_interactions} to select
and set up an OpenKIM IM, other LAMMPS commands
for the same functions (such as pair_style, pair_coeff, bond_style,
bond_coeff, fixes related to charge equilibration, etc.) should normally
not appear in the input script.
Using OpenKIM Web Queries in LAMMPS ({kim_query}) :h5
The {kim_query} command performs a web query to retrieve the predictions
of the IM set by {kim_init} for material properties archived in
"OpenKIM"_https://openkim.org. The {kim_query} command must be preceded
by a {kim_init} command. The result of the query is stored in a
"string style variable"_variable.html, the name of which is given as the first
argument of the {kim_query command}. (For the case of multiple
return values, the optional {split} keyword can be used after the
variable name to separate the results into multiple variables; see
the "example"_#split_example below.)
The second required argument {query_function} is the name of the
query function to be called (e.g. {get_lattice_constant_cubic}).
All following "arguments"_Commands_parse.html are parameters handed over to
the web query in the format {keyword=value}, where {value} is always
an array of one or more comma-separated items in brackets.
The list of supported keywords and the type and format of their values
depend on the query function used. The current list of query functions
is available on the OpenKIM webpage at
"https://openkim.org/doc/repository/kim-query"_https://openkim.org/doc/repository/kim-query.
NOTE: All query functions require the {model} keyword, which identifies
the IM whose predictions are being queried. This keyword is automatically
generated by {kim_query} based on the IM set in {kim_init} and must not
be specified as an argument to {kim_query}.
NOTE: Each {query_function} is associated with a default method (implemented
as a "KIM Test"_https://openkim.org/doc/evaluation/kim-tests/)
used to compute this property. In cases where there are multiple
methods in OpenKIM for computing a property, a {method} keyword can
be provided to select the method of choice. See the
"query documentation"_https://openkim.org/doc/repository/kim-query
to see which methods are available for a given {query function}.
{kim_query} Usage Examples and Further Clarifications: :h6
The data obtained by {kim_query} commands can be used as part of the setup
or analysis phases of LAMMPS simulations. Some examples are given below.
[Define an equilibrium fcc crystal]
kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
boundary p p p
kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\]
lattice fcc $\{a0\}
... :pre
The {kim_query} command retrieves from "OpenKIM"_https://openkim.org
the equilibrium lattice constant predicted by the Ercolessi and Adams (1994)
potential for the fcc structure and places it in
variable {a0}. This variable is then used on the next line to set up the
crystal. By using {kim_query}, the user is saved the trouble and possible
error of tracking this value down, or of having to perform an energy
minimization to find the equilibrium lattice constant.
Note that in {unit_conversion_mode} the results obtained from a
{kim_query} would need to be converted to the appropriate units system.
For example, in the above script, the lattice command would need to be
changed to: "lattice fcc $\{a0\}*$\{_u_distance\}".
:link(split_example)
[Define an equilibrium hcp crystal]
kim_init EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000 metal
boundary p p p
kim_query latconst split get_lattice_constant_hexagonal crystal=\["hcp"\] species=\["Zr"\] units=\["angstrom"\]
variable a0 equal latconst_1
variable c0 equal latconst_2
variable c_to_a equal $\{c0\}/$\{a0\}
lattice custom $\{a0\} a1 0.5 -0.866025 0 a2 0.5 0.866025 0 a3 0 0 $\{c_to_a\} &
basis 0.333333 0.666666 0.25 basis 0.666666 0.333333 0.75
... :pre
In this case the {kim_query} returns two arguments (since the hexagonal
close packed (hcp) structure has two independent lattice constants).
The default behavior of {kim_query} returns the result as a string
with the values separated by commas. The optional keyword {split}
separates the result values into individual variables of the form
{prefix_I}, where {prefix} is set to the the {kim_query} {variable} argument
and {I} ranges from 1 to the number of returned values. The number and order of
the returned values is determined by the type of query performed.
[Define a crystal at finite temperature accounting for thermal expansion]
kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
boundary p p p
kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\]
kim_query alpha get_linear_thermal_expansion_coefficient_cubic crystal=\["fcc"\] species=\["Al"\] units=\["1/K"\] temperature=\[293.15\] temperature_units=\["K"\]
variable DeltaT equal 300
lattice fcc $\{a0\}*$\{alpha\}*$\{DeltaT\}
... :pre
As in the previous example, the equilibrium lattice constant is obtained
for the Ercolessi and Adams (1994) potential. However, in this case the
crystal is scaled to the appropriate lattice constant at room temperature
(293.15 K) by using the linear thermal expansion constant predicted by the
potential.
NOTE: When passing numerical values as arguments (as in the case
of the temperature in the above example) it is also possible to pass a
tolerance indicating how close to the value is considered a match.
If no tolerance is passed a default value is used. If multiple results
are returned (indicating that the tolerance is too large), {kim_query}
will return an error. See the
"query documentation"_https://openkim.org/doc/repository/kim-query
to see which numerical arguments and tolerances are available for a
given {query function}.
[Compute defect formation energy]
kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal
...
... Build fcc crystal containing some defect and compute the total energy
... which is stored in the variable {Etot}
...
kim_query Ec get_cohesive_energy_cubic crystal=\["fcc"\] species=\["Al"\] units=\["eV"\]
variable Eform equal $\{Etot\} - count(all)*$\{Ec\}
... :pre
The defect formation energy {Eform} is computed by subtracting from {Etot} the
ideal fcc cohesive energy of the atoms in the system obtained from
"OpenKIM"_https://openkim.org for the Ercolessi and Adams (1994) potential.
NOTE: {kim_query} commands return results archived in
"OpenKIM"_https://openkim.org. These results are obtained
using programs for computing material properties
(KIM Tests and KIM Test Drivers) that were contributed to OpenKIM.
In order to give credit to Test developers, the number of times results
from these programs are queried is tracked. No other information about
the nature of the query or its source is recorded.
Citation of OpenKIM IMs :h4
When publishing results obtained using OpenKIM IMs researchers are requested
to cite the OpenKIM project "(Tadmor)"_#kim-mainpaper, KIM API
"(Elliott)"_#kim-api, and the specific IM codes used in the simulations,
in addition to the relevant scientific references for the IM.
The citation format for an IM is displayed on its page on
"OpenKIM"_https://openkim.org along with the corresponding BibTex file,
and is automatically added to the LAMMPS {log.cite} file.
Citing the IM software (KIM infrastructure and specific PM or SM codes)
used in the simulation gives credit to the researchers who developed them
and enables open source efforts like OpenKIM to function.
[Restrictions:]
The set of {kim_commands} is part of the KIM package. It is only enabled if
LAMMPS is built with that package. A requirement for the KIM package,
is the KIM API library that must be downloaded from the
"OpenKIM website"_https://openkim.org/kim-api/ and installed before
LAMMPS is compiled. When installing LAMMPS from binary, the kim-api package
is a dependency that is automatically downloaded and installed. See the KIM
section of the "Packages details"_Packages_details.html for details.
Furthermore, when using {kim_commands} to run KIM SMs, any packages required
by the native potential being used or other commands or fixes that it invokes
must be installed.
[Related commands:]
"pair_style kim"_pair_kim.html
:line
:link(kim-mainpaper)
[(Tadmor)] Tadmor, Elliott, Sethna, Miller and Becker, JOM, 63, 17 (2011).
doi: "https://doi.org/10.1007/s11837-011-0102-6"_https://doi.org/10.1007/s11837-011-0102-6
:link(kim-api)
[(Elliott)] Elliott, Tadmor and Bernstein, "https://openkim.org/kim-api"_https://openkim.org/kim-api (2011)
doi: "https://doi.org/10.25950/FF8F563A"_https://doi.org/10.25950/FF8F563A

View File

@ -1,46 +0,0 @@
"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
kim_query command :h3
[Syntax:]
kim_query variable query_function web_query_flags :pre
variable = name of a (string style) variable where the result of the query is stored
query_function = name of the OpenKIM web API query function to be used
web_query_flags = a series of keyword=value pairs that represent the web query; supported keywords depend on query function :ul
[Examples:]
kim_query latconst get_test_result test=TE_156715955670 model=MO_800509458712 &
prop=structure-cubic-crystal-npt species=\["Al"\] keys=\["a"\] units=\["angstrom"\] :pre
[Description:]
The kim_query command allows to retrieve properties from the OpenKIM
through a web query. The result is stored in a string style
"variable"_variable.html, the name of which must be given as the first
argument of the kim_query command. The second required argument is the
name of the actual query function (e.g. {get_test_result}). All following
arguments are parameters handed over to the web query in the format
{keyword=value}. The list of supported keywords and the type of how
the value has to be encoded depends on the query function used. This
mirrors the functionality available on the OpenKIM webpage at
"https://query.openkim.org"_https://query.openkim.org/
[Restrictions:]
This command is part of the KIM package. It is only enabled if
LAMMPS was built with that package. Furthermore, its correct
functioning depends on compiling LAMMPS with libcurl support.
See the "Build package"_Build_package.html doc page for more info.
[Related commands:]
"pair_style kim"_pair_kim.html, "variable"_variable.html

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