Compare commits

...

117 Commits

Author SHA1 Message Date
7ddcb6812b patch 17Aug17 2017-08-17 16:02:20 -06:00
76cd61350d Merge pull request #613 from akohlmey/collected-small-changes
Collected small changes and bug fixes
2017-08-17 11:34:52 -06:00
fa3c0c61d6 Merge pull request #618 from lammps/intel
USER-INTEL add-ons from Mike
2017-08-17 11:32:53 -06:00
c46d5ff422 Merge pull request #612 from giacomofiorin/colvars-update-2017-08-10
Minor fixes to Colvars module
2017-08-17 11:32:38 -06:00
dd67989c76 Merge pull request #601 from stanmoore1/kokkos_update
Update Kokkos library to v2.03.13
2017-08-17 11:32:18 -06:00
00aafef1a8 Merge pull request #597 from ndtrung81/three-body-short-nlist
Implementing short neighbor lists for three-body gpu styles
2017-08-17 11:31:59 -06:00
7175abcc71 flag more pair styles as supporting USER-INTEL to match newly added code 2017-08-16 13:58:46 -04:00
e34b20405c Fix a couple of typos in the docs 2017-08-15 21:10:05 -04:00
1d4d2155a2 USER-INTEL add-ons from Mike 2017-08-15 17:12:07 -06:00
cee87d7a54 update manual to point to packages.lammps.org instead of rpm.lammps.org 2017-08-15 16:19:09 -04:00
60e14f1490 add comment to msi2lmp README about symmetry limitations 2017-08-14 08:54:26 -04:00
81e7d4a942 fix incorrect preprocessor define for windows 2017-08-12 00:35:50 -04:00
0b3f1b8a15 patch 11Aug17 2017-08-11 12:19:02 -06:00
b209a4e246 Merge pull request #614 from akohlmey/fixes-for-stable
Fixes for stable
2017-08-11 08:35:20 -06:00
27553283c3 fix bug with pair_modify <style> compute not triggering the correct global change 2017-08-11 08:28:37 -04:00
df56b2d6a4 trigger relink after package library build through updating the time stamp on main.cpp 2017-08-11 08:16:20 -04:00
c6d923b6c8 make download function more resilient by also catching failed execution 2017-08-10 21:15:35 -04:00
6d24be8bb7 whitespace cleanup 2017-08-10 21:14:40 -04:00
52bec0f380 patch 10Aug17 2017-08-10 16:44:09 -06:00
8c16ea1bfc add automatic triggering of review requests with a code owners file 2017-08-10 15:58:51 -04:00
c8741f3a01 remove special_bonds extra keyword and refer to read_data and create_box instead 2017-08-10 15:12:56 -04:00
2a7d2dee36 add more strict checking of data when parsing molecule files to detect format errors 2017-08-10 14:49:51 -04:00
f68c6254d4 Merge pull request #611 from akohlmey/final-tweaks
More tweaks for stable release
2017-08-10 08:02:55 -06:00
da01be7c18 More robust change from initial to target restraint centers in Colvars 2017-08-10 09:22:53 -04:00
146aa4cdbd fall back to wget when curl is not available 2017-08-10 09:05:23 -04:00
2f3747eb6e we need to override compiler flags in lib/voronoi/Install.py
The default compiler flags in voro++'s config.mk file do not include
-fPIC, which makes it incompatible with building the shared object for
the python wrapper.
2017-08-10 08:34:46 -04:00
2bc6ad80d4 avoid writable string and deprecated implicit conversion warning 2017-08-10 07:45:21 -04:00
f9a515efd3 add some remarks about makefile settings on windows 2017-08-10 07:24:24 -04:00
5b55744209 fix a header line formatting issue 2017-08-10 07:21:39 -04:00
0dc3cbaa8a Revert "remove -DLAMMPS_MEMALIGN from "make mpi" and "make serial" for increased portability"
This reverts commit 4e97b57508.
2017-08-10 06:51:57 -04:00
ce62c41252 when recomputing special bonds, make certain we do not shrink atom->maxspecial and add force->special_extra only once 2017-08-10 06:47:26 -04:00
4e97b57508 remove -DLAMMPS_MEMALIGN from "make mpi" and "make serial" for increased portability 2017-08-10 05:46:42 -04:00
7f437d7690 Merge pull request #609 from akohlmey/doc-changes-for-stable
Final tweaks and doc changes for stable release
2017-08-09 17:37:35 -06:00
77a628e4ef make the deprecation warning nicer looking 2017-08-09 19:13:40 -04:00
f01103dd08 correctly use the term CUDA (instead of Cuda) when not referring to the KOKKOS device flag (which is Cuda) 2017-08-09 19:08:23 -04:00
81f4d7ecb5 rework section 4 (Packages) in the manual to match Install.py scripts 2017-08-09 19:07:20 -04:00
210a77c5a0 add a deprecation warning to pair style meam and make the reax one consistent with it 2017-08-09 16:36:51 -04:00
3e9b41c6b7 Added references to GPU package citations 2017-08-09 10:09:40 -05:00
6780c73907 restore mpic++ makefile to resolve regression test failure 2017-08-09 07:10:08 -04:00
be25a7d9a4 updated comment for fix neb by steve 2017-08-08 20:37:20 -04:00
691d1b730d Merge pull request #607 from akohlmey/final-changes-for-stable
Final build system changes for stable release
2017-08-08 17:26:22 -06:00
95ece8a6c0 consistently use $(PYTHON) in the master makefile (which defaults to "python") 2017-08-08 17:03:52 -04:00
b7b1257b01 remove attempts to use urllib and use curl for all downloading. restore printing help with no flags. 2017-08-08 17:00:09 -04:00
30431d4edb rework Install.py for gpu library. make it consistent with other lib folders and support python3 2017-08-08 16:57:27 -04:00
8a7a831bd6 Remove redundant check in Makefile.kokkos 2017-08-08 12:57:22 -06:00
c53a84a967 update README file for lib/mscg 2017-08-08 13:55:12 -04:00
b7b62f6893 do not pollute global namespace by including mscg header in fix header 2017-08-08 13:20:25 -04:00
d2b0c287d2 add local makefile overrides to be compatible with standard suffixes 2017-08-08 13:19:44 -04:00
b3244f9c98 more lib compilation updates 2017-08-08 07:20:33 -04:00
8bba29d91e more lib installation cleanup 2017-08-07 17:21:45 -04:00
135b1650f1 revamp of library builds
- remove cross compiler stuff
- make use of Install.py consistent
- provide options for Makefile.serial and Makefile.mpi that match those in src
2017-08-07 17:13:01 -04:00
0a54c34e34 Merge pull request #600 from akohlmey/install-and-docs-reviewed
Installation scripts and docs reviewed for release
2017-08-07 08:02:04 -06:00
a8f6a95cba Merge pull request #605 from rbberger/bash_on_windows
Adds tutorial for using LAMMPS in Bash on Windows
2017-08-07 08:00:56 -06:00
e0f9a7c34c Adds BOW tutorial link in main menu 2017-08-07 00:06:53 -04:00
aaf17bde3f Added tutorial for using LAMMPS in Bash on Windows 2017-08-07 00:06:12 -04:00
5ad8a3332d Merge pull request #55 from GarrettTow/patch-1
Fixed typo in "compute_voronoi_atom.txt"
2017-08-04 19:18:57 -04:00
ca7a3a6316 Fixed typo in "compute_voronoi_atom.txt"
There was the typo "requiers" in the Restrictions section of compute_voronoi_atom.txt.
2017-08-04 17:48:27 -04:00
163ed27618 update .gitignore 2017-08-04 16:10:59 -04:00
23ca0099f7 more updates to kim/Install.py to restore missing functionality and align with other scripts
- build into local directory to replace existing installation is now default
- add wrapper function that calls curl in case python package has not ssl support
- have to specify -n flag to avoid wiping out the existing installation
- can specify -p to point to an existing kim-api installation (implies -n)
2017-08-04 14:47:32 -04:00
59ac6ef573 correct a link and a name for OpenKIM 2017-08-04 11:19:09 -04:00
2fa16bcd4c make overlapping links to references unique to avoid anchor label errors 2017-08-04 11:11:41 -04:00
e84b6d8067 Merge pull request #602 from rbberger/pylammps_fixes
PyLammps corrections
2017-08-04 08:35:00 -06:00
96d3712817 Add missing link flag 2017-07-31 15:52:44 -06:00
b395ef00b4 Update tutorial_pylammps.txt 2017-07-31 15:50:14 -06:00
d3169eeab3 Remove Make.py reference in PyLammps examples
Also fixes some regressions due to command syntax changes
2017-07-31 13:56:20 -06:00
71553cf732 Fix PyLammps regression after output.cpp change 2017-07-31 13:53:41 -06:00
8431ca5fec Remove tpls directory 2017-07-31 10:54:07 -06:00
13f2d39f55 Update Kokkos library to v2.03.13 2017-07-31 10:34:21 -06:00
9bfd9267fa update and automate the QUIP configuration so that no environment variables are needed 2017-07-28 16:11:13 -04:00
7d0d701eaf add reference outputs for QUIP/GAP example 2017-07-28 16:05:16 -04:00
841a92c7fa remove unused variable 2017-07-28 16:03:24 -04:00
85120842dd update QUIP examples to closer match typical LAMMPS examples 2017-07-28 15:20:33 -04:00
3ebf561e0d remove tarball after unpacking 2017-07-28 14:25:47 -04:00
ffb778cf9b make Install.py for lib/smd and lib/voronoi consistent 2017-07-28 14:03:29 -04:00
f3850da9fe clean up makefiles provide "serial" and "mpi" targets for atc and awpmd 2017-07-28 13:36:06 -04:00
e7d9aabca6 Merge branch 'kim-install' into install-and-docs-reviewed 2017-07-28 11:25:08 -04:00
e3973796ba fix bug in power operator in LAMMPS variable expressions 2017-07-27 15:51:45 -04:00
c494ec35e2 correct symbolic links to shared Install.py file 2017-07-27 12:48:32 -04:00
6d0a228624 Merge pull request #599 from lammps/kim-doc
restore lost KIM doc section in Section packages
2017-07-27 10:34:44 -06:00
acf6d54ec1 python3 port, yet untested 2017-07-27 09:25:39 -04:00
0427f6205e fix typo 2017-07-27 09:25:02 -04:00
72419b6313 Merge remote-tracking branch 'github/kim-doc' into install-and-docs-reviewed 2017-07-26 19:35:15 -04:00
da7a5f55d3 Merge branch 'kim-install' into install-and-docs-reviewed 2017-07-26 19:32:55 -04:00
934cbbbeca restore lost KIM doc section in Section packages 2017-07-26 16:07:08 -06:00
2806f070a4 Merge pull request #598 from akohlmey/last-minute-changes
last minute changes for stable release
2017-07-26 15:46:51 -06:00
715c797df0 simplify Install.py for voronoi 2017-07-26 15:14:12 -04:00
fd6e11f821 convert copies of Install.py files to symlinks 2017-07-26 14:29:52 -04:00
f7a243a4d9 convert explicit copies back into symbolic links 2017-07-26 14:20:03 -04:00
f0d286358e must not include system headers within 'extern "C"' blocks. breaks with MPICH 2017-07-26 14:02:02 -04:00
51a06334ad avoid invalid calls to memcpy(): when ndot == 0, pointers may be NULL 2017-07-26 12:08:42 -04:00
aa5ea95a0f avoid integer overflow and remove unused function argument causing it 2017-07-26 11:55:50 -04:00
60c67b07dc import updated fix msst file with some additional cleanup and simplification 2017-07-26 10:45:11 -04:00
aa60ef6ed8 Cleaned up 3-body kernels, reverted some mistaken changes to vashishta 2017-07-23 00:08:55 -05:00
a71f5a0c20 Enabled again neigh no with tpa > 1 for 3-body gpu styles for backward compatibility, could be slower than neigh no tpa 1 in many cases 2017-07-22 22:57:37 -05:00
3d1d0c58c7 Cleaned up 3-body gpu styles, and fixed a bug for tersoff/zbl/gpu.
There is a unresolved bug for neigh no with tpa > 1 with BaseThree, enforce tpa = 1 for neigh no in BaseThree for now.
2017-07-21 12:08:04 -05:00
3449d42267 include pair style kim doc changes that were accidentally included in PR #590 2017-07-20 17:58:49 -04:00
d2f76ae394 Merge pull request #586 from ellio167/kim-install
Refactor lib/kim/Install.py; works with python 3 and 2.7
2017-07-20 14:40:57 -04:00
84065dde21 Refactor lib/kim/Install.py; works with phtyon 3 2.7 2017-07-20 12:02:50 -05:00
355aad9691 restore python3 support. this now can run with python 2.7.13 and 3.5.3. 2017-07-19 17:19:44 -04:00
ec42a60587 Merge pull request #584 from ellio167/kim-install
Update lib/kim/Install.py for phthon 2.7 conversion
2017-07-19 16:21:04 -04:00
f181a0bfab Update lib/kim/Install.py for phthon 2.7 conversion 2017-07-19 12:54:33 -05:00
81f342aafa fix variable name bug and synchronize with other ported Install.py files 2017-07-18 18:06:18 -04:00
7ccb0d37cd port USER-SMD folder. make voronoi consistent with it 2017-07-18 17:37:48 -04:00
03cd4c5255 ported lib/voronoi/Install.py to python 3.x and tested with 2.7 2017-07-18 17:16:10 -04:00
5cbaf7ca1d correct commands table format issue 2017-07-18 14:47:54 -04:00
49b4cf9a77 remove references to Make.py and USER-CUDA 2017-07-18 13:24:32 -04:00
49e6c2eb7d remove references to Make.py from the manual and instead refer to section 4 2017-07-18 13:14:03 -04:00
a92d792537 update manual links that got broken when removing and renumbering a section 2017-07-18 12:55:55 -04:00
d7355801df Make KIM Install.py Python 3 compatible 2017-07-15 12:03:04 -05:00
296e572e69 better Install.py script for KIM from Ryan Elliott 2017-07-14 16:25:16 -06:00
cdac5f496c Built 3-body short neighbor list for the 3-body kernels using per-pair cutoffs for vashishta gpu style 2017-07-11 00:13:56 -05:00
8c9db3ea00 Built 2-body short neighbor list and used for 2-body kernels in tersoff gpu styles 2017-07-10 23:50:21 -05:00
ea2b01e83b Refactored 3-body gpu styles to remove code duplication 2017-07-08 20:17:31 -05:00
34fe2273f6 Added short neighbor list implementation for tersoff/zbl/gpu and tersoff/mod/gpu 2017-07-08 14:59:48 -05:00
77c60189b8 Minor cleanups for tersoff/gpu 2017-07-08 14:43:53 -05:00
1c6533e53d Working on short neighbor list for tersoff/gpu 2017-07-08 14:15:26 -05:00
68206079da Supported short neighbor lists for 3-body kernels in sw/gpu and vashishta/gpu 2017-07-07 16:47:24 -05:00
405 changed files with 28555 additions and 7529 deletions

