Compare commits

..

441 Commits

Author SHA1 Message Date
ae18e1e01c Merge pull request #3310 from akohlmey/next_patch_release
Update version strings for the next patch release
2022-06-22 16:26:46 -04:00
ad35bbcb65 Merge pull request #3309 from akohlmey/collected-small-fixes
More fixes and small changes for the stable release
2022-06-22 15:16:01 -04:00
1099199e93 remove any remap related documentation. add paragraph about file compatibility 2022-06-22 14:22:23 -04:00
c5999df303 remove dead code and silence compiler warning about it 2022-06-22 10:32:03 -04:00
9b8c19c1a5 correct docs about how to get synchronized timings 2022-06-22 10:24:56 -04:00
2fb3608462 update/correct contact info 2022-06-22 07:06:16 -04:00
37f056c455 get array and vector sizes from the avaiable APIs 2022-06-22 07:06:00 -04:00
49331be33e simplify 2022-06-22 07:05:30 -04:00
3f6add4c40 Merge branch 'fortran2_updates' of github.com:hammondkd/lammps into collected-small-fixes
# Conflicts:
#	examples/COUPLE/fortran2/LAMMPS-wrapper.cpp
#	examples/COUPLE/fortran2/LAMMPS-wrapper.h
2022-06-22 06:41:37 -04:00
c0b109f715 Fixed some typos and updated e-mail addresses in examples/COUPLE/fortran2 2022-06-21 20:53:45 -05:00
b0c673d856 updates from Karl Hammond to adjust his email and correct an error message 2022-06-21 20:37:20 -04:00
b0f4ef8a39 update docs for noremap option to read_restart 2022-06-21 20:19:13 -04:00
7d49ad5924 enable remap for restarting by default, add noremap option 2022-06-21 19:42:17 -04:00
6815b27cd5 step version strings for the next patch release 2022-06-21 08:52:11 -04:00
ad20e54638 fix typos 2022-06-20 23:19:00 -04:00
ec46510d2e add local extract_compute() tests 2022-06-20 23:07:01 -04:00
033af0c507 add unit test for extracting local vector and array via numpy 2022-06-20 18:48:50 -04:00
78129f9078 update embedded docs for LMP_SIZE_VECTOR update for extract_compute() 2022-06-20 18:23:20 -04:00
ac615059a7 update some linewraps for 100 col limit 2022-06-20 18:15:02 -04:00
ffc5b12c5f correct handling data of local computes which always needs to check rows and cols 2022-06-20 18:10:57 -04:00
3828c857f7 accept LMP_SIZE_VECTOR as alias for LMP_SIZE_ROWS with local computes 2022-06-20 18:10:19 -04:00
063fc47f64 tweak to avoid test failure on FreeBSD 2022-06-19 06:38:14 -04:00
f831a776be correct python example 2022-06-18 22:25:32 -04:00
b46773e398 add support for writing a dump file footer 2022-06-17 15:53:04 -04:00
fe1feb58d8 Merge pull request #3306 from akohlmey/makewheel-fix
Fix issues with building a wheel file during 'make install-python'
2022-06-17 11:58:18 -04:00
deac9f05b1 move the created wheel to the build folder at the end 2022-06-17 08:05:28 -04:00
18f9e5836b support installing the built wheel into virtual environment, if active 2022-06-17 06:52:25 -04:00
21b3020a97 make the "makewheel.py" script independent from the activate_this.py script
The "activate_this.py" script only seems to be included in virtualenv,
but not venv. Now we implement its effect directly.
2022-06-17 00:10:06 -04:00
dd3aab0c66 Merge pull request #3300 from lammps/doc-package-update
Update package affiliation for Zhen Li
2022-06-16 18:04:45 -04:00
58152cdc68 Merge pull request #3304 from lammps/dependabot/github_actions/actions/cache-3
Bump actions/cache from 2 to 3
2022-06-16 17:48:30 -04:00
04bb611bf2 Merge pull request #3303 from lammps/dependabot/github_actions/actions/setup-python-4
Bump actions/setup-python from 2 to 4
2022-06-16 17:21:53 -04:00
2fc0a44ab2 Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 19:41:23 +00:00
ba4cbf7055 Bump actions/setup-python from 2 to 4
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 19:41:20 +00:00
f75115d801 Merge pull request #3301 from turrisxyz/Dependabot-GitHub-Actions
Included githubactions in the dependabot config
2022-06-16 15:40:59 -04:00
0a5d921f3f update affiliation in source code as well 2022-06-16 15:37:55 -04:00
cdc0b48a0b chore: Included githubactions in the dependabot config
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.

Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot

GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-06-16 01:33:01 +00:00
9840aad703 Merge pull request #3299 from akohlmey/fix-codeql-workflow
Update GitHub workflow files
2022-06-15 10:49:58 -04:00
1403a0dd94 update affilication for Zhen Li 2022-06-15 08:22:59 -06:00
9842879db1 fix typos 2022-06-15 08:14:53 -04:00
03c0b4ae27 upgrade action versions 2022-06-14 19:08:28 -04:00
728e4a5910 add permissions for codeql action 2022-06-14 19:08:01 -04:00
cfe5025495 Merge pull request #3296 from akohlmey/collected-small-changes
Collected small changes for the next release
2022-06-14 18:18:28 -04:00
927287e3e5 fixes from clang-tidy 2022-06-14 14:06:11 -04:00
35a48f273b rename local variable shadowing a global one 2022-06-14 10:45:31 -04:00
2028c68bec remove unused imports 2022-06-14 10:45:05 -04:00
6abb316dba avoid resource leak 2022-06-14 10:36:21 -04:00
7a64d1358e remove unused module 2022-06-14 10:36:11 -04:00
26dcb649bb remove redundant check 2022-06-13 22:10:51 -04:00
423c511d7a use explicit scoping in destructor 2022-06-13 22:10:43 -04:00
b44d769024 Merge branch 'collected-small-changes' of https://github.com/akohlmey/lammps into collected-small-changes 2022-06-13 22:01:54 -04:00
ea48dd3019 avoid file pointer leakage in dump reader base class. 2022-06-13 22:01:30 -04:00
0f5ae6d48c remove references to "plugin" options from fix mdi/aimd 2022-06-13 22:00:36 -04:00
c53e53d701 must set suffix variable only when suffixflag is true 2022-06-13 17:47:20 -04:00
33f4bb525b remove redundant condition 2022-06-13 17:43:40 -04:00
ef48fd2d9c remove unused imports 2022-06-12 23:36:43 -04:00
ed702aab05 update for renamed style names 2022-06-10 13:00:36 -04:00
82185046ae Merge pull request #3293 from stanmoore1/compute_ave_sphere_atom
Fix issues in compute ave/sphere/atom
2022-06-10 12:57:35 -04:00
ac48852b2d edits to 1st paragraph of description 2022-06-10 08:30:23 -06:00
495418158a Clarify doc page 2022-06-09 15:51:31 -06:00
5d7b1f3ebb fix small issues 2022-06-09 15:36:17 -06:00
80727e47f4 Add attribution 2022-06-09 15:31:48 -06:00
9be6e2a064 Use COM velocity 2022-06-09 15:29:40 -06:00
7f1e76b7a5 Don't compute count twice 2022-06-09 14:53:44 -06:00
174219383a Merge pull request #3290 from akohlmey/collected-small-changes
Collected small bugfixes and changes and plugin building improvements
2022-06-08 20:13:22 -04:00
1acfb78b3a Merge pull request #3295 from stanmoore1/kk_reax_tagint
Fix int32 overflow in Kokkos ReaxFF
2022-06-08 18:29:59 -04:00
483396c757 Merge branch 'collected-small-changes' of https://github.com/akohlmey/lammps into collected-small-changes 2022-06-08 18:06:59 -04:00
68a9db0950 fix typos 2022-06-08 17:07:08 -04:00
5fca9f4d1f update mathjax version with bugfix release 2022-06-08 17:04:26 -04:00
b6e0d76123 fix some docs formatting issues 2022-06-08 12:47:30 -04:00
7769a8e0de update ROCm to version 5.1.3 consistently 2022-06-08 12:18:17 -04:00
55fdb7f12a update GPU container definitions for CUDA 11.7 and singularity -> apptainer 2022-06-08 08:19:54 -04:00
42694ba640 reduce warnings when compiling with KOKKOS 2022-06-07 19:39:36 -04:00
d7680dd785 Fix int32 overflow in Kokkos ReaxFF 2022-06-07 10:11:39 -06:00
96b5a706da apply clang-format 2022-06-06 21:39:10 -04:00
67d367e714 Fix copy/paste bug 2022-06-06 15:28:40 -07:00
7e77b61042 simplify 2022-06-06 15:23:03 -07:00
5c68fe6e81 Fix issues in compute ave/sphere/atom 2022-06-06 15:15:47 -07:00
8f773be2d6 must open files for xtc dump in binary mode 2022-06-06 15:01:25 -04:00
dcbc5256fa additional OpenMP suppressions for newer GCC 2022-06-05 12:37:03 -04:00
b338781f88 cosmetic 2022-06-05 06:52:15 -04:00
b0d2cc3052 we can build a plugin instead 2022-06-04 19:23:32 -04:00
3af9546b94 provide README files with pointers to the developer info for plugins
also add a paragraph with information about the ML-PACE plugin to the
plugin developer info docs.
2022-06-04 11:49:33 -04:00
a232bd3302 refactor LAMMPS plugin building to share more code and to add a demo for ML-PACE 2022-06-04 10:59:25 -04:00
3beb071d38 make plugin compilation settings with MSVC consistent and more compile specific 2022-06-04 05:15:14 -04:00
0dc486c90b fix bug introduced during stringification 2022-06-04 05:00:28 -04:00
fa9ad10bc1 add missing line to read_data docs about atom style dielectric 2022-06-04 05:00:12 -04:00
25c74652e3 remove bogus tags 2022-06-04 04:25:13 -04:00
587438eb30 fix typo in read_data add merge example 2022-06-03 09:14:34 -04:00
7c4d77f776 tweak epsilon for portability 2022-06-03 07:36:25 -04:00
f9b5679c00 remove unused function arguments 2022-06-03 07:16:19 -04:00
f68247ad6a add ML-PACE and PLUGIN packages to be compiled with MinGW cross-compilers 2022-06-03 05:10:00 -04:00
ceb9466172 Merge pull request #3283 from akohlmey/next_patch_release
Step version strings for next patch release
2022-06-02 21:22:16 -04:00
2da61d69a1 Merge pull request #3289 from akohlmey/collected-small-changes
A few last minutes updates and fixes for the next patch release
2022-06-02 20:16:39 -04:00
31f7798720 Merge pull request #3278 from yury-lysogorskiy/feature/ml-pace-multispecies
ML_PACE package hybrid support and small updates
2022-06-02 19:27:53 -04:00
aad4d093b8 correctly handle the situation that the build folder may have multiple libs downloaded 2022-06-02 18:18:32 -04:00
ad97d18ac7 Merge pull request #3286 from Colvars/update-colvars-lepton
Update Colvars to 2022-05-24 and copy of Lepton library
2022-06-02 18:09:05 -04:00
4913c72795 Merge pull request #3288 from olavgal/clean_stress_cartesian
Clean stress cartesian
2022-06-02 17:19:19 -04:00
2a054c17be - set species type for NULL atom type to -1. species_type=-1 value will not reach ACE Evaluator::compute_atom, but if it will ,then error will be thrown there
- updating lib pace MD5SUM (for both make and cmake installation scenario), but use same tag name v.2021.10.25.fix2 (add override keyword to ACERadialFunctions, add check for species_type==-1, fix yaml_cpp CMakeLists.txt)
2022-06-02 23:01:54 +02:00
260a5f4d52 update false positives 2022-06-02 14:39:08 -04:00
90add188cb Merge pull request #3279 from schererc/develop
Addition of two new MANYBODY pair styles (sw/angle/table and threebody/table)
2022-06-02 14:24:44 -04:00
9d252fe0d2 remove error docs and apply clang-format 2022-06-02 12:57:45 -04:00
a74f64a737 do not allow per-atom arrays to shrink 2022-06-02 12:55:47 -04:00
fc468accf5 clang-format and removed more unused variables 2022-06-02 18:34:48 +02:00
954700dea5 Updated memory calculation and removed unused variables 2022-06-02 18:28:04 +02:00
2742517a4f Clean up of stress/cartesian 2022-06-02 18:26:09 +02:00
7a02043f18 update docs to list examples and include links to the tutorials 2022-06-02 12:11:10 -04:00
04586e634e Remove trailing whitespace from Lepton per suggestion from @akohlmey 2022-06-02 11:52:39 -04:00
6c375ffade Update PDF Colvars manual 2022-06-02 11:48:19 -04:00
3a1423dc48 Update Colvars to 2022-05-24 and copy of Lepton library
One bugfix for the Colvars library in the ABF method, and update of the copy
of the Lepton library as per the OpenMM repository.

List of relevant PR.

- 483 Update Lepton via patching procedure
  https://github.com/Colvars/colvars/pull/483 (@giacomofiorin)

- 482 Fix integer overflow in log_gradient_finite_diff and gradient_finite_diff
  https://github.com/Colvars/colvars/pull/482 (@HanatoK)
2022-06-02 11:24:04 -04:00
5a4688ed44 Update pair_pace.cpp 2022-06-02 09:05:15 -06:00
fdc8bcfbfc I removed the comment attributed to me, it is now outdated. 2022-06-02 09:03:16 -06:00
e214013a91 tweak epsilon to avoid failure on FreeBSD 2022-06-02 07:53:41 -04:00
8e415f0c00 try to enforce QUIP submodule update strategy 2022-06-01 22:26:35 -04:00
c028dcbdf7 small tweak 2022-06-01 22:14:04 -04:00
e36620059d simplify, apply clang-format 2022-06-01 22:08:35 -04:00
866391e830 modify so pair style pace will work as pair style hybrid substyle 2022-06-01 21:56:13 -04:00
9f021ba490 whitespace 2022-06-01 21:54:33 -04:00
c0bd4185f8 Merge branch 'develop' into feature/ml-pace-multispecies 2022-06-01 21:10:59 -04:00
30ae7fe66b Merge pull request #3285 from akohlmey/clang-format-clang-tidy
Apply clang-tidy and clang-format to update/modernize/simplify recently modified code
2022-06-01 19:04:43 -04:00
bf9b79b734 Merge pull request #3284 from stanmoore1/kk_3280
Port changes in #3280 to Kokkos
2022-06-01 18:54:58 -04:00
4bf90988e2 Fix bug when comparing equal tags 2022-06-01 14:52:07 -06:00
b45117655e move patch release date 2022-06-01 16:13:45 -04:00
217b070204 add unit tests 2022-06-01 15:31:49 -04:00
7d31544cc2 simplify and avoid memory access and leak issues in parallel 2022-06-01 15:04:28 -04:00
8a055fdcfa merge with third manybody table example and provide updated log files 2022-06-01 15:04:07 -04:00
b9b0d7207c apply clang-format 2022-06-01 14:24:23 -04:00
edea4fa9a2 fix memory allocation/communication issues. avoid memory leaks. 2022-06-01 14:23:30 -04:00
8e9071b01f move and update threebody/table examples 2022-06-01 14:22:53 -04:00
ee6e18f08e Merge branch 'develop' into schererc/develop 2022-06-01 12:07:06 -04:00
b85b3e1f4c fix doc file names and links 2022-06-01 12:06:56 -04:00
95a979c657 examples/PACKAGES: rename pair_sw_3b_table to pair_sw_angle_table
including all input and documentation files
2022-06-01 16:34:10 +02:00
e8d9bf0507 examples/PACKAGES: renamed pair_3b_table to pair_threebody_table
including all input and documentation files
2022-06-01 16:30:37 +02:00
3a19b1eb4b Update pair_style.rst
pair_style.rst: update due to name changes from 3b/table to threebody/table and sw/3b/table to sw/angle/table
2022-06-01 16:16:13 +02:00
f6fab8365a Update Commands_pair.rst
Commands_pair.rst: update due to name change from 3b/table to threebody/table and sw/3b/table to sw/angle/table
2022-06-01 16:14:37 +02:00
64d67f7604 Update pair_sw_angle_table.rst
pair_sw_angle_table.rst: minor correction
2022-06-01 16:12:13 +02:00
c1e301ac1a Update pair_3b_table.rst
changed documentation and file name from pair style 3b/table to threebody/table
2022-06-01 16:11:47 +02:00
a833baac80 Update pair_sw_angle_table.cpp
Minor correction in pair_sw_angle_table.cpp
2022-06-01 16:04:09 +02:00
187ccdd222 Update and rename pair_3b_table.cpp to pair_threebody_table.cpp
changed pair 3b/table to pair threebody/table including name of .cpp file
2022-06-01 16:03:06 +02:00
5756dedfed Update and rename pair_3b_table.h to pair_threebody_table.h
changed pair style and file name of header file from 3b/table to threebody/table
2022-06-01 15:52:46 +02:00
ebce66389e Update and rename pair_sw_3b_table.rst to pair_sw_angle_table.rst
changed documentation and file name from sw/3b/table to sw/angle/table
2022-06-01 14:24:40 +02:00
8dfa4a8682 Update and rename pair_sw_3b_table.cpp to pair_sw_angle_table.cpp
Changed .cpp file for pair style sw/3b/table to sw/angle/table
2022-06-01 14:20:30 +02:00
25f24fbab1 Update and rename pair_sw_3b_table.h to pair_sw_angle_table.h
Renamed header file from sw/3b/table to sw/angle/table
2022-06-01 14:11:32 +02:00
9da3dd796a delete undesired default members instead of making them inaccessible 2022-06-01 02:30:25 -04:00
5abb6c76af small tweak 2022-06-01 02:13:02 -04:00
ef6c48dad7 Whack tabs 2022-05-31 14:53:17 -06:00
b675372d99 Use MIN_SINE and add comment 2022-05-31 14:44:18 -06:00
234b9f180a use clang-tidy and clang-format to update/modernize/simplify code 2022-05-31 14:46:57 -04:00
3b4e698421 Merge branch 'develop' of github.com:lammps/lammps into kk_3280 2022-05-31 12:38:03 -06:00
77835a4258 Port changes in #3280 to Kokkos 2022-05-31 12:36:04 -06:00
7c0c7ce93c Merge pull request #3281 from akohlmey/collected-small-changes
Collected small changes for the next patch release
2022-05-31 13:10:35 -04:00
b8599ccb42 fix small local vs. ghost atom access inconsistency in pair style bop 2022-05-31 11:52:16 -04:00
de5c2629ac small tweak 2022-05-31 06:53:19 -04:00
3f332ab0c1 step version strings for next patch release 2022-05-31 06:51:13 -04:00
cc86e9e8a8 remove windows+gcc test (for now) 2022-05-29 19:56:39 -04:00
fa79a66734 feof() returns non-zero not necessarily 1 2022-05-29 19:53:11 -04:00
562cd12d82 revert github action build to LAMMPS repo and develop branch 2022-05-29 15:04:41 -04:00
90730f0d3c update windows version history 2022-05-29 02:01:21 -04:00
4c36c79652 remove feature for automatic jpeg/png/zlib library download and build
this is a post-stable feature and would require a general rewrite of offline processing
2022-05-28 15:20:22 -04:00
81c327edd8 add missing override. remove redundant functionality and disable warnings differently
this removes an inconsistent overload due to mismatch of arguments
2022-05-28 11:56:26 -04:00
d0edd7129c update workflows 2022-05-28 04:55:27 -04:00
3615639bdd Check for a working internet connection.
With this check we only do automatic downloads if the check passes
2022-05-28 04:55:10 -04:00
e2dd08a93e Better handle file- or path-names with spaces 2022-05-28 04:55:10 -04:00
5f811f852f stop with detailed parser error message with incorrect potential tables 2022-05-28 04:45:52 -04:00
886ad8359e use venv instead of virtualenv 2022-05-28 04:45:52 -04:00
0b3efa4dd6 set masses from BOP potential files, update unit tests accordingly 2022-05-28 04:45:52 -04:00
e91d1dba98 Merge pull request #3280 from athomps/reaxff-torsion-zero-sine
Eliminated bad torsion forces for sin(theta) = 0
2022-05-27 12:11:46 -04:00
cfb3d6bdf8 simplify, remove inactive code, plug memory leaks 2022-05-27 07:48:00 -04:00
3ecb6bb54a Update pair_3b_table.cpp
Added (forgotten) line "u=pm->mltable->efile[itable];" to compute energy due to read in table values
2022-05-27 12:34:53 +02:00
49a75d576e Eliminated bad torsion forces when when sin(theta) is zero 2022-05-26 17:28:05 -06:00
ab2b7a2c01 Merge pull request #3275 from akohlmey/collected-small-changes
Collected small changes and fixes
2022-05-26 18:07:43 -04:00
f09e4c7583 remove check on box size from pair style bop 2022-05-26 16:56:43 -04:00
587999fabb mention that MSM does not support shrink-wrap 2022-05-26 15:33:23 -04:00
f0f6660050 join lines 2022-05-26 12:15:27 -04:00
d9b560e70b properly integrate into manual 2022-05-26 12:08:21 -04:00
2a7407aa38 programming style updates 2022-05-26 11:41:51 -04:00
48f477e4b4 Update pair_sw_3b_table.rst
Small correction
2022-05-26 15:19:41 +02:00
e890e5718e examples/PACKAGES/pair_3b_table: added example for new pair style 3b/table 2022-05-26 14:45:22 +02:00
b8dfb23ede examples/PACKAGES/pair_sw_3b_table/README: corrections in the text 2022-05-26 14:32:12 +02:00
18c9960db0 examples/pair_sw_3b_table/README: minor correction 2022-05-26 14:25:24 +02:00
f9fbc7f94b doc/src/pair_3b_table.rst: documentation for added pair style 3b/table 2022-05-26 14:17:36 +02:00
27524742e5 src/MANYBODY/pair_3b_table.h, src/MANYBODY/pair_3b_table.cpp: added pair style for generic fully tabulated three-body forces which has been developed for simulations with Kernel-based machine learning potentials. 2022-05-26 14:16:26 +02:00
770454cb8b examples/PACKAGES/pair_sw_3b_table: added example for new pair style sw/3b/table 2022-05-26 14:00:06 +02:00
0e114b1041 doc/src/pair_sw_3b_table.rst: documentation for added pair style sw/3b/table 2022-05-26 13:35:40 +02:00
1cfba3d8bb src/MANYBODY/pair_sw_3b_table.h, src/MANYBODY/pair_sw_3b_table.cpp: added pair style sw/3b/table which is a modification of the SW pair style with tabulated angular potentials 2022-05-26 13:21:47 +02:00
1ae62793eb src/MANYBODY/pair_sw.h: made read_file(char *) virtual to allow overriding 2022-05-26 13:17:45 +02:00
dba9fdb1ef Merge branch 'develop' into collected-small-changes 2022-05-26 06:37:24 -04:00
2085c10002 update version of lib-pace to v.2021.10.25.fix2 2022-05-25 17:56:24 +02:00
f6680861a0 BUGFIX: bad array length: initialize maximum number of neighbours with max_jnum=0 2022-05-25 17:27:12 +02:00
7c2a548015 Merge pull request #3277 from erozic/feature-pylammps-verbose
Verbose object-level option for PyLammps
2022-05-25 10:57:58 -04:00
3ee209d031 update singularity definition for ubuntu22.04LTS
This now has the changes required to include the openkim-api package
2022-05-25 06:35:08 -04:00
c6c0b269ec Merge pull request #3276 from shankar1729/develop
Fixed TIP4P handling in PPPM slab correction.
2022-05-24 17:20:42 -04:00
1aaa9ca4ae Added documentation for verbose option 2022-05-24 12:02:34 +02:00
b66702c285 Added verbose class option + removed empty output lines 2022-05-24 11:37:44 +02:00
43b57b8aa5 update unit test reference data 2022-05-23 20:14:10 -04:00
ef80bb194a Fixed TIP4P handling in PPPM slab correction.
Overridded the slabcorr() function to handle the charge being on the TIP4P "M" site in the dipole calculation (and corresponding force correction). This is important for any long-range electrostatics in aqueous interfaces with the TIP4P model.
2022-05-23 17:28:32 -04:00
3662d998ee fix typo + cut-n-paste error 2022-05-23 11:53:58 -04:00
bead819070 changes missing from the previous commit 2022-05-23 11:37:00 -04:00
b461a49eee use _EXECUTABLE consistently instead of _BINARY 2022-05-23 11:14:17 -04:00
9f7833668a whitespace 2022-05-22 18:15:10 -04:00
0069c4b562 update docs for automatic jpeg/png/zlib library download and build with CMake 2022-05-22 18:10:26 -04:00
46df8abe75 rename jpeg cmake file for consistency 2022-05-22 17:49:54 -04:00
3c3c1377c8 Merge branch 'collected-small-changes' of github.com:akohlmey/lammps into collected-small-changes 2022-05-22 17:47:58 -04:00
d905d3fbf5 reorganize build settings and presets 2022-05-22 17:46:12 -04:00
1959cd7037 download, build, and link missing png and zlib libraries with CMake 2022-05-22 17:45:42 -04:00
7d3d986d18 download, build, and link a missing jpeg library with CMake 2022-05-22 14:03:20 -04:00
cd8bef3b0b enable and apply clang-format 2022-05-22 07:04:35 -04:00
9a973e67fa enable and apply clang-format 2022-05-22 06:46:24 -04:00
b407b2f239 apply clang-format 2022-05-21 23:35:47 -04:00
93692ce308 Improved Windows and Visual Studio version detection
This now uses the CurrentBuild key to detect the Windows version and only falls back to product name, if that fails.
This is needed because Windows 11 reports itself as Windows 10 in the product name key.
2022-05-21 23:33:13 -04:00
007588f9cb use GZIP executable variable name consistently 2022-05-21 18:56:58 -04:00
e3e849b266 skip compressed file format tests if gzip executable is not found 2022-05-21 07:37:25 -04:00
18df50356e Merge pull request #3273 from stanmoore1/kk_mem
Initial refactor of view allocation in Kokkos package
2022-05-20 16:34:28 -04:00
c3ce77bc8c improve energy scaling sanity checks 2022-05-20 16:33:46 -04:00
2c5ce83d59 must set Output::next_dump_any to current step with rerun 2022-05-20 09:27:16 -04:00
7eb926c853 clarify the description of pair style none
explain that pair style none is effectively deleting any existing
pair style and that communication and neighbor list cutoff are affected.
update those explanations for changes to LAMMPS that allow adjusting
those not just with the neighbor list skin.
Also add that pair_coeff must not be used.
2022-05-20 07:14:05 -04:00
08b1034d54 enable and apply clang-format 2022-05-20 07:12:25 -04:00
a16974ca48 enable and apply clang-format 2022-05-20 06:51:36 -04:00
21c2f8a74b fix miscalculated example 2022-05-20 01:06:21 -04:00
814daf7f4f fix cut-n-paste error 2022-05-20 01:06:09 -04:00
bfb126ec7c make neighbor list searches optionally check for the request ID 2022-05-19 23:37:55 -04:00
07e93a643a spelling 2022-05-19 23:36:54 -04:00
13fc4f3588 must install wheel package before all other packages 2022-05-19 23:07:12 -04:00
36d091baeb fix underline 2022-05-19 23:06:54 -04:00
4801fa00f8 update MathJax to latest bugfix release 2022-05-19 22:53:48 -04:00
75df9d4f2c Merge pull request #3271 from akohlmey/collected-small-changes
Collected small changes and fixes
2022-05-19 13:27:28 -04:00
a9431208a2 Use c++11 variadic magic, suggested by @weinbe2 2022-05-19 10:35:10 -06:00
7b0c7c04ed address sphinx issues and make command list consistently list all min styles 2022-05-19 12:21:06 -04:00
2138aea01f Merge branch 'two-command-tables' into collected-small-changes 2022-05-19 12:16:37 -04:00
7e75b7bff5 whitespace 2022-05-19 12:16:31 -04:00
5990241fbe refactor min_style spin doc page 2022-05-19 09:13:47 -06:00
d8d6884def Remove use_count check, reduce memory use in ReaxFF 2022-05-19 09:10:20 -06:00
eb4c1cd14f update attempt to hide hwloc pci bus warnings 2022-05-19 07:28:57 -04:00
361e303177 fix cut-n-paste error 2022-05-19 04:14:31 -04:00
898eda794c minor updates 2022-05-19 00:06:11 -04:00
5ac8e5639a more information about compiling LAMMPS on windows 2022-05-19 00:06:00 -04:00
cb2126f313 Merge branch 'collected-small-changes' of github.com:akohlmey/lammps into collected-small-changes 2022-05-18 23:21:52 -04:00
0c73c9307f Add configurations for Intel Compilers on Windows 2022-05-18 23:20:57 -04:00
c0a8458d89 remove unused class members 2022-05-18 22:06:31 -04:00
b5830aae83 suppress excessive warnings and undesired aborts with Intel LLVM compiler 2022-05-18 21:43:09 -04:00
06ad119844 Initial refactor of view allocation in Kokkos package 2022-05-18 17:15:36 -06:00
fa6c81849b split Command table into two tables 2022-05-18 16:26:58 -06:00
d323b7817d put back some whitespace 2022-05-18 14:59:15 -04:00
eb3ee96b9c also apply 2 atom minimum to balance() and packing atom IDs 2022-05-18 14:22:43 -04:00
bfd6efcedb no need to sort dump if there are less than 2 atoms 2022-05-18 13:48:06 -04:00
c16f40eb7c don't enable OpenMP together with CUDA for KOKKOS by default 2022-05-18 12:23:38 -04:00
acbeae075a no need to suppress nvcc warnings about pragmas with Clang as host compiler 2022-05-18 12:17:06 -04:00
4f45ae2ef6 improve support for intel compilers on windows 2022-05-18 09:14:18 -04:00
5559491d7b add missing overrides 2022-05-18 09:13:52 -04:00
ba0efbef31 include presets for intel compiler names on windows 2022-05-18 09:13:37 -04:00
7646592f05 recognize the new LLVM based intel compiler as intel compiler 2022-05-18 08:54:26 -04:00
02908f0468 modernize MKL FFT interface 2022-05-18 08:42:40 -04:00
6475d4b956 Skip Fortran unittests if no Fortran MPI support is found 2022-05-18 07:16:16 -04:00
d54f97736e whitespace 2022-05-18 06:32:52 -04:00
1466620750 update googletest to the latest github commit 2022-05-18 06:09:42 -04:00
baa48946e5 add comment to please CodeQL 2022-05-18 00:56:10 -04:00
e7b9d03573 crank up epsilon for tip4p/cut styles some more 2022-05-18 00:28:42 -04:00
d8b37601a8 Merge pull request #3262 from akohlmey/collected-small-changes
Collected small changes and fixes
2022-05-18 00:11:05 -04:00
d94bcd043b enforce using a single thread with Kokkos and SNAP or PACE 2022-05-17 23:42:24 -04:00
15a727a7ff avoid segfaults with Kokkos threads 2022-05-17 23:41:46 -04:00
e94275391c Merge branch 'develop' into collected-small-changes 2022-05-17 22:10:15 -04:00
935c9a02d7 Merge pull request #3267 from athomps/born-rotated
Added Python wrapper that handles rotations to and from LAMMPS frame
2022-05-17 19:52:52 -04:00
55e0af930b Merge pull request #3269 from yury-lysogorskiy/master
Update ML-PACE installation to v.2021.10.25.fix version
2022-05-17 19:50:49 -04:00
a5171beacd make lammps-shell test compatible with MULTI-CONFIG CMake builders 2022-05-17 18:26:27 -04:00
72209b0617 Merge pull request #3258 from akohlmey/create-atoms-mesh
Create atoms from STL mesh
2022-05-17 18:11:41 -04:00
899764c00c Merge pull request #3268 from akohlmey/update-kappa-example
Update KAPPA example
2022-05-17 17:18:45 -04:00
cebbd471cf tweak unit test epsilon for portability to MacOS /w ARM 2022-05-17 17:15:42 -04:00
8ffe2a206c Update ML-PACE installation to v.2021.10.25.fix version 2022-05-17 22:41:43 +02:00
f9efa426a7 Merge pull request #3256 from lammps/delete-atoms-exact
Delete atoms exactly by fraction or count
2022-05-17 16:25:21 -04:00
ae979aca4e consistently use prefactor instead of pre-factor (the former was more common) 2022-05-17 16:20:10 -04:00
38d7fcee92 correct and update create_atoms mesh documentation 2022-05-17 16:16:32 -04:00
e7d072c593 add sanity check on radscale value, set radius also for quasi-random mode 2022-05-17 16:15:46 -04:00
d487ab10e2 doc page and unittest tweaks 2022-05-17 12:00:40 -06:00
853e3ae99b fix typo and clarify error message 2022-05-17 13:52:29 -04:00
dbb3e75f24 change partial to random 2022-05-17 11:02:42 -06:00
fe4782696e silence compiler warnings 2022-05-17 06:03:01 -04:00
326b833d7f (temporarily) disable Kokkos deprecation warnings in CMake presets in preparation for stable release 2022-05-17 06:02:50 -04:00
bf98df3264 silence compiler warnings 2022-05-16 23:20:04 -04:00
df40732343 Make cast to double explicit 2022-05-16 15:00:13 -04:00
d32885fbe3 Fix compiler warnings 2022-05-16 14:48:02 -04:00
659fd82a9e Fix compiler warnings 2022-05-16 14:35:24 -04:00
db2d5b863d Improved MPI portability and added reference log files 2022-05-16 08:22:45 -06:00
ee8a8b6cd0 Added Python wrapper that handles rotations to and from LAMMPS frame 2022-05-15 17:43:18 -06:00
b1ba616470 update KAPPA example for current code, to use thermo_modify colname, and compute kappa in input 2022-05-15 18:58:50 -04:00
44f3ad5620 update singularity image descriptions for newer versions of cuda and rocm 2022-05-15 08:11:50 -04:00
c0e5a03989 update tests for delete_atoms 2022-05-15 01:56:59 -04:00
f62363516c streamline the refactored interface for delete_atoms partial some more 2022-05-15 01:56:45 -04:00
8e6b0425f7 apply clang-format 2022-05-14 18:01:34 -04:00
a79814793e improve handling of hybrid styles and their arguments and errors 2022-05-14 17:56:44 -04:00
1f30d3f140 programming style 2022-05-14 17:56:12 -04:00
1b552de1cd make default settings() functions for bonded interactions error out with arguments 2022-05-14 17:55:56 -04:00
42a4fba390 implement better checking for atom_style arguments and remove redundant code 2022-05-14 15:43:11 -04:00
173e80a970 Merge pull request #71 from jtclemm/create-atoms-mesh
Fixing typos and cleaning up quasirandom comments
2022-05-14 15:13:27 -04:00
55fef9a482 Fixing typos and cleaning up quasirandom comments 2022-05-14 11:39:20 -06:00
9a9bb749fa Merge remote-tracking branch 'github/develop' into collected-small-changes 2022-05-14 10:39:18 -04:00
223aebe3fb Merge pull request #3251 from stanmoore1/kk_update_3.6.0
Update Kokkos library in LAMMPS to v3.6.0
2022-05-14 10:38:41 -04:00
168d3bdd3c Correctly handle the case that the YAML python module is not installed 2022-05-14 10:15:40 -04:00
9661711a1e avoid out-of-bounds access in dump style cfg, update docs with simpler semantic 2022-05-14 09:39:50 -04:00
d4ea5ca49e more clang-tidy fixes after re-running it with added settings 2022-05-14 07:18:05 -04:00
2f0baa86d6 configure desired clang-tidy settings explicitly, must unset variable to turn off 2022-05-14 07:13:25 -04:00
b8a4ddc42a Merge pull request #3264 from stanmoore1/kk_pace_release
Add Kokkos version of ML-PACE
2022-05-13 23:36:05 -04:00
90797d53d9 one more batch of clang-tidy fixes 2022-05-13 23:21:14 -04:00
940e88d2ca more clang-tidy fixes 2022-05-13 21:12:48 -04:00
9c16819305 update code with clang-tidy fixes 2022-05-13 18:26:38 -04:00
3782eea7c4 must always compile MDI library with position independent code 2022-05-13 18:25:59 -04:00
056fd8be8f always build yaml-cpp included in PACE as static library 2022-05-13 17:00:37 -04:00
59560c47a7 Small tweak 2022-05-13 14:23:27 -04:00
979f84f96f Merge branch 'develop' of https://github.com/lammps/lammps into kk_update_3.6.0 2022-05-13 14:03:09 -04:00
66abc00e3c Add comment about MPI on Crusher 2022-05-13 13:33:27 -04:00
c41ad91a9d add support for reading binary STL files 2022-05-13 12:18:22 -04:00
545cec1785 Fix copy/paste issue 2022-05-13 10:15:25 -06:00
658a89e401 document .lammpsbin suffix for trajectory files 2022-05-13 11:15:06 -04:00
35dd5bc978 fix typo 2022-05-13 03:00:31 -04:00
90e2d9e966 tweak code comments 2022-05-12 16:51:24 -06:00
042564decd add deprecation info for old porosity option 2022-05-12 16:48:03 -06:00
3eea2463a1 Tweak error message 2022-05-12 16:00:22 -06:00
d207d53fd1 whitespace 2022-05-12 15:34:08 -06:00
d7bad09d35 Add Kokkos version of ML-PACE 2022-05-12 15:25:07 -06:00
58093fec99 accept .lammpsbin in addition to .bin for binary format output 2022-05-12 15:26:39 -04:00
4077c5c8ba add get_dump_by_id() API that mirrors other recent additions 2022-05-12 14:48:03 -04:00
0577bb6269 use Output::add_dump() and the dump_creator map and templates etc. 2022-05-12 14:47:16 -04:00
aff72c56a5 make Output::add_dump() return pointer to the created dump 2022-05-12 14:46:02 -04:00
c3a454370e work around "fix not computed at compatible times" errors with write_dump 2022-05-12 14:12:13 -04:00
301bd95900 small tweak 2022-05-12 13:17:51 -04:00
04537c9f22 Merge pull request #3263 from OrbitalC/compute_mliap_so3
adding so3 descriptor support for compute_mliap
2022-05-12 11:01:01 -04:00
5ad821ca5e apply clang-format 2022-05-12 09:24:37 -04:00
78d976bd36 Merge pull request #3260 from Colvars/colvars-update
Update Colvars to version 2022-05-09
2022-05-12 08:40:29 -04:00
371141f915 adding support for compute_mliap so3 2022-05-12 14:12:57 +02:00
3ea249a576 fix minor documentation issues 2022-05-11 13:23:59 -04:00
4cc3bdd35f adjust keyword/function names and command line to be simpler to use 2022-05-11 09:25:27 -04:00
227c4853f1 programming style 2022-05-11 08:13:13 -04:00
442116b305 update 2022-05-11 08:12:59 -04:00
ef3b90e838 Merge pull request #70 from jtclemm/create-atoms-mesh
Adding quasirandom mesh option
2022-05-11 08:12:18 -04:00
c9d350edc2 Adding quasirandom mesh option 2022-05-10 18:35:36 -06:00
bdbab77286 add note about re-generating optimized meshes for STL files 2022-05-10 15:23:54 -04:00
1220bea011 Update Colvars to version 2022-05-09
This update includes one new feature (neural-network based collective
variables), several small enhancements (including an automatic definition of
grid boundaries for angle-based CVs, and a normalization option for
eigenvector-based CVs), bugfixes and documentation improvements.

Usage information for specific features included in the Colvars library
(i.e. not just the library as a whole) is now also reported to the screen or
LAMMPS logfile (as is done already in other LAMMPS classes).

Notable to LAMMPS code development are the removals of duplicated code and of
ambiguously-named preprocessor defines in the Colvars headers.  Since the
last PR, the existing regression tests have also been running automatically
via GitHub Actions.

The following pull requests in the Colvars repository are relevant to LAMMPS:

- 475 Remove fatal error condition
  https://github.com/Colvars/colvars/pull/475 (@jhenin, @giacomofiorin)

- 474 Allow normalizing eigenvector vector components to deal with unit change
  https://github.com/Colvars/colvars/pull/474 (@giacomofiorin, @jhenin)

- 470 Better error handling in the initialization of NeuralNetwork CV
  https://github.com/Colvars/colvars/pull/470 (@HanatoK)

- 468 Add examples of histogram configuration, with and without explicit grid parameters
  https://github.com/Colvars/colvars/pull/468 (@giacomofiorin)

- 464 Fix #463 using more fine-grained features
  https://github.com/Colvars/colvars/pull/464 (@jhenin, @giacomofiorin)

- 447 [RFC] New option "scaledBiasingForce" for colvarbias
  https://github.com/Colvars/colvars/pull/447 (@HanatoK, @jhenin)

- 444 [RFC] Implementation of dense neural network as CV
  https://github.com/Colvars/colvars/pull/444 (@HanatoK, @giacomofiorin, @jhenin)

- 443 Fix explicit gradient dependency of sub-CVs
  https://github.com/Colvars/colvars/pull/443 (@HanatoK, @jhenin)

- 442 Persistent bias count
  https://github.com/Colvars/colvars/pull/442 (@jhenin, @giacomofiorin)

- 437 Return type of bias from scripting interface
  https://github.com/Colvars/colvars/pull/437 (@giacomofiorin)

- 434 More flexible use of boundaries from colvars by grids
  https://github.com/Colvars/colvars/pull/434 (@jhenin)

- 433 Prevent double-free in linearCombination
  https://github.com/Colvars/colvars/pull/433 (@HanatoK)

- 428 More complete documentation for index file format (NDX)
  https://github.com/Colvars/colvars/pull/428 (@giacomofiorin)

- 426 Integrate functional version of backup_file() into base proxy class
  https://github.com/Colvars/colvars/pull/426 (@giacomofiorin)

- 424 Track CVC inheritance when documenting feature usage
  https://github.com/Colvars/colvars/pull/424 (@giacomofiorin)

- 419 Generate citation report while running computations
  https://github.com/Colvars/colvars/pull/419 (@giacomofiorin, @jhenin)

- 415 Rebin metadynamics bias from explicit hills when available
  https://github.com/Colvars/colvars/pull/415 (@giacomofiorin)

- 312 Ignore a keyword if it has content to the left of it (regardless of braces)
  https://github.com/Colvars/colvars/pull/312 (@giacomofiorin)

Authors: @giacomofiorin, @HanatoK, @jhenin
2022-05-10 11:24:54 -04:00
5760c59d83 add a creator: tag to the YAML dump that allows to tell it apart 2022-05-10 08:31:02 -04:00
b6ee64dc12 Merge branch 'collected-small-changes' of github.com:akohlmey/lammps into collected-small-changes 2022-05-09 21:58:48 -04:00
eb44cbf848 small updates 2022-05-09 15:22:48 -04:00
23e17363f9 Merge remote-tracking branch 'github/doc-variable-extract-settings' into collected-small-changes 2022-05-09 15:03:13 -04:00
6344c667a0 more doc info for variable extrat_setting() func 2022-05-09 09:33:59 -06:00
24ef021fe0 fix typo 2022-05-09 10:05:12 -04:00
1660bae22a add examples import one image to manual 2022-05-08 21:15:32 -04:00
9ec35f0235 update docs to match the latest code 2022-05-08 19:14:06 -04:00
e0bb27dbb2 make radscale and radthresh class members 2022-05-07 23:04:34 -04:00
e9b1ca16a3 correctly initialize radius and molecule id 2022-05-07 21:24:08 -04:00
60b9fd2db8 minor tweaks simplify algorithm 2022-05-07 17:08:22 -04:00
bcfb6734f3 use average vertex distance from center as particle radius 2022-05-07 16:27:03 -04:00
6722d3fb00 add simple STL binary to ASCII converter (based on Wikipedia specs) 2022-05-07 16:26:25 -04:00
559dc68197 implement revised algorithm with recursion 2022-05-07 15:40:25 -04:00
102b61ae1b Merge branch 'develop' into create-atoms-mesh 2022-05-07 09:33:40 -04:00
5d08b62622 remove unused class member 2022-05-07 03:48:54 -04:00
4737b9efb7 Merge pull request #3250 from akohlmey/collected-small-changes
Collected small changes and bugfixes
2022-05-07 00:14:32 -04:00
d21d9d95fa Merge pull request #3255 from lammps/timer-variable
Add a timer-style variable
2022-05-06 17:46:22 -04:00
00bb566893 enforce that the number of neighbors cannot be negative (e.g. w/o neighbor list) 2022-05-06 17:45:01 -04:00
56e36a5df5 Merge pull request #2988 from stanmoore1/coo_opt
Add optimized version of compute orientorder/atom from Tomas Oppelstr…
2022-05-06 17:11:24 -04:00
21d3de65e6 fix typos 2022-05-06 17:05:18 -04:00
767f512dcf add "make ni" alias to "make no-installed" 2022-05-06 17:05:03 -04:00
907bc7eaa5 switch to using wall time 2022-05-06 16:58:28 -04:00
051c243cfc small programming style upgrade, apply clang-format, silence compiler warnings 2022-05-06 16:44:13 -04:00
905034893c finished testing of new delete_atoms options 2022-05-06 14:15:41 -06:00
6432660bc9 Merge branch 'develop' of https://github.com/lammps/lammps into coo_opt 2022-05-06 13:24:14 -06:00
6e78269612 whitespace 2022-05-06 15:11:15 -04:00
81a8b0cf85 Add Kokkos HIP preset 2022-05-06 12:40:12 -06:00
613ef04357 Merge branch 'develop' into timer-variable 2022-05-06 14:27:52 -04:00
5986e11d43 Merge branch 'develop' of github.com:lammps/lammps into kk_update_3.6.0 2022-05-06 12:04:00 -06:00
97012f2aaa correct classification of electrode package, as it requires BLAS/LAPACK 2022-05-06 13:57:26 -04:00
62a819d7b6 Tweak launch bounds to improve GPU performance 2022-05-06 13:37:05 -04:00
3bb9c64f9e update .gitignore and move electrode package for dependency on KSPACE 2022-05-06 13:35:51 -04:00
78f2907cbb implement a "make no-installed" command 2022-05-06 13:35:21 -04:00
f3fcd16628 adding of timer-style variables and associated doc pages 2022-05-06 11:21:36 -06:00
580e01535a Update Kokkos AMD Makefiles 2022-05-06 13:04:58 -04:00
8e423f07c5 Merge branch 'collected-small-changes' of github.com:akohlmey/lammps into collected-small-changes 2022-05-06 12:37:34 -04:00
2549b86d76 update/correct docs for support of compiling LAMMPS with visual studio on windows 2022-05-06 12:37:28 -04:00
ae73a9b7f7 Revert back to original code in npair_ssa_kokkos.h 2022-05-06 10:05:57 -06:00
73670dafc7 Merge branch 'develop' into collected-small-changes 2022-05-06 11:45:51 -04:00
aae44892c0 consolidate all FFT related redundant defines and typedefs in a single header 2022-05-06 11:27:17 -04:00
6ec169fa9d Fix warnings in Kokkos package 2022-05-06 08:23:45 -06:00
a35a2441ce Merge branch 'collected-small-changes' of github.com:akohlmey/lammps into collected-small-changes 2022-05-06 04:48:19 -04:00
abefff828d plug memory leak 2022-05-06 04:39:38 -04:00
71185b9f98 fix error message 2022-05-06 01:02:40 -04:00
8079f014bc final tweaks 2022-05-06 00:47:35 -04:00
773e3a87d9 add docs for create_atoms mesh 2022-05-06 00:47:05 -04:00
ff21142042 Merge remote-tracking branch 'github/develop' into create-atoms-mesh 2022-05-05 23:02:53 -04:00
bd373d6038 Merge pull request #3119 from erozic/feature-create-atoms-exclude
Feature create atoms overlap
2022-05-05 22:42:40 -04:00
7601a5c0fb correct/improve formatting 2022-05-05 22:20:43 -04:00
8ed401ce12 spelling 2022-05-05 21:34:31 -04:00
664943589e Merge remote-tracking branch 'github/develop' into feature-create-atoms-exclude 2022-05-05 21:09:39 -04:00
8dbfc0799c whitespace 2022-05-05 20:15:36 -04:00
46d638af0c Merge branch 'feature-create-atoms-exclude' of https://github.com/erozic/lammps into feature-create-atoms-exclude 2022-05-06 01:48:37 +02:00
ae230a33f5 Bug fix (user_quat initial value not set) 2022-05-06 01:47:45 +02:00
d4f212183e initial exact logic for delete_atoms partial 2022-05-05 17:45:42 -06:00
568e9c5878 Merge pull request #3237 from emilyviolet/hipfft
Add support for hipFFT with PPPMKokkos
2022-05-05 19:39:52 -04:00
5784fab588 starting to add timer-style variable 2022-05-05 17:04:50 -06:00
484a7c5db0 tweaked comments 2022-05-05 16:22:19 -06:00
7071f819d0 Header fix (add_molecule) 2022-05-05 23:53:14 +02:00
93c0f09c31 Logic fix in random-overlap and comment implemented 2022-05-05 23:35:11 +02:00
e5e3478afd Update CMake 2022-05-05 12:30:37 -06:00
bee7b09377 fix cut-n-paste bug 2022-05-05 14:05:22 -04:00
3b68c0ea24 Update Makefile comment 2022-05-05 14:02:29 -04:00
b79c0bc7b4 Update Kokkos library in LAMMPS to v3.6.0 2022-05-05 11:44:47 -06:00
3b9389e86c Update .gitignore 2022-05-05 12:23:52 -04:00
2c95f84acc Tweak error messages 2022-05-05 12:17:00 -04:00
c05af749df Merge branch 'develop' of https://github.com/lammps/lammps into hipfft 2022-05-05 12:15:28 -04:00
24b94551a2 Update Kokkos AMD Makefiles 2022-05-05 11:59:32 -04:00
99d4f83fa8 preliminary implementation 2022-05-05 09:56:22 -04:00
6c28b55c13 return nullptr instead of out-of-range data 2022-05-05 07:50:45 -04:00
2b1716cb3a fix more bugs with dump_modify every/time 2022-05-05 00:06:08 -04:00
6b47d6246b more changes and some debugging on a test script 2022-05-04 15:28:50 -06:00
cc437c78a0 some logic and syntax changes to code and doc page 2022-05-04 14:34:05 -06:00
517d934f7c more edits 2022-05-04 10:51:00 -06:00
c43bc000d9 Removed unnecessary commented out code section. 2022-04-27 19:46:18 +10:00
385f0c6c95 Update Kokkos build documentation to include hipFFT options. 2022-04-27 10:13:03 +10:00
8cdbf380cf Add support for hipFFT backend in PPPMKokkos. 2022-04-27 09:22:59 +10:00
d04cb4ba42 edits to doc page 2022-04-26 13:58:18 -06:00
782add6943 Merge branch 'feature-create-atoms-exclude' of github.com:erozic/lammps into create-overlap 2022-04-26 13:22:10 -06:00
72011bf325 Updated doc (use of overlap clarified) 2022-04-26 11:55:24 +02:00
811e5786fe Merge branch 'develop' into feature-create-atoms-exclude 2022-04-25 19:30:52 +02:00
c1146ebdcd Resolved conflicts with develop 2022-04-25 19:11:54 +02:00
2624043ab6 Synchronisation fix 2022-04-25 17:03:07 +02:00
23d39c7d02 Merge branch 'develop' into create-overlap 2022-04-22 10:37:39 -06:00
374a172246 Changed "exclude" keyword to "overlap"
+ added new error description to header file
+ minor fix in the doc file
2022-02-14 12:46:44 +01:00
78cf0365e6 bugfixes 2022-02-08 02:13:42 +01:00
330dd6a7a8 Documentation update for maxtries & exclude 2022-02-03 23:18:51 +01:00
b06d4a3300 exclude_cutoff to exclude_radius 2022-02-03 21:58:14 +01:00
1da12feafc Prepared for implementation of exclude
- maxtries returned as separate option
- errors for incompatible options (var with single + new)
2022-02-01 00:46:15 +01:00
1b6f850d42 Prepared for implementation 2022-02-01 00:17:21 +01:00
fc13c95c85 tweaks and bugs 2022-01-24 20:55:28 +01:00
86ee1f5a1f updated create_atoms.h/cpp with accumulated changes 2022-01-24 20:38:51 +01:00
e3c9d7936b Merge branch 'develop' of github.com:lammps/lammps into coo_opt 2021-11-01 17:00:13 -06:00
f05807f38e Revert 647380a 2021-11-01 14:34:50 -06:00
3d2a97b4a9 Fix bug in Kokkos neighborlist where stencil wasn't updated for occasional list 2021-11-01 14:07:04 -06:00
7e08525ce3 Merge branch 'master' of https://github.com/lammps/lammps into coo_opt 2021-11-01 12:57:26 -06:00
ae3e6e423a Fix loop level 2021-10-27 13:51:41 -06:00
2ca7dcb853 Use lighter construct than powint 2021-10-27 13:41:29 -06:00
2d52821cf5 Update from develop 2021-10-27 13:14:29 -06:00
647380a357 Avoid bitshift that gave incorrect results on GPU 2021-10-20 13:21:07 -06:00
01d96fc684 Whitespace 2021-10-15 12:50:46 -06:00
d97e55d54a Precompute some sqrt factors 2021-10-15 11:53:54 -06:00
23cd143aae Merge branch 'master' of github.com:lammps/lammps into coo_opt 2021-10-15 10:54:16 -06:00
17316f92c7 Add optimized version of compute_orientorder_atom from Tomas Oppelstrup (LLNL) 2021-10-12 07:50:05 -07:00
2e2b1b3687 Initial commit... 2019-05-02 15:17:31 +01:00
1039 changed files with 94535 additions and 28905 deletions

6
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

View File

@ -5,12 +5,19 @@ on:
push:
branches: [develop]
workflow_dispatch:
jobs:
analyze:
name: Analyze
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
strategy:
fail-fast: false
matrix:
@ -18,17 +25,17 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/${{ matrix.language }}.yml
@ -46,4 +53,4 @@ jobs:
cmake --build . --parallel 2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2

View File

@ -5,6 +5,8 @@ on:
push:
branches: [develop]
workflow_dispatch:
jobs:
build:
name: Windows Compilation Test
@ -13,12 +15,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Select Python version
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'

View File

@ -5,6 +5,8 @@ on:
push:
branches: [develop]
workflow_dispatch:
jobs:
build:
name: MacOS Unit Test
@ -15,7 +17,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2
@ -26,7 +28,7 @@ jobs:
run: mkdir build
- name: Set up ccache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: macos-ccache-${{ github.sha }}

615
cmake/CMakeLists.jpeg Normal file
View File

@ -0,0 +1,615 @@
cmake_minimum_required(VERSION 3.10)
# When using CMake 3.4 and later, don't export symbols from executables unless
# the CMAKE_ENABLE_EXPORTS variable is set.
if(POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
if(CMAKE_EXECUTABLE_SUFFIX)
set(CMAKE_EXECUTABLE_SUFFIX_TMP ${CMAKE_EXECUTABLE_SUFFIX})
endif()
project(libjpeg-turbo C)
set(VERSION 2.1.3)
set(COPYRIGHT_YEAR "1991-2022")
string(REPLACE "." ";" VERSION_TRIPLET ${VERSION})
list(GET VERSION_TRIPLET 0 VERSION_MAJOR)
list(GET VERSION_TRIPLET 1 VERSION_MINOR)
list(GET VERSION_TRIPLET 2 VERSION_REVISION)
function(pad_number NUMBER OUTPUT_LEN)
string(LENGTH "${${NUMBER}}" INPUT_LEN)
if(INPUT_LEN LESS OUTPUT_LEN)
math(EXPR ZEROES "${OUTPUT_LEN} - ${INPUT_LEN} - 1")
set(NUM ${${NUMBER}})
foreach(C RANGE ${ZEROES})
set(NUM "0${NUM}")
endforeach()
set(${NUMBER} ${NUM} PARENT_SCOPE)
endif()
endfunction()
pad_number(VERSION_MINOR 3)
pad_number(VERSION_REVISION 3)
set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVISION})
# CMake 3.14 and later sets CMAKE_MACOSX_BUNDLE to TRUE by default when
# CMAKE_SYSTEM_NAME is iOS, tvOS, or watchOS, which breaks the libjpeg-turbo
# build. (Specifically, when CMAKE_MACOSX_BUNDLE is TRUE, executables for
# Apple platforms are built as application bundles, which causes CMake to
# complain that our install() directives for executables do not specify a
# BUNDLE DESTINATION. Even if CMake did not complain, building executables as
# application bundles would break our iOS packages.)
set(CMAKE_MACOSX_BUNDLE FALSE)
string(TIMESTAMP DEFAULT_BUILD "%Y%m%d")
set(BUILD ${DEFAULT_BUILD} CACHE STRING "Build string (default: ${DEFAULT_BUILD})")
# NOTE: On Windows, this does nothing except when using MinGW or Cygwin.
# CMAKE_BUILD_TYPE has no meaning in Visual Studio, and it always defaults to
# Debug when using NMake.
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
message(STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}")
include(cmakescripts/PackageInfo.cmake)
# Detect CPU type and whether we're building 64-bit or 32-bit code
math(EXPR BITS "${CMAKE_SIZEOF_VOID_P} * 8")
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} CMAKE_SYSTEM_PROCESSOR_LC)
set(COUNT 1)
foreach(ARCH ${CMAKE_OSX_ARCHITECTURES})
if(COUNT GREATER 1)
message(FATAL_ERROR "The libjpeg-turbo build system does not support multiple values in CMAKE_OSX_ARCHITECTURES.")
endif()
math(EXPR COUNT "${COUNT}+1")
endforeach()
if(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86_64" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "amd64" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "i[0-9]86" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "ia32")
if(BITS EQUAL 64 OR CMAKE_C_COMPILER_ABI MATCHES "ELF X32")
set(CPU_TYPE x86_64)
else()
set(CPU_TYPE i386)
endif()
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL ${CPU_TYPE})
set(CMAKE_SYSTEM_PROCESSOR ${CPU_TYPE})
endif()
elseif(CMAKE_SYSTEM_PROCESSOR_LC STREQUAL "aarch64" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "^arm")
if(BITS EQUAL 64)
set(CPU_TYPE arm64)
else()
set(CPU_TYPE arm)
endif()
elseif(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "^ppc" OR
CMAKE_SYSTEM_PROCESSOR_LC MATCHES "^powerpc")
set(CPU_TYPE powerpc)
else()
set(CPU_TYPE ${CMAKE_SYSTEM_PROCESSOR_LC})
endif()
if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR
CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR
CMAKE_OSX_ARCHITECTURES MATCHES "i386")
set(CPU_TYPE ${CMAKE_OSX_ARCHITECTURES})
endif()
if(CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
set(CPU_TYPE powerpc)
endif()
if(MSVC_IDE AND CMAKE_GENERATOR_PLATFORM MATCHES "arm64")
set(CPU_TYPE arm64)
endif()
message(STATUS "${BITS}-bit build (${CPU_TYPE})")
macro(report_directory var)
if(CMAKE_INSTALL_${var} STREQUAL CMAKE_INSTALL_FULL_${var})
message(STATUS "CMAKE_INSTALL_${var} = ${CMAKE_INSTALL_${var}}")
else()
message(STATUS "CMAKE_INSTALL_${var} = ${CMAKE_INSTALL_${var}} (${CMAKE_INSTALL_FULL_${var}})")
endif()
mark_as_advanced(CLEAR CMAKE_INSTALL_${var})
endmacro()
set(DIRLIST "BINDIR;DATAROOTDIR;DOCDIR;INCLUDEDIR;LIBDIR")
if(UNIX)
list(APPEND DIRLIST "MANDIR")
endif()
foreach(dir ${DIRLIST})
report_directory(${dir})
endforeach()
###############################################################################
# CONFIGURATION OPTIONS
###############################################################################
macro(boolean_number var)
if(${var})
set(${var} 1 ${ARGN})
else()
set(${var} 0 ${ARGN})
endif()
endmacro()
option(ENABLE_SHARED "Build shared libraries" FALSE)
boolean_number(ENABLE_SHARED)
option(ENABLE_STATIC "Build static libraries" TRUE)
boolean_number(ENABLE_STATIC)
option(REQUIRE_SIMD "Generate a fatal error if SIMD extensions are not available for this platform (default is to fall back to a non-SIMD build)" FALSE)
boolean_number(REQUIRE_SIMD)
option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_ARITH_DEC=0 WITH_ARITH_ENC=0 WITH_JAVA=0 WITH_SIMD=0 WITH_TURBOJPEG=0 )" FALSE)
boolean_number(WITH_12BIT)
option(WITH_ARITH_DEC "Include arithmetic decoding support when emulating the libjpeg v6b API/ABI" TRUE)
boolean_number(WITH_ARITH_DEC)
option(WITH_ARITH_ENC "Include arithmetic encoding support when emulating the libjpeg v6b API/ABI" TRUE)
boolean_number(WITH_ARITH_ENC)
if(CMAKE_C_COMPILER_ABI MATCHES "ELF X32")
set(WITH_JAVA 0)
else()
option(WITH_JAVA "Build Java wrapper for the TurboJPEG API library (implies ENABLE_SHARED=1)" FALSE)
boolean_number(WITH_JAVA)
endif()
option(WITH_JPEG7 "Emulate libjpeg v7 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)" FALSE)
boolean_number(WITH_JPEG7)
option(WITH_JPEG8 "Emulate libjpeg v8 API/ABI (this makes ${CMAKE_PROJECT_NAME} backward-incompatible with libjpeg v6b)" FALSE)
boolean_number(WITH_JPEG8)
option(WITH_MEM_SRCDST "Include in-memory source/destination manager functions when emulating the libjpeg v6b or v7 API/ABI" TRUE)
boolean_number(WITH_MEM_SRCDST)
option(WITH_SIMD "Include SIMD extensions, if available for this platform" FALSE)
boolean_number(WITH_SIMD)
option(WITH_TURBOJPEG "Include the TurboJPEG API library and associated test programs" FALSE)
boolean_number(WITH_TURBOJPEG)
option(WITH_FUZZ "Build fuzz targets" FALSE)
macro(report_option var desc)
if(${var})
message(STATUS "${desc} enabled (${var} = ${${var}})")
else()
message(STATUS "${desc} disabled (${var} = ${${var}})")
endif()
endmacro()
if(WITH_JAVA)
set(ENABLE_SHARED 1)
endif()
# Explicitly setting CMAKE_POSITION_INDEPENDENT_CODE=FALSE disables PIC for all
# targets, which will cause the shared library builds to fail. Thus, if shared
# libraries are enabled and CMAKE_POSITION_INDEPENDENT_CODE is explicitly set
# to FALSE, we need to unset it, thus restoring the default behavior
# (automatically using PIC for shared library targets.)
if(DEFINED CMAKE_POSITION_INDEPENDENT_CODE AND
NOT CMAKE_POSITION_INDEPENDENT_CODE AND ENABLE_SHARED)
unset(CMAKE_POSITION_INDEPENDENT_CODE CACHE)
endif()
report_option(ENABLE_SHARED "Shared libraries")
report_option(ENABLE_STATIC "Static libraries")
if(ENABLE_SHARED)
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
endif()
if(WITH_JPEG8 OR WITH_JPEG7)
set(WITH_ARITH_ENC 1)
set(WITH_ARITH_DEC 1)
endif()
if(WITH_JPEG8)
set(WITH_MEM_SRCDST 0)
endif()
if(WITH_12BIT)
set(WITH_ARITH_DEC 0)
set(WITH_ARITH_ENC 0)
set(WITH_JAVA 0)
set(WITH_SIMD 0)
set(WITH_TURBOJPEG 0)
set(BITS_IN_JSAMPLE 12)
else()
set(BITS_IN_JSAMPLE 8)
endif()
report_option(WITH_12BIT "12-bit JPEG support")
if(WITH_ARITH_DEC)
set(D_ARITH_CODING_SUPPORTED 1)
endif()
if(NOT WITH_12BIT)
report_option(WITH_ARITH_DEC "Arithmetic decoding support")
endif()
if(WITH_ARITH_ENC)
set(C_ARITH_CODING_SUPPORTED 1)
endif()
if(NOT WITH_12BIT)
report_option(WITH_ARITH_ENC "Arithmetic encoding support")
endif()
if(NOT WITH_12BIT)
report_option(WITH_TURBOJPEG "TurboJPEG API library")
report_option(WITH_JAVA "TurboJPEG Java wrapper")
endif()
if(WITH_MEM_SRCDST)
set(MEM_SRCDST_SUPPORTED 1)
set(MEM_SRCDST_FUNCTIONS "global: jpeg_mem_dest; jpeg_mem_src;")
endif()
if(NOT WITH_JPEG8)
report_option(WITH_MEM_SRCDST "In-memory source/destination managers")
endif()
set(SO_AGE 2)
if(WITH_MEM_SRCDST)
set(SO_AGE 3)
endif()
if(WITH_JPEG8)
set(JPEG_LIB_VERSION 80)
elseif(WITH_JPEG7)
set(JPEG_LIB_VERSION 70)
else()
set(JPEG_LIB_VERSION 62)
endif()
math(EXPR JPEG_LIB_VERSION_DIV10 "${JPEG_LIB_VERSION} / 10")
math(EXPR JPEG_LIB_VERSION_MOD10 "${JPEG_LIB_VERSION} % 10")
if(JPEG_LIB_VERSION STREQUAL "62")
set(DEFAULT_SO_MAJOR_VERSION ${JPEG_LIB_VERSION})
else()
set(DEFAULT_SO_MAJOR_VERSION ${JPEG_LIB_VERSION_DIV10})
endif()
if(JPEG_LIB_VERSION STREQUAL "80")
set(DEFAULT_SO_MINOR_VERSION 2)
else()
set(DEFAULT_SO_MINOR_VERSION 0)
endif()
# This causes SO_MAJOR_VERSION/SO_MINOR_VERSION to reset to defaults if
# WITH_JPEG7 or WITH_JPEG8 has changed.
if((DEFINED WITH_JPEG7_INT AND NOT WITH_JPEG7 EQUAL WITH_JPEG7_INT) OR
(DEFINED WITH_JPEG8_INT AND NOT WITH_JPEG8 EQUAL WITH_JPEG8_INT))
set(FORCE_SO_VERSION "FORCE")
endif()
set(WITH_JPEG7_INT ${WITH_JPEG7} CACHE INTERNAL "")
set(WITH_JPEG8_INT ${WITH_JPEG8} CACHE INTERNAL "")
set(SO_MAJOR_VERSION ${DEFAULT_SO_MAJOR_VERSION} CACHE STRING
"Major version of the libjpeg API shared library (default: ${DEFAULT_SO_MAJOR_VERSION})"
${FORCE_SO_VERSION})
set(SO_MINOR_VERSION ${DEFAULT_SO_MINOR_VERSION} CACHE STRING
"Minor version of the libjpeg API shared library (default: ${DEFAULT_SO_MINOR_VERSION})"
${FORCE_SO_VERSION})
set(JPEG_LIB_VERSION_DECIMAL "${JPEG_LIB_VERSION_DIV10}.${JPEG_LIB_VERSION_MOD10}")
message(STATUS "Emulating libjpeg API/ABI v${JPEG_LIB_VERSION_DECIMAL} (WITH_JPEG7 = ${WITH_JPEG7}, WITH_JPEG8 = ${WITH_JPEG8})")
message(STATUS "libjpeg API shared library version = ${SO_MAJOR_VERSION}.${SO_AGE}.${SO_MINOR_VERSION}")
# Because the TurboJPEG API library uses versioned symbols and changes the
# names of functions whenever they are modified in a backward-incompatible
# manner, it is always backward-ABI-compatible with itself, so the major and
# minor SO versions don't change. However, we increase the middle number (the
# SO "age") whenever functions are added to the API.
set(TURBOJPEG_SO_MAJOR_VERSION 0)
set(TURBOJPEG_SO_AGE 2)
set(TURBOJPEG_SO_VERSION 0.${TURBOJPEG_SO_AGE}.0)
###############################################################################
# COMPILER SETTINGS
###############################################################################
if(MSVC)
option(WITH_CRT_DLL
"Link all ${CMAKE_PROJECT_NAME} libraries and executables with the C run-time DLL (msvcr*.dll) instead of the static C run-time library (libcmt*.lib.) The default is to use the C run-time DLL only with the libraries and executables that need it."
FALSE)
if(NOT WITH_CRT_DLL)
# Use the static C library for all build types
foreach(var CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${var} "${${var}}")
endif()
endforeach()
endif()
add_definitions(-D_CRT_NONSTDC_NO_WARNINGS)
endif()
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
# Use the maximum optimization level for release builds
foreach(var CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${var} MATCHES "-O2")
string(REGEX REPLACE "-O2" "-O3" ${var} "${${var}}")
endif()
endforeach()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
if(CMAKE_C_COMPILER_ID MATCHES "SunPro")
# Use the maximum optimization level for release builds
foreach(var CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${var} MATCHES "-xO3")
string(REGEX REPLACE "-xO3" "-xO5" ${var} "${${var}}")
endif()
if(${var} MATCHES "-xO2")
string(REGEX REPLACE "-xO2" "-xO5" ${var} "${${var}}")
endif()
endforeach()
endif()
endif()
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
set(EFFECTIVE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
message(STATUS "Compiler flags = ${EFFECTIVE_C_FLAGS}")
set(EFFECTIVE_LD_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UC}}")
message(STATUS "Linker flags = ${EFFECTIVE_LD_FLAGS}")
include(CheckCSourceCompiles)
include(CheckIncludeFiles)
include(CheckTypeSize)
check_type_size("size_t" SIZE_T)
check_type_size("unsigned long" UNSIGNED_LONG)
if(SIZE_T EQUAL UNSIGNED_LONG)
check_c_source_compiles("int main(int argc, char **argv) { unsigned long a = argc; return __builtin_ctzl(a); }"
HAVE_BUILTIN_CTZL)
endif()
if(MSVC)
check_include_files("intrin.h" HAVE_INTRIN_H)
endif()
if(UNIX)
if(CMAKE_CROSSCOMPILING)
set(RIGHT_SHIFT_IS_UNSIGNED 0)
else()
include(CheckCSourceRuns)
check_c_source_runs("
#include <stdio.h>
#include <stdlib.h>
int is_shifting_signed (long arg) {
long res = arg >> 4;
if (res == -0x7F7E80CL)
return 1; /* right shift is signed */
/* see if unsigned-shift hack will fix it. */
/* we can't just test exact value since it depends on width of long... */
res |= (~0L) << (32-4);
if (res == -0x7F7E80CL)
return 0; /* right shift is unsigned */
printf(\"Right shift isn't acting as I expect it to.\\\\n\");
printf(\"I fear the JPEG software will not work at all.\\\\n\\\\n\");
return 0; /* try it with unsigned anyway */
}
int main (void) {
exit(is_shifting_signed(-0x7F7E80B1L));
}" RIGHT_SHIFT_IS_UNSIGNED)
endif()
endif()
if(MSVC)
set(INLINE_OPTIONS "__inline;inline")
else()
set(INLINE_OPTIONS "__inline__;inline")
endif()
option(FORCE_INLINE "Force function inlining" TRUE)
boolean_number(FORCE_INLINE)
if(FORCE_INLINE)
if(MSVC)
list(INSERT INLINE_OPTIONS 0 "__forceinline")
else()
list(INSERT INLINE_OPTIONS 0 "inline __attribute__((always_inline))")
list(INSERT INLINE_OPTIONS 0 "__inline__ __attribute__((always_inline))")
endif()
endif()
foreach(inline ${INLINE_OPTIONS})
check_c_source_compiles("${inline} static int foo(void) { return 0; } int main(void) { return foo(); }"
INLINE_WORKS)
if(INLINE_WORKS)
set(INLINE ${inline})
break()
endif()
endforeach()
if(NOT INLINE_WORKS)
message(FATAL_ERROR "Could not determine how to inline functions.")
endif()
message(STATUS "INLINE = ${INLINE} (FORCE_INLINE = ${FORCE_INLINE})")
if(WITH_TURBOJPEG)
if(MSVC)
set(THREAD_LOCAL "__declspec(thread)")
else()
set(THREAD_LOCAL "__thread")
endif()
check_c_source_compiles("${THREAD_LOCAL} int i; int main(void) { i = 0; return i; }" HAVE_THREAD_LOCAL)
if(HAVE_THREAD_LOCAL)
message(STATUS "THREAD_LOCAL = ${THREAD_LOCAL}")
else()
message(WARNING "Thread-local storage is not available. The TurboJPEG API library's global error handler will not be thread-safe.")
unset(THREAD_LOCAL)
endif()
endif()
if(UNIX AND NOT APPLE)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map "VERS_1 { global: *; };")
set(CMAKE_REQUIRED_FLAGS
"-Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
check_c_source_compiles("int main(void) { return 0; }" HAVE_VERSION_SCRIPT)
set(CMAKE_REQUIRED_FLAGS)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map)
if(HAVE_VERSION_SCRIPT)
message(STATUS "Linker supports GNU-style version scripts")
set(MAPFLAG "-Wl,--version-script,")
set(TJMAPFLAG "-Wl,--version-script,")
else()
message(STATUS "Linker does not support GNU-style version scripts")
if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
# The Solaris linker doesn't like our version script for the libjpeg API
# library, but the version script for the TurboJPEG API library should
# still work.
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map
"VERS_1 { global: foo; local: *; }; VERS_2 { global: foo2; } VERS_1;")
set(CMAKE_REQUIRED_FLAGS "-Wl,-M,${CMAKE_CURRENT_BINARY_DIR}/conftest.map -shared")
check_c_source_compiles("int foo() { return 0; } int foo2() { return 2; }"
HAVE_MAPFILE)
set(CMAKE_REQUIRED_FLAGS)
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/conftest.map)
if(HAVE_MAPFILE)
message(STATUS "Linker supports mapfiles")
set(TJMAPFLAG "-Wl,-M,")
else()
message(STATUS "Linker does not support mapfiles")
endif()
endif()
endif()
endif()
# Generate files
if(WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/win/jconfig.h.in jconfig.h)
else()
configure_file(jconfig.h.in jconfig.h)
endif()
configure_file(jconfigint.h.in jconfigint.h)
configure_file(jversion.h.in jversion.h)
if(UNIX)
configure_file(libjpeg.map.in libjpeg.map)
endif()
# Include directories and compiler definitions
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
###############################################################################
# TARGETS
###############################################################################
if(CMAKE_EXECUTABLE_SUFFIX_TMP)
set(CMAKE_EXECUTABLE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX_TMP})
endif()
message(STATUS "CMAKE_EXECUTABLE_SUFFIX = ${CMAKE_EXECUTABLE_SUFFIX}")
set(JPEG_SOURCES jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c
jcicc.c jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c
jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c
jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdicc.c jdinput.c
jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c
jdtrans.c jerror.c jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c
jidctint.c jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c)
if(WITH_ARITH_ENC OR WITH_ARITH_DEC)
set(JPEG_SOURCES ${JPEG_SOURCES} jaricom.c)
endif()
if(WITH_ARITH_ENC)
set(JPEG_SOURCES ${JPEG_SOURCES} jcarith.c)
endif()
if(WITH_ARITH_DEC)
set(JPEG_SOURCES ${JPEG_SOURCES} jdarith.c)
endif()
if(WITH_SIMD)
add_subdirectory(simd)
if(NEON_INTRINSICS)
add_definitions(-DNEON_INTRINSICS)
endif()
elseif(NOT WITH_12BIT)
message(STATUS "SIMD extensions: None (WITH_SIMD = ${WITH_SIMD})")
endif()
if(WITH_SIMD)
message(STATUS "SIMD extensions: ${CPU_TYPE} (WITH_SIMD = ${WITH_SIMD})")
if(MSVC_IDE OR XCODE)
set_source_files_properties(${SIMD_OBJS} PROPERTIES GENERATED 1)
endif()
else()
add_library(simd OBJECT jsimd_none.c)
if(NOT WIN32 AND (CMAKE_POSITION_INDEPENDENT_CODE OR ENABLE_SHARED))
set_target_properties(simd PROPERTIES POSITION_INDEPENDENT_CODE 1)
endif()
endif()
if(WITH_JAVA)
add_subdirectory(java)
endif()
if(ENABLE_SHARED)
add_subdirectory(sharedlib)
endif()
if(ENABLE_STATIC)
add_library(jpeg-static STATIC ${JPEG_SOURCES} $<TARGET_OBJECTS:simd>
${SIMD_OBJS})
if(NOT MSVC)
set_target_properties(jpeg-static PROPERTIES OUTPUT_NAME jpeg)
endif()
endif()
if(WITH_TURBOJPEG)
if(ENABLE_SHARED)
set(TURBOJPEG_SOURCES ${JPEG_SOURCES} $<TARGET_OBJECTS:simd> ${SIMD_OBJS}
turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c rdbmp.c rdppm.c
wrbmp.c wrppm.c)
set(TJMAPFILE ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg-mapfile)
if(WITH_JAVA)
set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES} turbojpeg-jni.c)
include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
set(TJMAPFILE ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg-mapfile.jni)
endif()
if(MSVC)
configure_file(${CMAKE_SOURCE_DIR}/win/turbojpeg.rc.in
${CMAKE_BINARY_DIR}/win/turbojpeg.rc)
set(TURBOJPEG_SOURCES ${TURBOJPEG_SOURCES}
${CMAKE_BINARY_DIR}/win/turbojpeg.rc)
endif()
add_library(turbojpeg SHARED ${TURBOJPEG_SOURCES})
set_property(TARGET turbojpeg PROPERTY COMPILE_FLAGS
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
if(WIN32)
set_target_properties(turbojpeg PROPERTIES DEFINE_SYMBOL DLLDEFINE)
endif()
if(MINGW)
set_target_properties(turbojpeg PROPERTIES LINK_FLAGS -Wl,--kill-at)
endif()
if(APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.4))
if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG)
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
endif()
set_target_properties(turbojpeg PROPERTIES MACOSX_RPATH 1)
endif()
set_target_properties(turbojpeg PROPERTIES
SOVERSION ${TURBOJPEG_SO_MAJOR_VERSION} VERSION ${TURBOJPEG_SO_VERSION})
if(TJMAPFLAG)
set_target_properties(turbojpeg PROPERTIES
LINK_FLAGS "${TJMAPFLAG}${TJMAPFILE}")
endif()
endif()
if(ENABLE_STATIC)
add_library(turbojpeg-static STATIC ${JPEG_SOURCES} $<TARGET_OBJECTS:simd>
${SIMD_OBJS} turbojpeg.c transupp.c jdatadst-tj.c jdatasrc-tj.c rdbmp.c
rdppm.c wrbmp.c wrppm.c)
set_property(TARGET turbojpeg-static PROPERTY COMPILE_FLAGS
"-DBMP_SUPPORTED -DPPM_SUPPORTED")
if(NOT MSVC)
set_target_properties(turbojpeg-static PROPERTIES OUTPUT_NAME turbojpeg)
endif()
endif()
endif()
if(WIN32)
set(USE_SETMODE "-DUSE_SETMODE")
endif()
if(WITH_12BIT)
set(COMPILE_FLAGS "-DGIF_SUPPORTED -DPPM_SUPPORTED ${USE_SETMODE}")
else()
set(COMPILE_FLAGS "-DBMP_SUPPORTED -DGIF_SUPPORTED -DPPM_SUPPORTED -DTARGA_SUPPORTED ${USE_SETMODE}")
set(CJPEG_BMP_SOURCES rdbmp.c rdtarga.c)
set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c)
endif()

741
cmake/CMakeLists.png Normal file
View File

@ -0,0 +1,741 @@
# CMakeLists.txt
# Copyright (C) 2018 Cosmin Truta
# Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson
# Written by Christian Ehrlicher, 2007
# Revised by Roger Lowman, 2009-2010
# Revised by Clifford Yapp, 2011-2012,2017
# Revised by Roger Leigh, 2016
# Revised by Andreas Franek, 2016
# Revised by Sam Serrels, 2017
# Revised by Vadim Barkov, 2017
# Revised by Vicky Pfau, 2018
# Revised by Cameron Cawley, 2018
# Revised by Cosmin Truta, 2018
# Revised by Kyle Bentley, 2018
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
cmake_minimum_required(VERSION 3.10)
cmake_policy(VERSION 3.1)
# When using CMake 3.4 and later, don't export symbols from executables unless
# the CMAKE_ENABLE_EXPORTS variable is set.
if(POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
project(libpng C ASM)
enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
set(PNGLIB_RELEASE 37)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
include(GNUInstallDirs)
# needed packages
# Allow users to specify location of Zlib.
# Useful if zlib is being built alongside this as a sub-project.
option(PNG_BUILD_ZLIB "Custom zlib Location, else find_package is used" ON)
if(NOT PNG_BUILD_ZLIB)
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
endif()
if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
find_library(M_LIBRARY m)
else()
# libm is not needed and/or not available
set(M_LIBRARY "")
endif()
# COMMAND LINE OPTIONS
option(PNG_SHARED "Build shared lib" OFF)
option(PNG_STATIC "Build static lib" ON)
option(PNG_TESTS "Build libpng tests" OFF)
# Many more configuration options could be added here
option(PNG_FRAMEWORK "Build OS X framework" OFF)
option(PNG_DEBUG "Build with debug output" OFF)
option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations" OFF)
set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names")
set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings")
if(PNG_HARDWARE_OPTIMIZATIONS)
# set definitions and sources for arm
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations:
check: (default) use internal checking code;
off: disable the optimizations;
on: turn on unconditionally.")
set_property(CACHE PNG_ARM_NEON PROPERTY STRINGS
${PNG_ARM_NEON_POSSIBLE_VALUES})
list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_ARM_NEON} STREQUAL "off")
set(libpng_arm_sources
arm/arm_init.c
arm/filter_neon.S
arm/filter_neon_intrinsics.c
arm/palette_neon_intrinsics.c)
if(${PNG_ARM_NEON} STREQUAL "on")
add_definitions(-DPNG_ARM_NEON_OPT=2)
elseif(${PNG_ARM_NEON} STREQUAL "check")
add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED)
endif()
else()
add_definitions(-DPNG_ARM_NEON_OPT=0)
endif()
endif()
# set definitions and sources for powerpc
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off)
set(PNG_POWERPC_VSX "on" CACHE STRING "Enable POWERPC VSX optimizations:
off: disable the optimizations.")
set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS
${PNG_POWERPC_VSX_POSSIBLE_VALUES})
list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_POWERPC_VSX} STREQUAL "off")
set(libpng_powerpc_sources
powerpc/powerpc_init.c
powerpc/filter_vsx_intrinsics.c)
if(${PNG_POWERPC_VSX} STREQUAL "on")
add_definitions(-DPNG_POWERPC_VSX_OPT=2)
endif()
else()
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
endif()
endif()
# set definitions and sources for intel
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
set(PNG_INTEL_SSE_POSSIBLE_VALUES on off)
set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations:
off: disable the optimizations")
set_property(CACHE PNG_INTEL_SSE PROPERTY STRINGS
${PNG_INTEL_SSE_POSSIBLE_VALUES})
list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_INTEL_SSE} STREQUAL "off")
set(libpng_intel_sources
intel/intel_init.c
intel/filter_sse2_intrinsics.c)
if(${PNG_INTEL_SSE} STREQUAL "on")
add_definitions(-DPNG_INTEL_SSE_OPT=1)
endif()
else()
add_definitions(-DPNG_INTEL_SSE_OPT=0)
endif()
endif()
# set definitions and sources for MIPS
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations:
off: disable the optimizations")
set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS
${PNG_MIPS_MSA_POSSIBLE_VALUES})
list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_MIPS_MSA} STREQUAL "off")
set(libpng_mips_sources
mips/mips_init.c
mips/filter_msa_intrinsics.c)
if(${PNG_MIPS_MSA} STREQUAL "on")
add_definitions(-DPNG_MIPS_MSA_OPT=2)
endif()
else()
add_definitions(-DPNG_MIPS_MSA_OPT=0)
endif()
endif()
else(PNG_HARDWARE_OPTIMIZATIONS)
# set definitions and sources for arm
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
add_definitions(-DPNG_ARM_NEON_OPT=0)
endif()
# set definitions and sources for powerpc
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
add_definitions(-DPNG_POWERPC_VSX_OPT=0)
endif()
# set definitions and sources for intel
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
add_definitions(-DPNG_INTEL_SSE_OPT=0)
endif()
# set definitions and sources for MIPS
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
add_definitions(-DPNG_MIPS_MSA_OPT=0)
endif()
endif(PNG_HARDWARE_OPTIMIZATIONS)
# SET LIBNAME
set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
# to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d")
include(CheckCSourceCompiles)
option(ld-version-script "Enable linker version script" ON)
if(ld-version-script AND NOT APPLE)
# Check if LD supports linker scripts.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 {
global: sym;
local: *;
};
VERS_2 {
global: sym2;
main;
} VERS_1;
")
set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script='${CMAKE_CURRENT_BINARY_DIR}/conftest.map'")
check_c_source_compiles("void sym(void) {}
void sym2(void) {}
int main(void) {return 0;}
" HAVE_LD_VERSION_SCRIPT)
if(NOT HAVE_LD_VERSION_SCRIPT)
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE} "-Wl,-M -Wl,${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
check_c_source_compiles("void sym(void) {}
void sym2(void) {}
int main(void) {return 0;}
" HAVE_SOLARIS_LD_VERSION_SCRIPT)
endif()
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
endif()
# Find symbol prefix. Likely obsolete and unnecessary with recent
# toolchains (it's not done in many other projects).
function(symbol_prefix)
set(SYMBOL_PREFIX)
execute_process(COMMAND "${CMAKE_C_COMPILER}" "-E" "-"
INPUT_FILE /dev/null
OUTPUT_VARIABLE OUT
RESULT_VARIABLE STATUS)
if(CPP_FAIL)
message(WARNING "Failed to run the C preprocessor")
endif()
string(REPLACE "\n" ";" OUT "${OUT}")
foreach(line ${OUT})
string(REGEX MATCH "^PREFIX=" found_match "${line}")
if(found_match)
string(REGEX REPLACE "^PREFIX=(.*\)" "\\1" prefix "${line}")
string(REGEX MATCH "__USER_LABEL_PREFIX__" found_match "${prefix}")
if(found_match)
string(REGEX REPLACE "(.*)__USER_LABEL_PREFIX__(.*)" "\\1\\2" prefix "${prefix}")
endif()
set(SYMBOL_PREFIX "${prefix}")
endif()
endforeach()
message(STATUS "Symbol prefix: ${SYMBOL_PREFIX}")
set(SYMBOL_PREFIX "${SYMBOL_PREFIX}" PARENT_SCOPE)
endfunction()
if(UNIX)
symbol_prefix()
endif()
find_program(AWK NAMES gawk awk)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(NOT AWK OR ANDROID)
# No awk available to generate sources; use pre-built pnglibconf.h
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
add_custom_target(genfiles) # Dummy
else()
include(CMakeParseArguments)
# Generate .chk from .out with awk
# generate_chk(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]])
function(generate_chk)
set(options)
set(oneValueArgs INPUT OUTPUT)
set(multiValueArgs DEPENDS)
cmake_parse_arguments(_GC "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT _GC_INPUT)
message(FATAL_ERROR "generate_chk: Missing INPUT argument")
endif()
if(NOT _GC_OUTPUT)
message(FATAL_ERROR "generate_chk: Missing OUTPUT argument")
endif()
add_custom_command(OUTPUT "${_GC_OUTPUT}"
COMMAND "${CMAKE_COMMAND}"
"-DINPUT=${_GC_INPUT}"
"-DOUTPUT=${_GC_OUTPUT}"
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake"
DEPENDS "${_GC_INPUT}" ${_GC_DEPENDS}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endfunction()
# Generate .out from .c with awk
# generate_out(INPUT inputfile OUTPUT outputfile [DEPENDS dep1 [dep2...]])
function(generate_out)
set(options)
set(oneValueArgs INPUT OUTPUT)
set(multiValueArgs DEPENDS)
cmake_parse_arguments(_GO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT _GO_INPUT)
message(FATAL_ERROR "generate_out: Missing INPUT argument")
endif()
if(NOT _GO_OUTPUT)
message(FATAL_ERROR "generate_out: Missing OUTPUT argument")
endif()
add_custom_command(OUTPUT "${_GO_OUTPUT}"
COMMAND "${CMAKE_COMMAND}"
"-DINPUT=${_GO_INPUT}"
"-DOUTPUT=${_GO_OUTPUT}"
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake"
DEPENDS "${_GO_INPUT}" ${_GO_DEPENDS}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endfunction()
# Generate specific source file with awk
# generate_source(OUTPUT outputfile [DEPENDS dep1 [dep2...]])
function(generate_source)
set(options)
set(oneValueArgs OUTPUT)
set(multiValueArgs DEPENDS)
cmake_parse_arguments(_GSO "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if(NOT _GSO_OUTPUT)
message(FATAL_ERROR "generate_source: Missing OUTPUT argument")
endif()
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_GSO_OUTPUT}"
COMMAND "${CMAKE_COMMAND}"
"-DOUTPUT=${_GSO_OUTPUT}"
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
DEPENDS ${_GSO_DEPENDS}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endfunction()
# Copy file
function(generate_copy source destination)
add_custom_command(OUTPUT "${destination}"
COMMAND "${CMAKE_COMMAND}" -E remove "${destination}"
COMMAND "${CMAKE_COMMAND}" -E copy "${source}"
"${destination}"
DEPENDS "${source}")
endfunction()
# Generate scripts/pnglibconf.h
generate_source(OUTPUT "scripts/pnglibconf.c"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
# Generate pnglibconf.c
generate_source(OUTPUT "pnglibconf.c"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.dfa"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/options.awk"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h")
if(PNG_PREFIX)
set(PNGLIBCONF_H_EXTRA_DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/macro.lst")
set(PNGPREFIX_H_EXTRA_DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out")
endif()
generate_out(INPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out")
# Generate pnglibconf.h
generate_source(OUTPUT "pnglibconf.h"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out"
${PNGLIBCONF_H_EXTRA_DEPENDS})
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/intprefix.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/prefix.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out")
# Generate pngprefix.h
generate_source(OUTPUT "pngprefix.h"
DEPENDS ${PNGPREFIX_H_EXTRA_DEPENDS})
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/sym.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt")
generate_out(INPUT "${CMAKE_CURRENT_SOURCE_DIR}/scripts/vers.c"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/png.h"
"${CMAKE_CURRENT_SOURCE_DIR}/pngconf.h"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h")
generate_chk(INPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/scripts/checksym.awk"
"${CMAKE_CURRENT_SOURCE_DIR}/scripts/symbols.def")
add_custom_target(symbol-check DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk")
generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
"${CMAKE_CURRENT_BINARY_DIR}/libpng.sym")
generate_copy("${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out"
"${CMAKE_CURRENT_BINARY_DIR}/libpng.vers")
add_custom_target(genvers DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.vers")
add_custom_target(gensym DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/libpng.sym")
add_custom_target("genprebuilt"
COMMAND "${CMAKE_COMMAND}"
"-DOUTPUT=scripts/pnglibconf.h.prebuilt"
-P "${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
# A single target handles generation of all generated files. If
# they are depended upon separately by multiple targets, this
# confuses parallel make (it would require a separate top-level
# target for each file to track the dependencies properly).
add_custom_target(genfiles DEPENDS
"${CMAKE_CURRENT_BINARY_DIR}/libpng.sym"
"${CMAKE_CURRENT_BINARY_DIR}/libpng.vers"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h"
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.out"
"${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/intprefix.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/pnglibconf.c"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/prefix.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/sym.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.chk"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/symbols.out"
"${CMAKE_CURRENT_BINARY_DIR}/scripts/vers.out")
endif(NOT AWK OR ANDROID)
# OUR SOURCES
set(libpng_public_hdrs
png.h
pngconf.h
"${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h"
)
set(libpng_private_hdrs
pngpriv.h
pngdebug.h
pnginfo.h
pngstruct.h
)
if(AWK AND NOT ANDROID)
list(APPEND libpng_private_hdrs "${CMAKE_CURRENT_BINARY_DIR}/pngprefix.h")
endif()
set(libpng_sources
${libpng_public_hdrs}
${libpng_private_hdrs}
png.c
pngerror.c
pngget.c
pngmem.c
pngpread.c
pngread.c
pngrio.c
pngrtran.c
pngrutil.c
pngset.c
pngtrans.c
pngwio.c
pngwrite.c
pngwtran.c
pngwutil.c
${libpng_arm_sources}
${libpng_intel_sources}
${libpng_mips_sources}
${libpng_powerpc_sources}
)
set(pngtest_sources
pngtest.c
)
set(pngvalid_sources
contrib/libtests/pngvalid.c
)
set(pngstest_sources
contrib/libtests/pngstest.c
)
set(pngunknown_sources
contrib/libtests/pngunknown.c
)
set(pngimage_sources
contrib/libtests/pngimage.c
)
set(pngfix_sources
contrib/tools/pngfix.c
)
set(png_fix_itxt_sources
contrib/tools/png-fix-itxt.c
)
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
endif()
if(PNG_DEBUG)
add_definitions(-DPNG_DEBUG)
endif()
# NOW BUILD OUR TARGET
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
unset(PNG_LIB_TARGETS)
if(PNG_STATIC)
# does not work without changing name
set(PNG_LIB_NAME_STATIC png_static)
add_library(png_static STATIC ${libpng_sources})
add_dependencies(png_static genfiles)
# MSVC doesn't use a different file extension for shared vs. static
# libs. We are able to change OUTPUT_NAME to remove the _static
# for all other platforms.
if(NOT MSVC)
set_target_properties(png_static PROPERTIES
OUTPUT_NAME "${PNG_LIB_NAME}"
CLEAN_DIRECT_OUTPUT 1)
else()
set_target_properties(png_static PROPERTIES
OUTPUT_NAME "${PNG_LIB_NAME}_static"
CLEAN_DIRECT_OUTPUT 1)
endif()
list(APPEND PNG_LIB_TARGETS png_static)
if(MSVC)
# msvc does not append 'lib' - do it here to have consistent name
set_target_properties(png_static PROPERTIES PREFIX "lib")
endif()
target_link_libraries(png_static ${M_LIBRARY})
endif()
if(NOT PNG_LIB_TARGETS)
message(SEND_ERROR
"No library variant selected to build. "
"Please enable at least one of the following options: "
"PNG_STATIC, PNG_SHARED, PNG_FRAMEWORK")
endif()
# Set a variable with CMake code which:
# Creates a symlink from src to dest (if possible) or alternatively
# copies if different.
include(CMakeParseArguments)
function(create_symlink DEST_FILE)
cmake_parse_arguments(S "" "FILE;TARGET" "" ${ARGN})
if(NOT S_TARGET AND NOT S_FILE)
message(FATAL_ERROR "create_symlink: Missing TARGET or FILE argument")
endif()
if(S_TARGET AND S_FILE)
message(FATAL_ERROR "create_symlink: Both source file ${S_FILE} and build target ${S_TARGET} arguments are present; can only have one.")
endif()
if(S_FILE)
# If we don't need to symlink something that's coming from a build target,
# we can go ahead and symlink/copy at configure time.
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
execute_process(
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${S_FILE} ${DEST_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
else()
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink ${S_FILE} ${DEST_FILE}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
endif()
endif()
if(S_TARGET)
# We need to use generator expressions, which can be a bit tricky, so for
# simplicity make the symlink a POST_BUILD step and use the TARGET
# signature of add_custom_command.
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
add_custom_command(TARGET ${S_TARGET} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LINKER_FILE_DIR:${S_TARGET}>/${DEST_FILE})
else()
add_custom_command(TARGET ${S_TARGET} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E create_symlink $<TARGET_LINKER_FILE_NAME:${S_TARGET}> $<TARGET_LINKER_FILE_DIR:${S_TARGET}>/${DEST_FILE})
endif()
endif()
endfunction()
# Create source generation scripts.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genchk.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/scripts/genchk.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/genout.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/scripts/genout.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/gensrc.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/scripts/gensrc.cmake @ONLY)
# libpng is a library so default to 'lib'
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR lib)
endif()
# CREATE PKGCONFIG FILES
# We use the same files like ./configure, so we have to set its vars.
# Only do this on Windows for Cygwin - the files don't make much sense outside
# of a UNIX look-alike.
if(NOT WIN32 OR CYGWIN OR MINGW)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
set(LIBS "-lz -lm")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
create_symlink(libpng-config FILE ${PNGLIB_NAME}-config)
endif()
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(png PROPERTIES
# VERSION 16.${PNGLIB_RELEASE}.1.6.37
VERSION 16.${PNGLIB_RELEASE}.0
SOVERSION 16
CLEAN_DIRECT_OUTPUT 1)
endif()
# INSTALL
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
install(TARGETS ${PNG_LIB_TARGETS}
EXPORT libpng
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(PNG_SHARED)
# Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
if(CYGWIN OR MINGW)
create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
if(NOT WIN32)
create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png)
install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
if(PNG_STATIC)
if(NOT WIN32 OR CYGWIN OR MINGW)
create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static)
install(FILES $<TARGET_LINKER_FILE_DIR:png_static>/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endif()
endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
install(FILES ${libpng_public_hdrs} DESTINATION include)
install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
endif()
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL)
if(NOT WIN32 OR CYGWIN OR MINGW)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
endif()
endif()
if(NOT SKIP_INSTALL_PROGRAMS AND NOT SKIP_INSTALL_ALL)
install(TARGETS ${PNG_BIN_TARGETS}
RUNTIME DESTINATION bin)
endif()
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL)
# Install man pages
if(NOT PNG_MAN_DIR)
set(PNG_MAN_DIR "share/man")
endif()
install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
# Install pkg-config files
if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
DESTINATION bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
DESTINATION bin)
endif()
endif()
# Create an export file that CMake users can include() to import our targets.
if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
endif()
# what's with libpng-manual.txt and all the extra files?
# UNINSTALL
# do we need this?
# DIST
# do we need this?
# to create msvc import lib for mingw compiled shared lib
# pexports libpng.dll > libpng.def
# lib /def:libpng.def /machine:x86

View File

@ -107,7 +107,7 @@ endif()
# silence excessive warnings for new Intel Compilers
if(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
set(CMAKE_TUNE_DEFAULT "-Wno-tautological-constant-compare")
set(CMAKE_TUNE_DEFAULT "-Wno-tautological-constant-compare -Wno-unused-command-line-argument")
endif()
# silence excessive warnings for PGI/NVHPC compilers
@ -116,7 +116,7 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "
endif()
# silence nvcc warnings
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA))
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
endif()
@ -135,9 +135,14 @@ set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Use compiler extensions")
# ugly hacks for MSVC which by default always reports an old C++ standard in the __cplusplus macro
# and prints lots of pointless warnings about "unsafe" functions
if(MSVC)
add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244)
add_compile_options(/wd4267)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244)
add_compile_options(/wd4267)
if(LAMMPS_EXCEPTIONS)
add_compile_options(/EHsc)
endif()
endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif()
@ -161,10 +166,12 @@ option(CMAKE_POSITION_INDEPENDENT_CODE "Create object compatible with shared lib
option(BUILD_TOOLS "Build and install LAMMPS tools (msi2lmp, binary2txt, chain)" OFF)
option(BUILD_LAMMPS_SHELL "Build and install the LAMMPS shell" OFF)
# allow enabling clang-tidy for C++ files
# Support using clang-tidy for C++ files with selected options
set(ENABLE_CLANG_TIDY OFF CACHE BOOL "Include clang-tidy processing when compiling")
if(ENABLE_CLANG_TIDY)
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=*-header-filter=.*" CACHE STRING "")
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;-checks=-*,performance-trivially-destructible,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-member-init,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-boolean-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,modernize-use-override,modernize-use-bool-literals,modernize-use-emplace,modernize-return-braced-init-list,modernize-use-equals-default,modernize-use-equals-delete,modernize-replace-random-shuffle,modernize-deprecated-headers,modernize-use-nullptr,modernize-use-noexcept,modernize-redundant-void-arg;-fix;-header-filter=.*,header-filter=library.h,header-filter=fmt/*.h" CACHE STRING "clang-tidy settings")
else()
unset(CMAKE_CXX_CLANG_TIDY CACHE)
endif()
include(GNUInstallDirs)
@ -328,7 +335,9 @@ string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES)
target_compile_definitions(lammps PUBLIC -DLAMMPS_${LAMMPS_SIZES})
# posix_memalign is not available on Windows
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
# with INTEL package and Intel compilers we use TBB's aligned malloc
if((CMAKE_SYSTEM_NAME STREQUAL "Windows")
AND NOT (PKG_INTEL AND ((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM"))))
set(LAMMPS_MEMALIGN "0" CACHE STRING "posix_memalign() is not available on Windows" FORCE)
else()
set(LAMMPS_MEMALIGN "64" CACHE STRING "enables the use of the posix_memalign() call instead of malloc() when large chunks or memory are allocated by LAMMPS. Set to 0 to disable")
@ -777,14 +786,16 @@ if(BUILD_SHARED_LIBS)
find_package(Python COMPONENTS Interpreter)
endif()
if(BUILD_IS_MULTI_CONFIG)
set(LIBLAMMPS_SHARED_BINARY ${CMAKE_BINARY_DIR}/$<CONFIG>/liblammps${LAMMPS_MACHINE}${CMAKE_SHARED_LIBRARY_SUFFIX})
set(MY_BUILD_DIR ${CMAKE_BINARY_DIR}/$<CONFIG>)
else()
set(LIBLAMMPS_SHARED_BINARY ${CMAKE_BINARY_DIR}/liblammps${LAMMPS_MACHINE}${CMAKE_SHARED_LIBRARY_SUFFIX})
set(MY_BUILD_DIR ${CMAKE_BINARY_DIR})
endif()
set(LIBLAMMPS_SHARED_BINARY ${MY_BUILD_DIR}/liblammps${LAMMPS_MACHINE}${CMAKE_SHARED_LIBRARY_SUFFIX})
if(Python_EXECUTABLE)
add_custom_target(
install-python ${CMAKE_COMMAND} -E remove_directory build
COMMAND ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps -l ${LIBLAMMPS_SHARED_BINARY}
COMMAND ${Python_EXECUTABLE} ${LAMMPS_PYTHON_DIR}/install.py -p ${LAMMPS_PYTHON_DIR}/lammps
-l ${LIBLAMMPS_SHARED_BINARY} -w ${MY_BUILD_DIR}
COMMENT "Installing LAMMPS Python module")
else()
add_custom_target(
@ -947,6 +958,12 @@ if(PKG_KSPACE)
else()
message(STATUS "Kokkos FFT: cuFFT")
endif()
elseif(Kokkos_ENABLE_HIP)
if(FFT STREQUAL "KISS")
message(STATUS "Kokkos FFT: KISS")
else()
message(STATUS "Kokkos FFT: hipFFT")
endif()
else()
message(STATUS "Kokkos FFT: ${FFT}")
endif()

195
cmake/CMakeLists.zlib Normal file
View File

@ -0,0 +1,195 @@
cmake_minimum_required(VERSION 3.10)
# When using CMake 3.4 and later, don't export symbols from executables unless
# the CMAKE_ENABLE_EXPORTS variable is set.
if(POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
project(zlib C)
set(VERSION "1.2.11")
option(ASM686 "Enable building i686 assembly implementation" OFF)
option(AMD64 "Enable building amd64 assembly implementation" OFF)
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages")
set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
include(CheckTypeSize)
include(CheckFunctionExists)
include(CheckIncludeFile)
include(CheckCSourceCompiles)
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stddef.h HAVE_STDDEF_H)
#
# Check to see if we have large file support
#
set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
# We add these other definitions here because CheckTypeSize.cmake
# in CMake 2.4.x does not automatically do so and we want
# compatibility with CMake 2.4.x.
if(HAVE_SYS_TYPES_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
endif()
if(HAVE_STDINT_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
endif()
if(HAVE_STDDEF_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
endif()
check_type_size(off64_t OFF64_T)
check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T)
add_definitions(-D_LARGEFILE64_SOURCE=1)
endif()
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
#
# Check for fseeko
#
check_function_exists(fseeko HAVE_FSEEKO)
if(NOT HAVE_FSEEKO)
add_definitions(-DNO_FSEEKO)
endif()
#
# Check for unistd.h
#
check_include_file(unistd.h Z_HAVE_UNISTD_H)
if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
endif()
if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
# If we're doing an out of source build and the user has a zconf.h
# in their source tree...
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
file(RENAME ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.included)
endif()
endif()
set(ZLIB_PC ${CMAKE_CURRENT_BINARY_DIR}/zlib.pc)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zlib.pc.cmakein
${ZLIB_PC} @ONLY)
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
#============================================================================
# zlib
#============================================================================
set(ZLIB_PUBLIC_HDRS
${CMAKE_CURRENT_BINARY_DIR}/zconf.h
zlib.h
)
set(ZLIB_PRIVATE_HDRS
crc32.h
deflate.h
gzguts.h
inffast.h
inffixed.h
inflate.h
inftrees.h
trees.h
zutil.h
)
set(ZLIB_SRCS
adler32.c
compress.c
crc32.c
deflate.c
gzclose.c
gzlib.c
gzread.c
gzwrite.c
inflate.c
infback.c
inftrees.c
inffast.c
trees.c
uncompr.c
zutil.c
)
if(NOT MINGW)
set(ZLIB_DLL_SRCS
win32/zlib1.rc # If present will override custom build rule below.
)
endif()
if(CMAKE_COMPILER_IS_GNUCC)
if(ASM686)
set(ZLIB_ASMS contrib/asm686/match.S)
elseif (AMD64)
set(ZLIB_ASMS contrib/amd64/amd64-match.S)
endif ()
if(ZLIB_ASMS)
add_definitions(-DASMV)
set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
endif()
endif()
if(MSVC)
if(ASM686)
ENABLE_LANGUAGE(ASM_MASM)
set(ZLIB_ASMS
contrib/masmx86/inffas32.asm
contrib/masmx86/match686.asm
)
elseif (AMD64)
ENABLE_LANGUAGE(ASM_MASM)
set(ZLIB_ASMS
contrib/masmx64/gvmat64.asm
contrib/masmx64/inffasx64.asm
)
endif()
if(ZLIB_ASMS)
add_definitions(-DASMV -DASMINF)
endif()
endif()
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
if(MINGW)
# This gets us DLL resource information when compiling on MinGW.
if(NOT CMAKE_RC_COMPILER)
set(CMAKE_RC_COMPILER windres.exe)
endif()
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
COMMAND ${CMAKE_RC_COMPILER}
-D GCC_WINDRES
-I ${CMAKE_CURRENT_SOURCE_DIR}
-I ${CMAKE_CURRENT_BINARY_DIR}
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
endif(MINGW)
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
if(UNIX)
# On unix-like platforms the library is almost always called libz
set_target_properties(zlibstatic PROPERTIES OUTPUT_NAME z)
endif()

View File

@ -8,7 +8,7 @@
"installRoot": "${workspaceRoot}\\install\\${name}",
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows.cmake",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"ctestCommandArgs": "-V",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": [
{
@ -26,11 +26,6 @@
"value": "True",
"type": "BOOL"
},
{
"name": "PKG_PYTHON",
"value": "True",
"type": "BOOL"
},
{
"name": "ENABLE_TESTING",
"value": "True",
@ -46,7 +41,7 @@
"installRoot": "${workspaceRoot}\\install\\${name}",
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows.cmake",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"ctestCommandArgs": "-V",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": [
{
@ -64,11 +59,6 @@
"value": "True",
"type": "BOOL"
},
{
"name": "PKG_PYTHON",
"value": "True",
"type": "BOOL"
},
{
"name": "ENABLE_TESTING",
"value": "True",
@ -102,11 +92,6 @@
"value": "True",
"type": "BOOL"
},
{
"name": "PKG_PYTHON",
"value": "True",
"type": "BOOL"
},
{
"name": "ENABLE_TESTING",
"value": "True",
@ -122,7 +107,7 @@
"installRoot": "${workspaceRoot}\\install\\${name}",
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows.cmake -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"ctestCommandArgs": "-V",
"inheritEnvironments": [ "clang_cl_x64" ],
"variables": [
{
@ -141,7 +126,40 @@
"type": "BOOL"
},
{
"name": "PKG_PYTHON",
"name": "ENABLE_TESTING",
"value": "True",
"type": "BOOL"
}
]
},
{
"name": "x64-Debug-IntelLLVM",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${workspaceRoot}\\build\\${name}",
"installRoot": "${workspaceRoot}\\install\\${name}",
"buildCommandArgs": "",
"ctestCommandArgs": "-V",
"inheritEnvironments": [],
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows-intel-llvm.cmake -C ${workspaceRoot}\\cmake\\presets\\windows.cmake",
"variables": [
{
"name": "PKG_ELECTRODE",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_SHARED_LIBS",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_TOOLS",
"value": "True",
"type": "BOOL"
},
{
"name": "LAMMPS_EXCEPTIONS",
"value": "True",
"type": "BOOL"
},
@ -149,8 +167,142 @@
"name": "ENABLE_TESTING",
"value": "True",
"type": "BOOL"
},
{
"name": "FFT",
"value": "MKL",
"type": "STRING"
}
]
},
{
"name": "x64-Release-IntelLLVM",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${workspaceRoot}\\build\\${name}",
"installRoot": "${workspaceRoot}\\install\\${name}",
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows-intel-llvm.cmake -C ${workspaceRoot}\\cmake\\presets\\windows.cmake",
"buildCommandArgs": "",
"ctestCommandArgs": "-V",
"inheritEnvironments": [],
"variables": [
{
"name": "PKG_ELECTRODE",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_SHARED_LIBS",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_TOOLS",
"value": "True",
"type": "BOOL"
},
{
"name": "LAMMPS_EXCEPTIONS",
"value": "True",
"type": "BOOL"
},
{
"name": "ENABLE_TESTING",
"value": "True",
"type": "BOOL"
},
{
"name": "FFT",
"value": "MKL",
"type": "STRING"
}
]
},
{
"name": "x64-Debug-Intel-Classic",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${workspaceRoot}\\build\\${name}",
"installRoot": "${workspaceRoot}\\install\\${name}",
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows-intel-classic.cmake -C ${workspaceRoot}\\cmake\\presets\\windows.cmake",
"buildCommandArgs": "",
"ctestCommandArgs": "-V",
"inheritEnvironments": [],
"variables": [
{
"name": "PKG_ELECTRODE",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_SHARED_LIBS",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_TOOLS",
"value": "True",
"type": "BOOL"
},
{
"name": "LAMMPS_EXCEPTIONS",
"value": "True",
"type": "BOOL"
},
{
"name": "ENABLE_TESTING",
"value": "False",
"type": "BOOL"
},
{
"name": "FFT",
"value": "MKL",
"type": "STRING"
}
]
},
{
"name": "x64-Release-Intel-Classic",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${workspaceRoot}\\build\\${name}",
"installRoot": "${workspaceRoot}\\install\\${name}",
"cmakeCommandArgs": "-C ${workspaceRoot}\\cmake\\presets\\windows-intel-classic.cmake -C ${workspaceRoot}\\cmake\\presets\\windows.cmake",
"buildCommandArgs": "",
"ctestCommandArgs": "-V",
"inheritEnvironments": [],
"variables": [
{
"name": "PKG_ELECTRODE",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_SHARED_LIBS",
"value": "True",
"type": "BOOL"
},
{
"name": "BUILD_TOOLS",
"value": "True",
"type": "BOOL"
},
{
"name": "LAMMPS_EXCEPTIONS",
"value": "True",
"type": "BOOL"
},
{
"name": "ENABLE_TESTING",
"value": "False",
"type": "BOOL"
},
{
"name": "FFT",
"value": "MKL",
"type": "STRING"
}
]
}
]
}
}

View File

@ -0,0 +1,197 @@
# CMake script code to define LAMMPS settings required for building LAMMPS plugins
# enforce out-of-source build
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "In-source builds are not allowed. You must create and use a build directory. "
"Please remove CMakeCache.txt and CMakeFiles first.")
endif()
# global LAMMPS/plugin build settings
set(LAMMPS_SOURCE_DIR "" CACHE PATH "Location of LAMMPS sources folder")
if(NOT LAMMPS_SOURCE_DIR)
message(FATAL_ERROR "Must set LAMMPS_SOURCE_DIR")
endif()
# by default, install into $HOME/.local (not /usr/local),
# so that no root access (and sudo) is needed
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local" CACHE PATH "Default install path" FORCE)
endif()
# ugly hacks for MSVC which by default always reports an old C++ standard in the __cplusplus macro
# and prints lots of pointless warnings about "unsafe" functions
if(MSVC)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244)
add_compile_options(/wd4267)
if(LAMMPS_EXCEPTIONS)
add_compile_options(/EHsc)
endif()
endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif()
# C++11 is required
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Need -restrict with Intel compilers
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
#######
# helper functions from LAMMPSUtils.cmake
function(validate_option name values)
string(TOLOWER ${${name}} needle_lower)
string(TOUPPER ${${name}} needle_upper)
list(FIND ${values} ${needle_lower} IDX_LOWER)
list(FIND ${values} ${needle_upper} IDX_UPPER)
if(${IDX_LOWER} LESS 0 AND ${IDX_UPPER} LESS 0)
list_to_bulletpoints(POSSIBLE_VALUE_LIST ${${values}})
message(FATAL_ERROR "\n########################################################################\n"
"Invalid value '${${name}}' for option ${name}\n"
"\n"
"Possible values are:\n"
"${POSSIBLE_VALUE_LIST}"
"########################################################################")
endif()
endfunction(validate_option)
# helper function for getting the most recently modified file or folder from a glob pattern
function(get_newest_file path variable)
file(GLOB _dirs ${path})
set(_besttime 2000-01-01T00:00:00)
set(_bestfile "<unknown>")
foreach(_dir ${_dirs})
file(TIMESTAMP ${_dir} _newtime)
if(_newtime IS_NEWER_THAN _besttime)
set(_bestfile ${_dir})
set(_besttime ${_newtime})
endif()
endforeach()
if(_bestfile STREQUAL "<unknown>")
message(FATAL_ERROR "Could not find valid path at: ${path}")
endif()
set(${variable} ${_bestfile} PARENT_SCOPE)
endfunction()
#################################################################################
# LAMMPS C++ interface. We only need the header related parts except on windows.
add_library(lammps INTERFACE)
target_include_directories(lammps INTERFACE ${LAMMPS_SOURCE_DIR})
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
target_link_libraries(lammps INTERFACE ${CMAKE_BINARY_DIR}/../liblammps.dll.a)
endif()
################################################################################
# MPI configuration
if(NOT CMAKE_CROSSCOMPILING)
find_package(MPI QUIET)
option(BUILD_MPI "Build MPI version" ${MPI_FOUND})
else()
option(BUILD_MPI "Build MPI version" OFF)
endif()
if(BUILD_MPI)
# do not include the (obsolete) MPI C++ bindings which makes
# for leaner object files and avoids namespace conflicts
set(MPI_CXX_SKIP_MPICXX TRUE)
# We use a non-standard procedure to cross-compile with MPI on Windows
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND CMAKE_CROSSCOMPILING)
# Download and configure custom MPICH files for Windows
message(STATUS "Downloading and configuring MPICH-1.4.1 for Windows")
set(MPICH2_WIN64_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/mpich2-win64-devel.tar.gz" CACHE STRING "URL for MPICH2 (win64) tarball")
set(MPICH2_WIN32_DEVEL_URL "${LAMMPS_THIRDPARTY_URL}/mpich2-win32-devel.tar.gz" CACHE STRING "URL for MPICH2 (win32) tarball")
set(MPICH2_WIN64_DEVEL_MD5 "4939fdb59d13182fd5dd65211e469f14" CACHE STRING "MD5 checksum of MPICH2 (win64) tarball")
set(MPICH2_WIN32_DEVEL_MD5 "a61d153500dce44e21b755ee7257e031" CACHE STRING "MD5 checksum of MPICH2 (win32) tarball")
mark_as_advanced(MPICH2_WIN64_DEVEL_URL)
mark_as_advanced(MPICH2_WIN32_DEVEL_URL)
mark_as_advanced(MPICH2_WIN64_DEVEL_MD5)
mark_as_advanced(MPICH2_WIN32_DEVEL_MD5)
include(ExternalProject)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
ExternalProject_Add(mpi4win_build
URL ${MPICH2_WIN64_DEVEL_URL}
URL_MD5 ${MPICH2_WIN64_DEVEL_MD5}
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
else()
ExternalProject_Add(mpi4win_build
URL ${MPICH2_WIN32_DEVEL_URL}
URL_MD5 ${MPICH2_WIN32_DEVEL_MD5}
CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
BUILD_BYPRODUCTS <SOURCE_DIR>/lib/libmpi.a)
endif()
ExternalProject_get_property(mpi4win_build SOURCE_DIR)
file(MAKE_DIRECTORY "${SOURCE_DIR}/include")
add_library(MPI::MPI_CXX UNKNOWN IMPORTED)
set_target_properties(MPI::MPI_CXX PROPERTIES
IMPORTED_LOCATION "${SOURCE_DIR}/lib/libmpi.a"
INTERFACE_INCLUDE_DIRECTORIES "${SOURCE_DIR}/include"
INTERFACE_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
add_dependencies(MPI::MPI_CXX mpi4win_build)
# set variables for status reporting at the end of CMake run
set(MPI_CXX_INCLUDE_PATH "${SOURCE_DIR}/include")
set(MPI_CXX_COMPILE_DEFINITIONS "MPICH_SKIP_MPICXX")
set(MPI_CXX_LIBRARIES "${SOURCE_DIR}/lib/libmpi.a")
else()
find_package(MPI REQUIRED)
option(LAMMPS_LONGLONG_TO_LONG "Workaround if your system or MPI version does not recognize 'long long' data types" OFF)
if(LAMMPS_LONGLONG_TO_LONG)
target_compile_definitions(lammps INTERFACE -DLAMMPS_LONGLONG_TO_LONG)
endif()
endif()
target_link_libraries(lammps INTERFACE MPI::MPI_CXX)
else()
add_library(mpi_stubs INTERFACE)
target_include_directories(mpi_stubs INTERFACE $<BUILD_INTERFACE:${LAMMPS_SOURCE_DIR}/STUBS>)
target_link_libraries(lammps INTERFACE mpi_stubs)
endif()
################################################################################
# detect if we may enable OpenMP support by default
set(BUILD_OMP_DEFAULT OFF)
find_package(OpenMP QUIET)
if(OpenMP_FOUND)
check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE)
if(HAVE_OMP_H_INCLUDE)
set(BUILD_OMP_DEFAULT ON)
endif()
endif()
option(BUILD_OMP "Build with OpenMP support" ${BUILD_OMP_DEFAULT})
if(BUILD_OMP)
find_package(OpenMP REQUIRED)
check_include_file_cxx(omp.h HAVE_OMP_H_INCLUDE)
if(NOT HAVE_OMP_H_INCLUDE)
message(FATAL_ERROR "Cannot find the 'omp.h' header file required for full OpenMP support")
endif()
if (((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.0)) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "PGI") OR
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0)))
# GCC 9.x and later plus Clang 10.x and later implement strict OpenMP 4.0 semantics for consts.
# Intel 18.0 was tested to support both, so we switch to OpenMP 4+ from 19.x onward to be safe.
target_compile_definitions(lammps INTERFACE -DLAMMPS_OMP_COMPAT=4)
else()
target_compile_definitions(lammps INTERFACE -DLAMMPS_OMP_COMPAT=3)
endif()
target_link_libraries(lammps INTERFACE OpenMP::OpenMP_CXX)
endif()
################
# integer size selection
set(LAMMPS_SIZES "smallbig" CACHE STRING "LAMMPS integer sizes (smallsmall: all 32-bit, smallbig: 64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)")
set(LAMMPS_SIZES_VALUES smallbig bigbig smallsmall)
set_property(CACHE LAMMPS_SIZES PROPERTY STRINGS ${LAMMPS_SIZES_VALUES})
validate_option(LAMMPS_SIZES LAMMPS_SIZES_VALUES)
string(TOUPPER ${LAMMPS_SIZES} LAMMPS_SIZES)
target_compile_definitions(lammps INTERFACE -DLAMMPS_${LAMMPS_SIZES})

View File

@ -24,6 +24,24 @@ function(validate_option name values)
endif()
endfunction(validate_option)
# helper function for getting the most recently modified file or folder from a glob pattern
function(get_newest_file path variable)
file(GLOB _dirs ${path})
set(_besttime 2000-01-01T00:00:00)
set(_bestfile "<unknown>")
foreach(_dir ${_dirs})
file(TIMESTAMP ${_dir} _newtime)
if(_newtime IS_NEWER_THAN _besttime)
set(_bestfile ${_dir})
set(_besttime ${_newtime})
endif()
endforeach()
if(_bestfile STREQUAL "<unknown>")
message(FATAL_ERROR "Could not find valid path at: ${path}")
endif()
set(${variable} ${_bestfile} PARENT_SCOPE)
endfunction()
function(get_lammps_version version_header variable)
file(STRINGS ${version_header} line REGEX LAMMPS_VERSION)
set(MONTHS x Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)

View File

@ -38,7 +38,7 @@ if(INTEL_LRT_MODE STREQUAL "C++11")
endif()
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM"))
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
message(FATAL_ERROR "INTEL needs at least a 2016 Intel compiler, found ${CMAKE_CXX_COMPILER_VERSION}")
endif()
@ -46,12 +46,12 @@ else()
message(WARNING "INTEL gives best performance with Intel compilers")
endif()
find_package(TBB_MALLOC QUIET)
find_package(TBB_MALLOC)
if(TBB_MALLOC_FOUND)
target_link_libraries(lammps PRIVATE TBB::TBB_MALLOC)
else()
target_compile_definitions(lammps PRIVATE -DLMP_INTEL_NO_TBB)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM"))
message(WARNING "INTEL with Intel compilers should use TBB malloc libraries")
endif()
endif()

View File

@ -47,8 +47,8 @@ if(DOWNLOAD_KOKKOS)
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}")
list(APPEND KOKKOS_LIB_BUILD_ARGS "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
include(ExternalProject)
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.5.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "079323d973ae0e1c38c0a54a150c674e" CACHE STRING "MD5 checksum of KOKKOS tarball")
set(KOKKOS_URL "https://github.com/kokkos/kokkos/archive/3.6.00.tar.gz" CACHE STRING "URL for KOKKOS tarball")
set(KOKKOS_MD5 "b5c44ea961031795f434002cd7b31c20" CACHE STRING "MD5 checksum of KOKKOS tarball")
mark_as_advanced(KOKKOS_URL)
mark_as_advanced(KOKKOS_MD5)
ExternalProject_Add(kokkos_build
@ -72,7 +72,7 @@ if(DOWNLOAD_KOKKOS)
add_dependencies(LAMMPS::KOKKOSCORE kokkos_build)
add_dependencies(LAMMPS::KOKKOSCONTAINERS kokkos_build)
elseif(EXTERNAL_KOKKOS)
find_package(Kokkos 3.5.00 REQUIRED CONFIG)
find_package(Kokkos 3.6.00 REQUIRED CONFIG)
target_link_libraries(lammps PRIVATE Kokkos::kokkos)
target_link_libraries(lmp PRIVATE Kokkos::kokkos)
else()
@ -130,6 +130,11 @@ if(PKG_KSPACE)
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT)
target_link_libraries(lammps PRIVATE cufft)
endif()
elseif(Kokkos_ENABLE_HIP)
if(NOT (FFT STREQUAL "KISS"))
target_compile_definitions(lammps PRIVATE -DFFT_HIPFFT)
target_link_libraries(lammps PRIVATE hipfft)
endif()
endif()
endif()

View File

@ -50,6 +50,7 @@ if(DOWNLOAD_MDI)
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-Dlanguage=C
-Dlibtype=STATIC
-Dmpi=${MDI_USE_MPI}

View File

@ -1,6 +1,6 @@
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2021.10.25.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2021.10.25.fix2.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "a2ac3315c41a1a4a5c912bcb1bc9c5cc" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
set(PACELIB_MD5 "32394d799bc282bb57696c78c456e64f" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5)
@ -13,8 +13,12 @@ execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xzf libpace.tar.gz
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
get_newest_file(${CMAKE_BINARY_DIR}/lammps-user-pace-* lib-pace)
file(GLOB lib-pace ${CMAKE_BINARY_DIR}/lammps-user-pace-*)
# enforce building libyaml-cpp as static library and turn off optional features
set(YAML_BUILD_SHARED_LIBS OFF)
set(YAML_CPP_BUILD_CONTRIB OFF)
set(YAML_CPP_BUILD_TOOLS OFF)
add_subdirectory(${lib-pace}/yaml-cpp build-yaml-cpp)
set(YAML_CPP_INCLUDE_DIR ${lib-pace}/yaml-cpp/include)
@ -28,5 +32,6 @@ target_include_directories(pace PUBLIC ${PACE_EVALUATOR_INCLUDE_DIR} ${YAML_CPP_
target_link_libraries(pace PRIVATE yaml-cpp-pace)
target_link_libraries(lammps PRIVATE pace)
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps PRIVATE pace)
endif()

View File

@ -43,6 +43,7 @@ if(DOWNLOAD_QUIP)
file(WRITE ${CMAKE_BINARY_DIR}/quip.config "${temp}")
message(STATUS "QUIP download via git requested - we will build our own")
set(CMAKE_EP_GIT_REMOTE_UPDATE_STRATEGY CHECKOUT)
# QUIP has no releases (except for a tag marking the end of Python 2 support). We use the current "public" branch
# The LAMMPS interface wrapper has a compatibility constant that is being checked at runtime.
include(ExternalProject)

View File

@ -3,6 +3,9 @@ if(BUILD_TOOLS)
target_compile_definitions(binary2txt PRIVATE -DLAMMPS_${LAMMPS_SIZES})
install(TARGETS binary2txt DESTINATION ${CMAKE_INSTALL_BINDIR})
add_executable(stl_bin2txt ${LAMMPS_TOOLS_DIR}/stl_bin2txt.cpp)
install(TARGETS stl_bin2txt DESTINATION ${CMAKE_INSTALL_BINDIR})
include(CheckGeneratorSupport)
if(CMAKE_GENERATOR_SUPPORT_FORTRAN)
include(CheckLanguage)

View File

@ -31,5 +31,7 @@ set(temp "${temp}const char *LAMMPS_NS::LAMMPS::git_descriptor() { return \"${te
set(temp "${temp}#endif\n\n")
message(STATUS "Generating lmpgitversion.h...")
file(WRITE "${LAMMPS_STYLE_HEADERS_DIR}/lmpgitversion.h.tmp" "${temp}" )
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${LAMMPS_STYLE_HEADERS_DIR}/lmpgitversion.h.tmp" "${LAMMPS_STYLE_HEADERS_DIR}/lmpgitversion.h")
string(REPLACE "\\ " " " LAMMPS_GIT_HEADER "${LAMMPS_STYLE_HEADERS_DIR}/lmpgitversion.h")
file(WRITE "${LAMMPS_GIT_HEADER}.tmp" "${temp}" )
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${LAMMPS_GIT_HEADER}.tmp" "${LAMMPS_GIT_HEADER}")

View File

@ -3,7 +3,9 @@
# that is compatible with all higher CC, but not the default CC 3.5
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "" FORCE)
set(Kokkos_ARCH_PASCAL60 ON CACHE BOOL "" FORCE)
set(BUILD_OMP ON CACHE BOOL "" FORCE)
# hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)

View File

@ -0,0 +1,20 @@
# preset that enables KOKKOS and selects HIP compilation with OpenMP
# enabled as well. Also sets some performance related compiler flags.
set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_HIP ON CACHE BOOL "" FORCE)
set(Kokkos_ARCH_VEGA90A on CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_HIP_MULTIPLE_KERNEL_INSTANTIATIONS ON CACHE BOOL "" FORCE)
set(BUILD_OMP ON CACHE BOOL "" FORCE)
set(CMAKE_CXX_COMPILER hipcc CACHE STRING "" FORCE)
set(CMAKE_TUNE_FLAGS "-munsafe-fp-atomics" CACHE STRING "" FORCE)
# hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
# these flags are needed to build with Cray MPICH on OLCF Crusher
#-D CMAKE_CXX_FLAGS="-I/${MPICH_DIR}/include"
#-D MPI_CXX_LIBRARIES="-L${MPICH_DIR}/lib -lmpi -L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa"

View File

@ -4,3 +4,6 @@ set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
set(BUILD_OMP ON CACHE BOOL "" FORCE)
# hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)

View File

@ -3,3 +3,6 @@ set(PKG_KOKKOS ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "" FORCE)
# hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)

View File

@ -8,6 +8,9 @@ set(Kokkos_ENABLE_SYCL ON CACHE BOOL "" FORCE)
set(Kokkos_ARCH_MAXWELL50 on CACHE BOOL "" FORCE)
set(BUILD_OMP ON CACHE BOOL "" FORCE)
# hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)
set(CMAKE_CXX_COMPILER clang++ CACHE STRING "" FORCE)
set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)

View File

@ -46,8 +46,8 @@ set(WIN_PACKAGES
MISC
ML-HDNNP
ML-IAP
ML-SNAP
ML-RANN
ML-SNAP
MOFFF
MOLECULE
MOLFILE
@ -56,6 +56,7 @@ set(WIN_PACKAGES
ORIENT
PERI
PHONON
PLUGIN
POEMS
PTM
QEQ

View File

@ -0,0 +1,8 @@
# preset that will enable Intel compilers with support for MPI and OpenMP (on Linux boxes)
set(CMAKE_CXX_COMPILER "icl" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "icl" CACHE STRING "" FORCE)
set(CMAKE_Fortran_COMPILER "ifort" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)

View File

@ -0,0 +1,8 @@
# preset that will enable Intel compilers with support for MPI and OpenMP (on Linux boxes)
set(CMAKE_CXX_COMPILER "icx" CACHE STRING "" FORCE)
set(CMAKE_C_COMPILER "icx" CACHE STRING "" FORCE)
set(CMAKE_Fortran_COMPILER "ifx" CACHE STRING "" FORCE)
set(INTEL_LRT_MODE "C++11" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE)
set(CMAKE_TUNE_FLAGS -Wno-unused-command-line-argument)

View File

@ -43,6 +43,7 @@ set(WIN_PACKAGES
PERI
PHONON
POEMS
PLUGIN
PTM
QEQ
QTB

View File

@ -13,6 +13,7 @@ VENV = $(BUILDDIR)/docenv
ANCHORCHECK = $(VENV)/bin/rst_anchor_check
SPHINXCONFIG = $(BUILDDIR)/utils/sphinx-config
MATHJAX = $(SPHINXCONFIG)/_static/mathjax
MATHJAXTAG = 3.2.2
PYTHON = $(word 3,$(shell type python3))
DOXYGEN = $(word 3,$(shell type doxygen))
@ -230,12 +231,13 @@ $(VENV):
$(PYTHON) -m venv $(VENV); \
. $(VENV)/bin/activate; \
pip $(PIP_OPTIONS) install --upgrade pip; \
pip $(PIP_OPTIONS) install --upgrade wheel; \
pip $(PIP_OPTIONS) install -r $(BUILDDIR)/utils/requirements.txt; \
deactivate;\
)
$(MATHJAX):
@git clone -b 3.2.0 -c advice.detachedHead=0 --depth 1 https://github.com/mathjax/MathJax.git $@
@git clone -b $(MATHJAXTAG) -c advice.detachedHead=0 --depth 1 https://github.com/mathjax/MathJax.git $@
$(ANCHORCHECK): $(VENV)
@( \

View File

@ -1,7 +1,7 @@
.TH LAMMPS "1" "4 May 2022" "2022-5-4"
.TH LAMMPS "1" "23 June 2022" "2022-6-23"
.SH NAME
.B LAMMPS
\- Molecular Dynamics Simulator. Version 24 March 2022
\- Molecular Dynamics Simulator. Version 23 June 2022
.SH SYNOPSIS
.B lmp

View File

@ -641,14 +641,27 @@ This list was last updated for version 3.5.0 of the Kokkos library.
-D CMAKE_CXX_COMPILER=${HOME}/lammps/lib/kokkos/bin/nvcc_wrapper
To simplify compilation, four preset files are included in the
For AMD or NVIDIA GPUs using HIP, set these variables:
.. code-block:: bash
-D Kokkos_ARCH_HOSTARCH=yes # HOSTARCH = HOST from list above
-D Kokkos_ARCH_GPUARCH=yes # GPUARCH = GPU from list above
-D Kokkos_ENABLE_HIP=yes
-D Kokkos_ENABLE_OPENMP=yes
This will enable FFTs on the GPU, either by the internal KISSFFT library
or with the hipFFT wrapper library, which will call out to the
platform-appropriate vendor library: rocFFT on AMD GPUs or cuFFT on
NVIDIA GPUs.
To simplify compilation, five preset files are included in the
``cmake/presets`` folder, ``kokkos-serial.cmake``,
``kokkos-openmp.cmake``, ``kokkos-cuda.cmake``, and
``kokkos-sycl.cmake``. They will enable the KOKKOS package and
enable some hardware choice. So to compile with OpenMP host
parallelization, CUDA device parallelization (for GPUs with CC 5.0
and up) with some common packages enabled, you can do the
following:
``kokkos-openmp.cmake``, ``kokkos-cuda.cmake``,
``kokkos-hip.cmake``, and ``kokkos-sycl.cmake``. They will enable
the KOKKOS package and enable some hardware choice. So to compile
with CUDA device parallelization (for GPUs with CC 5.0 and up)
with some common packages enabled, you can do the following:
.. code-block:: bash
@ -707,6 +720,15 @@ This list was last updated for version 3.5.0 of the Kokkos library.
KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd)
CC = mpicxx -cxx=$(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper
For AMD or NVIDIA GPUs using HIP:
.. code-block:: make
KOKKOS_DEVICES = HIP
KOKKOS_ARCH = HOSTARCH,GPUARCH # HOSTARCH = HOST from list above that is hosting the GPU
# GPUARCH = GPU from list above
FFT_INC = -DFFT_HIPFFT # enable use of hipFFT (optional)
FFT_LIB = -lhipfft # link to hipFFT library
Advanced KOKKOS compilation settings
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -150,7 +150,7 @@ other files dependent on that package are also excluded.
.. _cmake_presets:
CMake presets for installing many packages
""""""""""""""""""""""""""""""""""""""""""
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Instead of specifying all the CMake options via the command-line,
CMake allows initializing its settings cache using script files.
@ -178,6 +178,11 @@ one of them as a starting point and customize it to your needs.
cmake -C ../cmake/presets/all_off.cmake [OPTIONS] ../cmake # disable all packages
mingw64-cmake -C ../cmake/presets/mingw-cross.cmake [OPTIONS] ../cmake # compile with MinGW cross compilers
Presets that have names starting with "windows" are specifically for
compiling LAMMPS :doc:`natively on Windows <Build_windows>` and
presets that have names starting with "kokkos" are specifically for
selecting configurations for compiling LAMMPS with :ref:`KOKKOS <kokkos>`.
.. note::
Running cmake this way manipulates the CMake settings cache in your
@ -220,7 +225,8 @@ These commands install/un-install sets of packages:
.. code-block:: bash
make yes-all # install all packages
make no-all # uninstall all packages
make no-all # check for changes and uninstall all packages
make no-installed # only check and uninstall installed packages
make yes-basic # install a few commonly used packages'
make no-basic # remove a few commonly used packages'
make yes-most # install most packages w/o libs'

View File

@ -287,8 +287,8 @@ Output of JPG, PNG, and movie files
The :doc:`dump image <dump_image>` command has options to output JPEG or
PNG image files. Likewise the :doc:`dump movie <dump_image>` command
outputs movie files in MPEG format. Using these options requires the
following settings:
outputs movie files in a variety of movie formats. Using these options
requires the following settings:
.. tabs::
@ -328,11 +328,12 @@ following settings:
JPG_LIB = -ljpeg -lpng -lz # library names
As with CMake, you do not need to set ``JPG_INC`` or ``JPG_PATH``,
if make can find the graphics header and library files. You must
specify ``JPG_LIB`` with a list of graphics libraries to include
in the link. You must insure ffmpeg is in a directory where
LAMMPS can find it at runtime, that is a directory in your PATH
environment variable.
if make can find the graphics header and library files in their
default system locations. You must specify ``JPG_LIB`` with a
list of graphics libraries to include in the link. You must make
certain that the ffmpeg executable (or ffmpeg.exe on Windows) is
in a directory where LAMMPS can find it at runtime; that is
usually a directory list in your ``PATH`` environment variable.
Using ``ffmpeg`` to output movie files requires that your machine
supports the "popen" function in the standard runtime library.

View File

@ -5,6 +5,7 @@ Notes for building LAMMPS on Windows
* :ref:`Running Linux on Windows <linux>`
* :ref:`Using GNU GCC ported to Windows <gnu>`
* :ref:`Using Visual Studio <msvc>`
* :ref:`Using Intel oneAPI compilers and libraries <oneapi>`
* :ref:`Using a cross-compiler <cross>`
----------
@ -25,8 +26,10 @@ assistance in resolving portability issues. This is particularly true
for compiling LAMMPS on Windows, since this platform has significant
differences in some low-level functionality. As of LAMMPS version 14
December 2021, large parts of LAMMPS can be compiled natively with the
Microsoft Visual C++ Compilers. This is largely facilitated by using
the :doc:`Developer_platform` in the ``platform`` namespace.
Microsoft Visual C++ Compilers. As of LAMMPS version 31 May 2022, also
the Intel oneAPI compilers can compile large parts of LAMMPS natively on
Windows. This is mostly facilitated by using the
:doc:`Developer_platform` in the ``platform`` namespace and CMake.
Before trying to build LAMMPS on Windows yourself, please consider the
`pre-compiled Windows installer packages <https://packages.lammps.org/windows.html>`_
@ -99,6 +102,10 @@ It is possible to use both the integrated CMake support of the Visual
Studio IDE or use an external CMake installation (e.g. downloaded from
cmake.org) to create build files and compile LAMMPS from the command line.
Compilation via command line and unit tests are checked automatically
for the LAMMPS development branch through
`GitHub Actions <https://github.com/lammps/lammps/actions/workflows/compile-msvc.yml>`_.
.. note::
Versions of Visual Studio before version 17.1 may scan the entire
@ -111,6 +118,10 @@ Please note, that for either approach CMake will create a so-called
the command lines for building and testing LAMMPS must be adjusted
accordingly.
The LAMMPS cmake folder contains a ``CMakeSettings.json`` file with
build configurations for MSVC compilers and the MS provided Clang
compiler package in Debug and Release mode.
To support running in parallel you can compile with OpenMP enabled using
the OPENMP package or install Microsoft MPI (including the SDK) and compile
LAMMPS with MPI enabled.
@ -121,6 +132,53 @@ LAMMPS with MPI enabled.
via GitHub or the `LAMMPS forum at MatSci <https://matsci.org/c/lammps/lammps-development/>`_,
if you have questions or LAMMPS specific problems.
.. _oneapi:
Using Intel oneAPI Compilers and Libraries
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. versionadded:: 31May2022
After installing the `Intel oneAPI
<https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html>`_
base toolkit and the HPC toolkit, it is also possible to compile large
parts of LAMMPS natively on Windows using Intel compilers. The HPC
toolkit provides two sets of C/C++ and Fortran compilers: the so-called
"classic" compilers (``icl.exe`` and ``ifort.exe``) and newer, LLVM
based compilers (``icx.exe`` and ``ifx.exe``). In addition to the
compilers and their dependent modules, also the thread building blocks
(TBB) and the math kernel library (MKL) need to be installed. Two
presets (``cmake/presets/windows-intel-llvm.cmake`` and
``cmake/presets/windows-intel-classic.cmake``) are provided for
selecting the LLVM based or classic compilers, respectively. The preset
``cmake/presets/windows.cmake`` enables compatible packages that are not
dependent on additional features or libraries. You **must** use the
CMake based build procedure and use Ninja as build tool. For compiling
from the command prompt, thus both `CMake <https://cmake.org>`_ and
`Ninja-build <https://ninja-build.org>`_ binaries must be installed. It
is also possible to use Visual Studio, if it is started (``devenv.exe``)
from a command prompt that has the Intel oneAPI compilers enabled. The
Visual Studio settings file in the ``cmake`` folder contains
configurations for both compiler variants in debug and release settings.
Those will use the CMake and Ninja binaries bundled with Visual Studio,
thus a separate installation is not required.
.. admonition:: Known Limitations
:class: note
In addition to portability issues with several packages and external
libraries, the classic Intel compilers are currently not able to
compile the googletest libraries and thus enabling the ``-DENABLE_TESTING``
option will result in compilation failure. The LLVM based compilers
are compatible.
.. note::
This is work in progress and you should contact the LAMMPS developers
via GitHub or the `LAMMPS forum at MatSci <https://matsci.org/c/lammps/lammps-development/>`_,
if you have questions or LAMMPS specific problems.
.. _cross:
Using a cross-compiler
@ -145,14 +203,3 @@ LAMMPS developers. We instead rely on the feedback of the users
of these pre-compiled LAMMPS packages for Windows. We will try to resolve
issues to the best of our abilities if we become aware of them. However
this is subject to time constraints and focus on HPC platforms.
.. _native:
Native Visual C++ support
^^^^^^^^^^^^^^^^^^^^^^^^^
Support for the Visual C++ compilers is currently not available. The
CMake build system is capable of creating suitable a Visual Studio
style build environment, but the LAMMPS source code itself is not
ported to fully support Visual C++. Volunteers to take on this task
are welcome.

View File

@ -14,7 +14,7 @@
General commands
================
An alphabetic list of all general LAMMPS commands.
An alphabetic list of general LAMMPS commands.
.. table_from_list::
:columns: 5
@ -47,35 +47,26 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`displace_atoms <displace_atoms>`
* :doc:`dump <dump>`
* :doc:`dump_modify <dump_modify>`
* :doc:`dynamical_matrix (k) <dynamical_matrix>`
* :doc:`echo <echo>`
* :doc:`fix <fix>`
* :doc:`fix_modify <fix_modify>`
* :doc:`group <group>`
* :doc:`group2ndx <group2ndx>`
* :doc:`hyper <hyper>`
* :doc:`if <if>`
* :doc:`improper_coeff <improper_coeff>`
* :doc:`improper_style <improper_style>`
* :doc:`include <include>`
* :doc:`info <info>`
* :doc:`jump <jump>`
* :doc:`kim <kim_commands>`
* :doc:`kspace_modify <kspace_modify>`
* :doc:`kspace_style <kspace_style>`
* :doc:`label <label>`
* :doc:`lattice <lattice>`
* :doc:`log <log>`
* :doc:`mass <mass>`
* :doc:`mdi <mdi>`
* :doc:`minimize <minimize>`
* :doc:`min_modify <min_modify>`
* :doc:`min_style <min_style>`
* :doc:`min_style spin <min_spin>`
* :doc:`molecule <molecule>`
* :doc:`ndx2group <group2ndx>`
* :doc:`neb <neb>`
* :doc:`neb/spin <neb_spin>`
* :doc:`neigh_modify <neigh_modify>`
* :doc:`neighbor <neighbor>`
* :doc:`newton <newton>`
@ -86,11 +77,8 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`pair_style <pair_style>`
* :doc:`pair_write <pair_write>`
* :doc:`partition <partition>`
* :doc:`plugin <plugin>`
* :doc:`prd <prd>`
* :doc:`print <print>`
* :doc:`processors <processors>`
* :doc:`python <python>`
* :doc:`quit <quit>`
* :doc:`read_data <read_data>`
* :doc:`read_dump <read_dump>`
@ -108,14 +96,9 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`shell <shell>`
* :doc:`special_bonds <special_bonds>`
* :doc:`suffix <suffix>`
* :doc:`tad <tad>`
* :doc:`temper <temper>`
* :doc:`temper/grem <temper_grem>`
* :doc:`temper/npt <temper_npt>`
* :doc:`thermo <thermo>`
* :doc:`thermo_modify <thermo_modify>`
* :doc:`thermo_style <thermo_style>`
* :doc:`third_order (k) <third_order>`
* :doc:`timer <timer>`
* :doc:`timestep <timestep>`
* :doc:`uncompute <uncompute>`
@ -128,3 +111,27 @@ An alphabetic list of all general LAMMPS commands.
* :doc:`write_data <write_data>`
* :doc:`write_dump <write_dump>`
* :doc:`write_restart <write_restart>`
Additional general LAMMPS commands provided by packages. A few
commands have accelerated versions. This is indicated by an
additional letter in parenthesis: k = KOKKOS.
.. table_from_list::
:columns: 5
* :doc:`dynamical_matrix (k) <dynamical_matrix>`
* :doc:`group2ndx <group2ndx>`
* :doc:`hyper <hyper>`
* :doc:`kim <kim_commands>`
* :doc:`mdi <mdi>`
* :doc:`ndx2group <group2ndx>`
* :doc:`neb <neb>`
* :doc:`neb/spin <neb_spin>`
* :doc:`plugin <plugin>`
* :doc:`prd <prd>`
* :doc:`python <python>`
* :doc:`tad <tad>`
* :doc:`temper <temper>`
* :doc:`temper/grem <temper_grem>`
* :doc:`temper/npt <temper_npt>`
* :doc:`third_order (k) <third_order>`

View File

@ -88,7 +88,7 @@ OPT.
* :doc:`dipole (o) <angle_dipole>`
* :doc:`fourier (o) <angle_fourier>`
* :doc:`fourier/simple (o) <angle_fourier_simple>`
* :doc:`gaussian <angle_gaussian>` - multicentered Gaussian-based angle potential
* :doc:`gaussian <angle_gaussian>`
* :doc:`harmonic (iko) <angle_harmonic>`
* :doc:`mm3 <angle_mm3>`
* :doc:`quartic (o) <angle_quartic>`

View File

@ -231,7 +231,7 @@ OPT.
* :doc:`oxrna2/stk <pair_oxrna2>`
* :doc:`oxrna2/xstk <pair_oxrna2>`
* :doc:`oxrna2/coaxstk <pair_oxrna2>`
* :doc:`pace <pair_pace>`
* :doc:`pace (k) <pair_pace>`
* :doc:`peri/eps <pair_peri>`
* :doc:`peri/lps (o) <pair_peri>`
* :doc:`peri/pmb (o) <pair_peri>`
@ -269,6 +269,7 @@ OPT.
* :doc:`spin/neel <pair_spin_neel>`
* :doc:`srp <pair_srp>`
* :doc:`sw (giko) <pair_sw>`
* :doc:`sw/angle/table <pair_sw_angle_table>`
* :doc:`sw/mod (o) <pair_sw>`
* :doc:`table (gko) <pair_table>`
* :doc:`table/rx (k) <pair_table_rx>`
@ -279,6 +280,7 @@ OPT.
* :doc:`tersoff/table (o) <pair_tersoff>`
* :doc:`tersoff/zbl (gko) <pair_tersoff_zbl>`
* :doc:`thole <pair_thole>`
* :doc:`threebody/table <pair_threebody_table>`
* :doc:`tip4p/cut (o) <pair_coul>`
* :doc:`tip4p/long (o) <pair_coul>`
* :doc:`tip4p/long/soft (o) <pair_fep_soft>`

View File

@ -77,18 +77,19 @@ LAMMPS:
so that you do not have to define (or discard) a temporary variable,
"X" in this case.
Additionally, the "immediate" variable expression may be followed by
a colon, followed by a C-style format string, e.g. ":%f" or ":%.10g".
The format string must be appropriate for a double-precision
floating-point value. The format string is used to output the result
of the variable expression evaluation. If a format string is not
specified a high-precision "%.20g" is used as the default.
Additionally, the entire "immediate" variable expression may be
followed by a colon, followed by a C-style format string,
e.g. ":%f" or ":%.10g". The format string must be appropriate for
a double-precision floating-point value. The format string is used
to output the result of the variable expression evaluation. If a
format string is not specified, a high-precision "%.20g" is used as
the default format.
This can be useful for formatting print output to a desired precision:
.. code-block:: LAMMPS
print "Final energy per atom: $(pe/atoms:%10.3f) eV/atom"
print "Final energy per atom: $(v_ke_per_atom+v_pe_per_atom:%10.3f) eV/atom"
Note that neither the curly-bracket or immediate form of variables
can contain nested $ characters for other variables to substitute

View File

@ -276,10 +276,27 @@ Compilation of the plugin can be managed via both, CMake or traditional
GNU makefiles. Some examples that can be used as a template are in the
``examples/plugins`` folder. The CMake script code has some small
adjustments to allow building the plugins for running unit tests with
them. Another example that converts the KIM package into a plugin can be
found in the ``examples/kim/plugin`` folder. No changes to the sources
of the KIM package themselves are needed; only the plugin interface and
loader code needs to be added. This example only supports building with
CMake, but is probably a more typical example. To compile you need to
run CMake with -DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>. Other
them.
Another example that converts the KIM package into a plugin can be found
in the ``examples/kim/plugin`` folder. No changes to the sources of the
KIM package themselves are needed; only the plugin interface and loader
code needs to be added. This example only supports building with CMake,
but is probably a more typical example. To compile you need to run CMake
with -DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>. Other
configuration setting are identical to those for compiling LAMMPS.
A second example for a plugin from a package is in the
``examples/PACKAGES/pace/plugin`` folder that will create a plugin from
the ML-PACE package. In this case the bulk of the code is in a static
external library that is being downloaded and compiled first and then
combined with the pair style wrapper and the plugin loader. This
example also contains a NSIS script that can be used to create an
Installer package for Windows (the mutual licensing terms of the
external library and LAMMPS conflict when distributing binaries, so the
ML-PACE package cannot be linked statically, but the LAMMPS headers
required to build the plugin are also available under a less restrictive
license). This will automatically set the required environment variable
and launching a (compatible) LAMMPS binary will load and register the
plugin and the ML-PACE package can then be used as it was linked into
LAMMPS.

View File

@ -239,7 +239,7 @@ is consistent with the 6 moments of inertia: ixx iyy izz ixy ixz iyz =
.. parsed-literal::
3 1 27
3 1 19
4
1 1 4 0 0 0
-0.7071 -0.7071 0

View File

@ -19,7 +19,7 @@ atoms and the water molecule to run a rigid SPC model.
| LJ :math:`\sigma` of OO = 3.166
| LJ :math:`\epsilon`, :math:`\sigma` of OH, HH = 0.0
| :math:`r_0` of OH bond = 1.0
| :math:`\theta` of HOH angle = 109.47\ :math:`^{\circ}`
| :math:`\theta_0` of HOH angle = 109.47\ :math:`^{\circ}`
|
Note that as originally proposed, the SPC model was run with a 9

View File

@ -184,7 +184,7 @@ frame.
.. code-block:: python
import re, yaml
import yaml
import pandas as pd
try:
@ -193,7 +193,7 @@ frame.
from yaml import SafeLoader as Loader
with open("ave.yaml") as f:
ave = yaml.load(docs, Loader=Loader)
ave = yaml.load(f, Loader=Loader)
keys = ave['keywords']
df = {}

View File

@ -30,8 +30,8 @@ initial versions of LAMMPS is:
`S. Plimpton, Fast Parallel Algorithms for Short-Range Molecular Dynamics, J Comp Phys, 117, 1-19 (1995). <http://www.sandia.gov/~sjplimp/papers/jcompphys95.pdf>`_
DOI for the LAMMPS code
^^^^^^^^^^^^^^^^^^^^^^^
DOI for the LAMMPS source code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LAMMPS developers use the `Zenodo service at CERN <https://zenodo.org/>`_
to create digital object identifies (DOI) for stable releases of the

View File

@ -657,7 +657,7 @@ advection-diffusion-reaction systems. The equations of motion of these
DPD extensions are integrated through a modified velocity-Verlet (MVV)
algorithm.
**Author:** Zhen Li (Division of Applied Mathematics, Brown University)
**Author:** Zhen Li (Department of Mechanical Engineering, Clemson University)
**Supporting info:**

View File

@ -42,5 +42,4 @@ inaccurate relative timing data, because processors have to wait when
communication occurs for other processors to catch up. Thus the
reported times for "Communication" or "Other" may be higher than they
really are, due to load-imbalance. If this is an issue, you can
uncomment the MPI_Barrier() lines in src/timer.cpp, and re-compile
LAMMPS, to obtain synchronized timings.
use the :doc:`timer sync <timer>` command to obtain synchronized timings.

View File

@ -56,6 +56,7 @@ Pre-processing tools
* :ref:`moltemplate <moltemplate>`
* :ref:`msi2lmp <msi>`
* :ref:`polybond <polybond>`
* :ref:`stl_bin2txt <stlconvert>`
Post-processing tools
@ -94,7 +95,7 @@ Miscellaneous tools
* :ref:`LAMMPS shell <lammps_shell>`
* :ref:`LAMMPS magic patterns for file(1) <magic>`
* :ref:`Offline build tool <offline>`
* :ref:`singularity <singularity_tool>`
* :ref:`singularity/apptainer <singularity_tool>`
* :ref:`SWIG interface <swig>`
* :ref:`vim <vim>`
@ -1006,14 +1007,37 @@ Ivanov, at University of Iceland (ali5 at hi.is).
.. _singularity_tool:
singularity tool
----------------------------------------
singularity/apptainer tool
--------------------------
The singularity sub-directory contains container definitions files
that can be used to build container images for building and testing
LAMMPS on specific OS variants using the `Singularity <https://sylabs.io>`_
container software. Contributions for additional variants are welcome.
For more details please see the README.md file in that folder.
The singularity sub-directory contains container definitions files that
can be used to build container images for building and testing LAMMPS on
specific OS variants using the `Apptainer <https://apptainer.org>`_ or
`Singularity <https://sylabs.io>`_ container software. Contributions for
additional variants are welcome. For more details please see the
README.md file in that folder.
----------
.. _stlconvert:
stl_bin2txt tool
----------------
The file stl_bin2txt.cpp converts binary STL files - like they are
frequently offered for download on the web - into ASCII format STL files
that LAMMPS can read with the :doc:`create_atoms mesh <create_atoms>` or
the :doc:`fix smd/wall_surface <fix_smd_wall_surface>` commands. The syntax
for running the tool is
.. code-block:: bash
stl_bin2txt infile.stl outfile.stl
which creates outfile.stl from infile.stl. This tool must be compiled
on a platform compatible with the byte-ordering that was used to create
the binary file. This usually is a so-called little endian hardware
(like x86).
----------

View File

@ -87,7 +87,7 @@ of (g,i,k,o,t) to indicate which accelerated styles exist.
* :doc:`dipole <angle_dipole>` - angle that controls orientation of a point dipole
* :doc:`fourier <angle_fourier>` - angle with multiple cosine terms
* :doc:`fourier/simple <angle_fourier_simple>` - angle with a single cosine term
* :doc:`gaussian <angle_gaussian>` - multicentered Gaussian-based angle potential
* :doc:`gaussian <angle_gaussian>` - multi-centered Gaussian-based angle potential
* :doc:`harmonic <angle_harmonic>` - harmonic angle
* :doc:`mm3 <angle_mm3>` - anharmonic angle
* :doc:`quartic <angle_quartic>` - angle with cubic and quartic terms

View File

@ -35,16 +35,24 @@ Examples
Description
"""""""""""
Define a computation that calculates the local density and temperature
for each atom and neighbors inside a spherical cutoff.
Define a computation that calculates the local mass density and
temperature for each atom based on its neighbors inside a spherical
cutoff. If an atom has M neighbors, then its local mass density is
calculated as the sum of its mass and its M neighbor masses, divided
by the volume of the cutoff sphere (or circle in 2d). The local
temperature of the atom is calculated as the temperature of the
collection of M+1 atoms, after subtracting the center-of-mass velocity
of the M+1 atoms from each of the M+1 atom's velocities. This is
effectively the thermal velocity of the neighborhood of the central
atom, similar to :doc:`compute temp/com <compute_temp_com>`.
The optional keyword *cutoff* defines the distance cutoff
used when searching for neighbors. The default value is the cutoff
specified by the pair style. If no pair style is defined, then a cutoff
must be defined using this keyword. If the specified cutoff is larger than
that of the pair_style plus neighbor skin (or no pair style is defined),
the *comm_modify cutoff* option must also be set to match that of the
*cutoff* keyword.
The optional keyword *cutoff* defines the distance cutoff used when
searching for neighbors. The default value is the cutoff specified by
the pair style. If no pair style is defined, then a cutoff must be
defined using this keyword. If the specified cutoff is larger than
that of the pair_style plus neighbor skin (or no pair style is
defined), the *comm_modify cutoff* option must also be set to match
that of the *cutoff* keyword.
The neighbor list needed to compute this quantity is constructed each
time the calculation is performed (i.e. each time a snapshot of atoms
@ -55,16 +63,16 @@ too frequently.
If you have a bonded system, then the settings of
:doc:`special_bonds <special_bonds>` command can remove pairwise
interactions between atoms in the same bond, angle, or dihedral. This
is the default setting for the :doc:`special_bonds <special_bonds>`
command, and means those pairwise interactions do not appear in the
neighbor list. Because this fix uses the neighbor list, it also means
those pairs will not be included in the order parameter. This
difficulty can be circumvented by writing a dump file, and using the
:doc:`rerun <rerun>` command to compute the order parameter for
snapshots in the dump file. The rerun script can use a
:doc:`special_bonds <special_bonds>` command that includes all pairs in
the neighbor list.
interactions between atoms in the same bond, angle, or dihedral.
This is the default setting for the :doc:`special_bonds
<special_bonds>` command, and means those pairwise interactions do
not appear in the neighbor list. Because this compute uses the
neighbor list, it also means those pairs will not be included in
the order parameter. This difficulty can be circumvented by
writing a dump file, and using the :doc:`rerun <rerun>` command to
compute the order parameter for snapshots in the dump file. The
rerun script can use a :doc:`special_bonds <special_bonds>` command
that includes all pairs in the neighbor list.
----------
@ -77,17 +85,20 @@ too frequently.
Output info
"""""""""""
This compute calculates a per-atom array with two columns: density and temperature.
This compute calculates a per-atom array with two columns: mass
density in density :doc:`units <units>` and temperature in temperature
:doc:`units <units>`.
These values can be accessed by any command that uses per-atom values
from a compute as input. See the :doc:`Howto output <Howto_output>` doc
page for an overview of LAMMPS output options.
from a compute as input. See the :doc:`Howto output <Howto_output>`
doc page for an overview of LAMMPS output options.
Restrictions
""""""""""""
This compute is part of the EXTRA-COMPUTE package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info.
This compute is part of the EXTRA-COMPUTE package. It is only enabled
if LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
Related commands
""""""""""""""""
@ -97,5 +108,5 @@ Related commands
Default
"""""""
The option defaults are *cutoff* = pair style cutoff
The option defaults are *cutoff* = pair style cutoff.

View File

@ -11,7 +11,7 @@ Syntax
create_atoms type style args keyword values ...
* type = atom type (1-Ntypes) of atoms to create (offset for molecule creation)
* style = *box* or *region* or *single* or *random*
* style = *box* or *region* or *single* or *mesh* or *random*
.. parsed-literal::
@ -20,17 +20,19 @@ Syntax
region-ID = particles will only be created if contained in the region
*single* args = x y z
x,y,z = coordinates of a single particle (distance units)
*mesh* args = STL-file
STL-file = file with triangle mesh in STL format
*random* args = N seed region-ID
N = number of particles to create
seed = random # seed (positive integer)
region-ID = create atoms within this region, use NULL for entire simulation box
* zero or more keyword/value pairs may be appended
* keyword = *mol* or *basis* or *ratio* or *subset* or *remap* or *var* or *set* or *rotate* or *units*
* keyword = *mol* or *basis* or *ratio* or *subset* or *remap* or *var* or *set* or *rotate* or *overlap* or *maxtry* or *units*
.. parsed-literal::
*mol* value = template-ID seed
*mol* values = template-ID seed
template-ID = ID of molecule template specified in a separate :doc:`molecule <molecule>` command
seed = random # seed (positive integer)
*basis* values = M itype
@ -47,9 +49,21 @@ Syntax
*set* values = dim name
dim = *x* or *y* or *z*
name = name of variable to set with x, y, or z atom position
*radscale* value = factor
factor = scale factor for setting atom radius
*meshmode* values = mode arg
mode = *bisect* or *qrand*
*bisect* arg = radthresh
radthresh = threshold value for *mesh* to determine when to split triangles (distance units)
*qrand* arg = density
density = minimum number density for atoms place on *mesh* triangles (inverse distance squared units)
*rotate* values = theta Rx Ry Rz
theta = rotation angle for single molecule (degrees)
Rx,Ry,Rz = rotation vector for single molecule
*overlap* value = Doverlap
Doverlap = only insert if at least this distance from all existing atoms
*maxtry* value = Ntry
Ntry = number of attempts to insert a particle before failure
*units* value = *lattice* or *box*
*lattice* = the geometry is defined in lattice units
*box* = the geometry is defined in simulation box units
@ -64,17 +78,21 @@ Examples
create_atoms 3 region regsphere basis 2 3 ratio 0.5 74637
create_atoms 3 single 0 0 5
create_atoms 1 box var v set x xpos set y ypos
create_atoms 2 random 50 12345 NULL overlap 2.0 maxtry 50
create_atoms 1 mesh open_box.stl meshmode qrand 0.1 units box
create_atoms 1 mesh funnel.stl meshmode bisect 4.0 units box radscale 0.9
Description
"""""""""""
This command creates atoms (or molecules) on a lattice, or a single
atom (or molecule), or a random collection of atoms (or molecules), as
an alternative to reading in their coordinates explicitly via a
:doc:`read_data <read_data>` or :doc:`read_restart <read_restart>`
command. A simulation box must already exist, which is typically
created via the :doc:`create_box <create_box>` command. Before using
this command, a lattice must also be defined using the
This command creates atoms (or molecules) within the simulation box,
either on a lattice, or a single atom (or molecule), or on a surface
defined by a triangulated mesh, or a random collection of atoms (or
molecules). It is an alternative to reading in atom coordinates
explicitly via a :doc:`read_data <read_data>` or :doc:`read_restart
<read_restart>` command. A simulation box must already exist, which is
typically created via the :doc:`create_box <create_box>` command.
Before using this command, a lattice must also be defined using the
:doc:`lattice <lattice>` command, unless you specify the *single* style
with units = box or the *random* style. For the remainder of this doc
page, a created atom or molecule is referred to as a "particle".
@ -97,58 +115,126 @@ particular dimension, LAMMPS is careful to put exactly one particle at
the boundary (on either side of the box), not zero or two.
For the *region* style, a geometric volume is filled with particles on
the lattice. This volume what is inside the simulation box and is
also consistent with the region volume. See the :doc:`region <region>`
command for details. Note that a region can be specified so that its
"volume" is either inside or outside a geometric boundary. Also note
that if your region is the same size as a periodic simulation box (in
some dimension), LAMMPS does not implement the same logic described
above as for the *box* style, to insure exactly one particle at
periodic boundaries. if this is what you desire, you should either
use the *box* style, or tweak the region size to get precisely the
particles you want.
the lattice. This volume is what is both inside the simulation box
and also consistent with the region volume. See the :doc:`region
<region>` command for details. Note that a region can be specified so
that its "volume" is either inside or outside its geometric boundary.
Also note that if a region is the same size as a periodic simulation
box (in some dimension), LAMMPS does NOT implement the same logic
described above for the *box* style, to insure exactly one particle at
periodic boundaries. If this is desired, you should either use the
*box* style, or tweak the region size to get precisely the particles
you want.
For the *single* style, a single particle is added to the system at
the specified coordinates. This can be useful for debugging purposes
or to create a tiny system with a handful of particles at specified
positions.
For the *random* style, N particles are added to the system at
randomly generated coordinates, which can be useful for generating an
amorphous system. The particles are created one by one using the
specified random number *seed*, resulting in the same set of particles
coordinates, independent of how many processors are being used in the
simulation. If the *region-ID* argument is specified as NULL, then
the created particles will be anywhere in the simulation box. If a
*region-ID* is specified, a geometric volume is filled which is both
inside the simulation box and is also consistent with the region
volume. See the :doc:`region <region>` command for details. Note that
a region can be specified so that its "volume" is either inside or
outside a geometric boundary.
.. figure:: img/marble_race.jpg
:figwidth: 33%
:align: right
:target: _images/marble_race.jpg
For the *mesh* style, a file with a triangle mesh in `STL format
<https://en.wikipedia.org/wiki/STL_(file_format)>`_ is read and one or
more particles are placed into the area of each triangle. The reader
supports both ASCII and binary files conforming to the format on the
Wikipedia page. Binary STL files (e.g. as frequently offered for
3d-printing) can also be first converted to ASCII for editing with the
:ref:`stl_bin2txt tool <stlconvert>`. The use of the *units box* option
is required. There are two algorithms available for placing atoms:
*bisect* and *qrand*. They can be selected via the *meshmode* option;
*bisect* is the default. If the atom style allows it, the radius will
be set to a value depending on the algorithm and the value of the
*radscale* parameter (see below), and the atoms created from the mesh
are assigned a new molecule ID.
In *bisect* mode a particle is created at the center of each triangle
unless the average distance of the triangle vertices from its center is
larger than the *radthresh* value (default is lattice spacing in
x-direction). In case the average distance is over the threshold, the
triangle is recursively split into two halves along the the longest side
until the threshold is reached. There will be at least one sphere per
triangle. The value of *radthresh* is set as an argument to *meshmode
bisect*. The average distance of the vertices from the center is also
used to set the radius.
In *qrand* mode a quasi-random sequence is used to distribute particles
on mesh triangles using an approach by :ref:`(Roberts) <Roberts2019>`.
Particles are added to the triangle until the minimum number density is
met or exceeded such that every triangle will have at least one
particle. The minimum number density is set as an argument to the
*qrand* option. The radius will be set so that the sum of the area of
the radius of the particles created in place of a triangle will be equal
to the area of that triangle.
.. note::
Particles generated by the *random* style will typically be
highly overlapped which will cause many interatomic potentials to
compute large energies and forces. Thus you should either perform an
:doc:`energy minimization <minimize>` or run dynamics with :doc:`fix nve/limit <fix_nve_limit>` to equilibrate such a system, before
running normal dynamics.
The atom placement algorithms in the *mesh* style benefit from meshes
where triangles are close to equilateral. It is therefore
recommended to pre-process STL files to optimize the mesh
accordingly. There are multiple open source and commercial software
tools available with the capability to generate optimized meshes.
Note that this command adds particles to those that already exist.
This means it can be used to add particles to a system previously read
in from a data or restart file. Or the create_atoms command can be
used multiple times, to add multiple sets of particles to the
simulation. For example, grain boundaries can be created, by
interleaving create_atoms with :doc:`lattice <lattice>` commands
specifying different orientations. By using the create_atoms command
in conjunction with the :doc:`delete_atoms <delete_atoms>` command,
reasonably complex geometries can be created, or a protein can be
solvated with a surrounding box of water molecules.
.. note::
In all these cases, care should be taken to insure that new atoms do
not overlap existing atoms inappropriately, especially if molecules
are being added. The :doc:`delete_atoms <delete_atoms>` command can be
used to remove overlapping atoms or molecules.
In most cases the atoms created in *mesh* style will become an
immobile or rigid object that would not be time integrated or moved
by :doc:`fix move <fix_move>` or :doc:`fix rigid <fix_rigid>`. For
computational efficiency *and* to avoid undesired contributions to
pressure and potential energy due to close contacts, it is usually
beneficial to exclude computing interactions between the created
particles using :doc:`neigh_modify exclude <neigh_modify>`.
For the *random* style, *N* particles are added to the system at
randomly generated coordinates, which can be useful for generating an
amorphous system. The particles are created one by one using the
specified random number *seed*, resulting in the same set of particle
coordinates, independent of how many processors are being used in the
simulation. Unless the *overlap* keyword is specified, particles
created by the *random* style will typically be highly overlapped.
Various additional criteria can be used to accept or reject a random
particle insertion; see the keyword discussion below. Multiple
attempts per particle are made (see the *maxtry* keyword) until the
insertion is either successful or fails. If this command fails to add
all requested *N* particles, a warning will be output.
If the *region-ID* argument is specified as NULL, then the randomly
created particles will be anywhere in the simulation box. If a
*region-ID* is specified, a geometric volume is filled which is both
inside the simulation box and is also consistent with the region
volume. See the :doc:`region <region>` command for details. Note
that a region can be specified so that its "volume" is either inside
or outside its geometric boundary.
Note that the create_atoms command adds particles to those that
already exist. This means it can be used to add particles to a system
previously read in from a data or restart file. Or the create_atoms
command can be used multiple times, to add multiple sets of particles
to the simulation. For example, grain boundaries can be created, by
interleaving the create_atoms command with :doc:`lattice <lattice>`
commands specifying different orientations.
When this command is used, care should be taken to insure the
resulting system does not contain particles which are highly
overlapped. Such overlaps will cause many interatomic potentials to
compute huge energies and forces, leading to bad dynamics. There are
several strategies to avoid this problem:
* Use the :doc:`delete_atoms overlap <delete_atoms>` command after
create_atoms. For example, this strategy can be used to overlay and
surround a large protein molecule with a volume of water molecules,
then delete water molecules that overlap with the protein atoms.
* For the *random* style, use the optional *overlap* keyword to avoid
overlaps when each new particle is created.
* Before running dynamics on an overlapped system, perform an
:doc:`energy minimization <minimize>`. Or run initial dynamics with
:doc:`pair_style soft <pair_soft>` or with :doc:`fix nve/limit
<fix_nve_limit>` to un-overlap the particles, before running normal
dynamics.
.. note::
@ -156,12 +242,13 @@ used to remove overlapping atoms or molecules.
that are outside the simulation box; they will just be ignored by
LAMMPS. This is true even if you are using shrink-wrapped box
boundaries, as specified by the :doc:`boundary <boundary>` command.
However, you can first use the :doc:`change_box <change_box>` command to
temporarily expand the box, then add atoms via create_atoms, then
finally use change_box command again if needed to re-shrink-wrap the
new atoms. See the :doc:`change_box <change_box>` page for an
example of how to do this, using the create_atoms *single* style to
insert a new atom outside the current simulation box.
However, you can first use the :doc:`change_box <change_box>`
command to temporarily expand the box, then add atoms via
create_atoms, then finally use change_box command again if needed
to re-shrink-wrap the new atoms. See the :doc:`change_box
<change_box>` doc page for an example of how to do this, using the
create_atoms *single* style to insert a new atom outside the
current simulation box.
----------
@ -180,17 +267,19 @@ Using a lattice to add molecules, e.g. via the *box* or *region* or
points, except that entire molecules are added at each point, i.e. on
the point defined by each basis atom in the unit cell as it tiles the
simulation box or region. This is done by placing the geometric
center of the molecule at the lattice point, and giving the molecule a
random orientation about the point. The random *seed* specified with
the *mol* keyword is used for this operation, and the random numbers
generated by each processor are different. This means the coordinates
of individual atoms (in the molecules) will be different when running
on different numbers of processors, unlike when atoms are being
created in parallel.
center of the molecule at the lattice point, and (by default) giving
the molecule a random orientation about the point. The random *seed*
specified with the *mol* keyword is used for this operation, and the
random numbers generated by each processor are different. This means
the coordinates of individual atoms (in the molecules) will be
different when running on different numbers of processors, unlike when
atoms are being created in parallel.
Also note that because of the random rotations, it may be important to
use a lattice with a large enough spacing that adjacent molecules will
not overlap, regardless of their relative orientations.
Note that with random rotations, it may be important to use a lattice
with a large enough spacing that adjacent molecules will not overlap,
regardless of their relative orientations. See the description of the
*rotate* keyword below, which overrides the default random orientation
and inserts all molecules at a specified orientation.
.. note::
@ -204,7 +293,7 @@ not overlap, regardless of their relative orientations.
----------
This is the meaning of the other allowed keywords.
This is the meaning of the other optional keywords.
The *basis* keyword is only used when atoms (not molecules) are being
created. It specifies an atom type that will be assigned to specific
@ -234,18 +323,24 @@ and no particle is created if its position is outside the box.
The *var* and *set* keywords can be used together to provide a
criterion for accepting or rejecting the addition of an individual
atom, based on its coordinates. The *name* specified for the *var*
keyword is the name of an :doc:`equal-style variable <variable>` which
should evaluate to a zero or non-zero value based on one or two or
three variables which will store the x, y, or z coordinates of an atom
(one variable per coordinate). If used, these other variables must be
:doc:`internal-style variables <variable>` defined in the input script;
their initial numeric value can be anything. They must be
atom, based on its coordinates. They apply to all styles except
*single*. The *name* specified for the *var* keyword is the name of
an :doc:`equal-style variable <variable>` which should evaluate to a
zero or non-zero value based on one or two or three variables which
will store the x, y, or z coordinates of an atom (one variable per
coordinate). If used, these other variables must be
:doc:`internal-style variables <variable>` defined in the input
script; their initial numeric value can be anything. They must be
internal-style variables, because this command resets their values
directly. The *set* keyword is used to identify the names of these
other variables, one variable for the x-coordinate of a created atom,
one for y, and one for z.
.. figure:: img/sinusoid.jpg
:figwidth: 50%
:align: right
:target: _images/sinusoid.jpg
When an atom is created, its x,y,z coordinates become the values for
any *set* variable that is defined. The *var* variable is then
evaluated. If the returned value is 0.0, the atom is not created. If
@ -259,28 +354,26 @@ the sinusoid would appear to be "smoother". Also note the use of the
"xlat" and "ylat" :doc:`thermo_style <thermo_style>` keywords which
converts lattice spacings to distance.
.. only:: html
(Click on the image for a larger version)
.. code-block:: LAMMPS
dimension 2
variable x equal 100
variable y equal 25
lattice hex 0.8442
region box block 0 $x 0 $y -0.5 0.5
create_box 1 box
dimension 2
variable x equal 100
variable y equal 25
lattice hex 0.8442
region box block 0 $x 0 $y -0.5 0.5
create_box 1 box
variable xx internal 0.0
variable yy internal 0.0
variable v equal "(0.2*v_y*ylat * cos(v_xx/xlat * 2.0*PI*4.0/v_x) + 0.5*v_y*ylat - v_yy) > 0.0"
create_atoms 1 box var v set x xx set y yy
write_dump all atom sinusoid.lammpstrj
variable xx internal 0.0
variable yy internal 0.0
variable v equal "(0.2*v_y*ylat * cos(v_xx/xlat * 2.0*PI*4.0/v_x) + 0.5*v_y*ylat - v_yy) > 0.0"
create_atoms 1 box var v set x xx set y yy
write_dump all atom sinusoid.lammpstrj
.. image:: img/sinusoid.jpg
:scale: 50%
:align: center
.. raw:: html
Click on the image for a larger version.
-----
The *rotate* keyword allows specification of the orientation
at which molecules are inserted. The axis of rotation is
@ -291,10 +384,79 @@ the atoms around the rotation axis is consistent with the right-hand
rule: if your right-hand's thumb points along *R*, then your fingers
wrap around the axis in the direction of rotation.
The *radscale* keyword only applies to the *mesh* style and adjusts the
radius of created particles (see above), provided this is supported by
the atom style. Its value is a prefactor (must be > 0.0, default is
1.0) that is applied to the atom radius inferred from the size of the
individual triangles in the triangle mesh that the particle corresponds
to.
The *overlap* keyword only applies to the *random* style. It prevents
newly created particles from being created closer than the specified
*Doverlap* distance from any other particle. When the particles being
created are molecules, the radius of the molecule (from its geometric
center) is added to *Doverlap*. If particles have finite size (see
:doc:`atom_style sphere <atom_style>` for example) *Doverlap* should
be specified large enough to include the particle size in the
non-overlapping criterion.
.. note::
Checking for overlaps is a costly O(N(N+M)) operation for inserting
*N* new particles into a system with *M* existing particles. This
is because distances to all *M* existing particles are computed for
each new particle that is added. Thus the intended use of this
keyword is to add relatively small numbers of particles to systems
which remain at a relatively low density even after the new
particles are created. Careful use of the *maxtry* keyword in
combination with *overlap* is recommended. See the discussion
above about systems with overlapped particles for alternate
strategies that allow for overlapped insertions.
The *maxtry* keyword only applies to the *random* style. It limits
the number of attempts to generate valid coordinates for a single new
particle that satisfy all requirements imposed by the *region*, *var*,
and *overlap* keywords. The default is 10 attempts per particle
before the loop over the requested *N* particles advances to the next
particle. Note that if insertion success is unlikely (e.g. inserting
new particles into a dense system using the *overlap* keyword),
setting the *maxtry* keyword to a large value may result in this
command running for a long time.
.. figure:: img/overlap.png
:figwidth: 30%
:align: right
:target: _images/overlap.png
Here is an example for the *random* style using these commands
.. code-block:: LAMMPS
units lj
dimension 2
region box block 0 50 0 50 -0.5 0.5
create_box 1 box
create_atoms 1 random 2000 13487 NULL overlap 1.0 maxtry 50
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5
to produce a system as shown in the image with 1520 particles (out of
2000 requested) that are moderately dense and which have no overlaps
sufficient to prevent the LJ pair_style from running properly (because
the overlap criterion = 1.0). The create_atoms command ran for 0.3 s
on a single CPU core.
.. only:: html
(Click on the image for a larger version)
-----
The *units* keyword determines the meaning of the distance units used
to specify the coordinates of the one particle created by the *single*
style. A *box* value selects standard distance units as defined by
the :doc:`units <units>` command, e.g. Angstroms for units = real or
style, or the overlap distance *Doverlap* by the *overlap* keyword. A
*box* value selects standard distance units as defined by the
:doc:`units <units>` command, e.g. Angstroms for units = real or
metal. A *lattice* value means the distance units are in lattice
spacings.
@ -315,9 +477,10 @@ assigned to created molecules in a similar fashion.
Aside from their ID, atom type, and xyz position, other properties of
created atoms are set to default values, depending on which quantities
are defined by the chosen :doc:`atom style <atom_style>`. See the :doc:`atom style <atom_style>` command for more details. See the
:doc:`set <set>` and :doc:`velocity <velocity>` commands for info on how
to change these values.
are defined by the chosen :doc:`atom style <atom_style>`. See the
:doc:`atom style <atom_style>` command for more details. See the
:doc:`set <set>` and :doc:`velocity <velocity>` commands for info on
how to change these values.
* charge = 0.0
* dipole moment magnitude = 0.0
@ -336,9 +499,11 @@ values specified in the file read by the :doc:`molecule <molecule>`
command. E.g. the file typically defines bonds (angles,etc) between
atoms in the molecule, and can optionally define charges on each atom.
Note that the *sphere* atom style sets the default particle diameter
to 1.0 as well as the density. This means the mass for the particle
is not 1.0, but is PI/6 \* diameter\^3 = 0.5236.
Note that the *sphere* atom style sets the default particle diameter to
1.0 as well as the density. This means the mass for the particle is not
1.0, but is PI/6 \* diameter\^3 = 0.5236. When using the *mesh* style,
the particle diameter is adjusted from the size of the individual
triangles in the triangle mesh.
Note that the *ellipsoid* atom style sets the default particle shape
to (0.0 0.0 0.0) and the density to 1.0 which means it is a point
@ -372,5 +537,13 @@ Default
The default for the *basis* keyword is that all created atoms are
assigned the argument *type* as their atom type (when single atoms are
being created). The other defaults are *remap* = no, *rotate* =
random, and *units* = lattice.
being created). The other defaults are *remap* = no, *rotate* = random,
*radscale* = 1.0, *radthresh* = x-lattice spacing, *overlap* not
checked, *maxtry* = 10, and *units* = lattice.
----------
.. _Roberts2019:
**(Roberts)** R. Roberts (2019) "Evenly Distributing Points in a Triangle." Extreme Learning.
`<http://extremelearning.com.au/evenly-distributing-points-in-a-triangle/>`_

View File

@ -10,7 +10,7 @@ Syntax
delete_atoms style args keyword value ...
* style = *group* or *region* or *overlap* or *porosity* or *variable*
* style = *group* or *region* or *overlap* or *random* or *variable*
.. parsed-literal::
@ -20,11 +20,17 @@ Syntax
cutoff = delete one atom from pairs of atoms within the cutoff (distance units)
group1-ID = one atom in pair must be in this group
group2-ID = other atom in pair must be in this group
*porosity* args = group-ID region-ID fraction seed
*random* args = ranstyle value eflag group-ID region-ID seed
ranstyle = *fraction* or *count*
for *fraction*:
value = fraction (0.0 to 1.0) of eligible atoms to delete
eflag = *no* for fast approximate deletion, *yes* for exact deletion
for *count*:
value = number of atoms to delete
eflag = *no* for warning if count > eligible atoms, *yes* for error
group-ID = group within which to perform deletions
region-ID = region within which to perform deletions
or NULL to only impose the group criterion
fraction = delete this fraction of atoms
seed = random number seed (positive integer)
*variable* args = variable-name
@ -46,16 +52,17 @@ Examples
delete_atoms region sphere compress no
delete_atoms overlap 0.3 all all
delete_atoms overlap 0.5 solvent colloid
delete_atoms porosity all cube 0.1 482793 bond yes
delete_atoms porosity polymer cube 0.1 482793 bond yes
delete_atoms random fraction 0.1 yes all cube 482793 bond yes
delete_atoms random fraction 0.3 no polymer NULL 482793 bond yes
delete_atoms random count 500 no ions NULL 482793
detele_atoms variable checkers
Description
"""""""""""
Delete the specified atoms. This command can be used to carve out
voids from a block of material or to delete created atoms that are too
close to each other (e.g. at a grain boundary).
Delete the specified atoms. This command can be used, for example, to
carve out voids from a block of material or to delete created atoms
that are too close to each other (e.g. at a grain boundary).
For style *group*, all atoms belonging to the group are deleted.
@ -81,17 +88,33 @@ have occurred that no atom pairs within the cutoff will remain
minimum number of atoms will be deleted, or that the same atoms will
be deleted when running on different numbers of processors.
For style *porosity* a specified *fraction* of atoms are deleted which
are both in the specified group and within the specified region. The
region-ID can be specified as NULL to only impose the group criterion.
Likewise, specifying the group-ID as *all* will only impose the region
criterion.
For style *random* a subset of eligible atoms are deleted. Which
atoms to delete are chosen randomly using the specified random number
*seed*. Which atoms are deleted may vary when running on different
numbers of processors.
For example, if fraction is 0.1, then 10% of the eligible atoms will
be deleted. The atoms to delete are chosen randomly. There is no
guarantee that the exact fraction of atoms will be deleted, or that
the same atoms will be deleted when running on different numbers of
processors.
For *ranstyle* = *fraction*, the specified fractional *value* (0.0 to
1.0) of eligible atoms are deleted. If *eflag* is set to *no*, then
the number of deleted atoms will be approximate, but the operation
will be fast. If *eflag* is set to *yes*, then the number deleted
will match the requested fraction, but for large systems the selection
of deleted atoms may take additional time to determine.
For *ranstyle* = *count*, the specified integer *value* is the number
of eligible atoms are deleted. If *eflag* is set to *no*, then if the
requested number is larger then the number of eligible atoms, a
warning is issued and only the eligible atoms are deleted instead of
the requested *value*. If *eflag* is set to *yes*, an error is
triggered instead and LAMMPS will exit. For large systems the
selection of atoms to delete may take additional time to determine,
the same as for requesting an exact fraction with *pstyle* =
*fraction*.
Which atoms are eligible for deletion for style *random* is determined
by the specified *group-ID* and *region-ID*. To be eligible, an atom
must be in both the specified group and region. If *group-ID* = all,
there is effectively no group criterion. If *region-ID* is specified
as NULL, no region criterion is imposed.
For style *variable*, all atoms for which the atom-style variable with
the given name evaluates to non-zero will be deleted. Additional atoms
@ -100,6 +123,10 @@ were deleted within the region; see the *mol* keyword discussion below.
This option allows complex selections of atoms not covered by the
other options listed above.
----------
Here is the meaning of the optional keywords.
If the *compress* keyword is set to *yes*, then after atoms are
deleted, then atom IDs are re-assigned so that they run from 1 to the
number of atoms in the system. Note that this is not done for

View File

@ -133,13 +133,14 @@ Examples
.. code-block:: LAMMPS
dump myDump all atom 100 dump.atom
dump myDump all atom 100 dump.lammpstrj
dump myDump all atom/mpiio 100 dump.atom.mpiio
dump myDump all atom/gz 100 dump.atom.gz
dump myDump all atom/zstd 100 dump.atom.zst
dump 2 subgroup atom 50 dump.run.bin
dump 2 subgroup atom/mpiio 50 dump.run.mpiio.bin
dump 4a all custom 100 dump.myforce.* id type x y vx fx
dump 4a all custom 100 dump.myvel.lammpsbin id type x y z vx vy vz
dump 4b flow custom 100 dump.%.myforce id type c_myF[3] v_ke
dump 4b flow custom 100 dump.%.myforce id type c_myF[*] v_ke
dump 2 inner cfg 10 dump.snap.*.cfg mass type xs ys zs vx vy vz
@ -419,6 +420,7 @@ style.
.. code-block:: yaml
---
creator: LAMMPS
timestep: 0
units: lj
time: 0
@ -534,11 +536,11 @@ MPI-IO.
Note that MPI-IO dump files are one large file which all processors
write to. You thus cannot use the "%" wildcard character described
above in the filename since that specifies generation of multiple
files. You can use the ".bin" suffix described below in an MPI-IO
files. You can use the ".bin" or ".lammpsbin" suffix described below in an MPI-IO
dump file; again this file will be written in parallel and have the
same binary format as if it were written without MPI-IO.
If the filename ends with ".bin", the dump file (or files, if "\*" or
If the filename ends with ".bin" or ".lammpsbin", the dump file (or files, if "\*" or
"%" is also used) is written in binary format. A binary dump file
will be about the same size as a text version, but will typically
write out much faster. Of course, when post-processing, you will need

View File

@ -44,7 +44,7 @@ Syntax
color = *type*
bflag1,bflag2 = 2 numeric flags to affect how bodies are drawn
*fix* = fixID color fflag1 fflag2
fixID = ID of fix that generates objects to dray
fixID = ID of fix that generates objects to draw
color = *type*
fflag1,fflag2 = 2 numeric flags to affect how fix objects are drawn
*size* values = width height = size of images

View File

@ -392,9 +392,8 @@ keyword. For *atom* dump styles only the keywords "id", "type", "x",
"y", "z", "ix", "iy", "iz" can be accessed via string regardless of
whether scaled or unwrapped coordinates were enabled or disabled, and
it always assumes 8 columns for indexing regardless of whether image
flags are enabled or not. For dump style *cfg* only the "auxiliary"
keywords (6th or later keyword) may be changed and the column indexing
considers only them (i.e. the 6th keyword is the the 1st column).
flags are enabled or not. For dump style *cfg* only changes to the
"auxiliary" keywords (6th or later keyword) will become visible.
The *colname* keyword can be used multiple times. If multiple *colname*
settings refer to the same keyword, the last setting has precedence. A

View File

@ -75,7 +75,7 @@ doc page. This description of LHD builds on the GHD description.
The definition of bonds and :math:`E_{ij}` are the same for GHD and LHD.
The formulas for :math:`V^{max}_{ij}` and :math:`F^{max}_{ij}` are also
the same except for a pre-factor :math:`C_{ij}`, explained below.
the same except for a prefactor :math:`C_{ij}`, explained below.
The bias energy :math:`V_{ij}` applied to a bond *ij* with maximum strain is
@ -256,7 +256,7 @@ Note that this fix does not know the *cutevent* parameter, but uses
half the *cutbond* parameter as an estimate to warn if the ghost
cutoff is not long enough.
As described above the *alpha* argument is a pre-factor in the
As described above the *alpha* argument is a prefactor in the
boostostat update equation for each bond's :math:`C_{ij}` prefactor.
*Alpha* is specified in time units, similar to other thermostat or barostat
damping parameters. It is roughly the physical time it will take the

View File

@ -12,7 +12,6 @@ Syntax
* ID, group-ID are documented in :doc:`fix <fix>` command
* mdi/aimd = style name of this fix command
* optional keyword = *plugin*
Examples
""""""""
@ -20,7 +19,6 @@ Examples
.. code-block:: LAMMPS
fix 1 all mdi/aimd
fix 1 all mdi/aimd plugin
Description
"""""""""""
@ -53,14 +51,6 @@ same time as LAMMPS, or as a plugin library. See the :doc:`mdi plugin
Again, the examples/mdi/README file explains how to launch both driver
and engine codes so that engine is used in plugin mode.
To use this fix with a plugin engine, you must specify the
*plugin* keyword as the last argument, as illustrated above.
.. note::
As of April 2022, the *plugin* keyword is needed. In a future
version of the MDI library it will no longer be necessary.
----------
This fix performs the timestepping portion of an AIMD simulation.

View File

@ -21,7 +21,8 @@ Syntax
* momentum = style name of this fix command
* N = adjust the momentum every this many timesteps
one or more keyword/value pairs may be appended
* keyword = *linear* or *angular* or *rescale*
.. parsed-literal::
fix ID group-ID momentum/chunk N chunkID keyword values ...
@ -30,7 +31,7 @@ Syntax
* N = adjust the momentum per chunk every this many timesteps
* chunkID = ID of :doc:`compute chunk/atom <compute_chunk_atom>` command
one or more keyword/value pairs may be appended
one or more keyword/value settings may be appended to each of the fix commands:
* keyword = *linear* or *angular* or *rescale*
.. parsed-literal::

View File

@ -39,19 +39,35 @@ Description
Print a text string every N steps during a simulation run. This can
be used for diagnostic purposes or as a debugging tool to monitor some
quantity during a run. The text string must be a single argument, so
it should be enclosed in double quotes if it is more than one word.
If it contains variables it must be enclosed in double quotes to
insure they are not evaluated when the input script line is read, but
will instead be evaluated each time the string is printed.
it should be enclosed in single or double quotes if it is more than
one word. If it contains variables it must be enclosed in double
quotes to insure they are not evaluated when the input script line is
read, but will instead be evaluated each time the string is printed.
Instead of a numeric value, N can be specified as an :doc:`equal-style variable <variable>`, which should be specified as v_name, where
name is the variable name. In this case, the variable is evaluated at
the beginning of a run to determine the **next** timestep at which the
.. note::
As discussed on the :doc:`Commands parse <Commands_parse>` doc
page, the text string can use "immediate" variables, specified as
$(formula) with parenthesis, where the numeric formula has the same
syntax as equal-style variables described on the :doc:`variable
<variable>` doc page. This is a convenient way to evaluate a
formula immediately without using the variable command to define a
named variable and then use that variable in the text string. The
formula can include a trailing colon and format string which
determines the precision with which the numeric value is output.
This is also explained on the :doc:`Commands parse
<Commands_parse>` doc page.
Instead of a numeric value, N can be specified as an :doc:`equal-style
variable <variable>`, which should be specified as v_name, where name
is the variable name. In this case, the variable is evaluated at the
beginning of a run to determine the **next** timestep at which the
string will be written out. On that timestep, the variable will be
evaluated again to determine the next timestep, etc.
Thus the variable should return timestep values. See the stagger()
and logfreq() and stride() math functions for :doc:`equal-style variables <variable>`, as examples of useful functions to use in
this context. For example, the following commands will print output at
evaluated again to determine the next timestep, etc. Thus the
variable should return timestep values. See the stagger() and
logfreq() and stride() math functions for :doc:`equal-style variables
<variable>`, as examples of useful functions to use in this
context. For example, the following commands will print output at
timesteps 10,20,30,100,200,300,1000,2000,etc:
.. code-block:: LAMMPS
@ -61,12 +77,12 @@ timesteps 10,20,30,100,200,300,1000,2000,etc:
The specified group-ID is ignored by this fix.
See the :doc:`variable <variable>` command for a description of *equal*
style variables which are the most useful ones to use with the fix
print command, since they are evaluated afresh each timestep that the
fix print line is output. Equal-style variables calculate formulas
involving mathematical operations, atom properties, group properties,
thermodynamic properties, global values calculated by a
See the :doc:`variable <variable>` command for a description of
*equal* style variables which are the most useful ones to use with the
fix print command, since they are evaluated afresh each timestep that
the fix print line is output. Equal-style variables calculate
formulas involving mathematical operations, atom properties, group
properties, thermodynamic properties, global values calculated by a
:doc:`compute <compute>` or :doc:`fix <fix>`, or references to other
:doc:`variables <variable>`.
@ -92,11 +108,13 @@ where ID is replaced with the fix-ID.
Restart, fix_modify, output, run start/stop, minimize info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
No information about this fix is written to :doc:`binary restart files <restart>`. None of the :doc:`fix_modify <fix_modify>` options
are relevant to this fix. No global or per-atom quantities are stored
by this fix for access by various :doc:`output commands <Howto_output>`.
No information about this fix is written to :doc:`binary restart files
<restart>`. None of the :doc:`fix_modify <fix_modify>` options are
relevant to this fix. No global or per-atom quantities are stored by
this fix for access by various :doc:`output commands <Howto_output>`.
No parameter of this fix can be used with the *start/stop* keywords of
the :doc:`run <run>` command. This fix is not invoked during :doc:`energy minimization <minimize>`.
the :doc:`run <run>` command. This fix is not invoked during
:doc:`energy minimization <minimize>`.
Restrictions
""""""""""""

View File

@ -59,7 +59,7 @@ of a bond or angle or dihedral interaction whose strength can vary
over time during a simulation. This is functionally similar to
creating a bond or angle or dihedral for the same atoms in a data
file, as specified by the :doc:`read_data <read_data>` command, albeit
with a time-varying pre-factor coefficient, and except for exclusion
with a time-varying prefactor coefficient, and except for exclusion
rules, as explained below.
For the purpose of force field parameter-fitting or mapping a molecular

View File

@ -199,7 +199,7 @@ inside the colloid particle and wall. Note that the cutoff distance Rc
in this case is the distance from the colloid particle center to the
wall. The prefactor :math:`\epsilon` can be thought of as an effective
Hamaker constant with energy units for the strength of the colloid-wall
interaction. More specifically, the :math:`\epsilon` pre-factor is
interaction. More specifically, the :math:`\epsilon` prefactor is
:math:`4\pi^2 \rho_{wall} \rho_{colloid} \epsilon \sigma^6`, where
:math:`\epsilon` and :math:`\sigma` are the LJ parameters for the
constituent LJ particles. :math:`\rho_{wall}` and :math:`\rho_{colloid}`
@ -211,7 +211,7 @@ constituent LJ particles of size :math:`\sigma` within the colloid particle
and a 3d half-lattice of Lennard-Jones 12/6 particles of size :math:`\sigma`
in the wall. As mentioned in the preceding paragraph, the density of
particles in the wall and colloid can be different, as specified by
the :math:`\epsilon` pre-factor.
the :math:`\epsilon` prefactor.
For the *wall/harmonic* style, :math:`\epsilon` is effectively the spring
constant K, and has units (energy/distance\^2). The input parameter

View File

@ -88,7 +88,7 @@ examples/ directory.
The prefactor :math:`\epsilon` can be thought of as an
effective Hamaker constant with energy units for the strength of the
ellipsoid-wall interaction. More specifically, the :math:`\epsilon`
pre-factor is
prefactor is
.. math::

BIN
doc/src/img/marble_race.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
doc/src/img/overlap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 KiB

View File

@ -129,8 +129,8 @@ Examples
kspace_style pppm 1.0e-4
kspace_style pppm/cg 1.0e-5 1.0e-6
kspace style msm 1.0e-4
kspace style scafacos fmm 1.0e-4
kspace_style msm 1.0e-4
kspace_style scafacos fmm 1.0e-4
kspace_style none
Used in input scripts:
@ -475,8 +475,8 @@ that package **and** the KSPACE package. See the :doc:`Build package
<Build_package>` page for more info.
For MSM, a simulation must be 3d and one can use any combination of
periodic, non-periodic, or shrink-wrapped boundaries (specified using
the :doc:`boundary <boundary>` command).
periodic, non-periodic, but not shrink-wrapped boundaries (specified
using the :doc:`boundary <boundary>` command).
For Ewald and PPPM, a simulation must be 3d and periodic in all
dimensions. The only exception is if the slab option is set with

View File

@ -98,6 +98,10 @@ see their implementation reported in :ref:`(Ivanov) <Ivanov1>`.
Restrictions
""""""""""""
The *spin*, *spin/cg*, and *spin/lbfgps* styles are part of the SPIN
package. They are only enabled if LAMMPS was built with that package.
See the :doc:`Build package <Build_package>` page for more info.
This minimization procedure is only applied to spin degrees of
freedom for a frozen lattice configuration.

View File

@ -1,25 +1,55 @@
.. index:: min_style
min_style command
=================
min_style cg command
====================
min_style hftn command
======================
min_style sd command
====================
min_style quickmin command
==========================
min_style fire command
======================
min_style fire/old command
==========================
:doc:`min_style spin <min_spin>` command
========================================
:doc:`min_style spin/cg <min_spin>` command
===========================================
:doc:`min_style spin/lbfgs <min_spin>` command
==============================================
Syntax
""""""
.. code-block:: LAMMPS
.. parsed-literal::
min_style style
* style = *cg* or *hftn* or *sd* or *quickmin* or *fire* or *fire/old* or *spin* or *spin/cg* or *spin/lbfgs*
.. parsed-literal::
*spin* is discussed briefly here and fully on :doc:`min_style spin <min_spin>` doc page
*spin/cg* is discussed briefly here and fully on :doc:`min_style spin <min_spin>` doc page
*spin/lbfgs* is discussed briefly here and fully on :doc:`min_style spin <min_spin>` doc page
Examples
""""""""
.. code-block:: LAMMPS
min_style cg
min_style spin
min_style fire
min_style spin
Description
"""""""""""
@ -124,7 +154,9 @@ calculations via the :doc:`neb/spin <neb_spin>` command.
Restrictions
""""""""""""
none
The *spin*, *spin/cg*, and *spin/lbfgps* styles are part of the SPIN
package. They are only enabled if LAMMPS was built with that package.
See the :doc:`Build package <Build_package>` page for more info.
Related commands
""""""""""""""""

View File

@ -50,6 +50,12 @@ Examples
pair_style hybrid/overlay e3b 1 lj/cut/tip4p/long 1 2 1 1 0.15 8.5
pair_coeff * * e3b preset 2011
Used in example input script:
.. parsed-literal::
examples/PACKAGES/e3b/in.e3b-tip4p2005
Description
"""""""""""
@ -68,21 +74,27 @@ The *e3b* style computes an \"explicit three-body\" (E3B) potential for water :r
0 & r>R_f\\
\end{cases}
This potential was developed as a water model that includes the three-body cooperativity of hydrogen bonding explicitly.
To use it in this way, it must be applied in conjunction with a conventional two-body water model, through *pair_style hybrid/overlay*.
The three body interactions are split into three types: A, B, and C.
Type A corresponds to anti-cooperative double hydrogen bond donor interactions.
Type B corresponds to the cooperative interaction of molecules that both donate and accept a hydrogen bond.
Type C corresponds to anti-cooperative double hydrogen bond acceptor interactions.
The three-body interactions are smoothly cutoff by the switching function s(r) between Rs and Rc3.
The two-body interactions are designed to correct for the effective many-body interactions implicitly included in the conventional two-body potential.
The two-body interactions are cut off sharply at Rc2, because K3 is typically significantly smaller than K2.
See :ref:`(Kumar 2008) <Kumar>` for more details.
This potential was developed as a water model that includes the
three-body cooperativity of hydrogen bonding explicitly. To use it in
this way, it must be applied in conjunction with a conventional two-body
water model, through pair style :doc:`hybrid/overlay <pair_hybrid>`. The
three body interactions are split into three types: A, B, and C. Type A
corresponds to anti-cooperative double hydrogen bond donor interactions.
Type B corresponds to the cooperative interaction of molecules that both
donate and accept a hydrogen bond. Type C corresponds to
anti-cooperative double hydrogen bond acceptor interactions. The
three-body interactions are smoothly cutoff by the switching function
s(r) between Rs and Rc3. The two-body interactions are designed to
correct for the effective many-body interactions implicitly included in
the conventional two-body potential. The two-body interactions are cut
off sharply at Rc2, because K3 is typically significantly smaller than
K2. See :ref:`(Kumar 2008) <Kumar>` for more details.
Only a single *pair_coeff* command is used with the *e3b* style.
The first two arguments must be \* \*.
The oxygen atom type for the pair style is passed as the only argument to the *pair_style* command, not in the *pair_coeff* command.
The hydrogen atom type is inferred by the ordering of the atoms.
Only a single :doc:`pair_coeff <pair_coeff>` command is used with the
*e3b* style and the first two arguments must be \* \*. The oxygen atom
type for the pair style is passed as the only argument to the
*pair_style* command, not in the *pair_coeff* command. The hydrogen
atom type is inferred from the ordering of the atoms.
.. note::
@ -90,26 +102,41 @@ The hydrogen atom type is inferred by the ordering of the atoms.
Each water molecule must have consecutive IDs with the oxygen first.
This pair style does not test that this criteria is met.
The *pair_coeff* command must have at least one keyword/value pair, as described above.
The *preset* keyword sets the potential parameters to the values used in :ref:`(Tainter 2011) <Tainter2011>` or :ref:`(Tainter 2015) <Tainter2015>`.
To use the water models defined in those references, the *e3b* style should always be used in conjunction with an *lj/cut/tip4p/long* style through *pair_style hybrid/overlay*, as demonstrated in the second example above.
The *preset 2011* option should be used with the :doc:`TIP4P water model <Howto_tip4p>`.
The *preset 2015* option should be used with the :doc:`TIP4P/2005 water model <Howto_tip4p>`.
If the *preset* keyword is used, no other keyword is needed.
Changes to the preset parameters can be made by specifying the *preset* keyword followed by the specific parameter to change, like *Ea*\ .
Note that the other keywords must come after *preset* in the pair_style command.
The *e3b* style can also be used to implement any three-body potential of the same form by specifying all the keywords except *neigh*\ : *Ea*, *Eb*, *Ec*, *E2*, *K3*, *K2*, *Rc3*, *Rc2*, *Rs*, and *bondL*\ .
The keyword *bondL* specifies the intramolecular OH bond length of the water model being used.
This is needed to include H atoms that are within the cutoff even when the attached oxygen atom is not.
The *pair_coeff* command must have at least one keyword/value pair, as
described above. The *preset* keyword sets the potential parameters to
the values used in :ref:`(Tainter 2011) <Tainter2011>` or
:ref:`(Tainter 2015) <Tainter2015>`. To use the water models defined in
those references, the *e3b* style should always be used in conjunction
with an *lj/cut/tip4p/long* style through *pair_style hybrid/overlay*,
as demonstrated in the second example above. The *preset 2011* option
should be used with the :doc:`TIP4P water model <Howto_tip4p>`. The
*preset 2015* option should be used with the :doc:`TIP4P/2005 water
model <Howto_tip4p>`. If the *preset* keyword is used, no other keyword
is needed. Changes to the preset parameters can be made by specifying
the *preset* keyword followed by the specific parameter to change, like
*Ea*\ . Note that the other keywords must come after *preset* in the
pair_style command. The *e3b* style can also be used to implement any
three-body potential of the same form by specifying all the keywords
except *neigh*\ : *Ea*, *Eb*, *Ec*, *E2*, *K3*, *K2*, *Rc3*, *Rc2*,
*Rs*, and *bondL*\ . The keyword *bondL* specifies the intramolecular
OH bond length of the water model being used. This is needed to include
H atoms that are within the cutoff even when the attached oxygen atom is
not.
This pair style allocates arrays sized according to the number of pairwise interactions within Rc3.
To do this it needs an estimate for the number of water molecules within Rc3 of an oxygen atom.
This estimate defaults to 10 and can be changed using the *neigh* keyword, which takes an integer as an argument.
If the neigh setting is too small, the simulation will fail with the error "neigh is too small".
If the neigh setting is too large, the pair style will use more memory than necessary.
This pair style allocates arrays sized according to the number of
pairwise interactions within Rc3. To do this it needs an estimate for
the number of water molecules within Rc3 of an oxygen atom. This
estimate defaults to 10 and can be changed using the *neigh* keyword,
which takes an integer as an argument. If the neigh setting is too
small, the simulation will fail with the error "neigh is too small". If
the neigh setting is too large, the pair style will use more memory than
necessary.
This pair style tallies a breakdown of the total E3B potential energy into sub-categories, which can be accessed via the :doc:`compute pair <compute_pair>` command as a vector of values of length 4.
The 4 values correspond to the terms in the first equation above: the E2 term, the Ea term, the Eb term, and the Ec term.
This pair style tallies a breakdown of the total E3B potential energy
into sub-categories, which can be accessed via the :doc:`compute pair
<compute_pair>` command as a vector of values of length 4. The 4 values
correspond to the terms in the first equation above: the E2 term, the Ea
term, the Eb term, and the Ec term.
See the examples/PACKAGES/e3b directory for a complete example script.

View File

@ -144,7 +144,7 @@ two particles, and is thus a non-linear function of overlap distance.
Thus Kn has units of force per area and is thus specified in units of
(pressure). The effects of absolute particle size (monodispersity)
and relative size (polydispersity) are captured in the radii-dependent
pre-factors. When these pre-factors are carried through to the other
prefactors. When these prefactors are carried through to the other
terms in the force equation it means that the specified :math:`\gamma_n` is in
units of (1/(time\*distance)), :math:`K_t` is in units of (pressure), and
:math:`\gamma_t` is in units of (1/(time\*distance)).

View File

@ -54,7 +54,7 @@ form.
An interpolation table is used to evaluate the density-dependent energy
(:math:`\int A(\rho') d\rho'`) and force (:math:`A(\rho')`). Note that
the pre-factor to the energy is computed after the interpolation, thus
the prefactor to the energy is computed after the interpolation, thus
the :math:`\int A(\rho') d \rho'` will have units of energy / length\^4.
The interpolation table is created as a pre-computation by fitting

View File

@ -67,7 +67,7 @@ form.
An interpolation table is used to evaluate the density-dependent energy
(:math:`\int A(\rho') d \rho'`) and force (:math:`A(\rho')`). Note that
the pre-factor to the energy is computed after the interpolation, thus
the prefactor to the energy is computed after the interpolation, thus
the :math:`\int A(\rho') d\rho'` will have units of energy / length\^4.
The interpolation table is created as a pre-computation by fitting

View File

@ -20,28 +20,37 @@ Examples
Description
"""""""""""
Using a pair style of none means pair forces and energies are not
computed.
Using a pair style of *none* means that any previous pair style setting
will be deleted and pairwise forces and energies are not computed.
With this choice, the force cutoff is 0.0, which means that only atoms
within the neighbor skin distance (see the :doc:`neighbor <neighbor>`
command) are communicated between processors. You must insure the
skin distance is large enough to acquire atoms needed for computing
bonds, angles, etc.
As a consequence there will be a pairwise force cutoff of 0.0, which has
implications for the default setting of the neighbor list and the
communication cutoff. Those are the sum of the largest pairwise cutoff
and the neighbor skin distance (see the documentation of the
:doc:`neighbor <neighbor>` command and the :doc:`comm_modify
<comm_modify>` command). When you have bonds, angles, dihedrals, or
impropers defined at the same time, you must set the communication
cutoff so that communication cutoff distance is large enough to acquire
and communicate sufficient ghost atoms from neighboring sub-domains as
needed for computing bonds, angles, etc.
A pair style of *none* will also prevent pairwise neighbor lists from
being built. However if the :doc:`neighbor <neighbor>` style is *bin*,
data structures for binning are still allocated. If the neighbor skin
distance is small, then these data structures can consume a large
amount of memory. So you should either set the neighbor style to
*nsq* or set the skin distance to a larger value.
A pair style of *none* will also not request a pairwise neighbor list.
However if the :doc:`neighbor <neighbor>` style is *bin*, data
structures for binning are still allocated. If the neighbor list cutoff
is small, then these data structures can consume a large amount of
memory. So you should either set the neighbor style to *nsq* or set the
skin distance to a larger value.
See the :doc:`pair_style zero <pair_zero>` for a way to trigger the
building of a neighbor lists, but compute no pairwise interactions.
See the :doc:`pair_style zero <pair_zero>` for a way to set a pairwise
cutoff and thus trigger the building of a neighbor lists and setting
a corresponding communication cutoff, but compute no pairwise interactions.
Restrictions
""""""""""""
none
You must not use a :doc:`pair_coeff <pair_coeff>` command with this pair
style. Since there is no interaction computed, you cannot set any
coefficients for it.
Related commands
""""""""""""""""

View File

@ -1,7 +1,10 @@
.. index:: pair_style pace
.. index:: pair_style pace/kk
pair_style pace command
========================
=======================
Accelerator Variants: *pace/kk*
Syntax
""""""
@ -10,13 +13,14 @@ Syntax
pair_style pace ... keyword values ...
* an optional keyword may be appended
* keyword = *product* or *recursive*
* one or more keyword/value pairs may be appended
.. parsed-literal::
keyword = *product* or *recursive* or *chunksize*
*product* = use product algorithm for basis functions
*recursive* = use recursive algorithm for basis functions
*chunksize* value = number of atoms in each pass
Examples
""""""""
@ -24,7 +28,7 @@ Examples
.. code-block:: LAMMPS
pair_style pace
pair_style pace product
pair_style pace product chunksize 2048
pair_coeff * * Cu-PBE-core-rep.ace Cu
Description
@ -59,11 +63,19 @@ Note that unlike for other potentials, cutoffs are
not set in the pair_style or pair_coeff command; they are specified in
the ACE file.
The pair_style *pace* command may be followed by an optional keyword
The pair_style *pace* command may be followed by the optional keyword
*product* or *recursive*, which determines which of two algorithms
is used for the calculation of basis functions and derivatives.
The default is *recursive*.
The keyword *chunksize* is only applicable when
using the pair style *pace* with the KOKKOS package on GPUs and is
ignored otherwise. This keyword controls the number of atoms
in each pass used to compute the atomic cluster expansion and is used to
avoid running out of memory. For example if there are 8192 atoms in the
simulation and the *chunksize* is set to 4096, the ACE
calculation will be broken up into two passes (running on a single GPU).
See the :doc:`pair_coeff <pair_coeff>` page for alternate ways
to specify the path for the ACE coefficient file.
@ -88,6 +100,10 @@ This pair style can only be used via the *pair* keyword of the
----------
.. include:: accel_styles.rst
----------
Restrictions
""""""""""""
@ -103,7 +119,7 @@ Related commands
Default
"""""""
recursive
recursive, chunksize = 4096
.. _Drautz20191:

View File

@ -41,7 +41,7 @@ Style *soft* computes pairwise interactions with the formula
\qquad r < r_c
It is useful for pushing apart overlapping atoms, since it does not
blow up as r goes to 0. A is a pre-factor that can be made to vary in
blow up as r goes to 0. A is a prefactor that can be made to vary in
time from the start to the end of the run (see discussion below),
e.g. to start with a very soft potential and slowly harden the
interactions over time. Rc is the cutoff. See the :doc:`fix nve/limit <fix_nve_limit>` command for another way to push apart

View File

@ -348,6 +348,7 @@ accelerated styles exist.
* :doc:`spin/neel <pair_spin_neel>` -
* :doc:`srp <pair_srp>` -
* :doc:`sw <pair_sw>` - Stillinger-Weber 3-body potential
* :doc:`sw/angle/table <pair_sw_angle_table>` - Stillinger-Weber potential with tabulated angular term
* :doc:`sw/mod <pair_sw>` - modified Stillinger-Weber 3-body potential
* :doc:`table <pair_table>` - tabulated pair potential
* :doc:`table/rx <pair_table_rx>` -
@ -358,6 +359,7 @@ accelerated styles exist.
* :doc:`tersoff/table <pair_tersoff>` -
* :doc:`tersoff/zbl <pair_tersoff_zbl>` - Tersoff/ZBL 3-body potential
* :doc:`thole <pair_thole>` - Coulomb interactions with thole damping
* :doc:`threebody/table <pair_threebody_table>` - generic tabulated three-body potential
* :doc:`tip4p/cut <pair_coul>` - Coulomb for TIP4P water w/out LJ
* :doc:`tip4p/long <pair_coul>` - long-range Coulomb for TIP4P water w/out LJ
* :doc:`tip4p/long/soft <pair_fep_soft>` -

View File

@ -0,0 +1,311 @@
.. index:: pair_style sw/angle/table
pair_style sw/angle/table command
=================================
Syntax
""""""
.. code-block:: LAMMPS
pair_style style
* style = *sw/angle/table*
Examples
""""""""
.. code-block:: LAMMPS
pair_style sw/angle/table
pair_coeff * * spce.sw type
Used in example input script:
.. parsed-literal::
examples/PACKAGES/manybody_table/in.spce_sw
Description
"""""""""""
The *sw/angle/table* style is a modification of the original
:doc:`pair_style sw <pair_sw>`. It has been developed for coarse-grained
simulations (of water) (:ref:`Scherer1 <Scherer1>`), but can be employed
for all kinds of systems. It computes a modified 3-body
:ref:`Stillinger-Weber <Stillinger3>` potential for the energy E of a
system of atoms as
.. math::
E & = \sum_i \sum_{j > i} \phi_2 (r_{ij}) +
\sum_i \sum_{j \neq i} \sum_{k > j}
\phi_3 (r_{ij}, r_{ik}, \theta_{ijk}) \\
\phi_2(r_{ij}) & = A_{ij} \epsilon_{ij} \left[ B_{ij} (\frac{\sigma_{ij}}{r_{ij}})^{p_{ij}} -
(\frac{\sigma_{ij}}{r_{ij}})^{q_{ij}} \right]
\exp \left( \frac{\sigma_{ij}}{r_{ij} - a_{ij} \sigma_{ij}} \right) \\
\phi_3(r_{ij},r_{ik},\theta_{ijk}) & = f^{\textrm{3b}}\left(\theta_{ijk}\right)
\exp \left( \frac{\gamma_{ij} \sigma_{ij}}{r_{ij} - a_{ij} \sigma_{ij}} \right)
\exp \left( \frac{\gamma_{ik} \sigma_{ik}}{r_{ik} - a_{ik} \sigma_{ik}} \right)
where :math:`\phi_2` is a two-body term and :math:`\phi_3` is a
three-body term. The summations in the formula are over all neighbors J
and K of atom I within a cutoff distance :math:`a \sigma`. In contrast
to the original *sw* style, *sw/angle/table* allows for a flexible
three-body term :math:`f^{\textrm{3b}}\left(\theta_{ijk}\right)` which
is read in as a tabulated interaction. It can be parameterized with the
csg_fmatch app of VOTCA as available at:
https://gitlab.mpcdf.mpg.de/votca/votca.
Only a single pair_coeff command is used with the *sw/angle/table* style
which specifies a modified Stillinger-Weber potential file with
parameters for all needed elements. These are mapped to LAMMPS atom
types by specifying N_el additional arguments after the ".sw" filename
in the pair_coeff command, where N_el is the number of LAMMPS atom
types:
* ".sw" filename
* N_el element names = mapping of SW elements to atom types
See the :doc:`pair_coeff <pair_coeff>` page for alternate ways to
specify the path for the potential file.
As an example, imagine a file SiC.sw has Stillinger-Weber values for Si
and C. If your LAMMPS simulation has 4 atoms types and you want the
first 3 to be Si, and the fourth to be C, you would use the following
pair_coeff command:
.. code-block:: LAMMPS
pair_coeff * * SiC.sw Si Si Si C
The first 2 arguments must be \* \* so as to span all LAMMPS atom types.
The first three Si arguments map LAMMPS atom types 1,2,3 to the Si
element in the SW file. The final C argument maps LAMMPS atom type 4 to
the C element in the SW file. If a mapping value is specified as NULL,
the mapping is not performed. This can be used when a *sw/angle/table*
potential is used as part of the *hybrid* pair style. The NULL values
are placeholders for atom types that will be used with other potentials.
The (modified) Stillinger-Weber files have a ".sw" suffix. Lines that
are not blank or comments (starting with #) define parameters for a
triplet of elements. The parameters in a single entry correspond to the
two-body and three-body coefficients in the formula above. Here, also
the suffix ".sw" is used though the original Stillinger-Weber file
format is supplemented with four additional lines per parameter block to
specify the tabulated three-body interaction. A single entry then
contains:
* element 1 (the center atom in a 3-body interaction)
* element 2
* element 3
* :math:`\epsilon` (energy units)
* :math:`\sigma` (distance units)
* a
* :math:`\lambda`
* :math:`\gamma`
* :math:`\cos\theta_0`
* A
* B
* p
* q
* tol
* filename
* keyword
* style
* N
The A, B, p, and q parameters are used only for two-body interactions.
The :math:`\lambda` and :math:`\cos\theta_0` parameters, only used for
three-body interactions in the original Stillinger-Weber style, are read
in but ignored in this modified pair style. The :math:`\epsilon`
parameter is only used for two-body interactions in this modified pair
style and not for the three-body terms. The :math:`\sigma` and *a*
parameters are used for both two-body and three-body
interactions. :math:`\gamma` is used only in the three-body
interactions, but is defined for pairs of atoms. The non-annotated
parameters are unitless.
LAMMPS introduces an additional performance-optimization parameter tol
that is used for both two-body and three-body interactions. In the
Stillinger-Weber potential, the interaction energies become negligibly
small at atomic separations substantially less than the theoretical
cutoff distances. LAMMPS therefore defines a virtual cutoff distance
based on a user defined tolerance tol. The use of the virtual cutoff
distance in constructing atom neighbor lists can significantly reduce
the neighbor list sizes and therefore the computational cost. LAMMPS
provides a *tol* value for each of the three-body entries so that they
can be separately controlled. If tol = 0.0, then the standard
Stillinger-Weber cutoff is used.
The additional parameters *filename*, *keyword*, *style*, and *N* refer
to the tabulated angular potential
:math:`f^{\textrm{3b}}\left(\theta_{ijk}\right)`. The tabulated angular
potential has to be of the format as used in the :doc:`angle_style table
<angle_table>` command:
An interpolation tables of length *N* is created. The interpolation is
done in one of 2 *styles*: *linear* or *spline*. For the *linear*
style, the angle is used to find 2 surrounding table values from which
an energy or its derivative is computed by linear interpolation. For the
*spline* style, a cubic spline coefficients are computed and stored at
each of the *N* values in the table. The angle is used to find the
appropriate set of coefficients which are used to evaluate a cubic
polynomial which computes the energy or derivative.
The *filename* specifies the file containing the tabulated energy and
derivative values of :math:`f^{\textrm{3b}}\left(\theta_{ijk}\right)`.
The *keyword* then specifies a section of the file. The format of this
file is as follows (without the parenthesized comments):
.. parsed-literal::
# Angle potential for harmonic (one or more comment or blank lines)
HAM (keyword is the first text on line)
N 181 FP 0 0 EQ 90.0 (N, FP, EQ parameters)
(blank line)
1 0.0 200.5 2.5 (index, angle, energy, derivative)
2 1.0 198.0 2.5
...
181 180.0 0.0 0.0
A section begins with a non-blank line whose first character is not a
"#"; blank lines or lines starting with "#" can be used as comments
between sections. The first line begins with a keyword which identifies
the section. The next line lists (in any order) one or more parameters
for the table. Each parameter is a keyword followed by one or more
numeric values.
The parameter "N" is required and its value is the number of table
entries that follow. Note that this may be different than the *N*
specified in the Stillinger-Weber potential file. Let Nsw = *N* in the
".sw" file, and Nfile = "N" in the tabulated angular file. What LAMMPS
does is a preliminary interpolation by creating splines using the Nfile
tabulated values as nodal points. It uses these to interpolate as
needed to generate energy and derivative values at Ntable different
points. The resulting tables of length Nsw are then used as described
above, when computing energy and force for individual angles and their
atoms. This means that if you want the interpolation tables of length
Nsw to match exactly what is in the tabulated file (with effectively no
preliminary interpolation), you should set Nsw = Nfile.
The "FP" parameter is optional. If used, it is followed by two values
fplo and fphi, which are the second derivatives at the innermost and
outermost angle settings. These values are needed by the spline
construction routines. If not specified by the "FP" parameter, they are
estimated (less accurately) by the first two and last two derivative
values in the table.
The "EQ" parameter is also optional. If used, it is followed by a the
equilibrium angle value, which is used, for example, by the :doc:`fix
shake <fix_shake>` command. If not used, the equilibrium angle is set to
180.0.
Following a blank line, the next N lines of the angular table file list
the tabulated values. On each line, the first value is the index from 1
to N, the second value is the angle value (in degrees), the third value
is the energy (in energy units), and the fourth is -dE/d(theta) (also in
energy units). The third term is the energy of the 3-atom configuration
for the specified angle. The last term is the derivative of the energy
with respect to the angle (in degrees, not radians). Thus the units of
the last term are still energy, not force. The angle values must
increase from one line to the next. The angle values must also begin
with 0.0 and end with 180.0, i.e. span the full range of possible
angles.
Note that one angular potential file can contain many sections, each
with a tabulated potential. LAMMPS reads the file section by section
until it finds one that matches the specified *keyword* of appropriate
section of the ".sw" file.
The Stillinger-Weber potential file must contain entries for all the
elements listed in the pair_coeff command. It can also contain entries
for additional elements not being used in a particular simulation;
LAMMPS ignores those entries.
For a single-element simulation, only a single entry is required
(e.g. SiSiSi). For a two-element simulation, the file must contain 8
entries (for SiSiSi, SiSiC, SiCSi, SiCC, CSiSi, CSiC, CCSi, CCC), that
specify SW parameters for all permutations of the two elements
interacting in three-body configurations. Thus for 3 elements, 27
entries would be required, etc.
As annotated above, the first element in the entry is the center atom in
a three-body interaction. Thus an entry for SiCC means a Si atom with 2
C atoms as neighbors. The parameter values used for the two-body
interaction come from the entry where the second and third elements are
the same. Thus the two-body parameters for Si interacting with C, comes
from the SiCC entry. The three-body angular potential
:math:`f^{\textrm{3b}}\left(\theta_{ijk}\right)` can in principle be
specific to the three elements of the configuration. However, the user
must ensure that it makes physically sense. Note also that the function
:math:`\phi_3` contains two exponential screening factors with parameter
values from the ij pair and ik pairs. So :math:`\phi_3` for a C atom
bonded to a Si atom and a second C atom will depend on the three-body
parameters for the CSiC entry, and also on the two-body parameters for
the CCC and CSiSi entries. Since the order of the two neighbors is
arbitrary, the three-body parameters and the tabulated angular potential
for entries CSiC and CCSi should be the same. Similarly, the two-body
parameters for entries SiCC and CSiSi should also be the same. The
parameters used only for two-body interactions (A, B, p, and q) in
entries whose second and third element are different (e.g. SiCSi) are
not used for anything and can be set to 0.0 if desired. This is also
true for the parameters in :math:`\phi_3` that are taken from the ij and
ik pairs (:math:`\sigma`, *a*, :math:`\gamma`)
Additional input files and reference data can be found at:
https://gitlab.mpcdf.mpg.de/votca/votca/-/tree/master/csg-tutorials/spce/3body_sw
----------
Mixing, shift, table, tail correction, restart, rRESPA info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
For atom type pairs I,J and I != J, where types I and J correspond to
two different element types, mixing is performed by LAMMPS as described
above from values in the potential file, but not for the tabulated
angular potential file.
This pair style does not support the :doc:`pair_modify <pair_modify>`
shift, table, and tail options.
This pair style does not write its information to :doc:`binary restart
files <restart>`, since it is stored in potential files. Thus, you need
to re-specify the pair_style and pair_coeff commands in an input script
that reads a restart file.
This pair style can only be used via the *pair* keyword of the
:doc:`run_style respa <run_style>` command. It does not support the
*inner*, *middle*, *outer* keywords.
----------
Restrictions
""""""""""""
This pair style is part of the MANYBODY package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
This pair style requires the :doc:`newton <newton>` setting to be "on"
for pair interactions.
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`, :doc:`pair_style sw <pair_sw>`, :doc:`pair_style threebody/table <pair_threebody_table>`
----------
.. _Stillinger3:
**(Stillinger)** Stillinger and Weber, Phys Rev B, 31, 5262 (1985).
.. _Scherer1:
**(Scherer1)** C. Scherer and D. Andrienko, Phys. Chem. Chem. Phys. 20, 22387-22394 (2018).

View File

@ -0,0 +1,281 @@
.. index:: pair_style threebody/table
pair_style threebody/table command
==================================
Syntax
""""""
.. code-block:: LAMMPS
pair_style style
* style = *threebody/table*
Examples
""""""""
.. code-block:: LAMMPS
pair_style threebody/table
pair_coeff * * spce2.3b type1 type2
pair_style hybrid/overlay table linear 1200 threebody/table
pair_coeff 1 1 table table_CG_CG.txt VOTCA
pair_coeff * * threebody/table spce.3b type
Used in example input scripts:
.. parsed-literal::
examples/PACKAGES/manybody_table/in.spce
examples/PACKAGES/manybody_table/in.spce2
Description
"""""""""""
The *threebody/table* style is a pair style for generic tabulated
three-body interactions. It has been developed for (coarse-grained)
simulations (of water) with Kernel-based machine learning (ML)
potentials (:ref:`Scherer2 <Scherer2>`). As for many other MANYBODY
package pair styles the energy of a system is computed as a sum over
three-body terms:
.. math::
E = \sum_i \sum_{j \neq i} \sum_{k > j} \phi_3 (r_{ij}, r_{ik}, \theta_{ijk})
The summations in the formula are over all neighbors J and K of atom I
within a cutoff distance :math:`cut`. In contrast to the
Stillinger-Weber potential, all forces are not calculated analytically,
but read in from a three-body force/energy table which can be generated
with the csg_ml app of VOTCA as available at:
https://gitlab.mpcdf.mpg.de/votca/votca.
Only a single pair_coeff command is used with the *threebody/table*
style which specifies a threebody potential (".3b") file with parameters
for all needed elements. These are then mapped to LAMMPS atom types by
specifying N_el additional arguments after the ".3b" filename in the
pair_coeff command, where N_el is the number of LAMMPS atom types:
* ".3b" filename
* N_el element names = mapping of threebody elements to atom types
See the :doc:`pair_coeff <pair_coeff>` page for alternate ways to
specify the path for the potential file.
As an example, imagine a file SiC.3b has three-body values for Si and C.
If your LAMMPS simulation has 4 atoms types and you want the first 3 to
be Si, and the fourth to be C, you would use the following pair_coeff
command:
.. code-block:: LAMMPS
pair_coeff * * SiC.3b Si Si Si C
The first 2 arguments must be \* \* so as to span all LAMMPS atom types.
The first three Si arguments map LAMMPS atom types 1,2,3 to the Si
element in the ".3b" file. The final C argument maps LAMMPS atom type 4
to the C element in the threebody file. If a mapping value is specified
as NULL, the mapping is not performed. This can be used when a
*threebody/table* potential is used as part of the *hybrid* pair style.
The NULL values are placeholders for atom types that will be used with
other potentials.
The three-body files have a ".3b" suffix. Lines that are not blank or
comments (starting with #) define parameters for a triplet of
elements. The parameters in a single entry specify to the (three-body)
cutoff distance and the tabulated three-body interaction. A single entry
then contains:
* element 1 (the center atom in a 3-body interaction)
* element 2
* element 3
* cut (distance units)
* filename
* keyword
* style
* N
The parameter :math:`cut` is the (three-body) cutoff distance. When set
to 0, no interaction is calculated for this element triplet. The
parameters *filename*, *keyword*, *style*, and *N* refer to the
tabulated three-body potential.
The tabulation is done on a three-dimensional grid of the two distances
:math:`r_{ij}` and :math:`r_{ik}` as well as the angle
:math:`\theta_{ijk}` which is constructed in the following way. There
are two different cases. If element 2 and element 3 are of the same
type (e.g. SiCC), the distance :math:`r_{ij}` is varied in "N" steps
from rmin to rmax and the distance :math:`r_{ik}` is varied from
:math:`r_{ij}` to rmax. This can be done, due to the symmetry of the
triplet. If element 2 and element 3 are not of the same type
(e.g. SiCSi), there is no additional symmetry and the distance
:math:`r_{ik}` is also varied from rmin to rmax in "N" steps. The angle
:math:`\theta_{ijk}` is always varied in "2N" steps from (0.0 +
180.0/(4N)) to (180.0 - 180.0/(4N)). Therefore, the total number of
table entries is "M = N * N * (N+1)" for the symmetric (element 2 and
element 3 are of the same type) and "M = 2 * N * N * N" for the general
case (element 2 and element 3 are not of the same type).
The forces on all three particles I, J, and K of a triplet of this type
of three-body interaction potential (:math:`\phi_3 (r_{ij}, r_{ik},
\theta_{ijk})`) lie within the plane defined by the three inter-particle
distance vectors :math:`{\mathbf r}_{ij}`, :math:`{\mathbf r}_{ik}`, and
:math:`{\mathbf r}_{jk}`. This property is used to project the forces
onto the inter-particle distance vectors as follows
.. math::
\begin{pmatrix}
{\mathbf f}_{i} \\
{\mathbf f}_{j} \\
{\mathbf f}_{k} \\
\end{pmatrix} =
\begin{pmatrix}
f_{i1} & f_{i2} & 0 \\
f_{j1} & 0 & f_{j2} \\
0 & f_{k1} & f_{k2} \\
\end{pmatrix}
\begin{pmatrix}
{\mathbf r}_{ij} \\
{\mathbf r}_{ik} \\
{\mathbf r}_{jk} \\
\end{pmatrix}
and then tabulate the 6 force constants :math:`f_{i1}`, :math:`f_{i2}`,
:math:`f_{j1}`, :math:`f_{j2}`, :math:`f_{k1}`, and :math:`f_{k2}`, as
well as the energy of a triplet e. Due to symmetry reasons, the
following relations hold: :math:`f_{i1}=-f_{j1}`,
:math:`f_{i2}=-f_{k1}`, and :math:`f_{j2}=-f_{k2}`. As in this pair
style the forces are read in directly, a correct MD simulation is also
performed in the case that the triplet energies are set to e=0.
The *filename* specifies the file containing the tabulated energy and
derivative values of :math:`\phi_3 (r_{ij}, r_{ik}, \theta_{ijk})`. The
*keyword* then specifies a section of the file. The format of this file
is as follows (without the parenthesized comments):
.. parsed-literal::
# Tabulated three-body potential for spce water (one or more comment or blank lines)
ENTRY1 (keyword is the first text on line)
N 12 rmin 2.55 rmax 3.65 (N, rmin, rmax parameters)
(blank line)
1 2.55 2.55 3.75 -867.212 -611.273 867.212 21386.8 611.273 -21386.8 0.0 (index, r_ij, r_ik, theta, f_i1, f_i2, f_j1, f_j2, f_k1, f_k2, e)
2 2.55 2.55 11.25 -621.539 -411.189 621.539 5035.95 411.189 -5035.95 0.0
...
1872 3.65 3.65 176.25 -0.00215132 -0.00412886 0.00215137 0.00111754 0.00412895 -0.00111757 0.0
A section begins with a non-blank line whose first character is not a
"#"; blank lines or lines starting with "#" can be used as comments
between sections. The first line begins with a keyword which identifies
the section. The next line lists (in any order) one or more parameters
for the table. Each parameter is a keyword followed by one or more
numeric values.
The parameter "N" is required. It should be the same than the parameter
"N" of the ".3b" file, otherwise its value is overwritten. "N"
determines the number of table entries "M" that follow: "M = N * N *
(N+1)" (symmetric triplet, e.g. SiCC) or "M = 2 * N * N * N" (asymmetric
triplet, e.g. SiCSi). Therefore "M = 12 * 12 * 13 = 1872" in the above
symmetric example. The parameters "rmin" and "rmax" are also required
and determine the minimum and maximum of the inter-particle distances
:math:`r_{ij}` and :math:`r_{ik}`.
Following a blank line, the next M lines of the angular table file list
the tabulated values. On each line, the first value is the index from 1
to M, the second value is the distance :math:`r_{ij}`, the third value
is the distance :math:`r_{ik}`, the fourth value is the angle
:math:`\theta_{ijk})`, the next six values are the force constants
:math:`f_{i1}`, :math:`f_{i2}`, :math:`f_{j1}`, :math:`f_{j2}`,
:math:`f_{k1}`, and :math:`f_{k2}`, and the last value is the energy e.
Note that one three-body potential file can contain many sections, each
with a tabulated potential. LAMMPS reads the file section by section
until it finds one that matches the specified *keyword* of appropriate
section of the ".3b" file.
At the moment, only the *style* *linear* is allowed and
implemented. After reading in the force table, it is internally stored
in LAMMPS as a lookup table. For each triplet configuration occurring in
the simulation within the cutoff distance, the next nearest tabulated
triplet configuration is looked up. No interpolation is done. This
allows for a very efficient force calculation with the stored force
constants and energies. Due to the know table structure, the lookup can
be done efficiently. It has been tested (:ref:`Scherer2 <Scherer2>`)
that with a reasonably small bin size, the accuracy and speed is
comparable to that of a Stillinger-Weber potential with tabulated
three-body interactions (:doc:`pair_style sw/angle/table
<pair_sw_angle_table>`) while the table format of this pair style allows
for more flexible three-body interactions.
As for the Stillinger-Weber potential, the three-body potential file
must contain entries for all the elements listed in the pair_coeff
command. It can also contain entries for additional elements not being
used in a particular simulation; LAMMPS ignores those entries.
For a single-element simulation, only a single entry is required
(e.g. SiSiSi). For a two-element simulation, the file must contain 8
entries (for SiSiSi, SiSiC, SiCSi, SiCC, CSiSi, CSiC, CCSi, CCC), that
specify threebody parameters for all permutations of the two elements
interacting in three-body configurations. Thus for 3 elements, 27
entries would be required, etc.
As annotated above, the first element in the entry is the center atom in
a three-body interaction. Thus an entry for SiCC means a Si atom with 2
C atoms as neighbors. The tabulated three-body forces can in principle
be specific to the three elements of the configuration. However, the
user must ensure that it makes physically sense. E.g., the tabulated
three-body forces for the entries CSiC and CCSi should be the same
exchanging :math:`r_{ij}` with r_{ik}, :math:`f_{j1}` with
:math:`f_{k1}`, and :math:`f_{j2}` with :math:`f_{k2}`.
Additional input files and reference data can be found at:
https://gitlab.mpcdf.mpg.de/votca/votca/-/tree/master/csg-tutorials/ml
----------
Mixing, shift, table, tail correction, restart, rRESPA info
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
As all interactions are tabulated, no mixing is performed.
This pair style does not support the :doc:`pair_modify <pair_modify>`
shift, table, and tail options.
This pair style does not write its information to :doc:`binary restart
files <restart>`, since it is stored in potential files. Thus, you need
to re-specify the pair_style and pair_coeff commands in an input script
that reads a restart file.
This pair style can only be used via the *pair* keyword of the
:doc:`run_style respa <run_style>` command. It does not support the
*inner*, *middle*, *outer* keywords.
----------
Restrictions
""""""""""""
This pair style is part of the MANYBODY package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
This pair style requires the :doc:`newton <newton>` setting to be "on"
for pair interactions.
Related commands
""""""""""""""""
:doc:`pair_coeff <pair_coeff>`, :doc:`pair sw/angle/table <pair_sw_angle_table>`
----------
.. _Scherer2:
**(Scherer2)** C. Scherer, R. Scheid, D. Andrienko, and T. Bereau, J. Chem. Theor. Comp. 16, 3194-3204 (2020).

View File

@ -46,6 +46,20 @@ lines of output, the string can be enclosed in triple quotes, as in
the last example above. If the text string contains variables, they
will be evaluated and their current values printed.
.. note::
As discussed on the :doc:`Commands parse <Commands_parse>` doc
page, the text string can use "immediate" variables, specified as
$(formula) with parenthesis, where the numeric formula has the same
syntax as equal-style variables described on the :doc:`variable
<variable>` doc page. This is a convenient way to evaluate a
formula immediately without using the variable command to define a
named variable and then use that variable in the text string. The
formula can include a trailing colon and format string which
determines the precision with which the numeric value is output.
This is also explained on the :doc:`Commands parse
<Commands_parse>` doc page.
If the *file* or *append* keyword is used, a filename is specified to
which the output will be written. If *file* is used, then the
filename is overwritten if it already exists. If *append* is used,

View File

@ -56,7 +56,7 @@ Examples
read_data ../run7/data.polymer.gz
read_data data.protein fix mycmap crossterm CMAP
read_data data.water add append offset 3 1 1 1 1 shift 0.0 0.0 50.0
read_data data.water add merge 1 group solvent
read_data data.water add merge group solvent
Description
"""""""""""
@ -622,6 +622,8 @@ of analysis.
- atom-ID molecule-ID atom-type x y z
* - charge
- atom-ID atom-type q x y z
* - dielectric
- atom-ID atom-type q x y z normx normy normz area ed em epsilon curvature
* - dipole
- atom-ID atom-type q x y z mux muy muz
* - dpd

View File

@ -11,7 +11,6 @@ Syntax
read_restart file flag
* file = name of binary restart file to read in
* flag = remap (optional)
Examples
""""""""
@ -19,44 +18,40 @@ Examples
.. code-block:: LAMMPS
read_restart save.10000
read_restart save.10000 remap
read_restart restart.*
read_restart restart.*.mpiio
read_restart poly.*.% remap
Description
"""""""""""
Read in a previously saved system configuration from a restart file.
This allows continuation of a previous run. Details about what
information is stored (and not stored) in a restart file is given
below. Basically this operation will re-create the simulation box
with all its atoms and their attributes as well as some related global
settings, at the point in time it was written to the restart file by a
previous simulation. The simulation box will be partitioned into a
regular 3d grid of rectangular bricks, one per processor, based on the
number of processors in the current simulation and the settings of the
information is stored (and not stored) in a restart file is given below.
Basically this operation will re-create the simulation box with all its
atoms and their attributes as well as some related global settings, at
the point in time it was written to the restart file by a previous
simulation. The simulation box will be partitioned into a regular 3d
grid of rectangular bricks, one per processor, based on the number of
processors in the current simulation and the settings of the
:doc:`processors <processors>` command. The partitioning can later be
changed by the :doc:`balance <balance>` or :doc:`fix balance <fix_balance>` commands.
.. note::
Normally, restart files are written by the
:doc:`restart <restart>` or :doc:`write_restart <write_restart>` commands
so that all atoms in the restart file are inside the simulation box.
If this is not the case, the read_restart command will print an error
that atoms were "lost" when the file is read. This error should be
reported to the LAMMPS developers so the invalid writing of the
restart file can be fixed. If you still wish to use the restart file,
the optional *remap* flag can be appended to the read_restart command.
This should avoid the error, by explicitly remapping each atom back
into the simulation box, updating image flags for the atom
appropriately.
changed by the :doc:`balance <balance>` or :doc:`fix balance
<fix_balance>` commands.
Restart files are saved in binary format to enable exact restarts,
meaning that the trajectories of a restarted run will precisely match
those produced by the original run had it continued on.
The binary restart file format was not designed with backward, forward,
or cross-platform compatibility in mind, so the files are only expected
to be read correctly by the same LAMMPS executable on the same platform.
Changes to the architecture, compilation settings, or LAMMPS version can
render a restart file unreadable or it may read the data incorrectly.
If you want a more portable format, you can use the data file format as
created by the :doc:`write_data <write_data>` command. Binary restart
files can also be converted into a data file from the command line by
the LAMMPS executable that wrote them using the :ref:`-restart2data
<restart2data>` command line flag.
Several things can prevent exact restarts due to round-off effects, in
which case the trajectories in the 2 runs will slowly diverge. These
include running on a different number of processors or changing
@ -65,7 +60,8 @@ certain settings such as those set by the :doc:`newton <newton>` or
these cases.
Certain fixes will not restart exactly, though they should provide
statistically similar results. These include :doc:`fix shake <fix_shake>` and :doc:`fix langevin <fix_langevin>`.
statistically similar results. These include :doc:`fix shake
<fix_shake>` and :doc:`fix langevin <fix_langevin>`.
Certain pair styles will not restart exactly, though they should
provide statistically similar results. This is because the forces
@ -81,18 +77,19 @@ produced the restart file, it could be a LAMMPS bug, so consider
:doc:`reporting it <Errors_bugs>` if you think the behavior is a bug.
Because restart files are binary, they may not be portable to other
machines. In this case, you can use the :doc:`-restart command-line switch <Run_options>` to convert a restart file to a data file.
machines. In this case, you can use the :doc:`-restart command-line
switch <Run_options>` to convert a restart file to a data file.
Similar to how restart files are written (see the
:doc:`write_restart <write_restart>` and :doc:`restart <restart>`
commands), the restart filename can contain two wild-card characters.
If a "\*" appears in the filename, the directory is searched for all
filenames that match the pattern where "\*" is replaced with a timestep
value. The file with the largest timestep value is read in. Thus,
this effectively means, read the latest restart file. It's useful if
you want your script to continue a run from where it left off. See
the :doc:`run <run>` command and its "upto" option for how to specify
the run command so it does not need to be changed either.
Similar to how restart files are written (see the :doc:`write_restart
<write_restart>` and :doc:`restart <restart>` commands), the restart
filename can contain two wild-card characters. If a "\*" appears in the
filename, the directory is searched for all filenames that match the
pattern where "\*" is replaced with a timestep value. The file with the
largest timestep value is read in. Thus, this effectively means, read
the latest restart file. It's useful if you want your script to
continue a run from where it left off. See the :doc:`run <run>` command
and its "upto" option for how to specify the run command so it does not
need to be changed either.
If a "%" character appears in the restart filename, LAMMPS expects a
set of multiple files to exist. The :doc:`restart <restart>` and
@ -222,17 +219,17 @@ its calculations in a consistent manner.
.. note::
There are a handful of commands which can be used before or
between runs which may require a system initialization. Examples
include the "balance", "displace_atoms", "delete_atoms", "set" (some
options), and "velocity" (some options) commands. This is because
they can migrate atoms to new processors. Thus they will also discard
unused "state" information from fixes. You will know the discard has
There are a handful of commands which can be used before or between
runs which may require a system initialization. Examples include the
"balance", "displace_atoms", "delete_atoms", "set" (some options),
and "velocity" (some options) commands. This is because they can
migrate atoms to new processors. Thus they will also discard unused
"state" information from fixes. You will know the discard has
occurred because a list of discarded fixes will be printed to the
screen and log file, as explained above. This means that if you wish
to retain that info in a restarted run, you must re-specify the
relevant fixes and computes (which create fixes) before those commands
are used.
relevant fixes and computes (which create fixes) before those
commands are used.
Some pair styles, like the :doc:`granular pair styles <pair_gran>`, also
use a fix to store "state" information that persists from timestep to
@ -245,18 +242,19 @@ LAMMPS allows bond interactions (angle, etc) to be turned off or
deleted in various ways, which can affect how their info is stored in
a restart file.
If bonds (angles, etc) have been turned off by the :doc:`fix shake <fix_shake>` or :doc:`delete_bonds <delete_bonds>` command,
their info will be written to a restart file as if they are turned on.
This means they will need to be turned off again in a new run after
the restart file is read.
If bonds (angles, etc) have been turned off by the :doc:`fix shake
<fix_shake>` or :doc:`delete_bonds <delete_bonds>` command, their info
will be written to a restart file as if they are turned on. This means
they will need to be turned off again in a new run after the restart
file is read.
Bonds that are broken (e.g. by a bond-breaking potential) are written
to the restart file as broken bonds with a type of 0. Thus these
bonds will still be broken when the restart file is read.
Bonds that have been broken by the :doc:`fix bond/break <fix_bond_break>` command have disappeared from the
system. No information about these bonds is written to the restart
file.
Bonds that have been broken by the :doc:`fix bond/break
<fix_bond_break>` command have disappeared from the system. No
information about these bonds is written to the restart file.
----------

View File

@ -88,7 +88,7 @@ The Coulomb factors are applied to any Coulomb (charge interaction)
term that the potential calculates. The LJ factors are applied to the
remaining terms that the potential calculates, whether they represent
LJ interactions or not. The weighting factors are a scaling
pre-factor on the energy and force between the pair of atoms. A value
prefactor on the energy and force between the pair of atoms. A value
of 1.0 means include the full interaction; a value of 0.0 means
exclude it completely.

View File

@ -11,7 +11,7 @@ Syntax
variable name style args ...
* name = name of variable to define
* style = *delete* or *index* or *loop* or *world* or *universe* or *uloop* or *string* or *format* or *getenv* or *file* or *atomfile* or *python* or *internal* or *equal* or *vector* or *atom*
* style = *delete* or *index* or *loop* or *world* or *universe* or *uloop* or *string* or *format* or *getenv* or *file* or *atomfile* or *python* or *timer* or *internal* or *equal* or *vector* or *atom*
.. parsed-literal::
@ -42,6 +42,7 @@ Syntax
*file* arg = filename
*atomfile* arg = filename
*python* arg = function
*timer* arg = no arguments
*internal* arg = numeric value
*equal* or *vector* or *atom* args = one formula containing numbers, thermo keywords, math operations, group functions, atom values and vectors, compute/fix/variable references
numbers = 0.0, 100, -5.4, 2.8e-4, etc
@ -96,6 +97,13 @@ Examples
variable str format x %.6g
variable x delete
.. code-block:: LAMMPS
variable start timer
other commands
variable stop timer
print "Elapsed time: $(v_stop-v_start:%.6f)"
Description
"""""""""""
@ -108,32 +116,38 @@ part of a new input command. For variable styles that store multiple
strings, the :doc:`next <next>` command can be used to increment which
string is assigned to the variable. Variables of style *equal* store
a formula which when evaluated produces a single numeric value which
can be output either directly (see the :doc:`print <print>`, :doc:`fix print <fix_print>`, and :doc:`run every <run>` commands) or as part
of thermodynamic output (see the :doc:`thermo_style <thermo_style>`
command), or used as input to an averaging fix (see the :doc:`fix ave/time <fix_ave_time>` command). Variables of style *vector*
store a formula which produces a vector of such values which can be
used as input to various averaging fixes, or elements of which can be
part of thermodynamic output. Variables of style *atom* store a
formula which when evaluated produces one numeric value per atom which
can be output to a dump file (see the :doc:`dump custom <dump>` command)
or used as input to an averaging fix (see the :doc:`fix ave/chunk <fix_ave_chunk>` and :doc:`fix ave/atom <fix_ave_atom>`
commands). Variables of style *atomfile* can be used anywhere in an
input script that atom-style variables are used; they get their
per-atom values from a file rather than from a formula. Variables of
style *python* can be hooked to Python functions using code you
provide, so that the variable gets its value from the evaluation of
the Python code. Variables of style *internal* are used by a few
commands which set their value directly.
can be output either directly (see the :doc:`print <print>`, :doc:`fix
print <fix_print>`, and :doc:`run every <run>` commands) or as part of
thermodynamic output (see the :doc:`thermo_style <thermo_style>`
command), or used as input to an averaging fix (see the :doc:`fix
ave/time <fix_ave_time>` command). Variables of style *vector* store
a formula which produces a vector of such values which can be used as
input to various averaging fixes, or elements of which can be part of
thermodynamic output. Variables of style *atom* store a formula which
when evaluated produces one numeric value per atom which can be output
to a dump file (see the :doc:`dump custom <dump>` command) or used as
input to an averaging fix (see the :doc:`fix ave/chunk
<fix_ave_chunk>` and :doc:`fix ave/atom <fix_ave_atom>` commands).
Variables of style *atomfile* can be used anywhere in an input script
that atom-style variables are used; they get their per-atom values
from a file rather than from a formula. Variables of style *python*
can be hooked to Python functions using code you provide, so that the
variable gets its value from the evaluation of the Python code.
Variables of style *internal* are used by a few commands which set
their value directly.
.. note::
As discussed on the :doc:`Commands parse <Commands_parse>` doc
page, an input script can use "immediate" variables, specified as
$(formula) with parenthesis, where the formula has the same syntax as
equal-style variables described on this page. This is a convenient
way to evaluate a formula immediately without using the variable
command to define a named variable and then evaluate that
variable. See below for a more detailed discussion of this feature.
$(formula) with parenthesis, where the numeric formula has the same
syntax as equal-style variables described on this page. This is a
convenient way to evaluate a formula immediately without using the
variable command to define a named variable and then evaluate that
variable. The formula can include a trailing colon and format
string which determines the precision with which the numeric value
is generated. This is also explained on the :doc:`Commands parse
<Commands_parse>` doc page.
In the discussion that follows, the "name" of the variable is the
arbitrary string that is the first argument in the variable command.
@ -160,22 +174,19 @@ simulation.
Variables of style *equal* and *vector* and *atom* can be used as
inputs to various other commands which evaluate their formulas as
needed, e.g. at different timesteps during a :doc:`run <run>`.
needed, e.g. at different timesteps during a :doc:`run <run>`. In
this context, variables of style *timer* or *internal* or *python* can
be used in place of an equal-style variable, with the following two
caveats.
Variables of style *internal* can be used in place of an equal-style
variable, except by commands that set the value stored by the
internal-style variable. Thus any command that states it can use an
equal-style variable as an argument, can also use an internal-style
variable. This means that when the command evaluates the variable, it
will use the value set (internally) by another command.
Variables of style *python* can be used in place of an equal-style
variable so long as the associated Python function, as defined by the
:doc:`python <python>` command, returns a numeric value. Thus any
command that states it can use an equal-style variable as an argument,
can also use such a python-style variable. This means that when the
LAMMPS command evaluates the variable, the Python function will be
executed.
First, internal-style variables can be used except by commands that
set the value stored by the internal variable. When the LAMMPS
command evaluates the internal-style variable, it will use the value
set (internally) by another command. Second, python-style variables
can be used so long as the associated Python function, as defined by
the :doc:`python <python>` command, returns a numeric value. When the
LAMMPS command evaluates the python-style variable, the Python
function will be executed.
.. note::
@ -271,14 +282,15 @@ N1 <= N2 and N2 >= 0 is required.
For the *world* style, one or more strings are specified. There must
be one string for each processor partition or "world". LAMMPS can be
run with multiple partitions via the :doc:`-partition command-line switch <Run_options>`. This variable command assigns one string to
run with multiple partitions via the :doc:`-partition command-line
switch <Run_options>`. This variable command assigns one string to
each world. All processors in the world are assigned the same string.
The next command cannot be used with *equal* style variables, since
there is only one value per world. This style of variable is useful
when you wish to run different simulations on different partitions, or
when performing a parallel tempering simulation (see the
:doc:`temper <temper>` command), to assign different temperatures to
different partitions.
when performing a parallel tempering simulation (see the :doc:`temper
<temper>` command), to assign different temperatures to different
partitions.
For the *universe* style, one or more strings are specified. There
must be at least as many strings as there are processor partitions or
@ -313,11 +325,12 @@ appropriate for formatting a double-precision floating-point value.
The default format is "%.15g". This variable style allows an
equal-style variable to be formatted precisely when it is evaluated.
If you simply wish to print a variable value with desired precision to
the screen or logfile via the :doc:`print <print>` or :doc:`fix print <fix_print>` commands, you can also do this by specifying an
"immediate" variable with a trailing colon and format string, as part
of the string argument of those commands. This is explained on the
:doc:`Commands parse <Commands_parse>` doc page.
Note that if you simply wish to print a variable value with desired
precision to the screen or logfile via the :doc:`print <print>` or
:doc:`fix print <fix_print>` commands, you can also do this by
specifying an "immediate" variable with a trailing colon and format
string, as part of the string argument of those commands. This is
explained on the :doc:`Commands parse <Commands_parse>` doc page.
For the *getenv* style, a single string is assigned to the variable
which should be the name of an environment variable. When the
@ -412,14 +425,25 @@ python-style variable can be used in place of an equal-style variable
anywhere in an input script, e.g. as an argument to another command
that allows for equal-style variables.
For the *timer* style no additional argument is specified. The value of
the variable is set by querying the current elapsed wall time of the
simulation. This is done at the point in time when the variable is
defined in the input script. If a second timer-style variable is also
defined, then a simple formula can be used to calculate the elapsed time
between the two timers, as in the example at the top of this manual
entry. As mentioned above, timer-style variables can be redefined
elsewhere in the input script, so the same pair of variables can be used
in a loop or to time a series of operations.
For the *internal* style a numeric value is provided. This value will
be assigned to the variable until a LAMMPS command sets it to a new
value. There are currently only two LAMMPS commands that require
*internal* variables as inputs, because they reset them:
:doc:`create_atoms <create_atoms>` and :doc:`fix controller <fix_controller>`. As mentioned above, an
internal-style variable can be used in place of an equal-style
variable anywhere else in an input script, e.g. as an argument to
another command that allows for equal-style variables.
:doc:`create_atoms <create_atoms>` and :doc:`fix controller
<fix_controller>`. As mentioned above, an internal-style variable can
be used in place of an equal-style variable anywhere else in an input
script, e.g. as an argument to another command that allows for
equal-style variables.
----------
@ -823,15 +847,6 @@ Special Functions
Special functions take specific kinds of arguments, meaning their
arguments cannot be formulas themselves.
The is_file(name) function is a test whether *name* is a (readable) file
and returns 1 in this case, otherwise it returns 0. For that *name*
is taken as a literal string and must not have any blanks in it.
The extract_setting(name) function allows to access some basic settings
through calling the :cpp:func:`lammps_extract_setting` library function.
For available keywords *name* and their meaning, please see the
documentation of that function.
The sum(x), min(x), max(x), ave(x), trap(x), and slope(x) functions
each take 1 argument which is of the form "c_ID" or "c_ID[N]" or
"f_ID" or "f_ID[N]" or "v_name". The first two are computes and the
@ -910,6 +925,19 @@ invoked more times than there are lines or sets of lines in the file,
the variable is deleted, similar to how the :doc:`next <next>` command
operates.
The is_file(name) function is a test whether *name* is a (readable) file
and returns 1 in this case, otherwise it returns 0. For that *name*
is taken as a literal string and must not have any blanks in it.
The extract_setting(name) function enables access to basic settings for
the LAMMPS executable and the running simulation via calling the
:cpp:func:`lammps_extract_setting` library function. For example, the
number of processors (MPI ranks) being used by the simulation or the MPI
process ID (for this processor) can be queried, or the number of atom
types, bond types and so on. For the full list of available keywords
*name* and their meaning, see the documentation for extract_setting()
via the link in this paragraph.
----------
Feature Functions
@ -1383,14 +1411,15 @@ commands:
The first run is performed using one setting for the pairwise
potential defined by the :doc:`pair_style <pair_style>` and
:doc:`pair_coeff <pair_coeff>` commands. The potential energy is
evaluated on the final timestep and stored by the :doc:`compute pe <compute_pe>` compute (this is done by the
:doc:`thermo_style <thermo_style>` command). Then a pair coefficient is
changed, altering the potential energy of the system. When the
potential energy is printed via the "e" variable, LAMMPS will use the
potential energy value stored by the :doc:`compute pe <compute_pe>`
compute, thinking it is current. There are many other commands which
could alter the state of the system between runs, causing a variable
to evaluate incorrectly.
evaluated on the final timestep and stored by the :doc:`compute pe
<compute_pe>` compute (this is done by the :doc:`thermo_style
<thermo_style>` command). Then a pair coefficient is changed,
altering the potential energy of the system. When the potential
energy is printed via the "e" variable, LAMMPS will use the potential
energy value stored by the :doc:`compute pe <compute_pe>` compute,
thinking it is current. There are many other commands which could
alter the state of the system between runs, causing a variable to
evaluate incorrectly.
The solution to this issue is the same as for case (2) above, namely
perform a 0-timestep run before the variable is evaluated to insure

View File

@ -6,4 +6,3 @@ breathe
Pygments
six
pyyaml
wheel

View File

@ -94,6 +94,7 @@ amu
Amzallag
analytical
Anders
Andrienko
Andzelm
Ang
anglegrad
@ -119,6 +120,7 @@ Antonelli
api
Apoorva
Appl
apptainer
Apu
arallel
arccos
@ -239,6 +241,7 @@ benchmarking
Bennet
Berardi
Beraun
Bereau
berendsen
Berendsen
berger
@ -444,6 +447,7 @@ chris
Christoph
Chu
chunkID
chunksize
Ciccotti
Cieplak
Cii
@ -559,6 +563,7 @@ Crozier
Cryst
Crystallogr
Csanyi
csg
csh
cshrc
CSiC
@ -872,6 +877,7 @@ Eindhoven
Eisenforschung
Ejtehadi
El
el
elaplong
elastance
Electroneg
@ -1080,6 +1086,7 @@ fm
fmackay
fmag
fmass
fmatch
fmm
fmt
fmtlib
@ -1318,6 +1325,7 @@ hexatic
hexorder
Heyes
HfO
hftn
hgrid
hhmrr
Hibbs
@ -1326,6 +1334,7 @@ hiID
Hijazi
Hilger
Hinestrosa
hipFFT
histo
histogrammed
histogramming
@ -1561,6 +1570,7 @@ jpeglib
jpg
JPG
jpl
json
Jth
jtranch
jtype
@ -1695,6 +1705,7 @@ lamda
lammps
Lammps
LAMMPS
lammpsbin
lammpsplot
lammpsplugin
Lamoureux
@ -1951,6 +1962,7 @@ maxsize
maxspecial
maxSteps
maxstrain
maxtry
maxwell
Maxwellian
maxX
@ -2227,6 +2239,7 @@ Navier
nb
Nbin
Nbins
nbodies
nbody
Nbody
nbond
@ -2266,6 +2279,7 @@ nelem
Nelement
Nelements
nelems
nellipsoids
nemd
netapp
netcdf
@ -2355,7 +2369,11 @@ nopreliminary
Nord
norder
Nordlund
noremap
normals
normx
normy
normz
Noskov
noslip
noticable
@ -2399,6 +2417,7 @@ Nstep
Nsteplast
Nstop
nsub
Nsw
Nswap
nt
Nt
@ -2408,6 +2427,7 @@ nthreads
ntimestep
Ntptask
Ntriples
ntris
Ntype
ntypes
Ntypes
@ -2791,6 +2811,7 @@ quatk
quatw
queryargs
Queteschiner
quickmin
qw
qx
qy
@ -2951,6 +2972,7 @@ rnage
rng
rNEMD
ro
rocFFT
Rochus
Rockett
rocksalt
@ -3026,6 +3048,7 @@ scalexz
scaleyz
Scalfi
Schaik
Scheid
Schilfgarde
Schimansky
Schiotz
@ -3043,6 +3066,7 @@ screenshot
screenshots
Scripps
Scripta
sd
sdk
sdpd
SDPD
@ -3202,6 +3226,7 @@ statvolt
stdin
stdio
stdlib
stdout
steelblue
Stegailov
Steinbach
@ -3213,6 +3238,7 @@ Stesmans
stiffnesses
Stillinger
stk
stl
stochastically
stochasticity
Stockmayer

View File

@ -12,8 +12,8 @@
------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
University of Tennessee, Knoxville (USA), 2012
Contributing author: Karl D. Hammond <hammondkd@missouri.edu>
University of Missouri (USA), 2012
------------------------------------------------------------------------- */
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself
@ -23,6 +23,7 @@
#include <mpi.h>
#include "LAMMPS-wrapper.h"
#define LAMMPS_LIB_MPI 1
#include <library.h>
#include <lammps.h>
#include <atom.h>
@ -56,181 +57,40 @@ void lammps_error_all (void *ptr, const char *file, int line, const char *str)
int lammps_extract_compute_vectorsize (void *ptr, char *id, int style)
{
class LAMMPS *lmp = (class LAMMPS *) ptr;
int icompute = lmp->modify->find_compute(id);
if ( icompute < 0 ) return 0;
class Compute *compute = lmp->modify->compute[icompute];
if ( style == 0 )
{
if ( !compute->vector_flag )
return 0;
else
return compute->size_vector;
}
else if ( style == 1 )
{
return lammps_get_natoms (ptr);
}
else if ( style == 2 )
{
if ( !compute->local_flag )
return 0;
else
return compute->size_local_rows;
}
else
return 0;
int *size;
size = (int *) lammps_extract_compute(ptr, id, style, LMP_SIZE_VECTOR);
if (size) return *size;
return 0;
}
void lammps_extract_compute_arraysize (void *ptr, char *id, int style,
int *nrows, int *ncols)
{
class LAMMPS *lmp = (class LAMMPS *) ptr;
int icompute = lmp->modify->find_compute(id);
if ( icompute < 0 )
{
*nrows = 0;
*ncols = 0;
}
class Compute *compute = lmp->modify->compute[icompute];
if ( style == 0 )
{
if ( !compute->array_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = compute->size_array_rows;
*ncols = compute->size_array_cols;
}
}
else if ( style == 1 )
{
if ( !compute->peratom_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = lammps_get_natoms (ptr);
*ncols = compute->size_peratom_cols;
}
}
else if ( style == 2 )
{
if ( !compute->local_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = compute->size_local_rows;
*ncols = compute->size_local_cols;
}
}
else
{
*nrows = 0;
*ncols = 0;
}
int *tmp;
tmp = (int *) lammps_extract_compute(ptr, id, style, LMP_SIZE_ROWS);
if (tmp) *nrows = *tmp;
tmp = (int *) lammps_extract_compute(ptr, id, style, LMP_SIZE_COLS);
if (tmp) *ncols = *tmp;
return;
}
int lammps_extract_fix_vectorsize (void *ptr, char *id, int style)
{
class LAMMPS *lmp = (class LAMMPS *) ptr;
int ifix = lmp->modify->find_fix(id);
if ( ifix < 0 ) return 0;
class Fix *fix = lmp->modify->fix[ifix];
if ( style == 0 )
{
if ( !fix->vector_flag )
return 0;
else
return fix->size_vector;
}
else if ( style == 1 )
{
return lammps_get_natoms (ptr);
}
else if ( style == 2 )
{
if ( !fix->local_flag )
return 0;
else
return fix->size_local_rows;
}
else
return 0;
int *size;
size = (int *) lammps_extract_fix(ptr, id, style, LMP_SIZE_VECTOR, 0, 0);
if (size) return *size;
return 0;
}
void lammps_extract_fix_arraysize (void *ptr, char *id, int style,
int *nrows, int *ncols)
{
class LAMMPS *lmp = (class LAMMPS *) ptr;
int ifix = lmp->modify->find_fix(id);
if ( ifix < 0 )
{
*nrows = 0;
*ncols = 0;
}
class Fix *fix = lmp->modify->fix[ifix];
if ( style == 0 )
{
if ( !fix->array_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = fix->size_array_rows;
*ncols = fix->size_array_cols;
}
}
else if ( style == 1 )
{
if ( !fix->peratom_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = lammps_get_natoms (ptr);
*ncols = fix->size_peratom_cols;
}
}
else if ( style == 2 )
{
if ( !fix->local_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = fix->size_local_rows;
*ncols = fix->size_local_cols;
}
}
else
{
*nrows = 0;
*ncols = 0;
}
int *tmp;
tmp = (int *) lammps_extract_fix(ptr, id, style, LMP_SIZE_ROWS, 0, 0);
if (tmp) *nrows = *tmp;
tmp = (int *) lammps_extract_fix(ptr, id, style, LMP_SIZE_COLS, 0, 0);
if (tmp) *ncols = *tmp;
return;
}
/* vim: set ts=3 sts=3 expandtab: */

View File

@ -12,8 +12,8 @@
------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
University of Tennessee, Knoxville (USA), 2012
Contributing author: Karl D. Hammond <hammondkd@missouri.edu>
University of Missouri (USA), 2012
------------------------------------------------------------------------- */
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself

View File

@ -1292,7 +1292,7 @@ contains !! Wrapper functions local to this module {{{1
Cname = string2Cstring (name)
Ccount = size(data) / natoms
if ( Ccount /= 1 .and. Ccount /= 3 ) &
call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires&
call lammps_error_all (ptr, FLERR, 'lammps_scatter_atoms requires&
& count to be either 1 or 3')
Fdata = data
Cdata = C_loc (Fdata(1))
@ -1355,7 +1355,7 @@ contains !! Wrapper functions local to this module {{{1
Cname = string2Cstring (name)
Ccount = size(data) / ndata
if ( Ccount /= 1 .and. Ccount /= 3 ) &
call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires&
call lammps_error_all (ptr, FLERR, 'lammps_scatter_atoms requires&
& count to be either 1 or 3')
Fdata = data
Cdata = C_loc (Fdata(1))

View File

@ -14,7 +14,7 @@ CXXLIB = -lstdc++ # replace with your C++ runtime libs
# Flags for Fortran compiler, C++ compiler, and C preprocessor, respectively
FFLAGS = -O2 -fPIC
CXXFLAGS = -O2 -fPIC
CPPFLAGS = -DOMPI_SKIP_MPICXX=1 -DMPICH_SKIP_MPICXX -DLAMMPS_LIB_MPI
CPPFLAGS = -DOMPI_SKIP_MPICXX=1 -DMPICH_SKIP_MPICXX
all : liblammps_fortran.a liblammps_fortran.so

View File

@ -11,9 +11,8 @@ This interface was created by Karl Hammond who you can contact with
questions:
Karl D. Hammond
University of Tennessee, Knoxville
karlh at ugcs.caltech.edu
karlh at utk.edu
University of Missouri
hammondkd at missouri.edu
-------------------------------------

View File

@ -12,8 +12,8 @@
------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
University of Tennessee, Knoxville (USA), 2012
Contributing author: Karl D. Hammond <hammondkd@missouri.edu>
University of Missouri (USA), 2012
------------------------------------------------------------------------- */
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself
@ -23,6 +23,7 @@
#include <mpi.h>
#include "LAMMPS-wrapper.h"
#define LAMMPS_LIB_MPI 1
#include <library.h>
#include <lammps.h>
#include <atom.h>
@ -56,181 +57,40 @@ void lammps_error_all (void *ptr, const char *file, int line, const char *str)
int lammps_extract_compute_vectorsize (void *ptr, char *id, int style)
{
class LAMMPS *lmp = (class LAMMPS *) ptr;
int icompute = lmp->modify->find_compute(id);
if ( icompute < 0 ) return 0;
class Compute *compute = lmp->modify->compute[icompute];
if ( style == 0 )
{
if ( !compute->vector_flag )
return 0;
else
return compute->size_vector;
}
else if ( style == 1 )
{
return lammps_get_natoms (ptr);
}
else if ( style == 2 )
{
if ( !compute->local_flag )
return 0;
else
return compute->size_local_rows;
}
else
return 0;
int *size;
size = (int *) lammps_extract_compute(ptr, id, style, LMP_SIZE_VECTOR);
if (size) return *size;
return 0;
}
void lammps_extract_compute_arraysize (void *ptr, char *id, int style,
int *nrows, int *ncols)
{
class LAMMPS *lmp = (class LAMMPS *) ptr;
int icompute = lmp->modify->find_compute(id);
if ( icompute < 0 )
{
*nrows = 0;
*ncols = 0;
}
class Compute *compute = lmp->modify->compute[icompute];
if ( style == 0 )
{
if ( !compute->array_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = compute->size_array_rows;
*ncols = compute->size_array_cols;
}
}
else if ( style == 1 )
{
if ( !compute->peratom_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = lammps_get_natoms (ptr);
*ncols = compute->size_peratom_cols;
}
}
else if ( style == 2 )
{
if ( !compute->local_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = compute->size_local_rows;
*ncols = compute->size_local_cols;
}
}
else
{
*nrows = 0;
*ncols = 0;
}
int *tmp;
tmp = (int *) lammps_extract_compute(ptr, id, style, LMP_SIZE_ROWS);
if (tmp) *nrows = *tmp;
tmp = (int *) lammps_extract_compute(ptr, id, style, LMP_SIZE_COLS);
if (tmp) *ncols = *tmp;
return;
}
int lammps_extract_fix_vectorsize (void *ptr, char *id, int style)
{
class LAMMPS *lmp = (class LAMMPS *) ptr;
int ifix = lmp->modify->find_fix(id);
if ( ifix < 0 ) return 0;
class Fix *fix = lmp->modify->fix[ifix];
if ( style == 0 )
{
if ( !fix->vector_flag )
return 0;
else
return fix->size_vector;
}
else if ( style == 1 )
{
return lammps_get_natoms (ptr);
}
else if ( style == 2 )
{
if ( !fix->local_flag )
return 0;
else
return fix->size_local_rows;
}
else
return 0;
int *size;
size = (int *) lammps_extract_fix(ptr, id, style, LMP_SIZE_VECTOR, 0, 0);
if (size) return *size;
return 0;
}
void lammps_extract_fix_arraysize (void *ptr, char *id, int style,
int *nrows, int *ncols)
{
class LAMMPS *lmp = (class LAMMPS *) ptr;
int ifix = lmp->modify->find_fix(id);
if ( ifix < 0 )
{
*nrows = 0;
*ncols = 0;
}
class Fix *fix = lmp->modify->fix[ifix];
if ( style == 0 )
{
if ( !fix->array_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = fix->size_array_rows;
*ncols = fix->size_array_cols;
}
}
else if ( style == 1 )
{
if ( !fix->peratom_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = lammps_get_natoms (ptr);
*ncols = fix->size_peratom_cols;
}
}
else if ( style == 2 )
{
if ( !fix->local_flag )
{
*nrows = 0;
*ncols = 0;
}
else
{
*nrows = fix->size_local_rows;
*ncols = fix->size_local_cols;
}
}
else
{
*nrows = 0;
*ncols = 0;
}
int *tmp;
tmp = (int *) lammps_extract_fix(ptr, id, style, LMP_SIZE_ROWS, 0, 0);
if (tmp) *nrows = *tmp;
tmp = (int *) lammps_extract_fix(ptr, id, style, LMP_SIZE_COLS, 0, 0);
if (tmp) *ncols = *tmp;
return;
}
/* vim: set ts=3 sts=3 expandtab: */

View File

@ -12,8 +12,8 @@
------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
University of Tennessee, Knoxville (USA), 2012
Contributing author: Karl D. Hammond <hammondkd@missouri.edu>
University of Missouri (USA), 2012
------------------------------------------------------------------------- */
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself

View File

@ -12,8 +12,7 @@
------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
University of Tennessee, Knoxville (USA), 2012
Contributing author: Nir Goldman, LLNL <ngoldman@llnl.gov>, 2016
------------------------------------------------------------------------- */
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself

View File

@ -12,7 +12,7 @@
------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------
Contributing author: Nir Goldman, ngoldman@llnl.gov, Oct. 19th, 2016
Contributing author: Nir Goldman, LLNL <ngoldman@llnl.gov>, 2016
------------------------------------------------------------------------- */
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself

View File

@ -12,8 +12,8 @@
!--------------------------------------------------------------------------
!! ------------------------------------------------------------------------
! Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
! University of Tennessee, Knoxville (USA), 2012
! Contributing author: Karl D. Hammond <hammondkd@missouri.edu>
! University of Missouri (USA), 2012
!--------------------------------------------------------------------------
!! LAMMPS, a Fortran 2003 module containing an interface between Fortran

View File

@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import numpy as np
def reduce_Born(Cf):

View File

@ -1,7 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import numpy as np
def reduce_Born(Cf):

View File

@ -0,0 +1,37 @@
This directory shows how to use the `fix born` command
to calculate the full matrix of elastic constants
for cubic diamond at finite temperature
running the Stillinger-Weber potential.
The input script `in.elastic` can be run
directly from LAMMPS, or via a Python wrapper
script.
to run directly from LAMMPS, use:
mpirun -np 4 lmp.exe -in in.elastic
This simulates an orthorhombic box with the cubic crystal axes
aligned with x, y, and z.
The default settings replicate the 1477~K benchmark of
Kluge, Ray, and Rahman (1986) that is Ref.[15] in:
Y. Zhen, C. Chu, Computer Physics Communications 183(2012) 261-265
The script contains many adjustable parameters that can be used
to generate different crystal structures, supercell sizes,
and sampling rates.
to run via the Python wrapper, use:
mpirun -np 4 python elastic.py
This will first run the orthorhombic supercell as before,
follows by an equivalent simulation using a triclinic structure.
The script shows how the standard triclinic primitive cell for cubic diamond
can be rotated in to the LAMMPS upper triangular frame. The resultant
elastic constant matrix does not exhibit the standard symmetries of cubic crystals.
However, the matrix is then rotated back to the standard orientation
to recover the cubic symmetry form of the elastic matrix,
resulting in elastic constants that are the same for both
simulations, modulo statistical uncertainty.

View File

@ -0,0 +1,114 @@
#!/usr/bin/env python -i
# preceding line should have path for Python on your machine
# elastic.py
# Purpose: demonstrate elastic constant calculation for
# two different crystal supercells, one with non-standard orientation
#
# Syntax: elastic.py
# uses in.elastic as LAMMPS input script
from __future__ import print_function
from elastic_utils import *
np.set_printoptions(precision = 3, suppress=True)
# get MPI settings from LAMMPS
lmp = lammps()
me = lmp.extract_setting("world_rank")
nprocs = lmp.extract_setting("world_size")
# cubic diamond lattice constants
alat = 5.457
# define the cubic diamond orthorhombic supercell
# with 8 atoms
basisstring = ""
origin = np.zeros(3)
bond = np.ones(3)*0.25
b = origin
basisstring += "basis %g %g %g " % (b[0],b[1],b[2])
b = bond
basisstring += "basis %g %g %g " % (b[0],b[1],b[2])
for i in range(3):
b = 2*bond
b[i] = 0
basisstring += "basis %g %g %g " % (b[0],b[1],b[2])
b += bond
basisstring += "basis %g %g %g " % (b[0],b[1],b[2])
hmat = np.eye(3)
varlist = {
"logsuffix":"ortho",
"a":alat,
"a1x":hmat[0,0],
"a2x":hmat[0,1],
"a2y":hmat[1,1],
"a3x":hmat[0,2],
"a3y":hmat[1,2],
"a3z":hmat[2,2],
"l":alat,
"basis":basisstring,
"nlat":3,
}
cmdargs = gen_varargs(varlist)
cij_ortho = calculate_cij(cmdargs)
# define the cubic diamond triclinic primitive cell
# with 2 atoms
basisstring = ""
origin = np.zeros(3)
bond = np.ones(3)*0.25
b = origin
basisstring += "basis %g %g %g " % (b[0],b[1],b[2])
b = bond
basisstring += "basis %g %g %g " % (b[0],b[1],b[2])
hmat1 = np.array([[1, 1, 0], [0, 1, 1], [1, 0, 1]]).T/np.sqrt(2)
# rotate primitive cell to LAMMPS orientation
# (upper triangular)
qmat, rmat = np.linalg.qr(hmat1)
ss = np.diagflat(np.sign(np.diag(rmat)))
rot = ss @ qmat.T
hmat2 = ss @ rmat
varlist = {
"logsuffix":"tri",
"a":alat,
"a1x":hmat2[0,0],
"a2x":hmat2[0,1],
"a2y":hmat2[1,1],
"a3x":hmat2[0,2],
"a3y":hmat2[1,2],
"a3z":hmat2[2,2],
"l":alat/2**0.5,
"basis":basisstring,
"nlat":5,
}
cmdargs = gen_varargs(varlist)
cij_tri = calculate_cij(cmdargs)
if me == 0:
print("\nPython output:")
print("C_ortho = \n",cij_ortho)
print()
print("C_tri = \n",cij_tri)
print()
cij_tri_rot = rotate_cij(cij_tri, rot.T)
print("C_tri(rotated back) = \n",cij_tri_rot)
print()
print("C_ortho-C_tri = \n", cij_ortho-cij_tri_rot)
print()

View File

@ -0,0 +1,110 @@
import numpy as np
from lammps import lammps, LMP_VAR_EQUAL
# method for rotating elastic constants
def rotate_cij(cij, r):
# K_1
# R_11^2 R_12^2 R_13^2
# R_21^2 R_22^2 R_23^2
# R_31^2 R_32^2 R_33^2
k1 = r*r
# K_2
# R_12.R_13 R_13.R_11 R_11.R_12
# R_22.R_23 R_23.R_21 R_21.R_22
# R_32.R_33 R_33.R_31 R_31.R_32
k2 = np.array([
[r[0][1]*r[0][2], r[0][2]*r[0][0], r[0][0]*r[0][1]],
[r[1][1]*r[1][2], r[1][2]*r[1][0], r[1][0]*r[1][1]],
[r[2][1]*r[2][2], r[2][2]*r[2][0], r[2][0]*r[2][1]],
])
# K_3
# R_21.R_31 R_22.R_32 R_23.R_33
# R_31.R_11 R_32.R_12 R_33.R_13
# R_11.R_21 R_12.R_22 R_13.R_23
k3 = np.array([
[r[1][0]*r[2][0], r[1][1]*r[2][1], r[1][2]*r[2][2]],
[r[2][0]*r[0][0], r[2][1]*r[0][1], r[2][2]*r[0][2]],
[r[0][0]*r[1][0], r[0][1]*r[1][1], r[0][2]*r[1][2]],
])
# K_4a
# R_22.R_33 R_23.R_31 R_21.R_32
# R_32.R_13 R_33.R_11 R_31.R_12
# R_12.R_23 R_13.R_21 R_11.R_22
k4a = np.array([
[r[1][1]*r[2][2], r[1][2]*r[2][0], r[1][0]*r[2][1]],
[r[2][1]*r[0][2], r[2][2]*r[0][0], r[2][0]*r[0][1]],
[r[0][1]*r[1][2], r[0][2]*r[1][0], r[0][0]*r[1][1]],
])
# K_4b
# R_23.R_32 R_21.R_33 R_22.R_31
# R_33.R_12 R_31.R_13 R_32.R_11
# R_13.R_22 R_11.R_23 R_12.R_21
k4b = np.array([
[r[1][2]*r[2][1], r[1][0]*r[2][2], r[1][1]*r[2][0]],
[r[2][2]*r[0][1], r[2][0]*r[0][2], r[2][1]*r[0][0]],
[r[0][2]*r[1][1], r[0][0]*r[1][2], r[0][1]*r[1][0]],
])
k = np.block([[k1, 2*k2],[k3, k4a+k4b]])
cijrot = k.dot(cij.dot(k.T))
return cijrot
def calculate_cij(cmdargs):
lmp = lammps(cmdargs=cmdargs)
lmp.file("in.elastic")
C11 = lmp.extract_variable("C11",None, LMP_VAR_EQUAL)
C22 = lmp.extract_variable("C22",None, LMP_VAR_EQUAL)
C33 = lmp.extract_variable("C33",None, LMP_VAR_EQUAL)
C44 = lmp.extract_variable("C44",None, LMP_VAR_EQUAL)
C55 = lmp.extract_variable("C55",None, LMP_VAR_EQUAL)
C66 = lmp.extract_variable("C66",None, LMP_VAR_EQUAL)
C12 = lmp.extract_variable("C12",None, LMP_VAR_EQUAL)
C13 = lmp.extract_variable("C13",None, LMP_VAR_EQUAL)
C14 = lmp.extract_variable("C14",None, LMP_VAR_EQUAL)
C15 = lmp.extract_variable("C15",None, LMP_VAR_EQUAL)
C16 = lmp.extract_variable("C16",None, LMP_VAR_EQUAL)
C23 = lmp.extract_variable("C23",None, LMP_VAR_EQUAL)
C24 = lmp.extract_variable("C24",None, LMP_VAR_EQUAL)
C25 = lmp.extract_variable("C25",None, LMP_VAR_EQUAL)
C26 = lmp.extract_variable("C26",None, LMP_VAR_EQUAL)
C34 = lmp.extract_variable("C34",None, LMP_VAR_EQUAL)
C35 = lmp.extract_variable("C35",None, LMP_VAR_EQUAL)
C36 = lmp.extract_variable("C36",None, LMP_VAR_EQUAL)
C45 = lmp.extract_variable("C45",None, LMP_VAR_EQUAL)
C46 = lmp.extract_variable("C46",None, LMP_VAR_EQUAL)
C56 = lmp.extract_variable("C56",None, LMP_VAR_EQUAL)
cij = np.array([
[C11, C12, C13, C14, C15, C16],
[ 0, C22, C23, C24, C25, C26],
[ 0, 0, C33, C34, C35, C36],
[ 0, 0, 0, C44, C45, C46],
[ 0, 0, 0, 0, C55, C56],
[ 0, 0, 0, 0, 0, C66],
])
cij = np.triu(cij) + np.tril(cij.T, -1)
return cij
def gen_varargs(varlist):
cmdargs = []
for key in varlist:
cmdargs += ["-var",key,str(varlist[key])]
return cmdargs

View File

@ -1,13 +1,17 @@
# NOTE: This script can be modified for different atomic structures,
# units, etc. See in.elastic for more info.
#
# Define MD parameters
# These can be modified by the user
# These settings replicate the 1477~K benchmark of
# Kluge, Ray, and Rahman (1986) that is Ref.[15] in:
# Y. Zhen, C. Chu, Computer Physics Communications 183(2012) 261-265
# set log file
variable logsuffix index ortho
log log.elastic.${logsuffix}
# select temperature and pressure (lattice constant)
variable temp index 1477.0 # temperature of initial sample
@ -37,19 +41,34 @@ variable nrepeatborn equal floor(${nfreq}/${neveryborn}) # number of samples
variable nequil equal 10*${nthermo} # length of equilibration run
variable nrun equal 100*${nthermo} # length of equilibrated run
# generate the box and atom positions using a diamond lattice
# this generates a general triclinic cell
# conforming to LAMMPS cell (upper triangular)
units metal
box tilt large
boundary p p p
# unit lattice vectors are
# a1 = (a1x 0 0)
# a2 = (a2x a2y 0)
# a3 = (a3x a3y a3z)
# this generates a standard 8-atom cubic cell
variable a1x index 1
variable a2x index 0
variable a2y index 1
variable a3x index 0
variable a3y index 0
variable a3z index 1
variable atmp equal $a
variable l index $a
variable basis index "basis 0 0 0 basis 0.25 0.25 0.25 basis 0 0.5 0.5 basis 0.25 0.75 0.75 basis 0.5 0 0.5 basis 0.75 0.25 0.75 basis 0.5 0.5 0 basis 0.75 0.75 0.25"
lattice custom ${l} &
a1 ${a1x} 0 0 &
a2 ${a2x} ${a2y} 0 &
a3 ${a3x} ${a3y} ${a3z} &
${basis} &
spacing 1 1 1
lattice diamond $a
region box prism 0 1 0 1 0 1 0 0 0
# this generates a 2-atom triclinic cell
#include tri.in
region box prism 0 ${a1x} 0 ${a2y} 0 ${a3z} ${a2x} ${a3x} ${a3y}
create_box 1 box
create_atoms 1 box
@ -57,3 +76,4 @@ mass 1 ${mass1}
replicate ${nlat} ${nlat} ${nlat}
velocity all create ${temp} 87287

View File

@ -0,0 +1,662 @@
# select temperature and pressure (lattice constant)
variable temp index 1477.0 # temperature of initial sample
variable a index 5.457 # lattice constant
# select sampling parameters, important for speed/convergence
variable nthermo index 1500 # interval for thermo output
variable nevery index 10 # stress sampling interval
variable neveryborn index 100 # Born sampling interval
variable timestep index 0.000766 # timestep
variable nlat index 3 # number of lattice unit cells
# other settings
variable mass1 index 28.06 # mass
variable tdamp index 0.01 # time constant for thermostat
variable seed index 123457 # seed for thermostat
variable thermostat index 1 # 0 if NVE, 1 if NVT
variable delta index 1.0e-6 # Born numdiff strain magnitude
# hard-coded rules-of-thumb for run length, etc.
variable nfreq equal ${nthermo} # interval for averaging output
variable nfreq equal 1500
variable nrepeat equal floor(${nfreq}/${nevery}) # number of samples
variable nrepeat equal floor(1500/${nevery})
variable nrepeat equal floor(1500/10)
variable nrepeatborn equal floor(${nfreq}/${neveryborn}) # number of samples
variable nrepeatborn equal floor(1500/${neveryborn})
variable nrepeatborn equal floor(1500/100)
variable nequil equal 10*${nthermo} # length of equilibration run
variable nequil equal 10*1500
variable nrun equal 100*${nthermo} # length of equilibrated run
variable nrun equal 100*1500
# this generates a general triclinic cell
# conforming to LAMMPS cell (upper triangular)
units metal
box tilt large
# unit lattice vectors are
# a1 = (a1x 0 0)
# a2 = (a2x a2y 0)
# a3 = (a3x a3y a3z)
variable a1x index 1
variable a2x index 0
variable a2y index 1
variable a3x index 0
variable a3y index 0
variable a3z index 1
variable atmp equal $a
variable atmp equal 5.457
variable l index $a
variable l index 5.457
variable basis index "basis 0 0 0 basis 0.25 0.25 0.25 basis 0 0.5 0.5 basis 0.25 0.75 0.75 basis 0.5 0 0.5 basis 0.75 0.25 0.75 basis 0.5 0.5 0 basis 0.75 0.75 0.25"
lattice custom ${l} a1 ${a1x} 0 0 a2 ${a2x} ${a2y} 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 5.457 a1 ${a1x} 0 0 a2 ${a2x} ${a2y} 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 5.457 a1 1.0 0 0 a2 ${a2x} ${a2y} 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 5.457 a1 1.0 0 0 a2 0.0 ${a2y} 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 5.457 a1 1.0 0 0 a2 0.0 1.0 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 5.457 a1 1.0 0 0 a2 0.0 1.0 0 a3 0.0 ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 5.457 a1 1.0 0 0 a2 0.0 1.0 0 a3 0.0 0.0 ${a3z} ${basis} spacing 1 1 1
lattice custom 5.457 a1 1.0 0 0 a2 0.0 1.0 0 a3 0.0 0.0 1.0 ${basis} spacing 1 1 1
lattice custom 5.457 a1 1.0 0 0 a2 0.0 1.0 0 a3 0.0 0.0 1.0 basis 0 0 0 basis 0.25 0.25 0.25 basis 0 0.5 0.5 basis 0.25 0.75 0.75 basis 0.5 0 0.5 basis 0.75 0.25 0.75 basis 0.5 0.5 0 basis 0.75 0.75 0.25 spacing 1 1 1
Lattice spacing in x,y,z = 5.457 5.457 5.457
region box prism 0 ${a1x} 0 ${a2y} 0 ${a3z} ${a2x} ${a3x} ${a3y}
region box prism 0 1.0 0 ${a2y} 0 ${a3z} ${a2x} ${a3x} ${a3y}
region box prism 0 1.0 0 1.0 0 ${a3z} ${a2x} ${a3x} ${a3y}
region box prism 0 1.0 0 1.0 0 1.0 ${a2x} ${a3x} ${a3y}
region box prism 0 1.0 0 1.0 0 1.0 0.0 ${a3x} ${a3y}
region box prism 0 1.0 0 1.0 0 1.0 0.0 0.0 ${a3y}
region box prism 0 1.0 0 1.0 0 1.0 0.0 0.0 0.0
create_box 1 box
Created triclinic box = (0 0 0) to (5.457 5.457 5.457) with tilt (0 0 0)
1 by 2 by 2 MPI processor grid
create_atoms 1 box
Created 8 atoms
using lattice units in triclinic box = (0 0 0) to (5.457 5.457 5.457) with tilt (0 0 0)
create_atoms CPU = 0.000 seconds
mass 1 ${mass1}
mass 1 28.06
replicate ${nlat} ${nlat} ${nlat}
replicate 3 ${nlat} ${nlat}
replicate 3 3 ${nlat}
replicate 3 3 3
Replicating atoms ...
triclinic box = (0 0 0) to (16.371 16.371 16.371) with tilt (0 0 0)
1 by 2 by 2 MPI processor grid
216 atoms
replicate CPU = 0.001 seconds
velocity all create ${temp} 87287
velocity all create 1477.0 87287
# Compute initial state
include potential.in
# NOTE: This script can be modified for different pair styles
# See in.elastic for more info.
reset_timestep 0
# Choose potential
pair_style sw
pair_coeff * * Si.sw Si
Reading sw potential file Si.sw with DATE: 2007-06-11
# Setup neighbor style
neighbor 1.0 nsq
neigh_modify once no every 1 delay 0 check yes
# Setup MD
timestep ${timestep}
timestep 0.000766
fix 4 all nve
if "${thermostat} == 1" then "fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}
fix 5 all langevin 1477.0 ${temp} ${tdamp} ${seed}
fix 5 all langevin 1477.0 1477.0 ${tdamp} ${seed}
fix 5 all langevin 1477.0 1477.0 0.01 ${seed}
fix 5 all langevin 1477.0 1477.0 0.01 123457
thermo_style custom step temp pe press density
run ${nequil}
run 15000
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 4.77118
ghost atom cutoff = 4.77118
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair sw, perpetual
attributes: full, newton on
pair build: full/nsq
stencil: none
bin: none
Per MPI rank memory allocation (min/avg/max) = 3.053 | 3.053 | 3.053 Mbytes
Step Temp PotEng Press Density
0 1477 -936.42473 -4264.7155 2.2938491
15000 1409.2705 -887.74266 -595.80958 2.2938491
Loop time of 1.46866 on 4 procs for 15000 steps with 216 atoms
Performance: 675.949 ns/day, 0.036 hours/ns, 10213.420 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 1.1178 | 1.1422 | 1.167 | 1.8 | 77.77
Neigh | 0.015423 | 0.015665 | 0.015835 | 0.1 | 1.07
Comm | 0.24267 | 0.26778 | 0.2925 | 3.8 | 18.23
Output | 1.2863e-05 | 1.4971e-05 | 2.0888e-05 | 0.0 | 0.00
Modify | 0.019642 | 0.020192 | 0.020638 | 0.3 | 1.37
Other | | 0.02277 | | | 1.55
Nlocal: 54 ave 56 max 50 min
Histogram: 1 0 0 0 0 0 1 0 0 2
Nghost: 353 ave 357 max 351 min
Histogram: 2 0 0 1 0 0 0 0 0 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 1423.5 ave 1487 max 1324 min
Histogram: 1 0 0 0 0 1 0 0 0 2
Total # of neighbors = 5694
Ave neighs/atom = 26.361111
Neighbor list builds = 251
Dangerous builds = 0
# Run dynamics
include potential.in
# NOTE: This script can be modified for different pair styles
# See in.elastic for more info.
reset_timestep 0
# Choose potential
pair_style sw
pair_coeff * * Si.sw Si
Reading sw potential file Si.sw with DATE: 2007-06-11
# Setup neighbor style
neighbor 1.0 nsq
neigh_modify once no every 1 delay 0 check yes
# Setup MD
timestep ${timestep}
timestep 0.000766
fix 4 all nve
if "${thermostat} == 1" then "fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}
fix 5 all langevin 1477.0 ${temp} ${tdamp} ${seed}
fix 5 all langevin 1477.0 1477.0 ${tdamp} ${seed}
fix 5 all langevin 1477.0 1477.0 0.01 ${seed}
fix 5 all langevin 1477.0 1477.0 0.01 123457
include output.in
# Setup output
# Stress fluctuation term F
compute stress all pressure thermo_temp
variable s1 equal c_stress[1]
variable s2 equal c_stress[2]
variable s3 equal c_stress[3]
variable s4 equal c_stress[6]
variable s5 equal c_stress[5]
variable s6 equal c_stress[4]
variable s11 equal v_s1*v_s1
variable s22 equal v_s2*v_s2
variable s33 equal v_s3*v_s3
variable s44 equal v_s4*v_s4
variable s55 equal v_s5*v_s5
variable s66 equal v_s6*v_s6
variable s33 equal v_s3*v_s3
variable s12 equal v_s1*v_s2
variable s13 equal v_s1*v_s3
variable s14 equal v_s1*v_s4
variable s15 equal v_s1*v_s5
variable s16 equal v_s1*v_s6
variable s23 equal v_s2*v_s3
variable s24 equal v_s2*v_s4
variable s25 equal v_s2*v_s5
variable s26 equal v_s2*v_s6
variable s34 equal v_s3*v_s4
variable s35 equal v_s3*v_s5
variable s36 equal v_s3*v_s6
variable s45 equal v_s4*v_s5
variable s46 equal v_s4*v_s6
variable s56 equal v_s5*v_s6
variable mytemp equal temp
variable mypress equal press
variable mype equal pe/atoms
fix avt all ave/time ${nevery} ${nrepeat} ${nfreq} v_mytemp ave running
fix avt all ave/time 10 ${nrepeat} ${nfreq} v_mytemp ave running
fix avt all ave/time 10 150 ${nfreq} v_mytemp ave running
fix avt all ave/time 10 150 1500 v_mytemp ave running
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} v_mypress ave running
fix avp all ave/time 10 ${nrepeat} ${nfreq} v_mypress ave running
fix avp all ave/time 10 150 ${nfreq} v_mypress ave running
fix avp all ave/time 10 150 1500 v_mypress ave running
fix avpe all ave/time ${nevery} ${nrepeat} ${nfreq} v_mype ave running
fix avpe all ave/time 10 ${nrepeat} ${nfreq} v_mype ave running
fix avpe all ave/time 10 150 ${nfreq} v_mype ave running
fix avpe all ave/time 10 150 1500 v_mype ave running
fix avs all ave/time ${nevery} ${nrepeat} ${nfreq} v_s1 v_s2 v_s3 v_s4 v_s5 v_s6 ave running
fix avs all ave/time 10 ${nrepeat} ${nfreq} v_s1 v_s2 v_s3 v_s4 v_s5 v_s6 ave running
fix avs all ave/time 10 150 ${nfreq} v_s1 v_s2 v_s3 v_s4 v_s5 v_s6 ave running
fix avs all ave/time 10 150 1500 v_s1 v_s2 v_s3 v_s4 v_s5 v_s6 ave running
fix avssq all ave/time ${nevery} ${nrepeat} ${nfreq} v_s11 v_s22 v_s33 v_s44 v_s55 v_s66 v_s12 v_s13 v_s14 v_s15 v_s16 v_s23 v_s24 v_s25 v_s26 v_s34 v_s35 v_s36 v_s45 v_s46 v_s56 ave running
fix avssq all ave/time 10 ${nrepeat} ${nfreq} v_s11 v_s22 v_s33 v_s44 v_s55 v_s66 v_s12 v_s13 v_s14 v_s15 v_s16 v_s23 v_s24 v_s25 v_s26 v_s34 v_s35 v_s36 v_s45 v_s46 v_s56 ave running
fix avssq all ave/time 10 150 ${nfreq} v_s11 v_s22 v_s33 v_s44 v_s55 v_s66 v_s12 v_s13 v_s14 v_s15 v_s16 v_s23 v_s24 v_s25 v_s26 v_s34 v_s35 v_s36 v_s45 v_s46 v_s56 ave running
fix avssq all ave/time 10 150 1500 v_s11 v_s22 v_s33 v_s44 v_s55 v_s66 v_s12 v_s13 v_s14 v_s15 v_s16 v_s23 v_s24 v_s25 v_s26 v_s34 v_s35 v_s36 v_s45 v_s46 v_s56 ave running
# bar to GPa
variable pconv equal 1.0e5/1.0e9
variable cunits index GPa
# metal unit constants from LAMMPS
# force->nktv2p = 1.6021765e6;
# force->boltz = 8.617343e-5;
variable boltz equal 8.617343e-5
variable nktv2p equal 1.6021765e6
variable vkt equal vol/(${boltz}*${temp})/${nktv2p}
variable vkt equal vol/(8.617343e-05*${temp})/${nktv2p}
variable vkt equal vol/(8.617343e-05*1477.0)/${nktv2p}
variable vkt equal vol/(8.617343e-05*1477.0)/1602176.5
variable ffac equal ${pconv}*${vkt}
variable ffac equal 0.0001*${vkt}
variable ffac equal 0.0001*0.0215159929384811
variable F11 equal -(f_avssq[1]-f_avs[1]*f_avs[1])*${ffac}
variable F11 equal -(f_avssq[1]-f_avs[1]*f_avs[1])*2.15159929384811e-06
variable F22 equal -(f_avssq[2]-f_avs[2]*f_avs[2])*${ffac}
variable F22 equal -(f_avssq[2]-f_avs[2]*f_avs[2])*2.15159929384811e-06
variable F33 equal -(f_avssq[3]-f_avs[3]*f_avs[3])*${ffac}
variable F33 equal -(f_avssq[3]-f_avs[3]*f_avs[3])*2.15159929384811e-06
variable F44 equal -(f_avssq[4]-f_avs[4]*f_avs[4])*${ffac}
variable F44 equal -(f_avssq[4]-f_avs[4]*f_avs[4])*2.15159929384811e-06
variable F55 equal -(f_avssq[5]-f_avs[5]*f_avs[5])*${ffac}
variable F55 equal -(f_avssq[5]-f_avs[5]*f_avs[5])*2.15159929384811e-06
variable F66 equal -(f_avssq[6]-f_avs[6]*f_avs[6])*${ffac}
variable F66 equal -(f_avssq[6]-f_avs[6]*f_avs[6])*2.15159929384811e-06
variable F12 equal -(f_avssq[7]-f_avs[1]*f_avs[2])*${ffac}
variable F12 equal -(f_avssq[7]-f_avs[1]*f_avs[2])*2.15159929384811e-06
variable F13 equal -(f_avssq[8]-f_avs[1]*f_avs[3])*${ffac}
variable F13 equal -(f_avssq[8]-f_avs[1]*f_avs[3])*2.15159929384811e-06
variable F14 equal -(f_avssq[9]-f_avs[1]*f_avs[4])*${ffac}
variable F14 equal -(f_avssq[9]-f_avs[1]*f_avs[4])*2.15159929384811e-06
variable F15 equal -(f_avssq[10]-f_avs[1]*f_avs[5])*${ffac}
variable F15 equal -(f_avssq[10]-f_avs[1]*f_avs[5])*2.15159929384811e-06
variable F16 equal -(f_avssq[11]-f_avs[1]*f_avs[6])*${ffac}
variable F16 equal -(f_avssq[11]-f_avs[1]*f_avs[6])*2.15159929384811e-06
variable F23 equal -(f_avssq[12]-f_avs[2]*f_avs[3])*${ffac}
variable F23 equal -(f_avssq[12]-f_avs[2]*f_avs[3])*2.15159929384811e-06
variable F24 equal -(f_avssq[13]-f_avs[2]*f_avs[4])*${ffac}
variable F24 equal -(f_avssq[13]-f_avs[2]*f_avs[4])*2.15159929384811e-06
variable F25 equal -(f_avssq[14]-f_avs[2]*f_avs[5])*${ffac}
variable F25 equal -(f_avssq[14]-f_avs[2]*f_avs[5])*2.15159929384811e-06
variable F26 equal -(f_avssq[15]-f_avs[2]*f_avs[6])*${ffac}
variable F26 equal -(f_avssq[15]-f_avs[2]*f_avs[6])*2.15159929384811e-06
variable F34 equal -(f_avssq[16]-f_avs[3]*f_avs[4])*${ffac}
variable F34 equal -(f_avssq[16]-f_avs[3]*f_avs[4])*2.15159929384811e-06
variable F35 equal -(f_avssq[17]-f_avs[3]*f_avs[5])*${ffac}
variable F35 equal -(f_avssq[17]-f_avs[3]*f_avs[5])*2.15159929384811e-06
variable F36 equal -(f_avssq[18]-f_avs[3]*f_avs[6])*${ffac}
variable F36 equal -(f_avssq[18]-f_avs[3]*f_avs[6])*2.15159929384811e-06
variable F45 equal -(f_avssq[19]-f_avs[4]*f_avs[5])*${ffac}
variable F45 equal -(f_avssq[19]-f_avs[4]*f_avs[5])*2.15159929384811e-06
variable F46 equal -(f_avssq[20]-f_avs[4]*f_avs[6])*${ffac}
variable F46 equal -(f_avssq[20]-f_avs[4]*f_avs[6])*2.15159929384811e-06
variable F56 equal -(f_avssq[21]-f_avs[5]*f_avs[6])*${ffac}
variable F56 equal -(f_avssq[21]-f_avs[5]*f_avs[6])*2.15159929384811e-06
# Born term
compute virial all pressure NULL virial
compute born all born/matrix numdiff ${delta} virial
compute born all born/matrix numdiff 1.0e-6 virial
fix avborn all ave/time ${neveryborn} ${nrepeatborn} ${nfreq} c_born[*] ave running
fix avborn all ave/time 100 ${nrepeatborn} ${nfreq} c_born[*] ave running
fix avborn all ave/time 100 15 ${nfreq} c_born[*] ave running
fix avborn all ave/time 100 15 1500 c_born[*] ave running
variable bfac equal ${pconv}*${nktv2p}/vol
variable bfac equal 0.0001*${nktv2p}/vol
variable bfac equal 0.0001*1602176.5/vol
variable B vector f_avborn*${bfac}
variable B vector f_avborn*0.036516128938577
# Kinetic term
variable kfac equal ${pconv}*${nktv2p}*atoms*${boltz}*${temp}/vol
variable kfac equal 0.0001*${nktv2p}*atoms*${boltz}*${temp}/vol
variable kfac equal 0.0001*1602176.5*atoms*${boltz}*${temp}/vol
variable kfac equal 0.0001*1602176.5*atoms*8.617343e-05*${temp}/vol
variable kfac equal 0.0001*1602176.5*atoms*8.617343e-05*1477.0/vol
variable K11 equal 4.0*${kfac}
variable K11 equal 4.0*1.00390440086865
variable K22 equal 4.0*${kfac}
variable K22 equal 4.0*1.00390440086865
variable K33 equal 4.0*${kfac}
variable K33 equal 4.0*1.00390440086865
variable K44 equal 2.0*${kfac}
variable K44 equal 2.0*1.00390440086865
variable K55 equal 2.0*${kfac}
variable K55 equal 2.0*1.00390440086865
variable K66 equal 2.0*${kfac}
variable K66 equal 2.0*1.00390440086865
# Add F, K, and B together
variable C11 equal v_F11+v_B[1]+v_K11
variable C22 equal v_F22+v_B[2]+v_K22
variable C33 equal v_F33+v_B[3]+v_K33
variable C44 equal v_F44+v_B[4]+v_K44
variable C55 equal v_F55+v_B[5]+v_K55
variable C66 equal v_F66+v_B[6]+v_K66
variable C12 equal v_F12+v_B[7]
variable C13 equal v_F13+v_B[8]
variable C14 equal v_F14+v_B[9]
variable C15 equal v_F15+v_B[10]
variable C16 equal v_F16+v_B[11]
variable C23 equal v_F23+v_B[12]
variable C24 equal v_F24+v_B[13]
variable C25 equal v_F25+v_B[14]
variable C26 equal v_F26+v_B[15]
variable C34 equal v_F34+v_B[16]
variable C35 equal v_F35+v_B[17]
variable C36 equal v_F36+v_B[18]
variable C45 equal v_F45+v_B[19]
variable C46 equal v_F46+v_B[20]
variable C56 equal v_F56+v_B[21]
thermo ${nthermo}
thermo 1500
thermo_style custom step temp pe press density f_avt f_avp f_avpe v_F11 v_F22 v_F33 v_F44 v_F55 v_F66 v_F12 v_F13 v_F23 v_B[*8] v_B[12]
thermo_modify norm no
run ${nrun}
run 150000
Per MPI rank memory allocation (min/avg/max) = 3.803 | 3.803 | 3.803 Mbytes
Step Temp PotEng Press Density f_avt f_avp f_avpe v_F11 v_F22 v_F33 v_F44 v_F55 v_F66 v_F12 v_F13 v_F23 v_B[1] v_B[2] v_B[3] v_B[4] v_B[5] v_B[6] v_B[7] v_B[8] v_B[12]
0 1409.2705 -887.74266 -595.80958 2.2938491 0 0 0 -0 -0 -0 -0 -0 -0 -0 -0 -0 0 0 0 0 0 0 0 0 0
1500 1543.955 -894.59564 829.29754 2.2938491 1479.8455 -272.48983 -4.1286994 -9.8546328 -7.6109829 -6.9399455 -42.917041 -50.311599 -54.999307 -2.1718852 -0.37897892 0.021065401 136.52661 136.57057 136.8112 99.817258 99.81304 99.70618 74.718855 74.984867 74.922489
3000 1533.4697 -891.05441 1291.5832 2.2938491 1482.4036 -135.16653 -4.130281 -8.5756153 -7.6746515 -7.0427547 -50.764257 -49.209172 -60.778328 -1.3700831 -0.4568356 0.20721573 136.58667 136.70561 136.69409 99.903478 99.76887 99.847801 74.700603 74.769035 74.913031
4500 1559.2333 -895.95898 -169.5185 2.2938491 1481.5554 110.86891 -4.1325482 -8.0338125 -7.6953586 -7.3762168 -53.430221 -48.29504 -54.657257 -1.3016296 -1.0260182 -0.045906996 136.84569 136.91821 136.90927 100.0598 99.901964 100.07314 74.813284 74.723978 74.90986
6000 1417.6434 -891.85991 84.448937 2.2938491 1480.5364 -26.042555 -4.130823 -8.2176554 -7.6691593 -7.5195046 -54.897719 -45.58593 -53.146497 -1.1159385 -0.4148108 -0.34277881 136.73272 136.74579 136.70656 99.899987 99.788575 99.91922 74.858104 74.751356 74.877807
7500 1521.8549 -890.45085 -1986.131 2.2938491 1478.7883 -63.188659 -4.131248 -7.9884217 -7.5621903 -7.6827376 -53.505647 -51.167165 -54.069643 -1.0788226 -0.72907125 -0.40595255 136.65015 136.58541 136.66316 99.849936 99.770641 99.833465 74.762105 74.749673 74.793725
9000 1481.1098 -893.58876 -302.11196 2.2938491 1480.8996 -86.706608 -4.1308352 -7.8504102 -7.4016325 -7.7875364 -52.129057 -50.748636 -55.590171 -1.0423024 -1.0411667 -0.42332136 136.61748 136.54744 136.63721 99.806859 99.750078 99.824904 74.793868 74.742871 74.75755
10500 1602.1539 -891.59953 -120.50983 2.2938491 1481.8078 -58.72234 -4.1309965 -7.979615 -7.4378227 -7.6187667 -51.499039 -50.360191 -52.483908 -0.79006562 -0.97184735 -0.42288111 136.62376 136.57134 136.65198 99.809774 99.788741 99.818781 74.780283 74.754346 74.752685
12000 1419.1584 -891.48511 -357.00507 2.2938491 1482.0565 -52.541967 -4.1307476 -7.8017302 -7.3965439 -7.5326968 -51.907957 -50.643325 -53.453282 -0.84401937 -1.0517326 -0.54021711 136.58968 136.54882 136.65563 99.810907 99.792391 99.770152 74.770444 74.788526 74.767629
13500 1349.3981 -893.65888 15.31558 2.2938491 1481.1263 -55.35676 -4.1307105 -7.5797633 -7.3093859 -7.5484467 -52.298219 -49.804373 -54.555982 -0.8242492 -1.0633311 -0.58879705 136.59553 136.58666 136.66121 99.806084 99.807326 99.79773 74.783157 74.799104 74.776677
15000 1572.7545 -888.05032 -1167.1259 2.2938491 1481.1845 -44.051939 -4.1307308 -7.4870604 -7.3959358 -7.7984973 -53.846519 -49.850023 -54.449806 -0.80437631 -0.98162577 -0.67631044 136.6089 136.60586 136.63322 99.804941 99.816756 99.807316 74.799246 74.79994 74.774964
16500 1476.3559 -894.13606 -141.71585 2.2938491 1481.9977 -57.149347 -4.1305532 -7.3563308 -7.7377027 -7.7801895 -55.418093 -50.432917 -55.092322 -0.75882435 -0.91155917 -0.8012947 136.60588 136.59648 136.64052 99.783788 99.813543 99.811844 74.796195 74.795566 74.759748
18000 1385.3464 -894.17196 -453.51135 2.2938491 1482.2841 -41.202526 -4.1305936 -7.4001985 -7.9100844 -7.7977726 -55.828868 -51.190641 -56.146338 -0.80951377 -0.88498405 -0.95870035 136.60877 136.58913 136.64391 99.807809 99.807278 99.804971 74.795414 74.787039 74.770228
19500 1459.0464 -891.56293 -583.43289 2.2938491 1481.6087 -80.19681 -4.1305727 -7.503849 -7.832224 -8.0680015 -55.621765 -52.943951 -55.834411 -0.84395931 -0.92355108 -1.0598691 136.57225 136.54527 136.59315 99.781928 99.757893 99.808931 74.802468 74.747248 74.742414
21000 1425.7724 -893.96346 -2476.1354 2.2938491 1480.7898 -80.510469 -4.1307098 -7.5517651 -7.7540688 -8.1263923 -55.676836 -51.985142 -57.190698 -0.79979707 -0.82062764 -0.96974038 136.62238 136.56316 136.58301 99.770462 99.774612 99.833221 74.817335 74.767434 74.729171
22500 1478.3908 -893.03263 356.73894 2.2938491 1481.8216 -56.608103 -4.1307548 -7.5171851 -7.7473191 -8.1531481 -55.174277 -52.991179 -56.943478 -0.83236889 -0.86233325 -0.84237825 136.63109 136.54755 136.58015 99.768999 99.789091 99.834769 74.805682 74.762367 74.709251
24000 1559.2834 -895.0061 408.35518 2.2938491 1481.7034 -50.365601 -4.1310012 -7.4371076 -7.6686437 -8.0973363 -55.391365 -53.957438 -56.758804 -0.75624259 -0.7712068 -0.79151732 136.63369 136.569 136.62933 99.801995 99.811857 99.834171 74.784642 74.764728 74.726548
25500 1418.8679 -900.05172 1038.8634 2.2938491 1481.7117 -34.795555 -4.1311417 -7.3525995 -7.6549985 -8.0932453 -55.209186 -54.850159 -56.555154 -0.76945854 -0.80520239 -0.87729866 136.65191 136.56496 136.6234 99.797985 99.83181 99.845733 74.777288 74.761405 74.70467
27000 1337.6729 -892.54371 -1223.1078 2.2938491 1481.7999 -6.868253 -4.1314105 -7.4344069 -7.670465 -8.0748588 -55.642919 -54.694351 -56.043818 -0.84229089 -0.85050448 -0.8848331 136.69353 136.58737 136.65353 99.816588 99.854571 99.87065 74.779124 74.767968 74.713918
28500 1428.3391 -890.39992 1637.2396 2.2938491 1481.456 -5.7648513 -4.1315226 -7.401319 -7.6104928 -8.0522046 -55.924803 -54.963031 -55.354755 -0.80198132 -0.78513105 -0.89948604 136.66669 136.57056 136.6591 99.824707 99.851902 99.853954 74.769147 74.764532 74.720065
30000 1610.749 -892.10736 579.88182 2.2938491 1480.9008 6.256216 -4.1316122 -7.4537451 -7.5486694 -7.9515037 -56.204342 -55.065875 -55.139775 -0.83945753 -0.80897524 -0.84944598 136.67155 136.59361 136.64942 99.830699 99.848762 99.869963 74.777778 74.755753 74.718528
31500 1424.0387 -892.82589 -1088.8668 2.2938491 1480.8612 27.560648 -4.1318123 -7.4239872 -7.5434979 -7.8962752 -56.813306 -55.891849 -55.592699 -0.90786211 -0.78634826 -0.89364109 136.67764 136.59992 136.66244 99.844569 99.867062 99.872844 74.758315 74.7448 74.710189
33000 1608.6242 -892.4438 2546.9882 2.2938491 1481.6562 47.051547 -4.1316992 -7.4646486 -7.5038235 -7.8961468 -57.865394 -55.375621 -56.027867 -0.8910679 -0.84053561 -0.89582173 136.68768 136.59732 136.67152 99.846034 99.880097 99.867468 74.752249 74.751739 74.710642
34500 1459.0403 -892.25499 551.36057 2.2938491 1482.1308 44.660322 -4.1317055 -7.4352078 -7.5237108 -7.8649773 -58.468947 -55.357512 -55.779494 -0.84115908 -0.77476537 -0.87458546 136.66595 136.59551 136.65084 99.839323 99.866733 99.8611 74.741493 74.738738 74.709871
36000 1421.5526 -896.28506 -29.316911 2.2938491 1481.789 47.541032 -4.1318408 -7.3733107 -7.5190295 -7.8143454 -57.929804 -55.418333 -55.785571 -0.83611043 -0.73869976 -0.86057781 136.67194 136.61145 136.66484 99.85524 99.874475 99.868689 74.735031 74.73536 74.716839
37500 1420.8916 -891.82782 -124.77618 2.2938491 1481.4989 50.677557 -4.1319034 -7.351484 -7.4418106 -7.8130188 -57.428955 -55.290755 -55.728856 -0.79501628 -0.76420281 -0.87517695 136.6581 136.61188 136.65931 99.8659 99.870608 99.861288 74.723088 74.734658 74.717
39000 1419.8533 -891.85187 775.65186 2.2938491 1481.3759 61.485208 -4.1320474 -7.3143703 -7.3968445 -7.781877 -57.264431 -55.699481 -55.805103 -0.76748846 -0.78919404 -0.83311458 136.66482 136.61272 136.64292 99.859449 99.871369 99.879933 74.724309 74.716924 74.690243
40500 1618.5121 -891.22453 478.34407 2.2938491 1481.7031 51.968148 -4.1319722 -7.2819086 -7.5511556 -7.7257743 -57.306557 -55.743925 -56.312823 -0.83338334 -0.78815013 -0.80988519 136.65567 136.58905 136.64007 99.843268 99.870939 99.865104 74.716829 74.725634 74.69278
42000 1532.044 -890.39164 1505.0844 2.2938491 1482.0334 59.439461 -4.1318795 -7.2758088 -7.601243 -7.6989373 -57.29647 -55.736173 -55.983442 -0.84537078 -0.77684239 -0.7910269 136.65858 136.5908 136.64401 99.845607 99.869513 99.867281 74.724164 74.732279 74.699567
43500 1390.2967 -890.21856 1078.0917 2.2938491 1482.3754 56.694555 -4.1317225 -7.2485872 -7.568553 -7.7195095 -57.819566 -55.528042 -55.848214 -0.82149712 -0.82258095 -0.75292757 136.66772 136.57379 136.65372 99.83762 99.882723 99.854263 74.72191 74.747558 74.704137
45000 1427.5782 -892.18995 -564.57357 2.2938491 1482.0054 64.751105 -4.1319259 -7.2234655 -7.5860705 -7.6146702 -57.745852 -56.095471 -55.618665 -0.77244466 -0.77811125 -0.75729958 136.66838 136.59611 136.6615 99.853922 99.886483 99.864469 74.715773 74.736269 74.702744
46500 1457.907 -890.87371 1296.2125 2.2938491 1481.9658 74.963993 -4.1319725 -7.2288448 -7.5807903 -7.6640053 -57.821382 -55.848166 -55.521503 -0.80230061 -0.78832769 -0.77589289 136.69039 136.61343 136.68259 99.862454 99.896917 99.881487 74.726406 74.741295 74.710053
48000 1526.0771 -895.53336 951.53234 2.2938491 1481.7295 84.065637 -4.1320813 -7.2137393 -7.545201 -7.6839878 -57.914627 -55.591336 -55.900718 -0.79496608 -0.78179316 -0.79496022 136.6987 136.62461 136.70778 99.879775 99.908913 99.883958 74.71782 74.746229 74.714358
49500 1657.943 -890.09268 424.53616 2.2938491 1481.5972 95.06808 -4.1322261 -7.2312162 -7.5609924 -7.6933969 -58.460164 -55.614895 -55.68435 -0.7539777 -0.78036417 -0.84398343 136.70672 136.6326 136.70523 99.887231 99.910615 99.890981 74.711921 74.735306 74.70572
51000 1517.8791 -894.6926 1412.5634 2.2938491 1481.8411 91.241557 -4.1321301 -7.2856849 -7.554417 -7.6852066 -58.824904 -55.906732 -55.722124 -0.72652169 -0.74459334 -0.824857 136.70149 136.63447 136.70155 99.892122 99.901377 99.890263 74.713234 74.73149 74.710717
52500 1546.6245 -895.29958 181.50897 2.2938491 1482.1091 82.209025 -4.132121 -7.2711566 -7.5656939 -7.6600316 -58.75721 -55.971266 -55.724274 -0.72068642 -0.74174146 -0.81673789 136.68292 136.62513 136.69226 99.883717 99.900635 99.877994 74.704983 74.724386 74.708085
54000 1432.5143 -892.33522 -1007.7153 2.2938491 1481.7799 82.064986 -4.1320527 -7.2297435 -7.5532463 -7.5873553 -58.769531 -56.753962 -55.320358 -0.69093494 -0.71376103 -0.8266532 136.66681 136.62772 136.68861 99.880916 99.890283 99.87535 74.709314 74.72301 74.713722
55500 1525.2554 -890.36734 1294.5154 2.2938491 1481.5565 85.222591 -4.1321435 -7.2322453 -7.5028572 -7.5979369 -58.470473 -56.91003 -54.983461 -0.67325171 -0.68237059 -0.82452296 136.68218 136.64126 136.71384 99.888262 99.903988 99.885655 74.709774 74.736014 74.716975
57000 1480.851 -891.41709 -148.33291 2.2938491 1481.401 80.316901 -4.1321436 -7.262647 -7.5256821 -7.6034232 -58.185727 -56.55166 -54.966948 -0.69905198 -0.64380996 -0.84814546 136.677 136.64844 136.7165 99.891933 99.904202 99.884534 74.70914 74.736681 74.716403
58500 1546.9102 -892.66057 1089.3405 2.2938491 1481.4299 78.801721 -4.1321113 -7.276498 -7.5191946 -7.617463 -58.32857 -56.257777 -54.959089 -0.67949464 -0.65491266 -0.85310199 136.67479 136.64503 136.70605 99.885427 99.899987 99.884663 74.714168 74.737379 74.714314
60000 1485.6648 -893.08278 -428.03608 2.2938491 1481.7631 79.689946 -4.1321441 -7.2552452 -7.5131486 -7.57811 -58.354213 -56.020669 -55.063017 -0.69757949 -0.6589713 -0.84658488 136.67189 136.63503 136.69828 99.877882 99.900844 99.87896 74.707924 74.735972 74.703597
61500 1495.0662 -890.78023 1028.7889 2.2938491 1481.9678 75.884372 -4.1320422 -7.2080989 -7.5371914 -7.5381901 -58.053737 -56.190462 -55.148238 -0.69885347 -0.63670212 -0.87555185 136.65839 136.62158 136.68603 99.869396 99.894708 99.868716 74.704861 74.735992 74.700569
63000 1409.6818 -887.95961 -1304.652 2.2938491 1482.3126 76.410022 -4.1319825 -7.2523905 -7.5152373 -7.5536513 -58.73159 -56.137578 -54.799791 -0.73461753 -0.67809249 -0.88492027 136.65593 136.62329 136.67831 99.868652 99.888176 99.869266 74.703693 74.730048 74.701284
64500 1582.31 -895.49087 1119.2594 2.2938491 1482.1186 66.626242 -4.1320087 -7.2521942 -7.5234826 -7.5594736 -58.305867 -56.601233 -54.537783 -0.7563263 -0.68942681 -0.89444015 136.64507 136.61842 136.66703 99.860683 99.882098 99.86589 74.702368 74.723763 74.693042
66000 1468.6429 -891.90582 -773.99786 2.2938491 1482.414 56.160228 -4.1318961 -7.2436172 -7.5080588 -7.5819411 -57.982694 -56.370777 -54.739699 -0.75092608 -0.69652428 -0.90242579 136.62154 136.60352 136.65359 99.85017 99.872559 99.849715 74.698926 74.716783 74.691294
67500 1592.9841 -894.17166 -373.28608 2.2938491 1482.4608 66.22665 -4.1319088 -7.2020048 -7.5343208 -7.6502267 -57.737091 -56.058804 -54.410576 -0.74973866 -0.71379313 -0.92874192 136.61811 136.60579 136.64811 99.851858 99.868577 99.85379 74.695471 74.703568 74.688361
69000 1451.6708 -892.24332 -42.454938 2.2938491 1482.3952 64.462379 -4.1318409 -7.2084429 -7.5095889 -7.6621307 -58.007656 -55.977537 -54.39909 -0.74311576 -0.67139652 -0.91195038 136.63393 136.60861 136.63564 99.845601 99.865271 99.865085 74.704656 74.707684 74.682318
70500 1541.8751 -890.84273 603.87446 2.2938491 1482.1352 69.651346 -4.1319184 -7.1867148 -7.4795063 -7.6774435 -57.597661 -55.972955 -54.365809 -0.72507444 -0.63500349 -0.909513 136.63512 136.60177 136.63362 99.845987 99.867527 99.865623 74.698143 74.701585 74.674848
72000 1469.8975 -890.17779 -712.95338 2.2938491 1482.2905 73.091503 -4.1319489 -7.1766057 -7.4591194 -7.660856 -57.657616 -55.981892 -54.095734 -0.71782602 -0.61875736 -0.91469335 136.63573 136.60382 136.63383 99.845901 99.869082 99.866108 74.699376 74.701787 74.672946
73500 1571.7762 -894.46891 1835.3759 2.2938491 1482.42 84.062922 -4.1319557 -7.2310516 -7.4816168 -7.6691216 -57.820079 -55.90879 -54.134789 -0.73871067 -0.64971193 -0.93750027 136.63865 136.60893 136.64184 99.848872 99.876734 99.869374 74.696526 74.703769 74.671271
75000 1668.0665 -889.10379 319.58734 2.2938491 1482.5795 91.590228 -4.1319353 -7.2136142 -7.4546526 -7.6863632 -57.99287 -55.973671 -54.462176 -0.7272861 -0.64541622 -0.9505418 136.64301 136.61457 136.65062 99.855439 99.877747 99.869599 74.701819 74.706548 74.682155
76500 1660.1105 -891.61038 2128.1078 2.2938491 1482.4578 91.208675 -4.1318581 -7.2797412 -7.5002006 -7.6971338 -58.256724 -55.882133 -54.72244 -0.74105804 -0.65844257 -0.98078027 136.64403 136.6142 136.65487 99.855009 99.878188 99.868938 74.703354 74.70937 74.68632
78000 1551.7441 -890.77214 -121.70935 2.2938491 1482.3519 85.597023 -4.1317377 -7.2689985 -7.4957494 -7.7185745 -58.313372 -56.092493 -54.841116 -0.75183521 -0.65377647 -0.97014055 136.62932 136.61045 136.63974 99.849688 99.867005 99.861641 74.698504 74.705574 74.688265
79500 1451.11 -892.82037 -632.95505 2.2938491 1482.3476 87.575027 -4.1317651 -7.2403953 -7.4775336 -7.6689122 -58.32666 -56.035227 -54.817357 -0.72487208 -0.63508667 -0.96802939 136.62952 136.60836 136.63433 99.846727 99.865255 99.865022 74.698105 74.698515 74.685562
81000 1497.4722 -891.00907 -173.43837 2.2938491 1482.3832 86.788447 -4.1317009 -7.270206 -7.4485143 -7.6702474 -58.081079 -55.896158 -54.762508 -0.72740498 -0.65433219 -0.95969011 136.62378 136.60331 136.63421 99.844906 99.86253 99.858317 74.695022 74.698559 74.689157
82500 1555.7129 -892.58366 1904.2361 2.2938491 1482.3558 93.090261 -4.1317057 -7.2690799 -7.4631718 -7.7113864 -58.043005 -56.089191 -54.702244 -0.74777178 -0.68581389 -1.0039008 136.62292 136.59848 136.6349 99.844402 99.867354 99.856268 74.688752 74.699686 74.686532
84000 1567.5762 -893.4426 1395.2965 2.2938491 1482.5162 94.678844 -4.1316985 -7.2414617 -7.4514971 -7.7059415 -57.823672 -56.159106 -54.697355 -0.73591992 -0.67263169 -0.99293636 136.62485 136.60365 136.63538 99.84546 99.868588 99.859502 74.694287 74.699557 74.688432
85500 1432.2278 -889.0106 -1377.5411 2.2938491 1482.3155 93.438709 -4.1317406 -7.2231164 -7.4908049 -7.7049396 -57.502557 -56.145262 -54.63067 -0.75954036 -0.65582508 -1.0183515 136.6309 136.61047 136.64107 99.849588 99.871028 99.864254 74.699439 74.70335 74.691002
87000 1460.2447 -891.89246 -0.80016568 2.2938491 1482.3382 88.386804 -4.1316936 -7.2264011 -7.5056543 -7.709398 -57.406671 -55.971898 -54.886302 -0.74942793 -0.65651161 -1.0146109 136.6237 136.59887 136.63315 99.842443 99.867697 99.856739 74.697165 74.70443 74.683402
88500 1440.2891 -893.33008 524.68194 2.2938491 1482.3143 88.757788 -4.1317107 -7.2539574 -7.5019633 -7.6970553 -57.100672 -56.001078 -54.967854 -0.72231568 -0.67329128 -1.0062405 136.62754 136.60076 136.63746 99.841603 99.871714 99.857299 74.700219 74.708928 74.688224
90000 1516.1386 -896.83736 514.25183 2.2938491 1482.4324 93.624187 -4.1316721 -7.2661783 -7.4872817 -7.6621711 -57.153939 -55.675044 -55.038702 -0.71162973 -0.65640585 -0.9901763 136.62634 136.5973 136.63636 99.840724 99.872434 99.853565 74.696616 74.71085 74.68682
91500 1607.5754 -891.45362 -335.12175 2.2938491 1482.3634 96.295552 -4.1317168 -7.2512482 -7.4855921 -7.6563828 -57.333312 -55.871451 -54.885579 -0.71855253 -0.66451595 -0.9784755 136.62406 136.60485 136.63801 99.845387 99.869057 99.856498 74.69518 74.707799 74.689867
93000 1460.9577 -891.0447 1910.5719 2.2938491 1482.5495 95.612581 -4.1316835 -7.2345819 -7.4872574 -7.6900538 -57.577838 -55.778305 -55.190243 -0.72452799 -0.67622846 -0.95134216 136.6155 136.58928 136.6336 99.838615 99.867719 99.849452 74.687208 74.706541 74.685971
94500 1470.6227 -892.26051 270.39634 2.2938491 1482.5672 94.112066 -4.1317045 -7.2341279 -7.4928727 -7.6545536 -57.426957 -56.064962 -55.047123 -0.70451968 -0.67591615 -0.92282964 136.61646 136.59089 136.64185 99.840845 99.870383 99.849979 74.688749 74.709584 74.686957
96000 1761.7597 -889.19794 2653.3494 2.2938491 1482.3672 85.211301 -4.1316762 -7.2539691 -7.4631657 -7.6913375 -57.327731 -55.963801 -55.013515 -0.71090453 -0.69574107 -0.92155635 136.60972 136.58428 136.62883 99.832904 99.864366 99.847749 74.688857 74.708236 74.682281
97500 1481.5876 -894.20788 -389.53494 2.2938491 1482.2533 89.07951 -4.1317073 -7.25095 -7.4753287 -7.6606804 -57.47475 -56.096252 -55.158143 -0.71560129 -0.68873446 -0.93406162 136.61564 136.58736 136.63462 99.838049 99.868876 99.848771 74.686838 74.711562 74.683471
99000 1495.5155 -891.01063 1680.8863 2.2938491 1482.2267 97.208165 -4.1317016 -7.277595 -7.5192558 -7.6344538 -57.476542 -56.383856 -54.882305 -0.74400485 -0.68726404 -0.94799728 136.61907 136.59346 136.63796 99.842727 99.870409 99.853088 74.685523 74.708843 74.684813
100500 1467.1581 -889.95317 242.60103 2.2938491 1481.9829 97.224982 -4.1317571 -7.252584 -7.5076801 -7.6611416 -57.552637 -56.14004 -55.018801 -0.75385025 -0.69209438 -0.94398412 136.6207 136.60141 136.63777 99.846229 99.86929 99.857689 74.69078 74.705759 74.687925
102000 1613.876 -891.23745 1375.2231 2.2938491 1481.8918 94.379877 -4.1317123 -7.2522696 -7.490171 -7.6514314 -57.635642 -55.888914 -54.994388 -0.75241502 -0.68960669 -0.91645246 136.62344 136.60488 136.63347 99.847338 99.865247 99.856123 74.695679 74.707583 74.693448
103500 1366.8885 -892.68641 -434.73129 2.2938491 1481.866 97.233875 -4.1317222 -7.2341862 -7.4693846 -7.6427203 -57.848484 -55.98048 -55.261348 -0.74622204 -0.68309934 -0.92443719 136.62181 136.61267 136.63941 99.856541 99.863371 99.859527 74.696212 74.702525 74.694062
105000 1566.8173 -889.64302 52.134848 2.2938491 1481.9555 94.617908 -4.131708 -7.2078092 -7.490984 -7.6511905 -57.877166 -55.970863 -55.392031 -0.74617361 -0.69517832 -0.94219586 136.62317 136.61282 136.63557 99.853702 99.862156 99.858588 74.697837 74.703415 74.693222
106500 1510.7795 -891.83105 912.04973 2.2938491 1481.9273 94.050693 -4.1317245 -7.2274362 -7.4958029 -7.6473799 -57.9481 -55.855934 -55.405593 -0.7612426 -0.70193323 -0.94170435 136.61865 136.60991 136.63015 99.851136 99.858763 99.857942 74.697833 74.700173 74.690954
108000 1455.2205 -886.40658 557.80643 2.2938491 1481.8672 90.932719 -4.131639 -7.2156616 -7.5140992 -7.6592343 -57.875096 -56.121921 -55.441901 -0.77520355 -0.7082224 -0.95332709 136.61521 136.60854 136.62307 99.844819 99.853589 99.857619 74.706032 74.702008 74.690719
109500 1591.694 -890.12115 2111.7582 2.2938491 1481.9081 90.818335 -4.1316826 -7.2099875 -7.5036851 -7.6146732 -57.901962 -56.080481 -55.335907 -0.77541222 -0.70215363 -0.94640585 136.62449 136.62284 136.63316 99.852345 99.858242 99.864241 74.712062 74.706711 74.695773
111000 1401.5464 -889.70209 -1162.998 2.2938491 1481.8995 90.785361 -4.1317103 -7.2232569 -7.4975842 -7.6122167 -57.814589 -56.145176 -55.237091 -0.77101386 -0.71297505 -0.93787376 136.62319 136.62624 136.63278 99.855678 99.855147 99.865946 74.710261 74.703628 74.698218
112500 1661.4542 -893.40947 3577.1279 2.2938491 1482.0712 91.936529 -4.1316922 -7.2363752 -7.490673 -7.6041227 -57.793279 -56.031961 -55.425678 -0.76646862 -0.71410904 -0.9310629 136.61332 136.62225 136.62704 99.856804 99.84979 99.862862 74.707371 74.696176 74.697236
114000 1547.0639 -887.44417 1477.9344 2.2938491 1482.0257 92.747503 -4.131727 -7.2300662 -7.4797162 -7.5970492 -57.853023 -55.961882 -55.370161 -0.75229192 -0.6895434 -0.93030859 136.61656 136.62515 136.62686 99.855862 99.853722 99.86337 74.71008 74.698813 74.695278
115500 1439.5189 -890.25524 1449.2504 2.2938491 1482.1027 93.092922 -4.1317311 -7.2248464 -7.4844791 -7.577668 -57.724672 -55.908203 -55.477058 -0.75703148 -0.69213445 -0.93063769 136.61287 136.62652 136.63064 99.861066 99.855191 99.860674 74.707263 74.699878 74.698782
117000 1484.5557 -888.52105 62.875599 2.2938491 1481.939 88.920925 -4.1316902 -7.2401277 -7.4688263 -7.5738313 -57.623793 -55.827804 -55.470646 -0.7670686 -0.70720567 -0.94065827 136.61043 136.62028 136.62637 99.856362 99.852679 99.856577 74.7054 74.702523 74.700062
118500 1544.5557 -897.27305 290.28551 2.2938491 1482.0321 82.378509 -4.1316258 -7.2550568 -7.4962409 -7.6069951 -57.791253 -55.82989 -55.246167 -0.7749151 -0.72530054 -0.96204389 136.60394 136.61474 136.6218 99.851596 99.848741 99.849294 74.707077 74.705425 74.700726
120000 1478.3947 -892.7268 -577.38167 2.2938491 1481.8729 84.389547 -4.1316655 -7.2406756 -7.4760807 -7.571379 -57.99213 -55.95264 -55.45397 -0.77057679 -0.71238268 -0.94097166 136.60946 136.62355 136.62508 99.855739 99.849821 99.856483 74.708864 74.703347 74.704105
121500 1529.2571 -890.35258 214.27253 2.2938491 1481.8862 79.172239 -4.131618 -7.2321448 -7.4640098 -7.5859318 -57.999026 -55.743602 -55.374383 -0.76556556 -0.72763717 -0.94266473 136.60096 136.62176 136.61876 99.853547 99.843769 99.850416 74.711419 74.702896 74.703593
123000 1592.6338 -895.89179 1618.5405 2.2938491 1481.8996 82.460382 -4.1316142 -7.2304535 -7.4384951 -7.5700086 -57.853634 -55.668494 -55.236154 -0.75305506 -0.73385059 -0.93874018 136.59877 136.61927 136.61316 99.852817 99.840785 99.851696 74.710721 74.698867 74.700648
124500 1481.1564 -896.96342 324.3934 2.2938491 1481.8895 85.319881 -4.1316244 -7.2264693 -7.4227219 -7.5551714 -57.777484 -55.785962 -55.26024 -0.75234123 -0.73009637 -0.93269204 136.59932 136.61758 136.61173 99.852222 99.841031 99.851213 74.709885 74.698336 74.698938
126000 1366.1089 -891.93997 -658.32428 2.2938491 1481.7226 78.355779 -4.1316207 -7.2488328 -7.4329154 -7.5647275 -57.916784 -55.857672 -55.218103 -0.76146388 -0.73488986 -0.92639796 136.5948 136.61742 136.60582 99.851304 99.835211 99.848225 74.709524 74.694785 74.702522
127500 1505.7295 -893.82427 1963.9643 2.2938491 1481.8782 87.640052 -4.1316687 -7.277167 -7.4400402 -7.5639761 -57.931692 -55.857053 -55.327085 -0.77752365 -0.7559997 -0.93064472 136.60295 136.6295 136.61443 99.859242 99.841072 99.856065 74.711211 74.693396 74.703574
129000 1544.571 -892.03159 -527.07176 2.2938491 1482.0193 87.794364 -4.1316821 -7.2698344 -7.4346091 -7.5684319 -57.869829 -55.877329 -55.269055 -0.77585053 -0.73210247 -0.92680166 136.60317 136.63098 136.61634 99.86071 99.839607 99.856208 74.712198 74.695158 74.705047
130500 1563.3858 -889.50411 -87.198132 2.2938491 1482.0526 81.485975 -4.1316493 -7.2663101 -7.4269998 -7.5691984 -57.836151 -55.897446 -55.110745 -0.7681867 -0.72744291 -0.91874044 136.59693 136.63004 136.61117 99.858337 99.836672 99.849979 74.711563 74.695134 74.708137
132000 1553.6055 -896.15176 740.11093 2.2938491 1481.9674 80.783301 -4.1316735 -7.2824836 -7.4350446 -7.5489937 -57.950565 -55.829897 -55.147418 -0.79446196 -0.73309725 -0.92126843 136.59425 136.62943 136.61481 99.860995 99.838059 99.848436 74.708412 74.695423 74.708926
133500 1385.0177 -892.27993 -907.20247 2.2938491 1481.8295 79.187393 -4.1316431 -7.2781202 -7.4600968 -7.5283409 -58.068566 -55.837667 -54.995174 -0.79075959 -0.72422066 -0.92463565 136.58806 136.62239 136.6053 99.858416 99.830029 99.847215 74.70793 74.690917 74.708181
135000 1483.9097 -893.96772 -2166.9672 2.2938491 1481.8458 79.724142 -4.1316572 -7.2532514 -7.4529684 -7.5151627 -58.117754 -55.762813 -55.044672 -0.78734824 -0.71937479 -0.9191986 136.5908 136.62612 136.60205 99.856567 99.829771 99.850178 74.711435 74.688994 74.708456
136500 1600.2522 -890.70516 609.13895 2.2938491 1481.92 83.006512 -4.1316674 -7.258606 -7.4315875 -7.5020899 -58.1938 -55.794999 -54.94864 -0.77941653 -0.72340994 -0.90867059 136.5924 136.62407 136.6027 99.858372 99.830876 99.850851 74.70873 74.687502 74.705977
138000 1502.6753 -890.61112 391.94407 2.2938491 1482.0167 76.016016 -4.1316051 -7.2681189 -7.4332901 -7.5246594 -58.549025 -55.68375 -55.083251 -0.7721303 -0.73534454 -0.91398112 136.5902 136.61295 136.59058 99.848968 99.826477 99.845811 74.7088 74.685769 74.700689
139500 1356.6079 -892.88412 443.66566 2.2938491 1482.1012 75.175931 -4.1315823 -7.272648 -7.4202164 -7.5435138 -58.430256 -55.645142 -55.177498 -0.77281637 -0.74277362 -0.90655462 136.58594 136.60941 136.58868 99.8471 99.825215 99.844524 74.704379 74.684246 74.698048
141000 1536.8299 -891.3964 1488.9232 2.2938491 1482.1777 70.161617 -4.1315549 -7.2870883 -7.4331937 -7.5306099 -58.52421 -55.722214 -55.042544 -0.74933771 -0.74261337 -0.87760623 136.58324 136.61276 136.58989 99.849169 99.823054 99.843296 74.706773 74.681129 74.703048
142500 1436.4404 -893.92271 574.36968 2.2938491 1482.0701 72.237377 -4.1316031 -7.2838066 -7.4093453 -7.5146661 -58.526669 -55.658527 -54.961371 -0.75069722 -0.74058553 -0.87613316 136.58937 136.61441 136.59146 99.848728 99.827923 99.846928 74.706061 74.681733 74.697755
144000 1489.9179 -891.89057 874.84954 2.2938491 1482.1193 76.069588 -4.1316094 -7.2964678 -7.3973197 -7.5029947 -58.56494 -55.90659 -54.948484 -0.74022244 -0.75134582 -0.87359031 136.59283 136.61825 136.59298 99.85297 99.828592 99.848855 74.708201 74.681372 74.698936
145500 1498.8873 -892.88995 -375.19001 2.2938491 1482.1293 78.637484 -4.1316333 -7.28757 -7.3758785 -7.5097553 -58.819672 -55.915661 -54.947745 -0.73771147 -0.76005783 -0.87268243 136.59805 136.62289 136.59468 99.853239 99.831254 99.853326 74.712898 74.684719 74.697923
147000 1522.292 -888.44727 1193.3345 2.2938491 1482.274 82.096416 -4.1316355 -7.2628288 -7.3837513 -7.5079984 -58.864236 -55.949971 -55.052575 -0.72231418 -0.74804745 -0.87292368 136.60062 136.62844 136.59425 99.855419 99.831528 99.855082 74.715145 74.682637 74.701191
148500 1570.9693 -893.72505 672.43585 2.2938491 1482.3953 88.359724 -4.1316418 -7.2884009 -7.3644359 -7.5112899 -58.807712 -55.988036 -55.099847 -0.72835513 -0.74530355 -0.87637008 136.60096 136.6326 136.59779 99.857791 99.834031 99.857841 74.715094 74.683359 74.70131
150000 1449.0081 -891.81638 -714.54867 2.2938491 1482.3667 90.591195 -4.1316589 -7.3037214 -7.3497793 -7.5219215 -58.757005 -56.00609 -55.081797 -0.72611841 -0.75187625 -0.87207291 136.60564 136.63782 136.59487 99.857615 99.835445 99.86176 74.718484 74.683132 74.699142
Loop time of 18.3423 on 4 procs for 150000 steps with 216 atoms
Performance: 541.227 ns/day, 0.044 hours/ns, 8177.811 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 12.192 | 12.302 | 12.366 | 2.0 | 67.07
Neigh | 0.16441 | 0.16492 | 0.16576 | 0.1 | 0.90
Comm | 2.4159 | 2.4795 | 2.5866 | 4.3 | 13.52
Output | 0.0030494 | 0.0033533 | 0.0042086 | 0.9 | 0.02
Modify | 3.1243 | 3.1322 | 3.1398 | 0.3 | 17.08
Other | | 0.2608 | | | 1.42
Nlocal: 54 ave 54 max 54 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Nghost: 334.75 ave 338 max 331 min
Histogram: 1 0 1 0 0 0 0 0 1 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 1426.5 ave 1439 max 1408 min
Histogram: 1 0 0 0 0 1 0 0 1 1
Total # of neighbors = 5706
Ave neighs/atom = 26.416667
Neighbor list builds = 2567
Dangerous builds = 0
# Output final values
include final_output.in
# Average moduli for cubic crystals
variable C11cubic equal (${C11}+${C22}+${C33})/3.0
variable C11cubic equal (133.317541070292+${C22}+${C33})/3.0
variable C11cubic equal (133.317541070292+133.303658933287+${C33})/3.0
variable C11cubic equal (133.317541070292+133.303658933287+133.088561493082)/3.0
variable C12cubic equal (${C12}+${C13}+${C23})/3.0
variable C12cubic equal (73.9923654361203+${C13}+${C23})/3.0
variable C12cubic equal (73.9923654361203+73.9312552589804+${C23})/3.0
variable C12cubic equal (73.9923654361203+73.9312552589804+73.8270687089798)/3.0
variable C44cubic equal (${C44}+${C55}+${C66})/3.0
variable C44cubic equal (43.1084188147025+${C55}+${C66})/3.0
variable C44cubic equal (43.1084188147025+45.8371646999798+${C66})/3.0
variable C44cubic equal (43.1084188147025+45.8371646999798+46.7877718062386)/3.0
variable bulkmodulus equal (${C11cubic}+2*${C12cubic})/3.0
variable bulkmodulus equal (133.236587165554+2*${C12cubic})/3.0
variable bulkmodulus equal (133.236587165554+2*73.9168964680268)/3.0
variable shearmodulus1 equal ${C44cubic}
variable shearmodulus1 equal 45.2444517736403
variable shearmodulus2 equal (${C11cubic}-${C12cubic})/2.0
variable shearmodulus2 equal (133.236587165554-${C12cubic})/2.0
variable shearmodulus2 equal (133.236587165554-73.9168964680268)/2.0
variable poissonratio equal 1.0/(1.0+${C11cubic}/${C12cubic})
variable poissonratio equal 1.0/(1.0+133.236587165554/${C12cubic})
variable poissonratio equal 1.0/(1.0+133.236587165554/73.9168964680268)
# For Stillinger-Weber silicon, the analytical results
# are known to be (E. R. Cowley, 1988):
# C11 = 151.4 GPa
# C12 = 76.4 GPa
# C44 = 56.4 GPa
#print "========================================="
#print "Components of the Elastic Constant Tensor"
#print "========================================="
print "Elastic Constant C11 = ${C11} ${cunits}"
Elastic Constant C11 = 133.317541070292 GPa
print "Elastic Constant C22 = ${C22} ${cunits}"
Elastic Constant C22 = 133.303658933287 GPa
print "Elastic Constant C33 = ${C33} ${cunits}"
Elastic Constant C33 = 133.088561493082 GPa
print "Elastic Constant C12 = ${C12} ${cunits}"
Elastic Constant C12 = 73.9923654361203 GPa
print "Elastic Constant C13 = ${C13} ${cunits}"
Elastic Constant C13 = 73.9312552589804 GPa
print "Elastic Constant C23 = ${C23} ${cunits}"
Elastic Constant C23 = 73.8270687089798 GPa
print "Elastic Constant C44 = ${C44} ${cunits}"
Elastic Constant C44 = 43.1084188147025 GPa
print "Elastic Constant C55 = ${C55} ${cunits}"
Elastic Constant C55 = 45.8371646999798 GPa
print "Elastic Constant C66 = ${C66} ${cunits}"
Elastic Constant C66 = 46.7877718062386 GPa
print "Elastic Constant C14 = ${C14} ${cunits}"
Elastic Constant C14 = 0.0767019895461112 GPa
print "Elastic Constant C15 = ${C15} ${cunits}"
Elastic Constant C15 = 0.160081312432549 GPa
print "Elastic Constant C16 = ${C16} ${cunits}"
Elastic Constant C16 = -0.0672322473606912 GPa
print "Elastic Constant C24 = ${C24} ${cunits}"
Elastic Constant C24 = -0.0980703737031021 GPa
print "Elastic Constant C25 = ${C25} ${cunits}"
Elastic Constant C25 = 0.425094496914652 GPa
print "Elastic Constant C26 = ${C26} ${cunits}"
Elastic Constant C26 = -0.061665192022258 GPa
print "Elastic Constant C34 = ${C34} ${cunits}"
Elastic Constant C34 = -0.0939770954478323 GPa
print "Elastic Constant C35 = ${C35} ${cunits}"
Elastic Constant C35 = 0.10019558502976 GPa
print "Elastic Constant C36 = ${C36} ${cunits}"
Elastic Constant C36 = 0.246165012383149 GPa
print "Elastic Constant C45 = ${C45} ${cunits}"
Elastic Constant C45 = 0.451034755300606 GPa
print "Elastic Constant C46 = ${C46} ${cunits}"
Elastic Constant C46 = 0.53971304682664 GPa
print "Elastic Constant C56 = ${C56} ${cunits}"
Elastic Constant C56 = -0.243078648160722 GPa
print "========================================="
=========================================
print "Average properties for a cubic crystal"
Average properties for a cubic crystal
print "========================================="
=========================================
print "Bulk Modulus = ${bulkmodulus} ${cunits}"
Bulk Modulus = 93.6901267005359 GPa
print "Shear Modulus 1 = ${shearmodulus1} ${cunits}"
Shear Modulus 1 = 45.2444517736403 GPa
print "Shear Modulus 2 = ${shearmodulus2} ${cunits}"
Shear Modulus 2 = 29.6598453487636 GPa
print "Poisson Ratio = ${poissonratio}"
Poisson Ratio = 0.356821884775895
# summarize sampling protocol
variable tmp equal atoms
print "Number of atoms = ${tmp}"
Number of atoms = 216
print "Stress sampling interval = ${nevery}"
Stress sampling interval = 10
variable tmp equal ${nrun}/${nevery}
variable tmp equal 150000/${nevery}
variable tmp equal 150000/10
print "Stress sample count = ${tmp}"
Stress sample count = 15000
print "Born sampling interval = ${neveryborn}"
Born sampling interval = 100
variable tmp equal ${nrun}/${neveryborn}
variable tmp equal 150000/${neveryborn}
variable tmp equal 150000/100
print "Born sample count = ${tmp}"
Born sample count = 1500
Total wall time: 0:00:19

View File

@ -0,0 +1,662 @@
# select temperature and pressure (lattice constant)
variable temp index 1477.0 # temperature of initial sample
variable a index 5.457 # lattice constant
# select sampling parameters, important for speed/convergence
variable nthermo index 1500 # interval for thermo output
variable nevery index 10 # stress sampling interval
variable neveryborn index 100 # Born sampling interval
variable timestep index 0.000766 # timestep
variable nlat index 3 # number of lattice unit cells
# other settings
variable mass1 index 28.06 # mass
variable tdamp index 0.01 # time constant for thermostat
variable seed index 123457 # seed for thermostat
variable thermostat index 1 # 0 if NVE, 1 if NVT
variable delta index 1.0e-6 # Born numdiff strain magnitude
# hard-coded rules-of-thumb for run length, etc.
variable nfreq equal ${nthermo} # interval for averaging output
variable nfreq equal 1500
variable nrepeat equal floor(${nfreq}/${nevery}) # number of samples
variable nrepeat equal floor(1500/${nevery})
variable nrepeat equal floor(1500/10)
variable nrepeatborn equal floor(${nfreq}/${neveryborn}) # number of samples
variable nrepeatborn equal floor(1500/${neveryborn})
variable nrepeatborn equal floor(1500/100)
variable nequil equal 10*${nthermo} # length of equilibration run
variable nequil equal 10*1500
variable nrun equal 100*${nthermo} # length of equilibrated run
variable nrun equal 100*1500
# this generates a general triclinic cell
# conforming to LAMMPS cell (upper triangular)
units metal
box tilt large
# unit lattice vectors are
# a1 = (a1x 0 0)
# a2 = (a2x a2y 0)
# a3 = (a3x a3y a3z)
variable a1x index 1
variable a2x index 0
variable a2y index 1
variable a3x index 0
variable a3y index 0
variable a3z index 1
variable atmp equal $a
variable atmp equal 5.457
variable l index $a
variable l index 5.457
variable basis index "basis 0 0 0 basis 0.25 0.25 0.25 basis 0 0.5 0.5 basis 0.25 0.75 0.75 basis 0.5 0 0.5 basis 0.75 0.25 0.75 basis 0.5 0.5 0 basis 0.75 0.75 0.25"
lattice custom ${l} a1 ${a1x} 0 0 a2 ${a2x} ${a2y} 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 3.8586817049349893 a1 ${a1x} 0 0 a2 ${a2x} ${a2y} 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 3.8586817049349893 a1 1.0 0 0 a2 ${a2x} ${a2y} 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 3.8586817049349893 a1 1.0 0 0 a2 0.4999999999999999 ${a2y} 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 3.8586817049349893 a1 1.0 0 0 a2 0.4999999999999999 0.8660254037844385 0 a3 ${a3x} ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 3.8586817049349893 a1 1.0 0 0 a2 0.4999999999999999 0.8660254037844385 0 a3 0.5 ${a3y} ${a3z} ${basis} spacing 1 1 1
lattice custom 3.8586817049349893 a1 1.0 0 0 a2 0.4999999999999999 0.8660254037844385 0 a3 0.5 0.2886751345948129 ${a3z} ${basis} spacing 1 1 1
lattice custom 3.8586817049349893 a1 1.0 0 0 a2 0.4999999999999999 0.8660254037844385 0 a3 0.5 0.2886751345948129 0.8164965809277259 ${basis} spacing 1 1 1
lattice custom 3.8586817049349893 a1 1.0 0 0 a2 0.4999999999999999 0.8660254037844385 0 a3 0.5 0.2886751345948129 0.8164965809277259 basis 0 0 0 basis 0.25 0.25 0.25 spacing 1 1 1
Lattice spacing in x,y,z = 3.8586817 3.8586817 3.8586817
region box prism 0 ${a1x} 0 ${a2y} 0 ${a3z} ${a2x} ${a3x} ${a3y}
region box prism 0 1.0 0 ${a2y} 0 ${a3z} ${a2x} ${a3x} ${a3y}
region box prism 0 1.0 0 0.8660254037844385 0 ${a3z} ${a2x} ${a3x} ${a3y}
region box prism 0 1.0 0 0.8660254037844385 0 0.8164965809277259 ${a2x} ${a3x} ${a3y}
region box prism 0 1.0 0 0.8660254037844385 0 0.8164965809277259 0.4999999999999999 ${a3x} ${a3y}
region box prism 0 1.0 0 0.8660254037844385 0 0.8164965809277259 0.4999999999999999 0.5 ${a3y}
region box prism 0 1.0 0 0.8660254037844385 0 0.8164965809277259 0.4999999999999999 0.5 0.2886751345948129
create_box 1 box
Created triclinic box = (0 0 0) to (3.8586817 3.3417164 3.1506004) with tilt (1.9293409 1.9293409 1.1139055)
1 by 2 by 2 MPI processor grid
create_atoms 1 box
Created 2 atoms
using lattice units in triclinic box = (0 0 0) to (3.8586817 3.3417164 3.1506004) with tilt (1.9293409 1.9293409 1.1139055)
create_atoms CPU = 0.000 seconds
mass 1 ${mass1}
mass 1 28.06
replicate ${nlat} ${nlat} ${nlat}
replicate 5 ${nlat} ${nlat}
replicate 5 5 ${nlat}
replicate 5 5 5
Replicating atoms ...
triclinic box = (0 0 0) to (19.293409 16.708582 15.753002) with tilt (9.6467043 9.6467043 5.5695273)
2 by 1 by 2 MPI processor grid
250 atoms
replicate CPU = 0.000 seconds
velocity all create ${temp} 87287
velocity all create 1477.0 87287
# Compute initial state
include potential.in
# NOTE: This script can be modified for different pair styles
# See in.elastic for more info.
reset_timestep 0
# Choose potential
pair_style sw
pair_coeff * * Si.sw Si
Reading sw potential file Si.sw with DATE: 2007-06-11
# Setup neighbor style
neighbor 1.0 nsq
neigh_modify once no every 1 delay 0 check yes
# Setup MD
timestep ${timestep}
timestep 0.000766
fix 4 all nve
if "${thermostat} == 1" then "fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}
fix 5 all langevin 1477.0 ${temp} ${tdamp} ${seed}
fix 5 all langevin 1477.0 1477.0 ${tdamp} ${seed}
fix 5 all langevin 1477.0 1477.0 0.01 ${seed}
fix 5 all langevin 1477.0 1477.0 0.01 123457
thermo_style custom step temp pe press density
run ${nequil}
run 15000
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 4.77118
ghost atom cutoff = 4.77118
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair sw, perpetual
attributes: full, newton on
pair build: full/nsq
stencil: none
bin: none
Per MPI rank memory allocation (min/avg/max) = 3.058 | 3.058 | 3.059 Mbytes
Step Temp PotEng Press Density
0 1477 -1083.8249 -4258.3947 2.2938491
15000 1496.4515 -1030.8279 1702.5821 2.2938491
Loop time of 1.93162 on 4 procs for 15000 steps with 250 atoms
Performance: 513.941 ns/day, 0.047 hours/ns, 7765.521 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 1.233 | 1.4215 | 1.6958 | 14.2 | 73.59
Neigh | 0.020173 | 0.022348 | 0.025604 | 1.3 | 1.16
Comm | 0.15771 | 0.43281 | 0.62056 | 25.8 | 22.41
Output | 1.2841e-05 | 1.4604e-05 | 1.9543e-05 | 0.0 | 0.00
Modify | 0.021536 | 0.025134 | 0.030087 | 2.0 | 1.30
Other | | 0.02978 | | | 1.54
Nlocal: 62.5 ave 74 max 58 min
Histogram: 3 0 0 0 0 0 0 0 0 1
Nghost: 429.5 ave 465 max 391 min
Histogram: 1 0 0 1 0 0 0 1 0 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 1649.5 ave 1943 max 1526 min
Histogram: 2 1 0 0 0 0 0 0 0 1
Total # of neighbors = 6598
Ave neighs/atom = 26.392
Neighbor list builds = 261
Dangerous builds = 0
# Run dynamics
include potential.in
# NOTE: This script can be modified for different pair styles
# See in.elastic for more info.
reset_timestep 0
# Choose potential
pair_style sw
pair_coeff * * Si.sw Si
Reading sw potential file Si.sw with DATE: 2007-06-11
# Setup neighbor style
neighbor 1.0 nsq
neigh_modify once no every 1 delay 0 check yes
# Setup MD
timestep ${timestep}
timestep 0.000766
fix 4 all nve
if "${thermostat} == 1" then "fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}"
fix 5 all langevin ${temp} ${temp} ${tdamp} ${seed}
fix 5 all langevin 1477.0 ${temp} ${tdamp} ${seed}
fix 5 all langevin 1477.0 1477.0 ${tdamp} ${seed}
fix 5 all langevin 1477.0 1477.0 0.01 ${seed}
fix 5 all langevin 1477.0 1477.0 0.01 123457
include output.in
# Setup output
# Stress fluctuation term F
compute stress all pressure thermo_temp
variable s1 equal c_stress[1]
variable s2 equal c_stress[2]
variable s3 equal c_stress[3]
variable s4 equal c_stress[6]
variable s5 equal c_stress[5]
variable s6 equal c_stress[4]
variable s11 equal v_s1*v_s1
variable s22 equal v_s2*v_s2
variable s33 equal v_s3*v_s3
variable s44 equal v_s4*v_s4
variable s55 equal v_s5*v_s5
variable s66 equal v_s6*v_s6
variable s33 equal v_s3*v_s3
variable s12 equal v_s1*v_s2
variable s13 equal v_s1*v_s3
variable s14 equal v_s1*v_s4
variable s15 equal v_s1*v_s5
variable s16 equal v_s1*v_s6
variable s23 equal v_s2*v_s3
variable s24 equal v_s2*v_s4
variable s25 equal v_s2*v_s5
variable s26 equal v_s2*v_s6
variable s34 equal v_s3*v_s4
variable s35 equal v_s3*v_s5
variable s36 equal v_s3*v_s6
variable s45 equal v_s4*v_s5
variable s46 equal v_s4*v_s6
variable s56 equal v_s5*v_s6
variable mytemp equal temp
variable mypress equal press
variable mype equal pe/atoms
fix avt all ave/time ${nevery} ${nrepeat} ${nfreq} v_mytemp ave running
fix avt all ave/time 10 ${nrepeat} ${nfreq} v_mytemp ave running
fix avt all ave/time 10 150 ${nfreq} v_mytemp ave running
fix avt all ave/time 10 150 1500 v_mytemp ave running
fix avp all ave/time ${nevery} ${nrepeat} ${nfreq} v_mypress ave running
fix avp all ave/time 10 ${nrepeat} ${nfreq} v_mypress ave running
fix avp all ave/time 10 150 ${nfreq} v_mypress ave running
fix avp all ave/time 10 150 1500 v_mypress ave running
fix avpe all ave/time ${nevery} ${nrepeat} ${nfreq} v_mype ave running
fix avpe all ave/time 10 ${nrepeat} ${nfreq} v_mype ave running
fix avpe all ave/time 10 150 ${nfreq} v_mype ave running
fix avpe all ave/time 10 150 1500 v_mype ave running
fix avs all ave/time ${nevery} ${nrepeat} ${nfreq} v_s1 v_s2 v_s3 v_s4 v_s5 v_s6 ave running
fix avs all ave/time 10 ${nrepeat} ${nfreq} v_s1 v_s2 v_s3 v_s4 v_s5 v_s6 ave running
fix avs all ave/time 10 150 ${nfreq} v_s1 v_s2 v_s3 v_s4 v_s5 v_s6 ave running
fix avs all ave/time 10 150 1500 v_s1 v_s2 v_s3 v_s4 v_s5 v_s6 ave running
fix avssq all ave/time ${nevery} ${nrepeat} ${nfreq} v_s11 v_s22 v_s33 v_s44 v_s55 v_s66 v_s12 v_s13 v_s14 v_s15 v_s16 v_s23 v_s24 v_s25 v_s26 v_s34 v_s35 v_s36 v_s45 v_s46 v_s56 ave running
fix avssq all ave/time 10 ${nrepeat} ${nfreq} v_s11 v_s22 v_s33 v_s44 v_s55 v_s66 v_s12 v_s13 v_s14 v_s15 v_s16 v_s23 v_s24 v_s25 v_s26 v_s34 v_s35 v_s36 v_s45 v_s46 v_s56 ave running
fix avssq all ave/time 10 150 ${nfreq} v_s11 v_s22 v_s33 v_s44 v_s55 v_s66 v_s12 v_s13 v_s14 v_s15 v_s16 v_s23 v_s24 v_s25 v_s26 v_s34 v_s35 v_s36 v_s45 v_s46 v_s56 ave running
fix avssq all ave/time 10 150 1500 v_s11 v_s22 v_s33 v_s44 v_s55 v_s66 v_s12 v_s13 v_s14 v_s15 v_s16 v_s23 v_s24 v_s25 v_s26 v_s34 v_s35 v_s36 v_s45 v_s46 v_s56 ave running
# bar to GPa
variable pconv equal 1.0e5/1.0e9
variable cunits index GPa
# metal unit constants from LAMMPS
# force->nktv2p = 1.6021765e6;
# force->boltz = 8.617343e-5;
variable boltz equal 8.617343e-5
variable nktv2p equal 1.6021765e6
variable vkt equal vol/(${boltz}*${temp})/${nktv2p}
variable vkt equal vol/(8.617343e-05*${temp})/${nktv2p}
variable vkt equal vol/(8.617343e-05*1477.0)/${nktv2p}
variable vkt equal vol/(8.617343e-05*1477.0)/1602176.5
variable ffac equal ${pconv}*${vkt}
variable ffac equal 0.0001*${vkt}
variable ffac equal 0.0001*0.0249027696047235
variable F11 equal -(f_avssq[1]-f_avs[1]*f_avs[1])*${ffac}
variable F11 equal -(f_avssq[1]-f_avs[1]*f_avs[1])*2.49027696047235e-06
variable F22 equal -(f_avssq[2]-f_avs[2]*f_avs[2])*${ffac}
variable F22 equal -(f_avssq[2]-f_avs[2]*f_avs[2])*2.49027696047235e-06
variable F33 equal -(f_avssq[3]-f_avs[3]*f_avs[3])*${ffac}
variable F33 equal -(f_avssq[3]-f_avs[3]*f_avs[3])*2.49027696047235e-06
variable F44 equal -(f_avssq[4]-f_avs[4]*f_avs[4])*${ffac}
variable F44 equal -(f_avssq[4]-f_avs[4]*f_avs[4])*2.49027696047235e-06
variable F55 equal -(f_avssq[5]-f_avs[5]*f_avs[5])*${ffac}
variable F55 equal -(f_avssq[5]-f_avs[5]*f_avs[5])*2.49027696047235e-06
variable F66 equal -(f_avssq[6]-f_avs[6]*f_avs[6])*${ffac}
variable F66 equal -(f_avssq[6]-f_avs[6]*f_avs[6])*2.49027696047235e-06
variable F12 equal -(f_avssq[7]-f_avs[1]*f_avs[2])*${ffac}
variable F12 equal -(f_avssq[7]-f_avs[1]*f_avs[2])*2.49027696047235e-06
variable F13 equal -(f_avssq[8]-f_avs[1]*f_avs[3])*${ffac}
variable F13 equal -(f_avssq[8]-f_avs[1]*f_avs[3])*2.49027696047235e-06
variable F14 equal -(f_avssq[9]-f_avs[1]*f_avs[4])*${ffac}
variable F14 equal -(f_avssq[9]-f_avs[1]*f_avs[4])*2.49027696047235e-06
variable F15 equal -(f_avssq[10]-f_avs[1]*f_avs[5])*${ffac}
variable F15 equal -(f_avssq[10]-f_avs[1]*f_avs[5])*2.49027696047235e-06
variable F16 equal -(f_avssq[11]-f_avs[1]*f_avs[6])*${ffac}
variable F16 equal -(f_avssq[11]-f_avs[1]*f_avs[6])*2.49027696047235e-06
variable F23 equal -(f_avssq[12]-f_avs[2]*f_avs[3])*${ffac}
variable F23 equal -(f_avssq[12]-f_avs[2]*f_avs[3])*2.49027696047235e-06
variable F24 equal -(f_avssq[13]-f_avs[2]*f_avs[4])*${ffac}
variable F24 equal -(f_avssq[13]-f_avs[2]*f_avs[4])*2.49027696047235e-06
variable F25 equal -(f_avssq[14]-f_avs[2]*f_avs[5])*${ffac}
variable F25 equal -(f_avssq[14]-f_avs[2]*f_avs[5])*2.49027696047235e-06
variable F26 equal -(f_avssq[15]-f_avs[2]*f_avs[6])*${ffac}
variable F26 equal -(f_avssq[15]-f_avs[2]*f_avs[6])*2.49027696047235e-06
variable F34 equal -(f_avssq[16]-f_avs[3]*f_avs[4])*${ffac}
variable F34 equal -(f_avssq[16]-f_avs[3]*f_avs[4])*2.49027696047235e-06
variable F35 equal -(f_avssq[17]-f_avs[3]*f_avs[5])*${ffac}
variable F35 equal -(f_avssq[17]-f_avs[3]*f_avs[5])*2.49027696047235e-06
variable F36 equal -(f_avssq[18]-f_avs[3]*f_avs[6])*${ffac}
variable F36 equal -(f_avssq[18]-f_avs[3]*f_avs[6])*2.49027696047235e-06
variable F45 equal -(f_avssq[19]-f_avs[4]*f_avs[5])*${ffac}
variable F45 equal -(f_avssq[19]-f_avs[4]*f_avs[5])*2.49027696047235e-06
variable F46 equal -(f_avssq[20]-f_avs[4]*f_avs[6])*${ffac}
variable F46 equal -(f_avssq[20]-f_avs[4]*f_avs[6])*2.49027696047235e-06
variable F56 equal -(f_avssq[21]-f_avs[5]*f_avs[6])*${ffac}
variable F56 equal -(f_avssq[21]-f_avs[5]*f_avs[6])*2.49027696047235e-06
# Born term
compute virial all pressure NULL virial
compute born all born/matrix numdiff ${delta} virial
compute born all born/matrix numdiff 1.0e-6 virial
fix avborn all ave/time ${neveryborn} ${nrepeatborn} ${nfreq} c_born[*] ave running
fix avborn all ave/time 100 ${nrepeatborn} ${nfreq} c_born[*] ave running
fix avborn all ave/time 100 15 ${nfreq} c_born[*] ave running
fix avborn all ave/time 100 15 1500 c_born[*] ave running
variable bfac equal ${pconv}*${nktv2p}/vol
variable bfac equal 0.0001*${nktv2p}/vol
variable bfac equal 0.0001*1602176.5/vol
variable B vector f_avborn*${bfac}
variable B vector f_avborn*0.0315499354029305
# Kinetic term
variable kfac equal ${pconv}*${nktv2p}*atoms*${boltz}*${temp}/vol
variable kfac equal 0.0001*${nktv2p}*atoms*${boltz}*${temp}/vol
variable kfac equal 0.0001*1602176.5*atoms*${boltz}*${temp}/vol
variable kfac equal 0.0001*1602176.5*atoms*8.617343e-05*${temp}/vol
variable kfac equal 0.0001*1602176.5*atoms*8.617343e-05*1477.0/vol
variable K11 equal 4.0*${kfac}
variable K11 equal 4.0*1.00390440086865
variable K22 equal 4.0*${kfac}
variable K22 equal 4.0*1.00390440086865
variable K33 equal 4.0*${kfac}
variable K33 equal 4.0*1.00390440086865
variable K44 equal 2.0*${kfac}
variable K44 equal 2.0*1.00390440086865
variable K55 equal 2.0*${kfac}
variable K55 equal 2.0*1.00390440086865
variable K66 equal 2.0*${kfac}
variable K66 equal 2.0*1.00390440086865
# Add F, K, and B together
variable C11 equal v_F11+v_B[1]+v_K11
variable C22 equal v_F22+v_B[2]+v_K22
variable C33 equal v_F33+v_B[3]+v_K33
variable C44 equal v_F44+v_B[4]+v_K44
variable C55 equal v_F55+v_B[5]+v_K55
variable C66 equal v_F66+v_B[6]+v_K66
variable C12 equal v_F12+v_B[7]
variable C13 equal v_F13+v_B[8]
variable C14 equal v_F14+v_B[9]
variable C15 equal v_F15+v_B[10]
variable C16 equal v_F16+v_B[11]
variable C23 equal v_F23+v_B[12]
variable C24 equal v_F24+v_B[13]
variable C25 equal v_F25+v_B[14]
variable C26 equal v_F26+v_B[15]
variable C34 equal v_F34+v_B[16]
variable C35 equal v_F35+v_B[17]
variable C36 equal v_F36+v_B[18]
variable C45 equal v_F45+v_B[19]
variable C46 equal v_F46+v_B[20]
variable C56 equal v_F56+v_B[21]
thermo ${nthermo}
thermo 1500
thermo_style custom step temp pe press density f_avt f_avp f_avpe v_F11 v_F22 v_F33 v_F44 v_F55 v_F66 v_F12 v_F13 v_F23 v_B[*8] v_B[12]
thermo_modify norm no
run ${nrun}
run 150000
Per MPI rank memory allocation (min/avg/max) = 3.808 | 3.808 | 3.809 Mbytes
Step Temp PotEng Press Density f_avt f_avp f_avpe v_F11 v_F22 v_F33 v_F44 v_F55 v_F66 v_F12 v_F13 v_F23 v_B[1] v_B[2] v_B[3] v_B[4] v_B[5] v_B[6] v_B[7] v_B[8] v_B[12]
0 1496.4515 -1030.8279 1702.5821 2.2938491 0 0 0 -0 -0 -0 -0 -0 -0 -0 -0 -0 0 0 0 0 0 0 0 0 0
1500 1488.0457 -1029.7336 235.49231 2.2938491 1491.6476 -209.95869 -4.1259067 -63.72574 -52.347237 -72.863469 -20.2529 -21.202225 -36.80768 15.820914 36.256996 27.837899 205.06161 205.28482 228.74061 53.516205 53.666764 76.479575 51.898427 28.841484 28.947835
3000 1375.6945 -1032.3272 -1432.388 2.2938491 1483.7188 -14.944433 -4.1309886 -67.857182 -50.461537 -79.041956 -20.359329 -18.394118 -30.634049 16.973116 39.991949 29.200709 205.96072 205.57169 228.76797 53.760188 53.974806 76.829718 51.809223 28.715153 28.726595
4500 1526.5784 -1034.4597 1558.1337 2.2938491 1482.7867 -70.886348 -4.1310256 -67.022382 -54.684704 -77.069485 -22.576461 -17.672784 -32.228898 21.458044 38.393569 27.72595 204.72251 205.88009 229.07903 53.899658 53.829006 76.717342 51.727843 28.636004 28.863718
6000 1491.1951 -1030.0995 562.54917 2.2938491 1482.4806 -60.021349 -4.1307545 -66.909586 -58.886858 -80.148099 -22.601629 -19.09635 -33.473899 22.377747 38.855891 30.853996 204.70732 205.70649 229.01661 53.84119 53.800462 76.711553 51.690081 28.694904 28.797116
7500 1330.8214 -1035.6828 -1407.4142 2.2938491 1480.7544 -63.898974 -4.1310393 -62.886575 -58.471219 -80.882593 -20.651266 -18.941729 -34.494541 18.287621 38.644547 32.466665 204.67832 205.92138 228.89129 53.887237 53.779706 76.803588 51.754653 28.661714 28.868533
9000 1377.3139 -1030.6102 -814.50808 2.2938491 1480.0394 -57.969892 -4.1308955 -62.399927 -57.505746 -80.761377 -20.199819 -21.000829 -36.738929 17.319159 39.700869 31.315234 204.64296 206.17515 228.48224 53.911268 53.704831 76.8708 51.796155 28.641886 28.861077
10500 1419.4538 -1032.4784 -554.39941 2.2938491 1481.1811 -7.9992199 -4.1309985 -59.045791 -61.164487 -82.861664 -19.890936 -21.168588 -35.873778 16.458244 37.100379 35.570692 204.9188 205.93531 228.57289 53.947197 53.739418 76.918077 51.784088 28.653206 28.87283
12000 1442.3335 -1030.2902 -131.99922 2.2938491 1482.4991 25.724832 -4.1307257 -58.119089 -60.519191 -82.155615 -20.069823 -21.727839 -36.795312 16.944019 35.542297 35.788632 205.06536 205.89715 228.49105 53.949154 53.764738 76.945863 51.812548 28.698335 28.903557
13500 1618.255 -1034.0691 448.39746 2.2938491 1482.9429 33.42958 -4.1306128 -59.840288 -61.599932 -82.215965 -20.598551 -21.492035 -36.443374 17.607876 36.241716 35.998172 205.07866 205.84943 228.61637 53.944979 53.774191 76.903895 51.792701 28.74114 28.89238
15000 1364.3796 -1029.6878 -966.13025 2.2938491 1483.2726 65.784103 -4.1306007 -58.826126 -60.177687 -80.570212 -20.026628 -22.061421 -37.332987 16.618347 35.824117 34.991167 205.15731 205.79483 228.63407 53.929721 53.813353 76.896163 51.776923 28.752029 28.878669
16500 1669.1757 -1031.0699 43.341777 2.2938491 1483.2491 18.99268 -4.1304591 -59.962016 -59.15211 -80.102432 -20.399129 -22.025441 -37.82746 17.082159 36.290705 33.775651 205.14266 205.7193 228.63038 53.925355 53.785453 76.855119 51.737872 28.759369 28.898142
18000 1550.5382 -1027.3945 -1246.0289 2.2938491 1483.6491 5.7408759 -4.1303353 -59.35016 -58.728701 -78.818663 -20.150701 -21.942883 -37.891844 17.203814 35.337637 33.285126 205.13384 205.6063 228.57531 53.891378 53.769275 76.832714 51.74568 28.791121 28.877624
19500 1629.5036 -1036.9849 -451.26178 2.2938491 1484.1226 27.288331 -4.1304459 -58.665989 -60.109261 -78.714857 -20.404554 -21.983442 -37.992827 17.117122 34.608111 34.643094 205.23998 205.53366 228.59186 53.890849 53.787956 76.856299 51.736162 28.786354 28.85888
21000 1472.5544 -1032.859 -20.186692 2.2938491 1483.3486 19.365496 -4.130639 -59.030496 -61.687931 -79.499878 -21.045487 -21.978669 -37.750071 17.282482 34.752705 35.830146 205.166 205.4977 228.68839 53.897034 53.798516 76.833481 51.716388 28.777538 28.853221
22500 1538.3331 -1029.4222 -1516.1779 2.2938491 1483.9369 9.3663668 -4.1304658 -59.601342 -61.528294 -79.886775 -21.058116 -21.744815 -37.415441 17.458006 35.03524 35.490302 205.15957 205.3737 228.66857 53.875938 53.82329 76.813455 51.710539 28.807394 28.846491
24000 1640.6306 -1032.8747 1820.5076 2.2938491 1484.3582 -2.9605818 -4.1303985 -60.752912 -62.308755 -80.507722 -21.295171 -21.728498 -37.85529 17.636088 35.38702 36.141494 205.19032 205.28915 228.69633 53.859405 53.858117 76.802512 51.728172 28.822365 28.83436
25500 1432.5405 -1036.4177 165.16737 2.2938491 1483.2229 8.3729002 -4.1307362 -60.653401 -61.891943 -80.020623 -21.215377 -21.694568 -37.770769 17.468376 35.128883 36.013452 205.2687 205.29914 228.65445 53.868129 53.866433 76.831986 51.734064 28.809762 28.823143
27000 1459.7165 -1032.2704 555.49626 2.2938491 1483.5999 29.734336 -4.1307773 -60.348436 -62.451484 -79.397912 -21.536942 -21.312644 -37.473352 18.07619 34.322981 36.063688 205.28479 205.36871 228.6014 53.882785 53.860318 76.843783 51.736186 28.791218 28.824958
28500 1398.7866 -1032.325 -228.86327 2.2938491 1482.9241 10.135953 -4.1308163 -60.923204 -62.1935 -80.289996 -21.326799 -21.465421 -37.781979 17.525986 35.112803 36.122375 205.33196 205.38849 228.51467 53.877397 53.85885 76.855869 51.748421 28.791318 28.810646
30000 1609.4626 -1026.1198 2151.4352 2.2938491 1482.737 -6.9747499 -4.130764 -62.14162 -62.578377 -79.864982 -21.683154 -21.501264 -37.647952 18.064145 35.592848 35.670682 205.30816 205.42759 228.45924 53.874997 53.845931 76.855299 51.757648 28.798886 28.822951
31500 1535.1988 -1030.7627 1962.4562 2.2938491 1482.9354 -2.7241836 -4.1306143 -61.870375 -62.851578 -80.524128 -21.560593 -21.908782 -38.604429 18.110966 35.564598 36.054336 205.32395 205.40536 228.48839 53.874999 53.854825 76.856925 51.764937 28.810228 28.831593
33000 1570.1208 -1026.2494 351.76291 2.2938491 1482.996 -7.4807931 -4.130577 -62.238722 -63.288756 -80.80606 -21.615247 -21.67204 -38.37626 18.053097 35.862534 36.372658 205.33168 205.41606 228.43691 53.871561 53.849411 76.854679 51.770903 28.813329 28.832923
34500 1432.3272 -1031.7548 419.21972 2.2938491 1482.7892 -28.425324 -4.1304667 -61.926882 -63.333125 -80.201249 -21.557493 -21.477997 -38.188053 17.990156 35.484765 36.40502 205.32852 205.36594 228.42193 53.858032 53.85339 76.845155 51.776258 28.810311 28.83193
36000 1461.1221 -1031.0936 -732.09091 2.2938491 1482.7576 -17.70291 -4.1306165 -62.179266 -62.986391 -81.351014 -21.399698 -21.423609 -38.39933 17.389924 36.483096 36.528136 205.36025 205.37113 228.45226 53.869219 53.85851 76.853637 51.780873 28.812037 28.835983
37500 1504.8525 -1035.0799 1917.6077 2.2938491 1482.2878 -23.877209 -4.1306315 -62.332808 -63.43488 -81.773513 -21.40584 -21.375369 -38.287661 17.372388 36.472678 37.074729 205.36817 205.37669 228.40654 53.854172 53.855291 76.849674 51.775051 28.80071 28.818624
39000 1467.8385 -1033.4844 685.3059 2.2938491 1481.8721 -31.824125 -4.1307881 -63.029639 -63.482571 -82.632663 -21.710699 -21.140028 -38.056647 17.507416 37.185033 37.136598 205.33141 205.38158 228.41356 53.864319 53.853944 76.842991 51.764685 28.788943 28.816327
40500 1471.3714 -1035.0313 -661.11589 2.2938491 1482.1911 -28.660441 -4.1307331 -63.073554 -63.301254 -81.939449 -21.849646 -21.333366 -38.459438 17.701055 36.929221 36.777905 205.3174 205.38828 228.42064 53.864766 53.857226 76.830391 51.764266 28.789323 28.813992
42000 1524.1294 -1035.634 2140.1687 2.2938491 1481.9241 -26.308067 -4.1307414 -63.243189 -62.730676 -81.627378 -21.801779 -21.351359 -38.561895 17.541375 37.122985 36.480135 205.34025 205.40651 228.42086 53.866239 53.864292 76.836071 51.765489 28.788169 28.810743
43500 1432.3705 -1034.551 526.49996 2.2938491 1482.1016 -20.246935 -4.1307637 -62.7724 -62.037498 -80.906378 -21.565193 -21.248644 -38.30893 17.35505 36.763529 35.974546 205.35875 205.40419 228.41899 53.869164 53.863535 76.833317 51.761902 28.785203 28.815597
45000 1490.388 -1032.0658 956.44619 2.2938491 1482.0953 -16.260449 -4.1307284 -62.718709 -61.819139 -80.292247 -21.55464 -21.249523 -38.355562 17.650135 36.482629 35.521216 205.36793 205.41743 228.39993 53.868999 53.866369 76.841723 51.766771 28.793869 28.808214
46500 1356.2575 -1032.0811 -502.03492 2.2938491 1482.1181 -12.636107 -4.13075 -62.68624 -61.442684 -80.301091 -21.478828 -21.171205 -38.25252 17.41833 36.696398 35.405695 205.36772 205.38631 228.3701 53.859688 53.869887 76.850495 51.770439 28.794225 28.795947
48000 1462.4861 -1032.4019 657.08276 2.2938491 1482.05 -21.340898 -4.1306466 -62.635163 -61.415766 -79.917249 -21.386814 -21.256478 -38.35836 17.260015 36.61439 35.397473 205.30205 205.37133 228.40523 53.861273 53.865346 76.83163 51.771796 28.797153 28.801011
49500 1403.792 -1033.3865 -106.37364 2.2938491 1481.9419 -13.709551 -4.1307951 -62.875109 -61.637029 -79.597373 -21.505971 -21.141812 -38.230756 17.55599 36.546467 35.220436 205.29491 205.41266 228.39157 53.866215 53.872264 76.830304 51.758539 28.787714 28.79857
51000 1438.1787 -1032.0109 -1059.9064 2.2938491 1481.6449 -15.09976 -4.1309897 -62.670557 -61.561705 -79.379648 -21.567968 -21.055659 -38.015182 17.671904 36.332941 35.014233 205.32924 205.40088 228.39835 53.868539 53.885315 76.822335 51.745659 28.789851 28.792545
52500 1382.2099 -1033.058 -1259.1214 2.2938491 1481.5946 -20.300497 -4.13093 -63.232758 -62.310412 -79.804684 -21.802267 -21.260561 -38.419579 18.056561 36.720771 34.972269 205.34284 205.35156 228.41342 53.864857 53.891003 76.81602 51.732483 28.791137 28.791887
54000 1533.7764 -1028.7613 1714.1927 2.2938491 1481.7208 -28.620488 -4.1308301 -63.113526 -61.903055 -79.382866 -21.730147 -21.21458 -38.316562 18.001225 36.474036 34.681959 205.34377 205.31381 228.39872 53.84474 53.889496 76.812664 51.743856 28.802121 28.781409
55500 1523.4727 -1033.3641 -612.71038 2.2938491 1481.8812 -36.263593 -4.1307128 -63.926005 -61.676301 -79.572696 -21.935651 -21.124984 -38.120805 18.30654 36.789152 34.374772 205.31795 205.35529 228.36668 53.847443 53.882195 76.806901 51.74734 28.814592 28.796537
57000 1491.3678 -1026.9983 -1119.4609 2.2938491 1481.9455 -36.326068 -4.1306892 -63.595683 -61.564985 -79.974258 -21.822985 -21.136666 -38.16275 18.083171 36.766293 34.707154 205.29618 205.33458 228.38626 53.852279 53.878924 76.797511 51.735536 28.815462 28.802463
58500 1438.7756 -1027.9678 -1657.13 2.2938491 1481.9051 -46.49998 -4.1306702 -63.970101 -61.372119 -79.511332 -21.995264 -21.032781 -38.038112 18.401226 36.639522 34.227378 205.29966 205.32376 228.38361 53.852024 53.875838 76.788068 51.734772 28.81576 28.803892
60000 1325.4993 -1034.1913 -2362.9866 2.2938491 1481.5012 -44.903145 -4.1307851 -63.963407 -61.431254 -79.683191 -22.024759 -21.138562 -38.223052 18.153279 36.826694 34.405325 205.27702 205.36875 228.40644 53.856994 53.875391 76.799152 51.731492 28.811173 28.797945
61500 1505.9305 -1036.2556 132.06247 2.2938491 1481.6293 -37.731588 -4.1308223 -64.381464 -61.674639 -80.188334 -22.158723 -21.108889 -38.248855 18.390358 37.059536 34.455424 205.23517 205.35912 228.41484 53.864166 53.876015 76.794352 51.722323 28.804043 28.801179
63000 1534.39 -1039.4484 1046.653 2.2938491 1481.7949 -33.380601 -4.1308464 -64.068931 -61.368649 -79.704263 -22.130922 -21.067286 -38.215994 18.495768 36.761782 34.189797 205.22412 205.35391 228.43945 53.869115 53.87449 76.793337 51.712686 28.794684 28.800456
64500 1361.7518 -1030.5694 790.72852 2.2938491 1481.8251 -28.691877 -4.1308571 -64.06363 -61.273278 -79.676705 -22.16565 -21.02496 -38.172259 18.638855 36.719131 34.006715 205.20559 205.35747 228.42261 53.874341 53.871631 76.797534 51.715519 28.789202 28.800286
66000 1493.9592 -1034.8315 -83.381519 2.2938491 1481.8804 -28.444673 -4.130839 -63.871998 -60.922315 -79.543208 -22.084939 -21.051796 -38.178075 18.469097 36.653501 33.983218 205.17353 205.37012 228.4333 53.873209 53.87128 76.793735 51.715772 28.787185 28.799271
67500 1421.276 -1033.8109 -435.15037 2.2938491 1482.0268 -15.717566 -4.1308595 -63.961701 -61.265171 -79.32614 -22.181352 -20.923325 -37.927752 18.58702 36.575619 34.041641 205.20462 205.4057 228.41483 53.873248 53.867409 76.806453 51.725025 28.781635 28.790933
69000 1462.71 -1031.786 2044.924 2.2938491 1482.0808 -12.41913 -4.1308487 -63.537939 -61.572781 -79.813735 -22.037844 -20.940539 -37.978104 18.246032 36.52598 34.631512 205.21991 205.43641 228.3772 53.872474 53.864337 76.817521 51.736948 28.777643 28.790877
70500 1460.7684 -1032.5687 -950.70337 2.2938491 1482.2232 -6.1090924 -4.1308194 -62.959394 -61.457796 -79.687401 -21.885475 -20.919469 -37.921646 18.034683 36.313758 34.737829 205.22464 205.41986 228.36249 53.872577 53.869324 76.818318 51.735068 28.780852 28.790481
72000 1421.4484 -1031.353 1648.2423 2.2938491 1482.362 -8.171728 -4.1308339 -62.919483 -61.526828 -79.571975 -21.913281 -20.822948 -37.684888 18.014821 36.170823 34.809531 205.23354 205.40265 228.37137 53.876829 53.868192 76.821146 51.735902 28.781575 28.799457
73500 1752.498 -1034.2169 1469.9503 2.2938491 1482.5906 -3.8737403 -4.130845 -62.630533 -61.309844 -79.729568 -21.758626 -20.825548 -37.860657 17.748076 36.259904 34.845837 205.22997 205.41547 228.3844 53.883713 53.868296 76.824464 51.735899 28.783023 28.803298
75000 1520.6212 -1036.5004 837.2324 2.2938491 1482.4238 -0.1913038 -4.1308831 -62.821147 -61.828489 -79.567323 -21.889326 -20.789721 -37.714104 17.879632 36.22222 34.919953 205.2442 205.41386 228.37542 53.88291 53.867274 76.830786 51.73158 28.778935 28.794923
76500 1439.6706 -1034.3536 3.867216 2.2938491 1482.3799 2.9201733 -4.1309078 -63.110409 -61.628579 -79.646303 -21.943803 -20.784043 -37.709136 18.090962 36.339502 34.640705 205.22882 205.4377 228.37991 53.889722 53.867867 76.832127 51.730291 28.776106 28.800613
78000 1472.2878 -1032.0488 606.92009 2.2938491 1482.4315 4.0162921 -4.1308864 -63.18742 -61.476216 -79.518345 -21.915006 -20.795344 -37.685095 18.160875 36.317768 34.562962 205.21304 205.4681 228.35132 53.888419 53.860959 76.832795 51.726368 28.769804 28.803835
79500 1512.5998 -1031.4782 -608.33112 2.2938491 1482.4683 -4.9946179 -4.1308672 -63.136709 -61.38976 -79.342774 -21.877029 -20.790716 -37.765995 18.082202 36.307384 34.529887 205.20173 205.45621 228.33612 53.884127 53.85096 76.827797 51.725854 28.764443 28.800151
81000 1517.4109 -1028.3826 -2043.4874 2.2938491 1482.2404 -19.291403 -4.130792 -62.826972 -61.57491 -78.919307 -21.815485 -20.773717 -37.72361 18.034102 35.870919 34.590596 205.18765 205.42705 228.3524 53.878666 53.848387 76.814541 51.723458 28.771787 28.801959
82500 1495.0416 -1034.9971 -919.28281 2.2938491 1482.5918 -7.0685741 -4.1308239 -62.741622 -61.394991 -78.779816 -21.795693 -20.713253 -37.628978 18.028438 35.854382 34.286915 205.18358 205.42059 228.39152 53.88507 53.855289 76.812978 51.718793 28.771939 28.803997
84000 1491.0232 -1032.0478 1693.2093 2.2938491 1482.6179 -13.503477 -4.1306843 -62.623399 -61.545116 -78.875891 -21.831602 -20.760705 -37.783204 18.049826 35.698982 34.461373 205.18823 205.41432 228.37952 53.880292 53.848427 76.812319 51.723745 28.776002 28.809842
85500 1432.7633 -1032.698 -881.37505 2.2938491 1482.5743 -10.555756 -4.1306695 -62.232152 -61.412377 -78.830213 -21.727847 -20.801103 -37.812275 17.923531 35.499394 34.546639 205.19889 205.41789 228.36824 53.880011 53.849407 76.819282 51.727384 28.780783 28.812392
87000 1485.3288 -1032.6691 158.89155 2.2938491 1482.5535 -6.3950299 -4.1307187 -62.169286 -61.063223 -78.970108 -21.61197 -20.763121 -37.82023 17.757088 35.636063 34.438868 205.1894 205.43526 228.38369 53.883498 53.850233 76.819949 51.726626 28.776566 28.814967
88500 1504.1685 -1034.896 -576.81489 2.2938491 1482.5577 -4.2302198 -4.1307273 -62.060242 -60.91541 -79.120582 -21.5292 -20.789763 -37.890171 17.627385 35.769308 34.444455 205.17713 205.41733 228.41274 53.884038 53.851418 76.815226 51.720575 28.778578 28.81437
90000 1449.8972 -1033.1249 16.828339 2.2938491 1482.5956 -3.7681039 -4.1306958 -62.088756 -60.725318 -79.170616 -21.492856 -20.734831 -37.741223 17.584396 35.868249 34.318289 205.18548 205.4084 228.40148 53.880047 53.853611 76.816207 51.723692 28.779781 28.809322
91500 1416.2681 -1033.1616 -16.270943 2.2938491 1482.4743 -10.282897 -4.1306355 -62.133545 -60.706158 -79.069992 -21.526357 -20.751961 -37.744268 17.678691 35.77502 34.270056 205.20409 205.40965 228.38688 53.875395 53.853283 76.818389 51.731399 28.784679 28.812085
93000 1641.0262 -1032.9652 1541.4778 2.2938491 1482.7239 -0.21530915 -4.1306987 -62.103472 -60.524542 -78.94244 -21.416169 -20.762777 -37.724968 17.503079 35.79639 34.254575 205.21819 205.4208 228.38518 53.874775 53.859201 76.82538 51.73286 28.787014 28.806284
94500 1446.894 -1033.0546 -1172.8149 2.2938491 1482.6464 3.4467336 -4.1307822 -62.347354 -60.242764 -79.472893 -21.34953 -20.717759 -37.687715 17.289476 36.186844 34.277361 205.23165 205.43019 228.39821 53.884069 53.865596 76.827934 51.732077 28.786882 28.805655
96000 1542.079 -1029.6926 322.45446 2.2938491 1482.5441 4.6485293 -4.1308136 -62.206988 -59.973518 -79.080994 -21.288972 -20.760823 -37.729071 17.259751 36.128248 33.998066 205.24388 205.42381 228.41608 53.886007 53.867776 76.82741 51.731615 28.791259 28.805397
97500 1487.9454 -1034.7172 820.51649 2.2938491 1482.5632 8.5386652 -4.1308234 -62.143296 -60.101635 -78.931963 -21.290736 -20.716267 -37.692871 17.462016 36.002029 33.918161 205.26305 205.43429 228.40827 53.888433 53.870451 76.826913 51.728767 28.791481 28.804241
99000 1368.2594 -1031.2037 593.35668 2.2938491 1482.6064 5.0925632 -4.1307682 -61.963501 -60.016279 -78.857674 -21.245113 -20.75973 -37.759628 17.293147 36.020666 33.897023 205.26324 205.41903 228.40538 53.882522 53.868615 76.826529 51.734223 28.797165 28.804278
100500 1442.5153 -1033.8773 -538.06378 2.2938491 1482.5806 8.0051295 -4.1307853 -61.807415 -59.816464 -78.885211 -21.182274 -20.821701 -37.887086 17.136467 36.03321 33.886956 205.29244 205.41979 228.40702 53.882321 53.875874 76.834725 51.739661 28.801012 28.804575
102000 1523.8256 -1030.5549 1412.4566 2.2938491 1482.5866 4.0411856 -4.1307569 -61.444398 -59.781654 -78.484191 -21.18101 -20.822776 -37.865635 17.152952 35.720218 33.798513 205.2959 205.39482 228.41979 53.878609 53.877207 76.830098 51.741804 28.807055 28.805499
103500 1577.9333 -1030.2793 16.968578 2.2938491 1482.4554 1.2961629 -4.1307672 -61.397825 -59.829587 -78.4479 -21.161504 -20.867524 -37.888147 17.149447 35.662363 33.851317 205.28757 205.3981 228.43413 53.882435 53.873014 76.827589 51.735462 28.805202 28.810239
105000 1337.0075 -1031.8541 -2721.9544 2.2938491 1482.4268 -4.353932 -4.1307412 -61.705223 -59.747259 -78.609622 -21.165441 -20.851207 -37.876114 17.14923 35.951734 33.665587 205.27089 205.39074 228.43789 53.879034 53.870275 76.822978 51.73248 28.802281 28.81082
106500 1422.8946 -1030.8343 -800.38058 2.2938491 1482.5115 -4.0049886 -4.1307542 -61.643384 -59.644844 -78.475169 -21.104781 -20.828498 -37.805234 16.983794 35.924403 33.682427 205.27511 205.39208 228.44888 53.881421 53.873402 76.821913 51.730452 28.801513 28.816076
108000 1576.0145 -1032.7976 973.46949 2.2938491 1482.6158 3.0627527 -4.1307693 -61.632096 -59.704639 -78.39173 -21.106554 -20.866293 -37.84322 16.999887 35.7367 33.736853 205.27847 205.39567 228.46373 53.883841 53.8794 76.823598 51.724192 28.797812 28.814282
109500 1469.798 -1035.4088 -1513.3569 2.2938491 1482.5815 -2.3554776 -4.1307587 -61.409226 -59.368417 -78.056976 -20.987396 -20.922787 -37.905832 16.80989 35.603164 33.571735 205.29739 205.39186 228.45528 53.881647 53.883201 76.826509 51.727265 28.803221 28.816387
111000 1450.1364 -1034.8692 535.01425 2.2938491 1482.5086 -4.9493018 -4.1307925 -61.853187 -59.298301 -78.058449 -21.0476 -20.870886 -37.809302 16.931849 35.815648 33.395258 205.30581 205.38706 228.47139 53.885853 53.883453 76.822939 51.72578 28.798242 28.817665
112500 1449.2612 -1032.1626 -707.9713 2.2938491 1482.6231 -5.6051571 -4.1307318 -61.617376 -59.400658 -77.86748 -21.058008 -20.900491 -37.885275 16.941367 35.595081 33.457412 205.31006 205.37483 228.46421 53.884923 53.884787 76.818386 51.725453 28.799728 28.818511
114000 1472.8275 -1037.0664 -442.38894 2.2938491 1482.8034 -1.1760851 -4.13075 -61.604652 -59.42193 -77.729625 -21.108945 -20.839988 -37.816934 17.027186 35.528809 33.333712 205.2996 205.40083 228.47441 53.889449 53.885434 76.822691 51.72532 28.799205 28.817456
115500 1412.2073 -1033.3813 -859.54093 2.2938491 1482.7115 -6.3971107 -4.1307164 -61.582698 -59.540524 -77.958489 -21.065292 -20.841779 -37.81416 17.014851 35.663213 33.266402 205.30868 205.39757 228.44955 53.887583 53.882631 76.821441 51.730925 28.798319 28.820824
117000 1460.2307 -1028.9074 -1164.6613 2.2938491 1482.657 -7.8697826 -4.1307244 -61.82235 -59.692597 -77.850871 -21.124418 -20.764516 -37.690786 17.155656 35.649724 33.269516 205.30451 205.41455 228.45187 53.893125 53.885988 76.81911 51.730761 28.798798 28.824658
118500 1493.0731 -1028.7066 -260.29362 2.2938491 1482.7469 -1.8511441 -4.1307413 -61.826554 -59.86035 -77.828964 -21.126638 -20.753378 -37.660607 17.198524 35.664955 33.285591 205.31841 205.42978 228.43324 53.895373 53.888281 76.82351 51.731769 28.799645 28.824431
120000 1345.6123 -1029.9346 -1895.5256 2.2938491 1482.7843 -4.5972195 -4.1307269 -61.669058 -59.838425 -77.745234 -21.161305 -20.848334 -37.830906 17.174454 35.604439 33.297851 205.32668 205.43762 228.42017 53.889381 53.883438 76.823854 51.733939 28.794303 28.822327
121500 1407.0748 -1031.8136 426.75808 2.2938491 1482.8284 -1.6468876 -4.1307603 -61.64701 -59.903233 -77.693914 -21.163628 -20.835781 -37.828167 17.171387 35.563809 33.348664 205.34563 205.44066 228.4023 53.88813 53.886137 76.827345 51.735371 28.794168 28.819736
123000 1526.2861 -1032.537 852.79109 2.2938491 1482.9332 5.0560365 -4.1307796 -61.724187 -59.904131 -77.473899 -21.179869 -20.815648 -37.857571 17.267887 35.516275 33.238968 205.36759 205.43856 228.38631 53.885394 53.886842 76.832314 51.732243 28.791888 28.813868
124500 1529.8037 -1031.1582 -92.453284 2.2938491 1483.0597 8.0257434 -4.130767 -61.73912 -59.872674 -77.532647 -21.149928 -20.801849 -37.741413 17.188 35.59366 33.235229 205.37362 205.43069 228.39692 53.88626 53.886586 76.834567 51.73587 28.793201 28.81626
126000 1496.3891 -1033.1452 -367.03965 2.2938491 1483.0771 4.6045133 -4.1307269 -61.729431 -59.954414 -77.338248 -21.179207 -20.784619 -37.762061 17.353033 35.439541 33.189469 205.36796 205.44072 228.37772 53.885265 53.881811 76.830859 51.738138 28.792247 28.818739
127500 1466.1306 -1030.612 -926.29759 2.2938491 1483.133 11.366773 -4.1307722 -61.602447 -59.920526 -77.282372 -21.159672 -20.75159 -37.719968 17.307656 35.296921 33.236486 205.37779 205.44691 228.38745 53.887086 53.885763 76.836326 51.737488 28.792599 28.815257
129000 1569.3651 -1032.9186 -442.35004 2.2938491 1483.1369 10.328658 -4.1307387 -61.543466 -59.942662 -77.483904 -21.119911 -20.722378 -37.671723 17.281249 35.232627 33.459675 205.36599 205.43931 228.40108 53.884216 53.882413 76.831442 51.737409 28.790919 28.811477
130500 1421.911 -1031.8139 -758.70123 2.2938491 1483.0449 11.4085 -4.1307613 -61.333773 -59.934246 -77.426746 -21.113826 -20.713965 -37.674443 17.157344 35.141168 33.569733 205.36146 205.44547 228.4022 53.886232 53.879268 76.832738 51.73627 28.786769 28.811493
132000 1524.2191 -1037.407 -480.85722 2.2938491 1482.8528 8.9287162 -4.1308006 -61.561432 -60.092757 -77.742507 -21.167795 -20.674863 -37.639706 17.29371 35.275171 33.678108 205.36428 205.45116 228.4058 53.889052 53.879475 76.834536 51.73562 28.786514 28.811264
133500 1494.6866 -1034.7465 416.3259 2.2938491 1482.8997 8.7918538 -4.1307995 -61.539391 -60.210309 -78.095947 -21.12506 -20.675829 -37.641619 17.068859 35.348266 34.049804 205.37443 205.45053 228.39031 53.888328 53.87864 76.837876 51.741192 28.786138 28.811558
135000 1569.7047 -1036.5833 1648.5811 2.2938491 1482.8373 16.413757 -4.1308862 -61.379715 -60.19875 -77.885213 -21.077149 -20.659689 -37.571815 17.039133 35.160383 34.027006 205.38045 205.47385 228.40044 53.89379 53.883916 76.84446 51.74077 28.782168 28.811503
136500 1434.076 -1032.3999 1440.6873 2.2938491 1482.8065 20.877471 -4.130942 -61.250129 -60.36518 -77.797762 -21.173422 -20.644652 -37.555746 17.168354 34.98673 34.050232 205.39567 205.46987 228.41208 53.893145 53.888561 76.850201 51.742217 28.782951 28.809364
138000 1435.6229 -1027.2932 -1994.0334 2.2938491 1482.9676 28.338068 -4.1309771 -61.286555 -60.502324 -77.929763 -21.144817 -20.627874 -37.5188 16.99209 35.098588 34.233379 205.38967 205.48076 228.41949 53.897481 53.889052 76.852273 51.743864 28.782553 28.811336
139500 1351.2102 -1032.4433 -239.90235 2.2938491 1482.9605 27.292315 -4.1309341 -61.209087 -60.465858 -77.765563 -21.106356 -20.671478 -37.691344 16.943971 35.047976 34.174565 205.38424 205.48042 228.42161 53.896767 53.885832 76.847548 51.746591 28.779555 28.812114
141000 1467.5087 -1031.9354 -532.99883 2.2938491 1482.8932 24.307649 -4.1309051 -61.070518 -60.441795 -77.624715 -21.086802 -20.640868 -37.683803 17.017529 34.883575 34.096205 205.37075 205.48554 228.42021 53.896931 53.882672 76.844472 51.745488 28.777347 28.815227
142500 1426.8036 -1029.0269 475.29365 2.2938491 1482.9486 28.873848 -4.1309222 -61.253743 -60.394307 -77.623948 -21.117683 -20.666512 -37.724806 17.009433 34.985626 34.037536 205.38057 205.50055 228.40554 53.898614 53.880885 76.846518 51.744358 28.772507 28.8159
144000 1442.207 -1031.8281 666.41114 2.2938491 1482.9324 27.849865 -4.1309475 -61.168217 -60.212673 -77.584118 -21.079119 -20.692903 -37.826824 16.878262 35.048543 34.002324 205.37899 205.51754 228.39212 53.90079 53.88167 76.847699 51.746645 28.771418 28.817434
145500 1513.7861 -1032.8894 103.68291 2.2938491 1483.1433 26.889484 -4.1309369 -61.076852 -60.104649 -77.709917 -21.033322 -20.670939 -37.779427 16.717574 35.122343 34.057639 205.3625 205.52972 228.37916 53.90269 53.879604 76.847902 51.74393 28.76916 28.820449
147000 1403.8295 -1038.4747 125.48856 2.2938491 1483.0944 25.436764 -4.1309291 -61.058221 -60.015165 -77.827606 -21.025708 -20.75728 -37.905513 16.756237 35.091941 34.043829 205.36839 205.52553 228.38543 53.902592 53.879578 76.848283 51.744624 28.771608 28.822339
148500 1570.4334 -1030.4725 1176.9001 2.2938491 1482.9036 26.018243 -4.1309919 -60.988967 -59.970975 -77.596029 -21.062881 -20.789165 -38.050798 16.784906 34.917316 34.005084 205.36511 205.5204 228.39472 53.905268 53.883557 76.849572 51.742284 28.771597 28.820426
150000 1637.0679 -1032.2165 1094.5581 2.2938491 1482.9569 27.608241 -4.1310012 -61.014673 -59.868323 -77.559954 -21.028486 -20.762668 -37.995752 16.75055 34.948738 33.9703 205.36993 205.53181 228.3843 53.905331 53.882296 76.852069 51.742975 28.773161 28.820754
Loop time of 23.1063 on 4 procs for 150000 steps with 250 atoms
Performance: 429.638 ns/day, 0.056 hours/ns, 6491.724 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 13.514 | 15.049 | 16.345 | 27.6 | 65.13
Neigh | 0.22265 | 0.23987 | 0.26064 | 2.8 | 1.04
Comm | 2.4163 | 3.7264 | 5.2764 | 56.0 | 16.13
Output | 0.0032872 | 0.0035512 | 0.0043178 | 0.7 | 0.02
Modify | 3.7671 | 3.7877 | 3.8007 | 0.7 | 16.39
Other | | 0.2998 | | | 1.30
Nlocal: 62.5 ave 88 max 40 min
Histogram: 1 0 0 0 2 0 0 0 0 1
Nghost: 432.75 ave 543 max 326 min
Histogram: 1 0 0 0 1 1 0 0 0 1
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 1650.5 ave 2334 max 1048 min
Histogram: 1 0 0 0 2 0 0 0 0 1
Total # of neighbors = 6602
Ave neighs/atom = 26.408
Neighbor list builds = 2667
Dangerous builds = 0
# Output final values
include final_output.in
# Average moduli for cubic crystals
variable C11cubic equal (${C11}+${C22}+${C33})/3.0
variable C11cubic equal (148.370873646034+${C22}+${C33})/3.0
variable C11cubic equal (148.370873646034+149.679104177467+${C33})/3.0
variable C11cubic equal (148.370873646034+149.679104177467+154.839963498785)/3.0
variable C12cubic equal (${C12}+${C13}+${C23})/3.0
variable C12cubic equal (68.4935246016777+${C13}+${C23})/3.0
variable C12cubic equal (68.4935246016777+63.7218992685599+${C23})/3.0
variable C12cubic equal (68.4935246016777+63.7218992685599+62.7910539636263)/3.0
variable C44cubic equal (${C44}+${C55}+${C66})/3.0
variable C44cubic equal (34.8846541689484+${C55}+${C66})/3.0
variable C44cubic equal (34.8846541689484+35.1274361331555+${C66})/3.0
variable C44cubic equal (34.8846541689484+35.1274361331555+40.8641262264389)/3.0
variable bulkmodulus equal (${C11cubic}+2*${C12cubic})/3.0
variable bulkmodulus equal (150.963313774095+2*${C12cubic})/3.0
variable bulkmodulus equal (150.963313774095+2*65.0021592779546)/3.0
variable shearmodulus1 equal ${C44cubic}
variable shearmodulus1 equal 36.9587388428476
variable shearmodulus2 equal (${C11cubic}-${C12cubic})/2.0
variable shearmodulus2 equal (150.963313774095-${C12cubic})/2.0
variable shearmodulus2 equal (150.963313774095-65.0021592779546)/2.0
variable poissonratio equal 1.0/(1.0+${C11cubic}/${C12cubic})
variable poissonratio equal 1.0/(1.0+150.963313774095/${C12cubic})
variable poissonratio equal 1.0/(1.0+150.963313774095/65.0021592779546)
# For Stillinger-Weber silicon, the analytical results
# are known to be (E. R. Cowley, 1988):
# C11 = 151.4 GPa
# C12 = 76.4 GPa
# C44 = 56.4 GPa
#print "========================================="
#print "Components of the Elastic Constant Tensor"
#print "========================================="
print "Elastic Constant C11 = ${C11} ${cunits}"
Elastic Constant C11 = 148.370873646034 GPa
print "Elastic Constant C22 = ${C22} ${cunits}"
Elastic Constant C22 = 149.679104177467 GPa
print "Elastic Constant C33 = ${C33} ${cunits}"
Elastic Constant C33 = 154.839963498785 GPa
print "Elastic Constant C12 = ${C12} ${cunits}"
Elastic Constant C12 = 68.4935246016777 GPa
print "Elastic Constant C13 = ${C13} ${cunits}"
Elastic Constant C13 = 63.7218992685599 GPa
print "Elastic Constant C23 = ${C23} ${cunits}"
Elastic Constant C23 = 62.7910539636263 GPa
print "Elastic Constant C44 = ${C44} ${cunits}"
Elastic Constant C44 = 34.8846541689484 GPa
print "Elastic Constant C55 = ${C55} ${cunits}"
Elastic Constant C55 = 35.1274361331555 GPa
print "Elastic Constant C66 = ${C66} ${cunits}"
Elastic Constant C66 = 40.8641262264389 GPa
print "Elastic Constant C14 = ${C14} ${cunits}"
Elastic Constant C14 = 6.92404731313863 GPa
print "Elastic Constant C15 = ${C15} ${cunits}"
Elastic Constant C15 = -0.241854528091832 GPa
print "Elastic Constant C16 = ${C16} ${cunits}"
Elastic Constant C16 = -0.348583506816062 GPa
print "Elastic Constant C24 = ${C24} ${cunits}"
Elastic Constant C24 = -8.12880441353851 GPa
print "Elastic Constant C25 = ${C25} ${cunits}"
Elastic Constant C25 = 0.489292435379784 GPa
print "Elastic Constant C26 = ${C26} ${cunits}"
Elastic Constant C26 = 0.823159952503936 GPa
print "Elastic Constant C34 = ${C34} ${cunits}"
Elastic Constant C34 = 0.696244884461012 GPa
print "Elastic Constant C35 = ${C35} ${cunits}"
Elastic Constant C35 = 0.0721961245198595 GPa
print "Elastic Constant C36 = ${C36} ${cunits}"
Elastic Constant C36 = -0.201416093587799 GPa
print "Elastic Constant C45 = ${C45} ${cunits}"
Elastic Constant C45 = -0.310665193707046 GPa
print "Elastic Constant C46 = ${C46} ${cunits}"
Elastic Constant C46 = -0.491041219509184 GPa
print "Elastic Constant C56 = ${C56} ${cunits}"
Elastic Constant C56 = 7.93280717781775 GPa
print "========================================="
=========================================
print "Average properties for a cubic crystal"
Average properties for a cubic crystal
print "========================================="
=========================================
print "Bulk Modulus = ${bulkmodulus} ${cunits}"
Bulk Modulus = 93.6558774433347 GPa
print "Shear Modulus 1 = ${shearmodulus1} ${cunits}"
Shear Modulus 1 = 36.9587388428476 GPa
print "Shear Modulus 2 = ${shearmodulus2} ${cunits}"
Shear Modulus 2 = 42.9805772480702 GPa
print "Poisson Ratio = ${poissonratio}"
Poisson Ratio = 0.300984033972359
# summarize sampling protocol
variable tmp equal atoms
print "Number of atoms = ${tmp}"
Number of atoms = 250
print "Stress sampling interval = ${nevery}"
Stress sampling interval = 10
variable tmp equal ${nrun}/${nevery}
variable tmp equal 150000/${nevery}
variable tmp equal 150000/10
print "Stress sample count = ${tmp}"
Stress sample count = 15000
print "Born sampling interval = ${neveryborn}"
Born sampling interval = 100
variable tmp equal ${nrun}/${neveryborn}
variable tmp equal 150000/${neveryborn}
variable tmp equal 150000/100
print "Born sample count = ${tmp}"
Born sample count = 1500
Total wall time: 0:00:25

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