Compare commits

...

307 Commits

Author SHA1 Message Date
0cb72423b8 Merge pull request #4177 from lammps/maintenance
Fourth Set of Collected Bug Fixes and Maintenance Updates for 2 August 2023 Stable release
2024-08-28 17:22:37 -04:00
8fc48ad374 backport support for building PLUMED as plugin 2024-08-28 16:14:22 -04:00
6fbb96140f avoid INTEL package compilation failure with upcoming Intel compiler releases 2024-08-22 17:42:14 -04:00
c00326debc backport grid fixes from upstream 2024-08-21 23:53:13 -04:00
112f311591 throw error when trying to use neigh_modify exclude with dynamic groups 2024-08-21 10:34:46 -04:00
f3be84a22b fix issues spotted by valgrind 2024-08-20 09:31:03 -04:00
307a5b9592 fix bug causing memory corruption and clean up lmp_f2c.h header 2024-08-18 23:48:47 -04:00
14d9e2b722 not using sphinx-design 2024-08-16 18:06:24 -04:00
78fe9585a4 populate dump style index by moving commands off of commands_list.rst 2024-08-16 17:58:55 -04:00
f0f8b49afb distribute additional LaTeX files for better looking manual 2024-08-16 17:57:48 -04:00
d0cfe2d00f fix LATBOLTZ example 2024-08-16 17:53:59 -04:00
b1654f11c1 fix issues with compute smd/vol and related docs 2024-08-16 17:53:39 -04:00
6573a8d882 fix typo 2024-08-16 17:52:58 -04:00
aa68d6aacd modernize access to fixes and flag incompatible wall fixes 2024-08-16 17:52:12 -04:00
bdc08a99fe backport fix STORE/GLOBAL bugfix PR #4270 2024-08-10 10:23:45 -04:00
fc6fe9e740 add missing header 2024-08-09 21:16:34 -04:00
e2fede9076 sync write_dump with upstream to avoid issues. 2024-08-09 21:07:03 -04:00
48cde7c566 whitespace 2024-08-08 21:47:26 -04:00
14583e5fb6 backport improved fix from upstream 2024-08-08 21:36:52 -04:00
ab2558db15 improve error handling and reporting for MEAM user parameter file 2024-08-08 21:28:38 -04:00
5fa0c4951a sync with upstream 2024-08-08 21:28:27 -04:00
f8a0e1524e enforce initialization 2024-08-01 22:12:40 -04:00
592bd770a8 flag as update 4 2024-08-01 10:52:46 -04:00
13c56473a2 make sure a dump with ID WRITE_DUMP does not exist (e.g. as a leftover from a previous crash) 2024-08-01 10:16:25 -04:00
3d7088a9d9 make LAMMPS python module compatible with mpi4py 4.x.x 2024-08-01 03:46:20 -04:00
2f6567ad76 Fix reading empty type label string in restart 2024-07-31 10:16:19 -04:00
910bb4e111 sphinx 7.4.x is the last series with compatbility for current breath 2024-07-30 22:29:34 -04:00
6e7e2b7aee backport ValueTokenizer improvements from upstream 2024-07-30 16:43:46 -04:00
bdbb391364 add Neighbor::get_xhold() required by fix ipi bugfixes 2024-07-27 00:42:45 -04:00
ea67e3104d backport bugfixes for fix ipi from development branch 2024-07-26 23:35:14 -04:00
6c94fb5eea Backport of PR #4243 by @jtclemm which fixes issue #3831 2024-07-26 18:41:20 -04:00
84bfbe7936 make compatible with old and new style headers and make more specific 2024-07-25 17:05:52 -04:00
891e97ecf5 cosmetic 2024-07-25 17:00:35 -04:00
1fa18a45a8 re-align ReaxFF OpenMP version of ValidateLists with serial version 2024-07-25 08:46:39 -04:00
9a60dbbf31 apply version tag 2024-07-24 09:35:12 -04:00
92d07ceba4 Backport of commit 8bba2d12ec : Fix bug in GPU/CPU overlap 2024-07-24 08:28:17 -04:00
fe90838843 fix typo in comment 2024-07-23 19:03:58 -04:00
2d0aa2daf5 backport of occasional neighbor list rebuilt bugfix 2024-07-23 05:44:42 -04:00
696c2d15da warn about problematic compiler versions and C++ standard combinations 2024-07-15 18:24:20 -04:00
b570782d5e bugfix for unittest/fortran/wrap_configuration.cpp 2024-07-15 17:45:49 -04:00
88cd314dc9 only print fix reaxff/bonds output during setup the first time 2024-07-15 06:58:50 -04:00
7e51d1e049 fix compilation issue with latest QUIP/libAtoms code 2024-07-15 06:48:54 -04:00
d8c4115b86 update test since we have now one invocation also during setup 2024-07-11 15:03:10 -04:00
baa3c8e98c only call post_force() if it was selected as callback. 2024-07-11 15:03:02 -04:00
1a258d4349 The post_force callback should also be called during "setup" 2024-07-11 13:40:35 -04:00
87bbd70fd2 ensure atom map is reset by fix pour and fix deposit 2024-07-03 00:39:21 -04:00
850e4d14cd must use the "roots" communicator only on world->me == 0
Thanks to @joshuakempfert. See issue #4210
2024-06-28 14:19:31 -04:00
0717019b2d remove INTEL package from cross-compiler config.
It doesn't do much goos since we're not using an Intel compiler
and we are running out of capacity for auto-exported symbols
for the LAMMPS shared library (limited to 65k).
2024-06-27 06:27:25 -04:00
0c7720843b Make sure CMAKE_INSTALL_FULL_LIBDIR is defined when using it 2024-06-22 23:29:30 -04:00
4c18b2fe99 use suitable technical term 2024-06-22 14:26:07 -04:00
1d7b0b730f avoid segfault in fix shake/rattle when timestep is changed before run 2024-06-22 14:20:38 -04:00
2946087b45 avoid access to uninitialized step_respa pointer in Nose-Hoover fixes 2024-06-22 04:19:23 -04:00
94b2cd7fc5 don't throw an error when reading QEq parameters from file 2024-06-19 18:27:47 -04:00
dea53be1a5 error out when extracting non-existent QEq paramters from ReaxFF, e.g. when using pair style hybrid 2024-06-18 09:54:00 -04:00
c3c72a3bff always return initialized data when extracting per-type info 2024-06-18 09:48:54 -04:00
82b86031ef update fix plumed API version check and add reminder comments to build files 2024-06-17 07:15:15 -04:00
3dda8d752c avoid segfault trying to delete non-copied style 2024-06-16 01:28:44 -04:00
e5809d8be1 update Plumed support for version 2.8.4 and 2.9.1 2024-06-10 09:58:20 -04:00
9861c93225 add OPENMP support for pair style hybrid/scaled 2024-06-10 08:02:22 -04:00
65b21b8772 must reset "eval_in_progress[]" flags to avoid bogus circular dependency errors 2024-06-03 07:50:16 -04:00
8d8f6c3efd register build number for Windows 11 24H2 2024-05-30 19:41:42 -04:00
7d2238d7be install runtime dlls for LAMMPS library only with -DBUILD_SHARED_LIBS=yes 2024-05-20 21:11:22 -04:00
638f6e9551 fix bug with newton_bond off 2024-05-20 21:08:44 -04:00
a6979e5489 support that cmdargs is used multiple times and may be bytearrays directly 2024-05-20 21:08:32 -04:00
411574a39c Changed alpha_init initialization to avoid infinite loop with 0 starting
value.
2024-04-27 02:43:50 -04:00
874f5577d4 Added a vectorstyle variable check for fix_ave_histo.cpp 2024-04-27 02:41:12 -04:00
456449d4ff downgrade macOS to version 13 2024-04-27 02:40:41 -04:00
22cfd97f46 make pip install packages in virtual environment 2024-04-27 02:40:26 -04:00
453469d6fe breathe is currently not compatible with sphinx 7.3
# Conflicts:
#	doc/utils/requirements.txt
2024-04-16 19:52:20 -04:00
e699ced7bd make PyLammps mass property compatible with per-atom masses. 2024-04-14 18:27:55 -04:00
6baa2f432c pylammps: fix get atom.mass by atom.type 2024-04-14 18:27:42 -04:00
c114938867 Added symmetrization of cutoff in init_one() and fixed a print 2024-04-04 21:05:03 -04:00
e8294aa207 Backport of PR #4098 from develop 2024-04-04 21:04:19 -04:00
6e32b0cada Allow compute spin for groups other than all 2024-04-04 20:54:43 -04:00
6243735af4 Simplify output of windows version. If unknown build number just output "Windows Build #####" 2024-04-04 20:54:03 -04:00
5816c0875a Fix bug in Kokkos when shrink-wrapping with no atoms 2024-04-04 20:53:29 -04:00
a31617ef7b disable references to cuFFT (which is not yet used) 2024-04-04 20:52:01 -04:00
d5c7da1b0e fix bug in option arg parsing of fix ave/correlate, also update doc page for fix ave/correlate/long 2024-04-04 20:51:13 -04:00
0b1453f7ea call alternate minimum image code from @stanmoore1 from fix rigid/small 2024-04-04 20:49:46 -04:00
ba204b3989 alternate fix to PR #4116 2024-04-03 18:07:24 -04:00
fd86bbd982 must always return nfaces=0 for less than 3 vertices 2024-04-03 15:08:59 -04:00
020a4f6ee7 update and refactor xdr support and update its license 2024-03-31 21:49:48 -04:00
36b9d93b52 fix memory leaks in lammps_gather*concat() functions of the library interface 2024-03-19 12:04:40 -04:00
cbe2266e40 update electron radius velocities and radii in EFF NH fixes analog to fix nve/eff 2024-03-18 23:54:03 -04:00
fb10881636 fix bug in f2c string conversion detected by bound checking 2024-03-18 10:28:18 -04:00
dcbb09f321 improved revision of write_dump output frequency setting for 64-bit timesteps 2024-03-06 11:14:19 -05:00
b00cb7e6bd add missing symlink 2024-03-04 11:47:16 -05:00
edfe752b2a try a different workaround for "fix not computed at compatible time" with write_dump 2024-03-03 23:58:47 -05:00
6d28d53d60 fix missing thread initialization exposed by LAMMPS-GUI 2024-03-03 18:36:38 -05:00
9976d58b34 flag branch as maintenance version again 2024-03-02 15:14:08 -05:00
46265e36ce Merge pull request #4044 from lammps/maintenance
Third Set of Collected Bug Fixes and Maintenance Updates for 2 August 2023 Stable release
2024-03-02 15:11:27 -05:00
2a8d16ee4b update MS-MEAM examples 2024-03-01 18:56:43 -05:00
54035fba79 improve error messages for meam/ms 2024-03-01 18:56:16 -05:00
7ac835a12f Revert "This example needs to be replaced as it is not correct"
This reverts commit 688f4f5288.
2024-03-01 18:34:13 -05:00
6058fcc37e Revert "Removing because examples/meam/msmeam removed"
This reverts commit 573021b362.
2024-03-01 18:34:04 -05:00
ee5ee22b47 Revert "Added comment about not using ialloy with meam/ms"
This reverts commit a6c5f3f714.

# Conflicts:
#	doc/src/pair_meam.rst
2024-03-01 18:33:30 -05:00
6138369079 Revert "must remove unit test for meam/ms since potentials were removed"
This reverts commit 50b8fe9c61.
2024-03-01 18:33:01 -05:00
b7820bfd0e whitespace 2024-03-01 17:22:18 -05:00
50b8fe9c61 must remove unit test for meam/ms since potentials were removed 2024-03-01 17:15:47 -05:00
8fa42612e6 Added override for ialloy default with MS-MEAM 2024-03-01 17:12:33 -05:00
a6c5f3f714 Added comment about not using ialloy with meam/ms 2024-03-01 16:50:56 -05:00
573021b362 Removing because examples/meam/msmeam removed 2024-03-01 16:46:55 -05:00
688f4f5288 This example needs to be replaced as it is not correct 2024-03-01 16:42:13 -05:00
2831b904e9 cosmetic 2024-03-01 07:19:42 -05:00
bff40d2add flag as update 3 2024-03-01 03:06:19 -05:00
7d2b2ff776 restore correct formatting to meam_force.cpp and port changes to KOKKOS 2024-02-28 17:20:35 -05:00
1d09911bdb Fixed additional errors with multicomponent systems, making msmeamflag independent of ialloy 2024-02-28 17:20:27 -05:00
e446b17d41 Fixed error in forces that only affects non-zero t1m MS-MEAM models 2024-02-26 09:20:48 -05:00
e7ce03aa0a fix conversion bug when input is in radians 2024-02-26 07:54:46 -05:00
a9eaa71f8c make PLUGIN package compatible with static linkage of LAMMPS 2024-02-26 06:59:43 -05:00
6203c18ef0 add cuFFT presence error check to CMake script 2024-02-24 03:41:45 -05:00
a7aacd2440 document requirement of per-type masses 2024-02-22 04:34:41 -05:00
2178ba2513 a few more corrections 2024-02-21 21:04:00 -05:00
8277218cbb correct output 2024-02-21 20:52:27 -05:00
13d7178f95 monte carlo insertions require per-type masses 2024-02-21 20:46:52 -05:00
1255772864 use a more "CMake" way to link to cuFFT with check in CMake config run 2024-02-21 10:49:55 -05:00
0878fca16e add detection for CrayClang to the OpenMP compatibility check 2024-02-13 11:09:53 -05:00
147ad3c67c avoid installing libraries and headers from downloaded external libraries 2024-02-09 13:45:52 -05:00
05e4dded0f fix bug with assigning molecule IDs in parallel 2024-02-09 11:08:21 -05:00
5739203ad3 small optimization and portability to Solaris/OpenIndiana 2024-02-07 23:01:47 -05:00
3c232ce6a6 ensure that the "timeremain" thermo keyword never reports a negative remaining time 2024-02-02 12:06:25 -05:00
f24ced3bb6 fix uninitialized data bug when using a child class 2024-02-01 20:15:29 -05:00
d8b74e907e add workaround for Cray's Clang based compiler to compile fmtlib 2024-02-01 15:34:24 -05:00
039161112b fix issues with reading and writing data files for systems without atom IDs 2024-01-31 20:32:41 -05:00
522608b59e make compiling QUIP library more reliable
- replace any -std=f* flags when using GNU fortran with -std=gnu
- cancel parallel make and require serial compile to avoid race condition accessing modules
- increase maximum allowed size for arrays on the stack 100 times
2024-01-26 17:32:14 -05:00
24e65b618b update external MDI library to version 1.4.26 2024-01-23 21:33:32 -05:00
e22cea04e2 replace references to fix ave/spatial with correct equivalents 2024-01-21 12:27:45 -05:00
a70aece450 make sure both NEB class constructors are consistently initialized 2024-01-20 14:49:27 -05:00
92d5772dfa correctly determine when to create "rootworld" communicator 2024-01-20 10:54:23 -05:00
5f04990bc2 Avoid (harmless) errors when shutting down the GPU. 2024-01-19 00:33:10 -05:00
d9a7365273 fixed indentations and add support for python 3 2024-01-18 14:54:26 -05:00
eaa00c238a backport fix bond/react bugfixes from upstream PR #3905 2024-01-18 14:50:26 -05:00
20dae33563 Fix bug in some Kokkos fixes' unpack exchange on device
# Conflicts:
#	src/KOKKOS/fix_spring_self_kokkos.cpp
#	src/KOKKOS/fix_spring_self_kokkos.h
2024-01-17 19:33:39 -05:00
9d360af2c5 this limitation no longer applies 2024-01-15 12:16:11 -05:00
cafa9ccec2 backport of 32-bit integer overflow fixes for large molecular systems from develop 2024-01-15 11:16:12 -05:00
9296357851 update unit test data for corrected angle style cosine/periodic 2024-01-12 19:04:03 -05:00
c53afef070 correct factor 2 force error for m=1 in angle style cosine/periodic 2024-01-12 19:03:48 -05:00
7bdac7eafd Merge branch 'stable' into maintenance 2024-01-12 12:00:40 -05:00
a01a6f3a27 silence compiler warning 2024-01-12 11:58:44 -05:00
bfd15408ba correct factor 2 force error for m=1 in angle style cosine/periodic 2024-01-12 11:49:31 -05:00
48e0859f0d improve compatibility of oneapi.cmake preset 2024-01-04 11:22:39 -05:00
66930a4e5c flag error if using INTEL package kspace styles with run style verlet/split 2023-12-22 13:37:38 -05:00
c434b96a9b remove cached copy of "layout" since this was not always initialized when used 2023-12-22 11:31:48 -05:00
6d3945d367 gracefully handle reaxff parameter files without hydrogen bond parameters 2023-12-21 16:08:19 -05:00
84443eb114 Backport cmap fixes for compatibility with charmm-gui from develop branch 2023-12-16 23:33:24 -05:00
e37b579237 relax epsilon to be compatible with most recent GCC compilers on Fedora 39 2023-12-16 23:25:23 -05:00
58c2c89d1b avoid that mliappy is initialized multiple times 2023-12-16 23:20:29 -05:00
023960e7d5 remove ineffective macOS hack 2023-12-14 23:29:59 -05:00
84975f31cb flag as maintenance branch again 2023-12-14 21:13:56 -05:00
27e8d0f19c Merge pull request #3933 from lammps/maintenance
Second Set of Collected Bug Fixes and Maintenance Updates for 2 August 2023 Stable release
2023-12-14 21:09:30 -05:00
9befd421ca workaround hack for macOS 2023-12-14 18:07:50 -05:00
b3e54549db safely copy balance shift dimension string with proper termination 2023-12-14 17:32:20 -05:00
85393862af fix typos 2023-12-14 16:48:25 -05:00
ac1db251cb recover compilation 2023-12-14 16:24:22 -05:00
3f48d48eea add missing dependency 2023-12-14 16:00:10 -05:00
d9804d7590 Fix issues with sorting neigh list by cutoff distance 2023-12-14 15:46:32 -05:00
4128d52e1c Bugfix: port missed changes from #3846 2023-12-14 15:45:51 -05:00
2d961e76b3 flag update #2 to stable release 2023-12-13 00:32:59 -05:00
016c9ef4b2 Use PyConfig to initialize Python 2023-12-13 00:30:49 -05:00
e69c65431f silence preprocessor warning from leaking internal define in cython generated code 2023-12-13 00:29:42 -05:00
a40e9222aa add valgrind suppressions for MPICH on Fedora 39 2023-12-13 00:29:05 -05:00
283e2103e3 update fix adapt/fep from fix adapt. only supports 2-d parameters for pair styles 2023-12-06 14:35:05 -05:00
2808e6fc52 fix typo 2023-12-06 06:58:55 -05:00
c742b20c5a update Purge.list and avoid redundant checks 2023-12-03 23:27:53 -05:00
530f487dd7 must do region check only when region is active 2023-12-03 11:22:35 -05:00
ba8ca9258b correct dpi to get proper image scaling in PDF output 2023-12-02 16:35:01 -05:00
cd21f67cc6 avoid copying over terminating null 2023-12-02 16:22:43 -05:00
07257595ff use r_c consistently 2023-12-01 05:52:49 -05:00
413d485617 recreate compute xrd mesh image with reasonable dpi setting and used PNG format 2023-12-01 01:32:28 -05:00
8759a18437 handle thermo_modify energy yes correctly 2023-11-30 10:33:54 -05:00
f79e9a113f error out when no per-type masses are set. warn if both per-type and per-atom masses are used. 2023-11-27 07:47:55 -05:00
c1fa89186a correct fix mvv/* compatibility checks in DPD-MESO package 2023-11-26 10:31:50 -05:00
609f5ec64b restore using nvcc_wrapper with kokkos-cude.cmake preset 2023-11-25 05:58:05 -05:00
38b79eeb9b some compilers require a code block to follow OpenMP pragmas, even if empty. 2023-11-24 14:53:53 -05:00
7035249abd remove redundant code and fix memory leaks 2023-11-24 05:06:53 -05:00
816d74d80c make compatible with Kokkos 3.7 2023-11-23 14:25:05 -05:00
4926164050 report Kokkos library version and OpenMP standard version 2023-11-23 12:38:59 -05:00
a102d64a95 detect newer OpenMP standard versions 2023-11-23 12:38:46 -05:00
77db8e422a add check and document that "scale yes" is not supported for scaling atomic parameters with fix adapt/fep 2023-11-23 12:38:27 -05:00
ee0c5dc121 Update CODEOWNERS for cmake 2023-11-21 15:48:40 -05:00
184f5a7f5e copy intel C++17 compiler hack to Kokkos makefiles 2023-11-21 13:00:09 -05:00
162b9c3ff3 tweak intel compiler makefile for traditional build 2023-11-21 12:59:54 -05:00
4d06a9928f reduce warnings when compiling with intel classic compilers 2023-11-21 12:58:57 -05:00
938682a751 lower the C++ standard to 14 for some files when compiling with intel classic compiler 2023-11-21 12:58:33 -05:00
00bccbf067 check if creating unix domain socket failed 2023-11-17 03:20:23 -05:00
67085517ff avoid segfault on command errors in force style unit tests and print error mesage instead 2023-11-16 22:10:15 -05:00
3a2d94822a throw error for illegal replication values 2023-11-15 08:03:38 -05:00
c272e8f94f Avoid integer division 2023-11-15 07:35:26 -05:00
7f41eb6d9a Need force_clear for atom_vec_spin_kokkos 2023-11-15 07:35:12 -05:00
a716df7e59 Fix bug in Kokkos minimize + fix deform 2023-11-15 07:34:57 -05:00
08eae40f9a backport enforce2d with fix rigid bugfix 2023-11-15 07:10:55 -05:00
b6c031fd03 Update pair_pace_extrapolation.cpp
BUGFIX: pair_pace_extrapolation: setup flag aceimpl->ace->compute_projections = true before computing  extrapolation grade
2023-11-10 11:51:15 -05:00
990c07a133 bugfix: correctly build argv when using Python interface 2023-11-10 11:47:04 -05:00
4e94e697ec bugfix: make copy of exename 2023-11-10 11:46:53 -05:00
4526dccaca Correctly build argv with nullptr at the end 2023-11-10 11:46:40 -05:00
917606e40e Forces are not modified 2023-11-02 17:46:19 -04:00
acaae8a36f Fix bug in fix_dt_reset_kokkos 2023-11-02 17:46:10 -04:00
28803ee78d add code to avoid deadlock 2023-11-02 02:17:23 -04:00
dd498fcbf8 add comm of ghost atom coords to compute cluster/atom and aggregate/atom 2023-11-02 02:16:42 -04:00
0f8af20d0b limit the maximum number of iterations so the LAMMPS simulation will not stall 2023-10-27 20:33:44 -04:00
00ef4ca3f6 fix bug in not listing all not compiled-in styles 2023-10-27 11:10:31 -04:00
50fbe61616 Backport of PR #3954 to stable release 2023-10-26 20:43:59 -04:00
854c6d93e2 more checks for misformatted ReST roles 2023-10-26 05:07:45 -04:00
e8e2c5f986 Fix harmless compiler warnings 2023-10-24 17:23:42 -04:00
cff21ce808 improve help and error messages 2023-10-24 10:41:10 -04:00
97c4875a08 add sanity check on path to LAMMPS python package folder 2023-10-24 10:41:01 -04:00
c9aedf9df8 make sure liblinalg is built before linking phana 2023-10-23 14:58:04 -04:00
723dc17d80 must initialize deleted pointers to null since the following commands may fail 2023-10-23 07:35:10 -04:00
c90f874a0d avoid invalid escape warnings for regexp expressions with python 3.12 2023-10-22 20:01:55 -04:00
4ed5243d9b add the missing dividing by np in compute t_prim 2023-10-21 14:58:46 -04:00
71c7d143b7 fix logic bug 2023-10-20 07:01:48 -04:00
e944140ff2 whitespace 2023-10-19 15:29:45 -04:00
b54545d1a4 Fix bug in Kokkos SNAP on GPUs 2023-10-19 15:29:33 -04:00
fc7119982b whitespace 2023-10-19 12:53:13 -04:00
9e45df19c1 Barostat fix - see lammps PR 879 and 942 2023-10-19 12:25:24 -04:00
8bfec75568 Add more error checks to Kokkos minimize 2023-10-19 10:11:42 -04:00
0f948e98f2 quote strings with special characters in keyword lists 2023-10-19 10:11:29 -04:00
b9ce258935 Revert "make sure itag is initialized"
This reverts commit 058f87e019.
2023-10-18 09:32:44 -04:00
058f87e019 make sure itag is initialized 2023-10-18 09:24:31 -04:00
6c2e469f5d copy-and-paste bugfix from @stanmoore1 2023-10-17 19:40:09 -04:00
810e3e5fa5 Fix issues with trim lists 2023-10-16 13:57:28 -04:00
a5374997d2 Revert "avoid issue with neighbor list trimming when used as a hybrid substyle"
This reverts commit 23691d4336.
2023-10-16 13:55:53 -04:00
e65ed32ecd Revert "disable neighbor list trimming by default for REBO pair styles for now"
This reverts commit 2ba7059c00.
2023-10-16 13:55:52 -04:00
d326327bd7 Revert "disable neighbor list trimming for all other pair styles requesting neighbors of ghosts"
This reverts commit aa1c901f94.
2023-10-16 13:55:48 -04:00
aa1c901f94 disable neighbor list trimming for all other pair styles requesting neighbors of ghosts 2023-10-16 00:02:10 -04:00
2ba7059c00 disable neighbor list trimming by default for REBO pair styles for now 2023-10-15 23:44:57 -04:00
23691d4336 avoid issue with neighbor list trimming when used as a hybrid substyle 2023-10-15 23:44:34 -04:00
78adc1727a backport KOKKOS package fixes from PR #3930 by @stanmoore1 2023-10-13 16:32:36 -04:00
9def610c08 update PACE library 2023-10-13 16:31:09 -04:00
a939e93a08 must re-initialized threads also for neigbor lists 2023-10-11 17:42:33 -04:00
308207d5f9 fix cut-n-paste error 2023-10-05 13:16:47 -04:00
75d0d9be1d Fixes #3925 in region_ellipsoid.cpp 2023-10-04 10:56:13 -04:00
2f71bc7886 step LAMMPS GUI patch level number to indicate included bugfixes 2023-10-04 08:55:07 -04:00
ddbdaaafdc make threads handling consistent. address issue that threads could not be increased 2023-10-04 08:46:01 -04:00
8946995199 enforce threads are reset properly for /omp styles 2023-10-04 08:39:58 -04:00
d567fdae97 fix delete / delete[] mismatch 2023-10-04 08:37:53 -04:00
ed9bfb433f avoid segfaults when accessing lammps_last_thermo() 2023-10-04 08:35:42 -04:00
f8493ed805 Recognize Windows 11 23H2 2023-09-27 18:03:09 -04:00
f3beb206c9 support old ReaxFF force field files without ovcorr entry in bonds section 2023-09-27 00:06:15 -04:00
b5480e4e1b must also update CWD when *saving* a file, not only when loading 2023-09-25 08:55:22 -04:00
f634b25e31 apply clang-format 2023-09-25 08:11:55 -04:00
b21db641d9 check for compatible LAMMPS version when creating LAMMPS instance
This check must be done at runtime, since the LAMMPS shared library
may have been loaded dynamically and thus required library functions
may not be present or missing features with too only a LAMMPS version.
2023-09-25 08:08:00 -04:00
6ba94d1619 flag as maintenance branch again 2023-09-23 12:55:10 -04:00
ce756540e8 recognize STL files starting with "solid binary" as binary files 2023-09-22 08:04:25 -04:00
bb462b9ea3 plug memory leak 2023-09-22 08:04:18 -04:00
63eda98779 we don't need a lattice for creating atoms from a STL mesh 2023-09-22 08:04:09 -04:00
0ca72bb58e silence uninitialized access valgrind warning 2023-09-21 07:33:24 -04:00
a6bcf507e1 flag version as update 1 2023-09-19 14:37:13 -04:00
a1621a7229 Apply fix for hipfft paths in ROCm >= 6.0 2023-09-19 10:45:21 -04:00
62d41c6afb fix cut-n-paste issue 2023-09-14 00:29:00 -04:00
5480d25e36 add missing newline 2023-09-13 16:35:10 -04:00
a4145ec852 reorder to have sections in alphabetical order again 2023-09-13 16:34:11 -04:00
5b16f15b25 change refereces to lib/smd and smd to lib/machdyn and machdyn 2023-09-13 16:33:55 -04:00
e77aaba3a4 remove dead code 2023-09-13 16:33:33 -04:00
7f08e8d11c Initialize ADIOS dumps only the first time when
used in multiple runs (for custom/adios dump style)
2023-09-13 08:57:14 -04:00
f62b129dec update docs with settings for building tools with CMake 2023-09-01 18:54:42 -04:00
db967a5bbf there is no "thermo_extract" tool (anymore) 2023-09-01 18:54:28 -04:00
f20af66312 update some tables and comments for the current state of LAMMPS 2023-09-01 18:54:01 -04:00
01766c7631 Fix bug in MDI energy 2023-09-01 07:33:36 -04:00
7846bb59db silence compiler warning 2023-08-31 15:25:03 -04:00
c27951cb1f update unit tests for change in read_restart 2023-08-31 04:45:38 -04:00
4ab82d76ad make atom_modify map settings in restart file overridable 2023-08-30 23:52:14 -04:00
c6cbc1f965 list manual versions on Manual home page 2023-08-28 15:35:02 -04:00
88e58e9189 fix typo 2023-08-28 13:12:36 -04:00
e14005c443 must initialize typefirst now after recent changes from @dsbolin 2023-08-25 10:19:30 -04:00
9570c2fb50 must use array delete and not scalar delete on char array 2023-08-25 10:05:32 -04:00
180ce5277f A few bug fixes for fix srd 2023-08-24 12:29:27 -04:00
e81b86e114 clarify the documentation for the extract_atom numpy wrapper 2023-08-23 20:02:51 -04:00
6c6262a637 the MESONT package depends on the MOLECULE package since the last upgrade 2023-08-23 19:04:01 -04:00
062bb88561 fix element mapping bug in pair style hdnnp when used as a hybrid sub-style 2023-08-23 07:21:39 -04:00
cf5b653a9a Fix bug in Kokkos ReaxFF on GPUs when border comm is on host 2023-08-22 16:48:59 -04:00
c5a5e4a099 more fixes for file and pathnames with blanks 2023-08-21 16:11:03 -04:00
ccab900342 enable/disable VDW mode pushbutton depending on whether valid element info is present 2023-08-21 13:25:41 -04:00
fc400af724 avoid write_dump image failing when not all elements can be recognized 2023-08-21 12:27:30 -04:00
b1ea4d9601 fix write_dump command string so it can handle paths with blanks 2023-08-21 09:08:16 -04:00
2ca3be7b16 workaround for imageviewer GUI glitch on macOS 2023-08-20 19:11:37 -04:00
31b94aa1b0 fix copy-n-paste bug 2023-08-20 00:24:30 -04:00
b1b94980fa make vdwfactor consistent and speed up rendering for VDW mode by skipping bonds 2023-08-20 00:12:58 -04:00
770ad34267 speed up SSAO with OpenMP multi-threading, if available 2023-08-19 20:12:33 -04:00
10c523a950 use more consistent way to update checkboxes and labels by assigning names 2023-08-19 17:58:30 -04:00
62ef884564 use more consistent way to update checkboxes by assigning names 2023-08-19 16:44:11 -04:00
b3860a82de add missing file for embedding icons into windows executable 2023-08-19 15:22:54 -04:00
1deb3d8865 correctly extract local file name from dropped URI 2023-08-19 15:14:08 -04:00
266e519013 consistently use bool for echo and cite flags 2023-08-19 14:13:04 -04:00
fffb86cb02 automatically copy "About LAMMPS" dialog text to clipboard 2023-08-19 09:29:22 -04:00
fcaabe510e deleted one file too many 2023-08-18 01:56:53 -04:00
a6043d92cb remove obsolete files 2023-08-18 01:47:29 -04:00
ee16f6503e update LAMMPS GUI code with PR 3890 content 2023-08-17 22:50:10 -04:00
84168fc84d use fastest zlib compression settings to reduce serial overhead when writing PNG images 2023-08-17 22:44:41 -04:00
8a5fd08fa1 update documentation for LAMMPS GUI v1.2 2023-08-16 03:42:12 -04:00
8944609419 make dark gray really dark gray 2023-08-16 02:58:56 -04:00
e90478e932 update 2023-08-16 02:42:41 -04:00
52c23785c5 fix error with C++17 in AWPMD package 2023-08-16 02:42:35 -04:00
088ff4ad27 update LAMMPS GUI to version 1.2 2023-08-16 02:38:07 -04:00
e32ae65aa1 add flag used by LAMMPS GUI 2023-08-16 02:24:45 -04:00
a5bf853c35 changes to make example script in ASPHERE/tri run 2023-08-15 23:50:53 -04:00
b0a1b58c68 update clang-format detection for compatibility with Debian 2023-08-14 18:49:39 -04:00
bdaf3c64a6 silence warning about a setting that was added to silence warnings 2023-08-14 12:06:09 -04:00
ccc478ad96 flag if we are cross-compiling 2023-08-14 11:55:40 -04:00
fadb210052 clean up all created files 2023-08-14 11:54:56 -04:00
c105a187d9 fix duplicate implicit reference
# Conflicts:
#	doc/src/Speed_kokkos.rst
2023-08-14 11:54:22 -04:00
d74f86f2cd indexing bugfix for compute global/atom 2023-08-14 11:50:23 -04:00
c5b35970dc disable *all* MPI-IO related testing 2023-08-14 11:50:12 -04:00
5626836995 disable MPI-IO based restart writing (for now) 2023-08-14 11:50:02 -04:00
53111f8c0e bugfix for pair style dpd/gpu from Trung 2023-08-14 11:47:49 -04:00
e0ca512f50 avoid legacy compilation failures on recent ubuntu machines that only have python3-config 2023-08-14 11:40:26 -04:00
e87bad43f9 flag maintenance branch 2023-08-03 14:26:47 -04:00
534 changed files with 13501 additions and 6324 deletions

6
.github/CODEOWNERS vendored
View File

@ -151,12 +151,12 @@ tools/vim/* @hammondkd
unittest/* @akohlmey unittest/* @akohlmey
# cmake # cmake
cmake/* @rbberger cmake/* @akohlmey
cmake/Modules/LAMMPSInterfacePlugin.cmake @akohlmey cmake/Modules/LAMMPSInterfacePlugin.cmake @akohlmey
cmake/Modules/MPI4WIN.cmake @akohlmey cmake/Modules/MPI4WIN.cmake @akohlmey
cmake/Modules/OpenCLLoader.cmake @akohlmey cmake/Modules/OpenCLLoader.cmake @akohlmey
cmake/Modules/Packages/COLVARS.cmake @rbberger @giacomofiorin cmake/Modules/Packages/COLVARS.cmake @giacomofiorin
cmake/Modules/Packages/KIM.cmake @rbberger @ellio167 cmake/Modules/Packages/KIM.cmake @ellio167
cmake/presets/*.cmake @akohlmey cmake/presets/*.cmake @akohlmey
# python # python

View File

@ -15,7 +15,7 @@ jobs:
build: build:
name: MacOS Unit Test name: MacOS Unit Test
if: ${{ github.repository == 'lammps/lammps' }} if: ${{ github.repository == 'lammps/lammps' }}
runs-on: macos-latest runs-on: macos-13
env: env:
CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_DIR: ${{ github.workspace }}/.ccache
@ -43,6 +43,8 @@ jobs:
working-directory: build working-directory: build
run: | run: |
ccache -z ccache -z
python3 -m venv macosenv
source macosenv/bin/activate
python3 -m pip install numpy python3 -m pip install numpy
python3 -m pip install pyyaml python3 -m pip install pyyaml
cmake -C ../cmake/presets/clang.cmake \ cmake -C ../cmake/presets/clang.cmake \

View File

@ -1,7 +1,7 @@
# -*- CMake -*- master configuration file for building LAMMPS
######################################## ########################################
# CMake build system # CMake build system
# This file is part of LAMMPS # This file is part of LAMMPS
# Created by Christoph Junghans and Richard Berger
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
######################################## ########################################
# set policy to silence warnings about ignoring <PackageName>_ROOT but use it # set policy to silence warnings about ignoring <PackageName>_ROOT but use it
@ -12,8 +12,8 @@ endif()
if(POLICY CMP0075) if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW) cmake_policy(SET CMP0075 NEW)
endif() endif()
# set policy to silence warnings about missing executable permissions in # set policy to silence warnings about requiring execute permission for find_program
# pythonx.y-config when cross-compiling. review occasionally if it may be set to NEW # we use OLD because the python-config script for the Fedora MinGW cross-compiler requires it currently
if(POLICY CMP0109) if(POLICY CMP0109)
cmake_policy(SET CMP0109 OLD) cmake_policy(SET CMP0109 OLD)
endif() endif()
@ -34,6 +34,7 @@ project(lammps CXX)
set(SOVERSION 0) set(SOVERSION 0)
get_property(BUILD_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) get_property(BUILD_IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
include(GNUInstallDirs)
get_filename_component(LAMMPS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. ABSOLUTE) get_filename_component(LAMMPS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. ABSOLUTE)
get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE) get_filename_component(LAMMPS_LIB_BINARY_DIR ${CMAKE_BINARY_DIR}/lib ABSOLUTE)
# collect all executables and shared libs in the top level build folder # collect all executables and shared libs in the top level build folder
@ -116,7 +117,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4) if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.3 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 17.4)
set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512") set(CMAKE_TUNE_DEFAULT "-xCOMMON-AVX512")
else() else()
set(CMAKE_TUNE_DEFAULT "-xHost -fp-model fast=2 -no-prec-div -qoverride-limits -diag-disable=10441 -diag-disable=2196") set(CMAKE_TUNE_DEFAULT "-xHost -fp-model fast=2 -no-prec-div -qoverride-limits -diag-disable=10441 -diag-disable=11074 -diag-disable=11076 -diag-disable=2196")
endif() endif()
endif() endif()
endif() endif()
@ -131,6 +132,19 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_CXX_COMPILER_ID STREQUAL "
set(CMAKE_TUNE_DEFAULT "-Minform=severe") set(CMAKE_TUNE_DEFAULT "-Minform=severe")
endif() endif()
# this hack is required to compile fmt lib with CrayClang version 15.0.2
# CrayClang is only directly recognized by version 3.28 and later
if(CMAKE_VERSION VERSION_LESS 3.28)
get_filename_component(_exe "${CMAKE_CXX_COMPILER}" NAME)
if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (_exe STREQUAL "crayCC"))
set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR")
endif()
else()
if(CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang")
set(CMAKE_TUNE_DEFAULT "-DFMT_STATIC_THOUSANDS_SEPARATOR")
endif()
endif()
# silence nvcc warnings # silence nvcc warnings
if((PKG_KOKKOS) AND (Kokkos_ENABLE_CUDA) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) 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") set(CMAKE_TUNE_DEFAULT "${CMAKE_TUNE_DEFAULT} -Xcudafe --diag_suppress=unrecognized_pragma")
@ -155,11 +169,28 @@ if(MSVC)
add_compile_options(/Zc:__cplusplus) add_compile_options(/Zc:__cplusplus)
add_compile_options(/wd4244) add_compile_options(/wd4244)
add_compile_options(/wd4267) add_compile_options(/wd4267)
add_compile_options(/wd4250)
add_compile_options(/EHsc) add_compile_options(/EHsc)
endif() endif()
add_compile_definitions(_CRT_SECURE_NO_WARNINGS) add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif() endif()
# warn about potentially problematic GCC compiler versions
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (CMAKE_CXX_STANDARD GREATER_EQUAL 17)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
message(WARNING "Using ${CMAKE_CXX_COMPILER_ID} compiler version ${CMAKE_CXX_COMPILER_VERSION} "
"with C++17 is not recommended. Please use ${CMAKE_CXX_COMPILER_ID} compiler version 9.x or later")
endif()
endif()
if (CMAKE_CXX_STANDARD GREATER_EQUAL 11)
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message(WARNING "Using ${CMAKE_CXX_COMPILER_ID} compiler version ${CMAKE_CXX_COMPILER_VERSION} "
"with C++11 is not recommended. Please use ${CMAKE_CXX_COMPILER_ID} compiler version 5.x or later")
endif()
endif()
endif()
# export all symbols when building a .dll file on windows # export all symbols when building a .dll file on windows
if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND BUILD_SHARED_LIBS) if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND BUILD_SHARED_LIBS)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
@ -202,7 +233,6 @@ else()
unset(CMAKE_CXX_CLANG_TIDY CACHE) unset(CMAKE_CXX_CLANG_TIDY CACHE)
endif() endif()
include(GNUInstallDirs)
file(GLOB ALL_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/[^.]*.cpp) file(GLOB ALL_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/[^.]*.cpp)
file(GLOB MAIN_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/main.cpp) file(GLOB MAIN_SOURCES ${CONFIGURE_DEPENDS} ${LAMMPS_SOURCE_DIR}/main.cpp)
list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES}) list(REMOVE_ITEM ALL_SOURCES ${MAIN_SOURCES})
@ -216,6 +246,10 @@ endif()
add_executable(lmp ${MAIN_SOURCES}) add_executable(lmp ${MAIN_SOURCES})
target_link_libraries(lmp PRIVATE lammps) target_link_libraries(lmp PRIVATE lammps)
set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY}) set_target_properties(lmp PROPERTIES OUTPUT_NAME ${LAMMPS_BINARY})
# re-export all symbols for plugins
if(PKG_PLUGIN AND (NOT ((CMAKE_SYSTEM_NAME STREQUAL "Windows"))))
set_target_properties(lmp PROPERTIES ENABLE_EXPORTS TRUE)
endif()
install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR}) install(TARGETS lmp EXPORT LAMMPS_Targets DESTINATION ${CMAKE_INSTALL_BINDIR})
option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF) option(CMAKE_VERBOSE_MAKEFILE "Generate verbose Makefiles" OFF)
@ -404,6 +438,7 @@ pkg_depends(CG-DNA MOLECULE)
pkg_depends(CG-DNA ASPHERE) pkg_depends(CG-DNA ASPHERE)
pkg_depends(ELECTRODE KSPACE) pkg_depends(ELECTRODE KSPACE)
pkg_depends(EXTRA-MOLECULE MOLECULE) pkg_depends(EXTRA-MOLECULE MOLECULE)
pkg_depends(MESONT MOLECULE)
# detect if we may enable OpenMP support by default # detect if we may enable OpenMP support by default
set(BUILD_OMP_DEFAULT OFF) set(BUILD_OMP_DEFAULT OFF)
@ -429,6 +464,7 @@ if(BUILD_OMP)
(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") OR (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM") OR (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang") OR
((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)) OR
((CMAKE_CXX_COMPILER_ID STREQUAL "CrayClang") 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))) ((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. # 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. # Intel 18.0 was tested to support both, so we switch to OpenMP 4+ from 19.x onward to be safe.
@ -441,6 +477,18 @@ if(BUILD_OMP)
target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX) target_link_libraries(lmp PRIVATE OpenMP::OpenMP_CXX)
endif() endif()
# lower C++ standard for fmtlib sources when using Intel classic compiler
if((CMAKE_CXX_COMPILER_ID STREQUAL "Intel") AND (CMAKE_CXX_STANDARD GREATER_EQUAL 17)
AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2021.10))
message(STATUS "Lowering C++ standard for compiling fmtlib sources with Intel Classic compiler")
get_filename_component(LMP_UTILS_SRC "${LAMMPS_SOURCE_DIR}/utils.cpp" ABSOLUTE)
get_filename_component(LMP_VARIABLE_SRC "${LAMMPS_SOURCE_DIR}/variable.cpp" ABSOLUTE)
get_filename_component(FMT_FORMAT_SRC "${LAMMPS_SOURCE_DIR}/fmtlib_format.cpp" ABSOLUTE)
get_filename_component(FMT_OS_SRC "${LAMMPS_SOURCE_DIR}/fmtlib_os.cpp" ABSOLUTE)
set_source_files_properties("${FMT_FORMAT_SRC}" "${FMT_OS_SRC}" "${LMP_VARIABLE_SRC}" "${LMP_UTILS_SRC}"
PROPERTIES COMPILE_OPTIONS "-std=c++14")
endif()
if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS) if(PKG_MSCG OR PKG_ATC OR PKG_AWPMD OR PKG_ML-QUIP OR PKG_ML-POD OR PKG_ELECTRODE OR BUILD_TOOLS)
enable_language(C) enable_language(C)
if (NOT USE_INTERNAL_LINALG) if (NOT USE_INTERNAL_LINALG)
@ -893,13 +941,23 @@ else()
endif() endif()
include(FeatureSummary) include(FeatureSummary)
feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND) feature_summary(DESCRIPTION "The following tools and libraries have been found and configured:" WHAT PACKAGES_FOUND)
if(GIT_FOUND AND EXISTS ${LAMMPS_DIR}/.git)
execute_process(COMMAND ${GIT_EXECUTABLE} describe --dirty=-modified --always
OUTPUT_VARIABLE GIT_DESCRIBE
ERROR_QUIET
WORKING_DIRECTORY ${LAMMPS_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
message(STATUS "<<< Build configuration >>> message(STATUS "<<< Build configuration >>>
LAMMPS Version: ${PROJECT_VERSION} LAMMPS Version: ${PROJECT_VERSION} ${GIT_DESCRIBE}
Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION} Operating System: ${CMAKE_SYSTEM_NAME} ${CMAKE_LINUX_DISTRO} ${CMAKE_DISTRO_VERSION}
CMake Version: ${CMAKE_VERSION} CMake Version: ${CMAKE_VERSION}
Build type: ${LAMMPS_BUILD_TYPE} Build type: ${LAMMPS_BUILD_TYPE}
Install path: ${CMAKE_INSTALL_PREFIX} Install path: ${CMAKE_INSTALL_PREFIX}
Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}") Generator: ${CMAKE_GENERATOR} using ${CMAKE_MAKE_PROGRAM}")
if(CMAKE_CROSSCOMPILING)
message(STATUS "Cross compiling on ${CMAKE_HOST_SYSTEM}")
endif()
############################################################################### ###############################################################################
# Print package summary # Print package summary
############################################################################### ###############################################################################
@ -1028,6 +1086,14 @@ endif()
if(BUILD_LAMMPS_SHELL) if(BUILD_LAMMPS_SHELL)
message(STATUS "<<< Building LAMMPS Shell >>>") message(STATUS "<<< Building LAMMPS Shell >>>")
endif() endif()
if(BUILD_LAMMPS_GUI)
message(STATUS "<<< Building LAMMPS GUI >>>")
if(LAMMPS_GUI_USE_PLUGIN)
message(STATUS "Loading LAMMPS library as plugin at run time")
else()
message(STATUS "Linking LAMMPS library at compile time")
endif()
endif()
if(ENABLE_TESTING) if(ENABLE_TESTING)
message(STATUS "<<< Building Unit Tests >>>") message(STATUS "<<< Building Unit Tests >>>")
if(ENABLE_COVERAGE) if(ENABLE_COVERAGE)

View File

@ -43,5 +43,5 @@ function(ExternalCMakeProject target url hash basedir cmakedir cmakefile)
"${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}/CMakeLists.txt") "${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}/CMakeLists.txt")
endif() endif()
add_subdirectory("${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}" add_subdirectory("${CMAKE_BINARY_DIR}/_deps/${target}-src/${cmakedir}"
"${CMAKE_BINARY_DIR}/_deps/${target}-build") "${CMAKE_BINARY_DIR}/_deps/${target}-build" EXCLUDE_FROM_ALL)
endfunction(ExternalCMakeProject) endfunction(ExternalCMakeProject)

View File

@ -1,5 +1,7 @@
# Find clang-format # Find clang-format
find_program(ClangFormat_EXECUTABLE NAMES clang-format find_program(ClangFormat_EXECUTABLE NAMES clang-format
clang-format-17.0
clang-format-16.0
clang-format-15.0 clang-format-15.0
clang-format-14.0 clang-format-14.0
clang-format-13.0 clang-format-13.0
@ -19,7 +21,7 @@ if(ClangFormat_EXECUTABLE)
OUTPUT_VARIABLE clang_format_version OUTPUT_VARIABLE clang_format_version
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(clang_format_version MATCHES "^(Ubuntu |)clang-format version .*") if(clang_format_version MATCHES "^(Ubuntu |Debian |)clang-format version .*")
# Arch Linux output: # Arch Linux output:
# clang-format version 10.0.0 # clang-format version 10.0.0
# #
@ -32,9 +34,15 @@ if(ClangFormat_EXECUTABLE)
# Ubuntu 22.04 LTS output: # Ubuntu 22.04 LTS output:
# Ubuntu clang-format version 14.0.0-1ubuntu1 # Ubuntu clang-format version 14.0.0-1ubuntu1
# #
# Debian 11 output:
# Debian clang-format version 11.0.1-2
#
# Debian 12 output:
# Debian clang-format version 14.0.6
#
# Fedora 36 output: # Fedora 36 output:
# clang-format version 14.0.5 (Fedora 14.0.5-1.fc36) # clang-format version 14.0.5 (Fedora 14.0.5-1.fc36)
string(REGEX REPLACE "^(Ubuntu |)clang-format version ([0-9.]+).*" string(REGEX REPLACE "^(Ubuntu |Debian |)clang-format version ([0-9.]+).*"
"\\2" "\\2"
ClangFormat_VERSION ClangFormat_VERSION
"${clang_format_version}") "${clang_format_version}")

View File

@ -83,17 +83,17 @@ function(check_for_autogen_files source_dir)
file(GLOB SRC_AUTOGEN_FILES ${CONFIGURE_DEPENDS} ${source_dir}/style_*.h) file(GLOB SRC_AUTOGEN_FILES ${CONFIGURE_DEPENDS} ${source_dir}/style_*.h)
file(GLOB SRC_AUTOGEN_PACKAGES ${CONFIGURE_DEPENDS} ${source_dir}/packages_*.h) file(GLOB SRC_AUTOGEN_PACKAGES ${CONFIGURE_DEPENDS} ${source_dir}/packages_*.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/lmpinstalledpkgs.h ${source_dir}/lmpgitversion.h) list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/lmpinstalledpkgs.h ${source_dir}/lmpgitversion.h)
list(APPEND SRC_AUTOGEN_FILES ${SRC_AUTOGEN_PACKAGES} ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp) list(APPEND SRC_AUTOGEN_FILES ${source_dir}/mliap_model_python_couple.h ${source_dir}/mliap_model_python_couple.cpp)
foreach(_SRC ${SRC_AUTOGEN_FILES}) foreach(_SRC ${SRC_AUTOGEN_FILES})
get_filename_component(FILENAME "${_SRC}" NAME) get_filename_component(FILENAME "${_SRC}" NAME)
if(EXISTS ${source_dir}/${FILENAME}) if(EXISTS ${source_dir}/${FILENAME})
message(FATAL_ERROR "\n########################################################################\n" message(FATAL_ERROR "\n########################################################################\n"
"Found header file(s) generated by the make-based build system\n" "Found header file ${source_dir}/${FILENAME} generated by the make-based build system\n"
"\n" "\n"
"Please run\n" "Please run\n"
"make -C ${source_dir} purge\n" "make -C ${source_dir} purge\n"
"to remove\n" "to remove\n"
"########################################################################") "########################################################################")
endif() endif()
endforeach() endforeach()
endfunction() endfunction()

View File

@ -132,8 +132,12 @@ if(PKG_KSPACE)
${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp) ${KOKKOS_PKG_SOURCES_DIR}/remap_kokkos.cpp)
if(Kokkos_ENABLE_CUDA) if(Kokkos_ENABLE_CUDA)
if(NOT (FFT STREQUAL "KISS")) if(NOT (FFT STREQUAL "KISS"))
find_library(CUFFT_LIBRARY cufft)
if (CUFFT_LIBRARY STREQUAL "CUFFT_LIBRARY-NOTFOUND")
message(FATAL_ERROR "Required cuFFT library not found. Check your environment or set CUFFT_LIBRARY to its location")
endif()
target_compile_definitions(lammps PRIVATE -DFFT_CUFFT) target_compile_definitions(lammps PRIVATE -DFFT_CUFFT)
target_link_libraries(lammps PRIVATE cufft) target_link_libraries(lammps PRIVATE ${CUFFT_LIBRARY})
endif() endif()
elseif(Kokkos_ENABLE_HIP) elseif(Kokkos_ENABLE_HIP)
if(NOT (FFT STREQUAL "KISS")) if(NOT (FFT STREQUAL "KISS"))

View File

@ -8,8 +8,8 @@ option(DOWNLOAD_MDI "Download and compile the MDI library instead of using an al
if(DOWNLOAD_MDI) if(DOWNLOAD_MDI)
message(STATUS "MDI download requested - we will build our own") message(STATUS "MDI download requested - we will build our own")
set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.16.tar.gz" CACHE STRING "URL for MDI tarball") set(MDI_URL "https://github.com/MolSSI-MDI/MDI_Library/archive/v1.4.26.tar.gz" CACHE STRING "URL for MDI tarball")
set(MDI_MD5 "407db44e2d79447ab5c1233af1965f65" CACHE STRING "MD5 checksum for MDI tarball") set(MDI_MD5 "3124bb85259471e2a53a891f04bf697a" CACHE STRING "MD5 checksum for MDI tarball")
mark_as_advanced(MDI_URL) mark_as_advanced(MDI_URL)
mark_as_advanced(MDI_MD5) mark_as_advanced(MDI_MD5)
GetFallbackURL(MDI_URL MDI_FALLBACK) GetFallbackURL(MDI_URL MDI_FALLBACK)

View File

@ -1,6 +1,12 @@
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.01.3.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources") # PACE library support for ML-PACE package
set(PACELIB_MD5 "4f0b3b5b14456fe9a73b447de3765caa" CACHE STRING "MD5 checksum of PACE evaluator library tarball") # set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()
set(PACELIB_URL "https://github.com/ICAMS/lammps-user-pace/archive/refs/tags/v.2023.11.25.fix.tar.gz" CACHE STRING "URL for PACE evaluator library sources")
set(PACELIB_MD5 "b45de9a633f42ed65422567e3ce56f9f" CACHE STRING "MD5 checksum of PACE evaluator library tarball")
mark_as_advanced(PACELIB_URL) mark_as_advanced(PACELIB_URL)
mark_as_advanced(PACELIB_MD5) mark_as_advanced(PACELIB_MD5)
GetFallbackURL(PACELIB_URL PACELIB_FALLBACK) GetFallbackURL(PACELIB_URL PACELIB_FALLBACK)

View File

@ -18,14 +18,14 @@ if(DOWNLOAD_QUIP)
set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n") set(temp "${temp}F77FLAGS += -fpp -fixed -fPIC\n")
set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n") set(temp "${temp}F95_PRE_FILENAME_FLAG = -Tf\n")
elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}}\n") set(temp "${temp}FPP=${CMAKE_Fortran_COMPILER} -E -x f95-cpp-input\nOPTIM=${CMAKE_Fortran_FLAGS_${BTYPE}} -fmax-stack-var-size=6553600\n")
set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n") set(temp "${temp}DEFINES += -DGETARG_F2003 -DGETENV_F2003 -DGFORTRAN -DFORTRAN_UNDERSCORE\n")
set(temp "${temp}F95FLAGS += -x f95-cpp-input -ffree-line-length-none -ffree-form -fno-second-underscore -fPIC\n") set(temp "${temp}F95FLAGS += -x f95-cpp-input -ffree-line-length-none -ffree-form -fno-second-underscore -fPIC\n")
set(temp "${temp}F77FLAGS += -x f77-cpp-input -fno-second-underscore -fPIC\n") set(temp "${temp}F77FLAGS += -x f77-cpp-input -fno-second-underscore -fPIC\n")
else() else()
message(FATAL_ERROR "The ${CMAKE_Fortran_COMPILER_ID} Fortran compiler is not (yet) supported for building QUIP") message(FATAL_ERROR "The ${CMAKE_Fortran_COMPILER_ID} Fortran compiler is not (yet) supported for building QUIP")
endif() endif()
set(temp "${temp}CFLAGS += -fPIC \nCPLUSPLUSFLAGS += -fPIC\nAR_ADD=src\n") set(temp "${temp}CFLAGS += -fPIC -Wno-return-mismatch \nCPLUSPLUSFLAGS += -fPIC -Wno-return-mismatch\nAR_ADD=src\n")
set(temp "${temp}MATH_LINKOPTS=") set(temp "${temp}MATH_LINKOPTS=")
foreach(flag ${BLAS_LIBRARIES}) foreach(flag ${BLAS_LIBRARIES})
set(temp "${temp} ${flag}") set(temp "${temp} ${flag}")
@ -41,6 +41,11 @@ if(DOWNLOAD_QUIP)
set(temp "${temp}HAVE_TURBOGAP=0\nHAVE_QR=1\nHAVE_THIRDPARTY=0\nHAVE_FX=0\nHAVE_SCME=0\nHAVE_MTP=0\n") set(temp "${temp}HAVE_TURBOGAP=0\nHAVE_QR=1\nHAVE_THIRDPARTY=0\nHAVE_FX=0\nHAVE_SCME=0\nHAVE_MTP=0\n")
set(temp "${temp}HAVE_MBD=0\nHAVE_TTM_NF=0\nHAVE_CH4=0\nHAVE_NETCDF4=0\nHAVE_MDCORE=0\nHAVE_ASAP=0\n") set(temp "${temp}HAVE_MBD=0\nHAVE_TTM_NF=0\nHAVE_CH4=0\nHAVE_NETCDF4=0\nHAVE_MDCORE=0\nHAVE_ASAP=0\n")
set(temp "${temp}HAVE_CGAL=0\nHAVE_METIS=0\nHAVE_LMTO_TBE=0\nHAVE_SCALAPACK=0\n") set(temp "${temp}HAVE_CGAL=0\nHAVE_METIS=0\nHAVE_LMTO_TBE=0\nHAVE_SCALAPACK=0\n")
# for gfortran, the -std= flag, if present, *must* be -std=gnu or else the compilation will fail.
if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU)
string(REGEX REPLACE -std=f[0-9]+ -std=gnu newtemp "${temp}")
set(temp "${newtemp}")
endif()
file(WRITE ${CMAKE_BINARY_DIR}/quip.config "${temp}") file(WRITE ${CMAKE_BINARY_DIR}/quip.config "${temp}")
message(STATUS "QUIP download via git requested - we will build our own") message(STATUS "QUIP download via git requested - we will build our own")
@ -56,7 +61,7 @@ if(DOWNLOAD_QUIP)
GIT_SUBMODULES "src/fox;src/GAP" GIT_SUBMODULES "src/fox;src/GAP"
PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/quip.config <SOURCE_DIR>/arch/Makefile.lammps PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/quip.config <SOURCE_DIR>/arch/Makefile.lammps
CONFIGURE_COMMAND env QUIP_ARCH=lammps make config CONFIGURE_COMMAND env QUIP_ARCH=lammps make config
BUILD_COMMAND env QUIP_ARCH=lammps make libquip BUILD_COMMAND env QUIP_ARCH=lammps make -j1 libquip
INSTALL_COMMAND "" INSTALL_COMMAND ""
BUILD_IN_SOURCE YES BUILD_IN_SOURCE YES
BUILD_BYPRODUCTS <SOURCE_DIR>/build/lammps/${CMAKE_STATIC_LIBRARY_PREFIX}quip${CMAKE_STATIC_LIBRARY_SUFFIX} BUILD_BYPRODUCTS <SOURCE_DIR>/build/lammps/${CMAKE_STATIC_LIBRARY_PREFIX}quip${CMAKE_STATIC_LIBRARY_SUFFIX}

View File

@ -1,5 +1,10 @@
# Plumed2 support for PLUMED package # Plumed2 support for PLUMED package
# set policy to silence warnings about timestamps of downloaded files. review occasionally if it may be set to NEW
if(POLICY CMP0135)
cmake_policy(SET CMP0135 OLD)
endif()
if(BUILD_MPI) if(BUILD_MPI)
set(PLUMED_CONFIG_MPI "--enable-mpi") set(PLUMED_CONFIG_MPI "--enable-mpi")
set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER}) set(PLUMED_CONFIG_CC ${CMAKE_MPI_C_COMPILER})
@ -21,9 +26,11 @@ else()
set(PLUMED_CONFIG_OMP "--disable-openmp") set(PLUMED_CONFIG_OMP "--disable-openmp")
endif() endif()
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.8.2/plumed-src-2.8.2.tgz" # Note: must also adjust check for supported API versions in
# fix_plumed.cpp when version changes from v2.n.x to v2.n+1.y
set(PLUMED_URL "https://github.com/plumed/plumed2/releases/download/v2.9.1/plumed-src-2.9.1.tgz"
CACHE STRING "URL for PLUMED tarball") CACHE STRING "URL for PLUMED tarball")
set(PLUMED_MD5 "599092b6a0aa6fff992612537ad98994" CACHE STRING "MD5 checksum of PLUMED tarball") set(PLUMED_MD5 "c3b2d31479c1e9ce211719d40e9efbd7" CACHE STRING "MD5 checksum of PLUMED tarball")
mark_as_advanced(PLUMED_URL) mark_as_advanced(PLUMED_URL)
mark_as_advanced(PLUMED_MD5) mark_as_advanced(PLUMED_MD5)
@ -75,6 +82,9 @@ if((CMAKE_SYSTEM_NAME STREQUAL "Windows") AND (CMAKE_CROSSCOMPILING))
DEPENDS plumed_build DEPENDS plumed_build
COMMENT "Copying Plumed files" COMMENT "Copying Plumed files"
) )
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps INTERFACE LAMMPS::PLUMED)
endif()
else() else()
@ -149,6 +159,9 @@ else()
endif() endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include) set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include) file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)
endif()
else() else()
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_check_modules(PLUMED REQUIRED plumed) pkg_check_modules(PLUMED REQUIRED plumed)
@ -163,7 +176,9 @@ else()
endif() endif()
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}") set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_LINK_LIBRARIES "${PLUMED_LOAD}")
set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}") set_target_properties(LAMMPS::PLUMED PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PLUMED_INCLUDE_DIRS}")
if(CMAKE_PROJECT_NAME STREQUAL "lammps")
target_link_libraries(lammps PUBLIC LAMMPS::PLUMED)
endif()
endif() endif()
endif() endif()
target_link_libraries(lammps PRIVATE LAMMPS::PLUMED)

View File

@ -1,26 +1,64 @@
#!/bin/bash -vx #!/bin/bash
APP_NAME=lammps-gui APP_NAME=lammps-gui
DESTDIR=${PWD}/../LAMMPS_GUI DESTDIR=${PWD}/LAMMPS_GUI
SYSROOT="$1"
echo "Delete old files, if they exist" echo "Delete old files, if they exist"
rm -rvf ${DESTDIR} LAMMPS-Win10-amd64.zip rm -rvf ${DESTDIR}/LAMMPS_GUI ${DESTDIR}/LAMMPS-Win10-amd64.zip
echo "Create staging area for deployment and populate" echo "Create staging area for deployment and populate"
DESTDIR=${DESTDIR} cmake --install . --prefix "/" DESTDIR=${DESTDIR} cmake --install . --prefix "/"
echo "Add required dependencies for Qt" # no static libs needed
for dll in Qt5Core.dll Qt5Gui.dll Qt5Widgets.dll rm -rvf ${DESTDIR}/lib
# but the LAMMPS lib
echo "Copying required DLL files"
for dll in $(objdump -p *.exe *.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
do \ do \
cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/${dll} ${DESTDIR}/bin/ doskip=0
done for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
for dir in styles platforms imageformats do \
do \ test ${dll} = ${skip}.dll && doskip=1
mkdir -p ${DESTDIR}/${dir} done
cp -r /usr/x86_64-w64-mingw32/sys-root/mingw/lib/qt5/plugins/${dir}/*.dll ${DESTDIR}/${dir} test ${doskip} -eq 1 && continue
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
done done
pushd .. echo "Copy required Qt plugins"
zip -9rv LAMMPS-Win10-amd64.zip LAMMPS_GUI mkdir -p ${DESTDIR}/qt5plugins
popd for plugin in imageformats platforms styles
exit 0 do \
cp -r ${SYSROOT}/lib/qt5/plugins/${plugin} ${DESTDIR}/qt5plugins/
done
echo "Check dependencies of DLL files"
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
do \
doskip=0
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
do \
test ${dll} = ${skip}.dll && doskip=1
done
test ${doskip} -eq 1 && continue
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
done
for dll in $(objdump -p ${DESTDIR}/bin/*.dll ${DESTDIR}/qt5plugins/*/*.dll | sed -n -e '/DLL Name:/s/^.*DLL Name: *//p' | sort | uniq)
do \
doskip=0
for skip in ADVAPI32 CFGMGR32 GDI32 KERNEL32 MPR NETAPI32 PSAPI SHELL32 USER32 USERENV UxTheme VERSION WS2_32 WSOCK32 d3d11 dwmapi liblammps msvcrt_ole32
do \
test ${dll} = ${skip}.dll && doskip=1
done
test ${doskip} -eq 1 && continue
test -f ${DESTDIR}/bin/${dll} || cp -v ${SYSROOT}/bin/${dll} ${DESTDIR}/bin
done
cat > ${DESTDIR}/bin/qt.conf <<EOF
[Paths]
Plugins = ../qt5plugins
EOF
zip -9rvD LAMMPS-Win10-amd64.zip LAMMPS_GUI

View File

@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
# wrapper for bundled executables # wrapper for bundled executables
# reset locale to avoid problems with decimal numbers
export LC_ALL=C
BASEDIR=$(dirname "$0") BASEDIR=$(dirname "$0")
EXENAME=$(basename "$0") EXENAME=$(basename "$0")

View File

@ -6,6 +6,8 @@ set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "" FORCE)
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "" FORCE) set(Kokkos_ENABLE_CUDA ON CACHE BOOL "" FORCE)
set(Kokkos_ARCH_PASCAL60 ON CACHE BOOL "" FORCE) set(Kokkos_ARCH_PASCAL60 ON CACHE BOOL "" FORCE)
set(BUILD_OMP ON CACHE BOOL "" FORCE) set(BUILD_OMP ON CACHE BOOL "" FORCE)
get_filename_component(NVCC_WRAPPER_CMD ${CMAKE_CURRENT_SOURCE_DIR}/../lib/kokkos/bin/nvcc_wrapper ABSOLUTE)
set(CMAKE_CXX_COMPILER ${NVCC_WRAPPER_CMD} CACHE FILEPATH "" FORCE)
# hide deprecation warnings temporarily for stable release # hide deprecation warnings temporarily for stable release
set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE) set(Kokkos_ENABLE_DEPRECATION_WARNINGS OFF CACHE BOOL "" FORCE)

View File

@ -32,7 +32,6 @@ set(WIN_PACKAGES
FEP FEP
GPU GPU
GRANULAR GRANULAR
INTEL
INTERLAYER INTERLAYER
KSPACE KSPACE
LEPTON LEPTON

View File

@ -18,11 +18,11 @@ set(MPI_CXX_COMPILER "mpicxx" CACHE STRING "" FORCE)
unset(HAVE_OMP_H_INCLUDE CACHE) unset(HAVE_OMP_H_INCLUDE CACHE)
set(OpenMP_C "icx" CACHE STRING "" FORCE) set(OpenMP_C "icx" CACHE STRING "" FORCE)
set(OpenMP_C_FLAGS "-qopenmp -qopenmp-simd" CACHE STRING "" FORCE) set(OpenMP_C_FLAGS "-qopenmp;-qopenmp-simd" CACHE STRING "" FORCE)
set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE) set(OpenMP_C_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_CXX "icpx" CACHE STRING "" FORCE) set(OpenMP_CXX "icpx" CACHE STRING "" FORCE)
set(OpenMP_CXX_FLAGS "-qopenmp -qopenmp-simd" CACHE STRING "" FORCE) set(OpenMP_CXX_FLAGS "-qopenmp;-qopenmp-simd" CACHE STRING "" FORCE)
set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE) set(OpenMP_CXX_LIB_NAMES "omp" CACHE STRING "" FORCE)
set(OpenMP_Fortran_FLAGS "-qopenmp -qopenmp-simd" CACHE STRING "" FORCE) set(OpenMP_Fortran_FLAGS "-qopenmp;-qopenmp-simd" CACHE STRING "" FORCE)
set(OpenMP_omp_LIBRARY "libiomp5.so" CACHE PATH "" FORCE) set(OpenMP_omp_LIBRARY "libiomp5.so" CACHE PATH "" FORCE)

View File

@ -32,6 +32,7 @@ set(WIN_PACKAGES
INTERLAYER INTERLAYER
KSPACE KSPACE
LEPTON LEPTON
MACHDYN
MANIFOLD MANIFOLD
MANYBODY MANYBODY
MC MC
@ -45,6 +46,7 @@ set(WIN_PACKAGES
MOLECULE MOLECULE
MOLFILE MOLFILE
OPENMP OPENMP
OPT
ORIENT ORIENT
PERI PERI
PHONON PHONON

View File

@ -63,6 +63,7 @@ help:
@echo " anchor_check scan for duplicate anchor labels" @echo " anchor_check scan for duplicate anchor labels"
@echo " style_check check for complete and consistent style lists" @echo " style_check check for complete and consistent style lists"
@echo " package_check check for complete and consistent package lists" @echo " package_check check for complete and consistent package lists"
@echo " role_check check for misformatted role keywords"
@echo " spelling spell-check the manual" @echo " spelling spell-check the manual"
# ------------------------------------------ # ------------------------------------------
@ -98,6 +99,7 @@ html: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) $(MATHJAX)
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
$(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\ $(PYTHON) $(BUILDDIR)/utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\ echo "############################################" ;\
deactivate ;\ deactivate ;\
@ -179,6 +181,7 @@ pdf: xmlgen $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK)
env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n '[^ -~]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\ env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst ;\
env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst ;\
$(PYTHON) utils/check-styles.py -s ../src -d src ;\ $(PYTHON) utils/check-styles.py -s ../src -d src ;\
echo "############################################" ;\ echo "############################################" ;\
deactivate ;\ deactivate ;\
@ -227,6 +230,7 @@ char_check :
role_check : role_check :
@( env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst && exit 1 || : ) @( env LC_ALL=C grep -n ' :[a-z]\+`' $(RSTDIR)/*.rst && exit 1 || : )
@( env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst && exit 1 || : ) @( env LC_ALL=C grep -n ' `[^`]\+<[a-z][^`]\+`[^_]' $(RSTDIR)/*.rst && exit 1 || : )
@( env LC_ALL=C grep -n ':\(ref\|doc\):[^`]' $(RSTDIR)/*.rst && exit 1 || : )
link_check : $(VENV) html link_check : $(VENV) html
@(\ @(\

View File

@ -489,8 +489,9 @@ using CMake or Make.
.. code-block:: bash .. code-block:: bash
-D BUILD_TOOLS=value # yes or no (default) -D BUILD_TOOLS=value # yes or no (default). Build binary2txt, chain.x, micelle2d.x, msi2lmp, phana, stl_bin2txt
-D BUILD_LAMMPS_SHELL=value # yes or no (default) -D BUILD_LAMMPS_SHELL=value # yes or no (default). Build lammps-shell
-D BUILD_LAMMPS_GUI=value # yes or no (default). Build lammps-gui
The generated binaries will also become part of the LAMMPS installation The generated binaries will also become part of the LAMMPS installation
(see below). (see below).
@ -504,7 +505,6 @@ using CMake or Make.
make binary2txt # build only binary2txt tool make binary2txt # build only binary2txt tool
make chain # build only chain tool make chain # build only chain tool
make micelle2d # build only micelle2d tool make micelle2d # build only micelle2d tool
make thermo_extract # build only thermo_extract tool
cd lammps/tools/lammps-shell cd lammps/tools/lammps-shell
make # build LAMMPS shell make # build LAMMPS shell

View File

@ -881,6 +881,50 @@ included in the LAMMPS source distribution in the ``lib/lepton`` folder.
---------- ----------
.. _machdyn:
MACHDYN package
-------------------------------
To build with this package, you must download the Eigen3 library.
Eigen3 is a template library, so you do not need to build it.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location)
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
downloaded and inside the CMake build directory. If the Eigen3
library is already on your system (in a location where CMake
cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the
``Eigen3`` include file is in.
.. tab:: Traditional make
You can download the Eigen3 library manually if you prefer; follow
the instructions in ``lib/machdyn/README``. You can also do it in one
step from the ``lammps/src`` dir, using a command like these,
which simply invokes the ``lib/machdyn/Install.py`` script with the
specified args:
.. code-block:: bash
make lib-machdyn # print help message
make lib-machdyn args="-b" # download to lib/machdyn/eigen3
make lib-machdyn args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
Note that a symbolic (soft) link named ``includelink`` is created
in ``lib/machdyn`` to point to the Eigen dir. When LAMMPS builds it
will use this link. You should not need to edit the
``lib/machdyn/Makefile.lammps`` file.
----------
.. _mliap: .. _mliap:
ML-IAP package ML-IAP package
@ -1406,6 +1450,11 @@ in lib/pace or somewhere else, which must be done before building
LAMMPS with this package. The code for the library can be found LAMMPS with this package. The code for the library can be found
at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps-user-pace/>`_ at: `https://github.com/ICAMS/lammps-user-pace/ <https://github.com/ICAMS/lammps-user-pace/>`_
Instead of including the ML-PACE package directly into LAMMPS, it
is also possible to skip this step and build the ML-PACE package as
a plugin using the CMake script files in the ``examples/PACKAGE/pace/plugin``
folder and then load this plugin at runtime with the :doc:`plugin command <plugin>`.
.. tabs:: .. tabs::
.. tab:: CMake build .. tab:: CMake build
@ -1479,6 +1528,55 @@ ML-POD package
---------- ----------
.. _ml-quip:
ML-QUIP package
---------------------------------
To build with this package, you must download and build the QUIP
library. It can be obtained from GitHub. For support of GAP
potentials, additional files with specific licensing conditions need
to be downloaded and configured. The automatic download will from
within CMake will download the non-commercial use version.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
# value = no (default) or yes
CMake will try to download and build the QUIP library from GitHub,
if it is not found on the local machine. This requires to have git
installed. It will use the same compilers and flags as used for
compiling LAMMPS. Currently this is only supported for the GNU
and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you
want to use a previously compiled and installed QUIP library and
CMake cannot find it.
The QUIP library requires LAPACK (and BLAS) and CMake can identify
their locations and pass that info to the QUIP build script. But
on some systems this triggers a (current) limitation of CMake and
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
those cases to use the bundled linear algebra library and work around
the limitation.
.. tab:: Traditional make
The download/build procedure for the QUIP library, described in
``lib/quip/README`` file requires setting two environment
variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by
the ``lib/quip/Makefile.lammps`` file which is used when you
compile and link LAMMPS with this package. You should only need
to edit ``Makefile.lammps`` if the LAMMPS build can not use its
settings to successfully build on your system.
----------
.. _plumed: .. _plumed:
PLUMED package PLUMED package
@ -1521,6 +1619,11 @@ try a different one, switch to a different build system, consider a
global PLUMED installation or consider downloading PLUMED during the global PLUMED installation or consider downloading PLUMED during the
LAMMPS build. LAMMPS build.
Instead of including the PLUMED package directly into LAMMPS, it
is also possible to skip this step and build the PLUMED package as
a plugin using the CMake script files in the ``examples/PACKAGE/plumed/plugin``
folder and then load this plugin at runtime with the :doc:`plugin command <plugin>`.
.. tabs:: .. tabs::
.. tab:: CMake build .. tab:: CMake build
@ -2000,55 +2103,6 @@ verified to work in February 2020 with Quantum Espresso versions 6.3 to
---------- ----------
.. _ml-quip:
ML-QUIP package
---------------------------------
To build with this package, you must download and build the QUIP
library. It can be obtained from GitHub. For support of GAP
potentials, additional files with specific licensing conditions need
to be downloaded and configured. The automatic download will from
within CMake will download the non-commercial use version.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_QUIP=value # download QUIP library for build, value = no (default) or yes
-D QUIP_LIBRARY=path # path to libquip.a (only needed if a custom location)
-D USE_INTERNAL_LINALG=value # Use the internal linear algebra library instead of LAPACK
# value = no (default) or yes
CMake will try to download and build the QUIP library from GitHub,
if it is not found on the local machine. This requires to have git
installed. It will use the same compilers and flags as used for
compiling LAMMPS. Currently this is only supported for the GNU
and the Intel compilers. Set the ``QUIP_LIBRARY`` variable if you
want to use a previously compiled and installed QUIP library and
CMake cannot find it.
The QUIP library requires LAPACK (and BLAS) and CMake can identify
their locations and pass that info to the QUIP build script. But
on some systems this triggers a (current) limitation of CMake and
the configuration will fail. Try enabling ``USE_INTERNAL_LINALG`` in
those cases to use the bundled linear algebra library and work around
the limitation.
.. tab:: Traditional make
The download/build procedure for the QUIP library, described in
``lib/quip/README`` file requires setting two environment
variables, ``QUIP_ROOT`` and ``QUIP_ARCH``. These are accessed by
the ``lib/quip/Makefile.lammps`` file which is used when you
compile and link LAMMPS with this package. You should only need
to edit ``Makefile.lammps`` if the LAMMPS build can not use its
settings to successfully build on your system.
----------
.. _scafacos: .. _scafacos:
SCAFACOS package SCAFACOS package
@ -2096,50 +2150,6 @@ To build with this package, you must download and build the
---------- ----------
.. _machdyn:
MACHDYN package
-------------------------------
To build with this package, you must download the Eigen3 library.
Eigen3 is a template library, so you do not need to build it.
.. tabs::
.. tab:: CMake build
.. code-block:: bash
-D DOWNLOAD_EIGEN3 # download Eigen3, value = no (default) or yes
-D EIGEN3_INCLUDE_DIR=path # path to Eigen library (only needed if a custom location)
If ``DOWNLOAD_EIGEN3`` is set, the Eigen3 library will be
downloaded and inside the CMake build directory. If the Eigen3
library is already on your system (in a location where CMake
cannot find it), set ``EIGEN3_INCLUDE_DIR`` to the directory the
``Eigen3`` include file is in.
.. tab:: Traditional make
You can download the Eigen3 library manually if you prefer; follow
the instructions in ``lib/smd/README``. You can also do it in one
step from the ``lammps/src`` dir, using a command like these,
which simply invokes the ``lib/smd/Install.py`` script with the
specified args:
.. code-block:: bash
make lib-smd # print help message
make lib-smd args="-b" # download to lib/smd/eigen3
make lib-smd args="-p /usr/include/eigen3" # use existing Eigen installation in /usr/include/eigen3
Note that a symbolic (soft) link named ``includelink`` is created
in ``lib/smd`` to point to the Eigen dir. When LAMMPS builds it
will use this link. You should not need to edit the
``lib/smd/Makefile.lammps`` file.
----------
.. _vtk: .. _vtk:
VTK package VTK package

View File

@ -283,7 +283,7 @@ in the ``examples/kim/plugin`` folder. No changes to the sources of the
KIM package themselves are needed; only the plugin interface and loader KIM package themselves are needed; only the plugin interface and loader
code needs to be added. This example only supports building with CMake, 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 but is probably a more typical example. To compile you need to run CMake
with -DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>. Other with ``-DLAMMPS_SOURCE_DIR=<path/to/lammps/src/folder>``. Other
configuration setting are identical to those for compiling LAMMPS. configuration setting are identical to those for compiling LAMMPS.
A second example for a plugin from a package is in the A second example for a plugin from a package is in the

View File

@ -100,6 +100,7 @@ Tutorials howto
Howto_cmake Howto_cmake
Howto_github Howto_github
Howto_lammps_gui
Howto_pylammps Howto_pylammps
Howto_wsl Howto_wsl

View File

@ -0,0 +1,402 @@
Using the LAMMPS GUI
====================
LAMMPS GUI is a simple graphical text editor that is linked to the
:ref:`LAMMPS C-library interface <lammps_c_api>` and thus can run LAMMPS
directly using the contents of the editor's text buffer as input.
This is similar to what people traditionally would do to run LAMMPS:
using a regular text editor to edit the input and run the necessary
commands, possibly including the text editor, too, from a command line
terminal window. That is quite effective when running LAMMPS on
high-performance computing facilities and when you are very proficient
in using the command line. The main benefit of a GUI application is
that this integrates well with graphical desktop environments and many
basic tasks can be done directly from within the GUI without switching
to a text console or requiring external programs or scripts to extract
data from the generated output. This makes it easier for beginners to
get started running simple LAMMPS simulations and thus very suitable for
tutorials on LAMMPS. But also makes it easier to switch to a full
featured text editor and more sophisticated visualization and analysis
tools.
-----
The following text provides a detailed tour of the features and
functionality of the LAMMPS GUI. This document describes LAMMPS GUI
version 1.2.
Main window
-----------
When LAMMPS GUI starts, it will show the main window with either an
empty buffer, or have a file loaded. In the latter case it may look like
the following:
.. image:: JPG/lammps-gui-main.png
:align: center
:scale: 50%
There is the menu bar at the top, then the main editor buffer with the
input file contents in the center with line numbers on the left and the
input colored according to the LAMMPS input file syntax. At the bottom
is the status bar, which shows the status of LAMMPS execution on the
left ("Ready." when idle) and the current working directory on the
right. The size of the main window will be stored when exiting and
restored when starting again. The name of the current file in the
buffer is shown in the window title and the text `*modified*` is added
in case the buffer has modifications that are not yet saved to a file.
Opening Files
^^^^^^^^^^^^^
The LAMMPS GUI application will try to open the first command line
argument as input file, further arguments are ignored. When no
argument is given LAMMPS GUI will start with an empty buffer.
Files can also be opened via the ``File`` menu or by drag-and-drop
of a file from a file manager to the editor window. Only one
file can be open at a time, so opening a new file with a filled
buffer will close this buffer and in case the buffer has unsaved
modifications will ask to either cancel the load, discard the
changes or save them.
Running LAMMPS
^^^^^^^^^^^^^^
From within the LAMMPS GUI main window LAMMPS can be started either from
the ``Run`` menu, by the hotkey `Ctrl-Enter` (`Command-Enter` on macOS),
or by clicking on the green button in the status bar. LAMMPS runs in a
separate thread, so the GUI stays responsive and thus it is able to
interact with the calculation and access its data. It is important to
note, that LAMMPS is using the contents of the input buffer for the run,
**not** the file it was read from. If there are unsaved changes in the
buffer, they *will* be used.
.. image:: JPG/lammps-gui-running.png
:align: center
:scale: 75%
While LAMMPS is running, the contents of the status bar change: on the
left side there is a text indicating that LAMMPS is running, which will
contain the selected number of threads, if thread-parallel acceleration
was selected in the ``Preferences`` dialog. On the right side, a
progress bar is shown that displays the estimated progress on the
current :doc:`run command <run>`. Additionally, two windows will open:
the log window with the captured screen output and the chart window with
a line graph created from the thermodynamic output of the run.
The run can be stopped cleanly by using either the ``Stop LAMMPS`` entry
in the ``Run`` menu, the hotkey `Ctrl-/` (`Command-/` on macOS), or
clicking on the red button in the status bar. This will cause that the
running LAMMPS process will complete the current iteration and then
stop. This is equivalent to the command :doc:`timer timeout 0 <timer>`
and implemented by calling the :cpp:func:`lammps_force_timeout()` function
of the LAMMPS C-library interface.
Viewing Snapshot Images
^^^^^^^^^^^^^^^^^^^^^^^
By selecting the ``View Image`` entry in the ``Run`` menu, by hitting
the `Ctrl-I` (`Command-I` on macOS) hotkey or by clicking on the
"palette" button in the status bar, LAMMPS GUI will issue a
:doc:`write_dump image <dump_image>` command and read the resulting
snapshot image into an image viewer window. When possible, LAMMPS
GUI will try to detect which elements the atoms correspond to (via
their mass) and then colorize them accordingly. Otherwise just some
predefined sequence of colors are assigned to different atom types.
.. image:: JPG/lammps-gui-image.png
:align: center
:scale: 50%
The default image size, some default image quality settings, the view
style and some colors can be changed in the ``Preferences`` dialog
window. From the image viewer window further adjustments can be made:
actual image size, high-quality rendering, anti-aliasing, view style,
display of box or axes, zoom factor. The the image can be rotated
horizontally and vertically and it is possible to only display the atoms
within a predefined group (default is "all"). After each change, the
image is rendered again and the display updated. The small palette icon
on the top left will be colored while LAMMPS is running to render the
image and it will be grayed out again, when it is done. When there are
many items to show and high quality images with anti-aliasing are
requested, re-rendering can take several seconds. From the ``File``
menu, the shown image can be saved to a file permanently or copied into
the cut-n-paste buffer for pasting into another application.
Editor Functions
^^^^^^^^^^^^^^^^
The editor has most the usual functionality that similar programs have:
text selection via mouse or with cursor moves while holding the Shift
key, Cut, Copy, Paste, Undo, Redo. All of these editing functions are
available via hotkeys. When trying to exit the editor with a modified
buffer, a dialog will pop up asking whether to cancel the quit, or don't
save or save the buffer's contents to a file.
Context Specific Help
^^^^^^^^^^^^^^^^^^^^^
.. image:: JPG/lammps-gui-popup-help.png
:align: center
:scale: 50%
A unique feature of the LAMMPS GUI is the option to look up the
documentation for the command in the current line. This can be achieved
by either clicking the right mouse button or by using the `Ctrl-?`
hotkey. When clicking the mouse there are additional entries in the
context menu that will open the corresponding documentation page in the
online LAMMPS documentation. When using the hotkey, the first of those
entries will be chosen directly.
Menu
----
The menu bar the entries ``File``, ``Edit``, ``Run``, ``View``, and ``About``.
Instead of using the mouse to click on them, the individual menus can also
be activated by hitting the `Alt` key together with the corresponding underlined
letter, that is `Alt-f` will activate the ``File`` menu. For the corresponding
activated sub-menus, also the underlined letter, together with the `Alt` key can
be used to select instead of the mouse.
File
^^^^
The ``File`` menu offers the usual options:
- ``New`` will clear the current buffer and reset the file name to ``*unknown*``
- ``Open`` will open a dialog to select a new file
- ``Save`` will save the current file; if the file name is ``*unknown*``
a dialog will open to select a new file name
- ``Save As`` will open a dialog to select and new file name and save
the buffer to it
- ``Quit`` will exit LAMMPS GUI. If there are unsaved changes, a dialog
will appear to either cancel the quit, save or don't save the file.
In addition, up to 5 recent file names will be listed after the ``Open``
entry that allows to re-open recent files. This list is stored when
quitting and recovered when starting again.
Edit
^^^^
The ``Edit`` menu offers the usual editor functions like ``Undo``,
``Redo``, ``Cut``, ``Copy``, ``Paste``, but also offers to open the
``Preferences`` dialog and to delete all stored preferences so they
will be reset to their defaults.
Run
^^^
The ``Run`` menu allows to start and stop a LAMMPS process. Rather than
calling the LAMMPS executable as a separate executable, the LAMMPS GUI
is linked to the LAMMPS library and thus can run LAMMPS internally
through the :ref:`LAMMPS C-library interface <lammps_c_api>`.
Specifically, a LAMMPS instance will be created by calling
:cpp:func:`lammps_open_no_mpi` and then the buffer contents run by
calling :cpp:func:`lammps_commands_string`. Certain commands and
features are only available, after a LAMMPS instance is created. Its
presence is indicated by a small LAMMPS ``L`` logo in the status bar at
the bottom left of the main window.
The LAMMPS calculation will be run in a concurrent thread so that the
GUI will stay responsive and will be updated during the run. This can
be used to tell the running LAMMPS instance to stop at the next
timestep. The ``Stop LAMMPS`` entry will do this by calling
:cpp:func:`lammps_force_timeout`, which is equivalent to a :doc:`timer
timeout 0 <timer>` command.
The ``Set Variables`` entry will open a dialog box where :doc:`index style variables <variable>`
can be set. Those variables will be passed to the LAMMPS instance when
it is created and are thus set *before* a run is started.
.. image:: JPG/lammps-gui-variables.png
:align: center
:scale: 75%
The ``Set Variables`` dialog will be pre-populated with entries that are
set as index variables in the input and any variables that are used but
not defined as far as the built-in parser can detect them. New rows for
additional variables can be added through the ``Add Row`` button and
existing rows deleted by clicking on the ``X`` icons on the right.
The ``View Image`` entry will send a :doc:`dump image <dump_image>`
command to the LAMMPS instance, read the resulting file, and show it in
an ``Image Viewer`` window.
The ``View in OVITO`` entry will launch `OVITO <https://ovito.org>`_
with a :doc:`data file <write_data>` of the current state of the system.
This option is only available, if the LAMMPS GUI can find the OVITO
executable in the system path.
The ``View in VMD`` entry will instead launch VMD, also to load a
:doc:`data file <write_data>` of the current state of the system. This
option is only available, if the LAMMPS GUI can find the VMD executable
in the system path.
View
^^^^
The ``View`` menu offers to show or hide the three optional windows
with log output, graphs, or images. The default settings for those
can be changed in the ``Preferences dialog``.
About
^^^^^
The ``About`` menu finally offers a couple of dialog windows and an
option to launch the LAMMPS online documentation in a web browser. The
``About LAMMPS GUI`` entry displays a dialog with a summary of the
configuration settings of the LAMMPS library in use and the version
number of LAMMPS GUI itself. The ``Quick Help`` displays a dialog with
a minimal description of LAMMPS GUI. And ``LAMMPS Manual`` will open
the main page of this LAMMPS documentation at https://docs.lammps.org/.
Preferences
-----------
The ``Preferences`` dialog allows to customize some of the behavior
and looks of the LAMMPS GUI application. The settings are grouped
and each group is displayed within a tab.
.. |guiprefs1| image:: JPG/lammps-gui-prefs-general.png
:width: 25%
.. |guiprefs2| image:: JPG/lammps-gui-prefs-accel.png
:width: 25%
.. |guiprefs3| image:: JPG/lammps-gui-prefs-image.png
:width: 25%
|guiprefs1| |guiprefs2| |guiprefs3|
General Settings:
^^^^^^^^^^^^^^^^^
- *Echo input to log:* when checked, all input commands, including
variable expansions, will be echoed to the log window. This is
equivalent to using `-echo screen` at the command line. There is no
log *file* produced since it always uses `-log none`.
- *Include citation details:* when checked full citation info will be
included to the log window. This is equivalent to using `-cite
screen` on the command line.
- *Show log window by default:* when checked, the screen output of a
LAMMPS run will be collected in a log window during the run
- *Show chart window by default:* when checked, the thermodynamic
output of a LAMMPS run will be collected and displayed in a chart
window as line graphs.
- *Replace log window on new run:* when checked, an existing log
window will be replaced on a new LAMMPS run, otherwise each run will
create a new log window.
- *Replace chart window on new run:* when checked, an existing chart
window will be replaced on a new LAMMPS run, otherwise each run will
create a new chart window.
- *Replace image window on new render:* when checked, an existing
chart window will be replaced when a new snapshot image is requested,
otherwise each command will create a new image window.
- *Path to LAMMPS Shared Library File:* this options is only available
when LAMMPS GUI was compiled to load the LAMMPS library at run time
instead of being linked to it directly. With the ``Browse..`` button
or by changing the text, a different shared library file with a
different compilation of LAMMPS with different settings or from a
different version can be loaded. After this setting was changed,
LAMMPS GUI needs to be re-launched.
- *Select Default Font:* Opens a font selection dialog where the type
and size for the default font (used for everything but the editor and
log) of the application can be set.
- *Select Text Font:* Opens a font selection dialog where the type and
size for the text editor and log font of the application can be set.
Accelerators:
^^^^^^^^^^^^^
This tab enables to select which accelerator package is used and is
equivalent to using the `-suffix` and `-package` flags on the command
line. Only settings supported by the LAMMPS library and local hardware
are available. The `Number of threads` field allows to set the maximum
number of threads for the accelerator packages that use threads.
Snapshot Image:
^^^^^^^^^^^^^^^
This tab allows to set some defaults for the snapshot images displayed
in the ``Image Viewer`` window, like its dimensions and the zoom factor
applied. The *Antialias* switch requests to render images with twice
the number of pixels for width and height and then smoothly scales the
image back to the requested size. This produces higher quality images
with smoother edges at the expense of requiring more CPU time to render
the image. The *HQ Image mode* option turns on using a screen space
ambient occlusion mode (SSAO) when rendering images. This is also more
time consuming, but produces a more 'spatial' representation of the
system. The *VDW Style* checkbox selects whether atoms are represented
by space filling spheres when checked or by smaller spheres and stick.
Finally there are a couple of drop down lists to select the background
and box color.
Hotkeys
-------
Almost all functionality is accessible from the menu or via hotkeys.
The following hotkeys are available (On macOS use the Command key
instead of Ctrl/Control).
.. list-table::
:header-rows: 1
:widths: auto
* - Hotkey
- Function
- Hotkey
- Function
- Hotkey
- Function
- Hotkey
- Function
* - Ctrl+N
- New File
- Ctrl+Z
- Undo edit
- Ctrl+Enter
- Run LAMMPS
- Ctrl+Shift+A
- About LAMMPS GUI
* - Ctrl+O
- Open File
- Ctrl+Shift+Z
- Redo edit
- Ctrl+/
- Stop Active Run
- Ctrl+Shift+H
- Quick Help
* - CTRL+S
- Save File
- Ctrl+C
- Copy text
- Ctrl+Shift+V
- Set Variables
- Ctrl+Shift+G
- LAMMPS GUI Howto
* - Ctrl+Shift+S
- Save File As
- Ctrl+X
- Cut text
- Ctrl+I
- Create Snapshot Image
- Ctrl+Shift+M
- LAMMPS Manual
* - Ctrl+Q
- Quit
- Ctrl+V
- Paste text
- Ctrl+P
- Preferences
- Ctrl+?
- Context Help
Further editing keybindings `are documented with the Qt documentation
<https://doc.qt.io/qt-5/qplaintextedit.html#editing-key-bindings>`_. In
case of conflicts the list above takes precedence.

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -23,10 +23,23 @@ coordinated.
---------- ----------
The content for this manual is part of the LAMMPS distribution. The The content for this manual is part of the LAMMPS distribution in its
online version always corresponds to the latest feature release version. doc directory.
If needed, you can build a local copy of the manual as HTML pages or a
PDF file by following the steps on the :doc:`Build_manual` page. If you * The version of the manual on the LAMMPS website corresponds to the
latest LAMMPS feature release. It is available at:
`https://docs.lammps.org/ <https://docs.lammps.org/>`_.
* A version of the manual corresponding to the latest LAMMPS stable
release (state of the *stable* branch on GitHub) is available online
at: `https://docs.lammps.org/stable/
<https://docs.lammps.org/stable/>`_
* A version of the manual with the features most recently added to
LAMMPS (state of the *develop* branch on GitHub) is available at:
`https://docs.lammps.org/latest/ <https://docs.lammps.org/latest/>`_
If needed, you can build a copy on your local machine of the manual
(HTML pages or PDF file) for the version of LAMMPS you have
downloaded. Follow the steps on the :doc:`Build_manual` page. If you
have difficulties viewing the pages, please :ref:`see this note have difficulties viewing the pages, please :ref:`see this note
<webbrowser>`. <webbrowser>`.
@ -131,26 +144,28 @@ Indices and tables
* :ref:`genindex` * :ref:`genindex`
* :ref:`search` * :ref:`search`
.. _webbrowser: .. only:: html
.. admonition:: Web Browser Compatibility
:class: note
The HTML version of the manual makes use of advanced features present .. _webbrowser:
in "modern" web browsers. This leads to incompatibilities with older .. admonition:: Web Browser Compatibility
web browsers and specific vendor browsers (e.g. Internet Explorer on Windows) :class: note
where parts of the pages are not rendered as expected (e.g. the layout is
broken or mathematical expressions not typeset). In that case we
recommend to install/use a different/newer web browser or use
the `PDF version of the manual <https://docs.lammps.org/Manual.pdf>`_.
The following web browser versions have been verified to work as The HTML version of the manual makes use of advanced features present
expected on Linux, macOS, and Windows where available: in "modern" web browsers. This leads to incompatibilities with older
web browsers and specific vendor browsers (e.g. Internet Explorer on Windows)
where parts of the pages are not rendered as expected (e.g. the layout is
broken or mathematical expressions not typeset). In that case we
recommend to install/use a different/newer web browser or use
the `PDF version of the manual <https://docs.lammps.org/Manual.pdf>`_.
- Safari version 11.1 and later The following web browser versions have been verified to work as
- Firefox version 54 and later expected on Linux, macOS, and Windows where available:
- Chrome version 54 and later
- Opera version 41 and later
- Edge version 80 and later
Also Android version 7.1 and later and iOS version 11 and later have - Safari version 11.1 and later
been verified to render this website as expected. - Firefox version 54 and later
- Chrome version 54 and later
- Opera version 41 and later
- Edge version 80 and later
Also Android version 7.1 and later and iOS version 11 and later have
been verified to render this website as expected.

View File

@ -1797,7 +1797,8 @@ Aidan Thompson^3, Gabor Csanyi^2, Christoph Ortner^4, Ralf Drautz^1.
**Install:** **Install:**
This package has :ref:`specific installation instructions <ml-pace>` on the This package has :ref:`specific installation instructions <ml-pace>` on the
:doc:`Build extras <Build_extras>` page. :doc:`Build extras <Build_extras>` page. This package may also be compiled
as a plugin to avoid licensing conflicts when distributing binaries.
**Supporting info:** **Supporting info:**
@ -2357,7 +2358,9 @@ and Gareth Tribello.
**Install:** **Install:**
This package has :ref:`specific installation instructions <plumed>` on the :doc:`Build extras <Build_extras>` page. This package has :ref:`specific installation instructions <plumed>` on the
:doc:`Build extras <Build_extras>` page. This package may also be compiled
as a plugin to avoid licensing conflicts when distributing binaries.
**Supporting info:** **Supporting info:**

View File

@ -18,7 +18,7 @@ package was developed primarily by Christian Trott (Sandia) and Stan
Moore (Sandia) with contributions of various styles by others, Moore (Sandia) with contributions of various styles by others,
including Sikandar Mashayak (UIUC), Ray Shan (Sandia), and Dan Ibanez including Sikandar Mashayak (UIUC), Ray Shan (Sandia), and Dan Ibanez
(Sandia). For more information on developing using Kokkos abstractions (Sandia). For more information on developing using Kokkos abstractions
see the Kokkos `Wiki <https://github.com/kokkos/kokkos/wiki>`_. see the `Kokkos Wiki <https://github.com/kokkos/kokkos/wiki>`_.
Kokkos currently provides support for 4 modes of execution (per MPI Kokkos currently provides support for 4 modes of execution (per MPI
task). These are Serial (MPI-only for CPUs and Intel Phi), OpenMP task). These are Serial (MPI-only for CPUs and Intel Phi), OpenMP
@ -29,11 +29,12 @@ produce an executable compatible with a specific hardware.
.. admonition:: C++14 support .. admonition:: C++14 support
:class: note :class: note
Kokkos requires using a compiler that supports the c++14 standard. For Kokkos version 3.x requires using a compiler that supports the c++14 standard.
some compilers, it may be necessary to add a flag to enable c++14 support. For some compilers, it may be necessary to add a flag to enable c++14 support.
For example, the GNU compiler uses the -std=c++14 flag. For a list of For example, the GNU compiler uses the -std=c++14 flag. For a list of
compilers that have been tested with the Kokkos library, see the Kokkos compilers that have been tested with the Kokkos library, see the
`README <https://github.com/kokkos/kokkos/blob/master/README.md>`_. `requirements document of the Kokkos Wiki
<https://kokkos.github.io/kokkos-core-wiki/requirements.html>`_.
.. admonition:: NVIDIA CUDA support .. admonition:: NVIDIA CUDA support
:class: note :class: note

View File

@ -645,106 +645,49 @@ LAMMPS GUI
Overview Overview
^^^^^^^^ ^^^^^^^^
LAMMPS GUI is essentially a small graphical text editor that is linked LAMMPS GUI is a simple graphical text editor that is linked to the
to the :ref:`LAMMPS C-library interface <lammps_c_api>` and thus can run :ref:`LAMMPS C-library interface <lammps_c_api>` and thus can run LAMMPS
LAMMPS directly using the contents of the editor's text buffer as input. directly using the contents of the editor's text buffer as input.
This is similar to what people usually would do using a text editor to
edit the input and then a command line terminal window to run the input This is similar to what people traditionally would do to run LAMMPS:
commands. The main benefit is that this integrates very well with using a regular text editor to edit the input and run the necessary
graphical desktop environments and that it is easier to use for commands, possibly including the text editor, too, from a command line
beginners in running computations and thus very suitable for tutorials terminal window. This similarity is a design goal. While making it easy
on LAMMPS. A small difference is that for the LAMMPS GUI it is not for beginners to start with LAMMPS, it is also the intention to simplify
require to first commit its buffer of the text editor to a file. the transition to workflows like most experienced LAMMPS users do.
All features have been extensively exposed to hotkeys, so that there is
also appeal for experienced LAMMPS users, too, especially for
prototyping and testing simulations setups.
Features Features
^^^^^^^^ ^^^^^^^^
The main window of the LAMMPS GUI is a generic text editor window with A detailed discussion and explanation of all features and functionality
line numbers and syntax highlighting set up for LAMMPS input files. It are in the :doc:`Howto_lammps_gui` tutorial Howto page.
can be used to edit any kind of text file, though. The output of a run
is captured and displayed in a separate dialog window and *not* sent to
the console or a log file (unless the :doc:`log command <log>` is used
in the input. The log window is regularly updated during the run and a
progress bar for the run command shown at the bottom of the main window.
Starting a new run will open another log windows. The state of LAMMPS
will be reset between two runs. After the simulation is finished, an
image of the simulated system can be created and shown in an image
viewer window. Ongoing runs can be stopped at the next iteration via
triggering a timeout.
When opening a file, the editor will determine the directory where the Here are a few highlights of LAMMPS GUI
file resides and switch its current working directory to the folder of
that file. Many LAMMPS inputs contain commands that read other files,
typically from the folder of the input file. The GUI will always show
the current working directory in the bottom. The editor window can also
receive (entire) files via drag-n-drop from a file manager GUI or a
desktop environment. When exiting the GUI with a modified buffer, a
dialog asking to either cancel, ignore the modifications, or save the
file with show up. Same when attempting to load a new file into a
modified buffer.
Hotkeys - Text editor with syntax highlighting customized for LAMMPS
^^^^^^^ - Text editor will switch working directory to folder of file in buffer
- Text editor will remember up to 5 recent files
Almost all functionality is accessible from the menu or via hotkeys. - Context specific LAMMPS command help via online documentation
The following hotkeys are available (On macOS use the Command key - LAMMPS is running in a concurrent thread, so the GUI remains responsive
instead of Ctrl (aka Control)). - Support for accelerator packages
- Progress bar indicates that LAMMPS is running
.. list-table:: - LAMMPS can be started and stopped with a hotkey
:header-rows: 1 - Screen output is captured in a Log Window
:widths: auto - Thermodynamic output is captured and displayed as line graph in a Chart Window
- Visualization of current state in Image Viewer (via :doc:`dump image <dump_image>`)
* - Hotkey - Many adjustable settings and preferences that are persistent
- Function - Dialog to set variables from the LAMMPS command line
- Hotkey
- Function
- Hotkey
- Function
- Hotkey
- Function
* - Ctrl+N
- New File
- Ctrl+Z
- Undo edit
- Ctrl+V
- Paste text
- Ctrl+Q
- Quit (Main Window only)
* - Ctrl+O
- Open File
- Ctrl+Shift+Z
- Redo edit
- Ctrl+Enter
- Run LAMMPS
- Ctrl+W
- Close (Log and Image Window only)
* - CTRL+S
- Save File
- Ctrl+C
- Copy text
- Ctrl+/
- Stop Active Run
- Ctrl+P
- Preferences
* - Ctrl+Shift+S
- Save File As
- Ctrl+X
- Cut text
- Ctrl+I
- Create Snapshot Image
- Ctrl+Shift+/
- Quick Help
Further editing keybindings `are documented with the Qt documentation
<https://doc.qt.io/qt-5/qplaintextedit.html#editing-key-bindings>`_. In
case of conflicts the list above takes precedence.
Parallelization Parallelization
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
Due to its nature as a graphical application, it is not possible to use Due to its nature as a graphical application, it is not possible to use
the LAMMPS GUI in parallel with MPI, but OpenMP multi-threading is the LAMMPS GUI in parallel with MPI, but OpenMP multi-threading and GPU
available and enabled by default. acceleration is available and enabled by default.
Prerequisites and portability Prerequisites and portability
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -752,63 +695,65 @@ Prerequisites and portability
LAMMPS GUI is programmed in C++ based on the C++11 standard and using LAMMPS GUI is programmed in C++ based on the C++11 standard and using
the `Qt GUI framework <https://www.qt.io/product/framework>`_. the `Qt GUI framework <https://www.qt.io/product/framework>`_.
Currently, Qt version 5.12 or later is required; Qt 5.15LTS is Currently, Qt version 5.12 or later is required; Qt 5.15LTS is
recommended Qt 6.x not (yet) supported. Furthermore, CMake version 3.16 recommended; Qt 6.x not (yet) supported. Building LAMMPS with CMake 3.16
is required and LAMMPS must be configured with ``-D or later is required. The LAMMPS GUI has been successfully compiled and tested on:
LAMMPS_EXCETIONS=on`` and ``-D BUILD_MPI=off``. It has been successfully
compiled and tested on:
- Ubuntu Linux 20.04LTS x86_64 using GCC 9, Qt version 5.12 - Ubuntu Linux 20.04LTS x86_64 using GCC 9, Qt version 5.12
- Fedora Linux 38 x86\_64 using GCC 13 and Clang 16, Qt version 5.15LTS - Fedora Linux 38 x86\_64 using GCC 13 and Clang 16, Qt version 5.15LTS
- Apple macOS 12 (Monterey) and macOS 13 (Ventura) with Xcode on arm64 and x86\_64, Qt version 5.15LTS - Apple macOS 12 (Monterey) and macOS 13 (Ventura) with Xcode on arm64 and x86\_64, Qt version 5.15LTS
- Windows 10 and 11 x86_64 with Visual Studio 2022 and Visual C++ 14.36, Qt version 5.15LTS - Windows 10 and 11 x86_64 with Visual Studio 2022 and Visual C++ 14.36, Qt version 5.15LTS
- Windows 10 and 11 x86_64 with MinGW / GCC 10.0 cross-compiler on Fedora 38, Qt version 5.15LTS
Pre-compiled executables Pre-compiled executables
^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
Pre-compiled LAMMPS executables including the GUI are currently Pre-compiled LAMMPS executables including the GUI are currently
available from https://download.lammps.org/static. You can unpack the available from https://download.lammps.org/static or
archive (or mount the macOS disk image) and run the GUI directly in https://github.com/lammps/lammps/releases. You can unpack the archives
place. The folder may also be moved around and added to the ``PATH`` (or mount the macOS disk image) and run the GUI directly in place. The
environment variable so the executables will be found automatically. The folder may also be moved around and added to the ``PATH`` environment
LAMMPS GUI executable is called ``lammps-gui`` and takes no arguments or variable so the executables will be found automatically. The LAMMPS GUI
will interpret the first argument as filename to load. executable is called ``lammps-gui`` and either takes no arguments or
attempts to load the first argument as LAMMPS input file.
Compilation Compilation
^^^^^^^^^^^ ^^^^^^^^^^^
The source for the LAMMPS GUI is included with the LAMMPS source code The source for the LAMMPS GUI is included with the LAMMPS source code
distribution in the folder `tools/lammps-gui` and thus it can be can be distribution in the folder ``tools/lammps-gui`` and thus it can be can
built as part of a regular LAMMPS compilation. be built as part of a regular LAMMPS compilation. :doc:`Using CMake
:doc:`Using CMake <Howto_cmake>` is required. <Howto_cmake>` is required. To enable its compilation, the CMake
To enable its compilation the CMake variable ``-D BUILD_LAMMPS_GUI=on`` variable ``-D BUILD_LAMMPS_GUI=on`` must be set when creating the CMake
must be set when creating the CMake configuration. All other settings configuration. All other settings (compiler, flags, compile type) for
(compiler, flags, compile type) for LAMMPS GUI are then inherited from LAMMPS GUI are then inherited from the regular LAMMPS build. If the Qt
the regular LAMMPS build. If the Qt library is packaged for Linux library is packaged for Linux distributions, then its location is
distributions, then its location is typically auto-detected since the typically auto-detected since the required CMake configuration files are
required CMake configuration files are stored in a location where CMake stored in a location where CMake can find them without additional help.
can find them without additional help. Otherwise, the location of the Otherwise, the location of the Qt library installation must be indicated
Qt library installation must be indicated by setting by setting ``-D Qt5_DIR=/path/to/qt5/lib/cmake/Qt5``, which is a path to
``-D Qt5_DIR=/path/to/qt5/lib/cmake/Qt5``, which is a path to a folder inside a folder inside the Qt installation that contains the file
the Qt installation that contains the file ``Qt5Config.cmake``. ``Qt5Config.cmake``.
It is also possible to build the LAMMPS GUI as a standalone executable It should be possible to build the LAMMPS GUI as a standalone
(e.g. when LAMMPS has been compiled with traditional make), then the compilation (e.g. when LAMMPS has been compiled with traditional make),
CMake configuration needs to be told where to find the LAMMPS headers then the CMake configuration needs to be told where to find the LAMMPS
and the LAMMPS library, via `-D LAMMPS_SOURCE_DIR=/path/to/lammps/src`. headers and the LAMMPS library, via ``-D
CMake will try to guess a build folder with the LAMMPS library from that LAMMPS_SOURCE_DIR=/path/to/lammps/src``. CMake will try to guess a
path, but it can also be set with `-D LAMMPS_LIB_DIR=/path/to/lammps/lib`. build folder with the LAMMPS library from that path, but it can also be
set with ``-D LAMMPS_LIB_DIR=/path/to/lammps/lib``.
Rather than linking to the LAMMPS library during compilation, it is also Rather than linking to the LAMMPS library during compilation, it is also
possible to compile the GUI with a plugin loader library that will load possible to compile the GUI with a plugin loader library that will load
the LAMMPS library dynamically at runtime during the start of the GUI the LAMMPS library dynamically at runtime during the start of the GUI
from a shared library; e.g. `liblammps.so` or `liblammps.dylib` or from a shared library; e.g. ``liblammps.so`` or ``liblammps.dylib`` or
`liblammps.dll` (depending on the operating system). This has the ``liblammps.dll`` (depending on the operating system). This has the
advantage that the LAMMPS library can be updated LAMMPS without having advantage that the LAMMPS library can be updated LAMMPS without having
to recompile the GUI. The ABI of the LAMMPS C-library interface is very to recompile the GUI. The ABI of the LAMMPS C-library interface is very
stable and generally backward compatible. This feature is enabled by stable and generally backward compatible. This feature is enabled by
setting ``-D LAMMPS_GUI_USE_PLUGIN=on`` and then setting ``-D LAMMPS_GUI_USE_PLUGIN=on`` and then ``-D
``-D LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader``. Typically, this LAMMPS_PLUGINLIB_DIR=/path/to/lammps/plugin/loader``. Typically, this
would be the ``examples/COUPLE/plugin`` folder of the LAMMPS distribution. would be the ``examples/COUPLE/plugin`` folder of the LAMMPS
distribution.
Platform notes Platform notes
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
@ -818,7 +763,7 @@ macOS
When building on macOS, the build procedure will try to manufacture a When building on macOS, the build procedure will try to manufacture a
drag-n-drop installer, LAMMPS-macOS-multiarch.dmg, when using the 'dmg' drag-n-drop installer, LAMMPS-macOS-multiarch.dmg, when using the 'dmg'
target (i.e. `cmake --build <build dir> --target dmg` or `make dmg`. target (i.e. ``cmake --build <build dir> --target dmg`` or ``make dmg``.
To build multi-arch executables that will run on both, arm64 and x86_64 To build multi-arch executables that will run on both, arm64 and x86_64
architectures natively, it is necessary to set the CMake variable ``-D architectures natively, it is necessary to set the CMake variable ``-D
@ -831,29 +776,50 @@ version.
Windows Windows
""""""" """""""
On Windows currently only compilation from within Visual Studio 2022 is On Windows either native compilation from within Visual Studio 2022 with
supported and tested. Using CMake and Ninja as build system is Visual C++ is supported and tested, or compilation with the MinGW / GCC
required. Qt needs to be installed, tested was a package downloaded from cross-compiler environment on Fedora Linux.
https://www.qt.io, into the ``C:\\Qt`` folder. There is a custom
`x64-GUI-MSVC` build configuration provided that will activate building **Visual Studio**
the `lammps-gui.exe` executable in addition to LAMMPS. When requesting
an installation from the `Build` menu, it will create a compressed zip Using CMake and Ninja as build system are required. Qt needs to be
file with the executables and required dependent .dll files. This zip installed, tested was a binary package downloaded from
file can be uncompressed and ``lammps-gui.exe`` run directly from there. https://www.qt.io, which installs into the ``C:\\Qt`` folder by default.
The uncompressed folder can be added to the ``PATH`` environment and There is a custom `x64-GUI-MSVC` build configuration provided in the
LAMMPS and LAMMPS GUI can be launched from anywhere from the command ``CMakeSettings.json`` file that Visual Studio uses to store different
line. compilation settings for project. Choosing this configuration will
activate building the `lammps-gui.exe` executable in addition to LAMMPS
through importing package selection from the ``windows.cmake`` preset
file and enabling building the LAMMPS GUI and disabling building with MPI.
When requesting an installation from the `Build` menu in Visual Studio,
it will create a compressed ``LAMMPS-Win10-amd64.zip`` zip file with the
executables and required dependent .dll files. This zip file can be
uncompressed and ``lammps-gui.exe`` run directly from there. The
uncompressed folder can be added to the ``PATH`` environment and LAMMPS
and LAMMPS GUI can be launched from anywhere from the command line.
**MinGW64 Cross-compiler**
The standard CMake build procedure can be applied and the
``mingw-cross.cmake`` preset used. By using ``mingw64-cmake`` the CMake
command will automatically include a suitable CMake toolchain file (the
regular cmake command can be used after that). After building the
libraries and executables, you can build the target 'zip'
(i.e. ``cmake --build <build dir> --target zip`` or ``make zip``
to stage all installed files into a LAMMPS_GUI folder and then
run a script to copy all required dependencies, some other files,
and create a zip file from it.
Linux Linux
""""" """""
Version 5.12 or later of the Qt library and CMake version 3.16 are Version 5.12 or later of the Qt library is required. Those are provided
required and those are provided by, e.g., Ubuntu 20.04LTS. Thus older by, e.g., Ubuntu 20.04LTS. Thus older Linux distributions are not
Linux distributions are not likely to be supported, while more recent likely to be supported, while more recent ones will work, even for
ones will work, even for pre-compiled executables (see above). After pre-compiled executables (see above). After compiling with
compiling with ``cmake --build <build folder>``, use ``cmake --build <build folder>``, use ``cmake --build <build
``cmake --build <build folder> --target tgz`` or ``make tgz`` to build folder> --target tgz`` or ``make tgz`` to build a
a ``LAMMPS-Linux-amd64.tar.gz`` file with the executables and their ``LAMMPS-Linux-amd64.tar.gz`` file with the executables and their
support libraries. support libraries.
---------- ----------

View File

@ -31,15 +31,6 @@ Commands
dihedral_write dihedral_write
dimension dimension
displace_atoms displace_atoms
dump
dump_adios
dump_cfg_uef
dump_h5md
dump_image
dump_modify
dump_molfile
dump_netcdf
dump_vtk
dynamical_matrix dynamical_matrix
echo echo
fix fix

View File

@ -68,7 +68,7 @@ reciprocal lattice nodes. The mesh spacing is defined either (a) by
the entire simulation domain or (b) manually using selected values as the entire simulation domain or (b) manually using selected values as
shown in the 2D diagram below. shown in the 2D diagram below.
.. image:: img/saed_mesh.jpg .. image:: img/saed_mesh.png
:scale: 75% :scale: 75%
:align: center :align: center

View File

@ -45,7 +45,8 @@ Restrictions
"""""""""""" """"""""""""
This compute is part of the MACHDYN package. It is only enabled if This compute is part of the MACHDYN package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info. LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -24,7 +24,7 @@ Description
""""""""""" """""""""""
Define a computation that provides the per-particle volume and the sum Define a computation that provides the per-particle volume and the sum
of the per-particle volumes of the group for which the fix is defined. of the per-particle volumes of the group for which the compute is defined.
See `this PDF guide <PDF/MACHDYN_LAMMPS_userguide.pdf>`_ to using Smooth See `this PDF guide <PDF/MACHDYN_LAMMPS_userguide.pdf>`_ to using Smooth
Mach Dynamics in LAMMPS. Mach Dynamics in LAMMPS.
@ -41,13 +41,14 @@ The per-particle vector values will be given in :doc:`units <units>` of
volume. volume.
Additionally, the compute returns a scalar, which is the sum of the Additionally, the compute returns a scalar, which is the sum of the
per-particle volumes of the group for which the fix is defined. per-particle volumes of the group for which the compute is defined.
Restrictions Restrictions
"""""""""""" """"""""""""
This compute is part of the MACHDYN package. It is only enabled if This compute is part of the MACHDYN package. It is only enabled if
LAMMPS was built with that package. See the :doc:`Build package <Build_package>` page for more info. LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -223,7 +223,7 @@ result. I.e. the last 2 columns of thermo output will be the same:
system pressure. system pressure.
The compute stress/atom can be used in a number of ways. Here is an The compute stress/atom can be used in a number of ways. Here is an
example to compute a 1-d pressure profile in z-direction across the example to compute a 1-d pressure profile in x-direction across the
complete simulation box. You will need to adjust the number of bins and the complete simulation box. You will need to adjust the number of bins and the
selections for time averaging to your specific simulation. This assumes selections for time averaging to your specific simulation. This assumes
that the dimensions of the simulation cell does not change. that the dimensions of the simulation cell does not change.

View File

@ -72,7 +72,7 @@ reciprocal lattice nodes. The mesh spacing is defined either (a) by the entire
simulation domain or (b) manually using selected values as simulation domain or (b) manually using selected values as
shown in the 2D diagram below. shown in the 2D diagram below.
.. image:: img/xrd_mesh.jpg .. image:: img/xrd_mesh.png
:scale: 75% :scale: 75%
:align: center :align: center

View File

@ -1,8 +1,9 @@
Dump Styles Dump Styles
############### ###########
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
:glob: :glob:
dump* dump
dump_*

View File

@ -307,7 +307,9 @@ the :doc:`run <run>` command. This fix is not invoked during
Restrictions Restrictions
"""""""""""" """"""""""""
none
The keyword "scale yes" is not supported for scaling per-atom parameters
diameter and change. You can use :doc:`fix adapt <fix_adapt>` for those.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -181,6 +181,12 @@ This fix is part of the MC package. It is only enabled if LAMMPS was
built with that package. See the :doc:`Build package <Build_package>` built with that package. See the :doc:`Build package <Build_package>`
doc page for more info. doc page for more info.
This fix cannot be used with systems that do not have per-type masses
(e.g. atom style sphere) since the implemented algorithm pre-computes
velocity rescaling factors from per-type masses and ignores any per-atom
masses, if present. In case both, per-type and per-atom masses are
present, a warning is printed.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -541,10 +541,10 @@ Restrictions
Related commands Related commands
"""""""""""""""" """"""""""""""""
:doc:`compute <compute>`, :doc:`fix ave/atom <fix_ave_atom>`, `fix :doc:`compute <compute>`, :doc:`fix ave/atom <fix_ave_atom>`,
:doc:ave/histo <fix_ave_histo>`, :doc:`fix ave/time <fix_ave_time>`, :doc:`fix ave/histo <fix_ave_histo>`, :doc:`fix ave/time <fix_ave_time>`,
:doc:`variable <variable>`, :doc:`fix ave/correlate :doc:`variable <variable>`, :doc:`fix ave/correlate <fix_ave_correlate>`,
:doc:<fix_ave_correlate>`, `fix ave/atogrid <fix_ave_grid>` :doc:`fix ave/grid <fix_ave_grid>`
Default Default

View File

@ -65,7 +65,6 @@ Examples
fix 1 all ave/correlate 1 50 10000 & fix 1 all ave/correlate 1 50 10000 &
c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] & c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] &
type upper ave running title1 "My correlation data" type upper ave running title1 "My correlation data"
fix 1 all ave/correlate 1 50 10000 c_thermo_press[*] fix 1 all ave/correlate 1 50 10000 c_thermo_press[*]
Description Description

View File

@ -20,11 +20,11 @@ Syntax
.. parsed-literal:: .. parsed-literal::
c_ID = global scalar calculated by a compute with ID c_ID = global scalar calculated by a compute with ID
c_ID[I] = Ith component of global vector calculated by a compute with ID c_ID[I] = Ith component of global vector calculated by a compute with ID, I can include wildcard (see below)
f_ID = global scalar calculated by a fix with ID f_ID = global scalar calculated by a fix with ID
f_ID[I] = Ith component of global vector calculated by a fix with ID f_ID[I] = Ith component of global vector calculated by a fix with ID, I can include wildcard (see below)
v_name = global value calculated by an equal-style variable with name v_name = global value calculated by an equal-style variable with name
v_name[I] = Ith component of global vector calculated by a vector-style variable with name v_name[I] = Ith component of a vector-style variable with name, I can include wildcard (see below)
* zero or more keyword/arg pairs may be appended * zero or more keyword/arg pairs may be appended
* keyword = *type* or *start* or *file* or *overwrite* or *title1* or *title2* or *ncorr* or *nlen* or *ncount* * keyword = *type* or *start* or *file* or *overwrite* or *title1* or *title2* or *ncorr* or *nlen* or *ncount*
@ -63,6 +63,7 @@ Examples
fix 1 all ave/correlate/long 1 10000 & fix 1 all ave/correlate/long 1 10000 &
c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] & c_thermo_press[1] c_thermo_press[2] c_thermo_press[3] &
type upper title1 "My correlation data" nlen 15 ncount 3 type upper title1 "My correlation data" nlen 15 ncount 3
fix 1 all ave/correlate/long 1 10000 c_thermo_press[*]
Description Description
""""""""""" """""""""""
@ -80,8 +81,10 @@ specified values may represent calculations performed by computes and
fixes which store their own "group" definitions. fixes which store their own "group" definitions.
Each listed value can be the result of a compute or fix or the Each listed value can be the result of a compute or fix or the
evaluation of an equal-style variable. See the evaluation of an equal-style or vector-style variable. For
:doc:`fix ave/correlate <fix_ave_correlate>` page for details. vector-style variables, the specified indices can include a wildcard
character. See the :doc:`fix ave/correlate <fix_ave_correlate>` page
for details.
The *Nevery* and *Nfreq* arguments specify on what time steps the input The *Nevery* and *Nfreq* arguments specify on what time steps the input
values will be used to calculate correlation data and the frequency values will be used to calculate correlation data and the frequency

View File

@ -253,11 +253,11 @@ built with that package. See the :doc:`Build package <Build_package>`
page for more info. page for more info.
The :doc:`atom_style <atom_style>`, used must contain the charge The :doc:`atom_style <atom_style>`, used must contain the charge
property, for example, the style could be *charge* or *full*. Only property and have per atom type masses, for example, the style could be
usable for 3D simulations. Atoms specified as free ions cannot be part *charge* or *full*. Only usable for 3D simulations. Atoms specified as
of rigid bodies or molecules and cannot have bonding interactions. The free ions cannot be part of rigid bodies or molecules and cannot have
scheme is limited to integer charges, any atoms with non-integer charges bonding interactions. The scheme is limited to integer charges, any
will not be considered by the fix. atoms with non-integer charges will not be considered by the fix.
All interaction potentials used must be continuous, otherwise the MD All interaction potentials used must be continuous, otherwise the MD
integration and the particle exchange MC moves do not correspond to the integration and the particle exchange MC moves do not correspond to the

View File

@ -440,8 +440,11 @@ This fix is part of the MC package. It is only enabled if LAMMPS was
built with that package. See the :doc:`Build package <Build_package>` built with that package. See the :doc:`Build package <Build_package>`
doc page for more info. doc page for more info.
This fix style requires an :doc:`atom style <atom_style>` with per atom
type masses.
Do not set "neigh_modify once yes" or else this fix will never be Do not set "neigh_modify once yes" or else this fix will never be
called. Reneighboring is required. called. Reneighboring is **required**.
Only usable for 3D simulations. Only usable for 3D simulations.

View File

@ -62,7 +62,7 @@ performed using the :doc:`fix deform <fix_deform>`, :doc:`fix nvt/sllod
<fix_nvt_sllod>`, and :doc:`compute temp/deform <compute_temp_deform>` <fix_nvt_sllod>`, and :doc:`compute temp/deform <compute_temp_deform>`
commands. commands.
The applied flow field is set by the *eps* keyword. The values The applied flow field is set by the *erate* keyword. The values
*edot_x* and *edot_y* correspond to the strain rates in the xx and yy *edot_x* and *edot_y* correspond to the strain rates in the xx and yy
directions. It is implicitly assumed that the flow field is directions. It is implicitly assumed that the flow field is
traceless, and therefore the strain rate in the zz direction is eqal traceless, and therefore the strain rate in the zz direction is eqal

View File

@ -24,7 +24,7 @@ Examples
.. code-block:: LAMMPS .. code-block:: LAMMPS
fix pl all plumed all plumed plumedfile plumed.dat outfile p.log fix pl all plumed plumedfile plumed.dat outfile p.log
Description Description
""""""""""" """""""""""

View File

@ -232,8 +232,6 @@ These fixes are part of the QEQ package. They are only enabled if
LAMMPS was built with that package. See the :doc:`Build package LAMMPS was built with that package. See the :doc:`Build package
<Build_package>` page for more info. <Build_package>` page for more info.
These qeq fixes are not compatible with the GPU and USER-INTEL packages.
These qeq fixes will ignore electric field contributions from These qeq fixes will ignore electric field contributions from
:doc:`fix efield <fix_efield>`. :doc:`fix efield <fix_efield>`.

View File

@ -155,6 +155,9 @@ This fix is part of the MC package. It is only enabled if LAMMPS was
built with that package. See the :doc:`Build package <Build_package>` built with that package. See the :doc:`Build package <Build_package>`
page for more info. page for more info.
This fix style requires an :doc:`atom style <atom_style>` with per atom
type masses.
At present the fix provides optimized subroutines for EAM type At present the fix provides optimized subroutines for EAM type
potentials (see above) that calculate potential energy changes due to potentials (see above) that calculate potential energy changes due to
*local* atom type swaps very efficiently. Other potentials are *local* atom type swaps very efficiently. Other potentials are

View File

@ -195,8 +195,11 @@ doc page for more info.
Do not set "neigh_modify once yes" or else this fix will never be Do not set "neigh_modify once yes" or else this fix will never be
called. Reneighboring is **required**. called. Reneighboring is **required**.
Can be run in parallel, but aspects of the GCMC part will not scale well This fix style requires an :doc:`atom style <atom_style>` with per atom
in parallel. Only usable for 3D simulations. type masses.
Can be run in parallel, but some aspects of the insertion procedure
will not scale well in parallel. Only usable for 3D simulations.
Related commands Related commands

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View File

@ -68,8 +68,8 @@ for more info.
Related commands Related commands
"""""""""""""""" """"""""""""""""
:doc:`improper_coeff <improper_coeff>`, `improper_harmonic :doc:`improper_coeff <improper_coeff>`,
:doc:<improper_harmonic>` :doc:`improper_harmonic <improper_harmonic>`
Default Default
""""""" """""""

View File

@ -267,6 +267,8 @@ The value of the *page* setting must be at least 10x larger than the
*one* setting. This ensures neighbor pages are not mostly empty *one* setting. This ensures neighbor pages are not mostly empty
space. space.
The *exclude group* setting is currently not compatible with dynamic groups.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -30,11 +30,11 @@ Description
Style *beck* computes interactions based on the potential by Style *beck* computes interactions based on the potential by
:ref:`(Beck) <Beck>`, originally designed for simulation of Helium. It :ref:`(Beck) <Beck>`, originally designed for simulation of Helium. It
includes truncation at a cutoff distance Rc. includes truncation at a cutoff distance :math:`r_c`.
.. math:: .. math::
E(r) &= A \exp\left[-\alpha r - \beta r^6\right] - \frac{B}{\left(r^2+a^2\right)^3} \left(1+\frac{2.709+3a^2}{r^2+a^2}\right) \qquad r < R_c \\ E(r) &= A \exp\left[-\alpha r - \beta r^6\right] - \frac{B}{\left(r^2+a^2\right)^3} \left(1+\frac{2.709+3a^2}{r^2+a^2}\right) \qquad r < r_c \\
The following coefficients must be defined for each pair of atoms The following coefficients must be defined for each pair of atoms
types via the :doc:`pair_coeff <pair_coeff>` command as in the examples types via the :doc:`pair_coeff <pair_coeff>` command as in the examples
@ -50,7 +50,7 @@ commands.
* cutoff (distance units) * cutoff (distance units)
The last coefficient is optional. If not specified, the global cutoff The last coefficient is optional. If not specified, the global cutoff
:math:`R_c` is used. :math:`r_c` is used.
---------- ----------

View File

@ -138,8 +138,12 @@ This pair style can only be used via the *pair* keyword of the
Restrictions Restrictions
"""""""""""" """"""""""""
This style is part of the MC package. It is only enabled if LAMMPS This pair style is part of the MC package. It is only enabled if LAMMPS
was built with that package. See the :doc:`Build package <Build_package>` page for more info. was built with that package. See the :doc:`Build package
<Build_package>` page for more info.
This pair style requires an :doc:`atom style <atom_style>` with per
atom type masses.
Related commands Related commands
"""""""""""""""" """"""""""""""""

View File

@ -31,13 +31,13 @@ Style *lj/smooth/linear* computes a truncated and force-shifted LJ
interaction (aka Shifted Force Lennard-Jones) that combines the interaction (aka Shifted Force Lennard-Jones) that combines the
standard 12/6 Lennard-Jones function and subtracts a linear term based standard 12/6 Lennard-Jones function and subtracts a linear term based
on the cutoff distance, so that both, the potential and the force, go on the cutoff distance, so that both, the potential and the force, go
continuously to zero at the cutoff Rc :ref:`(Toxvaerd) <Toxvaerd>`: continuously to zero at the cutoff :math:`r_c` :ref:`(Toxvaerd) <Toxvaerd>`:
.. math:: .. math::
\phi\left(r\right) & = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - \phi\left(r\right) & = 4 \epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} -
\left(\frac{\sigma}{r}\right)^6 \right] \\ \left(\frac{\sigma}{r}\right)^6 \right] \\
E\left(r\right) & = \phi\left(r\right) - \phi\left(R_c\right) - \left(r - R_c\right) \left.\frac{d\phi}{d r} \right|_{r=R_c} \qquad r < R_c E\left(r\right) & = \phi\left(r\right) - \phi\left(r_c\right) - \left(r - r_c\right) \left.\frac{d\phi}{d r} \right|_{r=r_c} \qquad r < r_c
The following coefficients must be defined for each pair of atoms The following coefficients must be defined for each pair of atoms
types via the :doc:`pair_coeff <pair_coeff>` command as in the examples types via the :doc:`pair_coeff <pair_coeff>` command as in the examples
@ -77,8 +77,9 @@ tail option for adding long-range tail corrections to energy and
pressure, since the energy of the pair interaction is smoothed to 0.0 pressure, since the energy of the pair interaction is smoothed to 0.0
at the cutoff. at the cutoff.
This pair style writes its information to :doc:`binary restart files <restart>`, so pair_style and pair_coeff commands do not need This pair style writes its information to :doc:`binary restart files <restart>`,
to be specified in an input script that reads a restart file. so pair_style and pair_coeff commands do not need to be specified
in an input script that reads a restart file.
This pair style can only be used via the *pair* keyword of the 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 :doc:`run_style respa <run_style>` command. It does not support the

View File

@ -427,7 +427,7 @@ package. They are only enabled if LAMMPS was built with that package.
See the :doc:`Build package <Build_package>` page for more info. See the :doc:`Build package <Build_package>` page for more info.
The maximum number of elements, that can be read from the MEAM library The maximum number of elements, that can be read from the MEAM library
file, is determined at compile time. The default is 5. If you need file, is determined at compile time. The default is 8. If you need
support for more elements, you have to change the the constant 'maxelt' support for more elements, you have to change the the constant 'maxelt'
at the beginning of the file ``src/MEAM/meam.h`` and update/recompile at the beginning of the file ``src/MEAM/meam.h`` and update/recompile
LAMMPS. There is no limit on the number of atoms types. LAMMPS. There is no limit on the number of atoms types.

View File

@ -35,7 +35,7 @@ The *mie/cut* style computes the Mie potential, given by
E = C \epsilon \left[ \left(\frac{\sigma}{r}\right)^{\gamma_{rep}} - \left(\frac{\sigma}{r}\right)^{\gamma_{att}} \right] E = C \epsilon \left[ \left(\frac{\sigma}{r}\right)^{\gamma_{rep}} - \left(\frac{\sigma}{r}\right)^{\gamma_{att}} \right]
\qquad r < r_c \qquad r < r_c
Rc is the cutoff and C is a function that depends on the repulsive and :math:`r_c` is the cutoff and C is a function that depends on the repulsive and
attractive exponents, given by: attractive exponents, given by:
.. math:: .. math::

View File

@ -53,7 +53,7 @@ Style *morse* computes pairwise interactions with the formula
E = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] E = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right]
\qquad r < r_c \qquad r < r_c
Rc is the cutoff. :math:`r_c` is the cutoff.
The following coefficients must be defined for each pair of atoms The following coefficients must be defined for each pair of atoms
types via the :doc:`pair_coeff <pair_coeff>` command as in the examples types via the :doc:`pair_coeff <pair_coeff>` command as in the examples
@ -78,7 +78,7 @@ so that both, potential energy and force, go to zero at the cut-off:
.. math:: .. math::
\phi\left(r\right) & = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] \qquad r < r_c \\ \phi\left(r\right) & = D_0 \left[ e^{- 2 \alpha (r - r_0)} - 2 e^{- \alpha (r - r_0)} \right] \qquad r < r_c \\
E\left(r\right) & = \phi\left(r\right) - \phi\left(R_c\right) - \left(r - R_c\right) \left.\frac{d\phi}{d r} \right|_{r=R_c} \qquad r < R_c E\left(r\right) & = \phi\left(r\right) - \phi\left(r_c\right) - \left(r - r_c\right) \left.\frac{d\phi}{d r} \right|_{r=r_c} \qquad r < r_c
The syntax of the pair_style and pair_coeff commands are the same for The syntax of the pair_style and pair_coeff commands are the same for
the *morse* and *morse/smooth/linear* styles. the *morse* and *morse/smooth/linear* styles.

View File

@ -44,8 +44,9 @@ It is useful for pushing apart overlapping atoms, since it does not
blow up as r goes to 0. A is a prefactor 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), 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 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 interactions over time. :math:`r_c` is the cutoff.
overlapping atoms. See the :doc:`fix nve/limit <fix_nve_limit>` command for another way
to push apart overlapping atoms.
The following coefficients must be defined for each pair of atom types The following coefficients must be defined for each pair of atom types
via the :doc:`pair_coeff <pair_coeff>` command as in the examples above, via the :doc:`pair_coeff <pair_coeff>` command as in the examples above,

View File

@ -81,7 +81,7 @@ given by
as required for the SPICA (formerly called SDK) and the pSPICA Coarse-grained MD parameterization discussed in as required for the SPICA (formerly called SDK) and the pSPICA Coarse-grained MD parameterization discussed in
:ref:`(Shinoda) <Shinoda3>`, :ref:`(DeVane) <DeVane>`, :ref:`(Seo) <Seo>`, and :ref:`(Miyazaki) <Miyazaki>`. :ref:`(Shinoda) <Shinoda3>`, :ref:`(DeVane) <DeVane>`, :ref:`(Seo) <Seo>`, and :ref:`(Miyazaki) <Miyazaki>`.
Rc is the cutoff. :math:`r_c` is the cutoff.
Summary information on these force fields can be found at https://www.spica-ff.org Summary information on these force fields can be found at https://www.spica-ff.org
Style *lj/spica/coul/long* computes the adds Coulombic interactions Style *lj/spica/coul/long* computes the adds Coulombic interactions

View File

@ -1,4 +1,4 @@
Sphinx >= 5.3.0, <7.2.0 Sphinx >= 5.3.0, <7.5
sphinxcontrib-spelling sphinxcontrib-spelling
sphinxcontrib-jquery sphinxcontrib-jquery
git+https://github.com/akohlmey/sphinx-fortran@parallel-read git+https://github.com/akohlmey/sphinx-fortran@parallel-read

View File

@ -76,12 +76,12 @@ class LAMMPSLexer(RegexLexer):
include('conditionals'), include('conditionals'),
include('keywords'), include('keywords'),
(r'#.*?\n', Comment), (r'#.*?\n', Comment),
('"', String, 'string'), (r'"', String, 'string'),
('\'', String, 'single_quote_string'), (r'\'', String, 'single_quote_string'),
(r'[0-9]+:[0-9]+(:[0-9]+)?', Number), (r'[0-9]+:[0-9]+(:[0-9]+)?', Number),
(r'[0-9]+(\.[0-9]+)?([eE]\-?[0-9]+)?', Number), (r'[0-9]+(\.[0-9]+)?([eE]\-?[0-9]+)?', Number),
('\$?\(', Name.Variable, 'expression'), (r'\$?\(', Name.Variable, 'expression'),
('\$\{', Name.Variable, 'variable'), (r'\$\{', Name.Variable, 'variable'),
(r'[\w_\.\[\]]+', Name), (r'[\w_\.\[\]]+', Name),
(r'\$[\w_]+', Name.Variable), (r'\$[\w_]+', Name.Variable),
(r'\s+', Whitespace), (r'\s+', Whitespace),
@ -97,21 +97,21 @@ class LAMMPSLexer(RegexLexer):
] ]
, ,
'variable' : [ 'variable' : [
('[^\}]+', Name.Variable), (r'[^\}]+', Name.Variable),
('\}', Name.Variable, '#pop'), (r'\}', Name.Variable, '#pop'),
], ],
'string' : [ 'string' : [
('[^"]+', String), (r'[^"]+', String),
('"', String, '#pop'), (r'"', String, '#pop'),
], ],
'single_quote_string' : [ 'single_quote_string' : [
('[^\']+', String), (r'[^\']+', String),
('\'', String, '#pop'), (r'\'', String, '#pop'),
], ],
'expression' : [ 'expression' : [
('[^\(\)]+', Name.Variable), (r'[^\(\)]+', Name.Variable),
('\(', Name.Variable, 'expression'), (r'\(', Name.Variable, 'expression'),
('\)', Name.Variable, '#pop'), (r'\)', Name.Variable, '#pop'),
], ],
'modify_cmd' : [ 'modify_cmd' : [
(r'[\w_\-\.\[\]]+', Name.Variable.Identifier), (r'[\w_\-\.\[\]]+', Name.Variable.Identifier),

View File

@ -68,7 +68,7 @@ images_config = {
templates_path = ['_templates'] templates_path = ['_templates']
# The suffix of source filenames. # The suffix of source filenames.
source_suffix = '.rst' source_suffix = {'.rst': 'restructuredtext'}
# The encoding of source files. # The encoding of source files.
#source_encoding = 'utf-8-sig' #source_encoding = 'utf-8-sig'
@ -296,6 +296,7 @@ latex_elements = {
\setcounter{tocdepth}{2} \setcounter{tocdepth}{2}
\renewcommand{\sfdefault}{ptm} % Use Times New Roman font for \textrm \renewcommand{\sfdefault}{ptm} % Use Times New Roman font for \textrm
\renewcommand{\sfdefault}{phv} % Use Helvetica font for \textsf \renewcommand{\sfdefault}{phv} % Use Helvetica font for \textsf
\usepackage[columns=1]{idxlayout} % create index with only one column
% Set up math fonts to match text fonts % Set up math fonts to match text fonts
\DeclareSymbolFont{operators} {OT1}{ptm}{m}{n} \DeclareSymbolFont{operators} {OT1}{ptm}{m}{n}
\DeclareSymbolFont{bold} {OT1}{ptm}{bx}{n} \DeclareSymbolFont{bold} {OT1}{ptm}{bx}{n}
@ -340,6 +341,11 @@ latex_elements = {
''' '''
} }
# copy custom style file for tweaking index layout
latex_additional_files = [
'latex/idxlayout.sty', 'latex/ellipse.sty',
'latex/pict2e.sty', 'latex/p2e-pdftex.def',
]
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, # (source start file, target name, title,
# author, documentclass [howto, manual, or own class]). # author, documentclass [howto, manual, or own class]).
@ -382,6 +388,12 @@ man_pages = [
#man_show_urls = False #man_show_urls = False
# strip off LAMMPS_NS:: from index entries
cpp_index_common_prefix = [
'LAMMPS_NS::',
'_LMP_STYLE_CONST::', '_LMP_TYPE_CONST::', '_LMP_VAR_CONST::',
]
# -- Options for Texinfo output ------------------------------------------- # -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples # Grouping the document tree into Texinfo files. List of tuples

View File

@ -790,6 +790,7 @@ dispersionflag
dissipative dissipative
Dissipative Dissipative
distharm distharm
distutils
dl dl
dlabel dlabel
dlambda dlambda

View File

@ -0,0 +1,318 @@
%%
%% This is file `ellipse.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ellipse.dtx (with options: `package')
%%
%% Copyright (C) 2015
%% Daan Leijen
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "author-maintained".
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{ellipse}
[2004/11/05 v1.0 .dtx ellipse file]
\RequirePackage{pict2e}
\providecommand*\pIIe@csedef[1]{\expandafter\edef\csname #1\endcsname}
\newcommand*\pIIe@ellip@csqrt[3]{%
\@ovxx=#1\relax
\ifdim\@ovxx<\z@\@ovxx-\@ovxx\fi
\@ovyy=#2\relax
\ifdim\@ovyy<\z@\@ovyy-\@ovyy\fi
\edef\pIIe@csname{@csqrt(\number\@ovxx,\number\@ovyy)}%
\expandafter\ifx\csname\pIIe@csname\endcsname\relax
\pIIe@ellip@csqrt@%
\pIIe@csedef{\pIIe@csname}{\the\dimen@}%
#3\dimen@
\else
#3\dimexpr\csname\pIIe@csname\endcsname\relax
\fi
}
\newcommand*\pIIe@ellip@csqrt@{%
\@ovdx\@ovxx
\advance\@ovdx by \@ovyy
\dimen@0.7071067\@ovdx
\ifdim\dimen@<\@ovyy\dimen@\@ovyy\fi
\ifdim\dimen@<\@ovxx\dimen@\@ovxx\fi
\ifdim\@ovdx<128\p@
\edef\@tempa{\strip@pt\@ovxx}%
\@ovxx\@tempa\@ovxx
\edef\@tempa{\strip@pt\@ovyy}%
\@ovyy\@tempa\@ovyy
\advance\@ovxx by \@ovyy
\advance\dimen@ by \dimexpr1pt * \@ovxx/\dimen@\relax
\divide\dimen@ by 2%
\advance\dimen@ by \dimexpr1pt * \@ovxx/\dimen@\relax
\divide\dimen@ by 2%
\fi
}
\newcommand*\pIIe@atan@{%
\@tempdima\dimen@
\@tempdimb\@tempdima
\ifdim\@tempdimb<\z@\@tempdimb-\@tempdimb\fi
\dimen@0.0663\@tempdimb
\advance\dimen@ 0.2447pt\relax
\advance\@tempdimb -1pt\relax
\edef\@tempa{\strip@pt\@tempdimb}%
\dimen@\@tempa\dimen@
\edef\@tempa{\strip@pt\@tempdima}%
\dimen@\@tempa\dimen@
\dimen@-\dimen@
\advance\dimen@ 0.7853\@tempdima
}
\newcommand*\pIIe@atantwo[3]{%
\edef\pIIe@csname{@atan2(\number\dimexpr#1\relax,\number\dimexpr#2\relax)}%
\expandafter\ifx\csname\pIIe@csname\endcsname\relax
\pIIe@atantwo@{#1}{#2}{#3}%
\pIIe@csedef{\pIIe@csname}{\the\dimexpr#3\relax}%
\else
#3\dimexpr\csname\pIIe@csname\endcsname\relax
\fi
}
\newcommand*\pIIe@atantwo@[3]{%
\@tempdima\dimexpr#2\relax
\@tempdimb\dimexpr#1\relax
\ifdim\@tempdima=\z@\relax
\ifdim\@tempdimb>\z@\relax\dimen@90\p@
\else\ifdim\@tempdimb<\z@\relax\dimen@-90\p@
\else\dimen@0\p@
\fi\fi
\else
\@tempdimd\z@
\ifdim\@tempdima<\z@\relax
\ifdim\@tempdimb<\z@\relax\@tempdimd-180\p@
\else\@tempdimd180\p@
\fi
\fi
\dimen@\dimexpr1pt * \@tempdimb/\@tempdima\relax
\@tempdimc\dimen@
\ifdim\@tempdimc<\z@\relax\@tempdimc-\@tempdimc\fi
\ifdim\@tempdimc>\p@\relax
\dimen@\dimexpr1pt * \@tempdima/\@tempdimb\relax
\ifdim\dimen@<\z@\relax\def\@tempsign{-}\else\def\@tempsign{}\fi
\pIIe@atan@
\dimen@-\dimen@
\advance\dimen@ by \@tempsign1.5707pt\relax
\else
\pIIe@atan@
\fi
\dimen@57.29578\dimen@
\advance\dimen@ by \@tempdimd
\fi
#3\dimen@%
}
\newcommand*\pIIe@noneto[2]{}
\newcommand*\pIIe@ellip@sincost@[2]{%
\CalculateSin{#1}%
\CalculateCos{#1}%
\@tempdima\UseSin{#1}\p@
\@tempdimb\UseCos{#1}\p@
\ifdim\@tempdima=\p@\relax
\pIIe@csedef{@ellipsin#2}{1}%
\pIIe@csedef{@ellipcos#2}{0}%
\else\ifdim\@tempdima=-\p@\relax
\pIIe@csedef{@ellipsin#2}{-1}%
\pIIe@csedef{@ellipcos#2}{0}%
\else
\@tempdimc\@ellipratio\dimexpr1pt * \@tempdima/\@tempdimb\relax
%\typeout{ i#2=\the\@tempdimc, sin(#1)=\the\@tempdima}%
\pIIe@ellip@csqrt{\p@}{\@tempdimc}\@tempdimd
\ifdim\@tempdimb<\z@\relax\@tempdimd-\@tempdimd\fi
\pIIe@csedef{@ellipsin#2}{\strip@pt\dimexpr1pt * \@tempdimc/\@tempdimd\relax}%
\pIIe@csedef{@ellipcos#2}{\strip@pt\dimexpr1pt * \p@/\@tempdimd\relax}%
\fi\fi
}
\newcommand*\pIIe@ellip@sincost[2]{%
%\typeout{ calc sin cos: angles (#1,#2), radii: (\the\@ovro,\the\@ovri)}%
\edef\@ellipratio{\strip@pt\dimexpr1pt * \@ovro/\@ovri\relax}%
\pIIe@ellip@sincost@{#1}{one}%
\pIIe@ellip@sincost@{#2}{two}%
%\typeout{ sincos(a=#1)=(\@ellipsinone,\@ellipcosone), sincos(a=#2)=(\@ellipsintwo,\@ellipcostwo), }%
}
\newcommand*\pIIe@omega[3]{%
\@tempdima\csname @ellipcos#3\endcsname\@ovro
\advance\@tempdima by #1\relax
\@tempdimb\csname @ellipsin#3\endcsname\@ovri
\advance\@tempdimb by #2\relax
}
\newcommand*\pIIe@omegai[1]{%
\@tempdimc\csname @ellipsin#1\endcsname\@ovro
\@tempdimc-\@tempdimc
\@tempdimd\csname @ellipcos#1\endcsname\@ovri
}
\newcommand*\pIIe@ellip@kappa{%
\@ovyy\@ellipsinone\p@
\@ovxx\@ellipcosone\p@
\@tempdima\@ellipcostwo\@ovyy
\@tempdima-\@tempdima
\advance\@tempdima by \@ellipsintwo\@ovxx
\@tempdimb\@ellipcostwo\@ovxx
\advance\@tempdimb by \@ellipsintwo\@ovyy
\ifdim\@tempdima=\z@\relax
\edef\@ellipkappa{0}%
\else
\dimen@\dimexpr1pt - \@tempdimb\relax
\dimen@\dimexpr1pt * \dimen@/\@tempdima\relax
\pIIe@ellip@csqrt{2\p@}{1.73205\dimen@}{\dimen@}%
\advance\dimen@ by -\p@
\divide\dimen@ by 3%
\edef\@tempa{\strip@pt\@tempdima}%
\dimen@\@tempa\dimen@
\edef\@ellipkappa{\strip@pt\dimen@}%
\fi
%\typeout{ calculated kappa: \@ellipkappa}%
}
\newcommand*\pIIe@elliparc@[5]{%
%\typeout{elliparc: #1, center: (#2, #3), radius (\the\@ovro, \the\@ovri),angle (#4, #5)}%
\ifcase #1\relax
\let\@ellip@startto\pIIe@lineto
\or \let\@ellip@startto\pIIe@moveto
\or \let\@ellip@startto\pIIe@noneto%
\else\PackageWarning{ellipse}{Illegal initial action in \protect\elliparc: %
must be one of 0 (lineto), 1 (moveto) or 2 (do nothing) but I got: #1}%
\fi
\ifdim\@ovro=\z@\relax\@ovri\z@\fi
\ifdim\@ovri=\z@\relax
\@ellip@startto{#2}{#3}%
\else
\pIIe@ellip@sincost{#4}{#5}%
\pIIe@elliparc@draw{#2}{#3}%
\fi
}
\newcommand*\pIIe@elliparc@t[5]{%
\ifcase #1\relax
\let\@ellip@startto\pIIe@lineto
\or \let\@ellip@startto\pIIe@moveto
\or \let\@ellip@startto\pIIe@noneto%
\else\PackageWarning{ellipse}{Illegal initial action in \protect\elliparc: %
must be one of 0 (lineto), 1 (moveto) or 2 (do nothing) but I got: #1}%
\fi
\ifdim\@ovro=\z@\relax\@ovri\z@\fi
\ifdim\@ovri=\z@\relax
\@ellip@startto{#2}{#3}%
\else
\CalculateSin{#4}\CalculateCos{#4}%
\edef\@ellipsinone{\UseSin{#4}}%
\edef\@ellipcosone{\UseCos{#4}}%
\CalculateSin{#5}\CalculateCos{#5}%
\edef\@ellipsintwo{\UseSin{#5}}%
\edef\@ellipcostwo{\UseCos{#5}}%
\pIIe@elliparc@draw{#2}{#3}%
\fi
}
\newcommand*\pIIe@elliparc@draw[2]{%
\pIIe@ellip@kappa%
\pIIe@omega{#1}{#2}{one}%
%\typeout{ point one: (\the\@tempdima,\the\@tempdimb)}%
\@ellip@startto\@tempdima\@tempdimb
\pIIe@omegai{one}%
\advance\@tempdima by \@ellipkappa\@tempdimc
\advance\@tempdimb by \@ellipkappa\@tempdimd
\pIIe@add@nums\@tempdima\@tempdimb
%\typeout{ control one: (\the\@tempdima,\the\@tempdimb)}%
\pIIe@omega{#1}{#2}{two}%
\pIIe@omegai{two}%
\@tempdimc\@ellipkappa\@tempdimc
\@tempdimd\@ellipkappa\@tempdimd
\@tempdimc-\@tempdimc
\@tempdimd-\@tempdimd
\advance\@tempdimc by \@tempdima
\advance\@tempdimd by \@tempdimb
\pIIe@add@nums\@tempdimc\@tempdimd
%\typeout{ control two: (\the\@tempdimc,\the\@tempdimd)}%
\pIIe@add@CP\@tempdima\@tempdimb
%\typeout{ point two: (\the\@tempdima,\the\@tempdimb)}%
\pIIe@addtoGraph\pIIe@curveto@op
}
\newcommand*\pIIe@elliparc[7][0]{%
\@ovro #4\relax
\@ovri #5\relax
\iffalse%dim\@ovro=\@ovri
\pIIe@arc[#1]{#2}{#3}{#4}{#6}{#7}
\else
\ifdim \@ovro<\z@ \pIIe@badcircarg\else
\ifdim \@ovri<\z@ \pIIe@badcircarg\else
\@arclen #7\p@ \advance\@arclen -#6\p@
\ifdim \@arclen<\z@ \def\@tempsign{-}\else\def\@tempsign{}\fi
\ifdim \@tempsign\@arclen>720\p@
\PackageWarning {ellipse}{The arc angle is reduced to -720..720}%
\@whiledim \@tempsign\@arclen>720\p@ \do {\advance\@arclen-\@tempsign360\p@}%
\@tempdima #6\p@ \advance\@tempdima \@arclen
\edef\@angleend{\strip@pt\@tempdima}%
\pIIe@@elliparc{#1}{#2}{#3}{#6}{\@angleend}%
\else
\pIIe@@elliparc{#1}{#2}{#3}{#6}{#7}%
\fi
\fi
\fi
\fi
}
\newcommand*\pIIe@@elliparc[5]{%
\begingroup
\ifdim \@tempsign\@arclen>90\p@
\divide\@arclen 2%
\@tempdima #4\p@\advance\@tempdima by \@arclen
\edef\@anglemid{\strip@pt\@tempdima}%
\def\@tempa{\pIIe@@elliparc{#1}{#2}{#3}{#4}}%
\expandafter\@tempa\expandafter{\@anglemid}%
\def\@tempa{\pIIe@@elliparc{2}{#2}{#3}}%
\expandafter\@tempa\expandafter{\@anglemid}{#5}%
\else
\pIIe@elliparc@{#1}{#2}{#3}{#4}{#5}%
\fi
\endgroup
}%
\newcommand*\pIIeelliparc[7][0]{%
\@killglue
\pIIe@elliparc[#1]{#2\unitlength}{#3\unitlength}{#4\unitlength}{#5\unitlength}{#6}{#7}%
\ignorespaces%
}
\ifx\undefined\elliparc\else
\PackageWarning{ellipse}{\protect\elliparc\space is redefined}%
\fi
\let\elliparc\pIIeelliparc
\newcommand*\pIIeearc
{\@ifstar{\@tempswatrue\pIIe@earc@}{\@tempswafalse\pIIe@earc@}}
\newcommand*\pIIe@earc@[3][0,360]{\pIIe@earc@@(#1){#2}{#3}}
\def\pIIe@earc@@(#1,#2)#3#4{%
\if@tempswa
\pIIe@moveto\z@\z@
\pIIe@elliparc{\z@}{\z@}{#3\unitlength}{#4\unitlength}{#1}{#2}%
\pIIe@closepath\pIIe@fillGraph
\else
\pIIe@elliparc[1]{\z@}{\z@}{#3\unitlength}{#4\unitlength}{#1}{#2}%
\pIIe@strokeGraph
\fi}
\ifx\undefined\earc\else
\PackageWarning{ellipse}{\protect\earc\space is redefined}%
\fi
\let\earc\pIIeearc
\newcommand*\pIIeellipse
{\@ifstar{\@tempswatrue\pIIe@earc@}{\@tempswafalse\pIIe@earc@}}
\let\ellipse\pIIeellipse
\endinput
%%
%% End of file `ellipse.sty'.

View File

@ -0,0 +1,279 @@
%%
%% This is file `idxlayout.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% idxlayout.dtx (with options: `package')
%%
%% Copyright (C) 2010--2012 by Thomas Titz <thomas.titz@chello.at>
%%
%% Permission is granted to distribute and/or modify this work under the
%% terms of the LaTeX Project Public License (LPPL), version 1.3c or
%% later.
%%
%% The LPPL maintenance status of this work is "maintained".
%%
%% This work consists of the files idxlayout.dtx, idxlayout.ins and
%% README and the derived files idxlayout.pdf and idxlayout.sty.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{idxlayout}[2012/03/30 v0.4d Configurable index layout]
\RequirePackage{etoolbox,kvoptions,multicol}
\SetupKeyvalOptions{family=ila,prefix=ila@}
\newcommand*{\ila@defradiokey}[3][]{%
\define@key{ila}{#2}[#1]{%
\ifcsname ila@#3@##1\endcsname
\csname ila@#3@##1\expandafter\endcsname
\else
\PackageError{idxlayout}{Unknown value ##1 for option #2}%
\fi
}%
}
\newcounter{idxcols}
\define@key{ila}{columns}{\setcounter{idxcols}{#1}}
\setkeys{ila}{columns=2}
\@ifclassloaded{memoir}{%
\ifbool{onecolindex}{%
\setkeys{ila}{columns=1}%
}{%
}%
\appto{\onecolindex}{\setkeys{ila}{columns=1}}%
\appto{\twocolindex}{\setkeys{ila}{columns=2}}%
}{%
\newlength{\indexcolsep}%
\setlength{\indexcolsep}{35\p@}%
\newlength{\indexrule}%
\setlength{\indexrule}{\z@}%
}
\define@key{ila}{columnsep}{\setlength{\indexcolsep}{#1}}
\define@key{ila}{rule}{\setlength{\indexrule}{#1}}
\DeclareBoolOption{unbalanced}
\newlength{\ila@indentunit}
\define@key{ila}{indentunit}{\setlength{\ila@indentunit}{#1}}
\setkeys{ila}{indentunit=20\p@}
\DeclareStringOption{hangindent}
\DeclareStringOption{subindent}
\DeclareStringOption{subsubindent}
\renewcommand{\@idxitem}{\par\setlength{\hangindent}{\ila@hangindent}}
\def\ila@it@abshang{%
\renewcommand*{\ila@hangindent}{2\ila@indentunit}%
\renewcommand*{\ila@subindent}{\ila@indentunit}%
\renewcommand*{\ila@subsubindent}{1.5\ila@indentunit}%
\renewcommand{\subitem}{\@idxitem\hspace*{\ila@subindent}}%
\renewcommand{\subsubitem}{\@idxitem\hspace*{\ila@subsubindent}}%
}
\def\ila@it@relhang{%
\renewcommand*{\ila@hangindent}{1.5\ila@indentunit}%
\renewcommand*{\ila@subindent}{\ila@indentunit}%
\renewcommand*{\ila@subsubindent}{2\ila@indentunit}%
\renewcommand{\subitem}{%
\par
\deflength{\hangindent}{\ila@hangindent + \ila@subindent}%
\hspace*{\ila@subindent}%
}%
\renewcommand{\subsubitem}{%
\par
\deflength{\hangindent}{\ila@hangindent + \ila@subsubindent}%
\hspace*{\ila@subsubindent}%
}%
}
\newcommand*{\indexsubsdelim}{; }
\def\ila@it@singlepar{%
\renewcommand*{\ila@hangindent}{\ila@indentunit}%
\renewcommand{\subitem}{\unskip\indexsubsdelim}%
\renewcommand{\subsubitem}{\unskip\indexsubsdelim}%
}
\ila@defradiokey{itemlayout}{it}
\setkeys{ila}{itemlayout=abshang}
\newlength{\ila@initsep}
\define@key{ila}{initsep}{\setlength{\ila@initsep}{#1}}
\setkeys{ila}{initsep=10\p@ \@plus 5\p@ \@minus 3\p@}
\DeclareStringOption[\ila@initsep]{notesep}
\DeclareStringOption[80\p@]{minspace}
\renewcommand{\indexspace}{\par\vspace{\ila@initsep}}
\DeclareBoolOption{columnnote}
\newcommand*{\indexfont}{}
\def\ila@fo@current{\renewcommand*{\indexfont}{}}
\def\ila@fo@normalsize{\renewcommand*{\indexfont}{\normalsize}}
\def\ila@fo@small{\renewcommand*{\indexfont}{\small}}
\def\ila@fo@footnotesize{\renewcommand*{\indexfont}{\footnotesize}}
\ila@defradiokey{font}{fo}
\setkeys{ila}{font=current}
\newcommand*{\indexjustific}{}
\def\ila@ju@standard{%
\renewcommand*{\indexjustific}{%
\setlength{\parindent}{\z@}%
\setlength{\parfillskip}{\z@ \@plus 1fil}%
}%
}
\def\ila@ju@raggedright{\renewcommand*{\indexjustific}{\raggedright}}
\newcommand*{\ila@RaggedRight}{}
\def\ila@ju@RaggedRight{%
\renewcommand*{\indexjustific}{\ila@RaggedRight}%
}
\AtEndPreamble{%
\IfFileExists{ragged2e.sty}{%
\RequirePackage{ragged2e}%
\renewcommand*{\ila@RaggedRight}{\RaggedRight}%
}{%
\PackageWarning{idxlayout}{%
Package ragged2e not available, therefore\MessageBreak
substituting command raggedright for RaggedRight\MessageBreak
}%
\renewcommand*{\ila@RaggedRight}{\raggedright}%
}%
}
\ila@defradiokey{justific}{ju}
\setkeys{ila}{justific=standard}
\newcommand{\ila@prenote}{}
\newcommand{\setindexprenote}[1]{%
\def\ila@prenote{%
\begingroup#1\par\nobreak\endgroup
\vspace{\ila@notesep}%
}%
}
\newcommand*{\noindexprenote}{\let\ila@prenote\relax}
\noindexprenote
\newcommand*{\indexstheadcase}{\MakeUppercase}
\newcommand*{\ila@classtype}{0}
\@ifclassloaded{memoir}{%
\def\ila@classtype{2}%
}{%
\ifundef{\KOMAClassName}{%
}{%
\def\ila@classtype{1}%
}%
}
\ifcase\ila@classtype\relax
\DeclareBoolOption{totoc}%
\def\ila@prologue{%
\ifundef{\chapter}{%
\section*{\indexname}%
\ifbool{ila@totoc}{%
\addcontentsline{toc}{section}{\indexname}%
}{%
}%
}{%
\chapter*{\indexname}%
\ifbool{ila@totoc}{%
\addcontentsline{toc}{chapter}{\indexname}%
}{%
}%
}%
\@mkboth{\indexstheadcase\indexname}{\indexstheadcase\indexname}%
}
\or
\def\ila@tc@true{\KOMAoptions{index=totoc}}%
\def\ila@tc@false{\KOMAoptions{index=nottotoc}}%
\ila@defradiokey[true]{totoc}{tc}%
\providecommand{\MakeMarkcase}[1]{#1}%
\def\ila@prologue{%
\ifundef{\chapter}{%
}{%
\ifundef{\index@preamble}{%
}{%
\setchapterpreamble{\index@preamble}%
}%
}%
\idx@@heading{\indexname}%
\@mkboth{\MakeMarkcase{\indexname}}{\MakeMarkcase{\indexname}}%
\ifundef{\chapter}{%
}{%
\thispagestyle{\indexpagestyle}%
}%
}
\or
\def\ila@tc@true{\boolfalse{noindexintoc}}%
\def\ila@tc@false{\booltrue{noindexintoc}}%
\ila@defradiokey[true]{totoc}{tc}%
\def\ila@prologue{%
\chapter*{\indexname}%
\ifbool{noindexintoc}{%
}{%
\addcontentsline{toc}{chapter}{\indexname}%
}%
\ifbool{artopt}{%
}{%
\thispagestyle{indextitlepagestyle}%
}%
\indexmark
\preindexhook
}
\fi
\@ifpackageloaded{index}{%
\@ifpackagelater{index}{2004/01/21}{%
\let\ila@packindadjust\relax
}{%
\def\ila@packindadjust{%
\edef\indexname{\the\@nameuse{idxtitle@\@indextype}}%
\ifdefempty{\index@prologue}{%
}{%
\setindexprenote{\index@prologue}%
}%
}%
}%
}{%
\let\ila@packindadjust\relax
}
\ProcessKeyvalOptions*
\newcommand*{\idxlayout}[1]{\setkeys{ila}{#1}}
\renewenvironment{theindex}{%
\ifbool{@twocolumn}{%
\boolfalse{@restonecol}%
\onecolumn
}{%
\booltrue{@restonecol}%
}%
\setlength{\multicolsep}{\z@}%
\setlength{\columnsep}{\indexcolsep}%
\setlength{\columnseprule}{\indexrule}%
\ila@packindadjust
\def\ila@prologueplus{%
\ila@prologue
\indexfont
\ifbool{ila@columnnote}{%
}{%
\ila@prenote
}%
}%
\ifnumcomp{\theidxcols}{<}{\tw@}{%
\ila@prologueplus
}{%
\ifbool{ila@unbalanced}{%
\begin{multicols*}{\theidxcols}[\ila@prologueplus][\ila@minspace]%
}{%
\begin{multicols}{\theidxcols}[\ila@prologueplus][\ila@minspace]%
}%
}%
\setlength{\parskip}{\z@ \@plus 0.3\p@}%
\indexjustific
\ifundef{\chapter}{%
\ifundef{\index@preamble}{%
}{%
\index@preamble\par\nobreak
}%
}{%
}%
\ifbool{ila@columnnote}{%
\ila@prenote
}{%
}%
\let\item\@idxitem
}{%
\ifnumcomp{\theidxcols}{<}{\tw@}{%
}{%
\ifbool{ila@unbalanced}{%
\end{multicols*}%
}{%
\end{multicols}%
}%
}%
\ifbool{@restonecol}{%
}{%
\twocolumn
}%
}
\endinput
%%
%% End of file `idxlayout.sty'.

View File

@ -0,0 +1,41 @@
%%
%% This is file `p2e-pdftex.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% p2e-drivers.dtx (with options: `pdftex')
%%
%% Copyright (C) 2003-2016
%% Rolf Niepraschk, Rolf.Niepraschk@gmx.de
%% Hubert Gaesslein,
%% Josef Tkadlec, j.tkadlec@email.cz
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "author-maintained".
%%
%% This work consists of all files listed in `manifest.txt'.
%%
\ProvidesFile{p2e-pdftex.def}
[2016/02/05 v0.1u
Driver-dependant file (RN,HjG,JT)]
\begingroup
\@ifundefined{pdfoutput}{}{%
\ifnum\pdfoutput>0\relax
\gdef\pIIe@mode{2}
\fi
}
\endgroup
\ifcase\pIIe@mode\relax \or\or
\def\pIIe@code#1{\pdfliteral{ q #1 Q }}
\fi
\endinput
%%
%% End of file `p2e-pdftex.def'.

View File

@ -0,0 +1,820 @@
%%
%% This is file `pict2e.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% pict2e.dtx (with options: `package')
%%
%% Copyright (C) 2003-2016
%% Rolf Niepraschk, Rolf.Niepraschk@gmx.de
%% Hubert Gaesslein,
%% Josef Tkadlec, j.tkadlec@email.cz
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "author-maintained".
%%
%% This work consists of all files listed in `manifest.txt'.
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{pict2e}[2020/09/30 v0.4b Improved picture commands (HjG,RN,JT)]
\edef\Gin@codes{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax
\catcode`\noexpand\"\the\catcode`\"\relax
\catcode`\noexpand\!\the\catcode`\!\relax
\catcode`\noexpand\:\the\catcode`\:\relax}
\catcode`\^^A=\catcode`\%
\@makeother\"%
\@makeother\!%
\@makeother\:%
\def\@defaultunitsset#1#2#3{%
\@defaultunits#1\dimexpr#2#3\relax\relax\@nnil}
\newcommand*\pIIe@mode{-1}
\newcommand*\pIIe@code[1]{}
\providecommand*\Gin@driver{}
\newcommand*\pIIe@tempa{}
\newcommand*\pIIe@tempb{}
\newcommand*\pIIe@tempc{}
\DeclareOption{dvips}{\def\Gin@driver{dvips.def}}
\DeclareOption{xdvi}{\ExecuteOptions{dvips}}
\DeclareOption{dvipdf}{\def\Gin@driver{dvipdf.def}}
\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfm.def}}
\DeclareOption{dvipdfmx}{\def\Gin@driver{dvipdfmx.def}}
\DeclareOption{pdftex}{\def\Gin@driver{pdftex.def}}
\DeclareOption{luatex}{\def\Gin@driver{luatex.def}}
\DeclareOption{xetex}{\def\Gin@driver{xetex.def}}
\DeclareOption{dvipsone}{\def\Gin@driver{dvipsone.def}}
\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
\DeclareOption{oztex}{\ExecuteOptions{dvips}}
\DeclareOption{textures}{\def\Gin@driver{textures.def}}
\DeclareOption{pctexps}{\def\Gin@driver{pctexps.def}}
\DeclareOption{pctex32}{\def\Gin@driver{pctex32.def}}
\DeclareOption{vtex}{\def\Gin@driver{vtex.def}}
\DeclareOption{original}{\def\pIIe@mode{0}}
\newif\ifpIIe@pdfliteral@ok
\pIIe@pdfliteral@oktrue
\ifx\pIIe@pdfliteral\@undefined
\ifx\pdfliteral\@undefined
\pIIe@pdfliteral@okfalse
\def\pIIe@pdfliteral#1{%
\PackageWarning{pict2e}{pdfliteral not supported}%
}%
\else
\let\pIIe@pdfliteral\pdfliteral
\fi
\fi
\def\pIIe@buttcap{%
\ifpIIe@pdfliteral@ok
\buttcap
\fi
}
\newcommand*\pIIe@FAL{1.52}%
\newcommand*\pIIe@FAW{3.2}%
\newcommand*\pIIe@CAW{1.5pt}%
\newcommand*\pIIe@FAI{0.25}%
\newcommand*\ltxarrows{%
\let\pIIe@vector=\pIIe@vector@ltx
}
\newcommand*\pstarrows{%
\let\pIIe@vector=\pIIe@vector@pst
}
\DeclareOption{ltxarrows}{\AtEndOfPackage{\ltxarrows}}
\DeclareOption{pstarrows}{\AtEndOfPackage{\pstarrows}}
\newcommand*\pIIe@debug@comment{}
\DeclareOption{debug}{%
\def\pIIe@debug@comment{^^J^^J\@percentchar\space >>> pict2e <<<^^J}%
\begingroup
\@ifundefined{pdfcompresslevel}{}{\global\pdfcompresslevel\z@}%
\endgroup}
\DeclareOption{hide}{\AtEndOfPackage{%
\let\pIIe@code\@gobble
}}
\DeclareOption*{\ExecuteOptions{original}}
\ExecuteOptions{ltxarrows}
\InputIfFileExists{pict2e.cfg}{}{}
\ProcessOptions\relax
\ifnum\pIIe@mode=\z@
\PackageInfo{pict2e}{Package option `original' requested}
\else
\if!\Gin@driver!
\PackageError{pict2e}
{No driver specified at all}
{You should make a default driver option in a file\MessageBreak
pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}}%
\else
\PackageInfo{pict2e}{Driver file: \Gin@driver}
\@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
\PackageInfo{pict2e}{Driver file for pict2e: p2e-\Gin@driver}
\InputIfFileExists{p2e-\Gin@driver}{}{%
\PackageError{pict2e}%
{Driver file ``p2e-\Gin@driver'' not found}%
{Q: Is the file properly installed? A: No!}}
\fi
\fi
\ifnum\pIIe@mode>\z@
\ifnum\pIIe@mode<\thr@@
\RequirePackage{trig}
\let\pIIe@oldline\line
\let\pIIe@old@sline\@sline
\let\pIIe@oldvector\vector
\let\pIIe@old@circle\@circle
\let\pIIe@old@dot\@dot
\let\pIIe@old@bezier\@bezier
\AtBeginDocument{%
\@ifundefined{@cbezier}{%
\def\pIIe@old@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){}%
}{\let\pIIe@old@cbezier\@cbezier}}
\let\pIIe@oldoval\oval
\let\pIIe@old@oval\@oval
\newcommand*\OriginalPictureCmds{%
\let\@sline\pIIe@old@sline
\let\line\pIIe@oldline
\let\vector\pIIe@oldvector
\let\@circle\pIIe@old@circle
\let\@dot\pIIe@old@dot
\let\@bezier\pIIe@old@bezier
\let\@cbezier\pIIe@old@cbezier
\renewcommand*\oval[1][]{\pIIe@oldoval}%
\let\@oval\pIIe@old@oval
}
\else
\PackageError{pict2e}
{Unsupported mode (\pIIe@mode) specified}
{The driver you specified requested a mode\MessageBreak
not supported by this version of this package}
\fi
\else
\ifnum\pIIe@mode<\z@
\PackageError{pict2e}
{No suitable driver specified}
{You should make a default driver option in a file\MessageBreak
pict2e.cfg\MessageBreak eg: \protect\ExecuteOptions{dvips}}
\fi
\fi
\ifnum\pIIe@mode>\z@
\ifcase\pIIe@mode\relax
\or
\newcommand*\pIIe@moveto@op{moveto}
\newcommand*\pIIe@lineto@op{lineto}
\newcommand*\pIIe@setlinewidth@op{setlinewidth}
\newcommand*\pIIe@stroke@op{stroke}
\newcommand*\pIIe@fill@op{fill}
\newcommand*\pIIe@curveto@op{curveto}
\newcommand*\pIIe@concat@op{concat}
\newcommand*\pIIe@closepath@op{closepath}
\or
\newcommand*\pIIe@moveto@op{m}
\newcommand*\pIIe@lineto@op{l}
\newcommand*\pIIe@setlinewidth@op{w}
\newcommand*\pIIe@stroke@op{S}
\newcommand*\pIIe@fill@op{f}
\newcommand*\pIIe@curveto@op{c}
\newcommand*\pIIe@concat@op{cm}
\newcommand*\pIIe@closepath@op{h}
\fi
\@ifdefinable\pIIe@GRAPH{\newtoks\pIIe@GRAPH}
\newcommand*\pIIe@addtoGraph[1]{%
\begingroup
\edef\x{\the\pIIe@GRAPH\space#1}%
\global\pIIe@GRAPH\expandafter{\x}%
\endgroup}
\newcommand*\pIIe@fillGraph{\begingroup \@tempswatrue\pIIe@drawGraph}
\newcommand*\pIIe@strokeGraph{\begingroup \@tempswafalse\pIIe@drawGraph}
\newcommand*\pIIe@drawGraph{%
\edef\x{\pIIe@debug@comment\space
\pIIe@scale@PTtoBP}%
\if@tempswa
\edef\y{\pIIe@fill@op}%
\else
\edef\x{\x\space
\strip@pt\@wholewidth\space\pIIe@setlinewidth@op
\pIIe@linecap\pIIe@linejoin\space}%
\edef\y{\pIIe@stroke@op}%
\fi
\expandafter\pIIe@code\expandafter{%
\expandafter\x\the\pIIe@GRAPH\space\y}%
\global\pIIe@GRAPH{}\xdef\pIIe@CPx{}\xdef\pIIe@CPy{}%
\endgroup}
\newcommand*\pIIe@CPx{} \newcommand*\pIIe@CPy{}
\newcommand*\pIIe@add@CP[2]{%
\begingroup
\@tempdima#1\xdef\pIIe@CPx{\the\@tempdima}%
\@tempdimb#2\xdef\pIIe@CPy{\the\@tempdimb}%
\pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}%
\endgroup}
\newcommand*\pIIe@add@nums[2]{%
\begingroup
\@tempdima#1\relax
\@tempdimb#2\relax
\pIIe@addtoGraph{\strip@pt\@tempdima\space\strip@pt\@tempdimb}%
\endgroup}
\newcommand*\pIIe@add@num[1]{%
\begingroup
\@tempdima#1\relax
\pIIe@addtoGraph{\strip@pt\@tempdima}%
\endgroup}
\newcommand*\pIIe@PTtoBP{0.99626401 }
\ifcase\pIIe@mode\relax
\or
\newcommand*\pIIe@concat[6]{%
\begingroup
\pIIe@addtoGraph{[}%
\@tempdima#1\relax \@tempdimb#2\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#3\relax \@tempdimb#4\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#5\relax \@tempdimb#6\relax
\pIIe@add@nums\@tempdima\@tempdimb
\pIIe@addtoGraph{] \pIIe@concat@op}%
\endgroup}
\newcommand*\pIIe@translate[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{translate}}
\newcommand*\pIIe@rotate[1]{\pIIe@add@num{#1}\pIIe@addtoGraph{rotate}}
\newcommand*\pIIe@scale[2]{\pIIe@add@nums{#1}{#2}\pIIe@addtoGraph{scale}}
\newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP \pIIe@PTtoBP scale}
\or
\newcommand*\pIIe@concat[6]{%
\begingroup
\@tempdima#1\relax \@tempdimb#2\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#3\relax \@tempdimb#4\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#5\relax \@tempdimb#6\relax
\pIIe@add@nums\@tempdima\@tempdimb
\pIIe@addtoGraph\pIIe@concat@op
\endgroup}
\newcommand*\pIIe@translate[2]{\pIIe@concat\p@\z@\z@\p@{#1}{#2}}
\newcommand*\pIIe@rotate[1]{%
\begingroup
\@tempdima#1\relax
\edef\pIIe@tempa{\strip@pt\@tempdima}%
\CalculateSin\pIIe@tempa
\CalculateCos\pIIe@tempa
\edef\pIIe@tempb{\UseSin\pIIe@tempa}%
\edef\pIIe@tempc{\UseCos\pIIe@tempa}%
\pIIe@concat{\pIIe@tempc\p@}{\pIIe@tempb\p@}%
{-\pIIe@tempb\p@}{\pIIe@tempc\p@}\z@\z@
\endgroup}
\newcommand*\pIIe@scale[2]{\pIIe@concat{#1}\z@\z@{#2}\z@\z@}
\newcommand*\pIIe@scale@PTtoBP{\pIIe@PTtoBP 0 0 \pIIe@PTtoBP 0 0 \pIIe@concat@op}
\fi
\newcommand*\pIIe@moveto[2]{%
\pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@moveto@op}
\newcommand*\pIIe@lineto[2]{%
\pIIe@add@CP{#1}{#2}\pIIe@addtoGraph\pIIe@lineto@op}
\ifcase\pIIe@mode\relax
\or
\newcommand*\pIIe@rcurveto[6]{%
\begingroup
\@tempdima#1\relax \@tempdimb#2\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#3\relax \@tempdimb#4\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#5\relax \@tempdimb#6\relax
\pIIe@add@CP\@tempdima\@tempdimb
\pIIe@addtoGraph{rcurveto}%
\endgroup}
\or
\newcommand*\pIIe@rcurveto[6]{%
\begingroup
\@tempdima#1\advance\@tempdima\pIIe@CPx\relax
\@tempdimb#2\advance\@tempdimb\pIIe@CPy\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#3\advance\@tempdima\pIIe@CPx\relax
\@tempdimb#4\advance\@tempdimb\pIIe@CPy\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#5\advance\@tempdima\pIIe@CPx\relax
\@tempdimb#6\advance\@tempdimb\pIIe@CPy\relax
\pIIe@add@CP\@tempdima\@tempdimb
\pIIe@addtoGraph\pIIe@curveto@op
\endgroup}
\fi
\newcommand*\pIIe@curveto[6]{%
\begingroup
\@tempdima#1\relax \@tempdimb#2\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#3\relax \@tempdimb#4\relax
\pIIe@add@nums\@tempdima\@tempdimb
\@tempdima#5\relax \@tempdimb#6\relax
\pIIe@add@CP\@tempdima\@tempdimb
\pIIe@addtoGraph\pIIe@curveto@op
\endgroup}
\newcommand*\pIIe@closepath{\pIIe@addtoGraph\pIIe@closepath@op}
\newcommand*\pIIe@pyth[3]{%
\begingroup
\@tempdima=#1\relax
\ifnum\@tempdima<\z@\@tempdima=-\@tempdima\fi
\@tempdimb=#2\relax
\ifnum\@tempdimb<\z@\@tempdimb=-\@tempdimb\fi
\advance\@tempdimb\@tempdima
\ifnum\@tempdimb=\z@
\@tempdimc=\z@
\else
\multiply\@tempdima 8\relax
\pIIe@divide\@tempdima\@tempdimb\@tempdimc
\advance\@tempdimc -4pt
\multiply\@tempdimc 2
\edef\pIIe@tempa{\strip@pt\@tempdimc}%
\@tempdima=\pIIe@tempa\@tempdimc
\advance\@tempdima 64pt
\divide\@tempdima 2\relax
\@dashdim=7pt
\pIIe@@pyth\pIIe@@pyth\pIIe@@pyth
\edef\pIIe@tempa{\strip@pt\@dashdim}%
\@tempdimc=\pIIe@tempa\@tempdimb
\global\divide\@tempdimc 8
\fi
\edef\x{\endgroup#3=\the\@tempdimc}%
\x}
\newcommand*\pIIe@@pyth{%
\pIIe@divide\@tempdima\@dashdim\@tempdimc
\advance\@dashdim\@tempdimc
\divide\@dashdim\tw@}
\newcommand*\pIIe@divide[3]{%
\begingroup
\dimendef\Numer=254\relax \dimendef\Denom=252\relax
\countdef\Num=254\relax \countdef\Den=252\relax
\countdef\I=250\relax \countdef\Numb=248\relax
\Numer #1\relax \Denom #2\relax
\ifdim\Denom<\z@ \Denom -\Denom \Numer=-\Numer \fi
\ifdim\Numer<\z@ \def\sign{-}\Numer=-\Numer \else \def\sign{}\fi
\ifdim\Denom=\z@
\edef\Q{\strip@pt\maxdimen}%
\PackageWarning{pict2e}%
{Division by 0, \sign\strip@pt\maxdimen\space used}{}%
\else
\Num=\Numer \Den=\Denom
\Numb=\Num \divide\Numb\Den
\ifnum\Numb>16383
\edef\Q{\strip@pt\maxdimen}%
\PackageWarning{pict2e}%
{Division overflow, \sign\strip@pt\maxdimen\space used}{}%
\else
\edef\Q{\number\Numb.}%
\multiply \Numb\Den \advance\Num -\Numb
\I=6\relax
\@whilenum \I>\z@ \do{\pIIe@@divide\advance\I\m@ne}%
\fi
\fi
\edef\tempend{\noexpand\endgroup\noexpand#3=\sign\Q\p@}%
\tempend}
\def\pIIe@@divide{%
\@whilenum \Num>214748364 \do{\divide\Num\tw@ \divide\Den\tw@}%
\multiply \Num 10
\Numb=\Num \divide\Numb\Den
\edef\Q{\Q\number\Numb}%
\multiply \Numb\Den \advance \Num -\Numb
\ifnum\Num>\z@\else\I=0\fi}
\newcommand*\pIIe@checkslopeargsline[2]{%
\pIIe@checkslopeargs{#1}{#2}{16383}}
\newcommand*\pIIe@checkslopeargsvector[2]{%
\pIIe@checkslopeargs{#1}{#2}{1000}}
\newcommand*\pIIe@checkslopeargs[3]{%
\edef\@tempa{#1}\expandafter\pIIe@checkslopearg\@tempa.:{#3}%
\edef\@tempa{#2}\expandafter\pIIe@checkslopearg\@tempa.:{#3}%
\ifdim #1\p@=\z@ \ifdim #2\p@=\z@ \@badlinearg \fi\fi}
\def\pIIe@checkslopearg #1.#2:#3{%
\def\@tempa{#1}%
\ifx\@tempa\empty\def\@tempa{0}\fi
\ifx\@tempa\space\def\@tempa{0}\fi
\ifnum\ifnum\@tempa<\z@-\fi\@tempa>#3 \@badlinearg \fi}
\def\@badlinearg{\PackageError
{pict2e}{Bad \protect\line\space or \protect\vector\space argument}{}}
\def\line(#1,#2)#3{%
\begingroup
\pIIe@checkslopeargsline{#1}{#2}%
\@tempdima=#1pt\relax \@tempdimb=#2pt\relax
\@defaultunitsset\@linelen{#3}\unitlength
\ifdim\@linelen<\z@ \@badlinearg \else
\pIIe@sline
\pIIe@moveto\z@\z@
\pIIe@lineto\@xdim\@ydim
\pIIe@strokeGraph
\box\@tempboxa
\fi
\endgroup}
\newcommand*\pIIe@sline{%
\ifdim\@tempdima=\z@
\ifdim\@tempdimb<\z@\@linelen-\@linelen\fi
\@ydim=\@linelen
\@xdim=\z@
\else
\ifdim\@tempdima<\z@\@linelen-\@linelen\fi
\ifdim\@tempdimb=\z@
\@xdim=\@linelen
\@ydim=\z@
\else
\pIIe@divide\@tempdimb\@tempdima\dimen@
\@ydim=\strip@pt\dimen@\@linelen
\@xdim=\@linelen
\fi
\fi
\@ovxx=\ifnum\@xdim=\z@ \z@\else\@linelen\fi
\@ovyy=\ifnum\@ydim<\z@ \z@\else\@ydim\fi
\@ovdy=\ifnum\@ydim<\z@ -\@ydim\else\z@\fi
\setbox\@tempboxa\hbox{%
\vrule\@height \@ovyy \@depth \@ovdy \@width \z@
\vrule\@height \z@ \@depth \z@ \@width \@ovxx}}
\def\vector(#1,#2)#3{%
\begingroup
\pIIe@checkslopeargsvector{#1}{#2}%
\@tempdima=#1pt\relax \@tempdimb=#2pt\relax
\@defaultunitsset\@linelen{#3}\unitlength
\ifdim\@linelen<\z@ \@badlinearg \else
\pIIe@sline
\@defaultunitsset\@linelen{#3}\unitlength
\pIIe@pyth{\@tempdima}{\@tempdimb}\dimen@
\ifdim\@tempdima=\z@ \else
\ifdim\@tempdimb=\z@ \else
\pIIe@divide\dimen@{\@tempdima}\@xdim
\@linelen\strip@pt\@xdim\@linelen
\ifdim\@linelen<\z@\@linelen-\@linelen\fi
\fi
\fi
\pIIe@divide{\@tempdimb}\dimen@\@ydim
\pIIe@divide{\@tempdima}\dimen@\@xdim
\pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@
\pIIe@vector
\pIIe@fillGraph
\box\@tempboxa
\fi
\endgroup}
\newcommand*\pIIe@vector{}
\newcommand*\pIIe@vector@ltx{%
\@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax
\@ovxx\pIIe@FAL\@ydim
\@xdim\@linelen \advance\@xdim-\@ovxx
\divide\@ydim\tw@
\divide\@ovxx\tw@ \advance\@ovxx\@xdim
\@ovyy\@ydim
\divide\@ovyy\tw@ \advance\@ovyy-\pIIe@FAI\@ydim
\pIIe@bezier@QtoC\@linelen\@ovxx\@ovro
\pIIe@bezier@QtoC\z@\@ovyy\@ovri
\pIIe@bezier@QtoC\@xdim\@ovxx\@clnwd
\pIIe@bezier@QtoC\@ydim\@ovyy\@clnht
\pIIe@moveto\@linelen\z@
\pIIe@curveto\@ovro{-\@ovri}\@clnwd{-\@clnht}\@xdim{-\@ydim}%
\ifdim\@xdim>\z@
\pIIe@lineto\@xdim{-\@halfwidth}%
\pIIe@lineto\z@{-\@halfwidth}%
\pIIe@lineto\z@{\@halfwidth}%
\pIIe@lineto\@xdim{\@halfwidth}%
\fi
\pIIe@lineto\@xdim\@ydim
\pIIe@curveto\@clnwd\@clnht\@ovro\@ovri\@linelen\z@}
\newcommand*\pIIe@vector@pst{%
\@ydim\pIIe@FAW\@wholewidth \advance\@ydim\pIIe@CAW\relax
\@ovxx\pIIe@FAL\@ydim
\@xdim\@linelen \advance\@xdim-\@ovxx
\divide\@ydim\tw@
\@ovyy\@ydim \advance\@ovyy-\@halfwidth
\@ovdx\pIIe@FAI\@ovxx
\pIIe@divide\@ovdx\@ydim\@tempdimc
\@ovxx\strip@pt\@ovyy\@tempdimc
\advance\@ovxx\@xdim
\advance\@ovdx\@xdim
\pIIe@moveto\@linelen\z@
\pIIe@lineto\@xdim{-\@ydim}%
\ifdim\@xdim>\z@
\pIIe@lineto\@ovxx{-\@halfwidth}%
\pIIe@lineto\z@{-\@halfwidth}%
\pIIe@lineto\z@{\@halfwidth}%
\pIIe@lineto\@ovxx{\@halfwidth}%
\else
\pIIe@lineto\@ovdx\z@
\fi
\pIIe@lineto\@xdim\@ydim
\pIIe@lineto\@linelen\z@}
\def\@circle#1{\begingroup \@tempswafalse\pIIe@circ{#1}}
\def\@dot#1{\begingroup \@tempswatrue\pIIe@circ{#1}}
\newcommand*\pIIe@circ[1]{%
\@defaultunitsset\pIIe@tempdima{#1}\unitlength
\ifdim\pIIe@tempdima<\z@ \pIIe@badcircarg \fi
\divide\pIIe@tempdima\tw@
\pIIe@circle\pIIe@tempdima
\if@tempswa \pIIe@fillGraph \else \buttcap \pIIe@strokeGraph \fi
\endgroup}
\newcommand*\pIIe@circle[1]{%
\pIIe@qcircle[1]\z@{#1}\pIIe@qcircle \@ne{#1}%
\pIIe@qcircle \tw@{#1}\pIIe@qcircle\thr@@{#1}\pIIe@closepath}
\newcommand*\pIIe@qcircle[3][0]{%
\begingroup
\@ovro#3\relax \@ovri0.55228474983\@ovro
\@tempdimc\@ovri \advance\@tempdimc-\@ovro
\ifnum#1>\z@ \@tempswatrue \else \@tempswafalse \fi
\ifcase#2\relax
\pIIe@@qcircle\@ovro\z@\z@\@ovri\@tempdimc\@ovro{-\@ovro}\@ovro
\or
\pIIe@@qcircle\z@\@ovro{-\@ovri}\z@{-\@ovro}\@tempdimc{-\@ovro}{-\@ovro}%
\or
\pIIe@@qcircle{-\@ovro}\z@\z@{-\@ovri}{-\@tempdimc}{-\@ovro}\@ovro{-\@ovro}%
\or
\pIIe@@qcircle\z@{-\@ovro}\@ovri\z@\@ovro{-\@tempdimc}\@ovro\@ovro
\fi
\endgroup}
\newcommand*\pIIe@@qcircle[8]{%
\if@tempswa\pIIe@moveto{#1}{#2}\fi \pIIe@rcurveto{#3}{#4}{#5}{#6}{#7}{#8}}
\newcommand*\pIIe@badcircarg{%
\PackageError{pict2e}%
{Illegal argument in \protect\circle(*), \protect\oval, \protect\arc(*) or
\protect\circlearc.}%
{The radius of a circle, dot, arc or oval corner must be greater than zero.}}%
\newcommand*\maxovalrad{20pt}
\newcommand*\pIIe@defaultUL[2]{%
\@defaultunitsset\pIIe@tempdima{#2}\unitlength
\edef#1{\the\pIIe@tempdima}}
\newcommand*\pIIe@def@UL{}
\def\pIIe@def@UL#1\relax#2#3{%
\edef#2{\the\dimen@}}
\newcommand*\pIIe@maxovalrad{}
\newcommand*\pIIe@oval{}
\def\pIIe@oval#1(#2,#3){\@ifnextchar[{\@oval(#2,#3)}{\@oval(#2,#3)[]}}
\renewcommand*\oval[1][\maxovalrad]{%
\begingroup \pIIe@defaultUL\pIIe@maxovalrad{#1}%
\ifdim\pIIe@maxovalrad<\z@ \pIIe@badcircarg \fi
\pIIe@oval}
\def\@oval(#1,#2)[#3]{%
\@defaultunitsset\pIIe@tempdima{#1}\unitlength \divide\pIIe@tempdima\tw@
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength \divide\pIIe@tempdimb\tw@
\pIIe@tempdimc \ifdim\pIIe@tempdimb>\pIIe@tempdima \pIIe@tempdima \else \pIIe@tempdimb \fi
\ifdim\pIIe@maxovalrad<\pIIe@tempdimc \pIIe@tempdimc\pIIe@maxovalrad\relax \fi
\pIIe@tempdimd\pIIe@tempdima \advance\pIIe@tempdimd-\pIIe@tempdimc
\pIIe@tempdime\pIIe@tempdimb \advance\pIIe@tempdime-\pIIe@tempdimc
\pIIe@get@quadrants{#3}%
\ifnum15=\@tempcnta \pIIe@buttcap \fi
\@tempswatrue
\ifnum9=\@tempcnta
\pIIe@qoval\z@{-\pIIe@tempdimb}{\pIIe@tempdimd}{-\pIIe@tempdimb}%
\thr@@\pIIe@tempdimc\pIIe@tempdima\z@
\@tempcnta\@ne
\fi
\pIIe@qoval\pIIe@tempdima\z@\pIIe@tempdima\pIIe@tempdime%
\z@\pIIe@tempdimc\z@\pIIe@tempdimb
\pIIe@qoval\z@\pIIe@tempdimb{-\pIIe@tempdimd}\pIIe@tempdimb%
\@ne\pIIe@tempdimc{-\pIIe@tempdima}\z@
\pIIe@qoval{-\pIIe@tempdima}\z@{-\pIIe@tempdima}{-\pIIe@tempdime}%
\tw@\pIIe@tempdimc\z@{-\pIIe@tempdimb}%
\pIIe@qoval\z@{-\pIIe@tempdimb}{\pIIe@tempdimd}{-\pIIe@tempdimb}%
\thr@@\pIIe@tempdimc\pIIe@tempdima\z@
\pIIe@strokeGraph
\endgroup}
\newcommand*\pIIe@qoval[8]{%
\ifodd\@tempcnta
\if@tempswa\pIIe@moveto{#1}{#2}\fi
\pIIe@lineto{#3}{#4}\pIIe@qcircle{#5}{#6}\pIIe@lineto{#7}{#8}%
\@tempswafalse
\else
\@tempswatrue
\fi
\divide\@tempcnta\tw@}
\newcommand*\pIIe@get@quadrants[1]{%
\@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@tempcnta\z@
\@tfor\reserved@a:=#1\do{\csname @ov\reserved@a false\endcsname}%
\if@ovr \if@ovb\@setfpsbit2\fi \if@ovt\@setfpsbit4\fi \fi
\if@ovl \if@ovb\@setfpsbit1\fi \if@ovt\@setfpsbit8\fi \fi}
\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
\ifnum #1=\z@
\@killglue
\begingroup
\@defaultunitsset\pIIe@tempdima{#2}\unitlength
\@defaultunitsset\pIIe@tempdimb{#3}\unitlength
\@defaultunitsset\pIIe@tempdimc{#4}\unitlength
\@defaultunitsset\pIIe@tempdimd{#5}\unitlength
\@defaultunitsset\pIIe@tempdime{#6}\unitlength
\@defaultunitsset\pIIe@tempdimf{#7}\unitlength
\pIIe@bezier@QtoC\pIIe@tempdima\pIIe@tempdimc\@ovro
\pIIe@bezier@QtoC\pIIe@tempdimb\pIIe@tempdimd\@ovri
\pIIe@bezier@QtoC\pIIe@tempdime\pIIe@tempdimc\@clnwd
\pIIe@bezier@QtoC\pIIe@tempdimf\pIIe@tempdimd\@clnht
\pIIe@moveto\pIIe@tempdima\pIIe@tempdimb
\pIIe@curveto\@ovro\@ovri\@clnwd\@clnht\pIIe@tempdime\pIIe@tempdimf
\pIIe@strokeGraph
\endgroup
\ignorespaces
\else
\pIIe@old@bezier{#1}(#2,#3)(#4,#5)(#6,#7)
\fi}
\newcommand*\pIIe@bezier@QtoC[3]{%
\@tempdimc#1\relax \advance\@tempdimc-#2\relax
\divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
#3\@tempdimc}
\ifx\undefined\@arclen \newdimen\@arclen \fi
\ifx\undefined\@arcrad \newdimen\@arcrad \fi
\ifx\undefined\pIIe@tempdima \newdimen\pIIe@tempdima \fi
\ifx\undefined\pIIe@tempdimb \newdimen\pIIe@tempdimb \fi
\ifx\undefined\pIIe@tempdimc \newdimen\pIIe@tempdimc \fi
\ifx\undefined\pIIe@tempdimd \newdimen\pIIe@tempdimd \fi
\ifx\undefined\pIIe@tempdime \newdimen\pIIe@tempdime \fi
\ifx\undefined\pIIe@tempdimf \newdimen\pIIe@tempdimf \fi
\newcommand*\pIIe@arc[6][0]{%
\@arcrad #4\relax
\ifdim \@arcrad<\z@ \pIIe@badcircarg \else
\@arclen #6\p@ \advance\@arclen -#5\p@
\ifdim \@arclen<\z@ \def\sign{-}\else\def\sign{}\fi
\ifdim \sign\@arclen>720\p@
\PackageWarning {pict2e}{The arc angle is reduced to -720..720}%
\@whiledim \sign\@arclen>720\p@ \do {\advance\@arclen-\sign360\p@}%
\@tempdima #5\p@ \advance\@tempdima \@arclen
\edef\@angleend{\strip@pt\@tempdima}%
\pIIe@@arc{#1}{#2}{#3}{#4}{#5}{\@angleend}%
\else
\pIIe@@arc{#1}{#2}{#3}{#4}{#5}{#6}%
\fi
\fi}
\newcommand*\pIIe@@arc[6]{%
\begingroup
\ifdim \sign\@arclen>90\p@
\divide\@arclen 2
\@tempdima #5\p@ \advance\@tempdima \@arclen
\edef\@anglemid{\strip@pt\@tempdima}%
\def\@temp{\pIIe@@arc{#1}{#2}{#3}{#4}{#5}}%
\expandafter\@temp\expandafter{\@anglemid}%
\def\@temp{\pIIe@@arc{2}{#2}{#3}{#4}}%
\expandafter\@temp\expandafter{\@anglemid}{#6}%
\else
\CalculateSin{#5}\CalculateCos{#5}%
\@tempdima\UseCos{#5}\@arcrad \advance\@tempdima #2\relax
\@tempdimb\UseSin{#5}\@arcrad \advance\@tempdimb #3\relax
\ifcase #1\relax
\pIIe@lineto\@tempdima\@tempdimb
\or \pIIe@moveto\@tempdima\@tempdimb
\or
\else \PackageWarning {pict2e}%
{Illegal obligatory argument in \protect\circlearc.}%
\fi
\@tempdimc\@arclen \divide\@tempdimc\@iv
\edef\@angle{\strip@pt\@tempdimc}\CalculateTan{\@angle}%
\@linelen\UseTan{\@angle}\@arcrad \@linelen4\@linelen \divide\@linelen\thr@@
\advance\@tempdima-\UseSin{#5}\@linelen
\advance\@tempdimb \UseCos{#5}\@linelen
\pIIe@add@nums\@tempdima\@tempdimb
\CalculateSin{#6}\CalculateCos{#6}%
\@tempdima \UseCos{#6}\@arcrad \advance\@tempdima #2\relax
\@tempdimb \UseSin{#6}\@arcrad \advance\@tempdimb #3\relax
\@tempdimc \UseSin{#6}\@linelen \advance\@tempdimc \@tempdima
\pIIe@tempdimd-\UseCos{#6}\@linelen \advance\pIIe@tempdimd \@tempdimb
\pIIe@add@nums\@tempdimc\pIIe@tempdimd
\pIIe@add@CP\@tempdima\@tempdimb
\pIIe@addtoGraph\pIIe@curveto@op
\fi
\endgroup}
\newcommand*\pIIearc
{\@ifstar{\@tempswatrue\pIIe@arc@}{\@tempswafalse\pIIe@arc@}}
\newcommand*\pIIe@arc@[2][0,360]{\pIIe@arc@@(#1){#2}}
\def\pIIe@arc@@(#1,#2)#3{%
\@defaultunitsset\pIIe@tempdima{#3}\unitlength
\if@tempswa
\pIIe@moveto\z@\z@
\pIIe@arc{\z@}{\z@}{\pIIe@tempdima}{#1}{#2}%
\pIIe@closepath\pIIe@fillGraph
\else
\pIIe@arc[1]{\z@}{\z@}{\pIIe@tempdima}{#1}{#2}%
\pIIe@strokeGraph
\fi}
\ifx\undefined\arc
\else
\PackageWarning{pict2e}{\protect\arc\space redefined}%
\fi
\let\arc\pIIearc
\let\lp@r( \let\rp@r)
\def\Line(#1,#2)(#3,#4){\polyline(#1,#2)(#3,#4)}
\def\polyline(#1,#2){%
\@killglue
\@defaultunitsset\pIIe@tempdima{#1}\unitlength
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength
\pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
\@ifnextchar\lp@r{\@polyline}{\PackageWarning{pict2e}%
{Polygonal lines require at least two vertices!}%
\ignorespaces}}
\def\@polyline(#1,#2){%
\@defaultunitsset\pIIe@tempdima{#1}\unitlength
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength
\pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}%
\@ifnextchar\lp@r{\@polyline}{\pIIe@strokeGraph\ignorespaces}}
\def\Vector(#1,#2)(#3,#4){\polyvector(#1,#2)(#3,#4)}
\def\polyvector(#1,#2){%
\@killglue
\@ifnextchar\lp@r{\begingroup\@polyvector(#1,#2)}{%
\PackageWarning{pict2e}%
{Polygonal vectors require at least two vertices!}\ignorespaces}}
\def\@polyvector(#1,#2)(#3,#4){%
\@defaultunitsset\pIIe@tempdima{#1}\unitlength
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength
\@defaultunitsset\pIIe@tempdimc{#3}\unitlength
\@defaultunitsset\pIIe@tempdimd{#4}\unitlength
\advance\pIIe@tempdimc-\pIIe@tempdima \advance\pIIe@tempdimd-\pIIe@tempdimb
\ifdim\pIIe@tempdimc=\z@ \@linelen\pIIe@tempdimd \else
\ifdim\pIIe@tempdimd=\z@ \@linelen\pIIe@tempdimc \else
\pIIe@pyth\pIIe@tempdimc\pIIe@tempdimd\@linelen
\fi
\fi
\ifdim\@linelen<\z@ \@linelen-\@linelen\fi
\pIIe@divide{\pIIe@tempdimc}\@linelen\pIIe@tempdime
\pIIe@divide{\pIIe@tempdimd}\@linelen\pIIe@tempdimf
\pIIe@concat\pIIe@tempdime\pIIe@tempdimf{-\pIIe@tempdimf}\pIIe@tempdime\pIIe@tempdima\pIIe@tempdimb
\pIIe@vector \pIIe@fillGraph
\@ifnextchar\lp@r{\@polyvector(#3,#4)}{\endgroup\ignorespaces}}
\def\polygon{%
\@killglue
\@ifstar{\begingroup\@tempswatrue\@polygon}%
{\begingroup\@tempswafalse\@polygon}}
\def\@polygon(#1,#2){%
\@defaultunitsset\pIIe@tempdima{#1}\unitlength
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength
\pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
\@ifnextchar\lp@r{\@@polygon}{\PackageWarning{pict2e}%
{Polygons require at least two vertices!}%
\ignorespaces}}
\def\@@polygon(#1,#2){%
\@defaultunitsset\pIIe@tempdima{#1}\unitlength
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength
\pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}%
\@ifnextchar\lp@r{\@@polygon}{\pIIe@closepath
\if@tempswa\pIIe@fillGraph\else\pIIe@strokeGraph\fi
\endgroup
\ignorespaces}}
\def\moveto(#1,#2){%
\@killglue
\@defaultunitsset\pIIe@tempdima{#1}\unitlength
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength
\pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
\ignorespaces}
\def\lineto(#1,#2){%
\@killglue
\@defaultunitsset\pIIe@tempdima{#1}\unitlength
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength
\pIIe@lineto{\pIIe@tempdima}{\pIIe@tempdimb}%
\ignorespaces}
\def\curveto(#1,#2)(#3,#4)(#5,#6){%
\@killglue
\@defaultunitsset\pIIe@tempdima{#1}\unitlength
\@defaultunitsset\pIIe@tempdimb{#2}\unitlength
\@defaultunitsset\pIIe@tempdimc{#3}\unitlength
\@defaultunitsset\pIIe@tempdimd{#4}\unitlength
\@defaultunitsset\pIIe@tempdime{#5}\unitlength
\@defaultunitsset\pIIe@tempdimf{#6}\unitlength
\pIIe@curveto{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}%
{\pIIe@tempdimd}{\pIIe@tempdime}{\pIIe@tempdimf}%
\ignorespaces}
\newcommand*\circlearc[6][0]{%
\@killglue
\@defaultunitsset\pIIe@tempdima{#2}\unitlength
\@defaultunitsset\pIIe@tempdimb{#3}\unitlength
\@defaultunitsset\pIIe@tempdimc{#4}\unitlength
\pIIe@arc[#1]{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}{#5}{#6}%
\ignorespaces}
\def\closepath{\pIIe@closepath}
\def\strokepath{\pIIe@strokeGraph}
\def\fillpath{\pIIe@fillGraph}
\ifcase\pIIe@mode\relax
\or
\newcommand*\pIIe@linecap@op{setlinecap}
\newcommand*\pIIe@linejoin@op{setlinejoin}
\or
\newcommand*\pIIe@linecap@op{J}
\newcommand*\pIIe@linejoin@op{j}
\fi
\def\pIIe@linecap{}
\def\pIIe@linejoin{}
\def\buttcap{\edef\pIIe@linecap{ 0 \pIIe@linecap@op}}
\def\roundcap{\edef\pIIe@linecap{ 1 \pIIe@linecap@op}}
\def\squarecap{\edef\pIIe@linecap{ 2 \pIIe@linecap@op}}
\def\miterjoin{\edef\pIIe@linejoin{ 0 \pIIe@linejoin@op}}
\def\roundjoin{\edef\pIIe@linejoin{ 1 \pIIe@linejoin@op}}
\def\beveljoin{\edef\pIIe@linejoin{ 2 \pIIe@linejoin@op}}
\AtBeginDocument{\@ifundefined{cbezier}{\newcommand}{\renewcommand}*%
\cbezier[2][0]{\pIIe@@cbezier[#1]#2}%
\@ifdefinable\pIIe@@cbezier{}%
\def\pIIe@@cbezier#1)#2(#3)#4(#5)#6({\@cbezier#1)(#3)(#5)(}%
\def\@cbezier[#1](#2,#3)(#4,#5)(#6,#7)(#8,#9){%
\@killglue
\@defaultunitsset\pIIe@tempdima{#2}\unitlength
\@defaultunitsset\pIIe@tempdimb{#3}\unitlength
\pIIe@moveto{\pIIe@tempdima}{\pIIe@tempdimb}%
\@defaultunitsset\pIIe@tempdima{#4}\unitlength
\@defaultunitsset\pIIe@tempdimb{#5}\unitlength
\@defaultunitsset\pIIe@tempdimc{#6}\unitlength
\@defaultunitsset\pIIe@tempdimd{#7}\unitlength
\@defaultunitsset\pIIe@tempdime{#8}\unitlength
\@defaultunitsset\pIIe@tempdimf{#9}\unitlength
\pIIe@curveto{\pIIe@tempdima}{\pIIe@tempdimb}{\pIIe@tempdimc}%
{\pIIe@tempdimd}{\pIIe@tempdime}{\pIIe@tempdimf}%
\pIIe@strokeGraph
\ignorespaces}%
}
\else
\renewcommand*\oval[1][]{\pIIe@oldoval}
\newcommand*\maxovalrad{20pt}
\newcommand*\OriginalPictureCmds{}
\fi
\Gin@codes
\let\Gin@codes\relax
\endinput
%%
%% End of file `pict2e.sty'.

View File

@ -2,7 +2,7 @@
units lj units lj
atom_style tri atom_style tri
atom_modify first big atom_modify first big map yes
read_data data.tri.srd read_data data.tri.srd
@ -52,12 +52,12 @@ pair_coeff 1 2 0.0 1.0 0.0
timestep 0.001 timestep 0.001
fix 1 big rigid molecule #langevin 1.0 1.0 0.1 12398 fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398
fix 2 small srd 20 big 1.0 0.25 49894 & fix 2 small srd 20 big 1.0 1.0 49894 &
search 0.2 cubic warn 0.0001 shift yes 49829 & search 0.2 cubic warn 0.0001 shift yes 49829 &
overlap yes collision noslip overlap yes collision noslip inside ignore
fix 3 all deform 1 x scale 0.6 y scale 0.6 z scale 0.6 fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8
# diagnostics # diagnostics
@ -73,8 +73,8 @@ compute 2 all ke
compute 3 all pe compute 3 all pe
variable toteng equal (c_1+c_2+c_3)/atoms variable toteng equal (c_1+c_2+c_3)/atoms
thermo 1000 thermo 100
thermo_style custom step f_1 c_tsmall f_2[9] temp press thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4]
thermo_modify temp tbig thermo_modify temp tbig
compute 10 all property/atom corner1x corner1y corner1z & compute 10 all property/atom corner1x corner1y corner1z &
@ -93,9 +93,9 @@ unfix 3
change_box all triclinic change_box all triclinic
fix 2 small srd 20 big 1.0 0.25 49894 & fix 2 small srd 20 big 1.0 1.0 49894 &
search 0.2 cubic warn 0.0001 shift yes 49829 & search 0.2 cubic warn 0.0001 shift yes 49829 &
overlap yes collision noslip tstat yes overlap yes collision noslip tstat yes inside ignore
#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz #dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump2.tri.srd id type & #dump 2 all custom 500 dump2.tri.srd id type &

View File

@ -0,0 +1,812 @@
LAMMPS (2 Aug 2023 - Development - patch_2Aug2023-114-gdad8081d55-modified)
WARNING: Using I/O redirection is unreliable with parallel runs. Better to use the -in switch to read input files. (../lammps.cpp:537)
# Aspherical shear demo - 3d triangle boxes, solvated by SRD particles
units lj
atom_style tri
atom_modify first big map yes
read_data data.tri.srd
Reading data file ...
orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405)
2 by 2 by 2 MPI processor grid
reading atoms ...
1500 atoms
1500 triangles
read_data CPU = 0.007 seconds
# add small particles as hi density lattice
lattice sc 0.4
Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088
region box block INF INF INF INF INF INF
lattice sc 20.0
Lattice spacing in x,y,z = 0.36840315 0.36840315 0.36840315
create_atoms 2 region box
Created 91125 atoms
using lattice units in orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405)
create_atoms CPU = 0.002 seconds
group big type 1
1500 atoms in group big
group small type 2
91125 atoms in group small
set group small mass 0.01
Setting atom values ...
91125 settings made for mass
# delete overlaps
# must set 1-2 cutoff to non-zero value
pair_style lj/cut 1.5
pair_coeff 1 1 1.0 1.0
pair_coeff 2 2 0.0 1.0 0.0
pair_coeff 1 2 0.0 1.0
delete_atoms overlap 1.5 small big
System init for delete_atoms ...
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.8
ghost atom cutoff = 1.8
binsize = 0.9, bins = 19 19 19
2 neighbor lists, perpetual/occasional/extra = 1 1 0
(1) command delete_atoms, occasional
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
(2) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d
bin: standard
WARNING: Delete_atoms cutoff > minimum neighbor cutoff (../delete_atoms.cpp:312)
Deleted 76354 atoms, new total = 16271
# SRD run
reset_timestep 0
velocity small create 1.44 87287 loop geom
neighbor 0.3 multi
neigh_modify delay 0 every 1 check yes
neigh_modify exclude molecule/intra big include big
comm_modify mode multi group big vel yes
neigh_modify include big
# no pairwise interactions with small particles
pair_style tri/lj 3.5
pair_coeff 1 1 0.1 1.0
pair_coeff 2 2 0.0 1.0 0.0
pair_coeff 1 2 0.0 1.0 0.0
# use fix SRD to push small particles out from inside big ones
# if comment out, big particles won't see SRD particles
timestep 0.001
fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398
create bodies CPU = 0.000 seconds
125 rigid bodies with 1500 atoms
1.8601881 = max distance from body owner to body atom
fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip inside ignore
fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8
# diagnostics
compute tsmall small temp/deform
compute tbig big temp
variable pebig equal pe*atoms/count(big)
variable ebig equal etotal*atoms/count(big)
compute_modify tbig extra/dof -4500
compute 1 big erotate/asphere
compute 2 all ke
compute 3 all pe
variable toteng equal (c_1+c_2+c_3)/atoms
thermo 100
thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4]
thermo_modify temp tbig
WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:527)
compute 10 all property/atom corner1x corner1y corner1z corner2x corner2y corner2z corner3x corner3y corner3z
#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump1.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
run 10000
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Your simulation uses code contributions which should be cited:
- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2
@Article{Intveld08,
author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest},
title = {Accurate and Efficient Methods for Modeling Colloidal
Mixtures in an Explicit Solvent using Molecular Dynamics},
journal = {Comput.\ Phys.\ Commut.},
year = 2008,
volume = 179,
pages = {320--329}
}
@article{Shire2020,
author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin},
title = {{DEM} Simulations of Polydisperse Media: Efficient Contact
Detection Applied to Investigate the Quasi-Static Limit},
journal = {Computational Particle Mechanics},
year = {2020}
@article{Monti2022,
author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava,
Ishan and Silbert, Leonardo E. and Grest, Gary S.
and Lechman, Jeremy B.},
title = {Large-scale frictionless jamming with power-law particle
size distributions},
journal = {Phys. Rev. E},
volume = {106}
issue = {3}
year = {2022}
}
- fix srd command: doi:10.1063/1.3419070
@Article{Petersen10,
author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and
G. S. Grest and in 't Veld, P. J. and P. R. Schunk},
title = {Mesoscale Hydrodynamics via Stochastic Rotation
Dynamics: Comparison with {L}ennard-{J}ones Fluid},
journal = {J.~Chem.\ Phys.},
year = 2010,
volume = 132,
pages = 174106
}
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
WARNING: Using compute temp/deform with inconsistent fix deform remap option (../compute_temp_deform.cpp:71)
WARNING: Using fix srd with box deformation but no SRD thermostat (../fix_srd.cpp:405)
SRD info:
SRD/big particles = 14771 1500
big particle diameter max/min = 2.9202881 0.87320391
SRD temperature & lamda = 1 0.2
SRD max distance & max velocity = 0.8 40
SRD grid counts: 17 17 17
SRD grid size: request, actual (xyz) = 1, 0.99262829 0.99262829 0.99262829
SRD per actual grid cell = -3.9971745
SRD viscosity = -34.162587
big/SRD mass density ratio = -3.3753691
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2805)
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2826)
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2828)
# of rescaled SRD velocities = 0
ave/max small velocity = 19.970837 35.150443
ave/max big velocity = 0 0
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.8
ghost atom cutoff = 3.8
binsize = 16.874681, bins = 1 1 1
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair tri/lj, perpetual
attributes: half, newton on
pair build: half/multi/newton
stencil: half/multi/3d
bin: multi
Per MPI rank memory allocation (min/avg/max) = 125.9 | 126.4 | 126.7 Mbytes
Step f_1 c_tsmall Temp Press f_2[9] f_2[4]
0 0 1.4401779 0 -0.15917996 0 0
100 0.36662911 1.1475389 0.24585067 1.0290503 1.1382325 18
200 0.73133134 1.0558153 0.49986673 0.73932383 1.049638 34
300 1.1229361 1.0218621 0.82641583 0.7589689 1.0205369 40
400 1.5826262 0.99541508 1.2201293 0.69171726 0.99190857 52
500 1.8834563 0.99351667 1.4778822 1.0147794 1.0005581 63
600 2.4225372 0.98954834 1.8740966 1.1362893 0.99760042 61
700 3.0172772 0.99153625 2.3351502 1.3284877 0.98731355 39
800 3.5307913 1.0012521 2.6477224 1.1404922 0.9846605 52
900 3.757064 0.99743944 2.7220653 1.4078087 0.97538456 55
1000 4.3165268 1.002214 3.055501 1.2252972 0.99123745 63
1100 4.2796945 1.0075233 3.1022956 1.1893685 1.0139864 69
1200 4.3719315 1.0037271 3.0054509 1.3886162 1.002661 64
1300 4.5628012 0.99368316 3.2690604 1.3621012 0.9810568 56
1400 4.6954389 0.99365088 3.1940001 1.8485712 0.99571089 71
1500 5.0270163 0.99455258 3.4120396 1.5992539 0.98294263 77
1600 5.5897797 1.0021621 3.647347 1.7796904 0.98967622 66
1700 5.5330194 1.0130853 3.6407996 1.8005429 1.0068955 62
1800 5.3606928 1.0090284 3.5863618 1.3308757 1.0214092 59
1900 5.6086195 1.0071865 3.7427101 1.5296314 0.99886937 55
2000 5.3726474 1.0064207 3.603621 1.9473142 0.99999816 54
2100 5.836183 1.0124553 3.7321841 1.7889397 1.0188986 59
2200 5.5090061 1.0113832 3.5884963 1.6617781 1.0071583 59
2300 5.4011211 1.0095947 3.520406 1.8937582 0.99689983 61
2400 5.2219281 1.0053246 3.3699458 1.7231672 0.99899754 59
2500 5.7695275 1.0141459 3.6211469 1.7767598 1.0143133 65
2600 5.4206253 1.0182828 3.521774 2.0800518 1.0081603 70
2700 5.1401099 1.0085209 3.4200563 2.4019836 1.0107652 59
2800 6.5420721 1.0159876 4.1996904 1.863842 1.0160738 61
2900 5.9082962 1.0106921 3.7223419 2.0586998 1.0073885 67
3000 5.6556123 1.0099021 3.6768976 1.921987 1.0068962 76
3100 5.2913762 1.0008567 3.4103831 1.9831969 0.99187526 80
3200 5.1032361 0.99756662 3.1967156 2.2448433 0.99743574 93
3300 5.2622386 1.0024934 3.3325614 2.0078097 1.0047789 86
3400 5.1247527 0.99810102 3.1363556 1.8907269 0.98936508 82
3500 4.9424333 1.0009344 3.2153968 1.9002728 0.99161849 71
3600 5.1243735 1.0037377 3.3117313 2.1267438 1.0078943 65
3700 5.5045819 1.0006119 3.5686193 2.3466538 0.99876164 68
3800 5.5355384 1.0022639 3.6701457 2.0383269 1.0008683 76
3900 6.4915796 1.0137733 4.3225864 2.6996933 1.0064787 79
4000 6.6631737 1.0236248 4.3057163 2.6352666 1.0255232 75
4100 6.2999507 1.0263876 4.0101385 2.5479077 1.0168303 79
4200 6.7902489 1.0247392 4.4616158 2.4926177 1.0191403 91
4300 6.505908 1.0182073 4.0675428 2.168754 1.0177101 74
4400 5.9554283 1.0115938 3.5787297 2.9258144 1.0133896 72
4500 6.2276609 1.0202416 3.8211204 2.5308249 1.0174385 74
4600 6.0485727 1.0195757 3.8217434 2.6421797 1.0201441 78
4700 6.511063 1.0220764 3.933486 2.8591093 1.0147269 83
4800 6.9478172 1.0106414 4.345402 3.3257663 1.00469 85
4900 6.7547045 1.0211842 4.1874576 3.6503845 1.022873 94
5000 7.2603949 1.0234313 4.5393985 3.4667806 1.0222306 105
5100 7.1899652 1.0256566 4.5421834 3.8137207 1.0317242 99
5200 7.1960739 1.026746 4.4288606 3.5523675 1.0242269 97
5300 7.1294458 1.017883 4.5799808 3.3917274 1.0145317 99
5400 6.2810892 1.0291953 4.0109229 2.8604571 1.0289438 97
5500 6.15246 1.0288734 3.8714587 3.2760394 1.0210757 89
5600 6.5860526 1.0192882 4.0272883 3.3124298 1.0096258 93
5700 7.0296116 1.0097293 4.2652722 3.6049788 1.012463 82
5800 6.8372302 1.0140065 4.2205065 4.3686183 1.0088542 93
5900 7.8887098 1.0090612 4.9724078 4.457317 1.0045137 92
6000 10.120663 1.0312443 6.3025192 4.72018 1.0374722 91
6100 9.1318265 1.0304199 5.7084296 4.244548 1.0259056 97
6200 8.9758903 1.0295285 5.1842704 4.870955 1.0178851 95
6300 9.0088218 1.022484 5.3742805 5.1554352 1.0138365 101
6400 10.470322 1.0287848 6.4602103 4.5461489 1.0335978 105
6500 11.100779 1.0347405 6.9630121 4.9840664 1.0339044 99
6600 10.139333 1.0476079 6.4284839 4.5523893 1.0433517 104
6700 8.9706766 1.0386262 5.8387485 4.247024 1.0408151 101
6800 7.7799532 1.0362651 4.9946283 4.6093924 1.0274763 102
6900 8.0866551 1.0337743 4.9942769 4.1679939 1.0454805 102
7000 8.0224277 1.0193598 4.9380527 3.9173115 1.0185001 109
7100 7.8361001 1.0211143 4.872673 5.3471479 1.024779 110
7200 7.8542147 1.0057183 4.8666653 4.668317 0.99980296 122
7300 7.9313852 1.0159181 5.0062527 4.1410294 1.0195705 114
7400 7.2769846 1.0155245 4.6349779 4.9138895 1.0005886 119
7500 7.5974523 1.0196295 4.7918247 4.2525935 1.0211412 124
7600 6.7835063 1.0203187 4.2674694 4.9251624 1.0218296 113
7700 6.4039017 1.0119494 4.1086667 5.5240525 1.0078246 118
7800 7.0715134 1.0149015 4.2450776 4.8796778 1.0164737 125
7900 6.3626535 1.02294 4.202778 4.482164 1.0235878 136
8000 6.2423869 1.0212553 4.0460303 5.2753307 1.0124884 132
8100 6.550891 1.0223318 4.2993545 5.2634985 1.0163244 143
8200 6.9122202 1.008347 4.3551124 5.4108909 1.0084913 142
8300 6.9104634 1.0103936 4.4622206 5.6762373 0.99559355 143
8400 6.4918879 1.0084381 4.1050732 5.8389788 1.0036021 135
8500 7.4377218 1.0216662 4.5229841 5.5431311 1.0260799 123
8600 7.572198 1.0228381 4.9058913 7.1028185 1.0015164 116
8700 8.204675 1.03457 5.2231696 6.4790244 1.0214635 132
8800 8.3118914 1.0381333 5.1795799 6.7437722 1.0290086 132
8900 8.2559198 1.0268665 5.218352 7.2191395 1.019804 138
9000 8.0403128 1.0339414 4.9310394 6.4942331 1.041527 156
9100 7.1773079 1.0397062 4.4993688 7.0272109 1.0388012 167
9200 7.1793935 1.0373589 4.3481663 7.4894459 1.0078785 157
9300 8.3705146 1.0248112 5.1036971 8.2173072 1.010168 156
9400 9.4935002 1.0252907 5.7846951 9.7466018 1.028941 170
9500 9.5208037 1.0371093 5.9635099 7.6444933 1.022673 165
9600 8.9992217 1.0292895 5.6224192 8.8071452 1.0101362 169
9700 8.682661 1.0422224 5.3997636 8.6827834 1.0337928 149
9800 7.6191562 1.0350948 4.7198842 8.6125595 1.0300395 151
9900 8.0910913 1.0319432 4.8843183 7.9013334 1.0272495 167
10000 7.4438347 1.0186098 4.7184985 8.999795 0.99762661 177
Loop time of 162.325 on 8 procs for 10000 steps with 16271 atoms
Performance: 5322.658 tau/day, 61.605 timesteps/s, 1.002 Matom-step/s
99.3% CPU use with 8 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 33.647 | 64.106 | 79.639 | 169.5 | 39.49
Neigh | 0.30808 | 0.44033 | 0.50863 | 9.8 | 0.27
Comm | 26.611 | 43.438 | 74.998 | 215.7 | 26.76
Output | 0.0072573 | 0.0087791 | 0.0097993 | 0.9 | 0.01
Modify | 53.171 | 54.121 | 55.362 | 12.3 | 33.34
Other | | 0.2104 | | | 0.13
Nlocal: 2033.88 ave 2601 max 1413 min
Histogram: 1 2 0 0 0 0 2 1 1 1
Nghost: 1647.25 ave 1714 max 1617 min
Histogram: 4 0 1 0 0 1 1 0 0 1
Neighs: 12482.8 ave 17009 max 8679 min
Histogram: 1 1 1 0 1 1 2 0 0 1
Total # of neighbors = 99862
Ave neighs/atom = 6.1374224
Neighbor list builds = 562
Dangerous builds = 0
#undump 1
#undump 2
unfix 3
change_box all triclinic
Changing box ...
triclinic box = (-6.7498724 -6.7498724 -6.7498724) to (6.7498724 6.7498724 6.7498724) with tilt (0 0 0)
fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip tstat yes inside ignore
#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump2.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
fix 3 all deform 1 xy erate 0.05 units box remap v
run 40000
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
SRD info:
SRD/big particles = 14771 1500
big particle diameter max/min = 2.9202881 0.87320391
SRD temperature & lamda = 1 0.2
SRD max distance & max velocity = 0.8 40
SRD grid counts: 13 13 13
SRD grid size: request, actual (xyz) = 1, 1.0384419 1.0384419 1.0384419
SRD per actual grid cell = -2.775698
SRD viscosity = -12.180602
big/SRD mass density ratio = -5.5653033
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2805)
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2826)
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2828)
# of rescaled SRD velocities = 1
ave/max small velocity = 16.14994 40
ave/max big velocity = 1.6952661 5.2200074
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.8
ghost atom cutoff = 3.8
binsize = 13.499745, bins = 1 1 1
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair tri/lj, perpetual
attributes: half, newton on
pair build: half/multi/newton/tri
stencil: half/multi/3d/tri
bin: multi
Per MPI rank memory allocation (min/avg/max) = 106.9 | 107.5 | 107.7 Mbytes
Step f_1 c_tsmall Temp Press f_2[9] f_2[4]
10000 7.4438347 1.0189789 4.7184481 7.9505614 0 0
10100 7.0770142 1.0021471 4.4491455 6.606701 1 141
10200 6.7628072 1.002308 4.152988 8.5190386 1 125
10300 6.5333319 1.0007472 4.1295404 8.2341747 1 109
10400 6.3237519 1.0024029 3.8636034 9.4058128 1 95
10500 6.6411054 1.0026261 4.2975997 7.6122304 1 82
10600 5.7470775 1.0004827 3.7959947 7.3091777 1 67
10700 5.9744919 1.0014977 3.6885649 7.5517197 1 59
10800 5.8028731 1.0029627 3.7553961 6.2787087 1 49
10900 5.3755286 1.0019318 3.5334739 7.1318348 1 41
11000 5.3915962 1.001463 3.483172 7.6362496 1 40
11100 5.8683672 1.0022459 3.6697589 6.9711866 1 33
11200 5.4351801 0.99956703 3.4548447 7.0745257 1 29
11300 4.9397513 1.0008287 3.1990325 6.0917337 1 27
11400 4.9159845 1.0017862 3.0005677 7.653817 1 26
11500 4.9243103 1.0013135 3.1799841 7.744414 1 23
11600 5.2036357 1.0017984 3.2963749 7.540477 1 22
11700 4.8991892 1.0020757 3.1773032 8.7218471 1 27
11800 4.9489399 1.003438 3.1679764 7.1605486 1 26
11900 4.82398 1.0019946 3.1939566 7.1397869 1 21
12000 4.3531411 1.000532 2.8321416 7.6672501 1 23
12100 4.8226081 1.0018898 3.0382137 6.8343432 1 25
12200 4.7456418 1.0032116 2.9186038 7.3067818 1 20
12300 4.4280468 1.0005857 2.734593 8.0365684 1 22
12400 4.7311239 1.0000982 2.8898839 7.9231831 1 22
12500 4.7261054 1.0016127 2.9090517 7.6085854 1 24
12600 4.7719025 1.0016702 2.9736761 7.6101796 1 26
12700 4.386248 1.001394 2.8508378 6.4765102 1 28
12800 4.3313538 1.0019737 2.6258221 6.3164681 1 19
12900 4.2219861 1.0007469 2.5345699 7.0901077 1 22
13000 4.1775643 1.0011891 2.5807017 7.3579938 1 25
13100 4.3060837 1.0008671 2.5974066 6.9301328 1 22
13200 4.3529062 0.99996469 2.7571632 6.7806287 1 21
13300 4.2178709 1.000673 2.7819091 7.6449064 1 18
13400 4.2714169 1.0021294 2.7280794 8.0986691 1 18
13500 4.3430969 1.0037732 2.6768429 8.1267941 1 18
13600 4.3664374 1.0016083 2.6470186 6.2797727 1 20
13700 4.4904769 1.0008993 2.7885718 7.7410193 1 22
13800 4.2966193 1.001532 2.73862 7.9651302 1 21
13900 4.4003185 1.0009984 2.7484129 8.7160439 1 24
14000 4.5948292 1.0011748 2.9051777 7.842121 1 22
14100 4.6901122 1.0001265 2.9404111 8.9953816 1 20
14200 4.8517518 0.99998743 2.9647625 6.6450509 1 22
14300 4.889628 1.0018051 3.0891097 7.2671824 1 20
14400 4.578862 1.0010629 2.8239776 6.1317183 1 23
14500 4.0865406 1.0013917 2.5119661 6.864665 1 19
14600 4.30688 1.0009041 2.6817814 6.9007433 1 18
14700 4.1295726 1.002342 2.6032093 7.1441648 1 15
14800 4.2176021 1.0015157 2.7332903 6.8394683 1 16
14900 4.2012664 0.99986345 2.6498409 7.4568241 1 15
15000 4.6124269 1.0014751 2.9584178 7.9341875 1 16
15100 4.947327 1.0010615 3.0784409 7.6241305 1 21
15200 5.253281 1.002095 3.3093754 8.1872718 1 25
15300 5.2642369 1.0017799 3.1511136 7.4668389 1 25
15400 5.1967916 1.0029407 3.247548 8.0840111 1 23
15500 5.7465412 1.001896 3.468834 9.5990471 1 15
15600 6.2245772 1.0021086 3.6127689 7.8242016 1 19
15700 5.5626191 0.99984979 3.3893723 7.8124588 1 20
15800 5.5945727 1.0010291 3.3442448 7.0116922 1 17
15900 5.4450219 1.0006248 3.3132381 8.4803413 1 15
16000 5.7800459 1.001449 3.5002534 8.7989456 1 19
16100 6.1168718 1.0008109 3.8081142 8.0119729 1 18
16200 5.4901649 1.0020643 3.3673653 7.3483134 1 17
16300 5.4051694 1.0015652 3.3560012 7.4641983 1 19
16400 5.4237612 1.0012686 3.3816406 7.3845086 1 14
16500 5.1935593 1.001754 3.3340381 7.8607712 1 16
16600 5.539343 1.0021073 3.4164309 8.1541097 1 12
16700 5.8922923 1.0013792 3.553426 7.5220576 1 14
16800 5.956937 1.0005959 3.7630589 8.7417987 1 13
16900 5.469721 1.0016219 3.5531223 8.6721994 1 13
17000 5.3110154 1.001142 3.4167244 7.4644182 1 15
17100 5.9226035 0.99918238 4.0244287 6.5172028 1 16
17200 5.4897042 0.99981565 3.4350691 5.6840394 1 20
17300 5.4302636 1.0021571 3.421473 6.4317025 1 21
17400 5.5559131 1.0013807 3.4951403 6.874191 1 24
17500 5.4068006 1.0010448 3.4506835 7.7069504 1 22
17600 4.9283792 1.0007628 3.1736308 7.3098058 1 20
17700 4.9319722 0.99935896 3.0956257 8.2120111 1 15
17800 4.6842391 1.00037 2.9602433 7.4116352 1 17
17900 4.7714682 1.0009332 2.9666778 7.5925131 1 17
18000 4.7233188 1.0035687 3.0991778 7.1636357 1 10
18100 4.6487958 1.0020255 3.10781 6.8468658 1 12
18200 4.6284129 1.0012617 3.089724 6.3082275 1 13
18300 4.7136404 0.99962415 3.1261978 7.3359556 1 15
18400 5.0367681 1.0011016 3.2413493 8.3910633 1 14
18500 4.9658104 1.0025407 3.2420827 7.4701216 1 17
18600 4.6100059 1.0014508 3.0216884 6.553483 1 17
18700 4.3246452 1.0016721 2.7810363 6.7450293 1 19
18800 4.9415788 1.0012406 3.1661907 7.5544034 1 18
18900 5.3930915 1.000138 3.2557456 7.350955 1 21
19000 5.1938599 1.0007364 3.2398733 6.5397956 1 22
19100 5.4433048 1.0019191 3.2699245 8.3625772 1 22
19200 6.1303261 1.0004005 3.7823203 8.0537369 1 22
19300 5.5762518 1.0008117 3.5689121 8.3714373 1 22
19400 5.1316743 0.9999834 3.099381 7.405287 1 23
19500 5.2064799 1.0012007 3.3059455 7.3499127 1 25
19600 5.1650099 1.0023314 3.3759492 7.3637616 1 21
19700 5.8316278 1.0023317 3.601564 7.153887 1 19
19800 5.6435147 1.0010657 3.4967581 6.8899334 1 21
19900 5.4071193 0.99961357 3.4977894 6.1068438 1 20
20000 5.5058495 1.000982 3.5185057 8.5657603 1 19
20100 5.6551271 1.0025852 3.5672369 7.8242273 1 20
20200 5.7196886 1.002283 3.6010925 7.1449072 1 22
20300 5.5593553 1.0009987 3.4363398 8.4141755 1 21
20400 5.5550247 1.001081 3.3950874 8.0222131 1 20
20500 5.4510415 0.99997273 3.5505093 7.5243655 1 18
20600 5.8014064 1.0007611 3.8084579 7.6583499 1 18
20700 5.7337315 1.0020309 3.7973684 8.7376766 1 17
20800 5.2512898 0.99901254 3.5027763 7.8902791 1 14
20900 5.3245034 1.0014504 3.3354615 6.7030716 1 17
21000 5.2071731 1.0020459 3.3881369 5.8616999 1 20
21100 5.3187535 1.0010762 3.2845672 8.1422146 1 21
21200 5.5298545 0.99942313 3.4393978 7.1183144 1 22
21300 5.8430744 1.0008652 3.719408 7.8522038 1 20
21400 5.8190457 1.0017046 3.5624252 7.8150165 1 20
21500 6.004585 1.0035276 3.9161914 7.7719377 1 21
21600 6.7202635 0.99970072 3.9642141 8.7934294 1 18
21700 6.8590346 1.0007883 4.4285217 8.9014638 1 20
21800 6.627638 1.0012117 4.1154082 8.3153026 1 22
21900 7.8281047 1.0008299 4.8842343 8.4016227 1 20
22000 7.200038 1.0014681 4.4141419 9.4091956 1 18
22100 7.7442011 1.0018051 4.7850371 8.9885489 1 15
22200 7.4770203 1.0033558 4.7512643 8.4898148 1 17
22300 8.1080801 1.0000019 5.2725185 9.2314625 1 14
22400 7.8068311 1.0020672 4.9055683 8.4064748 1 12
22500 7.4594636 1.0008427 4.6586396 8.5102986 1 11
22600 6.9380609 1.0024634 4.2435619 10.395118 1 16
22700 6.9338066 1.001056 4.3436179 7.9126284 1 18
22800 6.8049493 1.0020052 4.1443407 7.8228868 1 18
22900 6.2280158 1.0021474 3.7695343 7.3179647 1 20
23000 5.649403 1.0017128 3.5941976 7.2964709 1 19
23100 5.3203116 1.001912 3.3807399 6.6454551 1 15
23200 5.8172882 1.0005742 3.6625896 8.4256312 1 15
23300 5.9647182 1.0015466 3.9106019 8.3303303 1 14
23400 5.9784055 1.0034542 3.7229235 7.7934273 1 14
23500 5.377627 1.00192 3.5481778 6.8195124 1 17
23600 5.4807136 1.0014662 3.563123 7.6356376 1 18
23700 5.8896329 1.0013553 3.7990694 8.5513408 1 13
23800 6.3463707 0.9999403 3.9609397 8.5741923 1 11
23900 6.656669 1.0014998 4.1993183 9.0862996 1 13
24000 7.583723 1.0025057 4.7628652 7.5007245 1 20
24100 6.9868359 1.0014089 4.4369841 7.692833 1 25
24200 7.1966062 1.0013149 4.4384528 9.5264821 1 18
24300 6.7765706 1.0007065 4.3500477 9.4974154 1 16
24400 7.0853466 1.0013246 4.409163 9.2215823 1 17
24500 6.9603823 1.0004247 4.4866051 7.7870058 1 20
24600 6.9208291 0.99953329 4.2298144 6.5732392 1 21
24700 6.5005518 1.0026848 4.0003505 7.8094715 1 22
24800 5.8421948 1.0012055 3.6686768 7.6078157 1 26
24900 5.8410604 1.0023428 3.746177 6.8971309 1 22
25000 5.8728511 1.0001747 3.7170134 7.4456816 1 19
25100 6.0217168 1.000624 3.7756108 6.6542452 1 20
25200 6.1939015 1.0017861 3.8943084 9.395821 1 25
25300 6.161998 1.0010373 3.9255122 6.2228884 1 28
25400 5.5850406 1.0018505 3.5129832 7.2551309 1 24
25500 6.0286276 1.0009028 3.8580887 6.8065265 1 24
25600 5.6262228 1.0005097 3.4574446 7.5061246 1 21
25700 6.1348187 1.0009828 3.8073512 7.4818375 1 17
25800 6.09781 1.0026426 3.9585383 9.0915939 1 21
25900 6.2673667 1.0002269 3.8182813 9.2134822 1 21
26000 6.6001776 1.0020444 4.041386 8.0403555 1 18
26100 6.3063025 1.0016633 3.8649839 8.8149734 1 19
26200 6.0046983 1.002332 3.5380766 8.6145656 1 17
26300 5.9627788 1.0005401 3.56864 6.7821213 1 15
26400 5.0547314 0.9998295 3.2106781 9.2935351 1 15
26500 5.256781 1.0013131 3.2946631 8.8590275 1 15
26600 5.6250355 1.0023929 3.5243033 8.8985058 1 17
26700 6.0197165 1.0018323 3.7973947 7.3093402 1 17
26800 5.4556541 1.0015309 3.4295107 8.2342049 1 18
26900 5.420428 1.0024996 3.4374201 7.1444636 1 16
27000 6.165624 1.0019174 3.8726016 8.6588275 1 20
27100 6.7131697 1.0006541 4.266264 8.7063389 1 24
27200 6.4855163 1.0016139 4.2029778 7.667611 1 29
27300 6.0525608 1.000478 3.9169723 7.4515279 1 25
27400 6.1426194 1.0014522 3.9176108 6.8689671 1 24
27500 6.5981349 1.0001143 4.0620686 8.6804552 1 27
27600 6.7827138 1.0016694 4.2764286 9.3912843 1 21
27700 6.6368902 1.0025149 4.1452128 9.1814523 1 24
27800 6.9791025 1.0019486 4.3989933 7.9446882 1 24
27900 6.617142 1.0015736 4.360571 9.3732108 1 26
28000 7.2818263 1.0014101 4.6041512 8.2398587 1 28
28100 7.2543709 1.0007625 4.5724787 7.7373488 1 22
28200 7.0631847 1.0023922 4.4021705 8.3290554 1 29
28300 7.2999952 1.0012593 4.4655563 8.612666 1 27
28400 7.4124538 1.0014043 4.5011335 8.379391 1 29
28500 7.0350937 1.0011392 4.3528091 7.8167375 1 24
28600 7.9659642 1.0031684 4.8732467 8.0661929 1 30
28700 7.2865919 1.0010958 4.6650146 8.0325989 1 32
28800 7.7039529 1.0027912 4.8299888 9.5471747 1 30
28900 8.3288847 1.0012438 5.0785288 8.8964877 1 31
29000 7.9348665 1.0021794 4.9393968 9.5531767 1 31
29100 8.2473389 1.0013795 4.9890359 9.7697184 1 29
29200 8.6383362 1.0018356 4.9856954 7.6402719 1 25
29300 8.2504592 1.0011048 4.9631793 7.9466724 1 24
29400 8.0502922 1.0010516 5.2521065 8.4515028 1 26
29500 7.9475896 1.0012951 4.8584644 9.1225463 1 19
29600 8.5641641 1.0016228 5.4361335 9.2045399 1 23
29700 8.9932021 1.0011848 5.5727205 8.6045729 1 23
29800 8.0320178 1.0019073 5.2837013 8.9335413 1 22
29900 8.2676522 1.0012734 5.2213798 8.8966896 1 24
30000 9.1848984 1.001747 5.9147628 12.096129 1 27
30100 10.184519 0.99977427 6.4260136 11.140491 1 27
30200 9.271472 1.0023983 6.0252189 9.6954338 1 30
30300 9.0751572 1.000851 5.6010295 9.734426 1 28
30400 9.4581261 1.0018449 5.6987258 9.70456 1 34
30500 9.1574751 0.99944001 5.582217 9.300318 1 27
30600 8.619312 1.001388 5.3503985 8.2759155 1 26
30700 7.9370031 1.0026674 5.0702831 8.5368014 1 28
30800 7.9221619 1.0019077 5.1278637 11.046922 1 26
30900 9.9722884 1.0025903 6.4055506 10.167311 1 25
31000 8.8648667 0.99962676 5.4777514 10.142102 1 21
31100 8.576344 1.000906 5.3216342 8.7984921 1 18
31200 7.8480974 1.0010341 4.9584917 9.0696437 1 16
31300 8.3536183 1.0005758 5.208516 9.7971514 1 15
31400 8.5301933 1.0007603 5.2241536 9.0257241 1 17
31500 8.5196226 1.0018215 5.0576064 8.8847294 1 19
31600 8.1470823 1.0023147 4.9182956 9.0205413 1 20
31700 8.1475888 1.0005764 5.1814113 9.0603162 1 16
31800 7.8629717 1.0014194 4.9221218 9.366291 1 16
31900 7.7206559 1.0021082 4.9167636 7.4136735 1 16
32000 7.5152809 1.0004752 4.6330638 8.830959 1 16
32100 8.2693974 1.0011751 4.9094804 9.427636 1 13
32200 8.3067661 0.9997006 4.9036865 9.0374633 1 17
32300 7.2068514 1.0007866 4.3580755 8.6445065 1 17
32400 6.885063 1.0011887 4.1528011 8.1199454 1 16
32500 6.9147014 1.0020825 4.160405 7.5398034 1 19
32600 6.8809668 1.000971 4.3312782 8.2157688 1 16
32700 6.4818892 1.0000885 3.9433899 7.309605 1 22
32800 6.6875555 1.0018674 4.1017504 7.2327183 1 22
32900 7.6118502 0.99975736 4.4498951 8.5072395 1 19
33000 7.7576909 1.0022061 4.7239551 9.2132467 1 22
33100 7.8616235 1.000482 5.0031322 9.349805 1 20
33200 8.2620563 1.0015059 5.2482188 10.286446 1 17
33300 8.0217099 1.0015466 5.1166876 9.1381844 1 20
33400 7.6565746 1.0024855 4.7594208 9.2646824 1 22
33500 7.9633887 1.0010334 4.6754116 9.1085184 1 23
33600 7.9566834 1.0024542 4.6712679 9.2046594 1 25
33700 8.2639384 1.0003021 5.1326892 8.0930215 1 24
33800 8.5648917 1.0000947 5.2099387 8.8127486 1 21
33900 8.3593557 1.0002488 5.1291354 8.5938391 1 25
34000 8.1922068 1.0030011 5.1441189 7.1529563 1 24
34100 8.4260308 1.0004639 5.5876122 9.0450303 1 28
34200 8.3014654 1.0002204 5.1964772 8.4920822 1 33
34300 7.4736545 1.0010306 4.7932244 7.8442244 1 30
34400 7.0023126 1.0024002 4.5665168 8.4702188 1 29
34500 7.3797703 1.000813 4.7224014 8.4098954 1 30
34600 7.7158761 0.99973161 4.7441628 8.5818592 1 29
34700 7.6135895 1.0015768 4.6612844 7.2195952 1 28
34800 7.0458078 0.99992638 4.2805357 7.4162305 1 32
34900 7.6190708 1.0007146 4.8064968 8.2709405 1 27
35000 7.4614294 1.0006051 4.7807207 7.7137359 1 28
35100 7.7008336 1.0008263 4.6823621 7.0208513 1 26
35200 8.1510766 1.000271 5.1781834 7.3231692 1 24
35300 7.5106275 1.0010438 4.6988185 8.9418343 1 25
35400 7.8116652 1.0009688 4.8622216 7.4624002 1 17
35500 7.2159785 1.0027484 4.543984 8.3177043 1 21
35600 7.6978875 1.0004834 4.7021203 8.3706905 1 20
35700 7.7827655 1.0019919 4.775879 8.6083292 1 15
35800 7.8433537 1.001844 4.7506574 7.3250009 1 15
35900 7.9456497 1.0004336 4.7925775 7.9824359 1 18
36000 8.1044513 1.0022261 5.1213755 9.211699 1 16
36100 7.6657532 1.0025661 4.751804 8.9770412 1 19
36200 7.909323 1.0035462 4.8435293 10.232493 1 21
36300 8.4188244 1.0016775 5.4337725 9.2060079 1 24
36400 8.7352689 1.0011274 5.6313351 8.6202832 1 24
36500 8.3459273 1.0005659 5.187336 6.9333716 1 21
36600 7.7118105 1.0018769 4.9293347 8.2789615 1 14
36700 7.8069879 1.0014021 4.7782709 8.4841233 1 15
36800 7.862085 1.0005342 4.8680692 8.1055023 1 16
36900 7.9469362 1.0027815 4.9339095 9.157722 1 16
37000 7.9085375 1.0024851 5.0921374 8.9374239 1 16
37100 8.9464869 1.0005734 5.6837772 8.806998 1 16
37200 8.1482632 1.0021175 5.1266453 8.5772094 1 18
37300 7.7958072 1.0026336 4.788431 8.3233372 1 19
37400 7.3647655 1.0015482 4.4786134 9.6606112 1 23
37500 7.3071882 1.0003912 4.681549 8.6319438 1 17
37600 7.8672509 1.0000478 4.7981944 8.3051478 1 14
37700 7.9306696 0.99923102 4.9316544 9.3672856 1 15
37800 7.7397949 0.99948557 5.1168552 8.5978047 1 17
37900 7.9121039 1.0020122 4.9866234 7.640888 1 14
38000 7.433451 1.0007901 4.6254894 8.0853539 1 14
38100 7.4636908 1.0021552 4.8472833 8.1975615 1 10
38200 7.4453077 1.0010305 4.6910943 7.8192603 1 13
38300 7.0488536 1.0012587 4.5490462 8.190036 1 16
38400 8.0686748 1.0016782 5.0747029 7.7242015 1 15
38500 7.9575875 1.0007137 4.8361776 8.05268 1 15
38600 7.6690498 1.0027522 4.8823286 9.1926516 1 20
38700 7.1567 1.002374 4.5600354 10.098089 1 19
38800 6.9100518 1.0008695 4.4101446 7.8832032 1 19
38900 6.8021882 1.0017647 4.1844125 8.1858761 1 21
39000 8.3996464 1.0010263 4.8183813 8.0997387 1 16
39100 8.4533834 1.0021643 5.074254 11.291904 1 19
39200 8.2406701 1.002062 5.0117425 8.778159 1 24
39300 8.3134114 1.0008218 5.0067136 7.9871787 1 22
39400 7.4307571 1.0014205 4.5858283 8.8596594 1 25
39500 7.1146821 1.0016367 4.5021057 7.4890018 1 22
39600 8.0048978 0.99992107 4.9235747 7.8770845 1 24
39700 8.070853 1.0029024 5.0842957 9.020664 1 21
39800 7.6939108 1.0012543 4.8986595 8.3306129 1 20
39900 7.2915444 1.00267 4.5038291 8.3844384 1 20
40000 7.3023994 1.0020441 4.4960911 8.1023709 1 18
40100 7.0221648 1.0033695 4.6374149 8.3756822 1 24
40200 7.4114756 1.0019246 4.6733475 7.6547258 1 23
40300 7.5323108 1.0005472 4.8284493 8.2820085 1 26
40400 7.3890772 1.0010491 4.6599273 8.9203575 1 19
40500 7.5786764 1.0016114 4.8166885 8.6760107 1 25
40600 8.165763 1.0006961 5.1488995 7.9321524 1 22
40700 8.1277597 0.99933464 5.0441567 10.069551 1 16
40800 8.1050904 1.0024705 5.4408599 8.3244459 1 21
40900 7.805318 1.0022992 4.9965408 9.7193723 1 21
41000 9.0130932 1.0006842 5.7931112 6.1646073 1 20
41100 8.0387975 1.0017359 5.3355655 9.6123191 1 21
41200 8.4484723 1.0014151 5.4461007 8.5146504 1 27
41300 8.6181909 1.0007562 5.2963876 9.1122306 1 30
41400 9.6762899 1.0010931 5.950456 9.2851025 1 25
41500 9.9414226 1.0016186 6.1433384 10.741453 1 24
41600 9.3348435 1.0003483 5.9291766 11.460717 1 20
41700 9.6125587 1.0013661 5.8530052 9.2105722 1 19
41800 11.383056 1.0032034 7.1988684 10.312945 1 22
41900 10.884524 1.0034888 6.9126707 10.775457 1 20
42000 11.071218 1.0026753 7.0004189 10.740627 1 20
42100 11.054304 1.0008347 6.9602414 8.9885498 1 22
42200 22.478691 1.0020466 14.997099 12.72513 1 19
42300 18.303508 1.0027626 11.336523 12.638769 1 18
42400 15.998712 1.0030312 9.4092725 11.070501 1 24
42500 15.034488 1.0024472 9.3543751 11.48052 1 28
42600 14.538257 1.0033153 9.2523745 10.909576 1 27
42700 13.986613 1.001458 8.5544184 10.765136 1 29
42800 13.240256 1.0027899 8.2014429 10.506497 1 32
42900 12.784336 1.0001406 8.0823431 12.258209 1 33
43000 13.374145 1.0012996 8.4207155 10.32817 1 31
43100 13.142334 1.0022503 8.5908808 10.152205 1 32
43200 12.669284 1.0018944 7.8511966 10.580104 1 32
43300 13.155032 1.001144 8.0337768 10.6652 1 39
43400 12.155928 1.0019472 7.5886584 11.234772 1 35
43500 12.385603 1.0007639 7.8865245 9.3868914 1 32
43600 12.236179 1.0027456 7.7521353 10.456701 1 42
43700 11.49535 1.0008758 7.3633144 8.8490079 1 40
43800 11.469157 1.0015845 7.0035577 10.594522 1 41
43900 11.228266 1.0013014 7.0137223 8.0653711 1 38
44000 10.56742 1.0016631 6.6908938 8.1094154 1 35
44100 9.8964699 1.0008351 6.3550438 8.6578181 1 36
44200 9.041539 1.0019541 5.6721401 8.6518043 1 38
44300 9.0767434 1.0034191 5.7446596 8.3838528 1 38
44400 9.2299608 1.0019526 5.7117964 8.3106491 1 37
44500 9.458981 1.0030409 5.7612138 7.7679755 1 37
44600 8.9611997 1.0014848 5.6490756 6.9224078 1 37
44700 8.0853184 1.0018894 5.2288749 8.0910912 1 32
44800 7.9999755 1.0015853 4.8088312 7.1854304 1 30
44900 7.6598023 1.0009751 4.6690664 7.1999858 1 28
45000 7.4939315 1.0010307 4.8119666 7.9615769 1 26
45100 7.4690079 0.99913423 4.9704428 7.6026835 1 32
45200 7.7001199 1.001626 4.9315953 7.4926686 1 25
45300 7.8794405 1.0011648 4.8624857 8.0804457 1 26
45400 7.493909 1.0016257 4.7631808 8.0330626 1 26
45500 7.5963141 1.0005825 4.7220659 7.0971298 1 23
45600 7.9028612 1.0017008 4.9561022 8.440428 1 23
45700 7.2285584 1.0006033 4.5521456 9.385579 1 23
45800 7.5687284 1.0024318 4.8557498 8.3052658 1 23
45900 7.8938604 1.0013937 5.1393944 5.5323667 1 26
46000 8.318466 1.0020803 5.4761811 8.2227801 1 25
46100 7.9169512 1.0024598 5.0406355 8.64365 1 27
46200 7.5535458 1.0016318 4.8010133 9.370726 1 26
46300 7.8926896 1.0001525 5.18463 7.9830196 1 27
46400 7.487145 1.002671 4.7718312 8.300134 1 29
46500 7.3564658 1.0006114 4.6762189 7.34947 1 26
46600 7.2261291 1.0005569 4.4751221 6.5847138 1 27
46700 7.2943203 1.0020164 4.3335327 7.7296507 1 25
46800 8.5849411 1.0014634 5.4501531 9.0933014 1 25
46900 10.176752 1.0023799 6.0456779 9.4050423 1 16
47000 9.1913098 1.0029076 5.7577256 9.1826215 1 22
47100 9.5479771 1.0022102 6.1100973 8.9440056 1 28
47200 9.9944172 1.0004924 6.3649417 9.1507264 1 25
47300 9.3543283 1.0013246 6.0873147 10.41657 1 24
47400 8.594101 1.0020068 5.6864295 9.2388304 1 24
47500 9.3191964 1.002411 6.0537511 9.3506828 1 23
47600 8.1615734 1.001364 5.3757905 10.303962 1 30
47700 8.3615046 1.0003075 5.2727936 9.3162209 1 32
47800 8.3566467 1.0026031 5.4379524 7.7644422 1 33
47900 8.4062556 1.0006471 5.3098736 8.0181121 1 33
48000 8.2233307 1.0012304 4.9650027 9.2644288 1 34
48100 8.4495256 1.000088 4.9940422 10.01023 1 27
48200 8.8068097 1.0014275 5.4732649 8.410093 1 31
48300 8.0008187 1.0017459 4.7732764 9.25726 1 27
48400 7.7242529 1.0026909 4.9084505 8.7147295 1 30
48500 8.3752816 1.001333 5.1071228 8.2267308 1 32
48600 9.0777805 1.0019328 5.7331841 9.6679383 1 29
48700 9.3623061 1.0001767 5.7117062 8.396895 1 25
48800 8.1186637 1.0013185 5.2697427 8.6058372 1 27
48900 7.3685497 1.0007173 4.6097553 7.8047228 1 24
49000 7.1661421 1.0023152 4.5389038 8.8759552 1 22
49100 6.9857144 1.0016394 4.6489319 8.2022359 1 24
49200 6.7160336 1.0018413 4.2488082 8.3393245 1 25
49300 7.9703755 1.0010628 5.2328567 7.968278 1 28
49400 8.2628465 1.0010877 5.2292977 8.0196533 1 27
49500 8.1436558 1.0015175 5.0344712 8.0712037 1 30
49600 8.5182498 1.0021589 5.1029028 8.6869789 1 28
49700 8.3604444 1.0015016 5.0333696 9.4861656 1 25
49800 7.336335 1.0020055 4.6365173 8.7210022 1 30
49900 7.432996 1.0016415 4.7090587 8.7033033 1 29
50000 7.4937053 1.001014 4.7212573 9.0890363 1 29
Loop time of 999.576 on 8 procs for 40000 steps with 16271 atoms
Performance: 3457.466 tau/day, 40.017 timesteps/s, 651.116 katom-step/s
99.3% CPU use with 8 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 293.48 | 403.7 | 545.29 | 357.5 | 40.39
Neigh | 2.4176 | 3.2721 | 3.8303 | 25.2 | 0.33
Comm | 163.58 | 305.88 | 419.83 | 416.7 | 30.60
Output | 0.032483 | 0.034794 | 0.040514 | 1.2 | 0.00
Modify | 281.15 | 285.67 | 293.8 | 24.3 | 28.58
Other | | 1.023 | | | 0.10
Nlocal: 2033.88 ave 2657 max 1198 min
Histogram: 2 0 0 0 0 2 1 0 1 2
Nghost: 1628.12 ave 1719 max 1569 min
Histogram: 2 0 1 1 2 1 0 0 0 1
Neighs: 13566 ave 18212 max 8488 min
Histogram: 1 0 0 1 2 1 2 0 0 1
Total # of neighbors = 108528
Ave neighs/atom = 6.6700264
Neighbor list builds = 2447
Dangerous builds = 2
Total wall time: 0:19:22

View File

@ -1,243 +0,0 @@
LAMMPS (1 Feb 2014)
# Aspherical shear demo - 3d triangle boxes, solvated by SRD particles
units lj
atom_style tri
atom_modify first big
read_data data.tri.srd
orthogonal box = (-8.43734 -8.43734 -8.43734) to (8.43734 8.43734 8.43734)
2 by 2 by 2 MPI processor grid
reading atoms ...
1500 atoms
1500 triangles
# add small particles as hi density lattice
lattice sc 0.4
Lattice spacing in x,y,z = 1.35721 1.35721 1.35721
region box block INF INF INF INF INF INF
lattice sc 20.0
Lattice spacing in x,y,z = 0.368403 0.368403 0.368403
create_atoms 2 region box
Created 91125 atoms
group big type 1
1500 atoms in group big
group small type 2
91125 atoms in group small
set group small mass 0.01
91125 settings made for mass
# delete overlaps
# must set 1-2 cutoff to non-zero value
pair_style lj/cut 1.5
pair_coeff 1 1 1.0 1.0
pair_coeff 2 2 0.0 1.0 0.0
pair_coeff 1 2 0.0 1.0
delete_atoms overlap 1.5 small big
Deleted 76354 atoms, new total = 16271
# SRD run
reset_timestep 0
velocity small create 1.44 87287 loop geom
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
neigh_modify exclude molecule big include big
communicate multi group big vel yes
neigh_modify include big
# no pairwise interactions with small particles
pair_style tri/lj 3.5
pair_coeff 1 1 0.1 1.0
pair_coeff 2 2 0.0 1.0 0.0
pair_coeff 1 2 0.0 1.0 0.0
# use fix SRD to push small particles out from inside big ones
# if comment out, big particles won't see SRD particles
timestep 0.001
fix 1 big rigid molecule #langevin 1.0 1.0 0.1 12398
125 rigid bodies with 1500 atoms
fix 2 small srd 20 big 1.0 0.25 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip
fix 3 all deform 1 x scale 0.6 y scale 0.6 z scale 0.6
# diagnostics
compute tsmall small temp/deform
compute tbig big temp
variable pebig equal pe*atoms/count(big)
variable ebig equal etotal*atoms/count(big)
compute 1 big erotate/asphere
compute 2 all ke
compute 3 all pe
variable toteng equal (c_1+c_2+c_3)/atoms
thermo 1000
thermo_style custom step f_1 c_tsmall f_2[9] temp press
thermo_modify temp tbig
WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439)
compute 10 all property/atom corner1x corner1y corner1z corner2x corner2y corner2z corner3x corner3y corner3z
#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump1.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
run 10000
WARNING: Using fix srd with box deformation but no SRD thermostat (../fix_srd.cpp:385)
SRD info:
SRD/big particles = 14771 1500
big particle diameter max/min = 1.46014 0.436602
SRD temperature & lamda = 1 0.2
SRD max distance & max velocity = 0.8 40
SRD grid counts: 67 67 67
SRD grid size: request, actual (xyz) = 0.25, 0.251861 0.251861 0.251861
SRD per actual grid cell = 0.0647662
SRD viscosity = -1.09837
big/SRD mass density ratio = 24.668
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2853)
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875)
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2877)
# of rescaled SRD velocities = 0
ave/max small velocity = 19.9708 35.1504
ave/max big velocity = 0 0
WARNING: Using compute temp/deform with inconsistent fix deform remap option (../compute_temp_deform.cpp:76)
Memory usage per processor = 116.135 Mbytes
Step 1 tsmall 2[9] Temp Press
0 0 1.4405441 0 0 -0.15917996
1000 1.0535509 1.1241378 1.1224038 0 0.15526438
2000 2.4635987 1.0240667 0.94231519 0 0.011069846
3000 3.1093028 1.0070585 1.0176028 0 0.34124888
4000 2.9524179 1.0101774 1.0311733 0 -0.22118101
5000 2.9175438 1.0109144 1.0284445 0 0.1839507
6000 3.3200928 0.99108983 0.95968219 0 1.0229339
7000 3.3020156 0.99661428 0.98000621 0 2.3333851
8000 4.1500999 0.99129645 0.99723707 0 4.3054414
9000 6.537028 1.0074533 1.0251098 0 18.782913
10000 16.233245 1.0145766 1.0219787 0 147.83787
Loop time of 228.558 on 8 procs for 10000 steps with 16271 atoms
Pair time (%) = 145.018 (63.4492)
Neigh time (%) = 32.6283 (14.2757)
Comm time (%) = 43.3283 (18.9572)
Outpt time (%) = 0.000848889 (0.00037141)
Other time (%) = 7.58254 (3.31755)
Nlocal: 2033.88 ave 2092 max 1902 min
Histogram: 1 0 0 0 1 1 0 1 1 3
Nghost: 2805 ave 2855 max 2751 min
Histogram: 1 0 2 1 0 0 0 2 1 1
Neighs: 30026.5 ave 38700 max 24367 min
Histogram: 1 0 2 1 3 0 0 0 0 1
Total # of neighbors = 240212
Ave neighs/atom = 14.7632
Neighbor list builds = 501
Dangerous builds = 0
#undump 1
#undump 2
unfix 3
change_box all triclinic
triclinic box = (-5.0624 -5.0624 -5.0624) to (5.0624 5.0624 5.0624) with tilt (0 0 0)
fix 2 small srd 20 big 1.0 0.25 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip tstat yes
#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz
#dump 2 all custom 500 dump2.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
fix 3 all deform 1 xy erate 0.05 units box remap v
run 40000
SRD info:
SRD/big particles = 14771 1500
big particle diameter max/min = 1.46014 0.436602
SRD temperature & lamda = 1 0.2
SRD max distance & max velocity = 0.8 40
SRD grid counts: 40 40 40
SRD grid size: request, actual (xyz) = 0.25, 0.25312 0.25312 0.25312
SRD per actual grid cell = -1.93929
SRD viscosity = -0.36972
big/SRD mass density ratio = -0.836253
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2853)
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875)
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2877)
# of rescaled SRD velocities = 1
ave/max small velocity = 16.0639 40
ave/max big velocity = 2.05735 6.73052
Memory usage per processor = 65.2471 Mbytes
Step 1 tsmall 2[9] Temp Press
10000 16.233245 1.0144194 0 0 146.27032
11000 17.301043 1.0619209 1 0 84.226323
12000 13.481177 1.063945 1 0 80.42834
13000 12.616615 1.0536125 1 0 68.365053
14000 12.16592 1.0581344 1 0 59.709941
15000 10.811557 1.0650453 1 0 59.869798
16000 9.9303081 1.0641012 1 0 59.289126
17000 10.452639 1.0589904 1 0 52.680235
18000 9.2488947 1.0556713 1 0 51.044123
19000 8.7179788 1.0566791 1 0 50.927924
20000 7.8641299 1.0668891 1 0 53.961014
21000 8.4333975 1.0628003 1 0 54.677068
22000 8.554623 1.0591872 1 0 51.784737
23000 7.895462 1.0598512 1 0 53.26885
24000 7.7014869 1.055569 1 0 54.236941
25000 7.508138 1.0581539 1 0 53.297709
26000 8.0707381 1.0586451 1 0 51.411341
27000 8.224223 1.0585509 1 0 52.775784
28000 8.8720461 1.0648837 1 0 49.681447
29000 8.503895 1.0538278 1 0 52.478556
30000 8.2272425 1.0625583 1 0 52.795709
31000 8.4626161 1.0599557 1 0 52.905343
32000 7.7410527 1.0587681 1 0 57.464472
33000 7.2765481 1.0677531 1 0 59.46728
34000 7.036016 1.0640728 1 0 60.636828
35000 8.497203 1.0577458 1 0 55.257312
36000 8.9218761 1.0585038 1 0 55.668201
37000 8.0469115 1.0561193 1 0 58.711565
38000 8.6456966 1.0663818 1 0 53.691658
39000 8.566667 1.0616928 1 0 52.866468
40000 7.7081259 1.0577046 1 0 54.105829
41000 7.4051952 1.0570277 1 0 56.094997
42000 7.331432 1.0632261 1 0 55.661067
43000 7.5587053 1.0602077 1 0 54.30762
44000 7.4521497 1.0594391 1 0 52.993548
45000 7.6234559 1.0641992 1 0 53.352202
46000 8.0659693 1.0609367 1 0 50.302682
47000 7.5227882 1.0563543 1 0 50.43551
48000 8.0798684 1.0628968 1 0 48.419201
49000 7.130784 1.0594143 1 0 50.656081
50000 7.3219268 1.0608236 1 0 54.808358
Loop time of 1651.84 on 8 procs for 40000 steps with 16271 atoms
Pair time (%) = 1232.76 (74.6296)
Neigh time (%) = 171.893 (10.4061)
Comm time (%) = 193.625 (11.7218)
Outpt time (%) = 0.00338289 (0.000204795)
Other time (%) = 53.5578 (3.24231)
Nlocal: 2033.88 ave 2229 max 1953 min
Histogram: 2 1 2 2 0 0 0 0 0 1
Nghost: 2757.88 ave 2810 max 2692 min
Histogram: 1 1 1 0 1 0 0 1 1 2
Neighs: 30098.6 ave 37369 max 25592 min
Histogram: 1 3 0 1 0 1 1 0 0 1
Total # of neighbors = 240789
Ave neighs/atom = 14.7987
Neighbor list builds = 2007
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation

View File

@ -22,22 +22,26 @@
""" """
Import basic modules Import basic modules
""" """
# for python2/3 compatibility
from __future__ import print_function
import sys, os, timeit import sys, os, timeit
from timeit import default_timer as timer from timeit import default_timer as timer
start_time = timer() start_time = timer()
""" """
Try to import numpy; if failed, import a local version mynumpy Try to import numpy; if failed, import a local version mynumpy
which needs to be provided which needs to be provided
""" """
try: try:
import numpy as np import numpy as np
except: except:
print >> sys.stderr, "numpy not found. Exiting." print("numpy not found. Exiting.", file=sys.stderr)
sys.exit(1) sys.exit(1)
""" """
Check that the required arguments (box offset and size in simulation units Check that the required arguments (box offset and size in simulation units
and the sequence file were provided and the sequence file were provided
""" """
try: try:
@ -45,8 +49,8 @@ try:
box_length = float(sys.argv[2]) box_length = float(sys.argv[2])
infile = sys.argv[3] infile = sys.argv[3]
except: except:
print >> sys.stderr, "Usage: %s <%s> <%s> <%s>" % (sys.argv[0], \ print( "Usage: %s <%s> <%s> <%s>" % (sys.argv[0], \
"box offset", "box length", "file with sequences") "box offset", "box length", "file with sequences"), file=sys.stderr)
sys.exit(1) sys.exit(1)
box = np.array ([box_length, box_length, box_length]) box = np.array ([box_length, box_length, box_length])
@ -57,8 +61,7 @@ try:
inp = open (infile, 'r') inp = open (infile, 'r')
inp.close() inp.close()
except: except:
print >> sys.stderr, "Could not open file '%s' for reading. \ print( "Could not open file '%s' for reading. Aborting." % infile, file=sys.stderr)
Aborting." % infile
sys.exit(2) sys.exit(2)
# return parts of a string # return parts of a string
@ -86,7 +89,7 @@ Define auxiliary variables for the construction of a helix
# center of the double strand # center of the double strand
CM_CENTER_DS = POS_BASE + 0.2 CM_CENTER_DS = POS_BASE + 0.2
# ideal distance between base sites of two nucleotides # ideal distance between base sites of two nucleotides
# which are to be base paired in a duplex # which are to be base paired in a duplex
BASE_BASE = 0.3897628551303122 BASE_BASE = 0.3897628551303122
@ -118,7 +121,7 @@ strandnum = []
bonds = [] bonds = []
""" """
Convert local body frame to quaternion DOF Convert local body frame to quaternion DOF
""" """
def exyz_to_quat (mya1, mya3): def exyz_to_quat (mya1, mya3):
@ -135,25 +138,25 @@ def exyz_to_quat (mya1, mya3):
# compute other components from it # compute other components from it
if q0sq >= 0.25: if q0sq >= 0.25:
myquat[0] = np.sqrt(q0sq) myquat[0] = np.sqrt(q0sq)
myquat[1] = (mya2[2] - mya3[1]) / (4.0*myquat[0]) myquat[1] = (mya2[2] - mya3[1]) / (4.0*myquat[0])
myquat[2] = (mya3[0] - mya1[2]) / (4.0*myquat[0]) myquat[2] = (mya3[0] - mya1[2]) / (4.0*myquat[0])
myquat[3] = (mya1[1] - mya2[0]) / (4.0*myquat[0]) myquat[3] = (mya1[1] - mya2[0]) / (4.0*myquat[0])
elif q1sq >= 0.25: elif q1sq >= 0.25:
myquat[1] = np.sqrt(q1sq) myquat[1] = np.sqrt(q1sq)
myquat[0] = (mya2[2] - mya3[1]) / (4.0*myquat[1]) myquat[0] = (mya2[2] - mya3[1]) / (4.0*myquat[1])
myquat[2] = (mya2[0] + mya1[1]) / (4.0*myquat[1]) myquat[2] = (mya2[0] + mya1[1]) / (4.0*myquat[1])
myquat[3] = (mya1[2] + mya3[0]) / (4.0*myquat[1]) myquat[3] = (mya1[2] + mya3[0]) / (4.0*myquat[1])
elif q2sq >= 0.25: elif q2sq >= 0.25:
myquat[2] = np.sqrt(q2sq) myquat[2] = np.sqrt(q2sq)
myquat[0] = (mya3[0] - mya1[2]) / (4.0*myquat[2]) myquat[0] = (mya3[0] - mya1[2]) / (4.0*myquat[2])
myquat[1] = (mya2[0] + mya1[1]) / (4.0*myquat[2]) myquat[1] = (mya2[0] + mya1[1]) / (4.0*myquat[2])
myquat[3] = (mya3[1] + mya2[2]) / (4.0*myquat[2]) myquat[3] = (mya3[1] + mya2[2]) / (4.0*myquat[2])
elif q3sq >= 0.25: elif q3sq >= 0.25:
myquat[3] = np.sqrt(q3sq) myquat[3] = np.sqrt(q3sq)
myquat[0] = (mya1[1] - mya2[0]) / (4.0*myquat[3]) myquat[0] = (mya1[1] - mya2[0]) / (4.0*myquat[3])
myquat[1] = (mya3[0] + mya1[2]) / (4.0*myquat[3]) myquat[1] = (mya3[0] + mya1[2]) / (4.0*myquat[3])
myquat[2] = (mya3[1] + mya2[2]) / (4.0*myquat[3]) myquat[2] = (mya3[1] + mya2[2]) / (4.0*myquat[3])
norm = 1.0/np.sqrt(myquat[0]*myquat[0] + myquat[1]*myquat[1] + \ norm = 1.0/np.sqrt(myquat[0]*myquat[0] + myquat[1]*myquat[1] + \
myquat[2]*myquat[2] + myquat[3]*myquat[3]) myquat[2]*myquat[2] + myquat[3]*myquat[3])
@ -169,62 +172,62 @@ Adds a strand to the system by appending it to the array of previous strands
""" """
def add_strands (mynewpositions, mynewa1s, mynewa3s): def add_strands (mynewpositions, mynewa1s, mynewa3s):
overlap = False overlap = False
# This is a simple check for each of the particles where for previously # This is a simple check for each of the particles where for previously
# placed particles i we check whether it overlaps with any of the # placed particles i we check whether it overlaps with any of the
# newly created particles j # newly created particles j
print >> sys.stdout, "## Checking for overlaps" print( "## Checking for overlaps", file=sys.stdout)
for i in xrange(len(positions)): for i in range(len(positions)):
p = positions[i] p = positions[i]
pa1 = a1s[i] pa1 = a1s[i]
for j in xrange (len(mynewpositions)): for j in range (len(mynewpositions)):
q = mynewpositions[j] q = mynewpositions[j]
qa1 = mynewa1s[j] qa1 = mynewa1s[j]
# skip particles that are anyway too far away # skip particles that are anyway too far away
dr = p - q dr = p - q
dr -= box * np.rint (dr / box) dr -= box * np.rint(dr / box)
if np.dot(dr, dr) > RC2: if np.dot(dr, dr) > RC2:
continue continue
# base site and backbone site of the two particles # base site and backbone site of the two particles
p_pos_back = p + pa1 * POS_BACK p_pos_back = p + pa1 * POS_BACK
p_pos_base = p + pa1 * POS_BASE p_pos_base = p + pa1 * POS_BASE
q_pos_back = q + qa1 * POS_BACK q_pos_back = q + qa1 * POS_BACK
q_pos_base = q + qa1 * POS_BASE q_pos_base = q + qa1 * POS_BASE
# check for no overlap between the two backbone sites # check for no overlap between the two backbone sites
dr = p_pos_back - q_pos_back dr = p_pos_back - q_pos_back
dr -= box * np.rint (dr / box) dr -= box * np.rint(dr / box)
if np.dot(dr, dr) < RC2_BACK: if np.dot(dr, dr) < RC2_BACK:
overlap = True overlap = True
# check for no overlap between the two base sites # check for no overlap between the two base sites
dr = p_pos_base - q_pos_base dr = p_pos_base - q_pos_base
dr -= box * np.rint (dr / box) dr -= box * np.rint(dr / box)
if np.dot(dr, dr) < RC2_BASE: if np.dot(dr, dr) < RC2_BASE:
overlap = True overlap = True
# check for no overlap between backbone site of particle p # check for no overlap between backbone site of particle p
# with base site of particle q # with base site of particle q
dr = p_pos_back - q_pos_base dr = p_pos_back - q_pos_base
dr -= box * np.rint (dr / box) dr -= box * np.rint (dr / box)
if np.dot(dr, dr) < RC2_BACK_BASE: if np.dot(dr, dr) < RC2_BACK_BASE:
overlap = True overlap = True
# check for no overlap between base site of particle p and # check for no overlap between base site of particle p and
# backbone site of particle q # backbone site of particle q
dr = p_pos_base - q_pos_back dr = p_pos_base - q_pos_back
dr -= box * np.rint (dr / box) dr -= box * np.rint (dr / box)
if np.dot(dr, dr) < RC2_BACK_BASE: if np.dot(dr, dr) < RC2_BACK_BASE:
overlap = True overlap = True
# exit if there is an overlap # exit if there is an overlap
if overlap: if overlap:
return False return False
@ -237,10 +240,10 @@ def add_strands (mynewpositions, mynewa1s, mynewa3s):
a1s.append (p) a1s.append (p)
for p in mynewa3s: for p in mynewa3s:
a3s.append (p) a3s.append (p)
# calculate quaternion from local body frame and append # calculate quaternion from local body frame and append
for ia in xrange(len(mynewpositions)): for ia in range(len(mynewpositions)):
mynewquaternions = exyz_to_quat(mynewa1s[ia],mynewa3s[ia]) mynewquaternions = exyz_to_quat(mynewa1s[ia],mynewa3s[ia])
quaternions.append(mynewquaternions) quaternions.append(mynewquaternions)
return True return True
@ -281,7 +284,7 @@ def get_rotation_matrix(axis, anglest):
[olc*x*z-st*y, olc*y*z+st*x, olc*z*z+ct]]) [olc*x*z-st*y, olc*y*z+st*x, olc*z*z+ct]])
""" """
Generates the position and orientation vectors of a Generates the position and orientation vectors of a
(single or double) strand from a sequence string (single or double) strand from a sequence string
""" """
def generate_strand(bp, sequence=None, start_pos=np.array([0, 0, 0]), \ def generate_strand(bp, sequence=None, start_pos=np.array([0, 0, 0]), \
@ -295,76 +298,75 @@ def generate_strand(bp, sequence=None, start_pos=np.array([0, 0, 0]), \
# overall direction of the helix # overall direction of the helix
dir = np.array(dir, dtype=float) dir = np.array(dir, dtype=float)
if sequence == None: if sequence == None:
sequence = np.random.randint(1, 5, bp) sequence = np.random.randint(1, 5, bp)
# the elseif here is most likely redundant # the elseif here is most likely redundant
elif len(sequence) != bp: elif len(sequence) != bp:
n = bp - len(sequence) n = bp - len(sequence)
sequence += np.random.randint(1, 5, n) sequence += np.random.randint(1, 5, n)
print >> sys.stderr, "sequence is too short, adding %d random bases" % n print( "sequence is too short, adding %d random bases" % n, file=sys.stderr)
# normalize direction # normalize direction
dir_norm = np.sqrt(np.dot(dir,dir)) dir_norm = np.sqrt(np.dot(dir,dir))
if dir_norm < 1e-10: if dir_norm < 1e-10:
print >> sys.stderr, "direction must be a valid vector, \ print( "direction must be a valid vector, defaulting to (0, 0, 1)", file=sys.stderr)
defaulting to (0, 0, 1)" dir = np.array([0, 0, 1])
dir = np.array([0, 0, 1])
else: dir /= dir_norm else: dir /= dir_norm
# find a vector orthogonal to dir to act as helix direction, # find a vector orthogonal to dir to act as helix direction,
# if not provided switch off random orientation # if not provided switch off random orientation
if perp is None or perp is False: if perp is None or perp is False:
v1 = np.random.random_sample(3) v1 = np.random.random_sample(3)
v1 -= dir * (np.dot(dir, v1)) v1 -= dir * (np.dot(dir, v1))
v1 /= np.sqrt(sum(v1*v1)) v1 /= np.sqrt(sum(v1*v1))
else: else:
v1 = perp; v1 = perp;
# generate rotational matrix representing the overall rotation of the helix # generate rotational matrix representing the overall rotation of the helix
R0 = get_rotation_matrix(dir, rot) R0 = get_rotation_matrix(dir, rot)
# rotation matrix corresponding to one step along the helix # rotation matrix corresponding to one step along the helix
R = get_rotation_matrix(dir, [1, "bp"]) R = get_rotation_matrix(dir, [1, "bp"])
# set the vector a1 (backbone to base) to v1 # set the vector a1 (backbone to base) to v1
a1 = v1 a1 = v1
# apply the global rotation to a1 # apply the global rotation to a1
a1 = np.dot(R0, a1) a1 = np.dot(R0, a1)
# set the position of the fist backbone site to start_pos # set the position of the fist backbone site to start_pos
rb = np.array(start_pos) rb = np.array(start_pos)
# set a3 to the direction of the helix # set a3 to the direction of the helix
a3 = dir a3 = dir
for i in range(bp): for i in range(bp):
# work out the position of the centre of mass of the nucleotide # work out the position of the centre of mass of the nucleotide
rcdm = rb - CM_CENTER_DS * a1 rcdm = rb - CM_CENTER_DS * a1
# append to newpositions
mynewpositions.append(rcdm)
mynewa1s.append(a1)
mynewa3s.append(a3)
# if we are not at the end of the helix, we work out a1 and rb for the
# next nucleotide along the helix
if i != bp - 1:
a1 = np.dot(R, a1)
rb += a3 * BASE_BASE
# if we are working on a double strand, we do a cycle similar # append to newpositions
mynewpositions.append(rcdm)
mynewa1s.append(a1)
mynewa3s.append(a3)
# if we are not at the end of the helix, we work out a1 and rb for the
# next nucleotide along the helix
if i != bp - 1:
a1 = np.dot(R, a1)
rb += a3 * BASE_BASE
# if we are working on a double strand, we do a cycle similar
# to the previous one but backwards # to the previous one but backwards
if double == True: if double == True:
a1 = -a1 a1 = -a1
a3 = -dir a3 = -dir
R = R.transpose() R = R.transpose()
for i in range(bp): for i in range(bp):
rcdm = rb - CM_CENTER_DS * a1 rcdm = rb - CM_CENTER_DS * a1
mynewpositions.append (rcdm) mynewpositions.append (rcdm)
mynewa1s.append (a1) mynewa1s.append (a1)
mynewa3s.append (a3) mynewa3s.append (a3)
a1 = np.dot(R, a1) a1 = np.dot(R, a1)
rb += a3 * BASE_BASE rb += a3 * BASE_BASE
assert (len (mynewpositions) > 0) assert (len (mynewpositions) > 0)
@ -391,10 +393,10 @@ def read_strands(filename):
try: try:
infile = open (filename) infile = open (filename)
except: except:
print >> sys.stderr, "Could not open file '%s'. Aborting." % filename print( "Could not open file '%s'. Aborting." % filename, file=sys.stderr )
sys.exit(2) sys.exit(2)
# This block works out the number of nucleotides and strands by reading # This block works out the number of nucleotides and strands by reading
# the number of non-empty lines in the input file and the number of letters, # the number of non-empty lines in the input file and the number of letters,
# taking the possible DOUBLE keyword into account. # taking the possible DOUBLE keyword into account.
nstrands, nnucl, nbonds = 0, 0, 0 nstrands, nnucl, nbonds = 0, 0, 0
@ -406,30 +408,29 @@ def read_strands(filename):
if line[:6] == 'DOUBLE': if line[:6] == 'DOUBLE':
line = line.split()[1] line = line.split()[1]
length = len(line) length = len(line)
print >> sys.stdout, "## Found duplex of %i base pairs" % length print( "## Found duplex of %i base pairs" % length, file=sys.stdout)
nnucl += 2*length nnucl += 2*length
nstrands += 2 nstrands += 2
nbonds += (2*length-2) nbonds += (2*length-2)
else: else:
line = line.split()[0] line = line.split()[0]
length = len(line) length = len(line)
print >> sys.stdout, \ print( "## Found single strand of %i bases" % length, file=sys.stdout)
"## Found single strand of %i bases" % length
nnucl += length nnucl += length
nstrands += 1 nstrands += 1
nbonds += length-1 nbonds += length-1
# rewind the sequence input file # rewind the sequence input file
infile.seek(0) infile.seek(0)
print >> sys.stdout, "## nstrands, nnucl = ", nstrands, nnucl print( "## nstrands, nnucl = ", nstrands, nnucl, file=sys.stdout)
# generate the data file in LAMMPS format # generate the data file in LAMMPS format
try: try:
out = open ("data.oxdna", "w") out = open ("data.oxdna", "w")
except: except:
print >> sys.stderr, "Could not open data file for writing. Aborting." print( "Could not open data file for writing. Aborting.", file=sys.stderr)
sys.exit(2) sys.exit(2)
lines = infile.readlines() lines = infile.readlines()
nlines = len(lines) nlines = len(lines)
i = 1 i = 1
@ -440,115 +441,114 @@ def read_strands(filename):
line = line.upper().strip() line = line.upper().strip()
# skip empty lines # skip empty lines
if len(line) == 0: if len(line) == 0:
i += 1 i += 1
continue continue
# block for duplexes: last argument of the generate function # block for duplexes: last argument of the generate function
# is set to 'True' # is set to 'True'
if line[:6] == 'DOUBLE': if line[:6] == 'DOUBLE':
line = line.split()[1] line = line.split()[1]
length = len(line) length = len(line)
seq = [(base_to_number[x]) for x in line] seq = [(base_to_number[x]) for x in line]
myns += 1 myns += 1
for b in xrange(length): for b in range(length):
basetype.append(seq[b]) basetype.append(seq[b])
strandnum.append(myns) strandnum.append(myns)
for b in xrange(length-1): for b in range(length-1):
bondpair = [noffset + b, noffset + b + 1] bondpair = [noffset + b, noffset + b + 1]
bonds.append(bondpair) bonds.append(bondpair)
noffset += length noffset += length
# create the sequence of the second strand as made of # create the sequence of the second strand as made of
# complementary bases # complementary bases
seq2 = [5-s for s in seq] seq2 = [5-s for s in seq]
seq2.reverse() seq2.reverse()
myns += 1 myns += 1
for b in xrange(length): for b in range(length):
basetype.append(seq2[b]) basetype.append(seq2[b])
strandnum.append(myns) strandnum.append(myns)
for b in xrange(length-1): for b in range(length-1):
bondpair = [noffset + b, noffset + b + 1] bondpair = [noffset + b, noffset + b + 1]
bonds.append(bondpair) bonds.append(bondpair)
noffset += length noffset += length
print >> sys.stdout, "## Created duplex of %i bases" % (2*length)
# generate random position of the first nucleotide print( "## Created duplex of %i bases" % (2*length), file=sys.stdout)
# generate random position of the first nucleotide
cdm = box_offset + np.random.random_sample(3) * box cdm = box_offset + np.random.random_sample(3) * box
# generate the random direction of the helix # generate the random direction of the helix
axis = np.random.random_sample(3) axis = np.random.random_sample(3)
axis /= np.sqrt(np.dot(axis, axis)) axis /= np.sqrt(np.dot(axis, axis))
# use the generate function defined above to create # use the generate function defined above to create
# the position and orientation vector of the strand # the position and orientation vector of the strand
newpositions, newa1s, newa3s = generate_strand(len(line), \ newpositions, newa1s, newa3s = generate_strand(len(line), \
sequence=seq, dir=axis, start_pos=cdm, double=True) sequence=seq, dir=axis, start_pos=cdm, double=True)
# generate a new position for the strand until it does not overlap # generate a new position for the strand until it does not overlap
# with anything already present # with anything already present
start = timer() start = timer()
while not add_strands(newpositions, newa1s, newa3s): while not add_strands(newpositions, newa1s, newa3s):
cdm = box_offset + np.random.random_sample(3) * box cdm = box_offset + np.random.random_sample(3) * box
axis = np.random.random_sample(3) axis = np.random.random_sample(3)
axis /= np.sqrt(np.dot(axis, axis)) axis /= np.sqrt(np.dot(axis, axis))
newpositions, newa1s, newa3s = generate_strand(len(line), \ newpositions, newa1s, newa3s = generate_strand(len(line), \
sequence=seq, dir=axis, start_pos=cdm, double=True) sequence=seq, dir=axis, start_pos=cdm, double=True)
print >> sys.stdout, "## Trying %i" % i print( "## Trying %i" % i, file=sys.stdout)
end = timer() end = timer()
print >> sys.stdout, "## Added duplex of %i bases (line %i/%i) in %.2fs, now at %i/%i" % \ print( "## Added duplex of %i bases (line %i/%i) in %.2fs, now at %i/%i" % \
(2*length, i, nlines, end-start, len(positions), nnucl) (2*length, i, nlines, end-start, len(positions), nnucl), file=sys.stdout)
# block for single strands: last argument of the generate function # block for single strands: last argument of the generate function
# is set to 'False' # is set to 'False'
else: else:
length = len(line) length = len(line)
seq = [(base_to_number[x]) for x in line] seq = [(base_to_number[x]) for x in line]
myns += 1 myns += 1
for b in xrange(length): for b in range(length):
basetype.append(seq[b]) basetype.append(seq[b])
strandnum.append(myns) strandnum.append(myns)
for b in xrange(length-1): for b in range(length-1):
bondpair = [noffset + b, noffset + b + 1] bondpair = [noffset + b, noffset + b + 1]
bonds.append(bondpair) bonds.append(bondpair)
noffset += length noffset += length
# generate random position of the first nucleotide # generate random position of the first nucleotide
cdm = box_offset + np.random.random_sample(3) * box cdm = box_offset + np.random.random_sample(3) * box
# generate the random direction of the helix # generate the random direction of the helix
axis = np.random.random_sample(3) axis = np.random.random_sample(3)
axis /= np.sqrt(np.dot(axis, axis)) axis /= np.sqrt(np.dot(axis, axis))
print >> sys.stdout, \ print("## Created single strand of %i bases" % length, file=sys.stdout)
"## Created single strand of %i bases" % length
newpositions, newa1s, newa3s = generate_strand(length, \ newpositions, newa1s, newa3s = generate_strand(length, \
sequence=seq, dir=axis, start_pos=cdm, double=False) sequence=seq, dir=axis, start_pos=cdm, double=False)
start = timer() start = timer()
while not add_strands(newpositions, newa1s, newa3s): while not add_strands(newpositions, newa1s, newa3s):
cdm = box_offset + np.random.random_sample(3) * box cdm = box_offset + np.random.random_sample(3) * box
axis = np.random.random_sample(3) axis = np.random.random_sample(3)
axis /= np.sqrt(np.dot(axis, axis)) axis /= np.sqrt(np.dot(axis, axis))
newpositions, newa1s, newa3s = generate_strand(length, \ newpositions, newa1s, newa3s = generate_strand(length, \
sequence=seq, dir=axis, start_pos=cdm, double=False) sequence=seq, dir=axis, start_pos=cdm, double=False)
print >> sys.stdout, "## Trying %i" % (i) print >> sys.stdout, "## Trying %i" % (i)
end = timer() end = timer()
print >> sys.stdout, "## Added single strand of %i bases (line %i/%i) in %.2fs, now at %i/%i" % \ print( "## Added single strand of %i bases (line %i/%i) in %.2fs, now at %i/%i" % \
(length, i, nlines, end-start,len(positions), nnucl) (length, i, nlines, end-start,len(positions), nnucl), file=sys.stdout)
i += 1 i += 1
# sanity check # sanity check
if not len(positions) == nnucl: if not len(positions) == nnucl:
print len(positions), nnucl print( len(positions), nnucl )
raise AssertionError raise AssertionError
out.write('# LAMMPS data file\n') out.write('# LAMMPS data file\n')
@ -580,44 +580,41 @@ def read_strands(filename):
out.write('Atoms\n') out.write('Atoms\n')
out.write('\n') out.write('\n')
for i in xrange(nnucl): for i in range(nnucl):
out.write('%d %d %22.15le %22.15le %22.15le %d 1 1\n' \ out.write('%d %d %22.15le %22.15le %22.15le %d 1 1\n' \
% (i+1, basetype[i], \ % (i+1, basetype[i], positions[i][0], positions[i][1], positions[i][2], strandnum[i]))
positions[i][0], positions[i][1], positions[i][2], \
strandnum[i]))
out.write('\n') out.write('\n')
out.write('# Atom-ID, translational, rotational velocity\n') out.write('# Atom-ID, translational, rotational velocity\n')
out.write('Velocities\n') out.write('Velocities\n')
out.write('\n') out.write('\n')
for i in xrange(nnucl): for i in range(nnucl):
out.write("%d %22.15le %22.15le %22.15le %22.15le %22.15le %22.15le\n" \ out.write("%d %22.15le %22.15le %22.15le %22.15le %22.15le %22.15le\n" \
% (i+1,0.0,0.0,0.0,0.0,0.0,0.0)) % (i+1,0.0,0.0,0.0,0.0,0.0,0.0))
out.write('\n') out.write('\n')
out.write('# Atom-ID, shape, quaternion\n') out.write('# Atom-ID, shape, quaternion\n')
out.write('Ellipsoids\n') out.write('Ellipsoids\n')
out.write('\n') out.write('\n')
for i in xrange(nnucl): for i in range(nnucl):
out.write(\ out.write("%d %22.15le %22.15le %22.15le %22.15le %22.15le %22.15le %22.15le\n" \
"%d %22.15le %22.15le %22.15le %22.15le %22.15le %22.15le %22.15le\n" \ % (i+1,1.1739845031423408,1.1739845031423408,1.1739845031423408, \
% (i+1,1.1739845031423408,1.1739845031423408,1.1739845031423408, \ quaternions[i][0],quaternions[i][1], quaternions[i][2],quaternions[i][3]))
quaternions[i][0],quaternions[i][1], quaternions[i][2],quaternions[i][3]))
out.write('\n') out.write('\n')
out.write('# Bond topology\n') out.write('# Bond topology\n')
out.write('Bonds\n') out.write('Bonds\n')
out.write('\n') out.write('\n')
for i in xrange(nbonds): for i in range(nbonds):
out.write("%d %d %d %d\n" % (i+1,1,bonds[i][0],bonds[i][1])) out.write("%d %d %d %d\n" % (i+1,1,bonds[i][0],bonds[i][1]))
out.close() out.close()
print >> sys.stdout, "## Wrote data to 'data.oxdna'" print("## Wrote data to 'data.oxdna'", file=sys.stdout)
print >> sys.stdout, "## DONE" print("## DONE", file=sys.stdout)
# call the above main() function, which executes the program # call the above main() function, which executes the program
read_strands (infile) read_strands (infile)
@ -627,4 +624,6 @@ runtime = end_time-start_time
hours = runtime/3600 hours = runtime/3600
minutes = (runtime-np.rint(hours)*3600)/60 minutes = (runtime-np.rint(hours)*3600)/60
seconds = (runtime-np.rint(hours)*3600-np.rint(minutes)*60)%60 seconds = (runtime-np.rint(hours)*3600-np.rint(minutes)*60)%60
print >> sys.stdout, "## Total runtime %ih:%im:%.2fs" % (hours,minutes,seconds) print( "## Total runtime %ih:%im:%.2fs" % (hours,minutes,seconds), file=sys.stdout)

View File

@ -1,5 +1,8 @@
# Setup tool for oxDNA input in LAMMPS format. # Setup tool for oxDNA input in LAMMPS format.
# for python2/3 compatibility
from __future__ import print_function
import math,numpy as np,sys,os import math,numpy as np,sys,os
# system size # system size
@ -250,59 +253,59 @@ def duplex_array():
qrot3=math.sin(0.5*twist) qrot3=math.sin(0.5*twist)
for letter in strand[2]: for letter in strand[2]:
temp1=[] temp1=[]
temp2=[] temp2=[]
temp1.append(nt2num[letter]) temp1.append(nt2num[letter])
temp2.append(compnt2num[letter]) temp2.append(compnt2num[letter])
temp1.append([posx1,posy1,posz1]) temp1.append([posx1,posy1,posz1])
temp2.append([posx2,posy2,posz2]) temp2.append([posx2,posy2,posz2])
vel=[0,0,0,0,0,0] vel=[0,0,0,0,0,0]
temp1.append(vel) temp1.append(vel)
temp2.append(vel) temp2.append(vel)
temp1.append(shape) temp1.append(shape)
temp2.append(shape) temp2.append(shape)
temp1.append(quat1) temp1.append(quat1)
temp2.append(quat2) temp2.append(quat2)
quat1_0 = quat1[0]*qrot0 - quat1[1]*qrot1 - quat1[2]*qrot2 - quat1[3]*qrot3 quat1_0 = quat1[0]*qrot0 - quat1[1]*qrot1 - quat1[2]*qrot2 - quat1[3]*qrot3
quat1_1 = quat1[0]*qrot1 + quat1[1]*qrot0 + quat1[2]*qrot3 - quat1[3]*qrot2 quat1_1 = quat1[0]*qrot1 + quat1[1]*qrot0 + quat1[2]*qrot3 - quat1[3]*qrot2
quat1_2 = quat1[0]*qrot2 + quat1[2]*qrot0 + quat1[3]*qrot1 - quat1[1]*qrot3 quat1_2 = quat1[0]*qrot2 + quat1[2]*qrot0 + quat1[3]*qrot1 - quat1[1]*qrot3
quat1_3 = quat1[0]*qrot3 + quat1[3]*qrot0 + quat1[1]*qrot2 + quat1[2]*qrot1 quat1_3 = quat1[0]*qrot3 + quat1[3]*qrot0 + quat1[1]*qrot2 + quat1[2]*qrot1
quat1 = [quat1_0,quat1_1,quat1_2,quat1_3] quat1 = [quat1_0,quat1_1,quat1_2,quat1_3]
posx1=axisx - dcomh*(quat1[0]**2+quat1[1]**2-quat1[2]**2-quat1[3]**2) posx1=axisx - dcomh*(quat1[0]**2+quat1[1]**2-quat1[2]**2-quat1[3]**2)
posy1=axisy - dcomh*(2*(quat1[1]*quat1[2]+quat1[0]*quat1[3])) posy1=axisy - dcomh*(2*(quat1[1]*quat1[2]+quat1[0]*quat1[3]))
posz1=posz1+risez posz1=posz1+risez
quat2_0 = quat2[0]*qrot0 - quat2[1]*qrot1 - quat2[2]*qrot2 + quat2[3]*qrot3 quat2_0 = quat2[0]*qrot0 - quat2[1]*qrot1 - quat2[2]*qrot2 + quat2[3]*qrot3
quat2_1 = quat2[0]*qrot1 + quat2[1]*qrot0 - quat2[2]*qrot3 - quat2[3]*qrot2 quat2_1 = quat2[0]*qrot1 + quat2[1]*qrot0 - quat2[2]*qrot3 - quat2[3]*qrot2
quat2_2 = quat2[0]*qrot2 + quat2[2]*qrot0 + quat2[3]*qrot1 + quat2[1]*qrot3 quat2_2 = quat2[0]*qrot2 + quat2[2]*qrot0 + quat2[3]*qrot1 + quat2[1]*qrot3
quat2_3 =-quat2[0]*qrot3 + quat2[3]*qrot0 + quat2[1]*qrot2 + quat2[2]*qrot1 quat2_3 =-quat2[0]*qrot3 + quat2[3]*qrot0 + quat2[1]*qrot2 + quat2[2]*qrot1
quat2 = [quat2_0,quat2_1,quat2_2,quat2_3] quat2 = [quat2_0,quat2_1,quat2_2,quat2_3]
posx2=axisx + dcomh*(quat1[0]**2+quat1[1]**2-quat1[2]**2-quat1[3]**2) posx2=axisx + dcomh*(quat1[0]**2+quat1[1]**2-quat1[2]**2-quat1[3]**2)
posy2=axisy + dcomh*(2*(quat1[1]*quat1[2]+quat1[0]*quat1[3])) posy2=axisy + dcomh*(2*(quat1[1]*quat1[2]+quat1[0]*quat1[3]))
posz2=posz1 posz2=posz1
if (len(nucleotide)+1 > strandstart): if (len(nucleotide)+1 > strandstart):
topology.append([1,len(nucleotide),len(nucleotide)+1]) topology.append([1,len(nucleotide),len(nucleotide)+1])
comptopo.append([1,len(nucleotide)+len(strand[2]),len(nucleotide)+len(strand[2])+1]) comptopo.append([1,len(nucleotide)+len(strand[2]),len(nucleotide)+len(strand[2])+1])
nucleotide.append(temp1) nucleotide.append(temp1)
compstrand.append(temp2) compstrand.append(temp2)
for ib in range(len(compstrand)): for ib in range(len(compstrand)):
nucleotide.append(compstrand[len(compstrand)-1-ib]) nucleotide.append(compstrand[len(compstrand)-1-ib])
for ib in range(len(comptopo)): for ib in range(len(comptopo)):
topology.append(comptopo[ib]) topology.append(comptopo[ib])
return return

View File

@ -457,9 +457,9 @@ mass *4 ${wheel_mass}
variable dx equal 1.0 variable dx equal 1.0
variable density equal 0.001184 variable density equal 0.001184
neighbor 0.5 bin neighbor 0.5 bin
neigh_modify delay 0 every 1 check yes neigh_modify delay 0 every 1 check yes
comm_modify cutoff 3.0 comm_modify cutoff 3.0
pair_style lj/cut 1.2 pair_style lj/cut 1.2
pair_coeff * * 0.0 0.0 pair_coeff * * 0.0 0.0
@ -474,7 +474,7 @@ reset_timestep 0
#variable node_force equal "v_total_force / 178" #variable node_force equal "v_total_force / 178"
#fix drag all addforce 0.0 0.0 0.0 #fix drag all addforce 0.0 0.0 0.0
velocity all set 0.0 -7.5.0 0.0 units box velocity all set 0.0 -7.5 0.0 units box
# viscosity of air is 0.0001847 # viscosity of air is 0.0001847

View File

@ -39,7 +39,7 @@ InstallDir "$LOCALAPPDATA\${PACEPLUGIN}"
ShowInstDetails show ShowInstDetails show
ShowUninstDetails show ShowUninstDetails show
SetCompressor lzma SetCompressor zlib
!define MUI_ABORTWARNING !define MUI_ABORTWARNING

View File

@ -0,0 +1,59 @@
# -*- CMake -*- build system for plugin examples.
# The is meant to be used as a template for plugins that are
# distributed independent from the LAMMPS package.
##########################################
cmake_minimum_required(VERSION 3.16)
project(plumedplugin VERSION 1.0 LANGUAGES CXX)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
include(CheckIncludeFileCXX)
include(LAMMPSInterfacePlugin)
include(PLUMED)
##########################
# building the plugins
add_library(plumedplugin MODULE plumedplugin.cpp ${LAMMPS_SOURCE_DIR}/PLUMED/fix_plumed.cpp)
target_link_libraries(plumedplugin PRIVATE LAMMPS::PLUMED)
target_link_libraries(plumedplugin PRIVATE lammps)
target_include_directories(plumedplugin PRIVATE ${LAMMPS_SOURCE_DIR}/PLUMED)
set_target_properties(plumedplugin PROPERTIES PREFIX "" SUFFIX ".so")
# MacOS seems to need this
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set_target_properties(plumedplugin PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
# tell CMake to export all symbols to a .dll on Windows with special case for MinGW cross-compilers
set_target_properties(plumedplugin PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
if(CMAKE_CROSSCOMPILING)
set_target_properties(plumedplugin PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols")
endif()
get_lammps_version(${LAMMPS_SOURCE_DIR}/version.h LAMMPS_VERSION)
find_program(MAKENSIS_PATH makensis)
if(MAKENSIS_PATH)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/lammps.ico
${CMAKE_SOURCE_DIR}/lammps-text-logo-wide.bmp ${CMAKE_SOURCE_DIR}/plumedplugin.nsis
${CMAKE_BINARY_DIR})
if(BUILD_MPI)
if(USE_MSMPI)
add_custom_target(package ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MSMPI plumedplugin.nsis
DEPENDS plumedplugin plumed_copy lammps.ico lammps-text-logo-wide.bmp plumedplugin.nsis
BYPRODUCTS LAMMPS-PLUMED-plugin-${LAMMPS_VERSION}-MSMPI.exe)
else()
add_custom_target(package ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION}-MPI plumedplugin.nsis
DEPENDS plumedplugin plumed_copy lammps.ico lammps-text-logo-wide.bmp plumedplugin.nsis
BYPRODUCTS LAMMPS-PLUMED-plugin-${LAMMPS_VERSION}-MPI.exe)
endif()
else()
add_custom_target(package ${MAKENSIS_PATH} -V1 -DVERSION=${LAMMPS_VERSION} plumedplugin.nsis
COMMAND ${CMAKE_COMMAND} -E echo ${PWD}
DEPENDS plumedplugin plumed_copy lammps.ico lammps-text-logo-wide.bmp plumedplugin.nsis
BYPRODUCTS LAMMPS-PLUMED-plugin-${LAMMPS_VERSION}.exe)
endif()
endif()
else()
set_target_properties(plumedplugin PROPERTIES LINK_FLAGS "-rdynamic")
endif()

View File

@ -0,0 +1 @@
../../../../cmake/Modules/LAMMPSInterfacePlugin.cmake

View File

@ -0,0 +1 @@
../../../../cmake/Modules/Packages/PLUMED.cmake

View File

@ -0,0 +1,2 @@
This folder contains a loader and support files to build the PLUMED package as plugin.
For more information please see: https://docs.lammps.org/Developer_plugins.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

View File

@ -0,0 +1,28 @@
#include "lammpsplugin.h"
#include "version.h"
#include "fix_plumed.h"
using namespace LAMMPS_NS;
static Fix *fix_plumed_creator(LAMMPS *lmp, int argc, char **argv)
{
return new FixPlumed(lmp, argc, argv);
}
extern "C" void lammpsplugin_init(void *lmp, void *handle, void *regfunc)
{
lammpsplugin_t plugin;
lammpsplugin_regfunc register_plugin = (lammpsplugin_regfunc) regfunc;
// register plumed fix style
plugin.version = LAMMPS_VERSION;
plugin.style = "fix";
plugin.name = "plumed";
plugin.info = "Plumed2 plugin fix style v1.0";
plugin.author = "Axel Kohlmeyer (akohlmey@gmail.com)";
plugin.creator.v1 = (lammpsplugin_factory1 *) &fix_plumed_creator;
plugin.handle = handle;
(*register_plugin)(&plugin, lmp);
}

View File

@ -0,0 +1,172 @@
#!Nsis Installer Command Script
#
# The following external defines are recognized:
# ${VERSION} = YYYYMMDD
!include "MUI2.nsh"
!include "FileFunc.nsh"
!define MUI_ICON "lammps.ico"
!define MUI_UNICON "lammps.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "lammps-text-logo-wide.bmp"
!define MUI_HEADERIMAGE_RIGHT
Unicode true
XPStyle on
!include "LogicLib.nsh"
!addplugindir "envvar/Plugins/x86-unicode"
!include "x64.nsh"
RequestExecutionLevel user
!macro VerifyUserIsAdmin
UserInfo::GetAccountType
pop $0
${If} $0 != "admin"
messageBox mb_iconstop "Administrator rights required!"
setErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
quit
${EndIf}
!macroend
!define PLUMEDPLUGIN "LAMMPS PLUMED Plugin ${VERSION}"
OutFile "LAMMPS-PLUMED-plugin-${VERSION}.exe"
Name "${PLUMEDPLUGIN}"
InstallDir "$LOCALAPPDATA\${PLUMEDPLUGIN}"
ShowInstDetails show
ShowUninstDetails show
SetCompressor zlib
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
function .onInit
# Determine if LAMMPS was already installed and check whether it was in 32-bit
# or 64-bit. Then look up path to uninstaller and offer to uninstall or quit
SetRegView 32
ReadRegDWORD $0 HKCU "Software\LAMMPS-PLUMED" "Bits"
SetRegView LastUsed
${If} $0 == "32"
SetRegView 32
${ElseIf} $0 == "64"
SetRegView 64
${Else}
SetRegView 64
${EndIf}
ClearErrors
ReadRegStr $R0 HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" "UninstallString"
SetRegView LastUsed
${If} ${Errors}
DetailPrint "LAMMPS PLUMED plugin not (yet) installed"
${Else}
MessageBox MB_YESNO "LAMMPS PLUMED plugin ($0 bit) is already installed. Uninstall existing version?" /SD IDYES IDNO Quit
Pop $R1
StrCmp $R1 2 Quit +1
Exec $R0
Quit:
Quit
${EndIf}
setShellVarContext all
functionEnd
Section "${PLUMEDPLUGIN}" SecPlumedplugin
SectionIn RO
# Write LAMMPS installation bitness marker. Always use 32-bit registry view
SetRegView 32
IntFmt $0 "0x%08X" 64
WriteRegDWORD HKCU "Software\LAMMPS-PLUMED" "Bits" $0
# Switch to "native" registry view
SetRegView 64
SetShellVarContext current
SetOutPath "$INSTDIR"
CreateDirectory "$INSTDIR\patches"
CreateDirectory "$INSTDIR\bin"
File lammps.ico
File plumedplugin.so
SetOutPath "$INSTDIR\bin"
File plumed.exe
# Register Application and its uninstaller
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" \
"DisplayName" "${PLUMEDPLUGIN}"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" \
"Publisher" "The LAMMPS and PLUMED Developers"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" \
"URLInfoAbout" "lammps.org"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" \
"DisplayIcon" "$INSTDIR\lammps.ico"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" \
"DisplayVersion" "${VERSION}"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" \
"InstallLocation" "$INSTDIR"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" \
"UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" \
"QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
IntFmt $0 "0x%08X" $0
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED" \
"EstimatedSize" "$0"
# update path variables
EnVar::SetHKCU
# add plumed executable path
EnVar::AddValue "PATH" "$INSTDIR\bin"
# add to LAMMPS plugin search path
EnVar::AddValue "LAMMPS_PLUGIN_PATH" "$INSTDIR"
# add plumed2 patch files
EnVar::AddValue "PLUMED_ROOT" "$INSTDIR"
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
function un.onInit
SetShellVarContext current
functionEnd
Section "Uninstall"
# remove LAMMPS bitness/installation indicator always in 32-bit registry view
SetRegView 32
DeleteRegKey HKCU "Software\LAMMPS-PLUMED"
# unregister extension, and uninstall info
SetRegView 64
SetShellVarContext current
# unregister installation
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\LAMMPS-PLUMED"
# update path variables
EnVar::SetHKCU
# remove plumed executable path
EnVar::DeleteValue "PATH" "$INSTDIR\bin"
# remove entry from LAMMPS plugin search path
EnVar::DeleteValue "LAMMPS_PLUGIN_PATH" "$INSTDIR"
# remove plumed patch environment
EnVar::Delete "PLUMED_ROOT"
RMDir /r /REBOOTOK "$INSTDIR\patches"
RMDir /r /REBOOTOK "$INSTDIR\bin"
Delete /REBOOTOK "$INSTDIR\plumedplugin.so"
Delete /REBOOTOK "$INSTDIR\Uninstall.exe"
Delete /REBOOTOK "$INSTDIR\lammps.ico"
RMDir /REBOOTOK "$INSTDIR"
SectionEnd
# Local Variables:
# mode: sh
# End:

View File

@ -1,30 +0,0 @@
bkgd_dyn = 1
emb_lin_neg = 1
augt1=0
ialloy=1
rc = 5.9
#H
attrac(1,1)=0.460
repuls(1,1)=0.460
Cmin(1,1,1)=1.3 # PuMS
Cmax(1,1,1)= 2.80
nn2(1,1)=1
#Ga
rho0(2) = 0.6
attrac(2,2)=0.097
repuls(2,2)=0.097
nn2(2,2)=1
#HGa
attrac(1,2)=0.300
repuls(1,2)=0.300
lattce(1,2)=l12
re(1,2)=3.19
delta(1,2)=-0.48
alpha(1,2)=6.6
Cmin(1,1,2)=2.0
Cmin(2,1,2)= 2.0
Cmin(1,2,1)=2.0
Cmin(2,2,1) = 1.4
Cmin(1,2,2) = 1.4
Cmin(1,1,2) = 1.4
nn2(1,2)=1

View File

@ -0,0 +1 @@
../../../potentials/HGa.msmeam

View File

@ -1,25 +0,0 @@
LAMMPS data file via write_data, version 16 Feb 2016, timestep = 1
3 atoms
2 atom types
-4.0000000000000000e+00 4.0000000000000000e+00 xlo xhi
-4.0000000000000000e+00 4.0000000000000000e+00 ylo yhi
-4.0000000000000000e+00 4.0000000000000000e+00 zlo zhi
Masses
1 1.0079
2 69.723
Atoms # atomic
1 1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0
2 2 2.2000000000000002e+00 0.0000000000000000e+00 0.0000000000000000e+00 0 0 0
3 2 2.9999999999999999e-01 2.2999999999999998e+00 0.0000000000000000e+00 0 0 0
Velocities
1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
2 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00
3 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00

View File

@ -1,5 +1,3 @@
echo both
log log.msmeam
# Test of MEAM potential for HGa # Test of MEAM potential for HGa
# ------------------------ INITIALIZATION ---------------------------- # ------------------------ INITIALIZATION ----------------------------
@ -21,11 +19,11 @@ create_atoms 1 single 0 0 0 units box
create_atoms 2 single 2.2 0 0 units box create_atoms 2 single 2.2 0 0 units box
create_atoms 2 single 0.3 2.3 0 units box create_atoms 2 single 0.3 2.3 0 units box
# ---------- Define Settings --------------------- # ---------- Define Settings ---------------------
variable teng equal "c_eatoms" variable teng equal "c_eatoms"
compute pot_energy all pe/atom compute pot_energy all pe/atom
compute stress all stress/atom NULL compute stress all stress/atom NULL
dump 1 all custom 1 dump.msmeam id x y z fx fy fz c_pot_energy c_stress[1] c_stress[2] c_stress[3] c_stress[4] c_stress[5] c_stress[6] dump 1 all custom 1 dump.msmeam id x y z fx fy fz c_pot_energy c_stress[1] c_stress[2] c_stress[3] c_stress[4] c_stress[5] c_stress[6]
run 1 run 1
write_data data.msmeam #write_data data.msmeam
print "All done!" print "All done!"

View File

@ -1,14 +0,0 @@
# DATE: 2018-09-22 UNITS: metal CONTRIBUTOR: Steve Valone, smv@lanl.gov CITATION: Baskes, PRB 1992; smv, sr, mib, JNM 2010
# ms-meam data format May 2010
# elt lat z ielement atwt
# alpha b0 b1 b2 b3 b1m b2m b3m alat esub asub
# - t0 t1 t2 t3 t1m t2m t3m rozero ibar
# NOTE: leading character cannot be a space
'H' 'dim' 1.0 1 1.0079
2.960 2.960 3.0 1.0 1.0 1.0 3.0 1.0 0.741 2.235 2.50
1.0 0.44721 0.0 0.00 0.0 0.31623 0 6.70 0
'Ga4' 'fcc' 12.0 31 69.723
4.42 4.80 3.10 6.00 0.00 0.0 0.0 0.5 4.247 2.897 0.97
1.0 1.649 1.435 0.00 0.0 0.0 2.0 0.70 0

View File

@ -0,0 +1 @@
../../../potentials/library.msmeam

View File

@ -0,0 +1,126 @@
LAMMPS (7 Feb 2024 - Development - patch_7Feb2024_update1-182-g93942f2013-modified)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:98)
using 1 OpenMP thread(s) per MPI task
# Test of MEAM potential for HGa
# ------------------------ INITIALIZATION ----------------------------
units metal
dimension 3
boundary p p p
atom_style atomic
variable latparam equal 4.646
variable ncell equal 3
# ----------------------- ATOM DEFINITION ----------------------------
region box block -4 4 -4 4 -4 4
create_box 2 box
Created orthogonal box = (-4 -4 -4) to (4 4 4)
1 by 1 by 1 MPI processor grid
#
include potential.mod
# NOTE: This script can be modified for different pair styles
# See in.elastic for more info.
variable Pu string H
print "potential chosen ${Pu}"
potential chosen H
# Choose potential
pair_style meam/ms
print "we just executed"
we just executed
pair_coeff * * library.msmeam ${Pu} Ga4 HGa.msmeam ${Pu} Ga4
pair_coeff * * library.msmeam H Ga4 HGa.msmeam ${Pu} Ga4
pair_coeff * * library.msmeam H Ga4 HGa.msmeam H Ga4
Reading MEAM library file library.msmeam with DATE: 2018-09-22
# Setup neighbor style
neighbor 1.0 bin
neigh_modify once no every 1 delay 0 check yes
# Setup minimization style
variable dmax equal 1.0e-2
min_style cg
min_modify dmax ${dmax} line quadratic
min_modify dmax 0.01 line quadratic
compute eng all pe/atom
compute eatoms all reduce sum c_eng
# Setup output
thermo 100
thermo_style custom step temp etotal press pxx pyy pzz pxy pxz pyz lx ly lz vol c_eatoms
thermo_modify norm yes
create_atoms 1 single 0 0 0 units box
Created 1 atoms
using box units in orthogonal box = (-4 -4 -4) to (4 4 4)
create_atoms CPU = 0.000 seconds
create_atoms 2 single 2.2 0 0 units box
Created 1 atoms
using box units in orthogonal box = (-4 -4 -4) to (4 4 4)
create_atoms CPU = 0.000 seconds
create_atoms 2 single 0.3 2.3 0 units box
Created 1 atoms
using box units in orthogonal box = (-4 -4 -4) to (4 4 4)
create_atoms CPU = 0.000 seconds
# ---------- Define Settings ---------------------
variable teng equal "c_eatoms"
compute pot_energy all pe/atom
compute stress all stress/atom NULL
# dump 1 all custom 1 dump.msmeam id x y z fx fy fz c_pot_energy c_stress[1] c_stress[2] c_stress[3] c_stress[4] c_stress[5] c_stress[6]
run 1
WARNING: No fixes with time integration, atoms won't move (src/verlet.cpp:60)
Neighbor list info ...
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 6.9
ghost atom cutoff = 6.9
binsize = 3.45, bins = 3 3 3
2 neighbor lists, perpetual/occasional/extra = 2 0 0
(1) pair meam/ms, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
(2) pair meam/ms, perpetual, half/full from (1)
attributes: half, newton on
pair build: halffull/newton
stencil: none
bin: none
Per MPI rank memory allocation (min/avg/max) = 8.587 | 8.587 | 8.587 Mbytes
Step Temp TotEng Press Pxx Pyy Pzz Pxy Pxz Pyz Lx Ly Lz Volume c_eatoms
0 0 15.433079 491354.7 838670.96 635393.15 0 80195.797 0 0 8 8 8 512 15.433079
1 0 15.433079 491354.7 838670.96 635393.15 0 80195.797 0 0 8 8 8 512 15.433079
Loop time of 4.4446e-05 on 1 procs for 1 steps with 3 atoms
Performance: 1943.932 ns/day, 0.012 hours/ns, 22499.213 timesteps/s, 67.498 katom-step/s
31.5% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 2.9908e-05 | 2.9908e-05 | 2.9908e-05 | 0.0 | 67.29
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 1.033e-06 | 1.033e-06 | 1.033e-06 | 0.0 | 2.32
Output | 9.347e-06 | 9.347e-06 | 9.347e-06 | 0.0 | 21.03
Modify | 2.02e-07 | 2.02e-07 | 2.02e-07 | 0.0 | 0.45
Other | | 3.956e-06 | | | 8.90
Nlocal: 3 ave 3 max 3 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 78 ave 78 max 78 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 7 ave 7 max 7 min
Histogram: 1 0 0 0 0 0 0 0 0 0
FullNghs: 14 ave 14 max 14 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 14
Ave neighs/atom = 4.6666667
Neighbor list builds = 0
Dangerous builds = 0
#write_data data.msmeam
print "All done!"
All done!
Total wall time: 0:00:00

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