21
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,21 @@
# This file contains file patterns that triggers automatic
# code review requests from users that are owners of these files
# Order matters, the last match has the highest precedence
# library folders
lib/colvars/* @giacomofiorin
lib/compress/* @akohlmey
lib/kokkos/* @stanmoore1
lib/molfile/* @akohlmey
lib/qmmm/* @akohlmey
lib/vtk/* @rbberger
# packages
src/KOKKOS @stanmoore1
src/USER-CGSDK @akohlmey
src/USER-COLVARS @giacomofiorin
src/USER-OMP @akohlmey
src/USER-QMMM @akohlmey
# tools
tools/msi2lmp/* @akohlmey

BIN
doc/src/JPG/bow_tutorial_01.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
doc/src/JPG/bow_tutorial_02.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
doc/src/JPG/bow_tutorial_03.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
doc/src/JPG/bow_tutorial_04.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
doc/src/JPG/bow_tutorial_05.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
doc/src/JPG/bow_tutorial_06.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
doc/src/JPG/bow_tutorial_07.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
doc/src/JPG/bow_tutorial_08.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
doc/src/JPG/bow_tutorial_09.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
doc/src/JPG/bow_tutorial_10.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 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="24 Jul 2017 version">
<META NAME="docnumber" CONTENT="17 Aug 2017 version">
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
</HEAD>
@ -21,7 +21,7 @@
<H1></H1>
LAMMPS Documentation :c,h3
24 Jul 2017 version :c,h4
17 Aug 2017 version :c,h4
Version info: :h4
@ -79,7 +79,7 @@ bug reports and feature requests are mainly coordinated through the
"LAMMPS project on GitHub."_https://github.com/lammps/lammps
The lammps.org domain, currently hosting "public continuous integration
testing"_https://ci.lammps.org/job/lammps/ and "precompiled Linux
RPM and Windows installer packages"_http://rpm.lammps.org is located
RPM and Windows installer packages"_http://packages.lammps.org is located
at Temple University and managed by Richard Berger,
richard.berger at temple.edu.

View File

@ -233,8 +233,8 @@ set any needed options for the package via "-pk" "command-line switch"_Section_s
use accelerated styles in your input via "-sf" "command-line switch"_Section_start.html#start_6 or "suffix"_suffix.html command | lmp_machine -in in.script -sf gpu
:tb(c=2,s=|)
Note that the first 4 steps can be done as a single command, using the
src/Make.py tool. This tool is discussed in "Section
Note that the first 4 steps can be done as a single command with
suitable make command invocations. This is discussed in "Section
4"_Section_packages.html of the manual, and its use is
illustrated in the individual accelerator sections. Typically these
steps only need to be done once, to create an executable that uses one

View File

@ -734,8 +734,8 @@ package"_Section_start.html#start_3.
"smd/wall/surface"_fix_smd_wall_surface.html,
"temp/rescale/eff"_fix_temp_rescale_eff.html,
"ti/spring"_fix_ti_spring.html,
"ttm/mod"_fix_ttm.html
"wall/ees"_fix_wall_ees.html
"ttm/mod"_fix_ttm.html,
"wall/ees"_fix_wall_ees.html,
"wall/region/ees"_fix_wall_ees.html :tb(c=6,ea=c)
:line
@ -892,8 +892,8 @@ KOKKOS, o = USER-OMP, t = OPT.
"hybrid"_pair_hybrid.html,
"hybrid/overlay"_pair_hybrid.html,
"adp (o)"_pair_adp.html,
"airebo (o)"_pair_airebo.html,
"airebo/morse (o)"_pair_airebo.html,
"airebo (oi)"_pair_airebo.html,
"airebo/morse (oi)"_pair_airebo.html,
"beck (go)"_pair_beck.html,
"body"_pair_body.html,
"bop"_pair_bop.html,
@ -927,8 +927,8 @@ KOKKOS, o = USER-OMP, t = OPT.
"dpd/tstat (go)"_pair_dpd.html,
"dsmc"_pair_dsmc.html,
"eam (gkiot)"_pair_eam.html,
"eam/alloy (gkot)"_pair_eam.html,
"eam/fs (gkot)"_pair_eam.html,
"eam/alloy (gkiot)"_pair_eam.html,
"eam/fs (gkiot)"_pair_eam.html,
"eim (o)"_pair_eim.html,
"gauss (go)"_pair_gauss.html,
"gayberne (gio)"_pair_gayberne.html,
@ -942,9 +942,9 @@ KOKKOS, o = USER-OMP, t = OPT.
"kim"_pair_kim.html,
"lcbop"_pair_lcbop.html,
"line/lj"_pair_line_lj.html,
"lj/charmm/coul/charmm (ko)"_pair_charmm.html,
"lj/charmm/coul/charmm (kio)"_pair_charmm.html,
"lj/charmm/coul/charmm/implicit (ko)"_pair_charmm.html,
"lj/charmm/coul/long (giko)"_pair_charmm.html,
"lj/charmm/coul/long (gkio)"_pair_charmm.html,
"lj/charmm/coul/msm"_pair_charmm.html,
"lj/charmmfsw/coul/charmmfsh"_pair_charmm.html,
"lj/charmmfsw/coul/long"_pair_charmm.html,
@ -990,7 +990,7 @@ KOKKOS, o = USER-OMP, t = OPT.
"polymorphic"_pair_polymorphic.html,
"python"_pair_python.html,
"reax"_pair_reax.html,
"rebo (o)"_pair_airebo.html,
"rebo (oi)"_pair_airebo.html,
"resquared (go)"_pair_resquared.html,
"snap"_pair_snap.html,
"soft (go)"_pair_soft.html,

View File

@ -7886,8 +7886,8 @@ keyword to allow for additional bonds to be formed :dd
{New bond exceeded special list size in fix bond/create} :dt
See the "special_bonds extra" command
(or the "read_data extra/special/per/atom" command)
See the "read_data extra/special/per/atom" command
(or the "create_box 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
@ -9666,8 +9666,8 @@ you are running. :dd
{Special list size exceeded in fix bond/create} :dt
See the special_bonds extra command
(or the read_data extra/special/per/atom command)
See the "read_data extra/special/per/atom" command
(or the "create_box 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

View File

@ -49,6 +49,7 @@ Lists of both kinds of directories are given below.
Lowercase directories :h4
accelerate: run with various acceleration options (OpenMP, GPU, Phi)
airebo: polyethylene with AIREBO potential
balance: dynamic load balancing, 2d system
body: body particles, 2d system
cmap: CMAP 5-body contributions to CHARMM force field

View File

@ -25,6 +25,17 @@ There are two kinds of packages in LAMMPS, standard and user packages:
"Table of standard packages"_#table_standard
"Table of user packages"_#table_user :ul
Either of these kinds of packages may work as is, may require some
additional code compiled located in the lib folder, or may require
an external library to be downloaded, compiled, installed, and LAMMPS
configured to know about its location and additional compiler flags.
You can often do the build of the internal or external libraries
in one step by typing "make lib-name args='...'" from the src dir,
with appropriate arguments included in args='...'. If you just type
"make lib-name" you should see a help message about supported flags
and some examples. For more details about this, please study the
tables below and the sections about the individual packages.
Standard packages are supported by the LAMMPS developers and are
written in a syntax and style consistent with the rest of LAMMPS.
This means the developers will answer questions about them, debug and
@ -34,7 +45,9 @@ LAMMPS.
User packages have been contributed by users, and begin with the
"user" prefix. If they are a single command (single file), they are
typically in the user-misc package. User packages don't necessarily
meet the requirements of the standard packages. If you have problems
meet the requirements of the standard packages. This means the
developers will try to keep things working and usually can answer
technical questions about compiling the package. If you have problems
using a feature provided in a user package, you may need to contact
the contributor directly to get help. Information on how to submit
additions you make to LAMMPS as single files or as a standard or user
@ -78,10 +91,10 @@ Package, Description, Doc page, Example, Library
"COMPRESS"_#COMPRESS, I/O compression, "dump */gz"_dump.html, -, sys
"CORESHELL"_#CORESHELL, adiabatic core/shell model, "Section 6.6.25"_Section_howto.html#howto_25, coreshell, -
"DIPOLE"_#DIPOLE, point dipole particles, "pair_style dipole/cut"_pair_dipole.html, dipole, -
"GPU"_#GPU, GPU-enabled styles, "Section 5.3.1"_accelerate_gpu.html, WWW bench, int
"GPU"_#GPU, GPU-enabled styles, "Section 5.3.1"_accelerate_gpu.html, "Benchmarks"_http://lammps.sandia.gov/bench.html, int
"GRANULAR"_#GRANULAR, granular systems, "Section 6.6.6"_Section_howto.html#howto_6, pour, -
"KIM"_#KIM, openKIM wrapper, "pair_style kim"_pair_kim.html, kim, ext
"KOKKOS"_#KOKKOS, Kokkos-enabled styles, "Section 5.3.3"_accelerate_kokkos.html, WWW bench, -
"KIM"_#KIM, OpenKIM wrapper, "pair_style kim"_pair_kim.html, kim, ext
"KOKKOS"_#KOKKOS, Kokkos-enabled styles, "Section 5.3.3"_accelerate_kokkos.html, "Benchmarks"_http://lammps.sandia.gov/bench.html, -
"KSPACE"_#KSPACE, long-range Coulombic solvers, "kspace_style"_kspace_style.html, peptide, -
"MANYBODY"_#MANYBODY, many-body potentials, "pair_style tersoff"_pair_tersoff.html, shear, -
"MC"_#MC, Monte Carlo options, "fix gcmc"_fix_gcmc.html, -, -
@ -90,7 +103,7 @@ Package, Description, Doc page, Example, Library
"MOLECULE"_#MOLECULE, molecular system force fields, "Section 6.6.3"_Section_howto.html#howto_3, peptide, -
"MPIIO"_#MPIIO, MPI parallel I/O dump and restart, "dump"_dump.html, -, -
"MSCG"_#MSCG, multi-scale coarse-graining wrapper, "fix mscg"_fix_mscg.html, mscg, ext
"OPT"_#OPT, optimized pair styles, "Section 5.3.5"_accelerate_opt.html, WWW bench, -
"OPT"_#OPT, optimized pair styles, "Section 5.3.5"_accelerate_opt.html, "Benchmarks"_http://lammps.sandia.gov/bench.html, -
"PERI"_#PERI, Peridynamics models, "pair_style peri"_pair_peri.html, peri, -
"POEMS"_#POEMS, coupled rigid body motion, "fix poems"_fix_poems.html, rigid, int
"PYTHON"_#PYTHON, embed Python code in an input script, "python"_python.html, python, sys
@ -101,8 +114,7 @@ Package, Description, Doc page, Example, Library
"SHOCK"_#SHOCK, shock loading methods, "fix msst"_fix_msst.html, -, -
"SNAP"_#SNAP, quantum-fitted potential, "pair snap"_pair_snap.html, snap, -
"SRD"_#SRD, stochastic rotation dynamics, "fix srd"_fix_srd.html, srd, -
"VORONOI"_#VORONOI, Voronoi tesselation, "compute voronoi/atom"_compute_voronoi_atom.html, -, ext
:tb(ea=c,ca1=l)
"VORONOI"_#VORONOI, Voronoi tesselation, "compute voronoi/atom"_compute_voronoi_atom.html, -, ext :tb(ea=c,ca1=l)
[USER packages] :link(table_user),p
@ -118,7 +130,7 @@ Package, Description, Doc page, Example, Library
"USER-EFF"_#USER-EFF, electron force field,"pair_style eff/cut"_pair_eff.html, USER/eff, -
"USER-FEP"_#USER-FEP, free energy perturbation,"compute fep"_compute_fep.html, USER/fep, -
"USER-H5MD"_#USER-H5MD, dump output via HDF5,"dump h5md"_dump_h5md.html, -, ext
"USER-INTEL"_#USER-INTEL, optimized Intel CPU and KNL styles,"Section 5.3.2"_accelerate_intel.html, WWW bench, -
"USER-INTEL"_#USER-INTEL, optimized Intel CPU and KNL styles,"Section 5.3.2"_accelerate_intel.html, "Benchmarks"_http://lammps.sandia.gov/bench.html, -
"USER-LB"_#USER-LB, Lattice Boltzmann fluid,"fix lb/fluid"_fix_lb_fluid.html, USER/lb, -
"USER-MANIFOLD"_#USER-MANIFOLD, motion on 2d surfaces,"fix manifoldforce"_fix_manifoldforce.html, USER/manifold, -
"USER-MEAMC"_#USER-MEAMC, modified EAM potential (C++), "pair_style meam/c"_pair_meam.html, meam, -
@ -126,7 +138,7 @@ Package, Description, Doc page, Example, Library
"USER-MISC"_#USER-MISC, single-file contributions, USER-MISC/README, USER/misc, -
"USER-MOLFILE"_#USER-MOLFILE, "VMD"_vmd_home molfile plug-ins,"dump molfile"_dump_molfile.html, -, ext
"USER-NETCDF"_#USER-NETCDF, dump output via NetCDF,"dump netcdf"_dump_netcdf.html, -, ext
"USER-OMP"_#USER-OMP, OpenMP-enabled styles,"Section 5.3.4"_accelerate_omp.html, WWW bench, -
"USER-OMP"_#USER-OMP, OpenMP-enabled styles,"Section 5.3.4"_accelerate_omp.html, "Benchmarks"_http://lammps.sandia.gov/bench.html, -
"USER-PHONON"_#USER-PHONON, phonon dynamical matrix,"fix phonon"_fix_phonon.html, USER/phonon, -
"USER-QMMM"_#USER-QMMM, QM/MM coupling,"fix qmmm"_fix_qmmm.html, USER/qmmm, ext
"USER-QTB"_#USER-QTB, quantum nuclear effects,"fix qtb"_fix_qtb.html "fix qbmsst"_fix_qbmsst.html, qtb, -
@ -136,8 +148,7 @@ Package, Description, Doc page, Example, Library
"USER-SMTBQ"_#USER-SMTBQ, second moment tight binding QEq potential,"pair_style smtbq"_pair_smtbq.html, USER/smtbq, -
"USER-SPH"_#USER-SPH, smoothed particle hydrodynamics,"SPH User Guide"_PDF/SPH_LAMMPS_userguide.pdf, USER/sph, -
"USER-TALLY"_#USER-TALLY, pairwise tally computes,"compute XXX/tally"_compute_tally.html, USER/tally, -
"USER-VTK"_#USER-VTK, dump output via VTK, "compute vtk"_dump_vtk.html, -, ext
:tb(ea=c,ca1=l)
"USER-VTK"_#USER-VTK, dump output via VTK, "compute vtk"_dump_vtk.html, -, ext :tb(ea=c,ca1=l)
:line
:line
@ -364,9 +375,12 @@ GPU package :link(GPU),h4
[Contents:]
Dozens of pair styles and a version of the PPPM long-range Coulombic
solver optimized for NVIDIA GPUs. All such styles have a "gpu" as a
suffix in their style name. "Section 5.3.1"_accelerate_gpu.html gives
details of what hardware and Cuda software is required on your system,
solver optimized for GPUs. All such styles have a "gpu" as a
suffix in their style name. The GPU code can be compiled with either
CUDA or OpenCL, however the OpenCL variants are no longer actively
maintained and only the CUDA versions are regularly tested.
"Section 5.3.1"_accelerate_gpu.html gives details of what
hardware and GPU software is required on your system,
and details on how to build and use this package. Its styles can be
invoked at run time via the "-sf gpu" or "-suffix gpu" "command-line
switches"_Section_start.html#start_6. See also the "KOKKOS"_#KOKKOS
@ -378,32 +392,41 @@ package, which has GPU-enabled styles.
[Install or un-install:]
Before building LAMMPS with this package, you must first build the GPU
library in lib/gpu from a set of provided C and Cuda files. You can
library in lib/gpu from a set of provided C and CUDA files. You can
do this manually if you prefer; follow the instructions in
lib/gpu/README. You can also do it in one step from the lammps/src
lib/gpu/README. Please note, that the GPU library uses MPI calls, so
you have to make certain to use the same MPI library (or the STUBS
library) settings as the main LAMMPS code. That same applies to the
-DLAMMPS_BIGBIG, -DLAMMPS_SMALLBIG, or -DLAMMPS_SMALLSMALL define.
You can also do it in one step from the lammps/src
dir, using a command like these, which simply invoke the
lib/gpu/Install.py script with the specified args:
make lib-gpu # print help message
make lib-gpu args="-m" # build GPU library with default Makefile.linux
make lib-gpu args="-i xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision
make lib-gpu args="-i xk7 -p single -o xk7.single -m" # ditto, also build GPU library
make lib-gpu # print help message
make lib-gpu args="-b" # build GPU library with default Makefile.linux
make lib-gpu args="-m xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision
make lib-gpu args="-m mpi -p mixed -b" # build GPU library with mixed precision using settings in Makefile.mpi :pre
Note that this procedure starts with one of the existing
Makefile.machine files in lib/gpu. It allows you to alter 4 important
settings in that Makefile, via the -h, -a, -p, -e switches,
and save the new Makefile, if desired:
Note that this procedure through the '-m machine' flag starts with one of
the existing Makefile.machine files in lib/gpu. For your convenience,
machine makefiles for "mpi" and "serial" are provided, which have the
same settings as the corresponding machine makefiles in the main LAMMPS
source folder. In addition you can alter 4 important settings in that
Makefile, via the -h, -a, -p, -e switches, and also save a copy of the
new Makefile, if desired:
CUDA_HOME = where NVIDIA Cuda software is installed on your system
CUDA_HOME = where NVIDIA CUDA software is installed on your system
CUDA_ARCH = what GPU hardware you have (see help message for details)
CUDA_PRECISION = precision (double, mixed, single)
EXTRAMAKE = which Makefile.lammps.* file to copy to Makefile.lammps :ul
If the library build is successful, 2 files should be created:
lib/gpu/libgpu.a and lib/gpu/Makefile.lammps. The latter has settings
that enable LAMMPS to link with Cuda libraries. If the settings in
Makefile.lammps for your machine are not correct, the LAMMPS build
will fail.
If the library build is successful, at least 3 files should be created:
lib/gpu/libgpu.a, lib/gpu/nvc_get_devices, and lib/gpu/Makefile.lammps.
The latter has settings that enable LAMMPS to link with CUDA libraries.
If the settings in Makefile.lammps for your machine are not correct,
the LAMMPS build will fail, and lib/gpu/Makefile.lammps may need to
be edited.
You can then install/un-install the package and build LAMMPS in the
usual manner:
@ -492,14 +515,40 @@ Minnesota).
[Install or un-install:]
Using this package requires the KIM library and its models
(interatomic potentials) to be downloaded and installed on your
system. The library can be downloaded and built in lib/kim or
elsewhere on your system. Details of the download, build, and install
process for KIM are given in the lib/kim/README file.
Before building LAMMPS with this package, you must first download and
build the KIM library and include the KIM models that you want to
use. You can do this manually if you prefer; follow the instructions
in lib/kim/README. You can also do it in one step from the lammps/src
dir, using a command like these, which simply invoke the
lib/kim/Install.py script with the specified args.
Once that process is complete, you can then install/un-install the
package and build LAMMPS in the usual manner:
make lib-kim # print help message
make lib-kim args="-b " # (re-)install KIM API lib with only example models
make lib-kim args="-b -a Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model
make lib-kim args="-b -a everything" # install KIM API lib with all models
make lib-kim args="-n -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver
make lib-kim args="-p /usr/local/kim-api" # use an existing KIM API installation at the provided location
make lib-kim args="-p /usr/local/kim-api -a EAM_Dynamo_Ackland_W__MO_141627196590_002" # ditto but add one model or driver :pre
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 installing the KIM API
library with all its models, may take around 30 min to build. Of
course you only need to do that once.
See the list of KIM model drivers here:
https://openkim.org/kim-items/model-drivers/alphabetical
See the list of all KIM models here:
https://openkim.org/kim-items/models/by-model-drivers
See the list of example KIM models included by default here:
https://openkim.org/kim-api in the "What is in the KIM API source
package?" section
You can then install/un-install the package and build LAMMPS in the
usual manner:
make yes-kim
make machine :pre
@ -523,7 +572,7 @@ KOKKOS package :link(KOKKOS),h4
Dozens of atom, pair, bond, angle, dihedral, improper, fix, compute
styles adapted to compile using the Kokkos library which can convert
them to OpenMP or Cuda code so that they run efficiently on multicore
them to OpenMP or CUDA code so that they run efficiently on multicore
CPUs, KNLs, or GPUs. All the styles have a "kk" as a suffix in their
style name. "Section 5.3.3"_accelerate_kokkos.html gives details of
what hardware and software is required on your system, and how to
@ -553,28 +602,28 @@ files for examples.
For multicore CPUs using OpenMP:
KOKKOS_DEVICES = OpenMP
KOKKOS_ARCH = HSW # HSW = Haswell, SNB = SandyBridge, BDW = Broadwell, etc
KOKKOS_ARCH = HSW # HSW = Haswell, SNB = SandyBridge, BDW = Broadwell, etc :pre
For Intel KNLs using OpenMP:
KOKKOS_DEVICES = OpenMP
KOKKOS_ARCH = KNL
KOKKOS_ARCH = KNL :pre
For NVIDIA GPUs using Cuda:
For NVIDIA GPUs using CUDA:
KOKKOS_DEVICES = Cuda
KOKKOS_ARCH = Pascal60,Power8 # P100 hosted by an IBM Power8, etc
KOKKOS_ARCH = Kepler37,Power8 # K80 hosted by an IBM Power8, etc
KOKKOS_ARCH = Kepler37,Power8 # K80 hosted by an IBM Power8, etc :pre
For GPUs, you also need these 2 lines in your Makefile.machine before
the CC line is defined, in this case for use with OpenMPI mpicxx. The
2 lines define a nvcc wrapper compiler, which will use nvcc for
compiling Cuda files or use a C++ compiler for non-Kokkos, non-Cuda
compiling CUDA files or use a C++ compiler for non-Kokkos, non-CUDA
files.
KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
export OMPI_CXX = $(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper
CC = mpicxx
CC = mpicxx :pre
Once you have an appropriate Makefile.machine, you can
install/un-install the package and build LAMMPS in the usual manner.
@ -710,6 +759,12 @@ MEAM package :link(MEAM),h4
A pair style for the modified embedded atom (MEAM) potential.
Please note that the MEAM package has been superseded by the
"USER-MEAMC"_#USER-MEAMC package, which is a direct translation
of the MEAM package to C++. USER-MEAMC contains additional
optimizations making it run faster than MEAM on most machines,
while providing the identical features and USER interface.
[Author:] Greg Wagner (Northwestern U) while at Sandia.
[Install or un-install:]
@ -720,9 +775,10 @@ follow the instructions in lib/meam/README. You can also do it in one
step from the lammps/src dir, using a command like these, which simply
invoke the lib/meam/Install.py script with the specified args:
make lib-meam # print help message
make lib-meam args="-m gfortran" # build with GNU Fortran compiler
make lib-meam args="-m ifort" # build with Intel ifort compiler :pre
make lib-meam # print help message
make lib-meam args="-m mpi" # build with default Fortran compiler compatible with your MPI library
make lib-meam args="-m serial" # build with compiler compatible with "make serial" (GNU Fortran)
make lib-meam args="-m ifort" # build with Intel Fortran compiler using Makefile.ifort :pre
The build should produce two files: lib/meam/libmeam.a and
lib/meam/Makefile.lammps. The latter is copied from an existing
@ -765,6 +821,9 @@ A variety of compute, fix, pair, dump styles with specialized
capabilities that don't align with other packages. Do a directory
listing, "ls src/MISC", to see the list of commands.
NOTE: the MISC package contains styles that require using the
-restrict flag, when compiling with Intel compilers.
[Install or un-install:]
make yes-misc
@ -878,9 +937,9 @@ University of Chicago.
Before building LAMMPS with this package, you must first download and
build the MS-CG library. Building the MS-CG library and using it from
LAMMPS requires a C++11 compatible compiler, and that LAPACK and GSL
(GNU Scientific Library) libraries be installed on your machine. See
the lib/mscg/README and MSCG/Install files for more details.
LAMMPS requires a C++11 compatible compiler and that the GSL
(GNU Scientific Library) headers and libraries are installed on your
machine. See the lib/mscg/README and MSCG/Install files for more details.
Assuming these libraries are in place, you can do the download and
build of MS-CG manually if you prefer; follow the instructions in
@ -888,15 +947,16 @@ lib/mscg/README. You can also do it in one step from the lammps/src
dir, using a command like these, which simply invoke the
lib/mscg/Install.py script with the specified args:
make lib-mscg # print help message
make lib-mscg args="-g -b -l" # download and build in default lib/mscg/MSCG-release-master
make lib-mscg args="-h . MSCG -g -b -l" # download and build in lib/mscg/MSCG
make lib-mscg args="-h ~ MSCG -g -b -l" # download and build in ~/mscg :pre
make lib-mscg # print help message
make lib-mscg args="-b -m serial" # download and build in lib/mscg/MSCG-release-master
# with the settings compatible with "make serial"
make lib-mscg args="-b -m mpi" # download and build in lib/mscg/MSCG-release-master
# with the settings compatible with "make mpi"
make lib-mscg args="-p /usr/local/mscg-release" # use the existing MS-CG installation in /usr/local/mscg-release :pre
Note that the final -l switch is to create 2 symbolic (soft) links,
"includelink" and "liblink", in lib/mscg to point to the MS-CG src
dir. When LAMMPS builds it will use these links. You should not need
to edit the lib/mscg/Makefile.lammps file.
Note that 2 symbolic (soft) links, "includelink" and "liblink", will be created in lib/mscg
to point to the MS-CG src/installation dir. When LAMMPS is built in src it will use these links.
You should not need to edit the lib/mscg/Makefile.lammps file.
You can then install/un-install the package and build LAMMPS in the
usual manner:
@ -942,11 +1002,11 @@ make no-opt
make machine :pre
NOTE: The compile flag "-restrict" must be used to build LAMMPS with
the OPT package. It should be added to the CCFLAGS line of your
Makefile.machine. See Makefile.opt in src/MAKE/OPTIONS for an
example.
the OPT package when using Intel compilers. It should be added to
the CCFLAGS line of your Makefile.machine. See Makefile.opt in
src/MAKE/OPTIONS for an example.
CCFLAGS: add -restrict :ul
CCFLAGS: add -restrict for Intel compilers :ul
[Supporting info:]
@ -1015,9 +1075,10 @@ follow the instructions in lib/poems/README. You can also do it in
one step from the lammps/src dir, using a command like these, which
simply invoke the lib/poems/Install.py script with the specified args:
make lib-poems # print help message
make lib-poems args="-m g++" # build with GNU g++ compiler
make lib-poems args="-m icc" # build with Intel icc compiler :pre
make lib-poems # print help message
make lib-poems args="-m serial" # build with GNU g++ compiler (settings as with "make serial")
make lib-poems args="-m mpi" # build with default MPI C++ compiler (settings as with "make mpi")
make lib-poems args="-m icc" # build with Intel icc compiler :pre
The build should produce two files: lib/poems/libpoems.a and
lib/poems/Makefile.lammps. The latter is copied from an existing
@ -1127,9 +1188,10 @@ follow the instructions in lib/reax/README. You can also do it in one
step from the lammps/src dir, using a command like these, which simply
invoke the lib/reax/Install.py script with the specified args:
make lib-reax # print help message
make lib-reax args="-m gfortran" # build with GNU Fortran compiler
make lib-reax args="-m ifort" # build with Intel ifort compiler :pre
make lib-reax # print help message
make lib-reax args="-m serial" # build with GNU Fortran compiler (settings as with "make serial")
make lib-reax args="-m mpi" # build with default MPI Fortran compiler (settings as with "make mpi")
make lib-reax args="-m ifort" # build with Intel ifort compiler :pre
The build should produce two files: lib/reax/libreax.a and
lib/reax/Makefile.lammps. The latter is copied from an existing
@ -1346,15 +1408,15 @@ one step from the lammps/src dir, using a command like these, which
simply invoke the lib/voronoi/Install.py script with the specified
args:
make lib-voronoi # print help message
make lib-voronoi args="-g -b -l" # download and build in default lib/voronoi/voro++-0.4.6
make lib-voronoi args="-h . voro++ -g -b -l" # download and build in lib/voronoi/voro++
make lib-voronoi args="-h ~ voro++ -g -b -l" # download and build in ~/voro++ :pre
make lib-voronoi # print help message
make lib-voronoi args="-b" # download and build the default version in lib/voronoi/voro++-<version>
make lib-voronoi args="-p $HOME/voro++" # use existing Voro++ installation in $HOME/voro++
make lib-voronoi args="-b -v voro++0.4.6" # download and build the 0.4.6 version in lib/voronoi/voro++-0.4.6 :pre
Note that the final -l switch is to create 2 symbolic (soft) links,
"includelink" and "liblink", in lib/voronoi to point to the Voro++ src
dir. When LAMMPS builds it will use these links. You should not need
to edit the lib/voronoi/Makefile.lammps file.
Note that 2 symbolic (soft) links, "includelink" and "liblink", are
created in lib/voronoi to point to the Voro++ src dir. When LAMMPS
builds in src it will use these links. You should not need to edit
the lib/voronoi/Makefile.lammps file.
You can then install/un-install the package and build LAMMPS in the
usual manner:
@ -1396,7 +1458,8 @@ from the lammps/src dir, using a command like these, which simply
invoke the lib/atc/Install.py script with the specified args:
make lib-atc # print help message
make lib-atc args="-m g++" # build with GNU g++ compiler
make lib-atc args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial")
make lib-atc args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
make lib-atc args="-m icc" # build with Intel icc compiler :pre
The build should produce two files: lib/atc/libatc.a and
@ -1413,8 +1476,10 @@ can either exist on your system, or you can use the files provided in
lib/linalg. In the latter case you also need to build the library
in lib/linalg with a command like these:
make lib-linalg # print help message
make lib-atc args="-m gfortran" # build with GNU Fortran compiler
make lib-linalg # print help message
make lib-linalg args="-m serial" # build with GNU Fortran compiler (settings as with "make serial")
make lib-linalg args="-m mpi" # build with default MPI Fortran compiler (settings as with "make mpi")
make lib-linalg args="-m gfortran" # build with GNU Fortran compiler :pre
You can then install/un-install the package and build LAMMPS in the
usual manner:
@ -1454,9 +1519,10 @@ follow the instructions in lib/awpmd/README. You can also do it in
one step from the lammps/src dir, using a command like these, which
simply invoke the lib/awpmd/Install.py script with the specified args:
make lib-awpmd # print help message
make lib-awpmd args="-m g++" # build with GNU g++ compiler
make lib-awpmd args="-m icc" # build with Intel icc compiler :pre
make lib-awpmd # print help message
make lib-awpmd args="-m serial" # build with GNU g++ compiler and MPI STUBS (settings as with "make serial")
make lib-awpmd args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
make lib-awpmd args="-m icc" # build with Intel icc compiler :pre
The build should produce two files: lib/awpmd/libawpmd.a and
lib/awpmd/Makefile.lammps. The latter is copied from an existing
@ -1472,8 +1538,10 @@ these can either exist on your system, or you can use the files
provided in lib/linalg. In the latter case you also need to build the
library in lib/linalg with a command like these:
make lib-linalg # print help message
make lib-atc args="-m gfortran" # build with GNU Fortran compiler
make lib-linalg # print help message
make lib-linalg args="-m serial" # build with GNU Fortran compiler (settings as with "make serial")
make lib-linalg args="-m mpi" # build with default MPI Fortran compiler (settings as with "make mpi")
make lib-linalg args="-m gfortran" # build with GNU Fortran compiler :pre
You can then install/un-install the package and build LAMMPS in the
usual manner:
@ -1566,9 +1634,11 @@ Restraints. A "fix colvars"_fix_colvars.html command is implemented
which wraps a COLVARS library, which implements these methods.
simulations.
[Authors:] Axel Kohlmeyer (Temple U). The COLVARS library was written
by Giacomo Fiorin (ICMS, Temple University, Philadelphia, PA, USA) and
Jerome Henin (LISM, CNRS, Marseille, France).
[Authors:] The COLVARS library is written and maintained by
Giacomo Fiorin (ICMS, Temple University, Philadelphia, PA, USA)
and Jerome Henin (LISM, CNRS, Marseille, France), originally for
the NAMD MD code, but with portability in mind. Axel Kohlmeyer
(Temple U) provided the interface to LAMMPS.
[Install or un-install:]
@ -1580,7 +1650,9 @@ which simply invoke the lib/colvars/Install.py script with the
specified args:
make lib-colvars # print help message
make lib-colvars args="-m g++" # build with GNU g++ compiler :pre
make lib-colvars args="-m serial" # build with GNU g++ compiler (settings as with "make serial")
make lib-colvars args="-m mpi" # build with default MPI compiler (settings as with "make mpi")
make lib-colvars args="-m g++-debug" # build with GNU g++ compiler and colvars debugging enabled :pre
The build should produce two files: lib/colvars/libcolvars.a and
lib/colvars/Makefile.lammps. The latter is copied from an existing
@ -1868,7 +1940,12 @@ Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-OMP"_#USER-OMP
packages, which have styles optimized for CPUs and KNLs.
You need to have an Intel compiler, version 14 or higher to take full
advantage of this package.
advantage of this package. While compilation with GNU compilers is
supported, performance will be suboptimal.
NOTE: the USER-INTEL package contains styles that require using the
-restrict flag, when compiling with Intel compilers.
[Author:] Mike Brown (Intel).
@ -1885,17 +1962,17 @@ For CPUs:
OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits
CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \
-fno-alias -ansi-alias -restrict $(OPTFLAGS)
-fno-alias -ansi-alias -restrict $(OPTFLAGS)
LINKFLAGS = -g -qopenmp $(OPTFLAGS)
LIB = -ltbbmalloc -ltbbmalloc_proxy
LIB = -ltbbmalloc -ltbbmalloc_proxy :pre
For KNLs:
OPTFLAGS = -xMIC-AVX512 -O2 -fp-model fast=2 -no-prec-div -qoverride-limits
CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \
-fno-alias -ansi-alias -restrict $(OPTFLAGS)
-fno-alias -ansi-alias -restrict $(OPTFLAGS)
LINKFLAGS = -g -qopenmp $(OPTFLAGS)
LIB = -ltbbmalloc
LIB = -ltbbmalloc :pre
Once you have an appropriate Makefile.machine, you can
install/un-install the package and build LAMMPS in the usual manner.
@ -2200,11 +2277,15 @@ CPUs.
[Author:] Axel Kohlmeyer (Temple U).
NOTE: The compile flags "-restrict" and "-fopenmp" must be used to
build LAMMPS with the USER-OMP package, as well as the link flag
"-fopenmp". They should be added to the CCFLAGS and LINKFLAGS lines
of your Makefile.machine. See src/MAKE/OPTIONS/Makefile.omp for an
example.
NOTE: To enable multi-threading support the compile flag "-fopenmp"
and the link flag "-fopenmp" (for GNU compilers, you have to look up
the equivalent flags for other compilers) must be used to build LAMMPS.
When using Intel compilers, also the "-restrict" flag is required.
The USER-OMP package can be compiled without enabling OpenMP; then
all code will be compiled as serial and the only improvement over the
regular styles are some data access optimization. These flags should
be added to the CCFLAGS and LINKFLAGS lines of your Makefile.machine.
See src/MAKE/OPTIONS/Makefile.omp for an example.
Once you have an appropriate Makefile.machine, you can
install/un-install the package and build LAMMPS in the usual manner:
@ -2217,7 +2298,7 @@ make machine :pre
make no-user-omp
make machine :pre
CCFLAGS: add -fopenmp and -restrict
CCFLAGS: add -fopenmp (and -restrict when using Intel compilers)
LINKFLAGS: add -fopenmp :ul
[Supporting info:]
@ -2286,12 +2367,14 @@ without changes to LAMMPS itself.
Before building LAMMPS with this package, you must first build the
QMMM library in lib/qmmm. You can do this manually if you prefer;
follow the first two steps explained in lib/colvars/README. You can
follow the first two steps explained in lib/qmmm/README. You can
also do it in one step from the lammps/src dir, using a command like
these, which simply invoke the lib/colvars/Install.py script with the
these, which simply invoke the lib/qmmm/Install.py script with the
specified args:
make lib-qmmm # print help message
make lib-qmmm args="-m serial" # build with GNU Fortran compiler (settings as in "make serial")
make lib-qmmm args="-m mpi" # build with default MPI compiler (settings as in "make mpi")
make lib-qmmm args="-m gfortran" # build with GNU Fortran compiler :pre
The build should produce two files: lib/qmmm/libqmmm.a and
@ -2468,15 +2551,13 @@ follow the instructions in lib/smd/README. You can also do it in one
step from the lammps/src dir, using a command like these, which simply
invoke the lib/smd/Install.py script with the specified args:
make lib-smd # print help message
make lib-smd args="-g -l" # download in default lib/smd/eigen-eigen-*
make lib-smd args="-h . eigen -g -l" # download in lib/smd/eigen
make lib-smd args="-h ~ eigen -g -l" # download and build in ~/eigen :pre
make lib-smd # print help message
make lib-smd args="-b" # download and build in default lib/smd/eigen-eigen-...
make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3 :pre
Note that the final -l switch is to create a symbolic (soft) link
named "includelink" in lib/smd to point to the Eigen dir. When LAMMPS
builds it will use this link. You should not need to edit the
lib/smd/Makefile.lammps file.
Note that a symbolic (soft) link named "includelink" is created in
lib/smd to point to the Eigen dir. When LAMMPS builds it will use
this link. You should not need to edit the lib/smd/Makefile.lammps file.
You can then install/un-install the package and build LAMMPS in the
usual manner:

View File

@ -587,8 +587,7 @@ Typing "make clean-all" or "make clean-machine" will delete *.o object
files created when LAMMPS is built, for either all builds or for a
particular machine.
Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or
-DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6
Changing the LAMMPS size limits via -DLAMMPS_SMALLBIG or -DLAMMPS_BIGBIG or -DLAMMPS_SMALLSMALL :h6
As explained above, any of these 3 settings can be specified on the
LMP_INC line in your low-level src/MAKE/Makefile.foo.
@ -659,22 +658,29 @@ utilities.
For Cygwin and the MinGW cross-compilers, suitable makefiles are
provided in src/MAKE/MACHINES. When using other compilers, like
Visual C++ or Intel compilers for Windows, you may have to implement
your own build system. Since none of the current LAMMPS core developers
has significant experience building executables on Windows, we are
happy to distribute contributed instructions and modifications, but
we cannot provide support for those.
your own build system. Due to differences between the Windows OS
and Windows system libraries to Unix-like environments like Linux
or MacOS, when compiling for Windows a few adjustments may be needed:
Do [not] set the -DLAMMPS_MEMALIGN define (see LMP_INC makefile variable)
Add -lwsock32 -lpsapi to the linker flags (see LIB makefile variable)
Try adding -static-libgcc or -static or both to the linker flags when your LAMMPS executable complains about missing .dll files :ul
Since none of the current LAMMPS core developers has significant
experience building executables on Windows, we are happy to distribute
contributed instructions and modifications to improve the situation,
but we cannot provide support for those.
With the so-called "Anniversary Update" to Windows 10, there is a
Ubuntu Linux subsystem available for Windows, that can be installed
and then used to compile/install LAMMPS as if you are running on a
Ubuntu Linux system instead of Windows.
As an alternative, you can download "daily builds" (and some older
versions) of the installer packages from
"rpm.lammps.org/windows.html"_http://rpm.lammps.org/windows.html.
These executables are built with most optional packages and the
download includes documentation, potential files, some tools and
many examples, but no source code.
As an alternative, you can download pre-compiled installer packages from
"packages.lammps.org/windows.html"_http://packages.lammps.org/windows.html.
These executables are built with most optional packages included and the
download includes documentation, potential files, some tools and many
examples, but no source code.
:line
@ -909,7 +915,7 @@ src/MAKE/OPTIONS, which include the settings. Note that the
USER-INTEL and KOKKOS packages can use settings that build LAMMPS for
different hardware. The USER-INTEL package can be compiled for Intel
CPUs and KNLs; the KOKKOS package builds for CPUs (OpenMP), GPUs
(Cuda), and Intel KNLs.
(CUDA), and Intel KNLs.
Makefile.intel_cpu
Makefile.intel_phi
@ -1087,7 +1093,7 @@ LAMMPS to be built with one or more of its optional packages.
:line
On a Windows box, you can skip making LAMMPS and simply download an
installer package from "here"_http://rpm.lammps.org/windows.html
installer package from "here"_http://packages.lammps.org/windows.html
For running the non-MPI executable, follow these steps:
@ -1099,18 +1105,27 @@ the [in.lj] input from the bench folder. (e.g. by typing: cd "Documents"). :l
At the command prompt, type "lmp_serial -in in.lj", replacing [in.lj]
with the name of your LAMMPS input script. :l
The serial executable includes support for multi-threading
parallelization from the styles in the USER-OMP packages.
To run with, e.g. 4 threads, type "lmp_serial -in in.lj -pk omp 4 -sf omp"
:ule
For the MPI version, which allows you to run LAMMPS under Windows on
multiple processors, follow these steps:
For the MPI version, which allows you to run LAMMPS under Windows with
the more general message passing parallel library (LAMMPS has been
designed from ground up to use MPI efficiently), follow these steps:
Download and install
"MPICH2"_http://www.mcs.anl.gov/research/projects/mpich2/downloads/index.php?s=downloads
for Windows. :ulb,l
Download and install a compatible MPI library binary package:
for 32-bit Windows
"mpich2-1.4.1p1-win-ia32.msi"_download.lammps.org/thirdparty/mpich2-1.4.1p1-win-ia32.msi
and for 64-bit Windows
"mpich2-1.4.1p1-win-x86-64.msi"_download.lammps.org/thirdparty/mpich2-1.4.1p1-win-x86-64.msi
:ulb,l
The LAMMPS Windows installer packages will automatically adjust your
path for the default location of this MPI package. After the installation
of the MPICH software, it needs to be integrated into the system.
of the MPICH2 software, it needs to be integrated into the system.
For this you need to start a Command Prompt in {Administrator Mode}
(right click on the icon and select it). Change into the MPICH2
installation directory, then into the subdirectory [bin] and execute
@ -1129,7 +1144,7 @@ or
mpiexec -np 4 lmp_mpi -in in.lj :pre
replacing in.lj with the name of your LAMMPS input script. For the latter
replacing [in.lj] with the name of your LAMMPS input script. For the latter
case, you may be prompted to enter your password. :l
In this mode, output may not immediately show up on the screen, so if
@ -1141,6 +1156,11 @@ something like:
lmp_mpi -in in.lj :pre
And the parallel executable also includes OpenMP multi-threading, which
can be combined with MPI using something like:
mpiexec -localonly 2 lmp_mpi -in in.lj -pk omp 2 -sf omp :pre
:ule
:line

View File

@ -62,7 +62,7 @@ respectively to your input script.
[Required hardware/software:]
To use this package, you currently need to have an NVIDIA GPU and
install the NVIDIA Cuda software on your system:
install the NVIDIA CUDA software on your system:
Check if you have an NVIDIA GPU: cat /proc/driver/nvidia/gpus/0/information
Go to http://www.nvidia.com/object/cuda_get.html
@ -74,13 +74,8 @@ Run lammps/lib/gpu/nvc_get_devices (after building the GPU library, see below) t
This requires two steps (a,b): build the GPU library, then build
LAMMPS with the GPU package.
You can do both these steps in one line, using the src/Make.py script,
described in "Section 4"_Section_packages.html of the manual.
Type "Make.py -h" for help. If run from the src directory, this
command will create src/lmp_gpu using src/MAKE/Makefile.mpi as the
starting Makefile.machine:
Make.py -p gpu -gpu mode=single arch=31 -o gpu -a lib-gpu file mpi :pre
You can do both these steps in one line as described in
"Section 4"_Section_packages.html of the manual.
Or you can follow these two (a,b) steps:
@ -90,7 +85,7 @@ The GPU library is in lammps/lib/gpu. Select a Makefile.machine (in
lib/gpu) appropriate for your system. You should pay special
attention to 3 settings in this makefile.
CUDA_HOME = needs to be where NVIDIA Cuda software is installed on your system
CUDA_HOME = needs to be where NVIDIA CUDA software is installed on your system
CUDA_ARCH = needs to be appropriate to your GPUs
CUDA_PREC = precision (double, mixed, single) you desire :ul

View File

@ -29,8 +29,10 @@ Bond Styles: fene, harmonic :l
Dihedral Styles: charmm, harmonic, opls :l
Fixes: nve, npt, nvt, nvt/sllod :l
Improper Styles: cvff, harmonic :l
Pair Styles: buck/coul/cut, buck/coul/long, buck, eam, gayberne,
charmm/coul/long, lj/cut, lj/cut/coul/long, lj/long/coul/long, sw, tersoff :l
Pair Styles: airebo, airebo/morse, buck/coul/cut, buck/coul/long,
buck, eam, eam/alloy, eam/fs, gayberne, lj/charmm/coul/charmm,
lj/charmm/coul/long, lj/cut, lj/cut/coul/long, lj/long/coul/long, rebo,
sw, tersoff :l
K-Space Styles: pppm, pppm/disp :l
:ule
@ -225,11 +227,9 @@ source /opt/intel/parallel_studio_xe_2016.3.067/psxevars.sh
# or psxevars.csh for C-shell
make intel_cpu_intelmpi :pre
Alternatively, the build can be accomplished with the src/Make.py
script, described in "Section 4"_Section_packages.html of the
manual. Type "Make.py -h" for help. For an example:
Make.py -v -p intel omp -intel cpu -a file intel_cpu_intelmpi :pre
Alternatively this can be done as a single command with
suitable make command invocations. This is discussed in "Section
4"_Section_packages.html of the manual.
Note that if you build with support for a Phi coprocessor, the same
binary can be used on nodes with or without coprocessors installed.
@ -244,8 +244,7 @@ highly recommended for CCFLAGS and LINKFLAGS. LIB should include
is required for CCFLAGS and "-qoffload" is required for LINKFLAGS.
Other recommended CCFLAG options for best performance are
"-O2 -fno-alias -ansi-alias -qoverride-limits fp-model fast=2
-no-prec-div". The Make.py command will add all of these
automatically.
-no-prec-div".
NOTE: The vectorization and math capabilities can differ depending on
the CPU. For Intel compilers, the "-x" flag specifies the type of

View File

@ -60,8 +60,7 @@ More details follow.
use a C++11 compatible compiler
make yes-kokkos
make mpi KOKKOS_DEVICES=OpenMP # build with the KOKKOS package
make kokkos_omp # or Makefile.kokkos_omp already has variable set
Make.py -v -p kokkos -kokkos omp -o mpi -a file mpi # or one-line build via Make.py :pre
make kokkos_omp # or Makefile.kokkos_omp already has variable set :pre
mpirun -np 16 lmp_mpi -k on -sf kk -in in.lj # 1 node, 16 MPI tasks/node, no threads
mpirun -np 2 -ppn 1 lmp_mpi -k on t 16 -sf kk -in in.lj # 2 nodes, 1 MPI task/node, 16 threads/task
@ -82,8 +81,7 @@ use a C++11 compatible compiler
KOKKOS_DEVICES = Cuda, OpenMP
KOKKOS_ARCH = Kepler35
make yes-kokkos
make machine
Make.py -p kokkos -kokkos cuda arch=31 -o kokkos_cuda -a file kokkos_cuda :pre
make machine :pre
mpirun -np 1 lmp_cuda -k on t 6 -sf kk -in in.lj # one MPI task, 6 threads on CPU
mpirun -np 4 -ppn 1 lmp_cuda -k on t 6 -sf kk -in in.lj # ditto on 4 nodes :pre
@ -98,8 +96,7 @@ use a C++11 compatible compiler
KOKKOS_DEVICES = OpenMP
KOKKOS_ARCH = KNC
make yes-kokkos
make machine
Make.py -p kokkos -kokkos phi -o kokkos_phi -a file mpi :pre
make machine :pre
host=MIC, Intel Phi with 61 cores (240 threads/phi via 4x hardware threading):
mpirun -np 1 lmp_g++ -k on t 240 -sf kk -in in.lj # 1 MPI task on 1 Phi, 1*240 = 240
@ -116,7 +113,7 @@ To build with Kokkos support for CPUs, your compiler must support the
OpenMP interface. You should have one or more multi-core CPUs so that
multiple threads can be launched by each MPI task running on a CPU.
To build with Kokkos support for NVIDIA GPUs, NVIDIA Cuda software
To build with Kokkos support for NVIDIA GPUs, NVIDIA CUDA software
version 7.5 or later must be installed on your system. See the
discussion for the "GPU"_accelerate_gpu.html package for details of
how to check and do this.
@ -135,9 +132,9 @@ mode like the USER-INTEL package supports.
You must choose at build time whether to build for CPUs (OpenMP),
GPUs, or Phi.
You can do any of these in one line, using the src/Make.py script,
described in "Section 4"_Section_packages.html of the manual.
Type "Make.py -h" for help. If run from the src directory, these
You can do any of these in one line, using the suitable make command
line flags as described in "Section 4"_Section_packages.html of the
manual. If run from the src directory, these
commands will create src/lmp_kokkos_omp, lmp_kokkos_cuda, and
lmp_kokkos_phi. Note that the OMP and PHI options use
src/MAKE/Makefile.mpi as the starting Makefile.machine. The CUDA

View File

@ -23,8 +23,7 @@ one or more 16-core nodes. More details follow.
use -fopenmp with CCFLAGS and LINKFLAGS in Makefile.machine
make yes-user-omp
make mpi # build with USER-OMP package, if settings added to Makefile.mpi
make omp # or Makefile.omp already has settings
Make.py -v -p omp -o mpi -a file mpi # or one-line build via Make.py :pre
make omp # or Makefile.omp already has settings :pre
lmp_mpi -sf omp -pk omp 16 < in.script # 1 MPI task, 16 threads
mpirun -np 4 lmp_mpi -sf omp -pk omp 4 -in in.script # 4 MPI tasks, 4 threads/task
@ -40,14 +39,11 @@ each MPI task running on a CPU.
The lines above illustrate how to include/build with the USER-OMP
package in two steps, using the "make" command. Or how to do it with
one command via the src/Make.py script, described in "Section
4"_Section_packages.html of the manual. Type "Make.py -h" for
help.
one command as described in "Section 4"_Section_packages.html of the manual.
Note that the CCFLAGS and LINKFLAGS settings in Makefile.machine must
include "-fopenmp". Likewise, if you use an Intel compiler, the
CCFLAGS setting must include "-restrict". The Make.py command will
add these automatically.
CCFLAGS setting must include "-restrict".
[Run with the USER-OMP package from the command line:]

View File

@ -21,8 +21,7 @@ Here is a quick overview of how to use the OPT package. More details
follow.
make yes-opt
make mpi # build with the OPT package
Make.py -v -p opt -o mpi -a file mpi # or one-line build via Make.py :pre
make mpi # build with the OPT package :pre
lmp_mpi -sf opt -in in.script # run in serial
mpirun -np 4 lmp_mpi -sf opt -in in.script # run in parallel :pre
@ -35,13 +34,10 @@ None.
The lines above illustrate how to build LAMMPS with the OPT package in
two steps, using the "make" command. Or how to do it with one command
via the src/Make.py script, described in "Section
4"_Section_packages.html of the manual. Type "Make.py -h" for
help.
as described in "Section 4"_Section_packages.html of the manual.
Note that if you use an Intel compiler to build with the OPT package,
the CCFLAGS setting in your Makefile.machine must include "-restrict".
The Make.py command will add this automatically.
[Run with the OPT package from the command line:]

View File

@ -217,7 +217,7 @@ This compute is part of the VORONOI package. It is only enabled if
LAMMPS was built with that package. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.
It also requiers you have a copy of the Voro++ library built and
It also requires you have a copy of the Voro++ library built and
installed on your system. See instructions on obtaining and
installing the Voro++ software in the src/VORONOI/README file.

View File

@ -150,10 +150,9 @@ atoms. Note that adding a single bond always adds a new 1st neighbor
but may also induce *many* new 2nd and 3rd neighbors, depending on the
molecular topology of your system. The "extra special per atom"
parameter must typically be set to allow for the new maximum total
size (1st + 2nd + 3rd neighbors) of this per-atom list. There are 3
size (1st + 2nd + 3rd neighbors) of this per-atom list. There are 2
ways to do this. See the "read_data"_read_data.html or
"create_box"_create_box.html or "special_bonds extra" commands for
details.
"create_box"_create_box.html commands for details.
NOTE: Even if you do not use the {atype}, {dtype}, or {itype}
keywords, the list of topological neighbors is updated for atoms

View File

@ -75,7 +75,7 @@ equations, but is used in calculating the deviation from the Hugoniot.
The keyword {beta} is a scaling term that can be added to the MSST
ionic equations of motion to account for drift in the conserved
quantity during long timescale simulations, similar to a Berendson
thermostat. See "(Reed)"_#Reed and "(Goldman)"_#Goldman for more
thermostat. See "(Reed)"_#Reed and "(Goldman)"_#Goldman2 for more
details. The value of {beta} must be between 0.0 and 1.0 inclusive.
A value of 0.0 means no contribution, a value of 1.0 means a full
contribution.
@ -108,7 +108,7 @@ being driven by DFTB+, a density-functional tight-binding code. If the
keyword {dftb} is used with a value of {yes}, then the MSST equations
are altered to account for the electron entropy contribution to the
Hugonio relations and total energy. See "(Reed2)"_#Reed2 and
"(Goldman)"_#Goldman for details on this contribution. In this case,
"(Goldman)"_#Goldman2 for details on this contribution. In this case,
you must define a "fix external"_fix_external.html command in your
input script, which is used to callback to DFTB+ during the LAMMPS
timestepping. DFTB+ will communicate its info to LAMMPS via that fix.
@ -188,6 +188,6 @@ timestep.
:link(Reed2)
[(Reed2)] Reed, J. Phys. Chem. C, 116, 2205 (2012).
:link(Goldman)
:link(Goldman2)
[(Goldman)] Goldman, Srinivasan, Hamel, Fried, Gaus, and Elstner,
J. Phys. Chem. C, 117, 7885 (2013).

View File

@ -78,7 +78,7 @@ especially when the temperature of the initial state is below the
classical limit or there is a great change in the zero point energies
between the initial and final states. Theoretical post processing
quantum corrections of shock compressed water and methane have been
reported as much as 30% of the temperatures "(Goldman)"_#Goldman. A
reported as much as 30% of the temperatures "(Goldman)"_#Goldman1. A
self-consistent method that couples the shock to a quantum thermal
bath described by a colored noise Langevin thermostat has been
developed by Qi et al "(Qi)"_#Qi and applied to shocked methane. The
@ -212,7 +212,7 @@ T_init=300.0. e0, p0, and v0 are calculated on the first step.
:line
:link(Goldman)
:link(Goldman1)
[(Goldman)] Goldman, Reed and Fried, J. Chem. Phys. 131, 204103 (2009)
:link(Qi)

View File

@ -109,7 +109,8 @@ atoms in the specified group. This can be useful for models where a
large portion of the simulation is particles that do not interact with
other particles or with each other via pairwise interactions. The
group specified with this option must also be specified via the
"atom_modify first"_atom_modify.html command.
"atom_modify first"_atom_modify.html command. Note that specifying
"all" as the group-ID effectively turns off the {include} option.
The {exclude} option turns off pairwise interactions between certain
pairs of atoms, by not including them in the neighbor list. These are
@ -213,5 +214,5 @@ space.
[Default:]
The option defaults are delay = 10, every = 1, check = yes, once = no,
cluster = no, include = all, exclude = none, page = 100000, one =
2000, and binsize = 0.0.
cluster = no, include = all (same as no include option defined),
exclude = none, page = 100000, one = 2000, and binsize = 0.0.

View File

@ -7,10 +7,13 @@
:line
pair_style airebo command :h3
pair_style airebo/intel command :h3
pair_style airebo/omp command :h3
pair_style airebo/morse command :h3
pair_style airebo/morse/intel command :h3
pair_style airebo/morse/omp command :h3
pair_style rebo command :h3
pair_style rebo/intel command :h3
pair_style rebo/omp command :h3
[Syntax:]

View File

@ -7,6 +7,7 @@
:line
pair_style lj/charmm/coul/charmm command :h3
pair_style lj/charmm/coul/charmm/intel command :h3
pair_style lj/charmm/coul/charmm/omp command :h3
pair_style lj/charmm/coul/charmm/implicit command :h3
pair_style lj/charmm/coul/charmm/implicit/omp command :h3

View File

@ -14,6 +14,7 @@ pair_style eam/omp command :h3
pair_style eam/opt command :h3
pair_style eam/alloy command :h3
pair_style eam/alloy/gpu command :h3
pair_style eam/alloy/intel command :h3
pair_style eam/alloy/kk command :h3
pair_style eam/alloy/omp command :h3
pair_style eam/alloy/opt command :h3
@ -21,6 +22,7 @@ pair_style eam/cd command :h3
pair_style eam/cd/omp command :h3
pair_style eam/fs command :h3
pair_style eam/fs/gpu command :h3
pair_style eam/fs/intel command :h3
pair_style eam/fs/kk command :h3
pair_style eam/fs/omp command :h3
pair_style eam/fs/opt command :h3

View File

@ -27,13 +27,34 @@ pair_coeff * * Ar Ar :pre
[Description:]
This pair style is a wrapper on the "Knowledge Base for Interatomic
Models (KIM)"_https://openkim.org repository of interatomic potentials,
so that they can be used by LAMMPS scripts.
Models (OpenKIM)"_https://openkim.org repository of interatomic
potentials, so that they can be used by LAMMPS scripts.
In KIM lingo, a potential is a "model" and a model contains both the
analytic formulas that define the potential as well as the parameters
needed to run it for one or more materials, including coefficients and
cutoffs.
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.
See the current list of "KIM model
drivers"_https://openkim.org/kim-items/model-drivers/alphabetical.
See the current list of all "KIM
models"_https://openkim.org/kim-items/models/by-model-drivers
See the list of "example KIM models"_https://openkim.org/kim-api which
are included in the KIM library by default, in the "What is in the KIM
API source package?" section.
To use this pair style, you must first download and install the KIM
API library from the "OpenKIM website"_https://openkim.org. The "KIM
section of Section packages"_Section_packages.html#KIM has
instructions on how to do this with a simple make command, when
building LAMMPS.
See the examples/kim dir for an input script that uses a KIM model
(potential) for Lennard-Jones.
:line
The argument {virialmode} determines how the global virial is
calculated. If {KIMvirial} is specified, the KIM model performs the

View File

@ -25,9 +25,7 @@ keyword = {amber} or {charmm} or {dreiding} or {fene} or {lj/coul} or {lj} or {c
{coul} values = w1,w2,w3
w1,w2,w3 = weights (0.0 to 1.0) on pairwise Coulombic interactions
{angle} value = {yes} or {no}
{dihedral} value = {yes} or {no}
{extra} value = N
N = number of extra 1-2,1-3,1-4 interactions to save space for :pre
{dihedral} value = {yes} or {no} :pre
:ule
Examples:
@ -36,8 +34,7 @@ special_bonds amber
special_bonds charmm
special_bonds fene dihedral no
special_bonds lj/coul 0.0 0.0 0.5 angle yes dihedral yes
special_bonds lj 0.0 0.0 0.5 coul 0.0 0.0 0.0 dihedral yes
special_bonds lj/coul 0 1 1 extra 2 :pre
special_bonds lj 0.0 0.0 0.5 coul 0.0 0.0 0.0 dihedral yes :pre
[Description:]
@ -178,14 +175,6 @@ interaction between atoms 2 and 5 will be unaffected (full weighting
of 1.0). If the {dihedral} keyword is specified as {no} which is the
default, then the 2,5 interaction will also be weighted by 0.5.
The {extra} keyword can be used when additional bonds will be created
during a simulation run, e.g. by the "fix
bond/create"_fix_bond_create.html command. It can also be used if
molecules will be added to the system, e.g. via the "fix
deposit"_fix_deposit.html, or "fix pour"_fix_pour.html commands, which
will have atoms with more special neighbors than any atom in the
current system has.
:line
NOTE: LAMMPS stores and maintains a data structure with a list of the
@ -194,8 +183,9 @@ the system). If new bonds are created (or molecules added containing
atoms with more special neighbors), the size of this list needs to
grow. Note that adding a single bond always adds a new 1st neighbor
but may also induce *many* new 2nd and 3rd neighbors, depending on the
molecular topology of your system. Using the {extra} keyword leaves
empty space in the list for this N additional 1st, 2nd, or 3rd
molecular topology of your system. Using the {extra/special/per/atom}
keyword to either "read_data"_read_data.html or "create_box"_create_box.html
reserves empty space in the list for this N additional 1st, 2nd, or 3rd
neighbors to be added. If you do not do this, you may get an error
when bonds (or molecules) are added.
@ -203,8 +193,7 @@ when bonds (or molecules) are added.
NOTE: If you reuse this command in an input script, you should set all
the options you need each time. This command cannot be used a 2nd
time incrementally, e.g. to add some extra storage locations via the
{extra} keyword. E.g. these two commands:
time incrementally. E.g. these two commands:
special_bonds lj 0.0 1.0 1.0
special_bonds coul 0.0 0.0 1.0
@ -221,25 +210,6 @@ Coul: coul 0.0 0.0 1.0
because the LJ settings are reset to their default values
each time the command is issued.
Likewise
special_bonds amber
special_bonds extra 2 :pre
is not the same as this single command:
special_bonds amber extra 2 :pre
since in the former case, the 2nd command will reset all the LJ and
Coulombic weights to 0.0 (the default).
One exception to this rule is the {extra} option itself. It is not
reset to its default value of 0 each time the special_bonds command is
invoked. This is because it can also be set by the
"read_data"_read_data.html and "create_box"_create_box.html commands,
so this command will not override those settings unless you explicitly
use {extra} as an option.
[Restrictions:] none
[Related commands:]

View File

@ -50,7 +50,7 @@ Intel(R) Xeon Phi(TM) coprocessors. :l
KOKKOS = a collection of atom, pair, and fix styles optimized to run
using the Kokkos library on various kinds of hardware, including GPUs
via Cuda and many-core chips via OpenMP or threading. :l
via CUDA and many-core chips via OpenMP or threading. :l
USER-OMP = a collection of pair, bond, angle, dihedral, improper,
kspace, compute, and fix styles with support for OpenMP

View File

@ -0,0 +1,203 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
Using LAMMPS with Bash on Windows :h3
[written by Richard Berger]
:line
Starting with Windows 10 you can install Linux tools directly in Windows. This
allows you to compile LAMMPS following the same procedure as on a real Ubuntu
Linux installation. Software can be easily installed using the package manager
via apt-get and all files are accessible in both the Windows Explorer and your
Linux shell (bash). This avoids switching to a different operating system or
installing a virtual machine. Everything runs on Windows.
Installing Bash on Windows :h4
Prerequisites :h5
Windows 10 (64bit only)
Latest updates installed :ul
Enable developer mode :h5
You enable this feature by first opening Windows Settings and enabling
Developer mode. Go to the Windows settings and search for "developer". This
will allow you to install software which comes from outside of the Windows
Store. You might be prompted to reboot your compute. Please do so.
:image(JPG/bow_tutorial_01_small.png,JPG/bow_tutorial_01.png)
:image(JPG/bow_tutorial_02_small.png,JPG/bow_tutorial_02.png)
:image(JPG/bow_tutorial_03_small.png,JPG/bow_tutorial_03.png)
Install Windows Subsystem for Linux :h5
Next you must ensure that the Window Subsystem for Linux is installed. Again,
search for "enable windows features" in the Settings dialog. This opens a
dialog with a list of features you can install. Add a checkmark to Windows
Subsystem for Linux (Beta) and press OK.
:image(JPG/bow_tutorial_04_small.png,JPG/bow_tutorial_04.png)
:image(JPG/bow_tutorial_05.png,JPG/bow_tutorial_05.png)
Install Bash for Windows :h5
After installation completes, type "bash" in the Windows Start menu search.
Select the first found option. This will launch a command-line window which
will prompt you about installing Ubuntu on Windows. Confirm with "y" and press
enter. This will then download Ubuntu for Windows.
:image(JPG/bow_tutorial_06.png)
:image(JPG/bow_tutorial_07.png)
During installation, you will be asked for a new password. This will be used
for installing new software and running commands with sudo.
:image(JPG/bow_tutorial_08.png)
Type exit to close the command-line window.
Go to the Start menu and type "bash" again. This time you will see a "Bash on
Ubuntu on Windows" Icon. Start this program.
:image(JPG/bow_tutorial_09.png)
Congratulations, you have installed [Bash on Ubuntu on Windows].
:image(JPG/bow_tutorial_10.png)
:line
Compiling LAMMPS in Bash on Windows :h4
The installation of LAMMPS in this environment is identical to working inside
of a real Ubuntu Linux installation. At the time writing, it uses Ubuntu 16.04.
Installing prerequisite packages :h5
First upgrade all existing packages using
sudo apt update
sudo apt upgrade -y :pre
Next install the following packages, which include compilers and libraries
needed for various LAMMPS features:
sudo apt install -y build-essential ccache gfortran openmpi-bin libopenmpi-dev libfftw3-dev libjpeg-dev libpng12-dev python-dev python-virtualenv libblas-dev liblapack-dev libhdf5-serial-dev hdf5-tools :pre
Files in Ubuntu on Windows :h5
When you launch "Bash on Ubuntu on Windows" you will start out in your Linux
user home directory /home/[username]. You can access your Windows user directory
using the /mnt/c/Users/[username] folder.
Download LAMMPS :h5
Obtain a copy of the LAMMPS code and go into it using "cd"
Option 1: Downloading LAMMPS tarball using wget :h6
wget http://lammps.sandia.gov/tars/lammps-stable.tar.gz
tar xvzf lammps-stable.tar.gz
cd lammps-31Mar17 :pre
Option 2: Obtaining LAMMPS code from GitHub :h6
git clone https://github.com/lammps/lammps.git
cd lammps :pre
Compiling LAMMPS :h5
At this point you can compile LAMMPS like on Ubuntu Linux.
Compiling serial version :h6
cd src/
make -j 4 serial :pre
This will create an executable called lmp_serial in the src/ directory
Compiling MPI version :h6
cd src/
make -j 4 mpi :pre
This will create an executable called lmp_mpi in the src/ directory
:line
Finally, please note the absolute path of your src folder. You can get this using
pwd :pre
or
echo $PWD :pre
To run any examples you need the location of the executable. For now, let us
save this location in a temporary variable
LAMMPS_DIR=$PWD :pre
:line
Running an example script :h5
Once compiled you can execute some of the LAMMPS examples. Switch into the
examples/melt folder
cd ../examples/melt :pre
The full path of the serial executable is $LAMMPS_DIR/lmp_serial, while the mpi
version is $LAMMPS_DIR/lmp_mpi. You can run the melt example with either
version as follows:
$LAMMPS_DIR/lmp_serial -in in.melt :pre
or
mpirun -np 4 $LAMMPS_DIR/lmp_mpi -in in.melt :pre
Note the use of our variable $LAMMPS_DIR, which expands into the full path of
the LAMMPS src folder we saved earlier.
Adding your executable directory to your PATH :h6
You can avoid having to type the full path of your LAMMPS binary by adding its
parent folder to the PATH environment variable as follows:
export PATH=$LAMMPS_DIR:$PATH :pre
Input scripts can then be run like this:
lmp_serial -in in.melt :pre
or
mpirun -np 4 lmp_mpi -in in.melt :pre
However, this PATH variable will not persist if you close your bash window.
To persist this setting edit the $HOME/.bashrc file using your favorite editor
and add this line
export PATH=/full/path/to/your/lammps/src:$PATH :pre
[Example:]
For an executable lmp_serial with a full path
/home/richard/lammps/src/lmp_serial :pre
the PATH variable should be
export PATH=/home/richard/lammps/src:$PATH :pre
NOTE: This should give you a jump start when trying to run LAMMPS on Windows.
To become effective in this environment I encourage you to look into Linux
tutorials explaining Bash and Basic Unix commands (e.g., "Linux
Journey"_https://linuxjourney.com)

View File

@ -176,12 +176,13 @@ By recognizing the fix {drude}, LAMMPS will find and store matching
DC-DP pairs and will treat DP as equivalent to their DC in the
{special bonds} relations. It may be necessary to extend the space
for storing such special relations. In this case extra space should
be reserved by using the {extra} keyword of the {special_bonds}
be reserved by using the {extra/special/per/atom} keyword of either
the "read_data"_read_data.html or "create_box"_create_box.html
command. With our phenol, there is 1 more special neighbor for which
space is required. Otherwise LAMMPS crashes and gives the required
value.
special_bonds lj/coul 0.0 0.0 0.5 extra 1 :pre
read_data data-p.lmp extra/special/per/atom 1 :pre
Let us assume we want to run a simple NVT simulation at 300 K. Note
that Drude oscillators need to be thermalized at a low temperature in

View File

@ -48,21 +48,17 @@ System-wide Installation :h3
Step 1: Building LAMMPS as a shared library :h4
To use LAMMPS inside of Python it has to be compiled as shared library. This
library is then loaded by the Python interface. In this example, we use the
Make.py utility to create a Makefile with C++ exceptions, PNG, JPEG and FFMPEG
output support enabled. Finally, we also enable the MOLECULE package and compile
using the generated {auto} Makefile.
library is then loaded by the Python interface. In this example we enable the
MOLECULE package and compile LAMMPS with C++ exceptions, PNG, JPEG and FFMPEG
output support enabled.
cd $LAMMPS_DIR/src :pre
# generate custom Makefile
python Make.py -jpg -png -s ffmpeg exceptions -m mpi -a file :pre
# add packages if necessary
make yes-MOLECULE :pre
# compile shared library using Makefile
make mode=shlib auto :pre
make mpi mode=shlib LMP_INC="-DLAMMPS_PNG -DLAMMPS_JPEG -DLAMMPS_FFMPEG -DLAMMPS_EXCEPTIONS" JPG_LIB="-lpng -ljpeg" :pre
Step 2: Installing the LAMMPS Python package :h4

View File

@ -8,6 +8,7 @@ Tutorials :h1
tutorial_drude
tutorial_github
tutorial_pylammps
tutorial_bash_on_windows
body
manifolds

View File

@ -58,7 +58,7 @@ These are the sample problems and their output in the various
sub-directories:
accelerate: use of all the various accelerator packages
airebo: example for using AIREBO and AIREBO-M
airebo: polyethylene with AIREBO potential
balance: dynamic load balancing, 2d system
body: body particles, 2d system
cmap: CMAP 5-body contributions to CHARMM force field

View File

@ -17,6 +17,6 @@ fix 1 all nve
thermo 10
timestep 0.001
dump 1 all custom 10 dump.gap id fx fy fz
#dump 1 all custom 10 dump.gap id fx fy fz
run 40

View File

@ -1,7 +1,6 @@
units metal
atom_style full
boundary p p p
processors 1 1 1
timestep 0.0001 # 0.1 fs
read_data methane-box-8.data
@ -28,7 +27,7 @@ pair_modify pair lj/cut special lj/coul 0.0 0.0 0.0
# Intramolecular
# Tell QUIP to pretend this is silane (which is covered by the parameter file)
pair_coeff * * quip ip.parms.SW.xml "IP SW" 14 1
pair_coeff * * quip sw_example.xml "IP SW" 14 1
bond_style none
angle_style none

View File

@ -10,6 +10,7 @@ read_data data_sw
pair_style quip
pair_coeff * * sw_example.xml "IP SW" 14
velocity all create 10.0 355311
neighbor 0.3 bin
neigh_modify delay 10
@ -17,6 +18,6 @@ fix 1 all nve
thermo 10
timestep 0.001
dump 1 all custom 10 dump.sw id fx fy fz
#dump 1 all custom 10 dump.sw id fx fy fz
run 1
run 100

View File

@ -0,0 +1,76 @@
LAMMPS (24 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# Test of GAP potential for Si system
units metal
boundary p p p
atom_style atomic
read_data data_gap
orthogonal box = (0 0 0) to (10.9685 10.9685 10.9685)
1 by 1 by 1 MPI processor grid
reading atoms ...
64 atoms
pair_style quip
pair_coeff * * gap_example.xml "Potential xml_label=GAP_2015_2_20_0_10_54_35_765" 14
neighbor 0.3 bin
neigh_modify delay 10
fix 1 all nve
thermo 10
timestep 0.001
#dump 1 all custom 10 dump.gap id fx fy fz
run 40
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 4.3
ghost atom cutoff = 4.3
binsize = 2.15, bins = 6 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair quip, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 2.689 | 2.689 | 2.689 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -10412.677 0 -10412.677 -107490.01
10 173.98393 -10414.096 0 -10412.679 -91270.969
20 417.38493 -10416.08 0 -10412.681 -42816.133
30 434.34789 -10416.217 0 -10412.68 2459.83
40 423.05899 -10416.124 0 -10412.679 22936.209
Loop time of 1.83555 on 1 procs for 40 steps with 64 atoms
Performance: 1.883 ns/day, 12.747 hours/ns, 21.792 timesteps/s
98.1% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 1.8349 | 1.8349 | 1.8349 | 0.0 | 99.96
Neigh | 0.00022817 | 0.00022817 | 0.00022817 | 0.0 | 0.01
Comm | 0.00013709 | 0.00013709 | 0.00013709 | 0.0 | 0.01
Output | 9.8228e-05 | 9.8228e-05 | 9.8228e-05 | 0.0 | 0.01
Modify | 8.6308e-05 | 8.6308e-05 | 8.6308e-05 | 0.0 | 0.00
Other | | 0.0001223 | | | 0.01
Nlocal: 64 ave 64 max 64 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 303 ave 303 max 303 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 1080 ave 1080 max 1080 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 1080
Ave neighs/atom = 16.875
Neighbor list builds = 2
Dangerous builds = 0
Total wall time: 0:00:01

View File

@ -0,0 +1,76 @@
LAMMPS (24 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# Test of GAP potential for Si system
units metal
boundary p p p
atom_style atomic
read_data data_gap
orthogonal box = (0 0 0) to (10.9685 10.9685 10.9685)
1 by 2 by 2 MPI processor grid
reading atoms ...
64 atoms
pair_style quip
pair_coeff * * gap_example.xml "Potential xml_label=GAP_2015_2_20_0_10_54_35_765" 14
neighbor 0.3 bin
neigh_modify delay 10
fix 1 all nve
thermo 10
timestep 0.001
#dump 1 all custom 10 dump.gap id fx fy fz
run 40
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 4.3
ghost atom cutoff = 4.3
binsize = 2.15, bins = 6 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair quip, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 2.685 | 2.779 | 3.06 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 -10412.677 0 -10412.677 -107490.01
10 173.98393 -10414.096 0 -10412.679 -91270.969
20 417.38493 -10416.08 0 -10412.681 -42816.133
30 434.34789 -10416.217 0 -10412.68 2459.83
40 423.05899 -10416.124 0 -10412.679 22936.209
Loop time of 0.837345 on 4 procs for 40 steps with 64 atoms
Performance: 4.127 ns/day, 5.815 hours/ns, 47.770 timesteps/s
96.0% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.73144 | 0.79214 | 0.83586 | 4.3 | 94.60
Neigh | 5.7936e-05 | 6.5327e-05 | 7.1049e-05 | 0.0 | 0.01
Comm | 0.00085807 | 0.044631 | 0.10532 | 18.0 | 5.33
Output | 0.00013208 | 0.00013494 | 0.00013733 | 0.0 | 0.02
Modify | 6.0558e-05 | 7.8678e-05 | 9.5129e-05 | 0.0 | 0.01
Other | | 0.0002971 | | | 0.04
Nlocal: 16 ave 18 max 14 min
Histogram: 1 0 1 0 0 0 0 1 0 1
Nghost: 174 ave 182 max 167 min
Histogram: 1 0 0 0 2 0 0 0 0 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 270 ave 294 max 237 min
Histogram: 1 0 0 0 1 0 0 0 1 1
Total # of neighbors = 1080
Ave neighs/atom = 16.875
Neighbor list builds = 2
Dangerous builds = 0
Total wall time: 0:00:00

View File

@ -0,0 +1,130 @@
LAMMPS (24 Jul 2017)
using 1 OpenMP thread(s) per MPI task
units metal
atom_style full
boundary p p p
timestep 0.0001 # 0.1 fs
read_data methane-box-8.data
orthogonal box = (-0.499095 -0.270629 0.131683) to (8.4109 8.63937 9.04168)
1 by 1 by 1 MPI processor grid
reading atoms ...
40 atoms
scanning bonds ...
4 = max bonds/atom
scanning angles ...
6 = max angles/atom
reading bonds ...
32 bonds
reading angles ...
48 angles
4 = max # of 1-2 neighbors
3 = max # of 1-3 neighbors
3 = max # of 1-4 neighbors
4 = max # of special neighbors
# DISCLAIMER: This potential mixes parameters from methane and silane
# potentials and is NOT intended to be a realistic representation of either
# system. It is meant to demonstrate the use of hybrid QUIP/LAMMPS potentials,
# including the use of separate 'special_bonds' settings.
pair_style hybrid/overlay lj/cut 8.0 quip
# exclusion setting for quip; cannot be exactly 1.0 1.0 1.0,
# since that would not flag 1-2, 1-3, and 1-4 pairs in lj/cut
special_bonds lj/coul 0.999999999 0.999999999 0.999999999
4 = max # of 1-2 neighbors
3 = max # of 1-3 neighbors
3 = max # of 1-4 neighbors
4 = max # of special neighbors
# Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996))
# Coulomb interactions ommitted for simplicity
pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT
pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC
pair_coeff 1 2 lj/cut 0.0019295487 2.95
pair_modify shift no
# change exclusion settings for lj/cut only: exclude bonded pairs
pair_modify pair lj/cut special lj/coul 0.0 0.0 0.0
# Intramolecular
# Tell QUIP to pretend this is silane (which is covered by the parameter file)
pair_coeff * * quip sw_example.xml "IP SW" 14 1
bond_style none
angle_style none
fix 1 all nve
# Include diagnostics that allow us to compare to a pure QUIP run
compute equip all pair quip
compute evdw all pair lj/cut
compute vir all pressure NULL virial
thermo_style custom step epair ke etotal temp press c_vir c_evdw c_equip
thermo 1
# dump 1 all custom 1 dump.molecular id type x y z fx fy fz
# dump_modify 1 sort id
run 10
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 10
ghost atom cutoff = 10
binsize = 5, bins = 2 2 2
2 neighbor lists, perpetual/occasional/extra = 2 0 0
(1) pair lj/cut, perpetual, half/full from (2)
attributes: half, newton on
pair build: halffull/newton
stencil: none
bin: none
(2) pair quip, perpetual
attributes: full, newton on
pair build: full/bin
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 8.288 | 8.288 | 8.288 Mbytes
Step E_pair KinEng TotEng Temp Press c_vir c_evdw c_equip
0 -5.3530213 0 -5.3530213 0 518847.56 518847.56 -0.10904079 -5.2439805
1 -5.9384459 0.58384822 -5.3545977 115.81657 517370.5 516488.87 -0.10783656 -5.8306093
2 -7.669616 2.3104051 -5.3592109 458.30954 512986.36 509497.58 -0.10422283 -7.5653932
3 -10.473314 5.1069211 -5.3663924 1013.0477 505833.04 498121.43 -0.098049469 -10.375264
4 -14.234705 8.859182 -5.3755227 1757.3747 496127.44 482749.79 -0.089147485 -14.145557
5 -18.806851 13.420941 -5.3859098 2662.28 484148.76 463882.72 -0.077305196 -18.729546
6 -24.021727 18.625147 -5.3965797 3694.6259 470219.95 442095.39 -0.06194509 -23.959782
7 -29.702647 24.295529 -5.4071176 4819.446 454683.57 417996.56 -0.042859727 -29.659787
8 -35.67405 30.257258 -5.4167913 6002.0599 437887.03 392197.62 -0.019248651 -35.654801
9 -41.771047 36.345757 -5.4252893 7209.8209 420163.51 365280.27 0.0096063065 -41.780653
10 -47.845522 42.413161 -5.4323614 8413.3973 401821.91 337776.7 0.044743702 -47.890266
Loop time of 0.0537777 on 1 procs for 10 steps with 40 atoms
Performance: 1.607 ns/day, 14.938 hours/ns, 185.951 timesteps/s
90.3% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.053478 | 0.053478 | 0.053478 | 0.0 | 99.44
Bond | 1.9073e-06 | 1.9073e-06 | 1.9073e-06 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 7.7724e-05 | 7.7724e-05 | 7.7724e-05 | 0.0 | 0.14
Output | 0.00018263 | 0.00018263 | 0.00018263 | 0.0 | 0.34
Modify | 1.5974e-05 | 1.5974e-05 | 1.5974e-05 | 0.0 | 0.03
Other | | 2.122e-05 | | | 0.04
Nlocal: 40 ave 40 max 40 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 1175 ave 1175 max 1175 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 4768 ave 4768 max 4768 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 9536 ave 9536 max 9536 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 9536
Ave neighs/atom = 238.4
Ave special neighs/atom = 4
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:00

View File

@ -0,0 +1,130 @@
LAMMPS (24 Jul 2017)
using 1 OpenMP thread(s) per MPI task
units metal
atom_style full
boundary p p p
timestep 0.0001 # 0.1 fs
read_data methane-box-8.data
orthogonal box = (-0.499095 -0.270629 0.131683) to (8.4109 8.63937 9.04168)
1 by 2 by 2 MPI processor grid
reading atoms ...
40 atoms
scanning bonds ...
4 = max bonds/atom
scanning angles ...
6 = max angles/atom
reading bonds ...
32 bonds
reading angles ...
48 angles
4 = max # of 1-2 neighbors
3 = max # of 1-3 neighbors
3 = max # of 1-4 neighbors
4 = max # of special neighbors
# DISCLAIMER: This potential mixes parameters from methane and silane
# potentials and is NOT intended to be a realistic representation of either
# system. It is meant to demonstrate the use of hybrid QUIP/LAMMPS potentials,
# including the use of separate 'special_bonds' settings.
pair_style hybrid/overlay lj/cut 8.0 quip
# exclusion setting for quip; cannot be exactly 1.0 1.0 1.0,
# since that would not flag 1-2, 1-3, and 1-4 pairs in lj/cut
special_bonds lj/coul 0.999999999 0.999999999 0.999999999
4 = max # of 1-2 neighbors
3 = max # of 1-3 neighbors
3 = max # of 1-4 neighbors
4 = max # of special neighbors
# Intermolecular: OPLS (JACS 118 (45), p. 11225 (1996))
# Coulomb interactions ommitted for simplicity
pair_coeff 1 1 lj/cut 0.0028619844 3.5 # CT
pair_coeff 2 2 lj/cut 0.0013009018 2.5 # HC
pair_coeff 1 2 lj/cut 0.0019295487 2.95
pair_modify shift no
# change exclusion settings for lj/cut only: exclude bonded pairs
pair_modify pair lj/cut special lj/coul 0.0 0.0 0.0
# Intramolecular
# Tell QUIP to pretend this is silane (which is covered by the parameter file)
pair_coeff * * quip sw_example.xml "IP SW" 14 1
bond_style none
angle_style none
fix 1 all nve
# Include diagnostics that allow us to compare to a pure QUIP run
compute equip all pair quip
compute evdw all pair lj/cut
compute vir all pressure NULL virial
thermo_style custom step epair ke etotal temp press c_vir c_evdw c_equip
thermo 1
# dump 1 all custom 1 dump.molecular id type x y z fx fy fz
# dump_modify 1 sort id
run 10
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 10
ghost atom cutoff = 10
binsize = 5, bins = 2 2 2
2 neighbor lists, perpetual/occasional/extra = 2 0 0
(1) pair lj/cut, perpetual, half/full from (2)
attributes: half, newton on
pair build: halffull/newton
stencil: none
bin: none
(2) pair quip, perpetual
attributes: full, newton on
pair build: full/bin
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 8.26 | 8.386 | 8.762 Mbytes
Step E_pair KinEng TotEng Temp Press c_vir c_evdw c_equip
0 -5.3530213 0 -5.3530213 0 518847.56 518847.56 -0.10904079 -5.2439805
1 -5.9384459 0.58384822 -5.3545977 115.81657 517370.5 516488.87 -0.10783656 -5.8306093
2 -7.669616 2.3104051 -5.3592109 458.30954 512986.36 509497.58 -0.10422283 -7.5653932
3 -10.473314 5.1069211 -5.3663924 1013.0477 505833.04 498121.43 -0.098049469 -10.375264
4 -14.234705 8.859182 -5.3755227 1757.3747 496127.44 482749.79 -0.089147485 -14.145557
5 -18.806851 13.420941 -5.3859098 2662.28 484148.76 463882.72 -0.077305196 -18.729546
6 -24.021727 18.625147 -5.3965797 3694.6259 470219.95 442095.39 -0.06194509 -23.959782
7 -29.702647 24.295529 -5.4071176 4819.446 454683.57 417996.56 -0.042859727 -29.659787
8 -35.67405 30.257258 -5.4167913 6002.0599 437887.03 392197.62 -0.019248651 -35.654801
9 -41.771047 36.345757 -5.4252893 7209.8209 420163.51 365280.27 0.0096063065 -41.780653
10 -47.845522 42.413161 -5.4323614 8413.3973 401821.91 337776.7 0.044743702 -47.890266
Loop time of 0.0506847 on 4 procs for 10 steps with 40 atoms
Performance: 1.705 ns/day, 14.079 hours/ns, 197.298 timesteps/s
94.4% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.04216 | 0.045656 | 0.049349 | 1.2 | 90.08
Bond | 1.9073e-06 | 2.4438e-06 | 2.861e-06 | 0.0 | 0.00
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00068545 | 0.004438 | 0.0079191 | 3.9 | 8.76
Output | 0.00048304 | 0.00053334 | 0.00060964 | 0.0 | 1.05
Modify | 1.1444e-05 | 1.4424e-05 | 1.9312e-05 | 0.0 | 0.03
Other | | 4.047e-05 | | | 0.08
Nlocal: 10 ave 15 max 6 min
Histogram: 1 0 0 1 1 0 0 0 0 1
Nghost: 878 ave 948 max 812 min
Histogram: 1 0 1 0 0 0 1 0 0 1
Neighs: 1192 ave 1764 max 731 min
Histogram: 1 0 0 1 1 0 0 0 0 1
FullNghs: 2384 ave 3527 max 1439 min
Histogram: 1 0 0 1 1 0 0 0 0 1
Total # of neighbors = 9536
Ave neighs/atom = 238.4
Ave special neighs/atom = 4
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:00

View File

@ -0,0 +1,83 @@
LAMMPS (24 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# Test of SW potential for Si system
units metal
boundary p p p
atom_style atomic
read_data data_sw
orthogonal box = (0 0 0) to (5.431 5.431 5.431)
1 by 1 by 1 MPI processor grid
reading atoms ...
8 atoms
pair_style quip
pair_coeff * * sw_example.xml "IP SW" 14
velocity all create 10.0 355311
neighbor 0.3 bin
neigh_modify delay 10
fix 1 all nve
thermo 10
timestep 0.001
#dump 1 all custom 10 dump.sw id fx fy fz
run 100
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 4.2258
ghost atom cutoff = 4.2258
binsize = 2.1129, bins = 3 3 3
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair quip, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 2.684 | 2.684 | 2.684 Mbytes
Step Temp E_pair E_mol TotEng Press
0 10 -34.68 0 -34.670952 32.206289
10 4.5659178 -34.675073 0 -34.670942 46.253731
20 1.606683 -34.672391 0 -34.670937 44.736892
30 6.7007748 -34.677011 0 -34.670948 16.403049
40 5.682757 -34.676087 0 -34.670945 18.696408
50 2.2140716 -34.672942 0 -34.670939 37.592282
60 5.0475382 -34.675512 0 -34.670944 37.331666
70 7.0990979 -34.677369 0 -34.670946 40.533757
80 5.7306189 -34.676128 0 -34.670943 47.748813
90 5.0895648 -34.675549 0 -34.670944 38.092721
100 4.1070919 -34.674659 0 -34.670943 28.737864
Loop time of 0.384233 on 1 procs for 100 steps with 8 atoms
Performance: 22.486 ns/day, 1.067 hours/ns, 260.259 timesteps/s
94.6% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.38365 | 0.38365 | 0.38365 | 0.0 | 99.85
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00017333 | 0.00017333 | 0.00017333 | 0.0 | 0.05
Output | 0.00014162 | 0.00014162 | 0.00014162 | 0.0 | 0.04
Modify | 7.081e-05 | 7.081e-05 | 7.081e-05 | 0.0 | 0.02
Other | | 0.0001957 | | | 0.05
Nlocal: 8 ave 8 max 8 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 162 ave 162 max 162 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 128 ave 128 max 128 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 128
Ave neighs/atom = 16
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:00

View File

@ -0,0 +1,83 @@
LAMMPS (24 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# Test of SW potential for Si system
units metal
boundary p p p
atom_style atomic
read_data data_sw
orthogonal box = (0 0 0) to (5.431 5.431 5.431)
1 by 2 by 2 MPI processor grid
reading atoms ...
8 atoms
pair_style quip
pair_coeff * * sw_example.xml "IP SW" 14
velocity all create 10.0 355311
neighbor 0.3 bin
neigh_modify delay 10
fix 1 all nve
thermo 10
timestep 0.001
#dump 1 all custom 10 dump.sw id fx fy fz
run 100
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 4.2258
ghost atom cutoff = 4.2258
binsize = 2.1129, bins = 3 3 3
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair quip, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 2.698 | 2.698 | 2.698 Mbytes
Step Temp E_pair E_mol TotEng Press
0 10 -34.68 0 -34.670952 32.206289
10 4.5659178 -34.675073 0 -34.670942 46.253731
20 1.606683 -34.672391 0 -34.670937 44.736892
30 6.7007748 -34.677011 0 -34.670948 16.403049
40 5.682757 -34.676087 0 -34.670945 18.696408
50 2.2140716 -34.672942 0 -34.670939 37.592282
60 5.0475382 -34.675512 0 -34.670944 37.331666
70 7.0990979 -34.677369 0 -34.670946 40.533757
80 5.7306189 -34.676128 0 -34.670943 47.748813
90 5.0895648 -34.675549 0 -34.670944 38.092721
100 4.1070919 -34.674659 0 -34.670943 28.737864
Loop time of 0.423803 on 4 procs for 100 steps with 8 atoms
Performance: 20.387 ns/day, 1.177 hours/ns, 235.959 timesteps/s
90.6% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.39332 | 0.40011 | 0.40704 | 0.8 | 94.41
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.015632 | 0.022605 | 0.029425 | 3.3 | 5.33
Output | 0.00025702 | 0.00028491 | 0.00035429 | 0.0 | 0.07
Modify | 7.3671e-05 | 8.1897e-05 | 8.9884e-05 | 0.0 | 0.02
Other | | 0.0007259 | | | 0.17
Nlocal: 2 ave 2 max 2 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Nghost: 113 ave 113 max 113 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 32 ave 32 max 32 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 128
Ave neighs/atom = 16
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:00

2
lib/.gitignore vendored
View File

@ -1 +1,3 @@
Makefile.lammps
.depend
Makefile.auto

View File

@ -4,24 +4,35 @@
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
from __future__ import print_function
import sys,os,subprocess
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
Syntax from src dir: make lib-libname args="-m machine -e suffix"
Syntax from lib dir: python Install.py -m machine -e suffix
libname = name of lib dir (e.g. atc, h5md, meam, poems, etc)
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
Examples:
make lib-poems args="-m serial" # build POEMS lib with same settings as in the serial Makefile in src
make lib-colvars args="-m mpi" # build USER-COLVARS lib with same settings as in the mpi Makefile in src
make lib-meam args="-m ifort" # build MEAM lib with custom Makefile.ifort (using Intel Fortran)
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
if not str: print(help)
else: print("ERROR",str)
sys.exit()
# parse args
@ -38,12 +49,12 @@ while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
iarg += 2
else: error()
# set lib from working dir
@ -53,30 +64,38 @@ lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
has_extramake = False
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
if len(words) == 3 and words[0] == "EXTRAMAKE" and words[1] == '=':
has_extramake = True
if extraflag:
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
fp.write(line)
fp.close()
# make the library via Makefile.auto
# make the library via Makefile.auto optionally with parallel make
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
try:
import multiprocessing
n_cpus = multiprocessing.cpu_count()
except:
n_cpus = 1
if os.path.exists("lib%s.a" % lib): print "Build was successful"
print("Building lib%s.a ..." % lib)
cmd = "make -f Makefile.auto clean; make -f Makefile.auto -j%d" % n_cpus
txt = subprocess.check_output(cmd,shell=True,stderr=subprocess.STDOUT)
print(txt.decode('UTF-8'))
if os.path.exists("lib%s.a" % lib): print("Build was successful")
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib
if has_extramake and not os.path.exists("Makefile.lammps"):
print("lib/%s/Makefile.lammps was NOT created" % lib)

View File

@ -1,82 +0,0 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

1
lib/atc/Install.py Symbolic link
View File

@ -0,0 +1 @@
../Install.py

View File

@ -1,3 +1,4 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
@ -5,6 +6,7 @@ SHELL = /bin/sh
EXTRAMAKE = Makefile.lammps.installed
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
@ -47,5 +49,9 @@ DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
.PHONY: clean lib
clean:
-rm *.o *.d *~ $(LIB)
sinclude $(DEPENDS)

View File

@ -1,67 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
DIR = Obj_mingw32/
LIB = $(DIR)libatc.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = i686-w64-mingw32-g++
CCFLAGS = -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \
-O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \
-ffast-math -funroll-loops -fstrict-aliasing \
-DLAMMPS_SMALLSMALL -Wno-uninitialized
ARCHIVE = i686-w64-mingw32-ar
ARCHFLAG = -rcs
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm $(DIR)*.o $(DIR)*.d *~ $(LIB)
$(DEPENDS) : $(DIR)
sinclude $(DEPENDS)

View File

@ -1,68 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
DIR = Obj_mingw32-mpi/
LIB = $(DIR)libatc.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = i686-w64-mingw32-g++
CCFLAGS = -I../../tools/mingw-cross/mpich2-win32/include/ \
-I../../src -DMPICH_IGNORE_CXX_SEEK \
-O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \
-ffast-math -funroll-loops -fstrict-aliasing \
-DLAMMPS_SMALLSMALL -Wno-uninitialized
ARCHIVE = i686-w64-mingw32-ar
ARCHFLAG = -rcs
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm $(DIR)*.o $(DIR)*.d *~ $(LIB)
$(DEPENDS) : $(DIR)
sinclude $(DEPENDS)

View File

@ -1,67 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
DIR = Obj_mingw64/
LIB = $(DIR)libatc.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = x86_64-w64-mingw32-g++
CCFLAGS = -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \
-O3 -march=core2 -mtune=core2 -mpc64 -msse2 \
-ffast-math -funroll-loops -fstrict-aliasing \
-DLAMMPS_SMALLBIG -Wno-uninitialized
ARCHIVE = x86_64-w64-mingw32-ar
ARCHFLAG = -rcs
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm $(DIR)*.o $(DIR)*.d *~ $(LIB)
$(DEPENDS) : $(DIR)
sinclude $(DEPENDS)

View File

@ -1,68 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
DIR = Obj_mingw64-mpi/
LIB = $(DIR)libatc.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = x86_64-w64-mingw32-g++
CCFLAGS = -I../../tools/mingw-cross/mpich2-win64/include/ \
-I../../src -DMPICH_IGNORE_CXX_SEEK \
-O3 -march=core2 -mtune=core2 -mpc64 -msse2 \
-ffast-math -funroll-loops -fstrict-aliasing \
-DLAMMPS_SMALLBIG -Wno-uninitialized
ARCHIVE = x86_64-w64-mingw32-ar
ARCHFLAG = -rcs
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
USRLIB =
SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm $(DIR)*.o $(DIR)*.d *~ $(LIB)
$(DEPENDS) : $(DIR)
sinclude $(DEPENDS)

55
lib/atc/Makefile.mpi Normal file
View File

@ -0,0 +1,55 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
LIB = libatc.a
OBJ = $(SRC:.cpp=.o)
default: lib
# ------ SETTINGS ------
.PHONY: clean lib depend
# include any MPI settings needed for the ATC library to build with
# must be the same MPI library that LAMMPS is built with
CC = mpicxx
CCFLAGS = -O3 -Wall -g -fPIC
CPPFLAGS = -I../../src -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1
ARCHIVE = ar
ARCHFLAG = -rc
# ------ MAKE PROCEDURE ------
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
%.o:%.cpp
$(CC) $(CPPFLAGS) $(CCFLAGS) -c $<
# ------ DEPENDENCIES ------
depend .depend : fastdep.exe $(SRC)
@./fastdep.exe $(INCFLAGS) -- $^ > .depend || exit 1
fastdep.exe: ../../src/DEPEND/fastdep.c
@cc -O -o $@ $<
# ------ CLEAN ------
clean:
-rm -f *.o *~ .depend $(LIB) fastdep.exe
sinclude $(DEPENDS)

View File

@ -1,39 +0,0 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.installed
# ------ FILES ------
SRC = $(wildcard *.cpp)
INC = $(wildcard *.h)
# ------ DEFINITIONS ------
LIB = libatc.a
OBJ = $(SRC:.cpp=.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# must be the same MPI library that LAMMPS is built with
CC = mpic++
CCFLAGS = -O3 -Wall -g -I../../src -fPIC -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1
ARCHIVE = ar
ARCHFLAG = -rc
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
# ------ MAKE PROCEDURE ------
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
%.o:%.cpp
$(CC) $(CCFLAGS) -c $<
%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm *.o *.d *~ $(LIB)
sinclude $(DEPENDS)

1
lib/atc/Makefile.mpic++ Symbolic link
View File

@ -0,0 +1 @@
Makefile.mpi

View File

@ -14,18 +14,20 @@ INC = $(wildcard *.h)
LIB = libatc.a
OBJ = $(SRC:.cpp=.o)
default: lib
# ------ SETTINGS ------
.PHONY: clean lib depend
# include any MPI settings needed for the ATC library to build with
# must be the same MPI library that LAMMPS is built with
CC = g++
CCFLAGS = -O -g -fPIC -I../../src -I../../src/STUBS
CCFLAGS = -O3 -g -fPIC
CPPFLAGS = -I../../src -I../../src/STUBS
ARCHIVE = ar
ARCHFLAG = -rc
DEPFLAGS = -M
LINK = $(CC)
LINKFLAGS = -O
# ------ MAKE PROCEDURE ------
lib: $(OBJ)
@ -35,17 +37,19 @@ lib: $(OBJ)
# ------ COMPILE RULES ------
%.o:%.cpp
$(CC) $(CCFLAGS) -c $<
%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
$(CC) $(CPPFLAGS) $(CCFLAGS) -c $<
# ------ DEPENDENCIES ------
DEPENDS = $(OBJ:.o=.d)
depend .depend : fastdep.exe $(SRC)
@./fastdep.exe $(INCFLAGS) -- $^ > .depend || exit 1
fastdep.exe: ../../src/DEPEND/fastdep.c
@cc -O -o $@ $<
# ------ CLEAN ------
clean:
-rm *.o *.d *~ $(LIB)
-rm -f *.o *~ .depend $(LIB) fastdep.exe
sinclude $(DEPENDS)
sinclude .depend

View File

@ -1,82 +0,0 @@
#!/usr/bin/env python
# install.py tool to do a generic build of a library
# soft linked to by many of the lib/Install.py files
# used to automate the steps described in the corresponding lib/README
import sys,commands,os
# help message
help = """
Syntax: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
machine = suffix of a lib/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
does not alter existing Makefile.machine
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
sys.exit()
# parse args
args = sys.argv[1:]
nargs = len(args)
if nargs == 0: error()
machine = None
extraflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > nargs: error()
machine = args[iarg+1]
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > nargs: error()
extraflag = 1
suffix = args[iarg+1]
iarg += 2
else: error()
# set lib from working dir
cwd = os.getcwd()
lib = os.path.basename(cwd)
# create Makefile.auto as copy of Makefile.machine
# reset EXTRAMAKE if requested
if not os.path.exists("Makefile.%s" % machine):
error("lib/%s/Makefile.%s does not exist" % (lib,machine))
lines = open("Makefile.%s" % machine,'r').readlines()
fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) == 3 and extraflag and \
words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % suffix)
print >>fp,line,
fp.close()
# make the library via Makefile.auto
print "Building lib%s.a ..." % lib
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
txt = commands.getoutput(cmd)
print txt
if os.path.exists("lib%s.a" % lib): print "Build was successful"
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))
if not os.path.exists("Makefile.lammps"):
print "lib/%s/Makefile.lammps was NOT created" % lib

1
lib/awpmd/Install.py Symbolic link
View File

@ -0,0 +1 @@
../Install.py

View File

@ -1,13 +0,0 @@
# -*- makefile -*- wrapper for non-MPI libraries
SHELL=/bin/sh
all:
$(MAKE) $(MFLAGS) mingw32-cross
rm -f Obj_mingw32-mpi
ln -s Obj_mingw32 Obj_mingw32-mpi
clean:
$(MAKE) $(MFLAGS) clean-mingw32-cross
rm -f Obj_mingw32-mpi

View File

@ -1,13 +0,0 @@
# -*- makefile -*- wrapper for non-MPI libraries
SHELL=/bin/sh
all:
$(MAKE) $(MFLAGS) mingw64-cross
rm -f Obj_mingw64-mpi
ln -s Obj_mingw64 Obj_mingw64-mpi
clean:
$(MAKE) $(MFLAGS) clean-mingw64-cross
rm -f Obj_mingw64-mpi

View File

@ -1,4 +1,3 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
@ -7,9 +6,10 @@ EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = logexc.cpp wpmd.cpp wpmd_split.cpp
vpath %.cpp ivutils/src
vpath %.cpp systems/interact/TCP
SRC = \
ivutils/src/logexc.cpp \
systems/interact/TCP/wpmd.cpp \
systems/interact/TCP/wpmd_split.cpp
INC = \
cerf.h \
@ -27,21 +27,21 @@ INC = \
wpmd_split.h
# ------ DEFINITIONS ------
DIR = Obj_mingw64/
LIB = $(DIR)libawpmd.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
LIB = libawpmd.a
OBJ = $(SRC:.cpp=.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = x86_64-w64-mingw32-g++
CCFLAGS = -O3 -march=core2 -mtune=core2 -mpc64 -msse2 \
-ffast-math -funroll-loops -fstrict-aliasing \
-Wall -W -Wno-uninitialized -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include
ARCHIVE = x86_64-w64-mingw32-ar
ARCHFLAG = -rscv
CC = mpicxx
CCFLAGS = -O3 -fPIC -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include \
-DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1
ARCHIVE = ar
ARCHFLAG = -rc
DEPFLAGS = -M
#LINK =
#LINKFLAGS =
@ -50,23 +50,15 @@ SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
@ -76,4 +68,4 @@ DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm *.d *~ $(OBJ) $(LIB)
-rm -f *.d *~ $(OBJ) $(LIB)

View File

@ -36,8 +36,10 @@ OBJ = $(SRC:.cpp=.o)
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = mpic++
CCFLAGS = -O -fPIC -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include
CC = mpicxx
CCFLAGS = -O3 -fPIC -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include \
-DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1
ARCHIVE = ar
ARCHFLAG = -rc
DEPFLAGS = -M
@ -66,4 +68,4 @@ DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm *.d *~ $(OBJ) $(LIB)
-rm -f *.d *~ $(OBJ) $(LIB)

View File

@ -1,4 +1,3 @@
# library build -*- makefile -*-
SHELL = /bin/sh
# which file will be copied to Makefile.lammps
@ -7,9 +6,10 @@ EXTRAMAKE = Makefile.lammps.linalg
# ------ FILES ------
SRC = logexc.cpp wpmd.cpp wpmd_split.cpp
vpath %.cpp ivutils/src
vpath %.cpp systems/interact/TCP
SRC = \
ivutils/src/logexc.cpp \
systems/interact/TCP/wpmd.cpp \
systems/interact/TCP/wpmd_split.cpp
INC = \
cerf.h \
@ -27,22 +27,21 @@ INC = \
wpmd_split.h
# ------ DEFINITIONS ------
DIR = Obj_mingw32/
LIB = $(DIR)libawpmd.a
OBJ = $(SRC:%.cpp=$(DIR)%.o)
LIB = libawpmd.a
OBJ = $(SRC:.cpp=.o)
# ------ SETTINGS ------
# include any MPI settings needed for the ATC library to build with
# the same MPI library that LAMMPS is built with
CC = i686-w64-mingw32-g++
CCFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \
-finline-functions \
-ffast-math -funroll-loops -fstrict-aliasing \
-Wall -W -Wno-uninitialized -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include
ARCHIVE = i686-w64-mingw32-ar
ARCHFLAG = -rscv
CC = g++
CCFLAGS = -O3 -fPIC -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include \
-I../../src/STUBS
ARCHIVE = ar
ARCHFLAG = -rc
DEPFLAGS = -M
#LINK =
#LINKFLAGS =
@ -51,23 +50,15 @@ SYSLIB =
# ------ MAKE PROCEDURE ------
default: $(DIR) $(LIB) Makefile.lammps
$(DIR):
mkdir $(DIR)
Makefile.lammps:
@cp $(EXTRAMAKE) Makefile.lammps
$(LIB): $(OBJ)
lib: $(OBJ)
$(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ)
@cp $(EXTRAMAKE) Makefile.lammps
# ------ COMPILE RULES ------
$(DIR)%.o:%.cpp
%.o:%.cpp
$(CC) $(CCFLAGS) -c $< -o $@
$(DIR)%.d:%.cpp
%.d:%.cpp
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
# ------ DEPENDENCIES ------
@ -77,4 +68,4 @@ DEPENDS = $(OBJ:.o=.d)
# ------ CLEAN ------
clean:
-rm *.d *~ $(OBJ) $(LIB)
-rm -f *.d *~ $(OBJ) $(LIB)

View File

@ -13,7 +13,7 @@ Syntax from lib/colvars dir: python Install.py -m machine -e suffix
specify -m and optionally -e, order does not matter
-m = peform a clean followed by "make -f Makefile.machine"
-m = delete all existing objects, followed by "make -f Makefile.machine"
machine = suffix of a lib/colvars/Makefile.* or of a
src/MAKE/MACHINES/Makefile.* file
-e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix
@ -21,14 +21,14 @@ specify -m and optionally -e, order does not matter
Examples:
make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler
make lib-colvars args="-m mpi" # build COLVARS lib with default mpi compiler wrapper
"""
# print error message or help
def error(str=None):
if not str: print(help)
else: print("ERROR"),str
else: print("ERROR",str)
sys.exit()
# parse args
@ -45,12 +45,12 @@ while iarg < nargs:
if args[iarg] == "-m":
if iarg+2 > len(args): error()
machine = args[iarg+1]
iarg += 2
iarg += 2
elif args[iarg] == "-e":
if iarg+2 > len(args): error()
extraflag = True
suffix = args[iarg+1]
iarg += 2
iarg += 2
else: error()
# set lib from working dir
@ -122,7 +122,7 @@ for line in lines:
fp.write(line)
fp.close()
# make the library via Makefile.auto
# make the library via Makefile.auto optionally with parallel make
try:
import multiprocessing
@ -132,9 +132,9 @@ except:
print("Building lib%s.a ..." % lib)
cmd = ["make -f Makefile.auto clean"]
print(subprocess.check_output(cmd, shell=True).decode())
print(subprocess.check_output(cmd, shell=True).decode('UTF-8'))
cmd = ["make -f Makefile.auto -j%d" % n_cpus]
print(subprocess.check_output(cmd, shell=True).decode())
print(subprocess.check_output(cmd, shell=True).decode('UTF-8'))
if os.path.exists("lib%s.a" % lib): print("Build was successful")
else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib))

View File

@ -1,31 +0,0 @@
# -*- makefile -*- to build Colvars module with MinGW 32-bit
EXTRAMAKE = Makefile.lammps.empty
COLVARS_LIB = libcolvars.a
COLVARS_OBJ_DIR = Obj_mingw64/
CXX = i686-w64-mingw32-g++
CXXFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \
-fno-rtti -fno-exceptions -finline-functions \
-ffast-math -funroll-loops -fstrict-aliasing \
-Wall -W -Wno-uninitialized
AR = i686-w64-mingw32-ar
ARFLAGS = -rscv
SHELL = /bin/sh
.PHONY: default clean
default: $(COLVARS_OBJ_DIR) $(COLVARS_LIB) Makefile.lammps
include Makefile.common
$(COLVARS_OBJ_DIR):
mkdir $(COLVARS_OBJ_DIR)
clean:
-rm -f $(COLVARS_OBJS) $(COLVARS_LIB)
-rmdir $(COLVARS_OBJ_DIR)
Makefile.lammps:
-cp $(EXTRAMAKE) Makefile.lammps

View File

@ -1,13 +0,0 @@
# -*- makefile -*- wrapper for non-MPI libraries
SHELL=/bin/sh
all:
$(MAKE) $(MFLAGS) mingw32-cross
-rm -f Obj_mingw32-mpi
ln -s Obj_mingw32 Obj_mingw32-mpi
clean:
$(MAKE) $(MFLAGS) clean-mingw32-cross
-rm -f Obj_mingw32-mpi

View File

@ -1,31 +0,0 @@
# -*- makefile -*- to build Colvars module with MinGW 32-bit
EXTRAMAKE = Makefile.lammps.empty
COLVARS_LIB = libcolvars.a
COLVARS_OBJ_DIR = Obj_mingw32/
CXX = x86_64-w64-mingw32-g++
CXXFLAGS = -O2 -march=core2 -mtune=core2 -mpc64 -msse2 \
-fno-rtti -fno-exceptions -finline-functions \
-ffast-math -funroll-loops -fstrict-aliasing \
-Wall -W -Wno-uninitialized
AR = x86_64-w64-mingw32-ar
ARFLAGS = -rscv
SHELL = /bin/sh
.PHONY: default clean
default: $(COLVARS_OBJ_DIR) $(COLVARS_LIB) Makefile.lammps
include Makefile.common
$(COLVARS_OBJ_DIR):
mkdir $(COLVARS_OBJ_DIR)
clean:
-rm -f $(COLVARS_OBJS) $(COLVARS_LIB)
-rmdir $(COLVARS_OBJ_DIR)
Makefile.lammps:
-cp $(EXTRAMAKE) Makefile.lammps

View File

@ -1,13 +0,0 @@
# -*- makefile -*- wrapper for non-MPI libraries
SHELL=/bin/sh
all:
$(MAKE) $(MFLAGS) mingw64-cross
-rm -f Obj_mingw64-mpi
ln -s Obj_mingw64 Obj_mingw64-mpi
clean:
$(MAKE) $(MFLAGS) clean-mingw64-cross
-rm -f Obj_mingw64-mpi

25
lib/colvars/Makefile.mpi Normal file
View File

@ -0,0 +1,25 @@
# -*- makefile -*- to build Colvars module with default MPI compiler wrapper
EXTRAMAKE = Makefile.lammps.empty
COLVARS_LIB = libcolvars.a
COLVARS_OBJ_DIR =
CXX = mpicxx
CXXFLAGS = -O2 -g -Wall -fPIC -funroll-loops
AR = ar
ARFLAGS = -rscv
SHELL = /bin/sh
.PHONY: default clean
default: $(COLVARS_LIB) Makefile.lammps
include Makefile.common
clean:
-rm -f $(COLVARS_OBJS) $(COLVARS_LIB)
Makefile.lammps:
-cp $(EXTRAMAKE) Makefile.lammps

View File

@ -0,0 +1,25 @@
# -*- makefile -*- to build Colvars module with GNU compiler
EXTRAMAKE = Makefile.lammps.empty
COLVARS_LIB = libcolvars.a
COLVARS_OBJ_DIR =
CXX = g++
CXXFLAGS = -O2 -g -Wall -fPIC -funroll-loops
AR = ar
ARFLAGS = -rscv
SHELL = /bin/sh
.PHONY: default clean
default: $(COLVARS_LIB) Makefile.lammps
include Makefile.common
clean:
-rm -f $(COLVARS_OBJS) $(COLVARS_LIB)
Makefile.lammps:
-cp $(EXTRAMAKE) Makefile.lammps

View File

@ -32,7 +32,7 @@ where Makefile.g++ uses the GNU C++ compiler and is a good template to start.
**Optional**: if you use the Install.py script provided in this folder, you
can give the machine name as the '-m' argument. This can be the suffix of one
of the files from either this folder, or from src/MAKE.
of the files from either this folder, or from src/MAKE/MACHINES.
*This is only supported by the Install.py within the lib/colvars folder*.
When you are done building this library, two files should
@ -53,10 +53,10 @@ settings in Makefile.common should work.
For the reference manual see:
http://colvars.github.io/colvars-refman-lammps
A copy of reference manual is also in:
A copy of the reference manual is also in:
doc/PDF/colvars-refman-lammps.pdf
Also included is a Doxygen-based developer documentation:
Also available is a Doxygen-based developer documentation:
http://colvars.github.io/doxygen/html/
The reference article is:

View File

@ -88,7 +88,12 @@ public:
static std::vector<feature *> cv_features;
/// \brief Implementation of the feature list accessor for colvar
std::vector<feature *> &features() {
virtual const std::vector<feature *> &features()
{
return cv_features;
}
virtual std::vector<feature *> &modify_features()
{
return cv_features;
}

View File

@ -206,7 +206,12 @@ public:
static std::vector<feature *> ag_features;
/// \brief Implementation of the feature list accessor for atom group
virtual std::vector<feature *> &features() {
virtual const std::vector<feature *> &features()
{
return ag_features;
}
virtual std::vector<feature *> &modify_features()
{
return ag_features;
}

View File

@ -384,6 +384,7 @@ std::ostream & colvarbias::write_traj(std::ostream &os)
os << " ";
if (b_output_energy)
os << " "
<< std::setprecision(cvm::en_prec) << std::setw(cvm::en_width)
<< bias_energy;
return os;
}

View File

@ -175,7 +175,11 @@ public:
static std::vector<feature *> cvb_features;
/// \brief Implementation of the feature list accessor for colvarbias
virtual std::vector<feature *> &features()
virtual const std::vector<feature *> &features()
{
return cvb_features;
}
virtual std::vector<feature *> &modify_features()
{
return cvb_features;
}

View File

@ -99,12 +99,9 @@ int colvarbias_restraint_centers::init(std::string const &conf)
if (null_centers) {
// try to initialize the restraint centers for the first time
colvar_centers.resize(num_variables());
colvar_centers_raw.resize(num_variables());
for (i = 0; i < num_variables(); i++) {
colvar_centers[i].type(variables(i)->value());
colvar_centers[i].reset();
colvar_centers_raw[i].type(variables(i)->value());
colvar_centers_raw[i].reset();
}
}
@ -113,7 +110,6 @@ int colvarbias_restraint_centers::init(std::string const &conf)
if (cvm::debug()) {
cvm::log("colvarbias_restraint: parsing initial centers, i = "+cvm::to_str(i)+".\n");
}
colvar_centers_raw[i] = colvar_centers[i];
colvar_centers[i].apply_constraints();
}
null_centers = false;
@ -141,8 +137,6 @@ int colvarbias_restraint_centers::change_configuration(std::string const &conf)
for (size_t i = 0; i < num_variables(); i++) {
colvar_centers[i].type(variables(i)->value());
colvar_centers[i].apply_constraints();
colvar_centers_raw[i].type(variables(i)->value());
colvar_centers_raw[i] = colvar_centers[i];
}
}
return COLVARS_OK;
@ -232,7 +226,6 @@ int colvarbias_restraint_moving::set_state_params(std::string const &conf)
{
if (b_chg_centers || b_chg_force_k) {
if (target_nstages) {
// cvm::log ("Reading current stage from the restart.\n");
if (!get_keyval(conf, "stage", stage))
cvm::error("Error: current stage is missing from the restart.\n");
}
@ -265,100 +258,127 @@ int colvarbias_restraint_centers_moving::init(std::string const &conf)
size_t i;
if (get_keyval(conf, "targetCenters", target_centers, colvar_centers)) {
if (colvar_centers.size() != num_variables()) {
if (target_centers.size() != num_variables()) {
cvm::error("Error: number of target centers does not match "
"that of collective variables.\n");
"that of collective variables.\n", INPUT_ERROR);
}
b_chg_centers = true;
for (i = 0; i < target_centers.size(); i++) {
target_centers[i].apply_constraints();
centers_incr.push_back(colvar_centers[i]);
centers_incr[i].reset();
}
}
if (b_chg_centers) {
// parse moving restraint options
// parse moving schedule options
colvarbias_restraint_moving::init(conf);
if (initial_centers.size() == 0) {
// One-time init
initial_centers = colvar_centers;
}
// Call to check that the definition is correct
for (i = 0; i < num_variables(); i++) {
colvarvalue const midpoint =
colvarvalue::interpolate(initial_centers[i],
target_centers[i],
0.5);
}
} else {
target_centers.clear();
return COLVARS_OK;
}
get_keyval(conf, "outputCenters", b_output_centers, b_output_centers);
get_keyval(conf, "outputAccumulatedWork", b_output_acc_work, b_output_acc_work);
get_keyval(conf, "outputAccumulatedWork", b_output_acc_work,
b_output_acc_work); // TODO this conflicts with stages
return COLVARS_OK;
}
int colvarbias_restraint_centers_moving::update_centers(cvm::real lambda)
{
if (cvm::debug()) {
cvm::log("Updating centers for the restraint bias \""+
this->name+"\": "+cvm::to_str(colvar_centers)+".\n");
}
size_t i;
for (i = 0; i < num_variables(); i++) {
colvarvalue const c_new = colvarvalue::interpolate(initial_centers[i],
target_centers[i],
lambda);
centers_incr[i] = (c_new).dist2_grad(colvar_centers[i]);
colvar_centers[i] = c_new;
variables(i)->wrap(colvar_centers[i]);
}
if (cvm::debug()) {
cvm::log("New centers for the restraint bias \""+
this->name+"\": "+cvm::to_str(colvar_centers)+".\n");
}
return cvm::get_error();
}
int colvarbias_restraint_centers_moving::update()
{
if (b_chg_centers) {
if (cvm::debug()) {
cvm::log("Updating centers for the restraint bias \""+
this->name+"\": "+cvm::to_str(colvar_centers)+".\n");
}
if (!centers_incr.size()) {
// if this is the first calculation, calculate the advancement
// at each simulation step (or stage, if applicable)
// (take current stage into account: it can be non-zero
// if we are restarting a staged calculation)
centers_incr.resize(num_variables());
for (size_t i = 0; i < num_variables(); i++) {
centers_incr[i].type(variables(i)->value());
centers_incr[i] = (target_centers[i] - colvar_centers_raw[i]) /
cvm::real( target_nstages ? (target_nstages - stage) :
(target_nsteps - cvm::step_absolute()));
}
if (cvm::debug()) {
cvm::log("Center increment for the restraint bias \""+
this->name+"\": "+cvm::to_str(centers_incr)+" at stage "+cvm::to_str(stage)+ ".\n");
}
}
if (target_nstages) {
if ((cvm::step_relative() > 0)
&& (cvm::step_absolute() % target_nsteps) == 0
&& stage < target_nstages) {
for (size_t i = 0; i < num_variables(); i++) {
colvar_centers_raw[i] += centers_incr[i];
colvar_centers[i] = colvar_centers_raw[i];
variables(i)->wrap(colvar_centers[i]);
colvar_centers[i].apply_constraints();
// Staged update
if (stage <= target_nstages) {
if ((cvm::step_relative() > 0) &&
((cvm::step_absolute() % target_nsteps) == 1)) {
cvm::real const lambda =
cvm::real(stage)/cvm::real(target_nstages);
update_centers(lambda);
stage++;
cvm::log("Moving restraint \"" + this->name +
"\" stage " + cvm::to_str(stage) +
" : setting centers to " + cvm::to_str(colvar_centers) +
" at step " + cvm::to_str(cvm::step_absolute()));
} else {
for (size_t i = 0; i < num_variables(); i++) {
centers_incr[i].reset();
}
}
stage++;
cvm::log("Moving restraint \"" + this->name +
"\" stage " + cvm::to_str(stage) +
" : setting centers to " + cvm::to_str(colvar_centers) +
" at step " + cvm::to_str(cvm::step_absolute()));
}
} else if ((cvm::step_relative() > 0) && (cvm::step_absolute() <= target_nsteps)) {
// move the restraint centers in the direction of the targets
// (slow growth)
} else {
// Continuous update
if (cvm::step_absolute() <= target_nsteps) {
cvm::real const lambda =
cvm::real(cvm::step_absolute())/cvm::real(target_nsteps);
update_centers(lambda);
} else {
for (size_t i = 0; i < num_variables(); i++) {
centers_incr[i].reset();
}
}
}
if (cvm::step_relative() == 0) {
for (size_t i = 0; i < num_variables(); i++) {
colvar_centers_raw[i] += centers_incr[i];
colvar_centers[i] = colvar_centers_raw[i];
variables(i)->wrap(colvar_centers[i]);
colvar_centers[i].apply_constraints();
// finite differences are undefined when restarting
centers_incr[i].reset();
}
}
if (cvm::debug()) {
cvm::log("New centers for the restraint bias \""+
this->name+"\": "+cvm::to_str(colvar_centers)+".\n");
cvm::log("Center increment for the restraint bias \""+
this->name+"\": "+cvm::to_str(centers_incr)+
" at stage "+cvm::to_str(stage)+ ".\n");
}
}
return COLVARS_OK;
return cvm::get_error();
}
int colvarbias_restraint_centers_moving::update_acc_work()
{
if (b_output_acc_work) {
if ((cvm::step_relative() > 0) || (cvm::step_absolute() == 0)) {
if ((cvm::step_relative() > 0) &&
(cvm::step_absolute() <= target_nsteps)) {
for (size_t i = 0; i < num_variables(); i++) {
// project forces on the calculated increments at this step
acc_work += colvar_forces[i] * centers_incr[i];
@ -383,13 +403,6 @@ std::string const colvarbias_restraint_centers_moving::get_state_params() const
<< colvar_centers[i];
}
os << "\n";
os << "centers_raw ";
for (i = 0; i < num_variables(); i++) {
os << " "
<< std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width)
<< colvar_centers_raw[i];
}
os << "\n";
if (b_output_acc_work) {
os << "accumulatedWork "
@ -398,7 +411,7 @@ std::string const colvarbias_restraint_centers_moving::get_state_params() const
}
}
return colvarbias_restraint_moving::get_state_params() + os.str();
return os.str();
}
@ -410,8 +423,6 @@ int colvarbias_restraint_centers_moving::set_state_params(std::string const &con
// cvm::log ("Reading the updated restraint centers from the restart.\n");
if (!get_keyval(conf, "centers", colvar_centers))
cvm::error("Error: restraint centers are missing from the restart.\n");
if (!get_keyval(conf, "centers_raw", colvar_centers_raw))
cvm::error("Error: \"raw\" restraint centers are missing from the restart.\n");
if (b_output_acc_work) {
if (!get_keyval(conf, "accumulatedWork", acc_work))
cvm::error("Error: accumulatedWork is missing from the restart.\n");
@ -609,7 +620,7 @@ std::string const colvarbias_restraint_k_moving::get_state_params() const
<< std::setprecision(cvm::en_prec)
<< std::setw(cvm::en_width) << force_k << "\n";
}
return colvarbias_restraint_moving::get_state_params() + os.str();
return os.str();
}
@ -770,6 +781,7 @@ cvm::real colvarbias_restraint_harmonic::d_restraint_potential_dk(size_t i) cons
std::string const colvarbias_restraint_harmonic::get_state_params() const
{
return colvarbias_restraint::get_state_params() +
colvarbias_restraint_moving::get_state_params() +
colvarbias_restraint_centers_moving::get_state_params() +
colvarbias_restraint_k_moving::get_state_params();
}
@ -779,6 +791,7 @@ int colvarbias_restraint_harmonic::set_state_params(std::string const &conf)
{
int error_code = COLVARS_OK;
error_code |= colvarbias_restraint::set_state_params(conf);
error_code |= colvarbias_restraint_moving::set_state_params(conf);
error_code |= colvarbias_restraint_centers_moving::set_state_params(conf);
error_code |= colvarbias_restraint_k_moving::set_state_params(conf);
return error_code;
@ -1037,6 +1050,7 @@ cvm::real colvarbias_restraint_harmonic_walls::d_restraint_potential_dk(size_t i
std::string const colvarbias_restraint_harmonic_walls::get_state_params() const
{
return colvarbias_restraint::get_state_params() +
colvarbias_restraint_moving::get_state_params() +
colvarbias_restraint_k_moving::get_state_params();
}
@ -1045,6 +1059,7 @@ int colvarbias_restraint_harmonic_walls::set_state_params(std::string const &con
{
int error_code = COLVARS_OK;
error_code |= colvarbias_restraint::set_state_params(conf);
error_code |= colvarbias_restraint_moving::set_state_params(conf);
error_code |= colvarbias_restraint_k_moving::set_state_params(conf);
return error_code;
}
@ -1164,6 +1179,7 @@ cvm::real colvarbias_restraint_linear::d_restraint_potential_dk(size_t i) const
std::string const colvarbias_restraint_linear::get_state_params() const
{
return colvarbias_restraint::get_state_params() +
colvarbias_restraint_moving::get_state_params() +
colvarbias_restraint_centers_moving::get_state_params() +
colvarbias_restraint_k_moving::get_state_params();
}
@ -1173,6 +1189,7 @@ int colvarbias_restraint_linear::set_state_params(std::string const &conf)
{
int error_code = COLVARS_OK;
error_code |= colvarbias_restraint::set_state_params(conf);
error_code |= colvarbias_restraint_moving::set_state_params(conf);
error_code |= colvarbias_restraint_centers_moving::set_state_params(conf);
error_code |= colvarbias_restraint_k_moving::set_state_params(conf);
return error_code;

View File

@ -74,9 +74,6 @@ protected:
/// \brief Restraint centers
std::vector<colvarvalue> colvar_centers;
/// \brief Restraint centers outside the domain of the colvars (no wrapping or constraints applied)
std::vector<colvarvalue> colvar_centers_raw;
};
@ -156,10 +153,16 @@ protected:
/// \brief New restraint centers
std::vector<colvarvalue> target_centers;
/// \brief Initial value of the restraint centers
std::vector<colvarvalue> initial_centers;
/// \brief Amplitude of the restraint centers' increment at each step
/// (or stage) towards the new values (calculated from target_nsteps)
/// towards the new values (calculated from target_nsteps)
std::vector<colvarvalue> centers_incr;
/// \brief Update the centers by interpolating between initial and target
virtual int update_centers(cvm::real lambda);
/// Whether to write the current restraint centers to the trajectory file
bool b_output_centers;

View File

@ -132,9 +132,15 @@ public:
static std::vector<feature *> cvc_features;
/// \brief Implementation of the feature list accessor for colvar
virtual std::vector<feature *> &features() {
virtual const std::vector<feature *> &features()
{
return cvc_features;
}
virtual std::vector<feature *> &modify_features()
{
return cvc_features;
}
/// \brief Obtain data needed for the calculation for the backend
virtual void read_data();

View File

@ -374,8 +374,8 @@ int colvardeps::decr_ref_count(int feature_id) {
}
void colvardeps::init_feature(int feature_id, const char *description, feature_type type) {
features()[feature_id]->description = description;
features()[feature_id]->type = type;
modify_features()[feature_id]->description = description;
modify_features()[feature_id]->type = type;
}
// Shorthand macros for describing dependencies
@ -401,7 +401,7 @@ void colvardeps::init_cvb_requires() {
int i;
if (features().size() == 0) {
for (i = 0; i < f_cvb_ntot; i++) {
features().push_back(new feature);
modify_features().push_back(new feature);
}
init_feature(f_cvb_active, "active", f_type_dynamic);
@ -438,7 +438,7 @@ void colvardeps::init_cv_requires() {
size_t i;
if (features().size() == 0) {
for (i = 0; i < f_cv_ntot; i++) {
features().push_back(new feature);
modify_features().push_back(new feature);
}
init_feature(f_cv_active, "active", f_type_dynamic);
@ -554,7 +554,7 @@ void colvardeps::init_cvc_requires() {
// Initialize static array once and for all
if (features().size() == 0) {
for (i = 0; i < colvardeps::f_cvc_ntot; i++) {
features().push_back(new feature);
modify_features().push_back(new feature);
}
init_feature(f_cvc_active, "active", f_type_dynamic);
@ -633,7 +633,7 @@ void colvardeps::init_ag_requires() {
// Initialize static array once and for all
if (features().size() == 0) {
for (i = 0; i < f_ag_ntot; i++) {
features().push_back(new feature);
modify_features().push_back(new feature);
}
init_feature(f_ag_active, "active", f_type_dynamic);

View File

@ -135,7 +135,8 @@ public:
// with a non-static array
// Intermediate classes (colvarbias and colvarcomp, which are also base classes)
// implement this as virtual to allow overriding
virtual std::vector<feature *>&features() = 0;
virtual const std::vector<feature *>&features() = 0;
virtual std::vector<feature *>&modify_features() = 0;
void add_child(colvardeps *child);

View File

@ -1,4 +1,5 @@
#define COLVARS_VERSION "2017-07-15"
#ifndef COLVARS_VERSION
#define COLVARS_VERSION "2017-08-06"
// This file is part of the Collective Variables module (Colvars).
// The original version of Colvars and its updates are located at:
// https://github.com/colvars/colvars
@ -6,3 +7,4 @@
// If you wish to distribute your changes, please submit them to the
// Colvars repository at GitHub.
#endif

View File

@ -472,7 +472,7 @@ int colvarscript::proc_features(colvardeps *obj,
}
if ((subcmd == "get") || (subcmd == "set")) {
std::vector<colvardeps::feature *> &features = obj->features();
std::vector<colvardeps::feature *> const &features = obj->features();
std::string const req_feature(obj_to_str(objv[3]));
colvardeps::feature *f = NULL;
int fid = 0;

View File

@ -19,6 +19,17 @@ bool colvarmodule::rotation::monitor_crossings = false;
cvm::real colvarmodule::rotation::crossing_threshold = 1.0E-02;
/// Numerical recipes diagonalization
static int jacobi(cvm::real **a, cvm::real *d, cvm::real **v, int *nrot);
/// Eigenvector sort
static int eigsrt(cvm::real *d, cvm::real **v);
/// Transpose the matrix
static int transpose(cvm::real **v);
std::string cvm::rvector::to_simple_string() const
{
std::ostringstream os;
@ -286,7 +297,12 @@ void colvarmodule::rotation::diagonalize_matrix(cvm::matrix2d<cvm::real> &S,
// diagonalize
int jac_nrot = 0;
jacobi(S.c_array(), S_eigval.c_array(), S_eigvec.c_array(), &jac_nrot);
if (jacobi(S.c_array(), S_eigval.c_array(), S_eigvec.c_array(), &jac_nrot) !=
COLVARS_OK) {
cvm::error("Too many iterations in routine jacobi.\n"
"This is usually the result of an ill-defined set of atoms for "
"rotational alignment (RMSD, rotateReference, etc).\n");
}
eigsrt(S_eigval.c_array(), S_eigvec.c_array());
// jacobi saves eigenvectors by columns
transpose(S_eigvec.c_array());
@ -528,7 +544,7 @@ void colvarmodule::rotation::calc_optimal_rotation(std::vector<cvm::atom_pos> co
#define n 4
void jacobi(cvm::real **a, cvm::real *d, cvm::real **v, int *nrot)
int jacobi(cvm::real **a, cvm::real *d, cvm::real **v, int *nrot)
{
int j,iq,ip,i;
cvm::real tresh,theta,tau,t,sm,s,h,g,c;
@ -554,7 +570,7 @@ void jacobi(cvm::real **a, cvm::real *d, cvm::real **v, int *nrot)
sm += std::fabs(a[ip][iq]);
}
if (sm == 0.0) {
return;
return COLVARS_OK;
}
if (i < 4)
tresh=0.2*sm/(n*n);
@ -606,10 +622,11 @@ void jacobi(cvm::real **a, cvm::real *d, cvm::real **v, int *nrot)
z[ip]=0.0;
}
}
cvm::error("Too many iterations in routine jacobi.\n");
return COLVARS_ERROR;
}
void eigsrt(cvm::real *d, cvm::real **v)
int eigsrt(cvm::real *d, cvm::real **v)
{
int k,j,i;
cvm::real p;
@ -628,9 +645,11 @@ void eigsrt(cvm::real *d, cvm::real **v)
}
}
}
return COLVARS_OK;
}
void transpose(cvm::real **v)
int transpose(cvm::real **v)
{
cvm::real p;
int i,j;
@ -641,6 +660,7 @@ void transpose(cvm::real **v)
v[j][i]=p;
}
}
return COLVARS_OK;
}
#undef n

View File

@ -1020,16 +1020,6 @@ inline cvm::rvector operator * (cvm::rmatrix const &m,
}
/// Numerical recipes diagonalization
void jacobi(cvm::real **a, cvm::real *d, cvm::real **v, int *nrot);
/// Eigenvector sort
void eigsrt(cvm::real *d, cvm::real **v);
/// Transpose the matrix
void transpose(cvm::real **v);
/// \brief 1-dimensional vector of real numbers with four components and

View File

@ -570,6 +570,50 @@ colvarvalue colvarvalue::dist2_grad(colvarvalue const &x2) const
}
/// Return the midpoint between x1 and x2, optionally weighted by lambda
/// (which must be between 0.0 and 1.0)
colvarvalue const colvarvalue::interpolate(colvarvalue const &x1,
colvarvalue const &x2,
cvm::real const lambda)
{
colvarvalue::check_types(x1, x2);
if ((lambda < 0.0) || (lambda > 1.0)) {
cvm::error("Error: trying to interpolate between two colvarvalues with a "
"lamdba outside [0:1].\n", BUG_ERROR);
}
colvarvalue interp = ((1.0-lambda)*x1 + lambda*x2);
cvm::real const d2 = x1.dist2(x2);
switch (x1.type()) {
case colvarvalue::type_scalar:
case colvarvalue::type_3vector:
case colvarvalue::type_vector:
case colvarvalue::type_unit3vectorderiv:
case colvarvalue::type_quaternionderiv:
return interp;
break;
case colvarvalue::type_unit3vector:
case colvarvalue::type_quaternion:
if (interp.norm()/std::sqrt(d2) < 1.0e-6) {
cvm::error("Error: interpolation between "+cvm::to_str(x1)+" and "+
cvm::to_str(x2)+" with lambda = "+cvm::to_str(lambda)+
" is undefined: result = "+cvm::to_str(interp)+"\n",
INPUT_ERROR);
}
interp.apply_constraints();
return interp;
break;
case colvarvalue::type_notset:
default:
x1.undef_op();
break;
}
return colvarvalue(colvarvalue::type_notset);
}
std::string colvarvalue::to_simple_string() const
{
switch (type()) {

View File

@ -193,6 +193,12 @@ public:
/// Derivative with respect to this \link colvarvalue \endlink of the square distance
colvarvalue dist2_grad(colvarvalue const &x2) const;
/// Return the midpoint between x1 and x2, optionally weighted by lambda
/// (which must be between 0.0 and 1.0)
static colvarvalue const interpolate(colvarvalue const &x1,
colvarvalue const &x2,
cvm::real const lambda = 0.5);
/// Assignment operator (type of x is checked)
colvarvalue & operator = (colvarvalue const &x);
@ -285,10 +291,10 @@ public:
cvm::real & operator [] (int const i);
/// Ensure that the two types are the same within a binary operator
int static check_types(colvarvalue const &x1, colvarvalue const &x2);
static int check_types(colvarvalue const &x1, colvarvalue const &x2);
/// Ensure that the two types are the same within an assignment, or that the left side is type_notset
int static check_types_assign(Type const &vt1, Type const &vt2);
static int check_types_assign(Type const &vt1, Type const &vt2);
/// Undefined operation
void undef_op() const;
@ -317,14 +323,14 @@ public:
/// \brief Optimized routine for the inner product of one collective
/// variable with an array
void static inner_opt(colvarvalue const &x,
static void inner_opt(colvarvalue const &x,
std::vector<colvarvalue>::iterator &xv,
std::vector<colvarvalue>::iterator const &xv_end,
std::vector<cvm::real>::iterator &result);
/// \brief Optimized routine for the inner product of one collective
/// variable with an array
void static inner_opt(colvarvalue const &x,
static void inner_opt(colvarvalue const &x,
std::list<colvarvalue>::iterator &xv,
std::list<colvarvalue>::iterator const &xv_end,
std::vector<cvm::real>::iterator &result);
@ -332,14 +338,14 @@ public:
/// \brief Optimized routine for the second order Legendre
/// polynomial, (3cos^2(w)-1)/2, of one collective variable with an
/// array
void static p2leg_opt(colvarvalue const &x,
static void p2leg_opt(colvarvalue const &x,
std::vector<colvarvalue>::iterator &xv,
std::vector<colvarvalue>::iterator const &xv_end,
std::vector<cvm::real>::iterator &result);
/// \brief Optimized routine for the second order Legendre
/// polynomial of one collective variable with an array
void static p2leg_opt(colvarvalue const &x,
static void p2leg_opt(colvarvalue const &x,
std::list<colvarvalue>::iterator &xv,
std::list<colvarvalue>::iterator const &xv_end,
std::vector<cvm::real>::iterator &result);

10
lib/gpu/.gitignore vendored
View File

@ -1,4 +1,6 @@
obj
obj_ocl
ocl_get_devices
nvc_get_devices
/obj
/obj_ocl
/ocl_get_devices
/nvc_get_devices
/*.cubin
/*_cubin.h

View File

@ -3,44 +3,57 @@
# Install.py tool to build the GPU library
# used to automate the steps described in the README file in this dir
import sys,os,re,commands
from __future__ import print_function
import sys,os,subprocess
# help message
help = """
Syntax: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix
specify one or more options, order does not matter
copies an existing Makefile.isuffix in lib/gpu to Makefile.auto
optionally edits these variables in Makefile.auto:
CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE
optionally uses Makefile.auto to build the GPU library -> libgpu.a
and to copy a Makefile.lammps.esuffix -> Makefile.lammps
optionally copies Makefile.auto to a new Makefile.osuffix
Syntax from src dir: make lib-gpu args="-m machine -h hdir -a arch -p precision -e esuffix -m -o osuffix"
Syntax from lib dir: python Install.py -m machine -h hdir -a arch -p precision -e esuffix -m -o osuffix
-i = use Makefile.isuffix as starting point, copy to Makefile.auto
default isuffix = linux
specify one or more options, order does not matter
copies an existing Makefile.machine in lib/gpu to Makefile.auto
optionally edits these variables in Makefile.auto:
CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE
optionally uses Makefile.auto to build the GPU library -> libgpu.a
and to copy a Makefile.lammps.esuffix -> Makefile.lammps
optionally copies Makefile.auto to a new Makefile.osuffix
-m = use Makefile.machine as starting point, copy to Makefile.auto
default machine = linux
-h = set CUDA_HOME variable in Makefile.auto to hdir
hdir = path to NVIDIA Cuda software, e.g. /usr/local/cuda
-a = set CUDA_ARCH variable in Makefile.auto to arch
use arch = ?? for K40 (Tesla)
use arch = 37 for dual K80 (Tesla)
use arch = 60 for P100 (Pascal)
use arch = 20 for Tesla C2050/C2070 (Fermi) (deprecated as of CUDA 8.0)
or GeForce GTX 580 or similar
use arch = 30 for Tesla K10 (Kepler)
use arch = 35 for Tesla K40 (Kepler) or GeForce GTX Titan or similar
use arch = 37 for Tesla dual K80 (Kepler)
use arch = 60 for Tesla P100 (Pascal)
-p = set CUDA_PRECISION variable in Makefile.auto to precision
use precision = double or mixed or single
-e = set EXTRAMAKE variable in Makefile.auto to Makefile.lammps.esuffix
-m = make the GPU library using Makefile.auto
-b = make the GPU library using Makefile.auto
first performs a "make clean"
produces libgpu.a if successful
then produces libgpu.a if successful
also copies EXTRAMAKE file -> Makefile.lammps
-e can set which Makefile.lammps.esuffix file is copied
-o = copy final Makefile.auto to Makefile.osuffix
Examples:
make lib-gpu args="-b" # build GPU lib with default Makefile.linux
make lib-gpu args="-m xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision
make lib-gpu args="-m mpi -a 35 -p single -o mpi.mixed -b" # create new Makefile.mpi.mixed, also build GPU lib with these settings
"""
# print error message or help
def error(str=None):
if not str: print help
else: print "ERROR",str
if not str: print(help)
else: print("ERROR",str)
sys.exit()
# parse args
@ -56,7 +69,7 @@ outflag = 0
iarg = 0
while iarg < nargs:
if args[iarg] == "-i":
if args[iarg] == "-m":
if iarg+2 > nargs: error()
isuffix = args[iarg+1]
iarg += 2
@ -80,7 +93,7 @@ while iarg < nargs:
eflag = 1
lmpsuffix = args[iarg+1]
iarg += 2
elif args[iarg] == "-m":
elif args[iarg] == "-b":
makeflag = 1
iarg += 1
elif args[iarg] == "-o":
@ -95,10 +108,10 @@ if pflag:
elif precision == "mixed": precstr = "-D_SINGLE_DOUBLE"
elif precision == "single": precstr = "-D_SINGLE_SINGLE"
else: error("Invalid precision setting")
# create Makefile.auto
# reset EXTRAMAKE, CUDA_HOME, CUDA_ARCH, CUDA_PRECISION if requested
if not os.path.exists("Makefile.%s" % isuffix):
error("lib/gpu/Makefile.%s does not exist" % isuffix)
@ -108,9 +121,9 @@ fp = open("Makefile.auto",'w')
for line in lines:
words = line.split()
if len(words) != 3:
print >>fp,line,
fp.write(line)
continue
if hflag and words[0] == "CUDA_HOME" and words[1] == '=':
line = line.replace(words[2],hdir)
if aflag and words[0] == "CUDA_ARCH" and words[1] == '=':
@ -119,20 +132,20 @@ for line in lines:
line = line.replace(words[2],precstr)
if eflag and words[0] == "EXTRAMAKE" and words[1] == '=':
line = line.replace(words[2],"Makefile.lammps.%s" % lmpsuffix)
print >>fp,line,
fp.write(line)
fp.close()
# perform make
# make operations copies EXTRAMAKE file to Makefile.lammps
if makeflag:
print "Building libgpu.a ..."
print("Building libgpu.a ...")
cmd = "rm -f libgpu.a"
commands.getoutput(cmd)
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
cmd = "make -f Makefile.auto clean; make -f Makefile.auto"
commands.getoutput(cmd)
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
print(txt.decode('UTF-8'))
if not os.path.exists("libgpu.a"):
error("Build of lib/gpu/libgpu.a was NOT successful")
if not os.path.exists("Makefile.lammps"):
@ -141,6 +154,6 @@ if makeflag:
# copy new Makefile.auto to Makefile.osuffix
if outflag:
print "Creating new Makefile.%s" % osuffix
print("Creating new Makefile.%s" % osuffix)
cmd = "cp Makefile.auto Makefile.%s" % osuffix
commands.getoutput(cmd)
subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)

View File

@ -37,7 +37,7 @@ CUDA_INCLUDE = -I$(CUDA_HOME)/include
CUDA_LIB = -L$(CUDA_HOME)/lib64
CUDA_OPTS = -DUNIX -O3 -Xptxas -v --use_fast_math $(LMP_INC)
CUDR_CPP = mpic++ -DMPI_GERYON -DUCL_NO_EXIT -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1 -fPIC
CUDR_CPP = mpicxx -DMPI_GERYON -DUCL_NO_EXIT -DMPICH_IGNORE_CXX_SEEK -DOMPI_SKIP_MPICXX=1 -fPIC
CUDR_OPTS = -O2 $(LMP_INC) # -xHost -no-prec-div -ansi-alias
BIN_DIR = ./

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