Compare commits

..

201 Commits

Author SHA1 Message Date
39df9f5d94 patch 23Oct17 2017-10-23 16:07:21 -06:00
68d04119d3 Merge pull request #707 from akohlmey/granular-omp-refactor
Updated neighbor list history processing for USER-OMP
2017-10-23 13:35:43 -06:00
0148c2ac81 updated neighbor list history processing for USER-OMP 2017-10-23 14:12:19 -04:00
a7ad12491f Merge pull request #706 from lammps/doc-cs
update to doc pages for new coreshell pair styles
2017-10-21 16:12:23 -06:00
2137be3219 update to doc pages for new coreshell pair styles 2017-10-21 15:50:27 -06:00
ce78f6943d Merge pull request #705 from akohlmey/fix_rigid_bugfix
fix segfault bug in fix rigid/small found by regression testing
2017-10-20 17:01:50 -06:00
998aedc6c1 Merge pull request #670 from vishalkenchan/pair_style/coul_wolf_cs
add coul/wolf/cs and born/coul/wolf/cs pair styles for CORESHELL package
2017-10-20 16:09:33 -06:00
0a02c3c78c fix segfault bug for in fix rigid/small found by regression testing 2017-10-20 16:56:06 -04:00
aaf5e87c84 Merge pull request #703 from akohlmey/custom-rigid-body-generation
Allow rigid body generation from custom properties
2017-10-20 14:08:15 -06:00
2d0f5e277c Merge pull request #704 from akohlmey/bond-gromos-bugfix
Compute energy correctly for bond style gromos
2017-10-20 14:06:35 -06:00
260bbc6f9f Merge pull request #702 from giacomofiorin/colvars-fix-the-fix
Fix a Colvars error that was hidden by the previous segfault
2017-10-20 14:06:15 -06:00
6b34a30528 compute energy correctly for bond style gromos 2017-10-20 14:53:22 -04:00
83c7d3a1d2 update fix rigid documentation 2017-10-20 14:18:50 -04:00
961b976374 add/correct code to define rigid bodies with atomstyle/atomfile variables and via custom per-atom properties 2017-10-20 13:56:09 -04:00
ac6434e496 add input examples for custom rigid body definition 2017-10-20 13:54:45 -04:00
f479f02589 Fix a Colvars error that was hidden by the previous segfault 2017-10-20 13:41:31 -04:00
e284545c5b added some documentation and reference example 2017-10-20 12:03:22 +02:00
e368acdaeb Merge pull request #700 from giacomofiorin/colvars-fix
Import segfault fix in Colvars module
2017-10-19 11:45:36 -06:00
6e7504f153 Import segfault fix in Colvars module 2017-10-19 08:09:44 -04:00
71c4edda51 add coul/wolf/cs and born/coul/wolf/cs pair styles for CORESHELL package 2017-10-19 13:21:13 +02:00
40147a7a64 Merge pull request #699 from lammps/doc-update2
cross ref fix deform and new fix nvt/uef in doc pages
2017-10-18 16:44:18 -06:00
f709a723cd cross ref fix deform and new fix nvt/uef 2017-10-18 15:26:15 -06:00
6dd55e49cb Merge pull request #698 from lammps/doc-update
small updates to recently added docs and rename of an example dir
2017-10-18 15:24:54 -06:00
281b1dc375 small updates to recently added docs and rename of an example dir 2017-10-18 14:56:47 -06:00
e93f8f8889 Merge pull request #671 from danicholson/user-uef
USER-UEF package for extensional flow
2017-10-18 13:38:56 -06:00
35f2cfa0bf Merge pull request #669 from urpedersen/master
fix rhok - biasing long-range order
2017-10-18 13:31:15 -06:00
e44196c011 Merge pull request #694 from akohlmey/bond-gromos
Add gromos bond style
2017-10-18 13:27:15 -06:00
2fe1d1b904 Merge pull request #697 from andeplane/fix_heat_bug
Avoid checking region when not specified
2017-10-18 13:26:19 -06:00
b1b4a52b14 Merge pull request #695 from timattox/USER-DPD_small_updates
USER-DPD small updates
2017-10-18 13:25:48 -06:00
382de50341 Merge pull request #696 from wmbrownIntel/intel-update-oct17
Bug fix for unexpected case where a Intel bonded style is specified but there are no types
2017-10-18 13:25:07 -06:00
7dfc6b7eab Merge pull request #688 from lammps/history
refactoring of neighbor history
2017-10-18 13:24:36 -06:00
19eb5d3897 Avoid checking region when not specified 2017-10-18 18:05:34 +02:00
17c17ac409 update multi-threaded neighbor list build for neighbor list refactor 2017-10-18 11:25:15 -04:00
39ededd46c update respa/omp integrator style for neighbor list refactor 2017-10-18 11:24:44 -04:00
2c7528811d update several pair styles to be compliant with refactored respa lists data structures 2017-10-18 11:24:12 -04:00
0966e14e73 more changes to rRESPA neighbor lists 2017-10-17 17:33:01 -06:00
bb141aaae0 USER-INTEL: Bug fix for case where a bond/angle/dihedral/improper style is specified, but there are no bond/... types and therefore no allocation. 2017-10-16 22:51:56 -07:00
374d619769 add gromos bond style 2017-10-16 14:57:12 -04:00
59de1a71c8 Merge branch 'history' of github.com:lammps/lammps into history 2017-10-16 14:37:30 -04:00
4c6779cb0d USER-DPD Kokkos: propagate the new neigh_modify options from efaa4c67
Propogate the efaa4c67 changes to npair_ssa_kokkos from npair_kokkos that
support the new neigh_modify exclude molecule/intra and /inter options.
Note: npair_ssa_kokkos could inherit from npair_kokkos to avoid this kind
of missed change. Unfortunately, inheritance from templated classes is
both tricky and messy, and not worth the complexity in this case, IMHO.
2017-10-16 13:37:27 -05:00
5fb5f70ec6 update USER-OMP code for shear history neighbor refactoring 2017-10-16 14:37:20 -04:00
b0bba1976b USER-DPD: remove unused coord2bin() variants, and add ISFINITE checks 2017-10-16 13:36:44 -05:00
f8f13d929f Merge pull request #693 from giacomofiorin/colvars-update
Update Colvars to version 2017-10-11
2017-10-13 17:25:06 -06:00
3e89b270fd Update Colvars to version 2017-10-11
Notable features are the umbrella-integration based free energy estimator for
eABF, and the traditional thermodynamic integration estimator now available
for umbrella sampling, SMD, metadynamics.  Also included are several small fixes.

Below is a list of relevant commits in the Colvars repository since the last update.

321d06a 2017-10-10 Add macros to manage colvarscript commands [Giacomo Fiorin]
26c3bec 2017-10-09 Document coming availability of Lepton in LAMMPS [Giacomo Fiorin]
cc8f249 2017-10-04 Clarify that SMP depends on code build [Giacomo Fiorin]
0b2ffac 2017-10-04 Summarize colvar definition options, clarify some details [Giacomo Fiorin]
28002e0 2017-10-01 Separate writing of restart file from other output (e.g. PMFs) [Giacomo Fiorin]
92f7c1d 2017-10-01 Deprecate colvarsTrajAppend [Giacomo Fiorin]
12a707f 2017-09-26 Accurate Jacobian calculation for RMSD variants [Jérôme Hénin]
fe389c9 2017-09-21 Allow subtractAppliedForce with extended-L again [Jérôme Hénin]
c050ce0 2017-09-18 Silence compiler warnings, remove Tabs [Giacomo Fiorin]
cb41905 2017-01-11 Add base class for TI estimator in other biases than ABF [Giacomo Fiorin]
a1bc676 2017-09-14 Avoid writing to unopened traj file [Jérôme Hénin]
b58d8cd 2017-09-08 Function to check for overlapping groups [Jérôme Hénin]
1e5efec 2017-09-07 Check for overlapping groups in coordNum [Jérôme Hénin]
03a61a4 2017-04-06 Add UI-based estimator [fhh2626]
ae43754 2017-08-17 Fix outputCenters parsing [Josh Vermaas]
1619e0e 2017-08-14 Delete static feature arrays in cvm destructor [Jérôme Hénin]
2017-10-13 13:45:10 -04:00
f6ddc8c7c9 Fix compile errors from neigh history refactor 2017-10-13 10:49:31 -06:00
a973c65d67 Merge pull request #691 from akohlmey/collected-fixes
Collected small changes for next patch
2017-10-13 09:50:03 -06:00
1a200588bd Merge pull request #689 from rbberger/pylammps_autocomplete_fix
Limit IPython autocomplete to known commands and properties
2017-10-13 09:49:03 -06:00
18ca2292c2 Merge pull request #686 from giacomofiorin/lepton-library
Add Lepton library within lib/colvars
2017-10-13 09:48:42 -06:00
d3ef4bd594 Merge pull request #685 from ellio167/kim-api-v1.9.2
Update lib/kim for kim-api-v1.9.2
2017-10-13 09:48:16 -06:00
3df9caf435 drop const qualifier to allow bracketing of lookup index 2017-10-13 10:29:49 -04:00
fa2e5ac2d9 handle lookup exceptions consistently across energy and energy+force lookup in bond/angle style table 2017-10-13 10:13:34 -04:00
b7c7492608 handle invalid lookup for bond/angle tabulation 2017-10-13 09:50:56 -04:00
cee94da85e bugfix. avoiding operating on uninitialize data. closes #690 2017-10-13 00:15:15 -04:00
45aa7de171 Limit IPython autocomplete to known commands and properties 2017-10-12 14:43:17 -04:00
53aa92cfaf add support for neighbor list history refactoring in USER-OMP part 2 2017-10-11 10:30:29 -04:00
7e35042c42 add support for neighbor list history refactoring in USER-OMP part 1 2017-10-11 10:29:41 -04:00
01051e4cb1 refactoring of neighbor history 2017-10-10 16:53:51 -06:00
d90aad887e Add Lepton library within lib/colvars 2017-10-09 15:25:43 -04:00
775a15b9da Update lib/kim for kim-api-v1.9.2 2017-10-09 14:06:30 -05:00
93c9a92743 Merge pull request #684 from irisTa56/bugfix-in-domain.cpp
Bugfix for checking image flags
2017-10-09 08:30:48 -06:00
14dc1c698c Merge pull request #683 from wmbrownIntel/pppm_intel_fix
Fixing bug in pppm/intel for AVX-512 with single precision and ik diff.
2017-10-09 08:29:52 -06:00
a1f5693fe0 Merge pull request #681 from lammps/dump-modify
remove dependence of dump modify 'at' and 'append'
2017-10-09 08:29:12 -06:00
534b7adde4 Bugfix for checking image flags 2017-10-09 21:29:07 +09:00
02646100e9 correct handling of "at" keyword for netcdf dumps as suggested by @pastewka in PR #681 review 2017-10-09 07:49:29 -04:00
7e58f084d2 Fixing bug in pppm/intel for AVX-512 with single precision and ik diff.
This commit simplifies the code by eliminating packing optimizations that were slower
under typical parameters and had some memory bugs.
2017-10-08 08:33:07 -07:00
0f5d7dcc0f cmake: added USER-UEF 2017-10-07 12:38:41 -06:00
b6187173e6 Merge branch 'master' into HEAD 2017-10-07 12:35:51 -06:00
88a33edb50 Merge pull request #680 from lammps/map-yes
add atom_modify map yes, also timers to create_atoms and replicate
2017-10-06 17:43:52 -06:00
6820db99e2 avoid merge conflict 2017-10-06 14:41:38 -04:00
58e1969de2 rename misleading "CPU time" into "Time spent" 2017-10-06 14:34:10 -04:00
e91e505fb3 remove dependence of dump modify 'at' and 'append' 2017-10-06 09:44:29 -06:00
f7cbdcf995 Merge pull request #673 from pastewka/17_dump_nc2
Multi file support for NetCDF dump style
2017-10-06 09:14:12 -06:00
4cfa88b70f Merge pull request #674 from wmbrownIntel/user-intel-update
Mike Brown has added DPD to the USER-INTEL package with speedups over 3X for Xeon Phi and over 1.7X for some Xeon processors.
2017-10-06 09:12:39 -06:00
352a20fc1c DOC: Updated doc to separate description of 'append' and 'at' keywords. 2017-10-06 16:38:15 +02:00
dc0e20947e MAINT: Return error when 'at' keyword is used without 'append yes'. 2017-10-06 16:37:52 +02:00
05847a0e87 Merge branch 'master' into user-intel-update 2017-10-06 10:18:38 -04:00
439c2fd980 Merge pull request #677 from stanmoore1/kk_update
Update to Kokkos r2.04.04 and add workaround for performance regression
2017-10-05 17:10:00 -06:00
15853a0e38 Merge pull request #676 from stanmoore1/kokkos_reverse_comm
Add Kokkos threaded reverse communication
2017-10-05 17:08:49 -06:00
bd17ee5df7 Merge pull request #675 from wesbarnett/master
cmake: Add -restrict for Intel compilers
2017-10-05 17:08:35 -06:00
a9b7ff1154 Merge pull request #679 from stanmoore1/kk_reax_comm
ReaxC optimizations
2017-10-05 17:08:17 -06:00
0dd7ba26c0 Merge pull request #672 from akohlmey/phana-w-tricubic
Streamline compilation of "phana" tool for fix phonon
2017-10-05 17:01:37 -06:00
7a90eef527 Merge pull request #668 from ovilab/modify_deallocation_fix
Fixed proper deletion of fixes if fix is NULL
2017-10-05 17:00:10 -06:00
5d0626e50e Merge pull request #665 from akohlmey/collected-small-fixes
Collected small fixes
2017-10-05 16:58:49 -06:00
4b7ca0383a Merge pull request #664 from timattox/kokkos_atom2bin
Kokkos atom2bin
2017-10-05 16:58:16 -06:00
0ed987dc61 Merge pull request #663 from jdevemy/master
Authorize hybrid/overlay for fix srp
2017-10-05 16:56:20 -06:00
55a3fdca80 Merge pull request #660 from junghans/latte_fix
cmake: fix build with system latte
2017-10-05 16:55:22 -06:00
214c0cfb2b add atom_modify map yes, also timers to create_atoms and replicate 2017-10-05 16:44:24 -06:00
e0efdd50fa Switch to classic comm if ghost_velocity. The check_forward and check_reverse tests aren't necessary because the fix/pair/etc. comm is done in a separate routine. 2017-10-05 15:47:46 -06:00
44d2e8ff74 Add pre_reverse to verlet_kokkos and comment out timer 2017-10-05 15:28:35 -06:00
6bf2c60c07 Fix issues in Kokkos comm 2017-10-05 14:58:05 -06:00
eecd2fbaee Remove hardcoded value in fix_qeq_reax 2017-10-05 11:23:31 -06:00
2b0bfcb10f Fix memory leak in pair_reaxc_kokkos 2017-10-05 10:35:09 -06:00
3653f40120 Reduce unnecessary communication in fix_qeq_reax 2017-10-04 12:10:13 -06:00
bda0ee3aa1 Destroy unneeded fix in pair_reaxc_kokkos 2017-10-04 12:06:03 -06:00
957263431a Ensure consistency with documentation 2017-10-04 09:38:43 +02:00
f12031f84d add support for building rigid bodies from custom atom properties or atom style variables 2017-10-04 01:14:57 -04:00
c522b1b7a9 add call to fftw_cleanup() before exiting to avoid bogus leak reports when compiling with FFTW v3.x 2017-10-04 00:22:56 -04:00
a55adf4a68 Update to Kokkos r2.04.04 and add workaround for performance regression 2017-10-03 11:30:00 -06:00
2876baafd0 Use -restrict whenever Intel is used, no matter the package 2017-10-03 13:08:56 -04:00
ca032f21fb Add Kokkos threaded reverse comm option 2017-10-03 10:14:24 -06:00
197f082784 cmake: Add -restrict for Intel compilers for some packages
Some packages (USER-OMP, OPT, and USER-INTEL) require the -restrict
flag when using the Intel compiler.
2017-10-03 11:28:33 -04:00
1bb7af9ef9 integrate fix rhok into the LAMMPS source code management and documentation system 2017-10-03 10:45:08 -04:00
251f28049a make fix rhok more similar to other LAMMPS sources
- re-indent to 2 blanks
- white space cleanup
- use force->numeric() and force->inumeric() instead of atof() and atoi()
- include system headers before local LAMMPS headers
2017-10-03 10:10:38 -04:00
f07719e924 make fix rhok examples more consistent with LAMMPS conventions:
- move example folder to examples/USER/misc/
- comment out writing of trajectory files
- reduce run length (for easier testing for regressions)
- record example outputs for 1 and 4 MPI processes
- rename readme.md to README.md for visibility
2017-10-03 10:08:38 -04:00
5f527091b8 Update readme.md 2017-10-03 12:02:01 +02:00
30aaa7e47b Update readme.md 2017-10-03 12:00:43 +02:00
74dcf0bf9b Update readme.md 2017-10-03 11:54:46 +02:00
e9b07a7a10 Update readme.md 2017-10-03 11:52:48 +02:00
fd8f5f8f9e Update readme.md 2017-10-03 11:52:08 +02:00
5c59eb637b Update readme.md 2017-10-03 11:49:57 +02:00
250ef9f837 Update readme.md 2017-10-03 11:46:08 +02:00
e44f370d49 Update readme.md 2017-10-03 11:44:52 +02:00
1e790fbafe Update readme.md
Now use the standard namings.
Corrected spelling errors.
2017-10-03 11:44:23 +02:00
35cc795972 Update in.setup 2017-10-03 11:17:43 +02:00
245bf74552 Rename setup.lmp to in.setup 2017-10-03 11:16:54 +02:00
7e8bbe8481 Rename pinning.lmp to in.pinning 2017-10-03 11:16:29 +02:00
e6d687faac Rename crystal.lmp to in.crystal 2017-10-03 11:15:49 +02:00
8a2cf5ce8e reformatting and use citeme class 2017-10-03 11:13:10 +02:00
8f79f5ddb9 add the LAMMPS copyright 2017-10-03 10:59:46 +02:00
40ae6f215b add the usual LAMMPS copyright 2017-10-03 10:58:21 +02:00
4dcc49ebe2 Delete fix_rhok.cpp 2017-10-03 10:56:07 +02:00
fe14eeccac Delete fix_rhok.h 2017-10-03 10:54:22 +02:00
9dc42fd4db intel_simd.h is currently also needed by dihedral/charmm, not just sw. 2017-10-02 23:53:05 -07:00
5e89269631 Minor adjustments to intel makefiles and documentation based on the reversed
preprocessor logic and default memory align. Removing knl_coprocessor makefile.
2017-10-02 23:41:14 -07:00
11eed234f0 include dump cfg/uef in commands toctree 2017-10-03 00:14:34 -04:00
af1fc45db0 added citation to doc 2017-10-03 00:04:52 -04:00
b34109af60 formatting changes 2017-10-02 23:43:31 -04:00
1dffb0cf82 reran npt_biaxial examples 2017-10-02 23:27:10 -04:00
588b2534c9 Minor fix for FixNHUef constructor 2017-10-02 23:26:21 -04:00
d2aa05cb36 update README in USER-INTEL for recent LRT logic reversal 2017-10-02 21:24:51 -04:00
466fde6443 update documentation for the reversal in the INTEL_MKL_RNG define 2017-10-02 21:20:26 -04:00
2a24cbfe0c reverse logic for using MKL pRNG: this way, make serial and make mpi will compile LAMMPS with USER-INTEL installed 2017-10-02 21:13:51 -04:00
00aef0fe00 rerun logfiles for USER-UEF example inputs 2017-10-02 17:40:46 -04:00
92d9b361fc include USER-UEF styles in PDF version of manual 2017-10-02 17:39:59 -04:00
8acdc8020d add USER-UEF classes to .gitignore 2017-10-02 17:24:36 -04:00
cc09a633a2 small code refactor for FixNHUef class
- use forward declaration for UEFBox to avoid having to include custom header
- remove uef_arg_kludge() thanks to changes in 0c7879e902
2017-10-02 17:19:42 -04:00
81be9b37de formatting, whitespace and include file/constants cleanup 2017-10-02 17:15:13 -04:00
0c7879e902 provide compatibility entries in FixNH option parsing for new USER-UEF package 2017-10-02 16:31:41 -04:00
8d384b9149 whitespace cleanup 2017-10-02 15:03:48 -04:00
529eeb6039 Reduce GPU data transfer 2017-10-02 09:31:39 -06:00
cf24dd0265 Adding pair style dpd/intel and dihedral style fourier/intel
Adding raw performance numbers for Skylake xeon server.
Fixes for using older Intel compilers and compiling without OpenMP.
Fix adding in hooks for using USER-INTEL w/ minimization.
2017-10-02 04:53:17 -07:00
a7b0d1f521 DOC: Corrected syntax for appending at certain frame (NetCDF only) 2017-10-01 14:40:19 +02:00
fbe42cda2d MAINT: Only set append flag when not in multifile mode. 2017-10-01 14:31:33 +02:00
da7be99cc4 DOC: Added multi file example. 2017-10-01 14:28:20 +02:00
56d21bfb05 MAINT: Removed obsolete prmtop writer. 2017-10-01 14:22:04 +02:00
100231bba8 ENH: Enable multi file writes. 2017-10-01 14:21:09 +02:00
84378f8ae2 MAINT: Renamed _put_var1_x to _put_var1_bigint 2017-10-01 14:05:12 +02:00
6e342d2e45 MAINT: bigint (int64) maps onto either long or long long, depending on platform. Automatically choose the correct one. 2017-10-01 14:03:52 +02:00
091d058090 Fix typo 2017-09-30 17:44:15 -04:00
4c71beb024 cleanup/simplification of compilation for fix phonon analysis tool "phana"
- include the used tricubic functions directly as static functions
- silence compiler warnings
- define f2c.h imported data types directly or use C equivalents
- since the direct LAPACK API was called and not cLAPACK, declare LAPACK interface and depend only on LAPACK
- add proper dependencies
- disable automatic minor version number generation. step version manually.
- comment out optional spglib functionality by default
2017-09-30 12:12:15 -04:00
a86572f4fc Reduce memory churn in Kokkos package 2017-09-29 16:20:19 -06:00
4524b0fa83 rename arg_kludge to uef_arg_kludge 2017-09-29 16:54:46 -04:00
4ef63feea7 reran examples 2017-09-29 15:50:31 -04:00
9f2740b7f1 Partially revert 01d0a5c, avoid atomics, safe because of the while loop. Worst case is the resize will happen again because max wasn't accurate 2017-09-29 13:41:35 -06:00
2a06b75af8 doc revisions 2017-09-29 15:36:41 -04:00
d7aac2fed5 Add sync/modify to nbin_kokkos 2017-09-29 13:26:02 -06:00
d898afaafb use <> for system includes not "" 2017-09-29 09:19:38 -04:00
c66ddf9ac0 Update fix_rhok.txt 2017-09-29 08:03:02 +02:00
a64040ce2d citeme 2017-09-28 18:33:04 -04:00
480b087c93 doc edits, README, and citeme 2017-09-28 18:31:51 -04:00
0029583463 doc edits i missed in earlier commit 2017-09-28 17:46:39 -04:00
c0f1a32661 fixed namespace issue 2017-09-28 17:43:59 -04:00
80898b8695 first draft of doc done 2017-09-28 17:42:02 -04:00
855b6000ef initial commit. doc is in the works 2017-09-28 16:34:18 -04:00
285a123c90 Update fix_rhok.cpp 2017-09-28 18:42:15 +02:00
0f52dd7c5f Update fix_rhok.h 2017-09-28 18:41:06 +02:00
10d1741e7f Update fix_rhok.txt 2017-09-28 18:38:25 +02:00
d11733d3a0 typo in equation 2017-09-28 18:28:46 +02:00
348c4eb7f3 add .cpp and .h to root src 2017-09-28 18:18:28 +02:00
75b3f34a58 Update documentation 2017-09-28 18:16:06 +02:00
fe80c57bde more documentation 2017-09-28 17:01:12 +02:00
e49f0e396b Create fix_rhok.txt 2017-09-28 16:24:26 +02:00
37e55a825b Create fix_rhok.txt 2017-09-28 16:20:03 +02:00
67e48264d9 Update fix_rhok.cpp 2017-09-28 16:02:20 +02:00
4e1eeca869 Update fix_rhok.cpp 2017-09-28 16:02:00 +02:00
2fda041972 Update fix_rhok.cpp 2017-09-28 16:00:16 +02:00
34c1adb4dd Merge https://github.com/lammps/lammps 2017-09-28 12:28:58 +02:00
23e283f135 Fixed proper deletion of fixes if fix is NULL 2017-09-27 16:20:07 +02:00
de45fa6e71 correct bogus links in LATTE docs 2017-09-26 18:25:37 -04:00
bfdc4acb8b add missing entry for pdf version of manual 2017-09-26 16:53:36 -04:00
fd3ecd0481 fix typo in formatting 2017-09-26 16:52:24 -04:00
8bba6d3e8c correct formatting and broken/colliding link issues with LATTE package related documentation 2017-09-26 16:52:10 -04:00
53e4ee4f2d need to re-init timers after initial setup 2017-09-25 23:20:42 -04:00
b60cff7e77 USER-OMP package depends on USER-DRUDE 2017-09-25 23:15:49 -04:00
38530415c8 -ltbbmalloc is required 2017-09-25 20:03:53 -04:00
0573aaa6da update src/.gitignore for LATTE package 2017-09-25 19:37:55 -04:00
e6969002ce having plain filelink instead of filelink.o confuses KOKKOS linking with nvcc 2017-09-25 19:37:37 -04:00
836a6d292c whitespace fixes, silence compiler warning about too few format specifiers 2017-09-25 16:31:39 -04:00
32e0de7a67 first pass at implementing atom2bin for KOKKOS neighbor lists 2017-09-25 14:06:20 -05:00
789812ec3d KOKKOS: minor typo fix 2017-09-25 14:06:20 -05:00
88a882b457 Added reference to fix rhok implimentation 2017-09-25 18:59:23 +02:00
f1aea57e30 Update readme.md 2017-09-25 18:48:21 +02:00
b35f2ff8b4 Example of Interface Pinning Computation 2017-09-25 18:44:24 +02:00
4beccf508f Move fix to USER-MISH 2017-09-25 18:35:53 +02:00
78a486c0fd Authorize hybrid/overlay for fix srp 2017-09-25 16:18:08 +02:00
d6316c40d9 cmake: fix build with system latte 2017-09-22 15:36:14 -06:00
fe8244c1c2 Rename fix 2017-09-21 16:49:46 +02:00
3381a43378 Added readme.m 2017-09-21 16:20:06 +02:00
73708b091c Added readme file, and removed old files 2017-09-21 16:17:26 +02:00
9a9af2ca5e Delete README 2017-09-21 13:58:51 +02:00
491d5f3410 Added USER-PINNING package 2017-09-21 11:38:59 +02:00
377 changed files with 21427 additions and 6136 deletions

View File

@ -37,6 +37,10 @@ enable_language(CXX)
#####################################################################
include(CheckCCompilerFlag)
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
endif()
########################################################################
# User input options #
########################################################################
@ -76,7 +80,7 @@ add_definitions(-DLAMMPS_MEMALIGN=${LAMMPS_MEMALIGN})
option(LAMMPS_EXCEPTIONS "enable the use of C++ exceptions for error messages (useful for library interface)" OFF)
if(LAMMPS_EXCEPTIONS)
add_definitions(-DLAMMPS_EXCEPTIONS)
set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES -DLAMMPS_EXCEPTIONS")
set(LAMMPS_API_DEFINES "${LAMMPS_API_DEFINES} -DLAMMPS_EXCEPTIONS")
endif()
set(LAMMPS_MACHINE "" CACHE STRING "Suffix to append to lmp binary and liblammps (WON'T enable any features automatically")
@ -101,7 +105,7 @@ set(OTHER_PACKAGES KIM PYTHON MSCG MPIIO VORONOI POEMS LATTE
USER-CGSDK USER-COLVARS USER-DIFFRACTION USER-DPD USER-DRUDE USER-EFF
USER-FEP USER-H5MD USER-LB USER-MANIFOLD USER-MEAMC USER-MGPT USER-MISC
USER-MOLFILE USER-NETCDF USER-PHONON USER-QTB USER-REAXC USER-SMD
USER-SMTBQ USER-SPH USER-TALLY USER-VTK USER-QUIP USER-QMMM)
USER-SMTBQ USER-SPH USER-TALLY USER-UEF USER-VTK USER-QUIP USER-QMMM)
set(ACCEL_PACKAGES USER-OMP KOKKOS OPT USER-INTEL GPU)
foreach(PKG ${DEFAULT_PACKAGES})
option(ENABLE_${PKG} "Build ${PKG} Package" ${ENABLE_ALL})
@ -665,7 +669,9 @@ include_directories(${LAMMPS_STYLE_HEADERS_DIR})
############################################
add_library(lammps ${LIB_SOURCES})
target_link_libraries(lammps ${LAMMPS_LINK_LIBS})
add_dependencies(lammps ${LAMMPS_DEPS})
if(LAMMPS_DEPS)
add_dependencies(lammps ${LAMMPS_DEPS})
endif()
set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_MACHINE})
if(BUILD_SHARED_LIBS)
set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION})

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,10 @@
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{document}
$$
E = K (r^2 - r_0^2)^2
$$
\end{document}

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

11
doc/src/Eqs/fix_rhok.tex Normal file
View File

@ -0,0 +1,11 @@
\documentclass[12pt]{article}
\begin{document}
\begin{eqnarray*}
U &=& \frac{1}{2} K (|\rho_{\vec{k}}| - a)^2 \\
\rho_{\vec{k}} &=& \sum_j^N \exp(-i\vec{k} \cdot \vec{r}_j )/\sqrt{N} \\
\vec{k} &=& (2\pi n_x /L_x , 2\pi n_y /L_y , 2\pi n_z/L_z )
\end{eqnarray*}
\end{document}

BIN
doc/src/JPG/uef_frames.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -1,7 +1,7 @@
<!-- HTML_ONLY -->
<HEAD>
<TITLE>LAMMPS Users Manual</TITLE>
<META NAME="docnumber" CONTENT="22 Sep 2017 version">
<META NAME="docnumber" CONTENT="23 Oct 2017 version">
<META NAME="author" CONTENT="http://lammps.sandia.gov - Sandia National Laboratories">
<META NAME="copyright" CONTENT="Copyright (2003) Sandia Corporation. This software and manual is distributed under the GNU General Public License.">
</HEAD>
@ -21,7 +21,7 @@
<H1></H1>
LAMMPS Documentation :c,h3
22 Sep 2017 version :c,h4
23 Oct 2017 version :c,h4
Version info: :h4

View File

@ -720,6 +720,8 @@ package"_Section_start.html#start_3.
"nve/eff"_fix_nve_eff.html,
"nvt/eff"_fix_nh_eff.html,
"nvt/sllod/eff"_fix_nvt_sllod_eff.html,
"npt/uef"_fix_nh_uef.html,
"nvt/uef"_fix_nh_uef.html,
"phonon"_fix_phonon.html,
"pimd"_fix_pimd.html,
"qbmsst"_fix_qbmsst.html,
@ -728,6 +730,7 @@ package"_Section_start.html#start_3.
"qtb"_fix_qtb.html,
"reax/c/bonds"_fix_reax_bonds.html,
"reax/c/species"_fix_reaxc_species.html,
"rhok"_fix_rhok.html,
"rx"_fix_rx.html,
"saed/vtk"_fix_saed_vtk.html,
"shardlow"_fix_shardlow.html,
@ -856,6 +859,7 @@ package"_Section_start.html#start_3.
"meso/t/atom"_compute_meso_t_atom.html,
"pe/tally"_compute_tally.html,
"pe/mol/tally"_compute_tally.html,
"pressure/uef"_compute_pressure_uef.html,
"saed"_compute_saed.html,
"smd/contact/radius"_compute_smd_contact_radius.html,
"smd/damage"_compute_smd_damage.html,
@ -884,6 +888,7 @@ package"_Section_start.html#start_3.
"temp/deform/eff"_compute_temp_deform_eff.html,
"temp/region/eff"_compute_temp_region_eff.html,
"temp/rotate"_compute_temp_rotate.html,
"temp/uef"_compute_temp_uef.html,
"xrd"_compute_xrd.html :tb(c=6,ea=c)
:line
@ -915,11 +920,12 @@ KOKKOS, o = USER-OMP, t = OPT.
"born/coul/long/cs"_pair_born.html,
"born/coul/msm (o)"_pair_born.html,
"born/coul/wolf (go)"_pair_born.html,
"born/coul/wolf/cs"_pair_born.html,
"brownian (o)"_pair_brownian.html,
"brownian/poly (o)"_pair_brownian.html,
"buck (gkio)"_pair_buck.html,
"buck/coul/cut (gkio)"_pair_buck.html,
"buck/coul/long (gkio)"_pair_buck.html,
"buck (giko)"_pair_buck.html,
"buck/coul/cut (giko)"_pair_buck.html,
"buck/coul/long (giko)"_pair_buck.html,
"buck/coul/long/cs"_pair_buck.html,
"buck/coul/msm (o)"_pair_buck.html,
"buck/long/coul/long (o)"_pair_buck_long.html,
@ -934,12 +940,13 @@ KOKKOS, o = USER-OMP, t = OPT.
"coul/msm"_pair_coul.html,
"coul/streitz"_pair_coul.html,
"coul/wolf (ko)"_pair_coul.html,
"dpd (go)"_pair_dpd.html,
"coul/wolf/cs"_pair_coul.html,
"dpd (gio)"_pair_dpd.html,
"dpd/tstat (go)"_pair_dpd.html,
"dsmc"_pair_dsmc.html,
"eam (gkiot)"_pair_eam.html,
"eam/alloy (gkiot)"_pair_eam.html,
"eam/fs (gkiot)"_pair_eam.html,
"eam (gikot)"_pair_eam.html,
"eam/alloy (gikot)"_pair_eam.html,
"eam/fs (gikot)"_pair_eam.html,
"eim (o)"_pair_eim.html,
"gauss (go)"_pair_gauss.html,
"gayberne (gio)"_pair_gayberne.html,
@ -953,9 +960,9 @@ KOKKOS, o = USER-OMP, t = OPT.
"kim"_pair_kim.html,
"lcbop"_pair_lcbop.html,
"line/lj"_pair_line_lj.html,
"lj/charmm/coul/charmm (kio)"_pair_charmm.html,
"lj/charmm/coul/charmm (iko)"_pair_charmm.html,
"lj/charmm/coul/charmm/implicit (ko)"_pair_charmm.html,
"lj/charmm/coul/long (gkio)"_pair_charmm.html,
"lj/charmm/coul/long (giko)"_pair_charmm.html,
"lj/charmm/coul/msm"_pair_charmm.html,
"lj/charmmfsw/coul/charmmfsh"_pair_charmm.html,
"lj/charmmfsw/coul/long"_pair_charmm.html,
@ -1005,9 +1012,9 @@ KOKKOS, o = USER-OMP, t = OPT.
"resquared (go)"_pair_resquared.html,
"snap"_pair_snap.html,
"soft (go)"_pair_soft.html,
"sw (gkio)"_pair_sw.html,
"sw (giko)"_pair_sw.html,
"table (gko)"_pair_table.html,
"tersoff (gkio)"_pair_tersoff.html,
"tersoff (giko)"_pair_tersoff.html,
"tersoff/mod (gko)"_pair_tersoff_mod.html,
"tersoff/mod/c (o)"_pair_tersoff_mod.html,
"tersoff/zbl (gko)"_pair_tersoff_zbl.html,
@ -1111,6 +1118,7 @@ KOKKOS, o = USER-OMP, t = OPT.
"class2 (ko)"_bond_class2.html,
"fene (iko)"_bond_fene.html,
"fene/expand (o)"_bond_fene_expand.html,
"gromos (o)"_bond_gromos.html,
"harmonic (ko)"_bond_harmonic.html,
"morse (o)"_bond_morse.html,
"nonlinear (o)"_bond_nonlinear.html,
@ -1177,7 +1185,7 @@ USER-OMP, t = OPT.
"none"_dihedral_none.html,
"zero"_dihedral_zero.html,
"hybrid"_dihedral_hybrid.html,
"charmm (ko)"_dihedral_charmm.html,
"charmm (iko)"_dihedral_charmm.html,
"charmmfsw"_dihedral_charmm.html,
"class2 (ko)"_dihedral_class2.html,
"harmonic (io)"_dihedral_harmonic.html,
@ -1190,7 +1198,7 @@ used if "LAMMPS is built with the appropriate
package"_Section_start.html#start_3.
"cosine/shift/exp (o)"_dihedral_cosine_shift_exp.html,
"fourier (o)"_dihedral_fourier.html,
"fourier (io)"_dihedral_fourier.html,
"nharmonic (o)"_dihedral_nharmonic.html,
"quadratic (o)"_dihedral_quadratic.html,
"spherical (o)"_dihedral_spherical.html,
@ -1213,7 +1221,7 @@ USER-OMP, t = OPT.
"hybrid"_improper_hybrid.html,
"class2 (ko)"_improper_class2.html,
"cvff (io)"_improper_cvff.html,
"harmonic (ko)"_improper_harmonic.html,
"harmonic (iko)"_improper_harmonic.html,
"umbrella (o)"_improper_umbrella.html :tb(c=4,ea=c)
These are additional improper styles in USER packages, which can be

View File

@ -150,6 +150,7 @@ Package, Description, Doc page, Example, Library
"USER-SMTBQ"_#USER-SMTBQ, second moment tight binding QEq potential,"pair_style smtbq"_pair_smtbq.html, USER/smtbq, -
"USER-SPH"_#USER-SPH, smoothed particle hydrodynamics,"SPH User Guide"_PDF/SPH_LAMMPS_userguide.pdf, USER/sph, -
"USER-TALLY"_#USER-TALLY, pairwise tally computes,"compute XXX/tally"_compute_tally.html, USER/tally, -
"USER-UEF"_#USER-UEF, extensional flow,"fix nvt/uef"_fix_nh_uef.html, USER/uef, -
"USER-VTK"_#USER-VTK, dump output via VTK, "compute vtk"_dump_vtk.html, -, ext :tb(ea=c,ca1=l)
:line
@ -705,7 +706,7 @@ dynamics can be run with LAMMPS using density-functional tight-binding
quantum forces calculated by LATTE.
More information on LATTE can be found at this web site:
"https://github.com/lanl/LATTE"_#latte_home. A brief technical
"https://github.com/lanl/LATTE"_latte_home. A brief technical
description is given with the "fix latte"_fix_latte.html command.
:link(latte_home,https://github.com/lanl/LATTE)
@ -728,6 +729,7 @@ make lib-latte args="-b" # download and build in lib/latte/LATTE-
make lib-latte args="-p $HOME/latte" # use existing LATTE installation in $HOME/latte
make lib-latte args="-b -m gfortran" # download and build in lib/latte and
# copy Makefile.lammps.gfortran to Makefile.lammps
:pre
Note that 3 symbolic (soft) links, "includelink" and "liblink" and
"filelink", are created in lib/latte to point into the LATTE home dir.
@ -2770,13 +2772,44 @@ examples/USER/tally :ul
:line
USER-UEF package :link(USER-UEF),h4
[Contents:]
A fix style for the integration of the equations of motion under
extensional flow with proper boundary conditions, as well as several
supporting compute styles and an output option.
[Author:] David Nicholson (MIT).
[Install or un-install:]
make yes-user-uef
make machine :pre
make no-user-uef
make machine :pre
[Supporting info:]
src/USER-UEF: filenames -> commands
src/USER-UEF/README
"fix nvt/uef"_fix_nh_uef.html
"fix npt/uef"_fix_nh_uef.html
"compute pressure/uef"_compute_pressure_uef.html
"compute temp/uef"_compute_temp_uef.html
"dump cfg/uef"_dump_cfg_uef.html
examples/uef :ul
:line
USER-VTK package :link(USER-VTK),h4
[Contents:]
A "dump vtk"_dump_vtk.html command which outputs
snapshot info in the "VTK format"_vtk, enabling visualization by
"Paraview"_paraview or other visuzlization packages.
A "dump vtk"_dump_vtk.html command which outputs snapshot info in the
"VTK format"_vtk, enabling visualization by "Paraview"_paraview or
other visuzlization packages.
:link(vtk,http://www.vtk.org)
:link(paraview,http://www.paraview.org)

View File

@ -25,14 +25,14 @@ LAMMPS to run on the CPU cores and coprocessor cores simultaneously.
[Currently Available USER-INTEL Styles:]
Angle Styles: charmm, harmonic :ulb,l
Bond Styles: fene, harmonic :l
Bond Styles: fene, fourier, harmonic :l
Dihedral Styles: charmm, harmonic, opls :l
Fixes: nve, npt, nvt, nvt/sllod :l
Fixes: nve, npt, nvt, nvt/sllod, nve/asphere :l
Improper Styles: cvff, harmonic :l
Pair Styles: airebo, airebo/morse, buck/coul/cut, buck/coul/long,
buck, eam, eam/alloy, eam/fs, gayberne, lj/charmm/coul/charmm,
lj/charmm/coul/long, lj/cut, lj/cut/coul/long, lj/long/coul/long, rebo,
sw, tersoff :l
buck, dpd, eam, eam/alloy, eam/fs, gayberne, lj/charmm/coul/charmm,
lj/charmm/coul/long, lj/cut, lj/cut/coul/long, lj/long/coul/long,
rebo, sw, tersoff :l
K-Space Styles: pppm, pppm/disp :l
:ule
@ -54,11 +54,12 @@ warmup run (for use with offload benchmarks).
:c,image(JPG/user_intel.png)
Results are speedups obtained on Intel Xeon E5-2697v4 processors
(code-named Broadwell) and Intel Xeon Phi 7250 processors
(code-named Knights Landing) with "June 2017" LAMMPS built with
Intel Parallel Studio 2017 update 2. Results are with 1 MPI task
per physical core. See {src/USER-INTEL/TEST/README} for the raw
simulation rates and instructions to reproduce.
(code-named Broadwell), Intel Xeon Phi 7250 processors (code-named
Knights Landing), and Intel Xeon Gold 6148 processors (code-named
Skylake) with "June 2017" LAMMPS built with Intel Parallel Studio
2017 update 2. Results are with 1 MPI task per physical core. See
{src/USER-INTEL/TEST/README} for the raw simulation rates and
instructions to reproduce.
:line
@ -82,6 +83,11 @@ this order :l
The {newton} setting applies to all atoms, not just atoms shared
between MPI tasks :l
Vectorization can change the order for adding pairwise forces :l
When using the -DLMP_USE_MKL_RNG define (all included intel optimized
makefiles do) at build time, the random number generator for
dissipative particle dynamics (pair style dpd/intel) uses the Mersenne
Twister generator included in the Intel MKL library (that should be
more robust than the default Masaglia random number generator) :l
:ule
The precision mode (described below) used with the USER-INTEL
@ -108,7 +114,7 @@ $t should be 2 for Intel Xeon CPUs and 2 or 4 for Intel Xeon Phi :l
For some of the simple 2-body potentials without long-range
electrostatics, performance and scalability can be better with
the "newton off" setting added to the input script :l
For simulations on higher node counts, add "processors * * * grid
For simulations on higher node counts, add "processors * * * grid
numa" to the beginning of the input script for better scalability :l
If using {kspace_style pppm} in the input script, add
"kspace_modify diff ad" for better performance :l
@ -119,8 +125,8 @@ For Intel Xeon Phi CPUs:
Runs should be performed using MCDRAM. :ulb,l
:ule
For simulations using {kspace_style pppm} on Intel CPUs
supporting AVX-512:
For simulations using {kspace_style pppm} on Intel CPUs supporting
AVX-512:
Add "kspace_modify diff ad" to the input script :ulb,l
The command-line option should be changed to
@ -237,14 +243,17 @@ However, if you do not have coprocessors on your system, building
without offload support will produce a smaller binary.
The general requirements for Makefiles with the USER-INTEL package
are as follows. "-DLAMMPS_MEMALIGN=64" is required for CCFLAGS. When
using Intel compilers, "-restrict" is required and "-qopenmp" is
highly recommended for CCFLAGS and LINKFLAGS. LIB should include
"-ltbbmalloc". For builds supporting offload, "-DLMP_INTEL_OFFLOAD"
is required for CCFLAGS and "-qoffload" is required for LINKFLAGS.
Other recommended CCFLAG options for best performance are
"-O2 -fno-alias -ansi-alias -qoverride-limits fp-model fast=2
-no-prec-div".
are as follows. When using Intel compilers, "-restrict" is required
and "-qopenmp" is highly recommended for CCFLAGS and LINKFLAGS.
CCFLAGS should include "-DLMP_INTEL_USELRT" (unless POSIX Threads
are not supported in the build environment) and "-DLMP_USE_MKL_RNG"
(unless Intel Math Kernel Library (MKL) is not available in the build
environment). For Intel compilers, LIB should include "-ltbbmalloc"
or if the library is not available, "-DLMP_INTEL_NO_TBB" can be added
to CCFLAGS. For builds supporting offload, "-DLMP_INTEL_OFFLOAD" is
required for CCFLAGS and "-qoffload" is required for LINKFLAGS. Other
recommended CCFLAG options for best performance are "-O2 -fno-alias
-ansi-alias -qoverride-limits fp-model fast=2 -no-prec-div".
NOTE: The vectorization and math capabilities can differ depending on
the CPU. For Intel compilers, the "-x" flag specifies the type of

View File

@ -16,7 +16,7 @@ atom_modify keyword values ... :pre
one or more keyword/value pairs may be appended :ulb,l
keyword = {id} or {map} or {first} or {sort} :l
{id} value = {yes} or {no}
{map} value = {array} or {hash}
{map} value = {yes} or {array} or {hash}
{first} value = group-ID = group whose atoms will appear first in internal atom lists
{sort} values = Nfreq binsize
Nfreq = sort atoms spatially every this many time steps
@ -25,8 +25,8 @@ keyword = {id} or {map} or {first} or {sort} :l
[Examples:]
atom_modify map hash
atom_modify map array sort 10000 2.0
atom_modify map yes
atom_modify map hash sort 10000 2.0
atom_modify first colloid :pre
[Description:]
@ -62,29 +62,33 @@ switch. This is described in "Section 2.2"_Section_start.html#start_2
of the manual. If atom IDs are not used, they must be specified as 0
for all atoms, e.g. in a data or restart file.
The {map} keyword determines how atom ID lookup is done for molecular
atom styles. Lookups are performed by bond (angle, etc) routines in
LAMMPS to find the local atom index associated with a global atom ID.
The {map} keyword determines how atoms with specific IDs are found
when required. An example are the bond (angle, etc) methods which
need to find the local index of an atom with a specific global ID
which is a bond (angle, etc) partner. LAMMPS performs this operation
efficiently by creating a "map", which is either an {array} or {hash}
table, as descibed below.
When the {array} value is used, each processor stores a lookup table
of length N, where N is the largest atom ID in the system. This is a
When the {map} keyword is not specified in your input script, LAMMPS
only creates a map for "atom_styles"_atom_style.html for molecular
systems which have permanent bonds (angles, etc). No map is created
for atomic systems, since it is normally not needed. However some
LAMMPS commands require a map, even for atomic systems, and will
generate an error if one does not exist. The {map} keyword thus
allows you to force the creation of a map. The {yes} value will
create either an {array} or {hash} style map, as explained in the next
paragraph. The {array} and {hash} values create an atom-style or
hash-style map respectively.
For an {array}-style map, each processor stores a lookup table of
length N, where N is the largest atom ID in the system. This is a
fast, simple method for many simulations, but requires too much memory
for large simulations. The {hash} value uses a hash table to perform
the lookups. This can be slightly slower than the {array} method, but
its memory cost is proportional to the number of atoms owned by a
processor, i.e. N/P when N is the total number of atoms in the system
and P is the number of processors.
When this setting is not specified in your input script, LAMMPS
creates a map, if one is needed, as an array or hash. See the
discussion of default values below for how LAMMPS chooses which kind
of map to build. Note that atomic systems do not normally need to
create a map. However, even in this case some LAMMPS commands will
create a map to find atoms (and then destroy it), or require a
permanent map. An example of the former is the "velocity loop
all"_velocity.html command, which uses a map when looping over all
atoms and insuring the same velocity values are assigned to an atom
ID, no matter which processor owns it.
for large simulations. For a {hash}-style map, a hash table is
created on each processor, which finds an atom ID in constant time
(independent of the global number of atom IDs). It can be slightly
slower than the {array} map, but its memory cost is proportional to
the number of atoms owned by a processor, i.e. N/P when N is the total
number of atoms in the system and P is the number of processors.
The {first} keyword allows a "group"_group.html to be specified whose
atoms will be maintained as the first atoms in each processor's list

73
doc/src/bond_gromos.txt Normal file
View File

@ -0,0 +1,73 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
bond_style gromos command :h3
bond_style gromos/omp command :h3
[Syntax:]
bond_style gromos :pre
[Examples:]
bond_style gromos
bond_coeff 5 80.0 1.2 :pre
[Description:]
The {gromos} bond style uses the potential
:c,image(Eqs/bond_gromos.jpg)
where r0 is the equilibrium bond distance. Note that the usual 1/4
factor is included in K.
The following coefficients must be defined for each bond type via the
"bond_coeff"_bond_coeff.html command as in the example above, or in
the data file or restart files read by the "read_data"_read_data.html
or "read_restart"_read_restart.html commands:
K (energy/distance^4)
r0 (distance) :ul
:line
Styles with a {gpu}, {intel}, {kk}, {omp}, or {opt} suffix are
functionally the same as the corresponding style without the suffix.
They have been optimized to run faster, depending on your available
hardware, as discussed in "Section 5"_Section_accelerate.html
of the manual. The accelerated styles take the same arguments and
should produce the same results, except for round-off and precision
issues.
These accelerated styles are part of the GPU, USER-INTEL, KOKKOS,
USER-OMP and OPT packages, respectively. They are only enabled if
LAMMPS was built with those packages. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.
You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the "-suffix command-line
switch"_Section_start.html#start_6 when you invoke LAMMPS, or you can
use the "suffix"_suffix.html command in your input script.
See "Section 5"_Section_accelerate.html of the manual for
more instructions on how to use the accelerated styles effectively.
:line
[Restrictions:]
This bond style can only be used if LAMMPS was built with the
MOLECULE package. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info on packages.
[Related commands:]
"bond_coeff"_bond_coeff.html, "delete_bonds"_delete_bonds.html
[Default:] none

View File

@ -8,6 +8,7 @@ Bond Styles :h1
bond_class2
bond_fene
bond_fene_expand
bond_gromos
bond_harmonic
bond_harmonic_shift
bond_harmonic_shift_cut

View File

@ -32,6 +32,7 @@ Commands :h1
dimension
displace_atoms
dump
dump_cfg_uef
dump_h5md
dump_image
dump_modify

View File

@ -0,0 +1,61 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute pressure/uef command :h3
[Syntax:]
compute ID group-ID pressure/uef temp-ID keyword ... :pre
ID, group-ID are documented in "compute"_compute.html command
pressure/uef = style name of this compute command
temp-ID = ID of compute that calculates temperature, can be NULL if not needed
zero or more keywords may be appended
keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} or {virial} :ul
[Examples:]
compute 1 all pressure/uef my_temp_uef
compute 2 all pressure/uef my_temp_uef virial :pre
[Description:]
This command is used to compute the pressure tensor in
the reference frame of the applied flow field when
"fix nvt/uef"_fix_nh_uef.html" or
"fix npt/uef"_fix_nh_uef.html" is used.
It is not necessary to use this command to compute the scalar
value of the pressure. A "compute pressure"_compute_pressure.html
may be used for that purpose.
The keywords and output information are documented in
"compute_pressure"_compute_pressure.html.
[Restrictions:]
This fix is part of the USER-UEF package. It is only enabled if
LAMMPS was built with that package. See the
"Making LAMMPS"_Section_start.html#start_3 section for more info.
This command can only be used when "fix nvt/uef"_fix_nh_uef.html
or "fix npt/uef"_fix_nh_uef.html is active.
The kinetic contribution to the pressure tensor
will be accurate only when
the compute specificed by {temp-ID} is a
"compute temp/uef"_compute_temp_uef.html.
[Related commands:]
"compute pressure"_compute_pressure.html,
"fix nvt/uef"_fix_nh_uef.html,
"compute temp/uef"_compute_temp_uef.html
[Default:] none

View File

@ -0,0 +1,52 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute temp/uef command :h3
[Syntax:]
compute ID group-ID temp/uef :pre
ID, group-ID are documented in "compute"_compute.html command
temp/uef = style name of this compute command :ul
[Examples:]
compute 1 all temp/uef
compute 2 sel temp/uef :pre
[Description:]
This command is used to compute the kinetic energy tensor in
the reference frame of the applied flow field when
"fix nvt/uef"_fix_nh_uef.html" or
"fix npt/uef"_fix_nh_uef.html" is used.
It is not necessary to use this command to compute the scalar
value of the temperature. A "compute temp"_compute_temp.html
may be used for that purpose.
Output information for this command can be found in the
documentation for "compute temp"_compute_temp.html.
[Restrictions:]
This fix is part of the USER-UEF package. It is only enabled if
LAMMPS was built with that package. See the
"Making LAMMPS"_Section_start.html#start_3 section for more info.
This command can only be used when "fix nvt/uef"_fix_nh_uef.html
or "fix npt/uef"_fix_nh_uef.html is active.
[Related commands:]
"compute temp"_compute_temp.html,
"fix nvt/uef"_fix_nh_uef.html,
"compute pressure/uef"_compute_pressure_uef.html
[Default:] none

View File

@ -65,6 +65,7 @@ Computes :h1
compute_pe_atom
compute_plasticity_atom
compute_pressure
compute_pressure_uef
compute_property_atom
compute_property_chunk
compute_property_local
@ -114,6 +115,7 @@ Computes :h1
compute_temp_region_eff
compute_temp_rotate
compute_temp_sphere
compute_temp_uef
compute_ti
compute_torque_chunk
compute_vacf

View File

@ -7,6 +7,7 @@
:line
dihedral_style fourier command :h3
dihedral_style fourier/intel command :h3
dihedral_style fourier/omp command :h3
[Syntax:]

53
doc/src/dump_cfg_uef.txt Normal file
View File

@ -0,0 +1,53 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
dump cfg/uef command :h3
[Syntax:]
dump ID group-ID cfg/uef N file mass type xs ys zs args :pre
ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be dumped :l
N = dump every this many timesteps :l
file = name of file to write dump info to :l
args = same as args for "dump custom"_dump.html :pre
:ule
[Examples:]
dump 1 all cfg/uef 10 dump.*.cfg mass type xs ys zs
dump 2 all cfg/uef 100 dump.*.cfg mass type xs ys zs id c_stress :pre
[Description:]
This command is used to dump atomic coordinates in the
reference frame of the applied flow field when
"fix nvt/uef"_fix_nh_uef.html or
"fix npt/uef"_fix_nh_uef.html or is used. Only the atomic
coordinates and frame-invariant scalar quantities
will be in the flow frame. If velocities are selected
as output, for example, they will not be in the same
reference frame as the atomic positions.
[Restrictions:]
This fix is part of the USER-UEF package. It is only enabled if
LAMMPS was built with that package. See the
"Making LAMMPS"_Section_start.html#start_3 section for more info.
This command can only be used when "fix nvt/uef"_fix_nh_uef.html
or "fix npt/uef"_fix_nh_uef.html is active.
[Related commands:]
"dump"_dump.html,
"fix nvt/uef"_fix_nh_uef.html
[Default:] none

View File

@ -15,8 +15,9 @@ dump_modify dump-ID keyword values ... :pre
dump-ID = ID of dump to modify :ulb,l
one or more keyword/value pairs may be appended :l
these keywords apply to various dump styles :l
keyword = {append} or {buffer} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l
{append} arg = {yes} or {no} or {at} N
keyword = {append} or {at} or {buffer} or {element} or {every} or {fileper} or {first} or {flush} or {format} or {image} or {label} or {nfile} or {pad} or {precision} or {region} or {scale} or {sort} or {thresh} or {unwrap} :l
{append} arg = {yes} or {no}
{at} arg = N
N = index of frame written upon first dump
{buffer} arg = {yes} or {no}
{element} args = E1 E2 ... EN, where N = # of atom types
@ -141,13 +142,18 @@ and {dcd}. It also applies only to text output files, not to binary
or gzipped or image/movie files. If specified as {yes}, then dump
snapshots are appended to the end of an existing dump file. If
specified as {no}, then a new dump file will be created which will
overwrite an existing file with the same name. If the {at} option is present
({netcdf} only), then the frame to append to can be specified. Negative values
are counted from the end of the file. This keyword can only take effect if the
dump_modify command is used after the "dump"_dump.html command, but before the
first command that causes dump snapshots to be output, e.g. a "run"_run.html or
"minimize"_minimize.html command. Once the dump file has been opened, this
keyword has no further effect.
overwrite an existing file with the same name.
:line
The {at} keyword only applies to the {netcdf} dump style. It can only
be used if the {append yes} keyword is also used. The {N} argument is
the index of which frame to append to. A negative value can be
specified for {N}, which means a frame counted from the end of the
file. The {at} keyword can only be used if the dump_modify command is
before the first command that causes dump snapshots to be output,
e.g. a "run"_run.html or "minimize"_minimize.html command. Once the
dump file has been opened, this keyword has no further effect.
:line

View File

@ -25,7 +25,8 @@ args = list of atom attributes, same as for "dump_style custom"_dump.html :l,ule
dump 1 all netcdf 100 traj.nc type x y z vx vy vz
dump_modify 1 append yes at -1 thermo yes
dump 1 all netcdf/mpiio 1000 traj.nc id type x y z :pre
dump 1 all netcdf/mpiio 1000 traj.nc id type x y z
dump 1 all netcdf 1000 traj.*.nc id type x y z :pre
[Description:]
@ -73,4 +74,3 @@ section for more info.
[Related commands:]
"dump"_dump.html, "dump_modify"_dump_modify.html, "undump"_undump.html

View File

@ -86,11 +86,16 @@ Change the volume and/or shape of the simulation box during a dynamics
run. Orthogonal simulation boxes have 3 adjustable parameters
(x,y,z). Triclinic (non-orthogonal) simulation boxes have 6
adjustable parameters (x,y,z,xy,xz,yz). Any or all of them can be
adjusted independently and simultaneously by this command. This fix
can be used to perform non-equilibrium MD (NEMD) simulations of a
continuously strained system. See the "fix
adjusted independently and simultaneously by this command.
This fix can be used to perform non-equilibrium MD (NEMD) simulations
of a continuously strained system. See the "fix
nvt/sllod"_fix_nvt_sllod.html and "compute
temp/deform"_compute_temp_deform.html commands for more details.
temp/deform"_compute_temp_deform.html commands for more details. Note
that simulation of a continuously extended system (extensional flow)
can be modeled using the "USER-UEF
package"_Section_packages.html#USER-UEF and its "fix
commands"_fix_nh_uef.html.
For the {x}, {y}, {z} parameters, the associated dimension cannot be
shrink-wrapped. For the {xy}, {yz}, {xz} parameters, the associated

View File

@ -66,7 +66,7 @@ reference charge of overlapping atom-centered densities and bond
integrals are parameterized using a Slater-Koster tight-binding
approach. This procedure, which usually is referred to as the DFTB
method has been described in detail by ("Elstner"_#Elstner) and
("Finnis"_#Finnis) and coworkers.
("Finnis"_#Finnis2) and coworkers.
The work of the LATTE developers follows that of Elstner closely with
respect to the physical model. However, the development of LATTE is
@ -173,7 +173,7 @@ M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58,
M. Haugk, T. Frauenheim, S. Suhai, and G. Seifert, Phys. Rev. B, 58,
7260 (1998).
:link(Finnis)
:link(Finnis2)
[(Finnis)] M. W. Finnis, A. T. Paxton, M. Methfessel, and M. van
Schilfgarde, Phys. Rev. Lett., 81, 5149 (1998).
@ -197,11 +197,11 @@ J. Sci. Comput. 36 (2), 147-170, (2014).
[(Niklasson2014)] A. M. N. Niklasson and M. Cawkwell, J. Chem. Phys.,
141, 164123, (2014).
:link(Niklasson2014)
:link(Niklasson2017)
[(Niklasson2017)] A. M. N. Niklasson, J. Chem. Phys., 147, 054103 (2017).
:link(Niklasson2012)
[(Niklasson2017)] A. M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86
:link(Cawkwell2012)
[(Cawkwell2012)] A. M. N. Niklasson, M. J. Cawkwell, Phys. Rev. B, 86
(17), 174308 (2012).
:link(Negre2016)

View File

@ -93,7 +93,7 @@ intermediate replica with the previous and the next image:
Fnudge_parallel = {Kspring} * (|Ri+1 - Ri| - |Ri - Ri-1|) :pre
Note that in this case the specified {Kspring) is in force/distance
Note that in this case the specified {Kspring} is in force/distance
units.
With a value of {ideal}, the spring force is computed as suggested in
@ -105,7 +105,7 @@ where RD is the "reaction coordinate" see "neb"_neb.html section, and
RDideal is the ideal RD for which all the images are equally spaced.
I.e. RDideal = (I-1)*meanDist when the climbing replica is off, where
I is the replica number). The meanDist is the average distance
between replicas. Note that in this case the specified {Kspring) is
between replicas. Note that in this case the specified {Kspring} is
in force units.
Note that the {ideal} form of nudging can often be more effective at

View File

@ -393,32 +393,36 @@ thermostatting and barostatting.
:line
These fixes compute a temperature and pressure each timestep. To do
this, the fix creates its own computes of style "temp" and "pressure",
as if one of these two sets of commands had been issued:
this, the thermostat and barostat fixes create their own computes of
style "temp" and "pressure", as if one of these sets of commands had
been issued:
For fix nvt:
compute fix-ID_temp group-ID temp
compute fix-ID_press group-ID pressure fix-ID_temp :pre
For fix npt and fix nph:
compute fix-ID_temp all temp
compute fix-ID_press all pressure fix-ID_temp :pre
See the "compute temp"_compute_temp.html and "compute
pressure"_compute_pressure.html commands for details. Note that the
IDs of the new computes are the fix-ID + underscore + "temp" or fix_ID
+ underscore + "press". For fix nvt, the group for the new computes
is the same as the fix group. For fix nph and fix npt, the group for
the new computes is "all" since pressure is computed for the entire
system.
For fix nvt, the group for the new temperature compute is the same as
the fix group. For fix npt and fix nph, the group for both the new
temperature and pressure compute is "all" since pressure is computed
for the entire system. In the case of fix nph, the temperature
compute is not used for thermostatting, but just for a kinetic-energy
contribution to the pressure. See the "compute
temp"_compute_temp.html and "compute pressure"_compute_pressure.html
commands for details. Note that the IDs of the new computes are the
fix-ID + underscore + "temp" or fix_ID + underscore + "press".
Note that these are NOT the computes used by thermodynamic output (see
the "thermo_style"_thermo_style.html command) with ID = {thermo_temp}
and {thermo_press}. This means you can change the attributes of this
and {thermo_press}. This means you can change the attributes of these
fix's temperature or pressure via the
"compute_modify"_compute_modify.html command or print this temperature
or pressure during thermodynamic output via the "thermo_style
custom"_thermo_style.html command using the appropriate compute-ID.
It also means that changing attributes of {thermo_temp} or
{thermo_press} will have no effect on this fix.
"compute_modify"_compute_modify.html command. Or you can print this
temperature or pressure during thermodynamic output via the
"thermo_style custom"_thermo_style.html command using the appropriate
compute-ID. It also means that changing attributes of {thermo_temp}
or {thermo_press} will have no effect on this fix.
Like other fixes that perform thermostatting, fix nvt and fix npt can
be used with "compute commands"_compute.html that calculate a

228
doc/src/fix_nh_uef.txt Normal file
View File

@ -0,0 +1,228 @@
<"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
fix nvt/uef command :h3
fix npt/uef command :h3
[Syntax:]
fix ID group-ID style_name erate edot_x edot_y temp Tstart Tstop Tdamp keyword value ... :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
style_name = {nvt/uef} or {npt/uef} :l
{Tstart}, {Tstop}, and {Tdamp} are documented in the "fix npt"_fix_nh.html command :l
{edot_x} and {edot_y} are the strain rates in the x and y directions (1/(time units)) :l
one or more keyword/value pairs may be appended :l
keyword = {ext} or {strain} or {iso} or {x} or {y} or {z} or {tchain} or {pchain} or {tloop} or {ploop} or {mtk}
{ext} value = {x} or {y} or {z} or {xy} or {yz} or {xz} = external dimensions
sets the external dimensions used to calculate the scalar pressure
{strain} values = e_x e_y = initial strain
usually not needed, but may be needed to resume a run with a data file.
{iso}, {x}, {y}, {z}, {tchain}, {pchain}, {tloop}, {ploop}, {mtk} keywords
documented by the "fix npt"_fix_nh.html command :pre
:ule
[Examples:]
fix uniax_nvt all nvt/uef temp 400 400 100 erate 0.00001 -0.000005
fix biax_nvt all nvt/uef temp 400 400 100 erate 0.000005 0.000005
fix uniax_npt all npt/uef temp 400 400 300 iso 1 1 3000 erate 0.00001 -0.000005 ext yz
fix biax_npt all npt/uef temp 400 400 100 erate -0.00001 0.000005 x 1 1 3000 :pre
[Description:]
This fix can be used to simulate non-equilibrium molecular dynamics
(NEMD) under diagonal flow fields, including uniaxial and biaxial
flow. Simulations under continuous extensional flow may be carried
out for an indefinite amount of time. It is an implementation of the
boundary conditions from "(Dobson)"_#Dobson, and also uses numerical
lattice reduction as was proposed by "(Hunt)"_#Hunt. The lattice
reduction algorithm is from "(Semaev)"_Semaev. The fix is intended for
simulations of homogeneous flows, and integrates the SLLOD equations
of motion, originally proposed by Hoover and Ladd (see "(Evans and
Morriss)"_#Sllod). Additional detail about this implementation can be
found in "(Nicholson and Rutledge)"_#Nicholson.
Note that NEMD simulations of a continuously strained system can be
performed using the "fix deform"_fix_deform.html, "fix
nvt/sllod"_fix_nvt_sllod.html, and "compute
temp/deform"_compute_temp_deform.html commands.
The applied flow field is set by the {eps} keyword. The values
{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
traceless, and therefore the strain rate in the zz direction is eqal
to -({edot_x} + {edot_y}).
NOTE: Due to an instability in the SLLOD equations under extension,
"fix momentum"_fix_momentum.html should be used to regularly reset the
linear momentum.
The boundary conditions require a simulation box that does not have a
consistent alignment relative to the applied flow field. Since LAMMPS
utilizes an upper-triangular simulation box, it is not possible to
express the evolving simulation box in the same coordinate system as
the flow field. This fix keeps track of two coordinate systems: the
flow frame, and the upper triangular LAMMPS frame. The coordinate
systems are related to each other through the QR decomposition, as is
illustrated in the image below.
:c,image(JPG/uef_frames.jpg)
During most molecular dynamics operations, the system is represented
in the LAMMPS frame. Only when the positions and velocities are
updated is the system rotated to the flow frame, and it is rotated
back to the LAMMPS frame immediately afterwards. For this reason, all
vector-valued quantities (except for the tensors from
"compute_pressure/uef"_compute_pressure_uef.html and
"compute_temp/uef"_compute_temp_uef.html) will be computed in the
LAMMPS frame. Rotationally invariant scalar quantities like the
temperature and hydrostatic pressure are frame-invariant and will be
computed correctly. Additionally, the system is in the LAMMPS frame
during all of the output steps, and therefore trajectory files made
using the dump command will be in the LAMMPS frame unless the
"dump_cfg/uef"_dump_cfg_uef.html command is used.
:line
Temperature control is achieved with the default Nose-Hoover style
thermostat documented in "fix npt"_fix_nh.html. When this fix is
active, only the peculiar velocity of each atom is stored, defined as
the velocity relative to the streaming velocity. This is in contrast
to "fix nvt/sllod"_fix_nvt_sllod.html, which uses a lab-frame
velocity, and removes the contribution from the streaming velocity in
order to compute the temperature.
Pressure control is achieved using the default Nose-Hoover barostat
documented in "fix npt"_fix_nh.html. There are two ways to control the
pressure using this fix. The first method involves using the {ext}
keyword along with the {iso} pressure style. With this method, the
pressure is controlled by scaling the simulation box isotropically to
achieve the average pressure only in the directions specified by
{ext}. For example, if the {ext} value is set to {xy}, the average
pressure (Pxx+Pyy)/2 will be controlled.
This example command will control the total hydrostatic pressure under
uniaxial tension:
fix f1 all npt/uef temp 0.7 0.7 0.5 iso 1 1 5 erate -0.5 -0.5 ext xyz :pre
This example command will control the average stress in compression
directions, which would typically correspond to free surfaces under
drawing with uniaxial tension:
fix f2 all npt/uef temp 0.7 0.7 0.5 iso 1 1 5 erate -0.5 -0.5 ext xy :pre
The second method for pressure control involves setting the normal
stresses using the {x}, {y} , and/or {z} keywords. When using this
method, the same pressure must be specified via {Pstart} and {Pstop}
for all dimensions controlled. Any choice of pressure conditions that
would cause LAMMPS to compute a deviatoric stress are not permissible
and will result in an error. Additionally, all dimensions with
controlled stress must have the same applied strain rate. The {ext}
keyword must be set to the default value ({xyz}) when using this
method.
For example, the following commands will work:
fix f3 all npt/uef temp 0.7 0.7 0.5 x 1 1 5 y 1 1 5 erate -0.5 -0.5
fix f4 all npt/uef temp 0.7 0.7 0.5 z 1 1 5 erate 0.5 0.5 :pre
The following commands will not work:
fix f5 all npt/uef temp 0.7 0.7 0.5 x 1 1 5 z 1 1 5 erate -0.5 -0.5
fix f6 all npt/uef temp 0.7 0.7 0.5 x 1 1 5 z 2 2 5 erate 0.5 0.5 :pre
:line
These fix computes a temperature and pressure each timestep. To do
this, it creates its own computes of style "temp/uef" and
"pressure/uef", as if one of these two sets of commands had been
issued:
compute fix-ID_temp group-ID temp/uef
compute fix-ID_press group-ID pressure/uef fix-ID_temp :pre
compute fix-ID_temp all temp/uef
compute fix-ID_press all pressure/uef fix-ID_temp :pre
See the "compute temp/uef"_compute_temp_uef.html and "compute
pressure/uef"_compute_pressure_uef.html commands for details. Note
that the IDs of the new computes are the fix-ID + underscore + "temp"
or fix_ID + underscore + "press".
[Restart, fix_modify, output, run start/stop, minimize info:]
The fix writes the state of all the thermostat and barostat variables,
as well as the cumulative strain applied, to "binary restart
files"_restart.html. See the "read_restart"_read_restart.html command
for info on how to re-specify a fix in an input script that reads a
restart file, so that the operation of the fix continues in an
uninterrupted fashion.
NOTE: It is not necessary to set the {strain} keyword when resuming a
run from a restart file. Only for resuming from data files, which do
not contain the cumulative applied strain, will this keyword be
necessary.
This fix can be used with the "fix_modify"_fix_modify.html {temp} and
{press} options. The temperature and pressure computes used must be of
type {temp/uef} and {pressure/uef}.
This fix computes the same global scalar and vecor quantities as "fix
npt"_fix_nh.html.
The fix is not invoked during "energy minimization"_minimize.html.
[Restrictions:]
This fix is part of the USER-UEF package. It is only enabled if LAMMPS
was built with that package. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.
Due to requirements of the boundary conditions, when the {strain}
keyword is set to zero (or unset), the initial simulation box must be
cubic and have style triclinic. If the box is initially of type ortho,
use "change_box"_change_box.html before invoking the fix.
NOTE: When resuming from restart files, you may need to use "box tilt
large"_box.html since lammps has internal criteria from lattice
reduction that are not the same as the criteria in the numerical
lattice reduction algorithm.
[Related commands:]
"fix nvt"_fix_nh.html, "fix nvt/sllod"_fix_nvt_sllod.html, "compute
temp/uef"_compute_temp_uef.html, "compute
pressure/uef"_compute_pressure_uef.html, "dump
cfg/uef"_dump_cfg_uef.html
[Default:]
The default keyword values specific to this fix are exy = xyz, strain
= 0 0. The remaining defaults are the same as for {fix
npt}_fix_nh.html except tchain = 1. The reason for this change is
given in "fix nvt/sllod"_fix_nvt_sllod.html.
:line
:link(Dobson)
[(Dobson)] Dobson, J Chem Phys, 141, 184103 (2014).
:link(Hunt)
[(Hunt)] Hunt, Mol Simul, 42, 347 (2016).
:link(Semaev)
[(Semaev)] Semaev, Cryptography and Lattices, 181 (2001).
:link(Sllod)
[(Evans and Morriss)] Evans and Morriss, Phys Rev A, 30, 1528 (1984).
:link(Nicholson)
[(Nicholson and Rutledge)] Nicholson and Rutledge, J Chem Phys, 145,
244903 (2016).

56
doc/src/fix_rhok.txt Normal file
View File

@ -0,0 +1,56 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
fix rhok command :h3
fix ID group-ID rhok nx ny nz K a :pre
ID, group-ID are documented in "fix"_fix.html command
nx, ny, nz = k-vektor of collective density field
K = spring constant of bias potential
a = anchor point of bias potential :ul
[Examples:]
fix bias all rhok 16 0 0 4.0 16.0
fix 1 all npt temp 0.8 0.8 4.0 z 2.2 2.2 8.0
# output of 4 values from fix rhok: U_bias rho_k_RE rho_k_IM |rho_k|
thermo_style custom step temp pzz lz f_bias f_bias\[1\] f_bias\[2\] f_bias\[3\] :pre
[Description:]
The fix applies a force to atoms given by the potential
:c,image(Eqs/fix_rhok.jpg)
as described in "(Pedersen)"_#Pedersen.
This field, which biases configurations with long-range order, can be
used to study crystal-liquid interfaces and determine melting
temperatures "(Pedersen)"_#Pedersen.
An example of using the interface pinning method is located in the
{examples/USER/misc/rhok} directory.
[Restrictions:]
This fix is part of the MISC package. It is only enabled if LAMMPS
was built with that package. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.
[Related commands:]
"thermo_style"_thermo_style.html
[Default:] none
:line
:link(Pedersen)
[(Pedersen)] Pedersen, J. Chem. Phys., 139, 104102 (2013).

View File

@ -26,6 +26,9 @@ style = {rigid} or {rigid/nve} or {rigid/nvt} or {rigid/npt} or {rigid/nph} or {
bodystyle = {single} or {molecule} or {group} :l
{single} args = none
{molecule} args = none
{custom} args = {i_propname} or {v_varname}
i_propname = an integer property defined via fix property/atom
v_varname = an atom-style or atomfile-style variable
{group} args = N groupID1 groupID2 ...
N = # of groups
groupID1, groupID2, ... = list of N group IDs :pre
@ -80,6 +83,16 @@ fix 1 rods rigid/npt molecule temp 300.0 300.0 100.0 iso 0.5 0.5 10.0
fix 1 particles rigid/npt molecule temp 1.0 1.0 5.0 x 0.5 0.5 1.0 z 0.5 0.5 1.0 couple xz
fix 1 water rigid/nph molecule iso 0.5 0.5 1.0
fix 1 particles rigid/npt/small molecule temp 1.0 1.0 1.0 iso 0.5 0.5 1.0 :pre
variable bodyid atom 1.0*gmask(clump1)+2.0*gmask(clump2)+3.0*gmask(clump3)
fix 1 clump rigid custom v_bodyid :pre
variable bodyid atomfile bodies.txt
fix 1 clump rigid custom v_bodyid :pre
fix 0 all property/atom i_bodyid
read_restart data.rigid fix 0 NULL Bodies
fix 1 clump rigid/small custom i_bodyid :pre
[Description:]
@ -100,7 +113,7 @@ of a biomolecule such as a protein.
Example of small rigid bodies are patchy nanoparticles, such as those
modeled in "this paper"_#Zhang1 by Sharon Glotzer's group, clumps of
granular particles, lipid molecules consiting of one or more point
granular particles, lipid molecules consisting of one or more point
dipoles connected to other spheroids or ellipsoids, irregular
particles built from line segments (2d) or triangles (3d), and
coarse-grain models of nano or colloidal particles consisting of a
@ -203,11 +216,11 @@ most one rigid body. Which atoms are in which bodies can be defined
via several options.
NOTE: With the {rigid/small} styles, which require that {bodystyle} be
specified as {molecule}, you can define a system that has no rigid
bodies initially. This is useful when you are using the {mol} keyword
in conjunction with another fix that is adding rigid bodies on-the-fly
as molecules, such as "fix deposit"_fix_deposit.html or "fix
pour"_fix_pour.html.
specified as {molecule} or {custom}, you can define a system that has
no rigid bodies initially. This is useful when you are using the {mol}
keyword in conjunction with another fix that is adding rigid bodies
on-the-fly as molecules, such as "fix deposit"_fix_deposit.html or
"fix pour"_fix_pour.html.
For bodystyle {single} the entire fix group of atoms is treated as one
rigid body. This option is only allowed for the {rigid} styles.
@ -222,6 +235,15 @@ molecule ID = 0) surrounding rigid bodies, this may not be what you
want. Thus you should be careful to use a fix group that only
includes atoms you want to be part of rigid bodies.
Bodystyle {custom} is similar to bodystyle {molecule}, however some
custom properties are used to group atoms into rigid bodies. The
special case for molecule/body ID = 0 is not available. Possible
custom properties are an integer property associated with atoms through
"fix property/atom"_fix_property_atom.html or an atom style variable
or an atomfile style variable. For the latter two, the variable value
will be rounded to an integer and then rigid bodies defined from
those values.
For bodystyle {group}, each of the listed groups is treated as a
separate rigid body. Only atoms that are also in the fix group are
included in each rigid body. This option is only allowed for the

View File

@ -59,6 +59,7 @@ Fixes :h1
fix_langevin
fix_langevin_drude
fix_langevin_eff
fix_latte
fix_lb_fluid
fix_lb_momentum
fix_lb_pc
@ -76,6 +77,7 @@ Fixes :h1
fix_neb
fix_nh
fix_nh_eff
fix_nh_uef
fix_nph_asphere
fix_nph_body
fix_nph_sphere
@ -124,6 +126,7 @@ Fixes :h1
fix_reaxc_species
fix_recenter
fix_restrain
fix_rhok
fix_rigid
fix_rx
fix_saed_vtk

View File

@ -62,6 +62,7 @@ dump_modify.html
dump_molfile.html
dump_netcdf.html
dump_vtk.html
dump_cfg_uef.html
echo.html
fix.html
fix_modify.html
@ -187,6 +188,7 @@ fix_ipi.html
fix_langevin.html
fix_langevin_drude.html
fix_langevin_eff.html
fix_latte.html
fix_lb_fluid.html
fix_lb_momentum.html
fix_lb_pc.html
@ -231,6 +233,7 @@ fix_nvt_manifold_rattle.html
fix_nvt_sllod.html
fix_nvt_sllod_eff.html
fix_nvt_sphere.html
fix_nh_uef.html
fix_oneway.html
fix_orient.html
fix_phonon.html
@ -253,6 +256,7 @@ fix_reaxc_species.html
fix_recenter.html
fix_restrain.html
fix_rigid.html
fix_rhok.html
fix_rx.html
fix_saed_vtk.html
fix_setforce.html
@ -354,6 +358,7 @@ compute_pe.html
compute_pe_atom.html
compute_plasticity_atom.html
compute_pressure.html
compute_pressure_uef.html
compute_property_atom.html
compute_property_chunk.html
compute_property_local.html
@ -403,6 +408,7 @@ compute_temp_region.html
compute_temp_region_eff.html
compute_temp_rotate.html
compute_temp_sphere.html
compute_temp_uef.html
compute_ti.html
compute_torque_chunk.html
compute_vacf.html
@ -514,7 +520,7 @@ pair_zero.html
bond_class2.html
bond_fene.html
bond_fene_expand.html
bond_oxdna.html
bond_gromos.html
bond_harmonic.html
bond_harmonic_shift.html
bond_harmonic_shift_cut.html
@ -522,6 +528,7 @@ bond_hybrid.html
bond_morse.html
bond_none.html
bond_nonlinear.html
bond_oxdna.html
bond_quartic.html
bond_table.html
bond_zero.html

View File

@ -62,7 +62,7 @@ args = arguments specific to the style :l
{no_affinity} values = none
{kokkos} args = keyword value ...
zero or more keyword/value pairs may be appended
keywords = {neigh} or {neigh/qeq} or {newton} or {binsize} or {comm} or {comm/exchange} or {comm/forward}
keywords = {neigh} or {neigh/qeq} or {newton} or {binsize} or {comm} or {comm/exchange} or {comm/forward} or {comm/reverse}
{neigh} value = {full} or {half}
full = full neighbor list
half = half neighbor list built in thread-safe manner
@ -75,9 +75,10 @@ args = arguments specific to the style :l
{binsize} value = size
size = bin size for neighbor list construction (distance units)
{comm} value = {no} or {host} or {device}
use value for both comm/exchange and comm/forward
use value for comm/exchange and comm/forward and comm/reverse
{comm/exchange} value = {no} or {host} or {device}
{comm/forward} value = {no} or {host} or {device}
{comm/reverse} value = {no} or {host} or {device}
no = perform communication pack/unpack in non-KOKKOS mode
host = perform pack/unpack on host (e.g. with OpenMP threading)
device = perform pack/unpack on device (e.g. on GPU)
@ -429,17 +430,18 @@ Coulombic solver"_kspace_style.html because the GPU is faster at
performing pairwise interactions, then this rule of thumb may give too
large a binsize.
The {comm} and {comm/exchange} and {comm/forward} keywords determine
The {comm} and {comm/exchange} and {comm/forward} and {comm/reverse} keywords determine
whether the host or device performs the packing and unpacking of data
when communicating per-atom data between processors. "Exchange"
communication happens only on timesteps that neighbor lists are
rebuilt. The data is only for atoms that migrate to new processors.
"Forward" communication happens every timestep. The data is for atom
"Forward" communication happens every timestep. "Reverse" communication
happens every timestep if the {newton} option is on. The data is for atom
coordinates and any other atom properties that needs to be updated for
ghost atoms owned by each processor.
The {comm} keyword is simply a short-cut to set the same value
for both the {comm/exchange} and {comm/forward} keywords.
for both the {comm/exchange} and {comm/forward} and {comm/reverse} keywords.
The value options for all 3 keywords are {no} or {host} or {device}.
A value of {no} means to use the standard non-KOKKOS method of

View File

@ -17,6 +17,7 @@ pair_style born/coul/long/omp command :h3
pair_style born/coul/msm command :h3
pair_style born/coul/msm/omp command :h3
pair_style born/coul/wolf command :h3
pair_style born/coul/wolf/cs command :h3
pair_style born/coul/wolf/gpu command :h3
pair_style born/coul/wolf/omp command :h3
pair_style born/coul/dsf command :h3
@ -36,7 +37,7 @@ args = list of arguments for a particular style :ul
{born/coul/msm} args = cutoff (cutoff2)
cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
{born/coul/wolf} args = alpha cutoff (cutoff2)
{born/coul/wolf} or {born/coul/wolf/cs} args = alpha cutoff (cutoff2)
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
@ -65,6 +66,7 @@ pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 :pre
pair_style born/coul/wolf 0.25 10.0
pair_style born/coul/wolf 0.25 10.0 9.0
pair_style born/coul/wolf/cs 0.25 10.0 9.0
pair_coeff * * 6.08 0.317 2.340 24.18 11.51
pair_coeff 1 1 6.08 0.317 2.340 24.18 11.51 :pre
@ -106,8 +108,9 @@ damped shifted force model as in the "coul/dsf"_pair_coul.html style.
Style {born/coul/long/cs} is identical to {born/coul/long} except that
a term is added for the "core/shell model"_Section_howto.html#howto_25
to allow charges on core and shell particles to be separated by r =
0.0. The same correction is introduced for {born/coul/dsf/cs} style
which is identical to {born/coul/dsf}.
0.0. The same correction is introduced for the {born/coul/dsf/cs}
style which is identical to {born/coul/dsf}. And likewise for
{born/coul/wolf/cs} style which is identical to {born/coul/wolf}.
Note that these potentials are related to the "Buckingham
potential"_pair_buck.html.

View File

@ -29,6 +29,7 @@ pair_style coul/streitz command :h3
pair_style coul/wolf command :h3
pair_style coul/wolf/kk command :h3
pair_style coul/wolf/omp command :h3
pair_style coul/wolf/cs command :h3
pair_style tip4p/cut command :h3
pair_style tip4p/long command :h3
pair_style tip4p/cut/omp command :h3
@ -43,6 +44,7 @@ pair_style coul/long cutoff
pair_style coul/long/cs cutoff
pair_style coul/long/gpu cutoff
pair_style coul/wolf alpha cutoff
pair_style coul/wolf/cs alpha cutoff
pair_style coul/streitz cutoff keyword alpha
pair_style tip4p/cut otype htype btype atype qdist cutoff
pair_style tip4p/long otype htype btype atype qdist cutoff :pre
@ -72,6 +74,7 @@ pair_style coul/msm 10.0
pair_coeff * * :pre
pair_style coul/wolf 0.2 9.0
pair_style coul/wolf/cs 0.2 9.0
pair_coeff * * :pre
pair_style coul/streitz 12.0 ewald
@ -202,7 +205,9 @@ interactions outside that distance are computed in reciprocal space.
Style {coul/long/cs} is identical to {coul/long} except that a term is
added for the "core/shell model"_Section_howto.html#howto_25 to allow
charges on core and shell particles to be separated by r = 0.0.
charges on core and shell particles to be separated by r = 0.0. The
same correction is introduced for the {coul/wolf/cs} style which is
identical to {coul/wolf}.
Styles {tip4p/cut} and {tip4p/long} implement the coulomb part of
the TIP4P water model of "(Jorgensen)"_#Jorgensen3, which introduces

View File

@ -9,12 +9,13 @@
pair_style born/coul/long/cs command :h3
pair_style buck/coul/long/cs command :h3
pair_style born/coul/dsf/cs command :h3
pair_style born/coul/wolf/cs command :h3
[Syntax:]
pair_style style args :pre
style = {born/coul/long/cs} or {buck/coul/long/cs} or {born/coul/dsf/cs}
style = {born/coul/long/cs} or {buck/coul/long/cs} or {born/coul/dsf/cs} or {born/coul/wolf/cs}
args = list of arguments for a particular style :ul
{born/coul/long/cs} args = cutoff (cutoff2)
cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
@ -26,6 +27,10 @@ args = list of arguments for a particular style :ul
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (distance units) :pre
{born/coul/wolf/cs} args = alpha cutoff (cutoff2)
alpha = damping parameter (inverse distance units)
cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units)
cutoff2 = global cutoff for Coulombic (optional) (distance units)
[Examples:]
@ -41,6 +46,10 @@ pair_style born/coul/dsf/cs 0.1 10.0 12.0
pair_coeff * * 0.0 1.00 0.00 0.00 0.00
pair_coeff 1 1 480.0 0.25 0.00 1.05 0.50 :pre
pair_style born/coul/wolf/cs 0.25 10.0 12.0
pair_coeff * * 0.0 1.00 0.00 0.00 0.00
pair_coeff 1 1 480.0 0.25 0.00 1.05 0.50 :pre
[Description:]
These pair styles are designed to be used with the adiabatic
@ -73,13 +82,21 @@ the core and shell, epsilon is the dielectric constant and r_min is the
minimal distance.
The pair style {born/coul/dsf/cs} is identical to the
"pair_style born/coul/dsf"_pair_born.html style, which uses the
"pair_style born/coul/dsf"_pair_born.html style, which uses
the damped shifted force model as in "coul/dsf"_pair_coul.html
to compute the Coulomb contribution. This approach does not require
a long-range solver, thus the only correction is the addition of a
minimal distance to avoid the possible r = 0.0 case for a
core/shell pair.
The pair style {born/coul/wolf/cs} is identical to the
"pair_style born/coul/wolf"_pair_born.html style, which uses
the Wolf summation as in "coul/wolf"_pair_coul.html to compute
the Coulomb contribution. This approach does not require
a long-range solver, thus the only correction is the addition of a
minimal distance to avoid the possible r = 0.0 case for a
core/shell pair.
[Restrictions:]
These pair styles are part of the CORESHELL package. They are only

View File

@ -8,6 +8,7 @@
pair_style dpd command :h3
pair_style dpd/gpu command :h3
pair_style dpd/intel command :h3
pair_style dpd/omp command :h3
pair_style dpd/tstat command :h3
pair_style dpd/tstat/gpu command :h3

View File

@ -294,7 +294,7 @@ distribution have a ".cdeam" suffix.
Style {eam/fs} computes pairwise interactions for metals and metal
alloys using a generalized form of EAM potentials due to Finnis and
Sinclair "(Finnis)"_#Finnis. The total energy Ei of an atom I is
Sinclair "(Finnis)"_#Finnis1. The total energy Ei of an atom I is
given by
:c,image(Eqs/pair_eam_fs.jpg)
@ -442,7 +442,7 @@ of Physics: Condensed Matter, 16, S2629 (2004).
[(Daw)] Daw, Baskes, Phys Rev Lett, 50, 1285 (1983).
Daw, Baskes, Phys Rev B, 29, 6443 (1984).
:link(Finnis)
:link(Finnis1)
[(Finnis)] Finnis, Sinclair, Philosophical Magazine A, 50, 45 (1984).
:link(Stukowski)

View File

@ -0,0 +1,74 @@
# The Interface Pinning method for studying solid-liquid transitions
In this example we will use the interface pinnig method to study a solid-liquid transition.
This is done by adding a harmonic potential to the Hamiltonian
that bias the system towards two-phase configurations:
U_bias = 0.5*K*(Q-a)^2
The bias field couple to an order-parameter of crystallinity Q. The implementation use long-range order:
Q=|rho_k|,
where rho_k is the collective density field of the wave-vector k.
For future reference we note that the structure factor S(k) is given by the variance of the collective density field:
S(k)=|rho_k|^2.
### About the method
It is recommended to get familiar with the interface pinning method by reading:
[Ulf R. Pedersen, JCP 139, 104102 (2013)](http://dx.doi.org/10.1063/1.4818747)
A detailed bibliography is provided at
<http://urp.dk/interface_pinning.htm>
and a brief introduction can be found at YouTube:
[![Interface Pinning](http://img.youtube.com/vi/F_79JZNdyoQ/0.jpg)](http://www.youtube.com/watch?v=F_79JZNdyoQ)
### Implimentation in LAMMPS
For this example we will be using the rhok fix.
fix [name] [groupID] rhok [nx] [ny] [nz] [K] [a]
This fix include a harmonic bias potential U_bias=0.5*K*(|rho_k|-a)^2 to the force calculation.
The elements of the wave-vector k is given by the nx, ny and nz input:
k_x = (2 pi / L_x) * n_x, k_y = (2 pi / L_y) * n_y and k_z = (2 pi / L_z) * n_z.
We will use a k vector that correspond to a Bragg peak.
## Example: the Lennard-Jones (LJ) model
We will use the interface pinning method to study melting of the LJ model
at temperature 0.8 and pressure 2.185. This is a coexistence state-point, and the method
can be used to show this. The present directory contains the input files that we will use:
in.crystal
in.setup
in.pinning
1. First we will determine the density of the crystal with the LAMMPS input file in.crystal.
From the output we get that the average density after equilibration is 0.9731.
We need this density to ensure hydrostatic pressure when in a two-phase simulation.
2. Next, we setup a two-phase configuration using in.setup.
3. Finally, we run a two-phase simulation with the bias-field applied using in.pinning.
The last column in the output show |rho_k|. We note that after a equilibration period
the value fluctuates around the anchor point (a) -- showing that this is indeed a coexistence
state point.
The reference [JCP 139, 104102 (2013)](http://dx.doi.org/10.1063/1.4818747) gives details on using the method to find coexistence state points,
and the reference [JCP 142, 044104 (2015)](http://dx.doi.org/10.1063/1.4818747) show how the crystal growth rate can be computed from fluctuations.
That method have been experienced to be most effective in the slightly super-heated regime above the melting temperature.
## Contact
Ulf R. Pedersen;
<http://www.urp.dk>;
ulf AT urp.dk

View File

@ -0,0 +1,36 @@
units lj
dimension 3
boundary p p p
atom_style atomic
# truncated and shifted LJ potential
pair_style lj/cut 2.5
pair_modify shift yes
lattice fcc 0.9731
region my_box block 0 8.0 0 8.0 0 20.0
create_box 1 my_box
region particles block 0 8.0 0 8.0 0 20.0
create_atoms 1 region particles
pair_coeff 1 1 1.0 1.0 2.5
pair_modify tail no
pair_modify shift yes
mass 1 1.0
velocity all create 1.6 1 mom yes rot yes
# simulation parameters
neighbor 0.6 bin
timestep 0.004
run_style verlet
fix ensemble all npt temp 0.8 0.8 4.0 aniso 2.185 2.185 8.0 pchain 32
# computing long-range order (no bias is added since k=0)
fix bias all rhok 16 0 0 0.0 0.0
# output
thermo 50
thermo_style custom step temp press density f_bias[3]
# dump dumpXYZ all xyz 2000 traj.xyz
# NOTE: this is cut short to 5000 steps for demonstration purposes
# run 100000
run 5000

View File

@ -0,0 +1,33 @@
units lj
dimension 3
boundary p p p
atom_style atomic
# truncated and shifted LJ potential
pair_style lj/cut 2.5
pair_modify shift yes
read_data data.halfhalf
pair_coeff 1 1 1.0 1.0 2.5
mass 1 1.0
# simulation parameters
neighbor 0.6 bin
timestep 0.004
run_style verlet
velocity all create 0.8 1 mom yes rot yes
fix ensemble all npt temp 0.8 0.8 4.0 z 2.185 2.185 8.0
fix 100 all momentum 100 linear 1 1 1
# harmonic rho_k bias-field
# nx ny nz K a
fix bias all rhok 16 0 0 4.0 26.00
# output U_bias rho_k_RE rho_k_IM |rho_k|
thermo_style custom step temp pzz pe lz f_bias f_bias[1] f_bias[2] f_bias[3]
thermo 50
# dump dumpXYZ all xyz 500 traj.xyz
# NOTE: run reduced for demonstration purposes
# run 50000
run 5000

View File

@ -0,0 +1,41 @@
units lj
dimension 3
boundary p p p
atom_style atomic
# truncated and shifted LJ potential
pair_style lj/cut 2.5
pair_modify shift yes
# fcc lattice
lattice fcc 0.9731
region my_box block 0 8.0 0 8.0 0 20.0
create_box 1 my_box
region particles block 0 8.0 0 8.0 0 20.0
create_atoms 1 region particles
pair_coeff 1 1 1.0 1.0 2.5
mass 1 1.0
change_box all z final 0.0 34 remap units box
# select particles in one side of the elongated box
region left plane 0 0 10 0 0 1
group left region left
velocity left create 6.0 1 mom yes rot yes
# simulation parameters
neighbor 0.6 bin
timestep 0.004
run_style verlet
fix ensemble left nve # Note: only move particle in left-hand side
fix langevin left langevin 3.0 0.8 100.0 2017
# outout
thermo_style custom step temp pzz pe lz
thermo 100
# dump dumpXYZ all xyz 100 traj.xyz
# run reduced for demonstration purposes
# run 10000
run 5000
write_data data.halfhalf

View File

@ -0,0 +1,187 @@
LAMMPS (22 Sep 2017)
using 1 OpenMP thread(s) per MPI task
units lj
dimension 3
boundary p p p
atom_style atomic
# truncated and shifted LJ potential
pair_style lj/cut 2.5
pair_modify shift yes
lattice fcc 0.9731
Lattice spacing in x,y,z = 1.6019 1.6019 1.6019
region my_box block 0 8.0 0 8.0 0 20.0
create_box 1 my_box
Created orthogonal box = (0 0 0) to (12.8152 12.8152 32.0379)
1 by 1 by 1 MPI processor grid
region particles block 0 8.0 0 8.0 0 20.0
create_atoms 1 region particles
Created 5120 atoms
pair_coeff 1 1 1.0 1.0 2.5
pair_modify tail no
pair_modify shift yes
mass 1 1.0
velocity all create 1.6 1 mom yes rot yes
# simulation parameters
neighbor 0.6 bin
timestep 0.004
run_style verlet
fix ensemble all npt temp 0.8 0.8 4.0 aniso 2.185 2.185 8.0 pchain 32
# computing long-range order (no bias is added since k=0)
fix bias all rhok 16 0 0 0.0 0.0
# output
thermo 50
thermo_style custom step temp press density f_bias[3]
# dump dumpXYZ all xyz 2000 traj.xyz
# NOTE: this is cut short to 5000 steps for demonstration purposes
# run 100000
run 5000
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.1
ghost atom cutoff = 3.1
binsize = 1.55, bins = 9 9 21
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 4.523 | 4.523 | 4.523 Mbytes
Step Temp Press Density f_bias[3]
0 1.6 -2.7568106 0.9731 71.554175
50 0.78457786 3.1029192 0.97362639 54.327705
100 0.85528971 2.4670259 0.97213457 55.189308
150 0.85241818 2.3210306 0.9698027 56.138125
200 0.82301385 2.3448692 0.96708227 55.735326
250 0.83076383 2.0890816 0.96425763 55.320625
300 0.81602823 2.0118796 0.96173925 54.095736
350 0.81084006 1.9122192 0.95979392 54.526429
400 0.80776593 1.8502174 0.95869117 54.434901
450 0.80694697 1.8435873 0.95851085 53.20809
500 0.81384248 1.8111331 0.95917305 53.419395
550 0.81027072 1.9222272 0.96056019 54.36723
600 0.81199582 2.0291945 0.96248486 54.888582
650 0.82507964 2.0706462 0.96467227 55.807137
700 0.832562 2.1471442 0.9668913 56.721267
750 0.83358138 2.2674672 0.968984 56.723838
800 0.83477542 2.3658275 0.97072603 56.234689
850 0.84722921 2.3506233 0.97189674 56.262424
900 0.83526965 2.4532068 0.97248856 56.219103
950 0.83174583 2.4763958 0.97249527 56.409813
1000 0.83022557 2.4334341 0.97194093 55.890858
1050 0.83208978 2.3478416 0.97092452 54.934691
1100 0.82789545 2.272404 0.9696152 54.90894
1150 0.82678617 2.1798046 0.96819776 54.927782
1200 0.8088841 2.1960256 0.96687735 54.914327
1250 0.81512784 2.0736261 0.96579008 53.927291
1300 0.81271067 2.0297138 0.96504188 54.289698
1350 0.8201767 1.9493976 0.96464115 55.342131
1400 0.80880489 2.0016987 0.96468463 55.757758
1450 0.8114196 2.0282699 0.96514115 55.865676
1500 0.81085664 2.0838361 0.96591869 56.553425
1550 0.81257075 2.1283157 0.96694549 56.921544
1600 0.82617645 2.1017986 0.96817075 56.858808
1650 0.82616141 2.1885582 0.96941073 56.717917
1700 0.81634174 2.2996967 0.97047447 56.453745
1750 0.82447573 2.2924266 0.97128663 56.916813
1800 0.83610432 2.236456 0.97178453 56.400752
1850 0.82479203 2.3103493 0.97197318 55.891368
1900 0.82298992 2.3059289 0.97181084 55.680563
1950 0.82098556 2.2801003 0.97138609 55.754406
2000 0.8181203 2.2480175 0.97078591 55.801363
2050 0.82822293 2.1208884 0.97004107 55.687
2100 0.7976818 2.2711199 0.96930169 55.459844
2150 0.81817848 2.0680351 0.96860201 56.514731
2200 0.80707457 2.1112141 0.96810519 55.504308
2250 0.81651111 2.0077603 0.96781161 55.635702
2300 0.80634534 2.0662241 0.96777177 56.051086
2350 0.80892831 2.0619333 0.96799037 56.548711
2400 0.82454203 1.9585394 0.9684672 56.695235
2450 0.81517178 2.075283 0.96921622 56.613082
2500 0.80969595 2.1624581 0.97010528 56.57516
2550 0.80862964 2.2088622 0.97100774 57.072594
2600 0.81468816 2.2293973 0.97192868 56.879212
2650 0.82063107 2.2244887 0.97269715 55.454502
2700 0.81691618 2.2789954 0.97319841 54.421943
2750 0.8141787 2.2981247 0.97340453 54.469921
2800 0.81973871 2.2422136 0.9733278 55.959235
2850 0.82037399 2.201016 0.97302727 56.685826
2900 0.80650164 2.2672955 0.9726128 56.574395
2950 0.81752783 2.1317541 0.97207545 56.809412
3000 0.80836945 2.1461483 0.97151192 57.205206
3050 0.80785109 2.1189056 0.97103049 57.418763
3100 0.79835058 2.146416 0.97069705 57.329383
3150 0.79792089 2.1388267 0.97051679 57.279852
3200 0.79934603 2.1049562 0.97046851 56.351494
3250 0.79523232 2.1549779 0.97063956 56.00356
3300 0.8004458 2.1145975 0.97096375 55.725509
3350 0.79772742 2.166292 0.97143785 55.558075
3400 0.80621087 2.1309217 0.97198456 55.816704
3450 0.80540626 2.1727557 0.97263267 55.671283
3500 0.80867606 2.1905129 0.97321538 55.390086
3550 0.80917896 2.2144872 0.97370472 55.742085
3600 0.80930722 2.2288938 0.974093 56.23064
3650 0.80390523 2.2777327 0.97431886 56.084731
3700 0.79620093 2.3143541 0.97435103 55.942797
3750 0.80252393 2.2564638 0.9741875 56.042055
3800 0.78981264 2.3156481 0.9739121 55.971352
3850 0.80391951 2.1804938 0.97351088 55.855858
3900 0.81268129 2.0855818 0.97308521 56.288315
3950 0.7958182 2.175259 0.97273088 56.140141
4000 0.80054484 2.1163279 0.97243129 56.366818
4050 0.79760187 2.105362 0.97225308 56.684619
4100 0.79283424 2.1357603 0.972206 56.203341
4150 0.79543088 2.1036951 0.97227608 56.606315
4200 0.79410999 2.1402049 0.97253758 56.277478
4250 0.7985469 2.1285154 0.97293622 56.356076
4300 0.79700387 2.1470614 0.97337091 56.722298
4350 0.80479321 2.1403244 0.97384674 57.212574
4400 0.79505512 2.224463 0.97434415 56.561877
4450 0.78346648 2.3347865 0.97478611 56.681362
4500 0.79811284 2.259123 0.97510069 57.365929
4550 0.80015561 2.2345254 0.97523653 57.34799
4600 0.79648318 2.2651869 0.97525975 57.502318
4650 0.80524865 2.1943025 0.97507638 57.702488
4700 0.80397778 2.1758629 0.97478268 57.162107
4750 0.78914913 2.2470191 0.9744625 56.849565
4800 0.79324889 2.2028993 0.97408817 57.572344
4850 0.78993209 2.181763 0.97373372 57.683552
4900 0.79041263 2.1604768 0.97348692 56.922312
4950 0.79741332 2.1105901 0.97332545 57.488932
5000 0.7891178 2.163416 0.97328963 57.365252
Loop time of 33.6467 on 1 procs for 5000 steps with 5120 atoms
Performance: 51357.258 tau/day, 148.603 timesteps/s
99.7% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 24.699 | 24.699 | 24.699 | 0.0 | 73.41
Neigh | 2.8894 | 2.8894 | 2.8894 | 0.0 | 8.59
Comm | 0.34907 | 0.34907 | 0.34907 | 0.0 | 1.04
Output | 0.0056 | 0.0056 | 0.0056 | 0.0 | 0.02
Modify | 5.5718 | 5.5718 | 5.5718 | 0.0 | 16.56
Other | | 0.1319 | | | 0.39
Nlocal: 5120 ave 5120 max 5120 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 7594 ave 7594 max 7594 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 323081 ave 323081 max 323081 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 323081
Ave neighs/atom = 63.1018
Neighbor list builds = 248
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:33

View File

@ -0,0 +1,187 @@
LAMMPS (22 Sep 2017)
using 1 OpenMP thread(s) per MPI task
units lj
dimension 3
boundary p p p
atom_style atomic
# truncated and shifted LJ potential
pair_style lj/cut 2.5
pair_modify shift yes
lattice fcc 0.9731
Lattice spacing in x,y,z = 1.6019 1.6019 1.6019
region my_box block 0 8.0 0 8.0 0 20.0
create_box 1 my_box
Created orthogonal box = (0 0 0) to (12.8152 12.8152 32.0379)
1 by 1 by 4 MPI processor grid
region particles block 0 8.0 0 8.0 0 20.0
create_atoms 1 region particles
Created 5120 atoms
pair_coeff 1 1 1.0 1.0 2.5
pair_modify tail no
pair_modify shift yes
mass 1 1.0
velocity all create 1.6 1 mom yes rot yes
# simulation parameters
neighbor 0.6 bin
timestep 0.004
run_style verlet
fix ensemble all npt temp 0.8 0.8 4.0 aniso 2.185 2.185 8.0 pchain 32
# computing long-range order (no bias is added since k=0)
fix bias all rhok 16 0 0 0.0 0.0
# output
thermo 50
thermo_style custom step temp press density f_bias[3]
# dump dumpXYZ all xyz 2000 traj.xyz
# NOTE: this is cut short to 5000 steps for demonstration purposes
# run 100000
run 5000
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.1
ghost atom cutoff = 3.1
binsize = 1.55, bins = 9 9 21
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.23 | 3.23 | 3.23 Mbytes
Step Temp Press Density f_bias[3]
0 1.6 -2.7568106 0.9731 71.554175
50 0.78457786 3.1029192 0.97362639 54.327705
100 0.85528971 2.4670259 0.97213457 55.189308
150 0.85241818 2.3210306 0.9698027 56.138125
200 0.82301385 2.3448692 0.96708227 55.735326
250 0.83076383 2.0890816 0.96425763 55.320625
300 0.81602823 2.0118796 0.96173925 54.095736
350 0.81084006 1.9122192 0.95979392 54.526429
400 0.80776593 1.8502174 0.95869117 54.434901
450 0.80694697 1.8435873 0.95851085 53.20809
500 0.81384248 1.8111331 0.95917305 53.419395
550 0.81027072 1.9222272 0.96056019 54.36723
600 0.81199582 2.0291945 0.96248486 54.888582
650 0.82507964 2.0706462 0.96467227 55.807137
700 0.832562 2.1471442 0.9668913 56.721267
750 0.83358138 2.2674672 0.968984 56.723838
800 0.83477542 2.3658275 0.97072603 56.234689
850 0.84722921 2.3506233 0.97189674 56.262424
900 0.83526965 2.4532068 0.97248856 56.219103
950 0.83174583 2.4763958 0.97249527 56.409813
1000 0.83022557 2.4334341 0.97194093 55.890858
1050 0.83208978 2.3478416 0.97092452 54.934691
1100 0.82789545 2.272404 0.9696152 54.90894
1150 0.82678617 2.1798046 0.96819776 54.927782
1200 0.8088841 2.1960256 0.96687735 54.914327
1250 0.81512784 2.0736261 0.96579008 53.927291
1300 0.81271067 2.0297138 0.96504188 54.289698
1350 0.8201767 1.9493976 0.96464115 55.342131
1400 0.80880489 2.0016987 0.96468463 55.757758
1450 0.8114196 2.0282699 0.96514115 55.865676
1500 0.81085664 2.0838361 0.96591869 56.553425
1550 0.81257075 2.1283157 0.96694549 56.921544
1600 0.82617645 2.1017986 0.96817075 56.858808
1650 0.82616141 2.1885582 0.96941073 56.717917
1700 0.81634174 2.2996967 0.97047447 56.453745
1750 0.82447573 2.2924266 0.97128663 56.916813
1800 0.83610432 2.236456 0.97178453 56.400752
1850 0.824792 2.3103491 0.97197318 55.891368
1900 0.82298989 2.3059287 0.97181084 55.680562
1950 0.82098545 2.2801009 0.97138609 55.754404
2000 0.81812031 2.2480166 0.97078591 55.801371
2050 0.82822262 2.1208887 0.97004108 55.687001
2100 0.79768162 2.2711186 0.9693017 55.459852
2150 0.81817874 2.0680317 0.96860202 56.514744
2200 0.80707412 2.1112032 0.96810521 55.504308
2250 0.81650921 2.0077757 0.96781164 55.635717
2300 0.80634656 2.066186 0.96777181 56.051088
2350 0.80893174 2.0619084 0.96799042 56.548711
2400 0.82453783 1.9585503 0.96846727 56.695111
2450 0.81517275 2.0752617 0.96921631 56.614046
2500 0.80969622 2.1624476 0.9701054 56.574846
2550 0.80861922 2.2089505 0.97100787 57.072334
2600 0.81468888 2.2293754 0.97192875 56.879416
2650 0.82061239 2.2245462 0.97269723 55.442015
2700 0.81687473 2.2792015 0.97319852 54.420301
2750 0.81416567 2.2982988 0.97340467 54.469427
2800 0.81978563 2.2418723 0.97332803 55.965451
2850 0.82069759 2.1988948 0.97302752 56.686807
2900 0.80631184 2.2684466 0.97261407 56.585682
2950 0.81759744 2.1312328 0.97207888 56.812431
3000 0.80748056 2.152676 0.97151807 57.178849
3050 0.80789237 2.118162 0.97103728 57.433724
3100 0.79882523 2.1414744 0.97070338 57.34686
3150 0.79803949 2.1359043 0.97052875 57.382544
3200 0.79170386 2.1548392 0.97049349 56.465806
3250 0.78848813 2.1990144 0.97067557 55.929088
3300 0.79820555 2.1304609 0.97101444 55.624487
3350 0.79250565 2.1971235 0.97149233 55.933615
3400 0.80584844 2.1417239 0.97206083 55.85922
3450 0.80685744 2.1640501 0.97266047 55.135963
3500 0.80751888 2.1858277 0.97318703 55.407581
3550 0.79882754 2.2796452 0.97363149 55.392366
3600 0.80219171 2.2715765 0.97392571 55.867887
3650 0.79061794 2.3492866 0.97410985 56.0192
3700 0.8058483 2.2327904 0.97411924 56.491303
3750 0.79460746 2.2941868 0.97397764 55.929912
3800 0.80447478 2.2018009 0.97367627 55.663208
3850 0.80355335 2.17638 0.97333164 55.637261
3900 0.80388417 2.1531434 0.9729647 56.03794
3950 0.79557409 2.1853318 0.9726503 56.132348
4000 0.79547396 2.1457051 0.97235244 55.552675
4050 0.8058384 2.0637678 0.97213346 56.185416
4100 0.7976931 2.1028246 0.97208255 56.050347
4150 0.79555522 2.115473 0.97216375 56.868136
4200 0.79324134 2.1510383 0.97246129 56.462635
4250 0.80788167 2.0534887 0.97287821 55.650788
4300 0.79389865 2.2019815 0.97337765 55.596846
4350 0.79786309 2.1851119 0.97389825 57.000921
4400 0.79986518 2.1997541 0.97443778 57.551564
4450 0.8063901 2.1893874 0.97493151 57.236138
4500 0.80005802 2.250364 0.97533075 57.341358
4550 0.79707443 2.2995576 0.97557554 57.338713
4600 0.79869949 2.2807889 0.97563277 57.084504
4650 0.79694427 2.2673215 0.97544638 57.025663
4700 0.79023986 2.2884131 0.97511483 57.131188
4750 0.79566823 2.2215519 0.97464304 57.045676
4800 0.78936986 2.2268037 0.97410626 57.384178
4850 0.79025913 2.1836718 0.973616 57.78438
4900 0.80138424 2.0657609 0.9732124 57.888266
4950 0.77853735 2.207944 0.97296347 57.312213
5000 0.79115984 2.1035893 0.97285578 57.109472
Loop time of 9.53489 on 4 procs for 5000 steps with 5120 atoms
Performance: 181229.223 tau/day, 524.390 timesteps/s
99.1% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 6.312 | 6.4238 | 6.5139 | 3.1 | 67.37
Neigh | 0.72062 | 0.73538 | 0.74531 | 1.1 | 7.71
Comm | 0.52697 | 0.64152 | 0.78688 | 14.1 | 6.73
Output | 0.0028393 | 0.0029888 | 0.0033851 | 0.4 | 0.03
Modify | 1.6249 | 1.669 | 1.7253 | 2.9 | 17.50
Other | | 0.06221 | | | 0.65
Nlocal: 1280 ave 1289 max 1266 min
Histogram: 1 0 0 0 0 1 0 0 0 2
Nghost: 3346.25 ave 3379 max 3331 min
Histogram: 1 2 0 0 0 0 0 0 0 1
Neighs: 80701.8 ave 81534 max 79755 min
Histogram: 1 0 1 0 0 0 0 0 1 1
Total # of neighbors = 322807
Ave neighs/atom = 63.0482
Neighbor list builds = 248
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:09

View File

@ -0,0 +1,186 @@
LAMMPS (22 Sep 2017)
using 1 OpenMP thread(s) per MPI task
units lj
dimension 3
boundary p p p
atom_style atomic
# truncated and shifted LJ potential
pair_style lj/cut 2.5
pair_modify shift yes
read_data data.halfhalf
orthogonal box = (0 0 0) to (12.8152 12.8152 34)
1 by 1 by 1 MPI processor grid
reading atoms ...
5120 atoms
reading velocities ...
5120 velocities
pair_coeff 1 1 1.0 1.0 2.5
mass 1 1.0
# simulation parameters
neighbor 0.6 bin
timestep 0.004
run_style verlet
velocity all create 0.8 1 mom yes rot yes
fix ensemble all npt temp 0.8 0.8 4.0 z 2.185 2.185 8.0
fix 100 all momentum 100 linear 1 1 1
# harmonic rho_k bias-field
# nx ny nz k a
fix bias all rhok 16 0 0 4.0 26.00
# output U_bias rho_k_RE rho_k_IM |rho_k|
thermo_style custom step temp pzz pe lz f_bias f_bias[1] f_bias[2] f_bias[3]
thermo 50
dump dumpXYZ all xyz 500 traj.xyz
# NOTE: run reduced for demonstration purposes
# run 50000
run 5000
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.1
ghost atom cutoff = 3.1
binsize = 1.55, bins = 9 9 22
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 5.723 | 5.723 | 5.723 Mbytes
Step Temp Pzz PotEng Lz f_bias f_bias[1] f_bias[2] f_bias[3]
0 0.8 5.1566801 -4.8556711 34 179.52419 35.473155 -0.2832763 35.474286
50 1.072533 3.8158392 -5.2704532 34.024206 0.010596224 25.927135 -0.063106738 25.927212
100 1.1093231 3.6703116 -5.3380965 34.094814 1.8552612 26.958236 -0.51403326 26.963136
150 1.1080721 3.8202601 -5.3568368 34.207473 0.39188605 26.420755 -1.0759575 26.442655
200 1.1435287 3.3445987 -5.4365298 34.354119 3.0758718 27.239465 -0.19115251 27.240135
250 1.1203046 3.4669456 -5.4293867 34.511473 0.8543814 26.652785 -0.20818214 26.653598
300 1.1012709 3.4583154 -5.4281803 34.664509 2.4837156 27.097674 0.9518628 27.114387
350 1.0439632 3.8953869 -5.368619 34.810399 0.55385719 26.518391 0.64525272 26.52624
400 1.0083878 4.0523864 -5.3418278 34.957669 0.34806057 26.404011 0.83368604 26.417169
450 0.9675244 4.310087 -5.3089468 35.114208 0.7921285 26.607512 1.077889 26.629336
500 0.94605476 4.1050097 -5.3062273 35.284018 0.87757754 26.639125 1.1140858 26.662411
550 0.92662323 3.9299063 -5.3062927 35.458565 1.3746441 26.773494 1.7256603 26.829049
600 0.89723165 3.7683555 -5.289725 35.629881 0.46692943 26.372973 2.4135502 26.483182
650 0.90612566 3.1098837 -5.3267851 35.788537 0.032662126 25.918784 3.2982102 26.127793
700 0.9152508 2.6527976 -5.3597799 35.923343 0.014621588 25.834591 3.6093492 26.085503
750 0.90156356 2.3474851 -5.3545938 36.031813 0.75225637 26.307204 4.0247215 26.613293
800 0.89748513 1.9825103 -5.3610202 36.113888 0.33402511 26.261326 2.7858039 26.408672
850 0.89496343 1.8906342 -5.3673514 36.169424 0.85431557 26.534648 2.5150347 26.653573
900 0.89463983 1.5654217 -5.3753283 36.20181 1.5689239 26.764737 2.5474794 26.885699
950 0.88663832 1.4399476 -5.3703322 36.209971 0.044436903 25.818418 1.2963356 25.850941
1000 0.87407208 1.485718 -5.3572665 36.195386 1.4405611 26.828072 1.0520795 26.848693
1050 0.87580489 1.163155 -5.3647269 36.160279 0.15319559 26.234791 1.4845964 26.276763
1100 0.86978111 1.3743181 -5.3594907 36.104958 1.1313537 25.19895 1.5711793 25.247885
1150 0.86987861 1.3212927 -5.3628503 36.035486 0.039865678 25.841762 0.93898962 25.858816
1200 0.87142486 1.3293818 -5.3676854 35.954411 0.16827389 25.70952 -0.14639427 25.709936
1250 0.87582265 1.3203803 -5.3764058 35.86575 0.25946652 25.639682 0.082696867 25.639815
1300 0.87371627 1.4680294 -5.375151 35.772824 0.17697069 25.701417 0.2397926 25.702535
1350 0.88617453 1.5923057 -5.3954912 35.681046 0.00049155526 25.973634 -0.74521794 25.984323
1400 0.87809636 1.5821707 -5.3850722 35.594706 0.024050814 26.107395 -0.34393685 26.10966
1450 0.87912192 1.7820174 -5.3885842 35.514722 0.20999914 25.667238 -0.66933655 25.675964
1500 0.88293618 2.0295275 -5.3963602 35.443445 0.60232374 25.376395 -1.9501461 25.451218
1550 0.90012542 1.9476472 -5.4249456 35.382791 0.4488038 26.448928 -1.1452474 26.473711
1600 0.89155063 2.2462603 -5.4153432 35.332095 0.039621687 26.138157 -0.36825239 26.140751
1650 0.8942624 2.343747 -5.4233433 35.294954 0.0089980332 26.064277 0.38189192 26.067075
1700 0.90047841 2.451289 -5.4376312 35.27234 0.86985171 26.646438 0.83408084 26.659489
1750 0.87586052 2.6381221 -5.4067182 35.264564 6.346204 27.652722 2.6699692 27.78132
1800 0.87392582 2.6338176 -5.4109056 35.270073 0.046414129 26.016188 2.6651053 26.152339
1850 0.86540415 2.5434301 -5.4058587 35.285902 0.054615472 26.074279 2.1799787 26.165251
1900 0.87043082 2.5776772 -5.4216997 35.309062 0.68978148 26.38648 3.2614091 26.587274
1950 0.86281992 2.3107762 -5.4188978 35.338501 0.0072672577 25.736893 3.2375012 25.93972
2000 0.85905576 2.2894047 -5.4215995 35.36787 0.095633435 26.072085 2.7685848 26.21867
2050 0.85793751 2.2382039 -5.4279351 35.395213 0.13602344 25.598457 2.6881027 25.739209
2100 0.85585253 2.0765811 -5.4324511 35.418877 0.0059888115 25.754128 3.1436222 25.945279
2150 0.86701057 1.8449875 -5.4562208 35.436124 0.097328618 25.413697 4.3268293 25.7794
2200 0.85168154 1.9024923 -5.4395776 35.44246 0.20764576 25.094788 5.4406104 25.677784
2250 0.8429719 1.870335 -5.4320586 35.438363 0.34419961 24.998478 5.4475709 25.585151
2300 0.84176891 1.7100228 -5.4351472 35.422863 0.76036958 24.697018 5.8629967 25.383409
2350 0.84601588 1.8539039 -5.4456629 35.395979 0.38437531 25.647986 6.4163366 26.438392
2400 0.84637647 1.6299091 -5.4498948 35.36125 0.074236719 24.995872 7.8269968 26.192661
2450 0.85650449 1.6828907 -5.4683101 35.316669 0.3671827 25.280669 7.7040329 26.428476
2500 0.84963707 1.7305222 -5.4605394 35.265508 0.1406965 25.236741 7.2780025 26.265232
2550 0.84084365 1.8758368 -5.4497083 35.208725 0.33937687 24.544376 7.2334512 25.588067
2600 0.85317342 1.7781674 -5.4702734 35.149747 0.60378248 24.046307 8.3370138 25.450554
2650 0.85487644 2.0065374 -5.4747643 35.090431 0.22483651 24.937101 8.4669004 26.335288
2700 0.84550083 1.9363031 -5.4628401 35.034349 0.43442577 24.250196 7.9943738 25.533939
2750 0.85843419 2.0473138 -5.484528 34.980671 0.45959294 24.17438 8.179356 25.520629
2800 0.86047607 2.0754522 -5.4899966 34.932466 0.00038123477 24.619856 8.3153434 25.986194
2850 0.86375793 2.2751324 -5.4977459 34.892337 0.0016455263 24.927259 7.289789 25.971316
2900 0.84438986 2.3790377 -5.4721407 34.863512 1.2372354 25.819445 7.132603 26.786523
2950 0.8551438 2.2721926 -5.4925958 34.84473 1.5405388 25.956466 6.976385 26.87765
3000 0.83737707 2.4009609 -5.4707188 34.834171 0.28507766 25.643879 6.1778846 26.377543
3050 0.84923235 2.4187994 -5.4938573 34.830836 0.036512025 25.139252 7.1457857 26.135115
3100 0.83872396 2.3811576 -5.4838787 34.833673 0.246984 24.21358 8.4588719 25.648586
3150 0.83957817 2.3901421 -5.4913118 34.84163 0.20477984 24.309852 10.088243 26.319984
3200 0.84283033 2.17292 -5.5025459 34.853975 1.3367154 24.581685 10.72011 26.817531
3250 0.84002379 2.1247709 -5.5044955 34.866106 0.11434509 24.463842 9.4874246 26.239108
3300 0.83311101 2.1492058 -5.5000847 34.875625 0.0053284993 23.815298 10.560222 26.051616
3350 0.83216701 1.9587594 -5.5043446 34.881623 0.58985562 23.934253 11.475462 26.543073
3400 0.82396039 2.1914951 -5.4971506 34.881199 0.098206955 23.393402 10.82936 25.778407
3450 0.83483253 1.9783612 -5.5182844 34.877327 7.6571212e-05 23.675355 10.761012 26.006188
3500 0.82712062 1.9718522 -5.5111818 34.869214 0.014836125 23.314122 11.312845 25.913872
3550 0.8342927 1.9114357 -5.5259968 34.855179 1.4050442 22.442758 11.377192 25.161834
3600 0.82631637 1.9836457 -5.5176244 34.835738 0.084637609 23.413286 10.824194 25.794285
3650 0.82425697 1.9218541 -5.5178548 34.811901 0.11000071 22.788707 12.022258 25.765478
3700 0.82491437 1.9624493 -5.521738 34.782417 0.034984027 23.011433 12.384217 26.132257
3750 0.82758167 2.0856442 -5.5283493 34.748872 0.001362163 23.030662 12.122144 26.026098
3800 0.81891108 1.9858824 -5.5177774 34.714618 0.17075993 23.21344 12.345683 26.292199
3850 0.83392227 2.1631514 -5.5426333 34.681146 0.82106473 22.510204 11.678329 25.359272
3900 0.82230654 2.0017132 -5.5276756 34.650221 0.48735732 23.444809 12.339117 26.493638
3950 0.81929288 2.1749936 -5.5256673 34.61976 0.089219805 23.540062 11.527925 26.211211
4000 0.83415169 2.0446791 -5.5506187 34.591266 0.15593937 23.742282 11.26508 26.279231
4050 0.82362522 2.1998083 -5.5375157 34.563164 0.25405351 23.913834 11.081011 26.356408
4100 0.82589505 2.3074345 -5.543718 34.537763 0.080213125 24.03253 10.435108 26.200266
4150 0.83855297 2.2424199 -5.5658171 34.517758 0.62913338 23.974257 8.5079223 25.439138
4200 0.82522111 2.2622619 -5.5493275 34.502472 1.8756517 25.754617 7.9996898 26.968414
4250 0.82083124 2.4135193 -5.5464932 34.4919 1.1217436 25.8944 6.7070444 26.748914
4300 0.83059704 2.1375109 -5.5653245 34.487366 0.53623038 26.05979 4.9072346 26.517798
4350 0.82755047 2.1159821 -5.5650889 34.484506 0.10017723 25.405936 4.3532342 25.776195
4400 0.83192877 2.180851 -5.5759565 34.480909 0.053664012 25.993034 2.9844338 26.163805
4450 0.81860572 2.2333381 -5.5602138 34.477183 0.037864077 25.792233 1.9038859 25.862406
4500 0.82821762 2.1142023 -5.5788682 34.474784 0.088221344 26.20329 0.59417897 26.210025
4550 0.8205154 2.0896984 -5.5715531 34.472405 0.016076192 26.083166 -0.58187024 26.089655
4600 0.81294948 2.2274108 -5.5642678 34.469014 0.033774986 25.869616 0.14951307 25.870048
4650 0.80890532 2.1556346 -5.5622407 34.465277 0.67402048 25.413229 -0.56341819 25.419474
4700 0.82070227 1.9852605 -5.583747 34.460206 0.052623237 26.158394 -0.44673492 26.162209
4750 0.81451857 2.1097726 -5.5779782 34.451438 0.12221733 25.733718 -0.9911436 25.752798
4800 0.81300453 2.0211325 -5.5790076 34.439504 0.34536082 26.358606 -1.7335167 26.415548
4850 0.82035497 1.9489595 -5.5929886 34.424097 0.70899626 26.575865 -1.0191012 26.595397
4900 0.8127066 2.1312269 -5.584271 34.405998 0.087959314 26.185217 -1.1329105 26.209713
4950 0.81252621 2.1094866 -5.5866296 34.387869 0.79067667 26.564722 -1.8456354 26.628759
5000 0.80575936 2.1875995 -5.579054 34.370679 0.031787364 26.027557 -2.2666774 26.12607
Loop time of 32.2397 on 1 procs for 5000 steps with 5120 atoms
Performance: 53598.557 tau/day, 155.088 timesteps/s
99.4% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 22.967 | 22.967 | 22.967 | 0.0 | 71.24
Neigh | 2.9914 | 2.9914 | 2.9914 | 0.0 | 9.28
Comm | 0.37485 | 0.37485 | 0.37485 | 0.0 | 1.16
Output | 0.064337 | 0.064337 | 0.064337 | 0.0 | 0.20
Modify | 5.7143 | 5.7143 | 5.7143 | 0.0 | 17.72
Other | | 0.1281 | | | 0.40
Nlocal: 5120 ave 5120 max 5120 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 7962 ave 7962 max 7962 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 296101 ave 296101 max 296101 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 296101
Ave neighs/atom = 57.8322
Neighbor list builds = 283
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:32

View File

@ -0,0 +1,186 @@
LAMMPS (22 Sep 2017)
using 1 OpenMP thread(s) per MPI task
units lj
dimension 3
boundary p p p
atom_style atomic
# truncated and shifted LJ potential
pair_style lj/cut 2.5
pair_modify shift yes
read_data data.halfhalf
orthogonal box = (0 0 0) to (12.8152 12.8152 34)
1 by 1 by 4 MPI processor grid
reading atoms ...
5120 atoms
reading velocities ...
5120 velocities
pair_coeff 1 1 1.0 1.0 2.5
mass 1 1.0
# simulation parameters
neighbor 0.6 bin
timestep 0.004
run_style verlet
velocity all create 0.8 1 mom yes rot yes
fix ensemble all npt temp 0.8 0.8 4.0 z 2.185 2.185 8.0
fix 100 all momentum 100 linear 1 1 1
# harmonic rho_k bias-field
# nx ny nz k a
fix bias all rhok 16 0 0 4.0 26.00
# output U_bias rho_k_RE rho_k_IM |rho_k|
thermo_style custom step temp pzz pe lz f_bias f_bias[1] f_bias[2] f_bias[3]
thermo 50
dump dumpXYZ all xyz 500 traj.xyz
# NOTE: run reduced for demonstration purposes
# run 50000
run 5000
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.1
ghost atom cutoff = 3.1
binsize = 1.55, bins = 9 9 22
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 4.023 | 4.027 | 4.03 Mbytes
Step Temp Pzz PotEng Lz f_bias f_bias[1] f_bias[2] f_bias[3]
0 0.8 5.1872229 -4.8361269 34 152.02869 34.711006 -0.72709593 34.71862
50 1.0819371 3.9250728 -5.2655842 34.02563 0.51385908 26.505979 0.2187864 26.506882
100 1.1182271 3.5397251 -5.3331401 34.100753 2.1059904 27.025883 -0.12127124 27.026156
150 1.1121434 3.7845571 -5.3440494 34.213993 1.7206575 26.894862 -1.3261751 26.927539
200 1.1446439 3.4114364 -5.4199119 34.358914 2.383615 27.054401 -1.4211151 27.091699
250 1.1115073 3.5603047 -5.3988013 34.517397 0.60819391 26.51404 -1.4089688 26.55145
300 1.0828478 3.7411116 -5.3842818 34.673948 0.73987465 26.528178 -2.062382 26.608225
350 1.0342597 3.9206217 -5.3384367 34.825105 0.99965014 26.657737 -1.6211152 26.706983
400 1.0064356 3.9929044 -5.324003 34.97579 0.41927007 26.402623 -1.7087432 26.457859
450 0.96799277 4.2764255 -5.2947175 35.133839 0.77739461 26.503753 -2.5217998 26.623456
500 0.94691076 4.1007962 -5.2922124 35.301893 0.17015805 26.212252 -2.0421698 26.291683
550 0.93675297 3.7404088 -5.3056917 35.474301 0.56247039 26.335926 -3.205722 26.530316
600 0.92707577 3.5439822 -5.3176094 35.641282 0.04054693 25.679461 -3.0301039 25.857615
650 0.91828226 3.1833648 -5.3278237 35.794766 0.8427054 26.4003 -3.6331211 26.649117
700 0.9084826 2.8374306 -5.3327944 35.928138 1.5635222 26.605971 -3.8575939 26.884173
750 0.91219559 2.46172 -5.3548299 36.039156 6.3772911 27.350725 -4.8971146 27.785678
800 0.90000337 2.2187716 -5.3499181 36.126451 4.9080838 27.085156 -5.1291678 27.566538
850 0.9003432 1.8634244 -5.3614648 36.189019 0.0081092188 25.497333 -5.4038153 26.063676
900 0.89741573 1.5697398 -5.3660799 36.226074 0.011155479 25.312724 -6.2574069 26.074684
950 0.88871454 1.4427205 -5.3604669 36.237407 0.3287078 25.659237 -6.232896 26.405406
1000 0.88606353 1.3088636 -5.3626576 36.226015 0.30068168 24.554896 -7.2832017 25.612262
1050 0.88527541 1.3194263 -5.3666773 36.19311 0.10646314 24.514921 -7.9419424 25.76928
1100 0.87522001 1.2852124 -5.3556811 36.143056 0.13675329 24.865981 -8.446822 26.261489
1150 0.8805978 1.246973 -5.3671716 36.0781 0.00043275463 24.187039 -9.4985495 25.98529
1200 0.85711495 1.376588 -5.3346243 36.002427 0.47623639 23.691349 -9.4648541 25.512026
1250 0.88116805 1.3562001 -5.3731036 35.919289 0.32797055 23.322103 -10.54448 25.595049
1300 0.87178482 1.5046564 -5.3610798 35.831278 0.17704849 24.190231 -10.314689 26.29753
1350 0.87022621 1.6830825 -5.3603618 35.743318 0.0052854997 23.731157 -10.747465 26.051408
1400 0.89019669 1.6144812 -5.3921986 35.659687 1.4152796 22.8393 -10.551347 25.158787
1450 0.88852819 1.7587964 -5.3918592 35.580319 0.63560961 23.599033 -12.195 26.563742
1500 0.89029085 1.8772498 -5.3966098 35.509232 0.20895386 23.055083 -12.703366 26.323229
1550 0.88639722 2.2284824 -5.3933288 35.449043 0.44413965 22.448774 -12.156068 25.528757
1600 0.88816451 2.2167704 -5.3994757 35.401661 0.12210235 23.108351 -12.44643 26.247085
1650 0.89154791 2.3397824 -5.4086923 35.365815 0.4820208 23.090699 -12.984179 26.490928
1700 0.88518032 2.5351236 -5.4041601 35.343757 0.080806002 22.749825 -12.99762 26.201005
1750 0.86848721 2.5527491 -5.3851928 35.336433 0.045102165 22.357111 -13.564328 26.15017
1800 0.88501061 2.5215825 -5.4169341 35.340849 0.27488483 22.086584 -14.408273 26.370732
1850 0.8716061 2.5809558 -5.4045854 35.355038 0.042909785 21.270956 -14.695278 25.853525
1900 0.85672517 2.4836326 -5.3902797 35.375469 0.72877764 21.639909 -15.474764 26.603646
1950 0.85133731 2.3141629 -5.3902573 35.398523 0.0016908803 21.106617 -15.132733 25.970924
2000 0.86152109 2.1562002 -5.4132601 35.419851 0.371016 21.325237 -15.614625 26.430706
2050 0.86243551 2.019931 -5.4220349 35.436069 0.017935421 20.4131 -16.255418 26.094698
2100 0.87417672 1.8083823 -5.4464117 35.445091 0.18429432 19.75625 -17.365705 26.303558
2150 0.85872128 1.7608768 -5.4293103 35.44341 0.91209166 20.149648 -17.480387 26.675312
2200 0.86615373 1.8372778 -5.4458315 35.430616 0.10151993 18.559234 -17.885469 25.7747
2250 0.85053605 1.7198437 -5.4272104 35.408688 0.96154548 17.200861 -18.562206 25.306622
2300 0.85400281 1.7939644 -5.4364682 35.377708 0.12283263 18.759325 -18.358539 26.247823
2350 0.85495278 1.5856029 -5.4417321 35.337987 0.20564329 18.967923 -18.248149 26.320658
2400 0.84606771 1.7782708 -5.4315646 35.287411 0.10063977 19.185527 -17.878215 26.224321
2450 0.85210051 1.8190391 -5.4432116 35.232321 0.69988647 19.268861 -18.325448 26.59156
2500 0.85304715 1.7466204 -5.4470889 35.175245 0.0048314937 18.09176 -18.74157 26.04915
2550 0.85401123 1.8601945 -5.4509309 35.115748 0.99467901 17.170045 -18.574587 25.294777
2600 0.85778606 1.974012 -5.4586742 35.058013 0.0026599702 17.438966 -19.333395 26.036469
2650 0.8521239 2.0606329 -5.4526006 35.003616 0.091056354 17.16363 -19.244738 25.786627
2700 0.85918482 2.0766792 -5.4658947 34.954171 0.89590606 15.77108 -19.822153 25.330707
2750 0.85786577 2.225549 -5.4667773 34.911468 0.26577575 15.769018 -21.128817 26.364538
2800 0.86764664 2.2325018 -5.4849414 34.877604 0.47167555 14.950515 -20.675229 25.514369
2850 0.85209564 2.3434319 -5.465734 34.852715 2.7350296 13.51553 -20.829996 24.830592
2900 0.85757283 2.3512971 -5.4786051 34.836138 0.14816492 14.06033 -21.545946 25.727819
2950 0.86098926 2.3480431 -5.4890615 34.826408 0.26401534 13.381395 -22.714827 26.363329
3000 0.85413421 2.3243973 -5.4844129 34.823242 0.024244334 12.739486 -22.538687 25.889899
3050 0.85015323 2.5479266 -5.4844303 34.825228 0.4463147 12.990582 -21.975063 25.527605
3100 0.8530523 2.3643505 -5.495343 34.834883 0.12144265 12.844293 -22.321989 25.753583
3150 0.85098478 2.2521299 -5.4990526 34.848419 0.33194916 12.747856 -23.126671 26.4074
3200 0.84391449 2.2650057 -5.495222 34.862626 0.031888328 12.788845 -22.782174 26.12627
3250 0.84807155 2.1715388 -5.5080873 34.877548 0.082426694 13.316219 -22.09441 25.796989
3300 0.83028242 2.242889 -5.4878846 34.89175 1.1334975 14.326678 -22.593363 26.752827
3350 0.82924001 2.0324002 -5.4924558 34.903232 0.35473989 14.354166 -22.181868 26.421153
3400 0.83032841 2.0003371 -5.4997142 34.908733 0.041677437 14.528378 -21.735998 26.144356
3450 0.82908891 1.8683902 -5.5029185 34.907936 0.02365857 15.069507 -21.053887 25.891237
3500 0.82842914 1.9165344 -5.5064218 34.898681 0.17663531 15.27043 -20.674834 25.702817
3550 0.82735822 1.98221 -5.5088197 34.88272 1.5607134 14.915228 -20.208431 25.116622
3600 0.82642915 1.8422766 -5.5110752 34.8611 1.1861112 15.312314 -20.051953 25.229899
3650 0.82556781 1.9351408 -5.5130349 34.833406 1.018872 16.152478 -19.454871 25.286252
3700 0.82360651 1.9791184 -5.5128431 34.802021 0.14080727 16.907104 -19.401616 25.734663
3750 0.83017793 1.9855734 -5.5253254 34.768644 0.15311334 16.969506 -19.331958 25.723311
3800 0.82362926 2.1029656 -5.5179624 34.734178 0.10807487 17.892584 -18.542426 25.76754
3850 0.82313508 2.0781681 -5.5196175 34.70093 0.13343085 19.072706 -17.28778 25.741707
3900 0.83643385 2.0570262 -5.5421224 34.669761 0.00022792038 19.551677 -17.1548 26.010675
3950 0.82346174 2.0842322 -5.5252757 34.640849 0.0093759386 20.892792 -15.590263 26.068469
4000 0.83485868 2.1196669 -5.5451736 34.612396 0.31198053 21.630258 -15.126984 26.394956
4050 0.82729429 2.2033274 -5.5365945 34.585721 0.53752252 21.283533 -14.011497 25.481578
4100 0.82040242 2.1757309 -5.5292269 34.562271 0.36031984 22.047609 -12.961927 25.575548
4150 0.81932521 2.285666 -5.5307807 34.542102 0.84343149 22.486289 -11.70555 25.350604
4200 0.83819319 2.231174 -5.5625532 34.526447 0.47190752 23.311855 -12.57189 26.485751
4250 0.82542274 2.1874789 -5.5472057 34.513795 0.70518398 23.411553 -12.614639 26.593795
4300 0.81971158 2.241167 -5.5424504 34.503969 0.26707612 23.089805 -12.727793 26.365429
4350 0.83255377 2.1295532 -5.5657895 34.496326 0.072548591 23.003138 -12.52181 26.190458
4400 0.8128474 2.3327845 -5.5402264 34.490126 0.0013023434 23.020811 -12.029795 25.974482
4450 0.82013491 2.3069915 -5.5554953 34.488039 0.041123896 23.632908 -11.178674 26.143394
4500 0.81411544 2.2247193 -5.5509183 34.488014 0.54440601 23.010678 -10.938506 25.478269
4550 0.82814624 2.1142779 -5.5763482 34.487885 0.1518945 23.696817 -11.351972 26.275585
4600 0.82929492 2.090881 -5.5823492 34.486698 0.0045520899 23.538527 -10.929741 25.952292
4650 0.81061417 1.9818043 -5.5584018 34.484038 0.012526806 23.993543 -10.219174 26.079142
4700 0.81816105 1.9605811 -5.5735005 34.476764 1.2079835 25.151166 -9.1888856 26.777169
4750 0.81657042 2.0064313 -5.5744795 34.465784 1.2045017 25.487486 -8.2063886 26.776048
4800 0.81789335 2.0838696 -5.5796632 34.451996 0.27642542 24.647157 -7.023095 25.62823
4850 0.80649339 1.9892413 -5.5654796 34.436067 0.024697945 25.09823 -6.3492244 25.888874
4900 0.81673441 2.0125635 -5.5835037 34.416236 0.0011188576 25.446818 -5.2182483 25.976348
4950 0.82250033 1.9770391 -5.5946082 34.394723 0.72696707 26.37002 -3.5122842 26.602896
5000 0.80762758 2.075517 -5.5746076 34.371696 0.12796344 26.102184 -2.8094827 26.252946
Loop time of 10.3394 on 4 procs for 5000 steps with 5120 atoms
Performance: 167127.370 tau/day, 483.586 timesteps/s
99.0% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 5.029 | 6.0128 | 7.1918 | 35.0 | 58.15
Neigh | 0.65673 | 0.75825 | 0.88597 | 10.3 | 7.33
Comm | 0.43982 | 1.5284 | 2.4112 | 60.5 | 14.78
Output | 0.022835 | 0.023039 | 0.023453 | 0.2 | 0.22
Modify | 1.7294 | 1.9472 | 2.5687 | 25.7 | 18.83
Other | | 0.06978 | | | 0.67
Nlocal: 1280 ave 1404 max 1214 min
Histogram: 2 0 0 1 0 0 0 0 0 1
Nghost: 3521.25 ave 3581 max 3426 min
Histogram: 1 0 0 0 0 0 1 1 0 1
Neighs: 73872.2 ave 87973 max 64161 min
Histogram: 1 1 0 0 1 0 0 0 0 1
Total # of neighbors = 295489
Ave neighs/atom = 57.7127
Neighbor list builds = 278
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:10

View File

@ -0,0 +1,141 @@
LAMMPS (22 Sep 2017)
using 1 OpenMP thread(s) per MPI task
units lj
dimension 3
boundary p p p
atom_style atomic
# truncated and shifted LJ potential
pair_style lj/cut 2.5
pair_modify shift yes
# fcc lattice
lattice fcc 0.9731
Lattice spacing in x,y,z = 1.6019 1.6019 1.6019
region my_box block 0 8.0 0 8.0 0 20.0
create_box 1 my_box
Created orthogonal box = (0 0 0) to (12.8152 12.8152 32.0379)
1 by 1 by 1 MPI processor grid
region particles block 0 8.0 0 8.0 0 20.0
create_atoms 1 region particles
Created 5120 atoms
pair_coeff 1 1 1.0 1.0 2.5
mass 1 1.0
change_box all z final 0.0 34 remap units box
orthogonal box = (0 0 0) to (12.8152 12.8152 34)
# select particles in one side of the elongated box
region left plane 0 0 10 0 0 1
group left region left
2688 atoms in group left
velocity left create 6.0 1 mom yes rot yes
# simulation parameters
neighbor 0.6 bin
timestep 0.004
run_style verlet
fix ensemble left nve # Note: only move particle in left-hand side
fix langevin left langevin 3.0 0.8 100.0 2017
# outout
thermo_style custom step temp pzz pe lz
thermo 100
# dump dumpXYZ all xyz 100 traj.xyz
# run reduced for demonstration purposes
# run 10000
run 5000
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.1
ghost atom cutoff = 3.1
binsize = 1.55, bins = 9 9 22
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 4.524 | 4.524 | 4.524 Mbytes
Step Temp Pzz PotEng Lz
0 3.1494433 -3.4735106 -6.8707307 34
100 1.7727555 6.5330255 -4.8035477 34
200 1.7462368 7.0070325 -4.7646426 34
300 1.7564888 6.6190123 -4.7894637 34
400 1.7641186 6.609684 -4.8064772 34
500 1.7383511 6.7304936 -4.7708095 34
600 1.731708 6.8574656 -4.7612918 34
700 1.7332167 6.6530919 -4.7670014 34
800 1.7487537 6.5644963 -4.7907458 34
900 1.7353648 6.7115188 -4.7772149 34
1000 1.728878 6.4175719 -4.7797216 34
1100 1.7471488 6.5346083 -4.813376 34
1200 1.7188149 6.2502104 -4.7822235 34
1300 1.7151194 6.792534 -4.7781701 34
1400 1.7406603 6.6639592 -4.8170174 34
1500 1.7090537 6.4677579 -4.770701 34
1600 1.7014954 6.2853535 -4.7679742 34
1700 1.7064354 6.4352857 -4.7812978 34
1800 1.7169971 6.5808758 -4.799426 34
1900 1.6822712 6.3746758 -4.7522464 34
2000 1.7126546 6.534969 -4.8091595 34
2100 1.7086108 6.4679932 -4.8146664 34
2200 1.6974952 6.3802129 -4.8052505 34
2300 1.6868035 6.4009243 -4.7935769 34
2400 1.7107125 6.2318869 -4.8358765 34
2500 1.660241 6.4891487 -4.7661183 34
2600 1.6801816 6.1988356 -4.8024291 34
2700 1.6940298 6.1328187 -4.8290053 34
2800 1.6755061 6.4150693 -4.8145473 34
2900 1.6749928 6.4248792 -4.8213509 34
3000 1.6310737 6.6491291 -4.7673027 34
3100 1.6559915 6.2726719 -4.8109181 34
3200 1.6574579 5.7132029 -4.8189484 34
3300 1.6816136 5.7697439 -4.8652811 34
3400 1.6489483 6.4463349 -4.8247812 34
3500 1.6557974 5.9763333 -4.8383712 34
3600 1.6215459 6.2806534 -4.7954657 34
3700 1.6484987 6.0671609 -4.8470777 34
3800 1.6473922 5.8688108 -4.8555351 34
3900 1.6435957 5.930425 -4.8562076 34
4000 1.6514434 6.1962122 -4.872998 34
4100 1.6138337 6.4808124 -4.8219373 34
4200 1.6215239 5.9467966 -4.8412146 34
4300 1.6129295 5.9377323 -4.8414596 34
4400 1.6020549 6.1104301 -4.8395939 34
4500 1.6047738 6.0816222 -4.8538151 34
4600 1.6053565 6.183466 -4.8686817 34
4700 1.6088152 5.7416542 -4.894114 34
4800 1.5954309 5.694319 -4.8840198 34
4900 1.5582564 6.1199614 -4.8429998 34
5000 1.5786672 5.8813574 -4.8907344 34
Loop time of 28.3867 on 1 procs for 5000 steps with 5120 atoms
Performance: 60873.483 tau/day, 176.139 timesteps/s
99.4% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 22.269 | 22.269 | 22.269 | 0.0 | 78.45
Neigh | 4.7222 | 4.7222 | 4.7222 | 0.0 | 16.64
Comm | 0.40821 | 0.40821 | 0.40821 | 0.0 | 1.44
Output | 0.0042329 | 0.0042329 | 0.0042329 | 0.0 | 0.01
Modify | 0.88231 | 0.88231 | 0.88231 | 0.0 | 3.11
Other | | 0.1005 | | | 0.35
Nlocal: 5120 ave 5120 max 5120 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 7768 ave 7768 max 7768 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 297167 ave 297167 max 297167 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 297167
Ave neighs/atom = 58.0404
Neighbor list builds = 474
Dangerous builds = 246
write_data data.halfhalf
Total wall time: 0:00:28

View File

@ -0,0 +1,141 @@
LAMMPS (22 Sep 2017)
using 1 OpenMP thread(s) per MPI task
units lj
dimension 3
boundary p p p
atom_style atomic
# truncated and shifted LJ potential
pair_style lj/cut 2.5
pair_modify shift yes
# fcc lattice
lattice fcc 0.9731
Lattice spacing in x,y,z = 1.6019 1.6019 1.6019
region my_box block 0 8.0 0 8.0 0 20.0
create_box 1 my_box
Created orthogonal box = (0 0 0) to (12.8152 12.8152 32.0379)
1 by 1 by 4 MPI processor grid
region particles block 0 8.0 0 8.0 0 20.0
create_atoms 1 region particles
Created 5120 atoms
pair_coeff 1 1 1.0 1.0 2.5
mass 1 1.0
change_box all z final 0.0 34 remap units box
orthogonal box = (0 0 0) to (12.8152 12.8152 34)
# select particles in one side of the elongated box
region left plane 0 0 10 0 0 1
group left region left
2688 atoms in group left
velocity left create 6.0 1 mom yes rot yes
# simulation parameters
neighbor 0.6 bin
timestep 0.004
run_style verlet
fix ensemble left nve # Note: only move particle in left-hand side
fix langevin left langevin 3.0 0.8 100.0 2017
# outout
thermo_style custom step temp pzz pe lz
thermo 100
# dump dumpXYZ all xyz 100 traj.xyz
# run reduced for demonstration purposes
# run 10000
run 5000
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 3.1
ghost atom cutoff = 3.1
binsize = 1.55, bins = 9 9 22
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/atomonly/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.23 | 3.23 | 3.23 Mbytes
Step Temp Pzz PotEng Lz
0 3.1494433 -3.4735106 -6.8707307 34
100 1.7914373 6.4805818 -4.8420353 34
200 1.740256 6.6108149 -4.7672571 34
300 1.7663827 6.5188941 -4.8103672 34
400 1.7440644 6.5156543 -4.7769467 34
500 1.7471724 6.5208992 -4.7843928 34
600 1.7320106 6.6557835 -4.7654637 34
700 1.6839043 6.7689759 -4.7045352 34
800 1.7216746 6.66436 -4.7601673 34
900 1.7342542 6.3242367 -4.7790803 34
1000 1.7338566 6.5803438 -4.7854529 34
1100 1.7328856 6.3846366 -4.7902625 34
1200 1.7546906 6.5048137 -4.8213443 34
1300 1.7163891 6.3903221 -4.7665145 34
1400 1.7011627 6.5782672 -4.7517875 34
1500 1.7105234 6.5811813 -4.7677748 34
1600 1.7334403 6.5032837 -4.8067749 34
1700 1.7252102 6.5443871 -4.8058994 34
1800 1.721958 6.3378188 -4.8150073 34
1900 1.6797892 6.6780506 -4.7538618 34
2000 1.7001774 6.3578192 -4.7894018 34
2100 1.7127784 6.3219105 -4.8161059 34
2200 1.696825 6.536793 -4.7946902 34
2300 1.6704578 6.7186933 -4.7609628 34
2400 1.6772498 6.3432817 -4.7778471 34
2500 1.7073862 6.2153226 -4.8299181 34
2600 1.6951557 6.4397257 -4.8156787 34
2700 1.6845984 6.0123544 -4.8136864 34
2800 1.6550565 6.2489392 -4.7829639 34
2900 1.6892315 6.158499 -4.8423004 34
3000 1.6814436 6.07976 -4.8400696 34
3100 1.6387025 6.330166 -4.7878978 34
3200 1.6747855 6.0767043 -4.8481995 34
3300 1.6508768 6.2749233 -4.8181888 34
3400 1.6426364 6.3934935 -4.8223824 34
3500 1.6576512 6.0638185 -4.8559078 34
3600 1.6444173 6.1376573 -4.8463113 34
3700 1.6480039 5.9943705 -4.8601776 34
3800 1.6467212 6.0556591 -4.8722719 34
3900 1.6271804 6.116738 -4.8547278 34
4000 1.6158134 5.9089534 -4.8477829 34
4100 1.6388157 5.9890465 -4.8920284 34
4200 1.6182368 6.0639887 -4.8724963 34
4300 1.647633 5.6333906 -4.9267536 34
4400 1.5856411 6.2675475 -4.8471239 34
4500 1.5773417 6.1789163 -4.8469057 34
4600 1.6181445 5.7988068 -4.922419 34
4700 1.5876712 5.7398111 -4.8853849 34
4800 1.5708353 6.2204997 -4.8718872 34
4900 1.5514708 5.9782256 -4.8523812 34
5000 1.553347 5.9286523 -4.86582 34
Loop time of 8.10259 on 4 procs for 5000 steps with 5120 atoms
Performance: 213265.164 tau/day, 617.087 timesteps/s
99.2% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 5.2964 | 5.6236 | 5.8982 | 9.0 | 69.40
Neigh | 1.0562 | 1.1907 | 1.3257 | 8.7 | 14.70
Comm | 0.43963 | 0.98786 | 1.5968 | 42.5 | 12.19
Output | 0.0023124 | 0.004741 | 0.0090873 | 4.0 | 0.06
Modify | 0.018652 | 0.22213 | 0.39884 | 36.4 | 2.74
Other | | 0.07357 | | | 0.91
Nlocal: 1280 ave 1337 max 1211 min
Histogram: 1 0 0 0 0 1 1 0 0 1
Nghost: 3416.25 ave 3549 max 3297 min
Histogram: 2 0 0 0 0 0 0 0 1 1
Neighs: 74269.8 ave 77932 max 69612 min
Histogram: 1 0 0 0 0 1 0 1 0 1
Total # of neighbors = 297079
Ave neighs/atom = 58.0232
Neighbor list builds = 474
Dangerous builds = 247
write_data data.halfhalf
Total wall time: 0:00:08

19
examples/USER/uef/README Normal file
View File

@ -0,0 +1,19 @@
This directory contains two short example scripts for the USER-UEF
package.
nvt_uniaxial:
A simulation of a WCA fluid under constant volume uniaxial strain
with stretching in the z direction, compression in the x and y
directions.The xx, yy and zz components of the pressure tensor are
written to the log file. The simulation conditions are the same
used in the paper by Thomas Hunt [http://arxiv.org/abs/1310.3905]
and should yield an zz pressure near 5 and xx/yy pressures near 10.
npt_biaxial:
A simulation of a WCA fluid under stress-controlled biaxial strain
with stretching in the x and y directions, compression in the z
direction. The zz stress is controlled using the ext keyword in fix
npt/uef. The xx yy and zz components of the pressure tensor are
written to the log file. The simulations conditions should yield
xx/yy pressures near 5 and zz pressure near 10

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
# biaxial NPT deformation of WCA fluid
units lj
atom_style atomic
pair_style lj/cut 1.122562
read_data data.wca
pair_coeff 1 1 1.0 1.0
pair_modify shift yes
neighbor 0.5 bin
neigh_modify delay 0
change_box all triclinic
# these commads show the different methods that may be used to impose
# a constant stress through isotropic or anisotropic coupling
fix 1 all npt/uef temp 0.722 0.722 0.5 iso 10 10 5 erate 0.5 0.5 ext z
#fix 1 all npt/uef temp 0.722 0.722 0.5 z 10 10 5 erate 0.5 0.5 ext xyz
fix 2 all momentum 100 linear 1 1 1
#dump 1 all atom 25 dump.lammpstrj
#dump 2 all cfg/uef 25 dump.*.cfg mass type xs ys zs
thermo_style custom step c_1_press[1] c_1_press[2] c_1_press[3]
thermo 50
run 10000

View File

@ -0,0 +1,284 @@
LAMMPS (22 Sep 2017)
# biaxial NPT deformation of WCA fluid
units lj
atom_style atomic
pair_style lj/cut 1.122562
read_data data.wca
orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798)
1 by 1 by 1 MPI processor grid
reading atoms ...
500 atoms
reading velocities ...
500 velocities
pair_coeff 1 1 1.0 1.0
pair_modify shift yes
neighbor 0.5 bin
neigh_modify delay 0
change_box all triclinic
triclinic box = (0 0 0) to (8.39798 8.39798 8.39798) with tilt (0 0 0)
# these commads show the different methods that may be used to impose
# a constant stress through isotropic or anisotropic coupling
fix 1 all npt/uef temp 0.722 0.722 0.5 iso 10 10 5 erate 0.5 0.5 ext z
#fix 1 all npt/uef temp 0.722 0.722 0.5 z 10 10 5 erate 0.5 0.5 ext xyz
fix 2 all momentum 100 linear 1 1 1
#dump 1 all atom 25 dump.lammpstrj
#dump 2 all cfg/uef 25 dump.*.cfg mass type xs ys zs
thermo_style custom step c_1_press[1] c_1_press[2] c_1_press[3]
thermo 50
run 10000
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.62256
ghost atom cutoff = 1.62256
binsize = 0.811281, bins = 11 11 11
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton/tri
stencil: half/bin/3d/newton/tri
bin: standard
Per MPI rank memory allocation (min/avg/max) = 2.742 | 2.742 | 2.742 Mbytes
Step c_1_press[1] c_1_press[2] c_1_press[3]
0 6.3937851 7.0436438 6.4461087
50 7.9020345 7.303289 14.733929
100 8.3214325 8.385843 13.166247
150 5.7168419 5.6083988 9.7224198
200 3.8875348 4.0840705 7.9912973
250 4.2933724 4.2410519 7.7200953
300 4.5452314 4.2434949 8.6709832
350 5.446489 5.6166962 11.300536
400 6.0682558 5.7787878 12.106852
450 5.3884296 5.5066688 9.9100012
500 4.8046418 4.7115986 9.9769201
550 4.9043933 4.6240966 9.319336
600 4.6843238 4.9571246 9.5325487
650 5.1952989 5.195648 9.6187047
700 5.4163364 5.2938289 10.136655
750 5.6723178 5.0670261 11.415221
800 5.9379901 5.6402916 10.815209
850 5.0695389 5.3021432 10.742859
900 4.6498962 4.7111912 9.8453523
950 4.4811641 5.170132 9.421765
1000 4.7501483 4.2420772 9.3510803
1050 4.5973379 5.2046799 9.8632975
1100 4.7879562 4.9051316 9.8658626
1150 5.0528771 5.5048545 10.110913
1200 4.9926563 5.2482081 9.9610863
1250 4.8476232 4.8498859 9.5752989
1300 5.2932038 5.0594534 10.869545
1350 5.4720421 5.0830442 10.69386
1400 4.8175566 4.9863651 10.041898
1450 4.6307145 4.5615459 9.231299
1500 5.0296259 4.5433558 8.7180513
1550 4.8708444 5.1601014 10.256791
1600 5.5098593 5.316773 10.224386
1650 5.5055907 5.0516814 10.272037
1700 4.6965552 5.2436628 9.8272905
1750 5.0212307 4.740601 8.9738802
1800 4.7756351 5.199734 9.9929449
1850 4.7107092 5.177203 10.580427
1900 5.0935608 4.5286844 9.3036832
1950 4.8035855 4.894359 9.4423987
2000 4.5643937 4.7480477 9.4384251
2050 4.9314701 4.990414 10.151815
2100 5.9828824 5.8188026 12.262691
2150 5.5337303 5.4598468 10.136112
2200 4.892172 4.8699674 9.1629905
2250 4.5680591 4.5740533 9.5633545
2300 5.0023535 4.3948659 8.9645774
2350 5.2533056 4.9803884 10.255653
2400 5.3330196 5.3888322 10.021617
2450 5.2095527 4.8765336 10.135381
2500 5.221153 5.2974568 10.2493
2550 5.385331 5.0801192 10.490479
2600 5.3274988 5.0253548 10.147587
2650 4.718677 5.2710337 9.7549521
2700 4.5811521 4.6083971 8.1923164
2750 4.4743752 4.3319737 8.8690805
2800 5.0215013 5.2262961 9.8627954
2850 6.1005107 5.5994942 11.170661
2900 5.9673524 5.362124 10.401699
2950 5.5400849 5.7523993 10.292536
3000 4.9202636 5.1210431 10.125839
3050 4.5286487 5.3586164 9.8634322
3100 4.5719961 5.1615414 9.8027972
3150 5.4091919 4.8581943 9.96938
3200 5.522125 5.3564838 9.7638407
3250 4.9019062 5.2514758 9.2993079
3300 5.2375918 5.1439012 9.4313575
3350 4.750235 4.8692016 10.54193
3400 5.5793211 5.4184157 11.021389
3450 4.9022614 5.3166498 9.4629659
3500 4.6348617 4.4650979 9.0665548
3550 4.7922405 4.8961269 10.255446
3600 4.8914457 5.1158894 9.4736084
3650 5.062771 4.6725475 10.263484
3700 5.4842823 5.7793971 10.342915
3750 5.3136012 5.063065 10.398307
3800 4.9372149 4.9270414 9.5304748
3850 5.2144752 5.1716455 9.7575725
3900 5.0892665 5.1697057 9.918052
3950 5.1124507 5.354702 9.791366
4000 5.1255084 5.1143653 10.913101
4050 5.1891698 4.9913681 9.6871728
4100 4.7663368 4.2435014 8.3815668
4150 4.8060033 4.3415868 9.6553386
4200 4.8548303 4.8006768 9.5995801
4250 5.0976366 5.2683175 10.386444
4300 5.8921937 5.5134696 10.788143
4350 5.8323871 5.5255869 11.199128
4400 5.2464655 5.0005905 10.311055
4450 4.9264849 5.2499854 10.26702
4500 4.4431895 4.536981 8.7489096
4550 4.5180914 4.2080277 8.6525529
4600 5.1782188 5.1224059 10.683341
4650 5.4156233 4.8714464 10.473939
4700 5.3107669 5.224614 10.569391
4750 4.9538022 5.2509475 10.288918
4800 4.6976945 4.8107142 9.8299772
4850 5.1227936 5.0737571 10.440452
4900 4.7580514 4.6375995 9.1971008
4950 5.0647601 4.6470735 9.583131
5000 5.196231 5.7531491 10.409807
5050 5.6691323 5.7163652 12.335701
5100 5.3603738 5.4887106 10.961712
5150 4.455028 4.6494465 9.8096968
5200 4.7596912 4.4804896 9.3762885
5250 5.3144927 5.0113772 9.553101
5300 5.3445266 4.8262035 9.1220802
5350 5.1540657 5.5982676 10.765178
5400 5.1773418 5.2684381 10.452351
5450 4.8946859 5.3283747 9.8015564
5500 5.2009608 4.7183522 9.4558009
5550 5.4158589 5.5005458 10.539505
5600 4.7196831 5.4181991 9.6439249
5650 4.8333571 4.8601728 8.9350189
5700 5.4395698 4.9730096 10.669681
5750 5.2947443 5.6973259 10.020539
5800 5.4391993 5.5255143 10.264969
5850 4.9921388 5.2643827 10.217028
5900 5.0048643 4.7952641 8.9718929
5950 5.1843818 4.5987295 9.6858944
6000 5.0343993 4.946933 9.7436708
6050 4.6202714 5.3502658 10.752915
6100 5.6914422 5.3621964 10.281827
6150 5.1928763 5.9652686 10.923881
6200 5.0030409 5.2013891 10.056308
6250 4.9699876 5.2363753 9.9964211
6300 4.9129606 4.4558458 9.0419952
6350 4.6623958 4.4078264 8.528649
6400 4.9811441 5.1183207 10.261751
6450 5.3644017 5.5153937 10.401295
6500 5.6674981 5.7427566 11.928777
6550 5.1622364 5.3212928 10.067198
6600 4.5954278 5.1645397 10.16724
6650 4.9192712 5.0413326 9.95656
6700 4.6179845 4.5656214 9.3798952
6750 4.7287495 4.5071148 8.7890116
6800 4.8600442 4.8083512 10.245595
6850 5.0515531 5.1609272 10.553855
6900 5.1159742 5.1359869 10.594699
6950 4.8908884 5.0592418 9.5698704
7000 4.7654136 4.7530776 8.9439321
7050 4.779293 4.7534957 9.7244349
7100 5.2265831 5.6869073 10.32717
7150 5.4019177 5.15174 10.457567
7200 4.9817102 5.0596098 10.337574
7250 5.1836654 5.6065238 10.723108
7300 4.2916569 4.457143 8.5419099
7350 4.3906104 4.5439294 9.0805415
7400 4.998572 5.3386063 10.491418
7450 5.1109022 5.0506801 10.636116
7500 5.0248381 5.019932 10.217023
7550 5.0109265 5.1438717 9.9032426
7600 4.6628614 4.6204146 8.9459669
7650 4.8930717 5.0650009 10.049331
7700 4.9373454 5.6265835 10.210644
7750 5.5001067 5.3133253 10.667995
7800 5.0816102 5.0125753 10.591986
7850 4.9638046 5.1969015 9.9728333
7900 4.8438207 4.9217213 8.9978809
7950 4.7318805 4.6248537 8.6806596
8000 5.2808543 5.2892613 10.932535
8050 5.9609722 5.87087 10.47602
8100 5.2190231 5.6693244 11.244536
8150 5.3481127 5.2849903 10.222845
8200 4.7833053 4.7404657 9.2034474
8250 4.5461994 4.510467 10.294452
8300 4.6025175 4.8332817 8.7967546
8350 5.0389897 5.6642908 10.243402
8400 4.8414338 4.8925143 9.3653631
8450 5.5087429 4.7830361 10.831666
8500 5.2678146 5.1697789 9.9105782
8550 5.1211843 4.9097801 9.4165956
8600 5.8239149 5.0821022 10.803261
8650 5.3620154 5.5831747 11.16202
8700 5.1625813 4.8791404 10.537681
8750 4.5622461 5.0157549 10.013227
8800 4.4051517 5.0224553 9.6364273
8850 4.1711629 4.635617 8.5470244
8900 4.7049907 5.2458435 10.100728
8950 4.8568883 5.2360772 9.2306469
9000 5.0091899 5.2203574 10.718541
9050 5.1037824 4.9022451 10.24271
9100 5.0789015 4.9331454 9.173614
9150 5.3865455 5.3427553 11.40199
9200 5.5089482 5.9423232 10.976063
9250 5.1353552 5.0650262 10.040607
9300 4.6761948 4.9155175 9.6413722
9350 4.4780834 4.3934708 8.7049819
9400 4.2561799 4.7906324 9.046134
9450 5.6162819 5.2881846 9.9040868
9500 5.7554547 5.6111262 10.23849
9550 5.4230462 5.5656045 10.908006
9600 5.5045685 4.9818892 9.8929535
9650 5.0541481 5.0183351 9.5226021
9700 4.9712829 5.2395398 9.9996693
9750 5.0960017 5.4419775 10.914719
9800 5.0790688 5.6378474 10.00789
9850 4.9661747 5.114502 9.4585052
9900 5.0133498 4.7456254 9.4572653
9950 5.3318846 4.6643122 10.096292
10000 5.2227687 4.8924305 9.5894615
Loop time of 4.78247 on 1 procs for 10000 steps with 500 atoms
Performance: 903298.340 tau/day, 2090.968 timesteps/s
99.2% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.73894 | 0.73894 | 0.73894 | 0.0 | 15.45
Neigh | 2.9092 | 2.9092 | 2.9092 | 0.0 | 60.83
Comm | 0.32306 | 0.32306 | 0.32306 | 0.0 | 6.76
Output | 0.003392 | 0.003392 | 0.003392 | 0.0 | 0.07
Modify | 0.6959 | 0.6959 | 0.6959 | 0.0 | 14.55
Other | | 0.112 | | | 2.34
Nlocal: 500 ave 500 max 500 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 905 ave 905 max 905 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 3340 ave 3340 max 3340 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 3340
Ave neighs/atom = 6.68
Neighbor list builds = 4580
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:04

View File

@ -0,0 +1,284 @@
LAMMPS (22 Sep 2017)
# biaxial NPT deformation of WCA fluid
units lj
atom_style atomic
pair_style lj/cut 1.122562
read_data data.wca
orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798)
1 by 2 by 2 MPI processor grid
reading atoms ...
500 atoms
reading velocities ...
500 velocities
pair_coeff 1 1 1.0 1.0
pair_modify shift yes
neighbor 0.5 bin
neigh_modify delay 0
change_box all triclinic
triclinic box = (0 0 0) to (8.39798 8.39798 8.39798) with tilt (0 0 0)
# these commads show the different methods that may be used to impose
# a constant stress through isotropic or anisotropic coupling
fix 1 all npt/uef temp 0.722 0.722 0.5 iso 10 10 5 erate 0.5 0.5 ext z
#fix 1 all npt/uef temp 0.722 0.722 0.5 z 10 10 5 erate 0.5 0.5 ext xyz
fix 2 all momentum 100 linear 1 1 1
#dump 1 all atom 25 dump.lammpstrj
#dump 2 all cfg/uef 25 dump.*.cfg mass type xs ys zs
thermo_style custom step c_1_press[1] c_1_press[2] c_1_press[3]
thermo 50
run 10000
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.62256
ghost atom cutoff = 1.62256
binsize = 0.811281, bins = 11 11 11
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton/tri
stencil: half/bin/3d/newton/tri
bin: standard
Per MPI rank memory allocation (min/avg/max) = 2.71 | 2.71 | 2.71 Mbytes
Step c_1_press[1] c_1_press[2] c_1_press[3]
0 6.3937851 7.0436438 6.4461087
50 7.9020345 7.303289 14.733929
100 8.3214325 8.385843 13.166247
150 5.7168419 5.6083988 9.7224198
200 3.8875348 4.0840705 7.9912973
250 4.2933724 4.2410519 7.7200953
300 4.5452314 4.2434949 8.6709832
350 5.446489 5.6166962 11.300536
400 6.0682558 5.7787878 12.106852
450 5.3884296 5.5066688 9.9100012
500 4.8046418 4.7115986 9.9769201
550 4.9043933 4.6240966 9.319336
600 4.6843238 4.9571246 9.5325487
650 5.1952989 5.195648 9.6187047
700 5.4163364 5.2938289 10.136655
750 5.6723178 5.0670261 11.415221
800 5.9379901 5.6402916 10.815209
850 5.0695389 5.3021432 10.742859
900 4.6498961 4.7111912 9.8453524
950 4.4811637 5.1701321 9.4217645
1000 4.750149 4.2420768 9.3510788
1050 4.5973376 5.2046787 9.8633025
1100 4.7879517 4.9051339 9.8658578
1150 5.0528775 5.5048671 10.110905
1200 4.9926841 5.2482049 9.9610519
1250 4.8475836 4.8499116 9.5753651
1300 5.2930219 5.0593566 10.869335
1350 5.4722342 5.0830411 10.693439
1400 4.8165803 4.9851498 10.04213
1450 4.6276458 4.5642988 9.2306141
1500 5.0196773 4.5470773 8.7204145
1550 4.878246 5.1583406 10.263895
1600 5.4921049 5.3126759 10.274755
1650 5.4363266 5.1708866 9.9880665
1700 4.9186005 5.2841155 9.5911223
1750 4.9105668 4.7112031 8.9221295
1800 4.9833291 4.886821 9.6573393
1850 5.0729703 4.8331712 10.094971
1900 5.7220173 5.9330299 10.580261
1950 5.3176022 5.7140521 11.11604
2000 5.3247727 5.5172893 10.622834
2050 5.2055235 4.8768078 9.9819356
2100 4.4604981 4.1427844 7.8106592
2150 4.4406592 4.8264893 9.6662695
2200 5.2350836 5.1039145 10.36006
2250 5.3777857 5.3274609 11.357157
2300 5.4888334 5.9555482 10.76346
2350 4.6122564 4.7356468 9.0833059
2400 4.6670237 4.4895588 9.0619648
2450 4.2201177 4.2558397 9.4898835
2500 5.452448 5.4336384 10.50224
2550 5.012581 5.316158 10.324517
2600 5.0880279 5.1264772 10.085103
2650 4.8885834 5.2368982 9.6002032
2700 5.1549266 5.3419678 11.335447
2750 5.497105 5.3643445 9.9990393
2800 4.8826744 4.9875712 10.125435
2850 4.8617121 5.1282348 9.5629401
2900 4.7883446 4.6187804 9.0562496
2950 4.7656266 5.1293592 10.693811
3000 5.2676745 5.110172 9.3512146
3050 4.5749222 4.8413907 10.311305
3100 5.0794819 5.265009 9.1598496
3150 5.2078869 5.1879882 10.412548
3200 5.0187616 4.6226213 9.7266174
3250 5.1541897 4.5157063 9.8355764
3300 5.0721396 5.3545282 10.174356
3350 5.3984495 5.3222207 10.008886
3400 5.1263226 5.1189192 10.361534
3450 5.1251845 4.8312752 9.6546597
3500 5.1133696 5.2646289 10.320765
3550 4.9884235 5.3861707 9.1944042
3600 5.196909 5.203186 10.085965
3650 5.4717592 5.2205442 10.251283
3700 5.4429771 5.3027898 11.385714
3750 5.5688484 5.5980199 10.558193
3800 4.5239453 4.7021545 8.952588
3850 4.6438079 4.6409958 9.3890154
3900 5.1108473 4.8787691 10.665694
3950 5.6398426 5.4386578 10.668189
4000 5.063697 4.9663173 10.513266
4050 4.8770847 4.4603573 9.8101845
4100 4.3950768 4.3579384 8.3402845
4150 4.3355402 5.0429352 10.323111
4200 4.7688478 5.051487 9.0632339
4250 4.9879366 5.3367146 10.409554
4300 5.4578199 5.4889206 10.418789
4350 5.6598068 5.4538572 10.842349
4400 5.3705312 5.3796871 10.430547
4450 4.663804 5.058851 9.2705923
4500 4.3439039 4.3523422 8.1747925
4550 4.5414802 4.3750772 9.2702452
4600 4.9216199 5.2897069 10.747727
4650 5.5154852 5.9628437 10.5168
4700 5.45199 5.382787 10.654544
4750 4.7525419 5.4701385 9.3189378
4800 5.3696365 4.6134207 9.4455676
4850 5.2444123 5.035993 9.4148435
4900 5.6006507 4.8536828 10.283579
4950 5.155711 4.978634 10.58973
5000 5.0854607 4.9853307 9.2414296
5050 5.1098462 4.7349164 9.8739001
5100 5.1989395 5.0217416 9.8780949
5150 5.612116 5.2165007 10.338464
5200 5.0571356 5.3109846 10.685262
5250 5.4832657 5.0371665 8.9420853
5300 4.5312549 4.9629392 8.2478064
5350 5.1617038 5.0533699 10.452218
5400 5.7873394 5.6776926 11.926526
5450 5.7002516 5.243239 10.940265
5500 4.7896799 4.898544 10.163856
5550 4.9155627 4.9567495 9.4445476
5600 4.2447343 4.5045912 8.7732992
5650 5.070197 4.7343938 9.9908239
5700 4.9609446 5.0901934 10.812786
5750 5.4001631 5.5552888 10.085896
5800 5.4209837 4.7153245 9.6865245
5850 4.9801041 5.180338 9.8930439
5900 5.3423595 5.2341361 10.294159
5950 5.683047 5.6830131 10.24313
6000 5.0618789 5.4533644 10.713412
6050 5.4034888 4.6341621 10.031976
6100 5.1934299 4.7525347 9.1287151
6150 5.0092398 4.806931 10.024305
6200 5.3046516 5.3083532 9.6396223
6250 5.2824046 4.7957557 10.305279
6300 5.3007029 5.0071874 11.175322
6350 5.1128883 4.990408 9.3439118
6400 5.0543602 4.9971378 9.8259954
6450 4.8843692 4.9116343 10.08132
6500 4.5966453 4.8042861 9.160272
6550 4.8510961 4.7096646 9.8009968
6600 5.658307 5.2330511 10.739519
6650 5.2374409 5.3241249 10.291779
6700 4.9006975 5.0036186 9.9872029
6750 5.2209104 5.1826025 9.5671875
6800 4.5238727 4.3070529 8.6072303
6850 4.2617247 4.7551571 9.7302077
6900 5.6499354 4.8714257 10.723511
6950 5.6881769 5.1800721 10.18134
7000 5.588834 5.0104896 10.304105
7050 4.9404045 4.8589121 9.7096741
7100 5.2208179 4.9339808 9.7737491
7150 5.4507842 5.046485 10.734783
7200 4.9737171 5.5760486 9.1627431
7250 4.5967409 4.750471 9.315832
7300 5.5147308 5.3202861 10.542679
7350 5.7730418 5.5363574 10.384376
7400 4.9879586 5.2837443 9.4485798
7450 5.1862431 4.8357842 10.017598
7500 5.4528245 5.1864957 10.941774
7550 5.4202434 5.1089468 10.128264
7600 4.8063537 4.8723653 9.0364984
7650 4.3144701 4.6148377 9.4939315
7700 4.9033831 5.5327473 9.9054613
7750 5.0693093 5.0768222 10.473081
7800 5.0591805 5.6009473 10.006225
7850 5.15269 5.468248 10.404619
7900 5.1971759 5.0615117 9.9614488
7950 4.9771238 4.886213 9.4730722
8000 4.7731123 5.1111433 9.9550597
8050 5.1655183 5.4432364 9.6649669
8100 5.4597006 5.4026039 11.631184
8150 5.3229643 5.4394219 9.9830611
8200 4.5420712 4.9359646 9.0121988
8250 4.5455108 4.3883996 10.304568
8300 5.219721 5.1571958 10.305462
8350 4.7291561 4.7391636 9.0768372
8400 5.3262934 5.8221591 11.065466
8450 4.7583026 5.2282086 10.291955
8500 4.9174536 4.5701979 10.140444
8550 4.459922 4.8293188 9.4438719
8600 4.7962584 4.5811071 9.5158666
8650 4.6097275 4.431952 9.4350505
8700 5.166554 5.2000584 11.162202
8750 5.2353596 5.1668944 10.829751
8800 5.3150111 4.9983333 9.8402224
8850 4.9571197 4.9196589 9.4880549
8900 4.902223 4.7539187 10.002425
8950 4.9531983 5.0517321 9.7838444
9000 5.4003802 4.9900303 10.550808
9050 4.9254643 5.0678701 10.24321
9100 4.9902263 4.9056928 9.0326566
9150 5.1003677 5.1555374 10.049056
9200 5.2358131 5.5834504 10.354698
9250 5.5781649 5.1188429 10.361369
9300 5.2100192 5.0737267 10.074694
9350 5.1462976 4.8010759 9.0279769
9400 5.0177693 5.4890092 10.03612
9450 5.2507957 5.541141 10.639854
9500 5.836784 4.9498236 10.288015
9550 5.4698183 5.8761209 10.979924
9600 5.0534023 5.0043428 10.436057
9650 4.3619773 4.5413125 9.047513
9700 4.3777508 4.7902251 8.9501908
9750 4.6851974 4.3152085 8.825764
9800 5.7312665 4.850913 10.247637
9850 6.2290614 5.5480801 10.934907
9900 6.0316892 6.1098926 11.562223
9950 5.6370814 5.3933342 11.148805
10000 4.6429923 5.0853156 9.4267693
Loop time of 3.06414 on 4 procs for 10000 steps with 500 atoms
Performance: 1409858.531 tau/day, 3263.561 timesteps/s
99.4% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.27954 | 0.30916 | 0.3866 | 8.1 | 10.09
Neigh | 1.0657 | 1.129 | 1.2853 | 8.5 | 36.85
Comm | 0.56334 | 0.80526 | 0.89816 | 15.6 | 26.28
Output | 0.0032749 | 0.0041527 | 0.006541 | 2.1 | 0.14
Modify | 0.6522 | 0.67016 | 0.69843 | 2.1 | 21.87
Other | | 0.1464 | | | 4.78
Nlocal: 125 ave 130 max 122 min
Histogram: 2 0 0 0 0 1 0 0 0 1
Nghost: 459.75 ave 470 max 448 min
Histogram: 1 0 0 0 0 1 1 0 0 1
Neighs: 837 ave 867 max 811 min
Histogram: 2 0 0 0 0 0 0 0 1 1
Total # of neighbors = 3348
Ave neighs/atom = 6.696
Neighbor list builds = 4589
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:03

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
# uniaxial NVT deformation of WCA fluid
units lj
atom_style atomic
pair_style lj/cut 1.122562
read_data data.wca
pair_coeff 1 1 1.0 1.0
pair_modify shift yes
neighbor 0.5 bin
neigh_modify delay 0
change_box all triclinic
fix 1 all nvt/uef temp 0.722 0.722 0.5 erate -0.5 -0.5
fix 2 all momentum 100 linear 1 1 1
#dump 1 all atom 25 dump.lammpstrj
#dump 2 all cfg/uef 25 dump.*.cfg mass type xs ys zs
thermo_style custom step c_1_press[1] c_1_press[2] c_1_press[3]
thermo 50
run 10000

View File

@ -0,0 +1,281 @@
LAMMPS (22 Sep 2017)
# uniaxial NVT deformation of WCA fluid
units lj
atom_style atomic
pair_style lj/cut 1.122562
read_data data.wca
orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798)
1 by 1 by 1 MPI processor grid
reading atoms ...
500 atoms
reading velocities ...
500 velocities
pair_coeff 1 1 1.0 1.0
pair_modify shift yes
neighbor 0.5 bin
neigh_modify delay 0
change_box all triclinic
triclinic box = (0 0 0) to (8.39798 8.39798 8.39798) with tilt (0 0 0)
fix 1 all nvt/uef temp 0.722 0.722 0.5 erate -0.5 -0.5
fix 2 all momentum 100 linear 1 1 1
#dump 1 all atom 25 dump.lammpstrj
#dump 2 all cfg/uef 25 dump.*.cfg mass type xs ys zs
thermo_style custom step c_1_press[1] c_1_press[2] c_1_press[3]
thermo 50
run 10000
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.62256
ghost atom cutoff = 1.62256
binsize = 0.811281, bins = 11 11 11
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton/tri
stencil: half/bin/3d/newton/tri
bin: standard
Per MPI rank memory allocation (min/avg/max) = 2.742 | 2.742 | 2.742 Mbytes
Step c_1_press[1] c_1_press[2] c_1_press[3]
0 6.3937851 7.0436438 6.4461087
50 10.369902 10.999889 6.5437384
100 12.411384 13.145871 7.8892802
150 12.88182 12.114068 7.5155182
200 10.375571 10.979773 6.5624056
250 10.158901 10.251273 5.4525068
300 10.011314 9.8371382 5.4031393
350 9.4890008 9.7992108 5.054963
400 9.1715116 9.2647886 4.9600208
450 9.8495961 9.3353483 4.986786
500 9.5903809 8.576173 4.8252116
550 8.8057509 9.7152078 4.9089022
600 8.9743682 10.031277 4.8924072
650 10.233852 9.3059527 5.1977058
700 9.2361906 9.6439971 5.0923763
750 10.449751 9.5911465 5.2548714
800 9.8366857 9.9873885 4.9456956
850 10.266351 9.9620134 5.0602713
900 9.6325813 9.3910946 5.1466624
950 9.1911919 9.1519006 4.8275345
1000 9.2871712 9.8508501 5.2674099
1050 9.7052035 10.291793 5.160359
1100 9.9425552 10.361827 5.5520484
1150 10.377563 10.26588 5.5997436
1200 9.6368269 10.354413 5.4137873
1250 9.2071055 9.1706334 4.9800411
1300 9.7140516 8.7257777 4.8536943
1350 10.145983 9.8247797 4.8921813
1400 9.1998975 9.6935675 5.2269871
1450 9.4838136 8.9035726 4.6867121
1500 9.066389 9.811658 4.8875316
1550 10.007083 9.8946118 5.204609
1600 9.722137 9.9291588 5.326712
1650 9.7424614 9.6995966 5.3577819
1700 9.7185135 9.5922931 5.385856
1750 9.6368481 8.1414594 5.0046079
1800 9.8065782 9.6798036 4.92473
1850 9.0463737 10.024205 5.6495695
1900 9.0774484 10.527582 5.0363426
1950 9.1691461 10.049703 4.8517514
2000 9.7619602 10.049532 5.2088038
2050 9.9203348 9.8056395 5.7699852
2100 9.1455665 9.5864018 5.1410542
2150 8.8501135 9.7917307 5.141824
2200 9.1433685 9.8168548 5.1742441
2250 9.3248968 10.454532 5.5456356
2300 10.210505 9.361499 5.0935226
2350 9.5041186 9.598986 5.2451005
2400 8.968896 9.2811921 4.7799868
2450 9.8201159 10.133892 4.9981817
2500 9.4421084 9.7875766 5.4124809
2550 9.6410643 9.9148309 5.0603288
2600 9.3810676 9.5346849 5.3233836
2650 9.2340337 8.7233538 5.0361302
2700 9.405597 9.7848488 4.7537042
2750 9.9447412 9.2366502 4.9736459
2800 10.189443 9.452684 5.624362
2850 9.6680124 9.0941543 5.0101469
2900 8.4350889 9.1595018 4.7706866
2950 9.0056117 9.3498593 4.7655963
3000 9.4795416 9.7400747 5.4705868
3050 9.6605264 9.4558374 5.1240166
3100 9.681451 9.7966554 5.3174458
3150 9.7887528 9.7371194 4.9349103
3200 9.9720054 9.5592538 5.2306417
3250 10.185023 9.9436037 5.4127312
3300 9.9670676 9.6069307 5.026261
3350 9.0090411 9.5975249 4.8881019
3400 9.6535707 9.748683 4.9933873
3450 9.7774977 9.7570511 4.8512619
3500 9.7250053 10.36386 5.4057249
3550 9.567788 9.773413 5.3936671
3600 9.2094148 9.0211247 5.2328675
3650 9.3512098 9.73407 4.576624
3700 9.159074 9.2611591 5.2996448
3750 9.4772798 8.9792211 5.1007079
3800 9.3898357 9.1150609 5.2126508
3850 9.2466312 9.1460651 4.867472
3900 9.9316993 9.3061137 5.1219265
3950 9.2550913 9.780254 5.371885
4000 10.005356 9.7328972 5.2535791
4050 9.5228242 9.5134113 5.4181393
4100 9.576808 10.082425 5.1272491
4150 10.20265 9.6667058 5.529118
4200 9.9443671 10.09427 5.6163734
4250 9.4956875 9.9462818 5.0820085
4300 10.350144 10.003702 5.1621505
4350 10.119486 9.8691507 5.4913457
4400 9.4991604 10.516185 5.2512264
4450 9.0812854 9.2835603 5.1695714
4500 9.7538478 8.5298834 4.5954607
4550 9.8920394 9.3581299 5.202587
4600 9.2694921 9.3338291 5.201958
4650 10.925818 9.5062049 4.8694531
4700 11.020014 10.130224 5.582409
4750 9.5005142 9.3571561 5.456739
4800 9.6670147 9.6628702 5.0451252
4850 9.134147 9.1308788 4.7950594
4900 9.7466206 8.6171443 4.8716275
4950 9.0397505 9.1996036 5.2010502
5000 9.6898652 9.8914655 5.3959279
5050 10.06771 9.7523891 5.3690408
5100 10.000963 9.6279379 5.4077384
5150 9.8686159 10.179702 5.0686824
5200 9.8866247 9.725152 5.4350049
5250 9.2068346 10.214424 5.3187713
5300 9.713992 9.8069045 5.496359
5350 9.423852 9.364085 5.2144606
5400 9.4350241 9.5584633 5.0339001
5450 10.555124 10.784922 5.1938072
5500 9.4147344 10.33187 5.4360602
5550 9.8514653 9.6575827 5.4959779
5600 9.3138107 9.6592624 4.941387
5650 9.1224809 8.7112257 5.0435936
5700 8.8289158 10.749686 4.8916132
5750 9.7200279 10.030606 5.2033161
5800 9.8439873 9.6289015 5.5131934
5850 9.6257294 9.4128988 4.9196038
5900 9.7490214 9.5776313 5.0301815
5950 9.1430855 10.108944 5.1406243
6000 9.3358644 9.5633737 4.9787073
6050 9.4432774 8.9464304 5.1466052
6100 8.8878373 9.5048946 4.9190238
6150 9.6451898 9.2419823 5.0159841
6200 9.5042173 8.9414307 5.2634247
6250 9.0896505 9.7230651 5.3340322
6300 8.8100599 8.8781352 5.4117914
6350 9.3104601 9.0233294 5.3136432
6400 9.368101 9.6387362 4.7833216
6450 10.334343 9.8384149 5.3606204
6500 9.8824036 10.022627 6.0857086
6550 9.7034443 10.026765 5.17604
6600 9.3757845 9.899268 5.2301359
6650 10.540821 10.4343 5.5287065
6700 9.6317649 9.8923579 5.6045768
6750 9.5982772 10.07897 5.1221451
6800 10.239883 10.189967 5.3167447
6850 10.017271 9.7680902 5.229621
6900 9.6200416 10.129301 5.1998759
6950 9.0361417 8.923798 5.1652612
7000 9.3153521 9.063054 4.6860773
7050 8.6434091 9.0363436 4.7811975
7100 9.4955395 9.3830541 5.022538
7150 9.3392402 9.1847119 5.1544622
7200 9.4676321 9.8370036 4.8854442
7250 9.5115882 10.350324 4.9780525
7300 9.6025583 9.6247917 5.473794
7350 9.8919524 10.049446 4.9816931
7400 9.6814319 9.9410894 5.265078
7450 9.4130955 10.191436 5.2531256
7500 9.8114668 8.8461635 5.0562894
7550 10.321567 9.4730124 5.2043655
7600 9.5059024 9.8330367 5.0749721
7650 10.067084 10.606423 5.5598818
7700 10.896159 10.084281 5.5159718
7750 9.754306 10.162301 5.2475876
7800 9.7278145 9.801009 5.0685504
7850 9.8639905 10.323104 5.2458864
7900 9.7246799 9.1377357 5.1841319
7950 10.381792 9.6977533 5.0977386
8000 9.7265224 9.2999829 4.7925571
8050 9.5203288 9.3144956 4.7539211
8100 9.6900973 9.6614063 5.304712
8150 9.713677 9.9154149 4.8178575
8200 9.4733597 9.8948632 5.036112
8250 9.7783036 9.9554334 5.3355682
8300 9.4034783 9.9156801 5.5539279
8350 9.2984025 9.2013949 5.0753991
8400 9.9299078 9.6166801 5.115776
8450 9.526737 9.3312125 4.7800587
8500 9.581956 10.065906 4.9756092
8550 9.2767953 9.326006 5.3024978
8600 9.799968 8.4660845 5.0199109
8650 9.8985354 10.127852 4.9098064
8700 8.7952691 10.521133 5.6840528
8750 9.8299997 9.5588553 5.3085734
8800 9.0811776 9.5704532 5.1684993
8850 9.8303571 9.7618932 5.1251259
8900 9.9238794 9.9654863 5.2999683
8950 10.851304 9.9682289 5.4133763
9000 9.5523794 9.1890766 5.1469144
9050 9.7461948 8.9611236 4.9490826
9100 10.138917 9.6757567 5.0473544
9150 9.4869835 9.4786575 5.0142464
9200 10.263518 10.079135 5.1493398
9250 9.8691684 9.0908275 5.3221203
9300 9.8586707 9.4177643 5.1525265
9350 9.3375816 9.9167208 5.4846207
9400 9.5603903 9.4813199 4.6237495
9450 10.30892 9.5217736 5.6163214
9500 9.327949 9.9831649 4.8923915
9550 9.8421656 9.3202702 5.3352046
9600 8.8543704 9.4556702 4.6430041
9650 10.103399 9.2161072 4.8658062
9700 9.507811 9.9647378 5.227369
9750 9.4988096 8.9942893 5.2491418
9800 9.8007958 9.234452 5.1740203
9850 9.6029685 10.076042 5.023107
9900 9.4035691 10.13782 5.2775777
9950 9.6517135 10.355994 5.3035779
10000 9.9157616 9.7741952 5.5269431
Loop time of 3.47119 on 1 procs for 10000 steps with 500 atoms
Performance: 1244529.812 tau/day, 2880.856 timesteps/s
99.5% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.53077 | 0.53077 | 0.53077 | 0.0 | 15.29
Neigh | 2.219 | 2.219 | 2.219 | 0.0 | 63.93
Comm | 0.21866 | 0.21866 | 0.21866 | 0.0 | 6.30
Output | 0.0027909 | 0.0027909 | 0.0027909 | 0.0 | 0.08
Modify | 0.41956 | 0.41956 | 0.41956 | 0.0 | 12.09
Other | | 0.08042 | | | 2.32
Nlocal: 500 ave 500 max 500 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 908 ave 908 max 908 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 3489 ave 3489 max 3489 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 3489
Ave neighs/atom = 6.978
Neighbor list builds = 4567
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:03

View File

@ -0,0 +1,281 @@
LAMMPS (22 Sep 2017)
# uniaxial NVT deformation of WCA fluid
units lj
atom_style atomic
pair_style lj/cut 1.122562
read_data data.wca
orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798)
1 by 2 by 2 MPI processor grid
reading atoms ...
500 atoms
reading velocities ...
500 velocities
pair_coeff 1 1 1.0 1.0
pair_modify shift yes
neighbor 0.5 bin
neigh_modify delay 0
change_box all triclinic
triclinic box = (0 0 0) to (8.39798 8.39798 8.39798) with tilt (0 0 0)
fix 1 all nvt/uef temp 0.722 0.722 0.5 erate -0.5 -0.5
fix 2 all momentum 100 linear 1 1 1
#dump 1 all atom 25 dump.lammpstrj
#dump 2 all cfg/uef 25 dump.*.cfg mass type xs ys zs
thermo_style custom step c_1_press[1] c_1_press[2] c_1_press[3]
thermo 50
run 10000
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 1.62256
ghost atom cutoff = 1.62256
binsize = 0.811281, bins = 11 11 11
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut, perpetual
attributes: half, newton on
pair build: half/bin/newton/tri
stencil: half/bin/3d/newton/tri
bin: standard
Per MPI rank memory allocation (min/avg/max) = 2.71 | 2.71 | 2.71 Mbytes
Step c_1_press[1] c_1_press[2] c_1_press[3]
0 6.3937851 7.0436438 6.4461087
50 10.369902 10.999889 6.5437384
100 12.411384 13.145871 7.8892802
150 12.88182 12.114068 7.5155182
200 10.375571 10.979773 6.5624056
250 10.158901 10.251273 5.4525068
300 10.011314 9.8371382 5.4031393
350 9.4890008 9.7992108 5.054963
400 9.1715116 9.2647886 4.9600208
450 9.8495961 9.3353483 4.986786
500 9.5903809 8.576173 4.8252116
550 8.8057509 9.7152078 4.9089022
600 8.9743682 10.031277 4.8924072
650 10.233852 9.3059527 5.1977058
700 9.2361906 9.6439971 5.0923762
750 10.449751 9.5911465 5.2548714
800 9.8366858 9.9873885 4.9456956
850 10.266351 9.9620134 5.0602713
900 9.6325811 9.3910947 5.1466627
950 9.1911906 9.1518996 4.8275336
1000 9.2871726 9.8508561 5.2674079
1050 9.7052019 10.291782 5.1603609
1100 9.9425827 10.361848 5.5520588
1150 10.37757 10.265891 5.5997246
1200 9.6367069 10.354451 5.4138749
1250 9.2075006 9.1705136 4.9806417
1300 9.7126123 8.7247301 4.8528533
1350 10.146034 9.8319205 4.8958266
1400 9.19638 9.7052094 5.2332913
1450 9.4667073 8.9014702 4.7073387
1500 9.0949401 9.8381729 4.8904182
1550 10.068959 9.8096692 5.1613658
1600 10.131443 9.7086921 5.0913546
1650 9.9557572 9.9183989 5.2635245
1700 9.3820418 8.6135867 4.9395498
1750 8.9486365 9.3433293 5.2674469
1800 10.352322 10.354432 5.3335153
1850 8.9629784 9.6172224 5.0824828
1900 8.5429652 9.749815 5.1577895
1950 8.9828002 8.9631646 5.0948426
2000 9.4171989 9.7122117 5.1386251
2050 9.767299 9.6146113 4.8965319
2100 10.049399 10.02243 5.3856622
2150 9.2639644 10.09669 5.3020322
2200 9.1916162 10.841127 5.0271109
2250 9.9859708 8.519568 5.24568
2300 9.9462279 9.5850706 5.0632906
2350 9.8043011 9.7605126 5.3148323
2400 9.089818 9.6474522 5.0012486
2450 9.655874 9.3255636 4.8291262
2500 9.0259445 9.3074827 5.1593031
2550 9.1610478 9.7356492 5.0741161
2600 9.3153881 9.3936949 5.4830363
2650 9.6212696 9.598252 4.7172875
2700 9.318906 9.665656 5.1917527
2750 9.6613838 9.7106796 5.1843146
2800 10.231844 9.9407641 4.6940455
2850 10.008093 9.2781076 5.2624957
2900 10.464168 9.808666 5.1457978
2950 9.7080601 9.6972304 5.406456
3000 9.6851209 10.050737 5.1198394
3050 8.9093581 9.213428 5.233108
3100 8.8098921 9.6607476 4.9625331
3150 8.6608386 9.7503441 5.0737533
3200 9.7004403 9.6748778 5.0734462
3250 10.077054 10.318711 5.3233841
3300 10.63887 9.4901739 5.516542
3350 10.232909 9.3407073 5.4989967
3400 9.8854134 9.9542625 5.1982468
3450 9.9388203 9.3394716 4.8135833
3500 9.2514026 9.5857527 5.4605449
3550 8.3940282 9.0549836 4.6951548
3600 8.7696659 9.6262816 4.6302087
3650 9.0695173 8.8520895 5.0814723
3700 9.4700744 9.2777557 4.6825004
3750 9.0221844 9.3407486 5.3984156
3800 9.1478369 9.1420043 5.3024474
3850 9.2652818 9.700053 5.3355364
3900 10.248456 9.2480211 5.2375956
3950 9.8259922 9.6130415 5.5978761
4000 9.404877 9.7931698 5.3767927
4050 10.131713 9.7047295 5.2964594
4100 9.8128638 9.4253237 5.5308166
4150 10.25183 9.1333595 5.1957555
4200 10.449736 9.295762 4.7863033
4250 9.7304858 9.4482515 5.356439
4300 9.2773777 9.4110855 4.9879246
4350 8.9325082 9.3429549 5.0410132
4400 9.2603855 9.7905381 4.7436126
4450 8.7600443 9.9160722 5.196316
4500 9.0824514 10.036035 4.873051
4550 9.3884333 9.6644343 5.1154951
4600 9.8181676 9.6385118 5.3639835
4650 9.1574799 9.5386974 4.7487094
4700 10.275911 9.5383553 5.1084297
4750 9.2476854 9.3353591 5.4773008
4800 9.3422407 9.1931821 4.9210291
4850 9.9033126 9.6443642 5.1334553
4900 9.8469467 9.6836455 5.5101146
4950 10.211229 9.760253 5.0151668
5000 9.3256273 10.109873 5.4129479
5050 9.9704879 9.8504809 5.2191163
5100 9.4820718 9.711504 4.9633504
5150 9.2952171 9.6955742 5.3214246
5200 9.8400791 9.4763906 4.9149518
5250 10.080112 9.5634741 5.1701348
5300 9.4221014 9.8149742 5.3605931
5350 8.8228402 10.121343 5.3192212
5400 9.7318719 10.508763 5.0044083
5450 8.7429847 9.6583774 5.033313
5500 9.9243256 10.239521 5.2956506
5550 9.6088558 9.8555986 5.359257
5600 10.904352 10.72033 5.7874034
5650 9.4774477 9.7246962 5.596949
5700 9.8527139 9.2188245 4.6518586
5750 9.7932375 9.2763721 4.6663307
5800 9.5630073 9.1704583 5.4784197
5850 10.159996 9.5206168 5.0012706
5900 9.1667978 9.6891715 5.1959301
5950 9.2194131 9.2170699 5.1653264
6000 9.5917124 9.2038051 5.1004966
6050 9.4141124 9.9166471 5.0535712
6100 10.231166 9.7746591 5.2399634
6150 9.6054192 9.34446 5.0711646
6200 9.9279645 8.9546561 5.4698039
6250 9.1581437 8.95439 4.9336111
6300 8.9257232 9.0665473 5.188718
6350 9.7685695 9.0822789 4.8454457
6400 9.5140226 9.5073414 5.3420644
6450 9.5379198 9.3316002 5.1940338
6500 10.216584 9.8982859 5.2790157
6550 10.221286 10.913585 5.4521496
6600 10.925166 10.088055 5.2079758
6650 10.012501 9.3870455 5.1740433
6700 10.176139 9.4869588 5.3783369
6750 9.2819415 8.1431975 4.8256476
6800 9.790723 9.7932943 5.3602927
6850 9.1327199 9.8354267 5.1356642
6900 9.240909 9.3854618 5.1767268
6950 10.652806 9.4355671 5.1314851
7000 9.1676917 10.055501 5.2824651
7050 9.6486488 9.1063089 4.9596976
7100 9.3733678 9.5875095 5.0882285
7150 9.282243 9.354934 4.6752644
7200 8.7370777 10.1445 5.0217245
7250 9.563419 9.929442 5.1720916
7300 9.9128346 9.2426863 5.3595023
7350 9.9319949 9.9479477 5.4844629
7400 9.4671739 9.2380048 5.3274217
7450 9.7531193 9.4075641 4.9426738
7500 10.331422 9.4704554 5.3036636
7550 8.7724434 9.663179 4.9492563
7600 10.222748 9.1674852 4.8135992
7650 9.5288583 8.5866929 5.0342955
7700 8.8832847 8.8035037 4.6184473
7750 9.4847076 9.7969656 5.0035855
7800 9.2782486 9.1283641 5.3151299
7850 8.962989 8.7729872 5.0374817
7900 9.6336556 9.4975426 4.9832641
7950 10.125279 10.044247 5.2740873
8000 9.9705097 9.6925988 5.2344188
8050 9.7836318 9.5794261 4.9174534
8100 10.79561 10.04809 5.1604639
8150 9.7261726 10.372878 5.3083843
8200 10.338569 10.08189 5.6555172
8250 9.7833315 9.9834209 5.3790753
8300 9.5857944 9.6052323 5.0689289
8350 9.6706688 9.6189242 4.7725678
8400 10.570423 9.5786093 5.1894242
8450 9.6514599 10.168359 5.0733592
8500 10.273682 9.9179284 5.4014563
8550 9.3120287 10.146837 4.9895115
8600 9.511943 9.644112 5.462624
8650 10.380674 9.1117114 5.156727
8700 10.068596 8.7687113 5.1440814
8750 9.2484971 9.2477678 4.9318794
8800 9.7298469 8.9480303 5.1151321
8850 9.7299502 10.415138 4.7902908
8900 10.966912 10.732962 5.4793574
8950 10.328384 9.9501313 5.6238396
9000 9.7385041 9.8319224 5.1926497
9050 9.7971055 9.5740203 5.1111302
9100 9.7789727 9.9281901 5.1786549
9150 9.9306964 9.3360599 4.9524547
9200 9.8798841 10.240752 5.1691344
9250 10.185445 9.4934917 4.9188964
9300 8.9184663 8.9349408 4.8079511
9350 9.6552187 9.9846949 4.9619969
9400 10.304306 9.2298208 5.2822855
9450 9.8379613 10.041703 5.4186514
9500 10.221443 9.5342818 4.8929802
9550 9.9723047 10.072856 5.4169676
9600 9.3923879 9.2984387 5.4452785
9650 8.9072589 9.7482374 4.7835208
9700 9.8370121 10.205922 5.0385145
9750 9.4274542 9.4653248 5.6340681
9800 9.7668106 9.3265705 5.3154126
9850 10.422549 10.362922 5.361592
9900 9.6264407 9.9790162 5.6381052
9950 10.35018 9.8853593 5.2639184
10000 9.6190853 9.7903758 5.1583115
Loop time of 1.32471 on 4 procs for 10000 steps with 500 atoms
Performance: 3261084.476 tau/day, 7548.807 timesteps/s
98.4% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.1301 | 0.13489 | 0.13886 | 0.9 | 10.18
Neigh | 0.5654 | 0.575 | 0.5883 | 1.3 | 43.41
Comm | 0.35135 | 0.37147 | 0.38856 | 2.4 | 28.04
Output | 0.0028336 | 0.0032777 | 0.004292 | 1.0 | 0.25
Modify | 0.16328 | 0.16711 | 0.17231 | 0.8 | 12.61
Other | | 0.07297 | | | 5.51
Nlocal: 125 ave 128 max 122 min
Histogram: 1 1 0 0 0 0 0 0 1 1
Nghost: 477 ave 489 max 469 min
Histogram: 2 0 0 0 0 1 0 0 0 1
Neighs: 861 ave 877 max 848 min
Histogram: 1 0 1 0 0 1 0 0 0 1
Total # of neighbors = 3444
Ave neighs/atom = 6.888
Neighbor list builds = 4560
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:01

View File

@ -0,0 +1,71 @@
# Testsystem for core-shell model compared to Mitchel and Finchham
# Shamelessly copied from in.coreshell.dsf but this script uses Wolf summation.
# ------------------------ INITIALIZATION ----------------------------
units metal
dimension 3
boundary p p p
atom_style full
# ----------------------- ATOM DEFINITION ----------------------------
fix csinfo all property/atom i_CSID
read_data data.coreshell fix csinfo NULL CS-Info
group cores type 1 2
group shells type 3 4
neighbor 2.0 bin
comm_modify vel yes
# ------------------------ FORCE FIELDS ------------------------------
pair_style born/coul/wolf/cs 0.1 20.0 20.0 # A, rho, sigma=0, C, D
pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na
pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl
pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl
bond_style harmonic
bond_coeff 1 63.014 0.0
bond_coeff 2 25.724 0.0
# ------------------------ Equilibration Run -------------------------------
reset_timestep 0
thermo 50
thermo_style custom step etotal pe ke temp press &
epair evdwl ecoul elong ebond fnorm fmax vol
compute CSequ all temp/cs cores shells
# output via chunk method
#compute prop all property/atom i_CSID
#compute cs_chunk all chunk/atom c_prop
#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0
#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector
thermo_modify temp CSequ
# velocity bias option
velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ
velocity all scale 1427 temp CSequ
fix thermoberendsen all temp/berendsen 1427 1427 0.4
fix nve all nve
fix_modify thermoberendsen temp CSequ
# 2 fmsec timestep
timestep 0.002
run 500
unfix thermoberendsen
# ------------------------ Dynamic Run -------------------------------
run 1000

View File

@ -0,0 +1,190 @@
LAMMPS (22 Sep 2017)
# Testsystem for core-shell model compared to Mitchel and Finchham
# Shamelessly copied from in.coreshell.dsf but this script uses Wolf summation.
# ------------------------ INITIALIZATION ----------------------------
units metal
dimension 3
boundary p p p
atom_style full
# ----------------------- ATOM DEFINITION ----------------------------
fix csinfo all property/atom i_CSID
read_data data.coreshell fix csinfo NULL CS-Info
orthogonal box = (0 0 0) to (24.096 24.096 24.096)
1 by 1 by 1 MPI processor grid
reading atoms ...
432 atoms
scanning bonds ...
1 = max bonds/atom
reading bonds ...
216 bonds
1 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
group cores type 1 2
216 atoms in group cores
group shells type 3 4
216 atoms in group shells
neighbor 2.0 bin
comm_modify vel yes
# ------------------------ FORCE FIELDS ------------------------------
pair_style born/coul/wolf/cs 0.1 20.0 20.0 # A, rho, sigma=0, C, D
pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na
pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl
pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl
bond_style harmonic
bond_coeff 1 63.014 0.0
bond_coeff 2 25.724 0.0
# ------------------------ Equilibration Run -------------------------------
reset_timestep 0
thermo 50
thermo_style custom step etotal pe ke temp press epair evdwl ecoul elong ebond fnorm fmax vol
compute CSequ all temp/cs cores shells
# output via chunk method
#compute prop all property/atom i_CSID
#compute cs_chunk all chunk/atom c_prop
#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0
#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector
thermo_modify temp CSequ
# velocity bias option
velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 22
ghost atom cutoff = 22
binsize = 11, bins = 3 3 3
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair born/coul/wolf/cs, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
velocity all scale 1427 temp CSequ
fix thermoberendsen all temp/berendsen 1427 1427 0.4
fix nve all nve
fix_modify thermoberendsen temp CSequ
# 2 fmsec timestep
timestep 0.002
run 500
Per MPI rank memory allocation (min/avg/max) = 8.59 | 8.59 | 8.59 Mbytes
Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume
0 -637.41039 -677.06805 39.657659 1427 -21302.622 -677.06805 1.6320365 -678.70009 0 0 1.2935454e-14 3.3306691e-15 13990.5
50 -635.62711 -667.67134 32.044236 1153.0465 -4533.0717 -669.45724 37.76997 -707.22721 0 1.7858939 9.6844521 2.2001656 13990.5
100 -632.76337 -662.83035 30.066977 1081.8989 -3492.8736 -664.98454 39.197093 -704.18164 0 2.1541967 11.063962 2.1543406 13990.5
150 -630.82538 -663.70056 32.875182 1182.9464 -74.330324 -666.12202 46.263665 -712.38569 0 2.4214607 11.739683 2.7558416 13990.5
200 -629.1541 -664.54637 35.39227 1273.5187 -1707.5508 -666.87772 41.796197 -708.67391 0 2.3313445 10.594804 3.0025376 13990.5
250 -627.86587 -662.60879 34.742918 1250.1531 -1258.7537 -665.21416 43.017024 -708.23118 0 2.6053655 10.576999 1.8400986 13990.5
300 -627.10755 -664.12897 37.021419 1332.1403 -1891.3466 -666.39618 40.769593 -707.16577 0 2.2672094 9.412943 1.2434258 13990.5
350 -626.27558 -665.04303 38.767448 1394.9676 -1436.8514 -667.47081 41.854746 -709.32556 0 2.4277827 10.304721 1.977594 13990.5
400 -625.55098 -661.86388 36.312896 1306.6455 -331.92076 -664.4632 44.426542 -708.88975 0 2.599325 11.081635 2.1734468 13990.5
450 -624.88626 -661.07359 36.187328 1302.1272 -2325.834 -663.6031 39.662697 -703.26579 0 2.5295037 9.9810051 1.3068929 13990.5
500 -623.87093 -660.24145 36.370525 1308.7192 410.85324 -662.86944 45.869201 -708.73864 0 2.6279856 10.592785 1.8162326 13990.5
Loop time of 11.7065 on 1 procs for 500 steps with 432 atoms
Performance: 7.381 ns/day, 3.252 hours/ns, 42.711 timesteps/s
100.0% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 11.535 | 11.535 | 11.535 | 0.0 | 98.54
Bond | 0.001443 | 0.001443 | 0.001443 | 0.0 | 0.01
Neigh | 0.10952 | 0.10952 | 0.10952 | 0.0 | 0.94
Comm | 0.048796 | 0.048796 | 0.048796 | 0.0 | 0.42
Output | 0.00038695 | 0.00038695 | 0.00038695 | 0.0 | 0.00
Modify | 0.0067511 | 0.0067511 | 0.0067511 | 0.0 | 0.06
Other | | 0.004243 | | | 0.04
Nlocal: 432 ave 432 max 432 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 9328 ave 9328 max 9328 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 297280 ave 297280 max 297280 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 297280
Ave neighs/atom = 688.148
Ave special neighs/atom = 1
Neighbor list builds = 21
Dangerous builds = 0
unfix thermoberendsen
# ------------------------ Dynamic Run -------------------------------
run 1000
Per MPI rank memory allocation (min/avg/max) = 8.59 | 8.59 | 8.59 Mbytes
Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume
500 -623.87093 -660.24145 36.370525 1308.7192 410.85324 -662.86944 45.869201 -708.73864 0 2.6279856 10.592785 1.8162326 13990.5
550 -623.95762 -659.99899 36.041371 1296.8752 -442.62446 -662.68699 44.004419 -706.69141 0 2.6879934 10.936057 1.7358509 13990.5
600 -624.04214 -661.21748 37.175332 1337.6785 47.615854 -663.76133 45.009742 -708.77107 0 2.5438549 11.431366 2.1185464 13990.5
650 -623.98279 -661.85255 37.86976 1362.6661 -1708.3823 -664.31138 40.933446 -705.24482 0 2.4588298 9.7960191 1.4159904 13990.5
700 -624.02941 -661.57484 37.54543 1350.9958 -124.09512 -663.95322 44.666402 -708.61962 0 2.3783801 10.518712 2.0854584 13990.5
750 -624.03935 -661.11619 37.076837 1334.1344 -1163.2721 -663.82553 42.1219 -705.94743 0 2.7093404 10.634859 1.9381654 13990.5
800 -623.98709 -659.43647 35.44938 1275.5737 -285.65702 -662.23782 44.650233 -706.88805 0 2.8013482 11.83459 3.4506407 13990.5
850 -623.96081 -661.77923 37.818422 1360.8188 -814.33212 -664.38161 42.860208 -707.24181 0 2.6023728 10.766451 2.9211132 13990.5
900 -623.96136 -662.98419 39.022831 1404.157 308.13105 -665.65877 45.053188 -710.71195 0 2.6745786 11.028799 1.8494322 13990.5
950 -623.91048 -660.63828 36.7278 1321.575 -445.31526 -663.79806 43.94833 -707.74639 0 3.1597729 11.852051 1.8238458 13990.5
1000 -623.90541 -661.03474 37.129332 1336.0233 522.57958 -663.50212 45.863261 -709.36538 0 2.4673781 10.949291 1.8614095 13990.5
1050 -624.01134 -660.99076 36.979422 1330.6291 -1710.2829 -663.67762 41.056102 -704.73372 0 2.6868521 10.86533 2.2154165 13990.5
1100 -624.02639 -660.86661 36.840225 1325.6204 1151.0236 -663.5066 47.207185 -710.71378 0 2.6399847 11.298044 1.8900703 13990.5
1150 -624.04418 -661.29819 37.254006 1340.5094 161.09847 -663.73735 45.222561 -708.95991 0 2.4391651 11.261119 2.2245673 13990.5
1200 -624.08628 -662.39932 38.313043 1378.6168 -1405.0927 -664.93121 41.728112 -706.65933 0 2.5318927 10.458041 2.1153159 13990.5
1250 -624.03036 -661.25661 37.226248 1339.5106 63.407721 -663.72719 45.086961 -708.81415 0 2.4705832 11.766021 2.2297809 13990.5
1300 -623.97475 -661.55998 37.585229 1352.4278 -763.66781 -663.80645 42.870244 -706.6767 0 2.2464703 10.098322 1.7614596 13990.5
1350 -623.93123 -660.30786 36.376631 1308.9389 -2389.8052 -663.04725 39.749029 -702.79628 0 2.7393936 10.879364 2.6622521 13990.5
1400 -623.86468 -658.44644 34.581765 1244.3543 2262.7586 -660.95368 50.10608 -711.05976 0 2.5072434 11.528291 1.7861906 13990.5
1450 -623.85494 -661.47216 37.617217 1353.5789 -1435.0174 -664.13587 41.701767 -705.83764 0 2.6637191 11.297444 2.0038345 13990.5
1500 -623.79928 -659.70124 35.901959 1291.8588 -198.39562 -662.57415 44.358482 -706.93263 0 2.872907 11.075746 2.2821286 13990.5
Loop time of 23.4119 on 1 procs for 1000 steps with 432 atoms
Performance: 7.381 ns/day, 3.252 hours/ns, 42.713 timesteps/s
99.9% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 23.069 | 23.069 | 23.069 | 0.0 | 98.54
Bond | 0.0029275 | 0.0029275 | 0.0029275 | 0.0 | 0.01
Neigh | 0.22821 | 0.22821 | 0.22821 | 0.0 | 0.97
Comm | 0.097941 | 0.097941 | 0.097941 | 0.0 | 0.42
Output | 0.00074033 | 0.00074033 | 0.00074033 | 0.0 | 0.00
Modify | 0.0042015 | 0.0042015 | 0.0042015 | 0.0 | 0.02
Other | | 0.00865 | | | 0.04
Nlocal: 432 ave 432 max 432 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 9388 ave 9388 max 9388 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 297212 ave 297212 max 297212 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 297212
Ave neighs/atom = 687.991
Ave special neighs/atom = 1
Neighbor list builds = 45
Dangerous builds = 0
Total wall time: 0:00:35

View File

@ -0,0 +1,190 @@
LAMMPS (22 Sep 2017)
# Testsystem for core-shell model compared to Mitchel and Finchham
# Shamelessly copied from in.coreshell.dsf but this script uses Wolf summation.
# ------------------------ INITIALIZATION ----------------------------
units metal
dimension 3
boundary p p p
atom_style full
# ----------------------- ATOM DEFINITION ----------------------------
fix csinfo all property/atom i_CSID
read_data data.coreshell fix csinfo NULL CS-Info
orthogonal box = (0 0 0) to (24.096 24.096 24.096)
1 by 2 by 2 MPI processor grid
reading atoms ...
432 atoms
scanning bonds ...
1 = max bonds/atom
reading bonds ...
216 bonds
1 = max # of 1-2 neighbors
0 = max # of 1-3 neighbors
0 = max # of 1-4 neighbors
1 = max # of special neighbors
group cores type 1 2
216 atoms in group cores
group shells type 3 4
216 atoms in group shells
neighbor 2.0 bin
comm_modify vel yes
# ------------------------ FORCE FIELDS ------------------------------
pair_style born/coul/wolf/cs 0.1 20.0 20.0 # A, rho, sigma=0, C, D
pair_coeff * * 0.0 1.000 0.00 0.00 0.00
pair_coeff 3 3 487.0 0.23768 0.00 1.05 0.50 #Na-Na
pair_coeff 3 4 145134.0 0.23768 0.00 6.99 8.70 #Na-Cl
pair_coeff 4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl
bond_style harmonic
bond_coeff 1 63.014 0.0
bond_coeff 2 25.724 0.0
# ------------------------ Equilibration Run -------------------------------
reset_timestep 0
thermo 50
thermo_style custom step etotal pe ke temp press epair evdwl ecoul elong ebond fnorm fmax vol
compute CSequ all temp/cs cores shells
# output via chunk method
#compute prop all property/atom i_CSID
#compute cs_chunk all chunk/atom c_prop
#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0
#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector
thermo_modify temp CSequ
# velocity bias option
velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 22
ghost atom cutoff = 22
binsize = 11, bins = 3 3 3
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair born/coul/wolf/cs, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
velocity all scale 1427 temp CSequ
fix thermoberendsen all temp/berendsen 1427 1427 0.4
fix nve all nve
fix_modify thermoberendsen temp CSequ
# 2 fmsec timestep
timestep 0.002
run 500
Per MPI rank memory allocation (min/avg/max) = 6.881 | 6.881 | 6.881 Mbytes
Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume
0 -637.41039 -677.06805 39.657659 1427 -21302.622 -677.06805 1.6320365 -678.70009 0 0 1.3530839e-14 3.6429193e-15 13990.5
50 -635.62704 -667.67108 32.044047 1153.0397 -4532.6842 -669.45828 37.771018 -707.2293 0 1.787201 9.6848095 2.2028349 13990.5
100 -632.76343 -662.83014 30.066711 1081.8893 -3493.0827 -664.98212 39.195967 -704.17809 0 2.151977 11.060773 2.1578583 13990.5
150 -630.82533 -663.70172 32.876385 1182.9897 -75.706974 -666.12608 46.261038 -712.38712 0 2.4243598 11.746728 2.7663319 13990.5
200 -629.15463 -664.55009 35.395466 1273.6337 -1707.9185 -666.88117 41.794868 -708.67604 0 2.331082 10.596229 3.0031523 13990.5
250 -627.86625 -662.60876 34.742511 1250.1384 -1263.5726 -665.214 43.005742 -708.21974 0 2.6052329 10.572641 1.841604 13990.5
300 -627.10829 -664.12159 37.013298 1331.8481 -1884.8587 -666.39136 40.786141 -707.1775 0 2.2697693 9.4160685 1.2472271 13990.5
350 -626.2729 -665.01858 38.745682 1394.1844 -1433.1302 -667.44315 41.864785 -709.30793 0 2.4245625 10.312641 1.9815612 13990.5
400 -625.54274 -661.84438 36.301638 1306.2404 -355.45544 -664.4483 44.370671 -708.81897 0 2.6039276 11.076154 2.1819703 13990.5
450 -624.88802 -661.12299 36.234964 1303.8413 -2356.6101 -663.6463 39.57847 -703.22477 0 2.523314 9.8995886 1.3113549 13990.5
500 -623.86344 -660.20235 36.338906 1307.5814 462.72862 -662.8515 45.983055 -708.83455 0 2.6491489 10.523732 1.6709561 13990.5
Loop time of 4.63313 on 4 procs for 500 steps with 432 atoms
Performance: 18.648 ns/day, 1.287 hours/ns, 107.919 timesteps/s
99.4% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 2.8133 | 3.5934 | 4.4255 | 36.3 | 77.56
Bond | 0.00042245 | 0.00050305 | 0.00059825 | 0.0 | 0.01
Neigh | 0.0411 | 0.041561 | 0.04202 | 0.2 | 0.90
Comm | 0.15622 | 0.9884 | 1.7686 | 69.2 | 21.33
Output | 0.00028311 | 0.00031345 | 0.00040011 | 0.0 | 0.01
Modify | 0.0039899 | 0.00403 | 0.0040654 | 0.0 | 0.09
Other | | 0.004911 | | | 0.11
Nlocal: 108 ave 112 max 106 min
Histogram: 2 0 0 1 0 0 0 0 0 1
Nghost: 6531.75 ave 6611 max 6460 min
Histogram: 1 0 0 1 0 1 0 0 0 1
Neighs: 74316.2 ave 75641 max 72780 min
Histogram: 1 0 0 1 0 0 0 0 1 1
Total # of neighbors = 297265
Ave neighs/atom = 688.113
Ave special neighs/atom = 1
Neighbor list builds = 21
Dangerous builds = 0
unfix thermoberendsen
# ------------------------ Dynamic Run -------------------------------
run 1000
Per MPI rank memory allocation (min/avg/max) = 6.884 | 7.01 | 7.138 Mbytes
Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume
500 -623.86344 -660.20235 36.338906 1307.5814 462.72862 -662.8515 45.983055 -708.83455 0 2.6491489 10.523732 1.6709561 13990.5
550 -623.95339 -660.07946 36.126069 1299.9229 -362.67288 -662.8047 44.180832 -706.98553 0 2.725239 11.07199 2.0461377 13990.5
600 -624.04508 -661.27298 37.227902 1339.5701 110.39823 -663.90927 45.166569 -709.07584 0 2.6362911 11.747923 2.1846828 13990.5
650 -623.9608 -661.50573 37.544934 1350.9779 -1594.4701 -663.91531 41.226571 -705.14188 0 2.4095736 10.022027 1.6264014 13990.5
700 -624.00658 -663.55636 39.549777 1423.1181 -588.9804 -665.88666 43.124023 -709.01068 0 2.3302979 9.924587 2.1027837 13990.5
750 -623.99813 -659.97695 35.978816 1294.6243 -364.1415 -662.75959 43.973556 -706.73315 0 2.782646 11.487832 1.8799695 13990.5
800 -624.01235 -661.04908 37.036728 1332.6911 -85.655852 -663.49204 44.570117 -708.06215 0 2.4429547 11.213149 1.6792926 13990.5
850 -624.02581 -659.39933 35.373519 1272.844 -1090.9179 -662.11969 42.375064 -704.49476 0 2.7203673 11.214629 2.2907474 13990.5
900 -624.09244 -663.33386 39.241421 1412.0225 303.76207 -666.00593 45.332458 -711.33839 0 2.6720667 11.897188 2.0599033 13990.5
950 -624.04544 -661.11578 37.070341 1333.9007 1637.6438 -663.61305 48.65892 -712.27197 0 2.49727 12.343774 2.429225 13990.5
1000 -623.95457 -661.51816 37.563586 1351.6491 -851.77182 -663.83594 42.813468 -706.64941 0 2.317782 10.251422 1.6922864 13990.5
1050 -623.98731 -662.01988 38.032562 1368.5242 -2123.9075 -664.72609 39.917382 -704.64348 0 2.706218 9.600838 1.7365559 13990.5
1100 -623.9653 -659.32023 35.354929 1272.1751 -436.90576 -662.14454 44.057776 -706.20232 0 2.8243167 11.267546 2.6807602 13990.5
1150 -624.02273 -665.13902 41.116293 1479.486 -128.13268 -667.4769 44.013761 -711.49066 0 2.3378768 10.406604 1.5102324 13990.5
1200 -623.97328 -663.08042 39.107135 1407.1905 -539.63284 -665.67946 43.319308 -708.99877 0 2.599042 10.632657 1.4608707 13990.5
1250 -623.92529 -661.81902 37.893723 1363.5284 1708.0621 -664.63624 48.396874 -713.03311 0 2.8172251 11.369352 1.8836979 13990.5
1300 -623.99283 -662.19734 38.204509 1374.7114 -820.77291 -664.34556 42.656202 -707.00176 0 2.1482151 10.186898 1.7081329 13990.5
1350 -623.99798 -658.70752 34.709535 1248.9519 776.28486 -662.01647 46.925412 -708.94188 0 3.3089536 12.457581 2.5027978 13990.5
1400 -623.96941 -662.15959 38.190183 1374.1959 880.21756 -664.90452 46.628183 -711.5327 0 2.7449282 11.918894 3.0466188 13990.5
1450 -623.95068 -662.25435 38.303671 1378.2795 -391.56711 -664.7631 43.644066 -708.40716 0 2.5087493 10.465803 1.8744864 13990.5
1500 -624.00637 -661.48756 37.481185 1348.684 430.69453 -664.32151 45.704366 -710.02587 0 2.8339501 11.650821 2.0752813 13990.5
Loop time of 6.7003 on 4 procs for 1000 steps with 432 atoms
Performance: 25.790 ns/day, 0.931 hours/ns, 149.247 timesteps/s
99.1% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 5.9613 | 6.0752 | 6.2064 | 4.1 | 90.67
Bond | 0.00087095 | 0.00088993 | 0.00091671 | 0.0 | 0.01
Neigh | 0.06494 | 0.064964 | 0.064987 | 0.0 | 0.97
Comm | 0.41743 | 0.54863 | 0.6626 | 13.8 | 8.19
Output | 0.00053867 | 0.00059268 | 0.00074867 | 0.0 | 0.01
Modify | 0.0013288 | 0.0013592 | 0.0013841 | 0.1 | 0.02
Other | | 0.008613 | | | 0.13
Nlocal: 108 ave 116 max 102 min
Histogram: 2 0 0 0 0 0 0 1 0 1
Nghost: 6504.5 ave 6624 max 6380 min
Histogram: 1 1 0 0 0 0 0 0 1 1
Neighs: 74267 ave 79230 max 70993 min
Histogram: 2 0 0 0 0 1 0 0 0 1
Total # of neighbors = 297068
Ave neighs/atom = 687.657
Ave special neighs/atom = 1
Neighbor list builds = 45
Dangerous builds = 0
Total wall time: 0:00:11

83
examples/rigid/bodies.txt Normal file
View File

@ -0,0 +1,83 @@
81
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 2
11 2
12 2
13 2
14 2
15 2
16 2
17 2
18 2
19 3
20 3
21 3
22 3
23 3
24 3
25 3
26 3
27 3
28 4
29 4
30 4
31 4
32 4
33 4
34 4
35 4
36 4
37 5
38 5
39 5
40 5
41 5
42 5
43 5
44 5
45 5
46 6
47 6
48 6
49 6
50 6
51 6
52 6
53 6
54 6
55 7
56 7
57 7
58 7
59 7
60 7
61 7
62 7
63 7
64 8
65 8
66 8
67 8
68 8
69 8
70 8
71 8
72 8
73 9
74 9
75 9
76 9
77 9
78 9
79 9
80 9
81 9

View File

@ -0,0 +1,185 @@
# LAMMPS data file for rigid bodies
81 atoms
1 atom types
-12 12 xlo xhi
-12 12 ylo yhi
-12 12 zlo zhi
Masses
1 1
Pair Coeffs
1 1 1
Atoms
1 1 0 0 0
2 1 0 1 0
3 1 0 0.5 0
4 1 0.5 0 0
5 1 0.5 0.5 1
6 1 1 0.5 0
7 1 0.5 1 0
8 1 1 0 0
9 1 1 1 0
10 1 2 1 0
11 1 1 2 0
12 1 1.5 2 0
13 1 1.5 1 0
14 1 1 1.5 0
15 1 1.5 1.5 1
16 1 2 1.5 0
17 1 2 2 0
18 1 2 3 0
19 1 2 2.5 0
20 1 2.5 2 0
21 1 2.5 2.5 1
22 1 3 2.5 0
23 1 2.5 3 0
24 1 3 2 0
25 1 3 3 0
26 1 4 3 0
27 1 3 4 0
28 1 3.5 4 0
29 1 3.5 3 0
30 1 3 3.5 0
31 1 3.5 3.5 1
32 1 4 3.5 0
33 1 4 4 0
34 1 4 5 0
35 1 4 4.5 0
36 1 4.5 4 0
37 1 4.5 4.5 1
38 1 5 4.5 0
39 1 4.5 5 0
40 1 5 4 0
41 1 5 5 0
42 1 6 5 0
43 1 5 6 0
44 1 5.5 6 0
45 1 5.5 5 0
46 1 5 5.5 0
47 1 5.5 5.5 1
48 1 6 5.5 0
49 1 6 6 0
50 1 6 7 0
51 1 6 6.5 0
52 1 6.5 6 0
53 1 6.5 6.5 1
54 1 7 6.5 0
55 1 6.5 7 0
56 1 7 6 0
57 1 7 7 0
58 1 8 7 0
59 1 7 8 0
60 1 7.5 8 0
61 1 7.5 7 0
62 1 7 7.5 0
63 1 7.5 7.5 1
64 1 8 7.5 0
65 1 8 8 0
66 1 8 9 0
67 1 8 8.5 0
68 1 8.5 8 0
69 1 8.5 8.5 1
70 1 9 8.5 0
71 1 8.5 9 0
72 1 9 8 0
73 1 9 9 0
74 1 10 9 0
75 1 9 10 0
76 1 9.5 10 0
77 1 9.5 9 0
78 1 9 9.5 0
79 1 9.5 9.5 1
80 1 10 9.5 0
81 1 10 10 0
Bodies
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 2
11 2
12 2
13 2
14 2
15 2
16 2
17 2
18 2
19 3
20 3
21 3
22 3
23 3
24 3
25 3
26 3
27 3
28 4
29 4
30 4
31 4
32 4
33 4
34 4
35 4
36 4
37 5
38 5
39 5
40 5
41 5
42 5
43 5
44 5
45 5
46 6
47 6
48 6
49 6
50 6
51 6
52 6
53 6
54 6
55 7
56 7
57 7
58 7
59 7
60 7
61 7
62 7
63 7
64 8
65 8
66 8
67 8
68 8
69 8
70 8
71 8
72 8
73 9
74 9
75 9
76 9
77 9
78 9
79 9
80 9
81 9

View File

@ -0,0 +1,83 @@
# Simple rigid body system
units lj
atom_style atomic
atom_modify map array
pair_style lj/cut 2.5
read_data data.rigid
velocity all create 100.0 4928459
# unconnected bodies
group clump1 id <> 1 9
group clump2 id <> 10 18
group clump3 id <> 19 27
group clump4 id <> 28 36
group clump5 id <> 37 45
group clump6 id <> 46 54
group clump7 id <> 55 63
group clump8 id <> 64 72
group clump9 id <> 73 81
variable bodies atomfile bodies.txt
fix 1 all rigid custom v_bodies
# 1 chain of connected bodies
#group clump1 id <> 1 9
#group clump2 id <> 9 18
#group clump3 id <> 18 27
#group clump4 id <> 27 36
#group clump5 id <> 36 45
#group clump6 id <> 45 54
#group clump7 id <> 54 63
#group clump8 id <> 63 72
#group clump9 id <> 72 81
#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 &
# clump6 clump7 clump8 clump9
# 2 chains of connected bodies
#group clump1 id <> 1 9
#group clump2 id <> 9 18
#group clump3 id <> 18 27
#group clump4 id <> 27 36
#group clump5 id <> 37 45
#group clump6 id <> 45 54
#group clump7 id <> 54 63
#group clump8 id <> 63 72
#group clump9 id <> 72 81
#fix 1 all poems group clump1 clump2 clump3 clump4
#fix 2 all poems group clump5 clump6 clump7 clump8 clump9
neigh_modify exclude group clump1 clump1
neigh_modify exclude group clump2 clump2
neigh_modify exclude group clump3 clump3
neigh_modify exclude group clump4 clump4
neigh_modify exclude group clump5 clump5
neigh_modify exclude group clump6 clump6
neigh_modify exclude group clump7 clump7
neigh_modify exclude group clump8 clump8
neigh_modify exclude group clump9 clump9
thermo 100
#dump 1 all atom 50 dump.rigid
#dump 2 all image 100 image.*.jpg type type &
# axes yes 0.8 0.02 view 60 -30
#dump_modify 2 pad 5
#dump 3 all movie 100 movie.mpg type type &
# axes yes 0.8 0.02 view 60 -30
#dump_modify 3 pad 5
timestep 0.0001
thermo 50
run 10000

View File

@ -0,0 +1,83 @@
# Simple rigid body system
units lj
atom_style atomic
atom_modify map array
pair_style lj/cut 2.5
read_data data.rigid
velocity all create 100.0 4928459
# unconnected bodies
group clump1 id <> 1 9
group clump2 id <> 10 18
group clump3 id <> 19 27
group clump4 id <> 28 36
group clump5 id <> 37 45
group clump6 id <> 46 54
group clump7 id <> 55 63
group clump8 id <> 64 72
group clump9 id <> 73 81
variable bodies atom 1.0*gmask(clump1)+2.0*gmask(clump2)+3.0*gmask(clump3)+4.0*gmask(clump4)+5.0*gmask(clump5)+6.0*gmask(clump6)+7.0*gmask(clump7)+8.0*gmask(clump8)+9.0*gmask(clump9)
fix 1 all rigid custom v_bodies
# 1 chain of connected bodies
#group clump1 id <> 1 9
#group clump2 id <> 9 18
#group clump3 id <> 18 27
#group clump4 id <> 27 36
#group clump5 id <> 36 45
#group clump6 id <> 45 54
#group clump7 id <> 54 63
#group clump8 id <> 63 72
#group clump9 id <> 72 81
#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 &
# clump6 clump7 clump8 clump9
# 2 chains of connected bodies
#group clump1 id <> 1 9
#group clump2 id <> 9 18
#group clump3 id <> 18 27
#group clump4 id <> 27 36
#group clump5 id <> 37 45
#group clump6 id <> 45 54
#group clump7 id <> 54 63
#group clump8 id <> 63 72
#group clump9 id <> 72 81
#fix 1 all poems group clump1 clump2 clump3 clump4
#fix 2 all poems group clump5 clump6 clump7 clump8 clump9
neigh_modify exclude group clump1 clump1
neigh_modify exclude group clump2 clump2
neigh_modify exclude group clump3 clump3
neigh_modify exclude group clump4 clump4
neigh_modify exclude group clump5 clump5
neigh_modify exclude group clump6 clump6
neigh_modify exclude group clump7 clump7
neigh_modify exclude group clump8 clump8
neigh_modify exclude group clump9 clump9
thermo 100
#dump 1 all atom 50 dump.rigid
#dump 2 all image 100 image.*.jpg type type &
# axes yes 0.8 0.02 view 60 -30
#dump_modify 2 pad 5
#dump 3 all movie 100 movie.mpg type type &
# axes yes 0.8 0.02 view 60 -30
#dump_modify 3 pad 5
timestep 0.0001
thermo 50
run 10000

View File

@ -0,0 +1,85 @@
# Simple rigid body system
units lj
atom_style atomic
atom_modify map array
pair_style lj/cut 2.5
fix 0 all property/atom i_bodies
read_data data.rigid-property fix 0 NULL Bodies
velocity all create 100.0 4928459
# unconnected bodies
group clump1 id <> 1 9
group clump2 id <> 10 18
group clump3 id <> 19 27
group clump4 id <> 28 36
group clump5 id <> 37 45
group clump6 id <> 46 54
group clump7 id <> 55 63
group clump8 id <> 64 72
group clump9 id <> 73 81
# assemble bodies from per-atom custom integer property bodies
fix 1 all rigid custom i_bodies
# 1 chain of connected bodies
#group clump1 id <> 1 9
#group clump2 id <> 9 18
#group clump3 id <> 18 27
#group clump4 id <> 27 36
#group clump5 id <> 36 45
#group clump6 id <> 45 54
#group clump7 id <> 54 63
#group clump8 id <> 63 72
#group clump9 id <> 72 81
#fix 1 all poems group clump1 clump2 clump3 clump4 clump5 &
# clump6 clump7 clump8 clump9
# 2 chains of connected bodies
#group clump1 id <> 1 9
#group clump2 id <> 9 18
#group clump3 id <> 18 27
#group clump4 id <> 27 36
#group clump5 id <> 37 45
#group clump6 id <> 45 54
#group clump7 id <> 54 63
#group clump8 id <> 63 72
#group clump9 id <> 72 81
#fix 1 all poems group clump1 clump2 clump3 clump4
#fix 2 all poems group clump5 clump6 clump7 clump8 clump9
neigh_modify exclude group clump1 clump1
neigh_modify exclude group clump2 clump2
neigh_modify exclude group clump3 clump3
neigh_modify exclude group clump4 clump4
neigh_modify exclude group clump5 clump5
neigh_modify exclude group clump6 clump6
neigh_modify exclude group clump7 clump7
neigh_modify exclude group clump8 clump8
neigh_modify exclude group clump9 clump9
thermo 100
#dump 1 all atom 50 dump.rigid
#dump 2 all image 100 image.*.jpg type type &
# axes yes 0.8 0.02 view 60 -30
#dump_modify 2 pad 5
#dump 3 all movie 100 movie.mpg type type &
# axes yes 0.8 0.02 view 60 -30
#dump_modify 3 pad 5
timestep 0.0001
thermo 50
run 10000

View File

@ -12,7 +12,7 @@
ifeq ($(COLVARS_DEBUG),)
COLVARS_DEBUG_INCFLAGS =
else
COLVARS_DEBUG_INCFLAGS= -DCOLVARS_DEBUG
COLVARS_DEBUG_INCFLAGS = -DCOLVARS_DEBUG
endif
COLVARS_INCFLAGS = $(COLVARS_DEBUG_INCFLAGS) $(COLVARS_PYTHON_INCFLAGS)
@ -21,6 +21,7 @@ COLVARS_INCFLAGS = $(COLVARS_DEBUG_INCFLAGS) $(COLVARS_PYTHON_INCFLAGS)
.SUFFIXES:
.SUFFIXES: .cpp .o
COLVARS_SRCS = \
colvaratoms.cpp \
colvarbias_abf.cpp \
@ -45,21 +46,32 @@ COLVARS_SRCS = \
colvartypes.cpp \
colvarvalue.cpp
COLVARS_OBJS = $(COLVARS_SRCS:.cpp=.o)
LEPTON_SRCS = \
lepton/src/CompiledExpression.cpp lepton/src/ExpressionTreeNode.cpp \
lepton/src/ParsedExpression.cpp lepton/src/ExpressionProgram.cpp \
lepton/src/Operation.cpp lepton/src/Parser.cpp
.cpp.o:
$(CXX) $(CXXFLAGS) $(COLVARS_INCFLAGS) -c $<
LEPTON_OBJS = \
lepton/src/CompiledExpression.o lepton/src/ExpressionTreeNode.o \
lepton/src/ParsedExpression.o lepton/src/ExpressionProgram.o \
lepton/src/Operation.o lepton/src/Parser.o
COLVARS_OBJS = $(COLVARS_SRCS:.cpp=.o) $(LEPTON_OBJS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(COLVARS_INCFLAGS) -Ilepton/include -DLEPTON -c -o $@ $<
$(COLVARS_LIB): Makefile.deps $(COLVARS_OBJS)
$(AR) $(ARFLAGS) $(COLVARS_LIB) $(COLVARS_OBJS)
$(AR) $(ARFLAGS) $(COLVARS_LIB) $(COLVARS_OBJS) $(LEPTON_OBJS)
Makefile.deps: $(COLVARS_SRCS)
@echo > $@
@for src in $^ ; do \
obj=`basename $$src .cpp`.o ; \
$(CXX) -MM $(COLVARS_INCFLAGS) \
$(CXX) -MM $(COLVARS_INCFLAGS) -Ilepton/include -DLEPTON \
-MT '$$(COLVARS_OBJ_DIR)'$$obj $$src >> $@ ; \
done
include Makefile.deps
include Makefile.lepton.deps # Hand-generated

View File

@ -4,73 +4,232 @@ $(COLVARS_OBJ_DIR)colvaratoms.o: colvaratoms.cpp colvarmodule.h \
colvarparse.h colvaratoms.h colvardeps.h
$(COLVARS_OBJ_DIR)colvarbias_abf.o: colvarbias_abf.cpp colvarmodule.h \
colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h colvar.h \
colvarparse.h colvardeps.h colvarbias_abf.h colvarbias.h colvargrid.h
colvarparse.h colvardeps.h lepton/include/Lepton.h \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarbias_abf.h colvarbias.h colvargrid.h colvar_UIestimator.h
$(COLVARS_OBJ_DIR)colvarbias_alb.o: colvarbias_alb.cpp colvarmodule.h \
colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \
colvarbias_alb.h colvar.h colvarparse.h colvardeps.h colvarbias.h
colvarbias_alb.h colvar.h colvarparse.h colvardeps.h \
lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarbias.h
$(COLVARS_OBJ_DIR)colvarbias.o: colvarbias.cpp colvarmodule.h \
colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h colvarbias.h \
colvar.h colvarparse.h colvardeps.h
colvar.h colvarparse.h colvardeps.h lepton/include/Lepton.h \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvargrid.h
$(COLVARS_OBJ_DIR)colvarbias_histogram.o: colvarbias_histogram.cpp \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvar.h colvarparse.h colvardeps.h colvarbias_histogram.h \
colvarbias.h colvargrid.h
colvarvalue.h colvar.h colvarparse.h colvardeps.h \
lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarbias_histogram.h colvarbias.h colvargrid.h
$(COLVARS_OBJ_DIR)colvarbias_meta.o: colvarbias_meta.cpp colvar.h \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvarparse.h colvardeps.h colvarbias_meta.h colvarbias.h \
colvargrid.h
colvarvalue.h colvarparse.h colvardeps.h lepton/include/Lepton.h \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarbias_meta.h colvarbias.h colvargrid.h
$(COLVARS_OBJ_DIR)colvarbias_restraint.o: colvarbias_restraint.cpp \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvarbias_restraint.h colvarbias.h colvar.h colvarparse.h \
colvardeps.h
colvardeps.h lepton/include/Lepton.h \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h
$(COLVARS_OBJ_DIR)colvarcomp_angles.o: colvarcomp_angles.cpp \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvar.h colvarparse.h colvardeps.h colvarcomp.h \
colvaratoms.h
colvarvalue.h colvar.h colvarparse.h colvardeps.h \
lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarcomp.h colvaratoms.h
$(COLVARS_OBJ_DIR)colvarcomp_coordnums.o: colvarcomp_coordnums.cpp \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvarparse.h colvaratoms.h colvardeps.h colvar.h \
lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarcomp.h
$(COLVARS_OBJ_DIR)colvarcomp.o: colvarcomp.cpp colvarmodule.h \
colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h colvar.h \
colvarparse.h colvardeps.h colvarcomp.h colvaratoms.h
colvarparse.h colvardeps.h lepton/include/Lepton.h \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarcomp.h colvaratoms.h
$(COLVARS_OBJ_DIR)colvarcomp_distances.o: colvarcomp_distances.cpp \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvarparse.h colvar.h colvardeps.h colvarcomp.h \
colvaratoms.h
colvarvalue.h colvarparse.h colvar.h colvardeps.h \
lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarcomp.h colvaratoms.h
$(COLVARS_OBJ_DIR)colvarcomp_protein.o: colvarcomp_protein.cpp \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvarparse.h colvar.h colvardeps.h colvarcomp.h \
colvaratoms.h
colvarvalue.h colvarparse.h colvar.h colvardeps.h \
lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarcomp.h colvaratoms.h
$(COLVARS_OBJ_DIR)colvarcomp_rotations.o: colvarcomp_rotations.cpp \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvarparse.h colvar.h colvardeps.h colvarcomp.h \
colvaratoms.h
colvarvalue.h colvarparse.h colvar.h colvardeps.h \
lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarcomp.h colvaratoms.h
$(COLVARS_OBJ_DIR)colvar.o: colvar.cpp colvarmodule.h colvars_version.h \
colvartypes.h colvarproxy.h colvarvalue.h colvarparse.h colvar.h \
colvardeps.h colvarcomp.h colvaratoms.h colvarscript.h colvarbias.h
colvardeps.h lepton/include/Lepton.h \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarcomp.h colvaratoms.h colvarscript.h colvarbias.h
$(COLVARS_OBJ_DIR)colvardeps.o: colvardeps.cpp colvardeps.h \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvarparse.h
$(COLVARS_OBJ_DIR)colvargrid.o: colvargrid.cpp colvarmodule.h \
colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \
colvarparse.h colvar.h colvardeps.h colvarcomp.h colvaratoms.h \
colvargrid.h
colvarparse.h colvar.h colvardeps.h lepton/include/Lepton.h \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarcomp.h colvaratoms.h colvargrid.h
$(COLVARS_OBJ_DIR)colvarmodule.o: colvarmodule.cpp colvarmodule.h \
colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \
colvarparse.h colvar.h colvardeps.h colvarbias.h colvarbias_abf.h \
colvargrid.h colvarbias_alb.h colvarbias_histogram.h colvarbias_meta.h \
colvarbias_restraint.h colvarscript.h colvaratoms.h
colvarparse.h colvar.h colvardeps.h lepton/include/Lepton.h \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvarbias.h colvarbias_abf.h colvargrid.h colvar_UIestimator.h \
colvarbias_alb.h colvarbias_histogram.h colvarbias_meta.h \
colvarbias_restraint.h colvarscript.h colvaratoms.h colvarcomp.h
$(COLVARS_OBJ_DIR)colvarparse.o: colvarparse.cpp colvarmodule.h \
colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \
colvarparse.h
$(COLVARS_OBJ_DIR)colvarproxy.o: colvarproxy.cpp colvarmodule.h \
colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \
colvarscript.h colvarbias.h colvar.h colvarparse.h colvardeps.h \
lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h \
colvaratoms.h
$(COLVARS_OBJ_DIR)colvarscript.o: colvarscript.cpp colvarscript.h \
colvarmodule.h colvars_version.h colvartypes.h colvarproxy.h \
colvarvalue.h colvarbias.h colvar.h colvarparse.h colvardeps.h
colvarvalue.h colvarbias.h colvar.h colvarparse.h colvardeps.h \
lepton/include/Lepton.h lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h lepton/include/lepton/Parser.h
$(COLVARS_OBJ_DIR)colvartypes.o: colvartypes.cpp colvarmodule.h \
colvars_version.h colvartypes.h colvarproxy.h colvarvalue.h \
colvarparse.h

View File

@ -0,0 +1,40 @@
lepton/src/CompiledExpression.o: lepton/src/CompiledExpression.cpp \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h
lepton/src/ExpressionProgram.o: lepton/src/ExpressionProgram.cpp \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h
lepton/src/ExpressionTreeNode.o: lepton/src/ExpressionTreeNode.cpp \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/Exception.h lepton/include/lepton/Operation.h \
lepton/include/lepton/CustomFunction.h lepton/include/lepton/Exception.h
lepton/src/Operation.o: lepton/src/Operation.cpp \
lepton/include/lepton/Operation.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h lepton/include/lepton/Exception.h \
lepton/include/lepton/ExpressionTreeNode.h lepton/src/MSVC_erfc.h
lepton/src/ParsedExpression.o: lepton/src/ParsedExpression.cpp \
lepton/include/lepton/ParsedExpression.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CompiledExpression.h \
lepton/include/lepton/ExpressionProgram.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h
lepton/src/Parser.o: lepton/src/Parser.cpp \
lepton/include/lepton/Parser.h lepton/include/lepton/windowsIncludes.h \
lepton/include/lepton/CustomFunction.h lepton/include/lepton/Exception.h \
lepton/include/lepton/ExpressionTreeNode.h \
lepton/include/lepton/Operation.h lepton/include/lepton/CustomFunction.h \
lepton/include/lepton/Exception.h \
lepton/include/lepton/ParsedExpression.h \
lepton/include/lepton/ExpressionTreeNode.h

View File

@ -47,6 +47,10 @@ correct for your system, else the LAMMPS build will likely fail.
If you want to set a debug flag recognized by the library, the
settings in Makefile.common should work.
Note: some Colvars functions use the Lepton mathematical expression parser,
which is here included (no additional steps required). For more details, see:
https://simtk.org/projects/lepton
## Documentation

View File

@ -1008,6 +1008,8 @@ int colvar::calc()
int colvar::calc_cvcs(int first_cvc, size_t num_cvcs)
{
colvarproxy *proxy = cvm::main()->proxy;
int error_code = COLVARS_OK;
if (cvm::debug())
cvm::log("Calculating colvar \""+this->name+"\", components "+
@ -1018,14 +1020,18 @@ int colvar::calc_cvcs(int first_cvc, size_t num_cvcs)
return error_code;
}
if (cvm::step_relative() > 0) {
// Total force depends on Jacobian derivative from previous timestep
if ((cvm::step_relative() > 0) && (!proxy->total_forces_same_step())){
// Use Jacobian derivative from previous timestep
error_code |= calc_cvc_total_force(first_cvc, num_cvcs);
}
// atom coordinates are updated by the next line
error_code |= calc_cvc_values(first_cvc, num_cvcs);
error_code |= calc_cvc_gradients(first_cvc, num_cvcs);
error_code |= calc_cvc_Jacobians(first_cvc, num_cvcs);
if (proxy->total_forces_same_step()){
// Use Jacobian derivative from this timestep
error_code |= calc_cvc_total_force(first_cvc, num_cvcs);
}
if (cvm::debug())
cvm::log("Done calculating colvar \""+this->name+"\".\n");
@ -1043,6 +1049,7 @@ int colvar::collect_cvc_data()
if (cvm::step_relative() > 0) {
// Total force depends on Jacobian derivative from previous timestep
// collect_cvc_total_forces() uses the previous value of jd
error_code |= collect_cvc_total_forces();
}
error_code |= collect_cvc_values();
@ -1138,7 +1145,7 @@ int colvar::collect_cvc_values()
if (!cvcs[i]->is_enabled()) continue;
x += (cvcs[i])->sup_coeff *
( ((cvcs[i])->sup_np != 1) ?
std::pow((cvcs[i])->value().real_value, (cvcs[i])->sup_np) :
cvm::integer_power((cvcs[i])->value().real_value, (cvcs[i])->sup_np) :
(cvcs[i])->value().real_value );
}
} else {
@ -1219,7 +1226,7 @@ int colvar::collect_cvc_gradients()
if (!cvcs[i]->is_enabled()) continue;
// Coefficient: d(a * x^n) = a * n * x^(n-1) * dx
cvm::real coeff = (cvcs[i])->sup_coeff * cvm::real((cvcs[i])->sup_np) *
std::pow((cvcs[i])->value().real_value, (cvcs[i])->sup_np-1);
cvm::integer_power((cvcs[i])->value().real_value, (cvcs[i])->sup_np-1);
for (size_t j = 0; j < cvcs[i]->atom_groups.size(); j++) {
@ -1471,9 +1478,15 @@ cvm::real colvar::update_forces_energy()
// Coupling force is a slow force, to be applied to atomic coords impulse-style
f *= cvm::real(time_step_factor);
// The total force acting on the extended variable is f_ext
// This will be used in the next timestep
ft_reported = f_ext;
if (is_enabled(f_cv_subtract_applied_force)) {
// Report a "system" force without the biases on this colvar
// that is, just the spring force
ft_reported = (-0.5 * ext_force_k) * this->dist2_lgrad(xr, x);
} else {
// The total force acting on the extended variable is f_ext
// This will be used in the next timestep
ft_reported = f_ext;
}
// leapfrog: starting from x_i, f_i, v_(i-1/2)
vr += (0.5 * dt) * f_ext / ext_mass;
@ -1580,9 +1593,9 @@ void colvar::communicate_forces()
for (i = 0; i < cvcs.size(); i++) {
if (!cvcs[i]->is_enabled()) continue;
(cvcs[i])->apply_force(f * (cvcs[i])->sup_coeff *
cvm::real((cvcs[i])->sup_np) *
(std::pow((cvcs[i])->value().real_value,
(cvcs[i])->sup_np-1)) );
cvm::real((cvcs[i])->sup_np) *
(cvm::integer_power((cvcs[i])->value().real_value,
(cvcs[i])->sup_np-1)) );
}
} else {

View File

@ -60,7 +60,10 @@ public:
/// \brief Current actual value (not extended DOF)
colvarvalue const & actual_value() const;
/// \brief Force constant of the spring
cvm::real const & force_constant() const;
/// \brief Current velocity (previously set by calc() or by read_traj())
colvarvalue const & velocity() const;
@ -96,6 +99,12 @@ public:
{
return cv_features;
}
static void delete_features() {
for (size_t i=0; i < cv_features.size(); i++) {
delete cv_features[i];
}
cv_features.clear();
}
/// Implements possible actions to be carried out
/// when a given feature is enabled
@ -592,6 +601,10 @@ public:
}
};
inline cvm::real const & colvar::force_constant() const
{
return ext_force_k;
}
inline colvarvalue const & colvar::value() const
{

View File

@ -0,0 +1,736 @@
// -*- c++ -*-
// This file is part of the Collective Variables module (Colvars).
// The original version of Colvars and its updates are located at:
// https://github.com/colvars/colvars
// Please update all Colvars source files before making any changes.
// If you wish to distribute your changes, please submit them to the
// Colvars repository at GitHub.
#ifndef COLVAR_UIESTIMATOR_H
#define COLVAR_UIESTIMATOR_H
#include <cmath>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
#include <typeinfo>
// only for colvar module!
// when integrated into other code, just remove this line and "...cvm::backup_file(...)"
#include "colvarmodule.h"
namespace UIestimator {
const int Y_SIZE = 21; // defines the range of extended CV with respect to a given CV
// For example, CV=10, width=1, Y_SIZE=21, then eCV=[0-20], having a size of 21
const int HALF_Y_SIZE = 10;
const int EXTENDED_X_SIZE = HALF_Y_SIZE;
const double EPSILON = 0.000001; // for comparison of float numbers
class n_matrix { // Stores the distribution matrix of n(x,y)
public:
n_matrix() {}
n_matrix(const std::vector<double> & lowerboundary, // lowerboundary of x
const std::vector<double> & upperboundary, // upperboundary of
const std::vector<double> & width, // width of x
const int y_size) { // size of y, for example, ysize=7, then when x=1, the distribution of y in [-2,4] is considered
int i;
this->lowerboundary = lowerboundary;
this->upperboundary = upperboundary;
this->width = width;
this->dimension = lowerboundary.size();
this->y_size = y_size; // keep in mind the internal (spare) matrix is stored in diagonal form
this->y_total_size = int(pow(double(y_size), dimension) + EPSILON);
// the range of the matrix is [lowerboundary, upperboundary]
x_total_size = 1;
for (i = 0; i < dimension; i++) {
x_size.push_back(int((upperboundary[i] - lowerboundary[i]) / width[i] + EPSILON));
x_total_size *= x_size[i];
}
// initialize the internal matrix
matrix.reserve(x_total_size);
for (i = 0; i < x_total_size; i++) {
matrix.push_back(std::vector<int>(y_total_size, 0));
}
temp.resize(dimension);
}
int inline get_value(const std::vector<double> & x, const std::vector<double> & y) {
return matrix[convert_x(x)][convert_y(x, y)];
}
void inline set_value(const std::vector<double> & x, const std::vector<double> & y, const int value) {
matrix[convert_x(x)][convert_y(x,y)] = value;
}
void inline increase_value(const std::vector<double> & x, const std::vector<double> & y, const int value) {
matrix[convert_x(x)][convert_y(x,y)] += value;
}
private:
std::vector<double> lowerboundary;
std::vector<double> upperboundary;
std::vector<double> width;
int dimension;
std::vector<int> x_size; // the size of x in each dimension
int x_total_size; // the size of x of the internal matrix
int y_size; // the size of y in each dimension
int y_total_size; // the size of y of the internal matrix
std::vector<std::vector<int> > matrix; // the internal matrix
std::vector<int> temp; // this vector is used in convert_x and convert_y to save computational resource
int i, j;
int convert_x(const std::vector<double> & x) { // convert real x value to its interal index
for (i = 0; i < dimension; i++) {
temp[i] = int((x[i] - lowerboundary[i]) / width[i] + EPSILON);
}
int index = 0;
for (i = 0; i < dimension; i++) {
if (i + 1 < dimension) {
int x_temp = 1;
for (j = i + 1; j < dimension; j++)
x_temp *= x_size[j];
index += temp[i] * x_temp;
}
else
index += temp[i];
}
return index;
}
int convert_y(const std::vector<double> & x, const std::vector<double> & y) { // convert real y value to its interal index
int i;
for (i = 0; i < dimension; i++) {
temp[i] = round((round(y[i] / width[i] + EPSILON) - round(x[i] / width[i] + EPSILON)) + (y_size - 1) / 2 + EPSILON);
}
int index = 0;
for (i = 0; i < dimension; i++) {
if (i + 1 < dimension)
index += temp[i] * int(pow(double(y_size), dimension - i - 1) + EPSILON);
else
index += temp[i];
}
return index;
}
double round(double r) {
return (r > 0.0) ? floor(r + 0.5) : ceil(r - 0.5);
}
};
// vector, store the sum_x, sum_x_square, count_y
template <typename T>
class n_vector {
public:
n_vector() {}
n_vector(const std::vector<double> & lowerboundary, // lowerboundary of x
const std::vector<double> & upperboundary, // upperboundary of
const std::vector<double> & width, // width of x
const int y_size, // size of y, for example, ysize=7, then when x=1, the distribution of y in [-2,4] is considered
const T & default_value) { // the default value of T
this->width = width;
this->dimension = lowerboundary.size();
x_total_size = 1;
for (int i = 0; i < dimension; i++) {
this->lowerboundary.push_back(lowerboundary[i] - (y_size - 1) / 2 * width[i] - EPSILON);
this->upperboundary.push_back(upperboundary[i] + (y_size - 1) / 2 * width[i] + EPSILON);
x_size.push_back(int((this->upperboundary[i] - this->lowerboundary[i]) / this->width[i] + EPSILON));
x_total_size *= x_size[i];
}
// initialize the internal vector
vector.resize(x_total_size, default_value);
temp.resize(dimension);
}
const T inline get_value(const std::vector<double> & x) {
return vector[convert_x(x)];
}
void inline set_value(const std::vector<double> & x, const T value) {
vector[convert_x(x)] = value;
}
void inline increase_value(const std::vector<double> & x, const T value) {
vector[convert_x(x)] += value;
}
private:
std::vector<double> lowerboundary;
std::vector<double> upperboundary;
std::vector<double> width;
int dimension;
std::vector<int> x_size; // the size of x in each dimension
int x_total_size; // the size of x of the internal matrix
std::vector<T> vector; // the internal vector
std::vector<int> temp; // this vector is used in convert_x and convert_y to save computational resource
int convert_x(const std::vector<double> & x) { // convert real x value to its interal index
int i, j;
for (i = 0; i < dimension; i++) {
temp[i] = int((x[i] - lowerboundary[i]) / width[i] + EPSILON);
}
int index = 0;
for (i = 0; i < dimension; i++) {
if (i + 1 < dimension) {
int x_temp = 1;
for (j = i + 1; j < dimension; j++)
x_temp *= x_size[j];
index += temp[i] * x_temp;
}
else
index += temp[i];
}
return index;
}
};
class UIestimator { // the implemension of UI estimator
public:
UIestimator() {}
//called when (re)start an eabf simulation
UIestimator(const std::vector<double> & lowerboundary,
const std::vector<double> & upperboundary,
const std::vector<double> & width,
const std::vector<double> & krestr, // force constant in eABF
const std::string & output_filename, // the prefix of output files
const int output_freq,
const bool restart, // whether restart from a .count and a .grad file
const std::vector<std::string> & input_filename, // the prefixes of input files
const double temperature) {
// initialize variables
this->lowerboundary = lowerboundary;
this->upperboundary = upperboundary;
this->width = width;
this->krestr = krestr;
this->output_filename = output_filename;
this->output_freq = output_freq;
this->restart = restart;
this->input_filename = input_filename;
this->temperature = temperature;
int i, j;
dimension = lowerboundary.size();
for (i = 0; i < dimension; i++) {
sum_x.push_back(n_vector<double>(lowerboundary, upperboundary, width, Y_SIZE, 0.0));
sum_x_square.push_back(n_vector<double>(lowerboundary, upperboundary, width, Y_SIZE, 0.0));
x_av.push_back(n_vector<double>(lowerboundary, upperboundary, width, Y_SIZE, 0.0));
sigma_square.push_back(n_vector<double>(lowerboundary, upperboundary, width, Y_SIZE, 0.0));
}
count_y = n_vector<int>(lowerboundary, upperboundary, width, Y_SIZE, 0);
distribution_x_y = n_matrix(lowerboundary, upperboundary, width, Y_SIZE);
grad = n_vector<std::vector<double> >(lowerboundary, upperboundary, width, 1, std::vector<double>(dimension, 0.0));
count = n_vector<int>(lowerboundary, upperboundary, width, 1, 0);
written = false;
written_1D = false;
if (dimension == 1) {
std::vector<double> upperboundary_temp = upperboundary;
upperboundary_temp[0] = upperboundary[0] + width[0];
oneD_pmf = n_vector<double>(lowerboundary, upperboundary_temp, width, 1, 0.0);
}
if (restart == true) {
input_grad = n_vector<std::vector<double> >(lowerboundary, upperboundary, width, 1, std::vector<double>(dimension, 0.0));
input_count = n_vector<int>(lowerboundary, upperboundary, width, 1, 0);
// initialize input_Grad and input_count
// the loop_flag is a n-dimensional vector, increae from lowerboundary to upperboundary when looping
std::vector<double> loop_flag(dimension, 0);
for (i = 0; i < dimension; i++) {
loop_flag[i] = lowerboundary[i];
}
i = 0;
while (i >= 0) {
for (j = 0; j < dimension; j++) {
input_grad.set_value(loop_flag, std::vector<double>(dimension,0));
}
input_count.set_value(loop_flag, 0);
// iterate over any dimensions
i = dimension - 1;
while (i >= 0) {
loop_flag[i] += width[i];
if (loop_flag[i] > upperboundary[i] - width[i] + EPSILON) {
loop_flag[i] = lowerboundary[i];
i--;
}
else
break;
}
}
read_inputfiles(input_filename);
}
}
~UIestimator() {}
// called from MD engine every step
bool update(const int step, std::vector<double> x, std::vector<double> y) {
int i;
if (step % output_freq == 0) {
calc_pmf();
write_files();
//write_interal_data();
}
for (i = 0; i < dimension; i++) {
// for dihedral RC, it is possible that x = 179 and y = -179, should correct it
// may have problem, need to fix
if (x[i] > 150 && y[i] < -150) {
y[i] += 360;
}
if (x[i] < -150 && y[i] > 150) {
y[i] -= 360;
}
if (x[i] < lowerboundary[i] - EXTENDED_X_SIZE * width[i] + EPSILON || x[i] > upperboundary[i] + EXTENDED_X_SIZE * width[i] - EPSILON \
|| y[i] - x[i] < -HALF_Y_SIZE * width[i] + EPSILON || y[i] - x[i] > HALF_Y_SIZE * width[i] - EPSILON \
|| y[i] - lowerboundary[i] < -HALF_Y_SIZE * width[i] + EPSILON || y[i] - upperboundary[i] > HALF_Y_SIZE * width[i] - EPSILON)
return false;
}
for (i = 0; i < dimension; i++) {
sum_x[i].increase_value(y, x[i]);
sum_x_square[i].increase_value(y, x[i] * x[i]);
}
count_y.increase_value(y, 1);
for (i = 0; i < dimension; i++) {
// adapt colvars precision
if (x[i] < lowerboundary[i] + EPSILON || x[i] > upperboundary[i] - EPSILON)
return false;
}
distribution_x_y.increase_value(x, y, 1);
return true;
}
// update the output_filename
void update_output_filename(const std::string& filename) {
output_filename = filename;
}
private:
std::vector<n_vector<double> > sum_x; // the sum of x in each y bin
std::vector<n_vector<double> > sum_x_square; // the sum of x in each y bin
n_vector<int> count_y; // the distribution of y
n_matrix distribution_x_y; // the distribution of <x, y> pair
int dimension;
std::vector<double> lowerboundary;
std::vector<double> upperboundary;
std::vector<double> width;
std::vector<double> krestr;
std::string output_filename;
int output_freq;
bool restart;
std::vector<std::string> input_filename;
double temperature;
n_vector<std::vector<double> > grad;
n_vector<int> count;
n_vector<double> oneD_pmf;
n_vector<std::vector<double> > input_grad;
n_vector<int> input_count;
// used in double integration
std::vector<n_vector<double> > x_av;
std::vector<n_vector<double> > sigma_square;
bool written;
bool written_1D;
// calculate gradients from the internal variables
void calc_pmf() {
int norm;
int i, j, k;
std::vector<double> loop_flag(dimension, 0);
for (i = 0; i < dimension; i++) {
loop_flag[i] = lowerboundary[i] - HALF_Y_SIZE * width[i];
}
i = 0;
while (i >= 0) {
norm = count_y.get_value(loop_flag) > 0 ? count_y.get_value(loop_flag) : 1;
for (j = 0; j < dimension; j++) {
x_av[j].set_value(loop_flag, sum_x[j].get_value(loop_flag) / norm);
sigma_square[j].set_value(loop_flag, sum_x_square[j].get_value(loop_flag) / norm - x_av[j].get_value(loop_flag) * x_av[j].get_value(loop_flag));
}
// iterate over any dimensions
i = dimension - 1;
while (i >= 0) {
loop_flag[i] += width[i];
if (loop_flag[i] > upperboundary[i] + HALF_Y_SIZE * width[i] - width[i] + EPSILON) {
loop_flag[i] = lowerboundary[i] - HALF_Y_SIZE * width[i];
i--;
}
else
break;
}
}
// double integration
std::vector<double> av(dimension, 0);
std::vector<double> diff_av(dimension, 0);
std::vector<double> loop_flag_x(dimension, 0);
std::vector<double> loop_flag_y(dimension, 0);
for (i = 0; i < dimension; i++) {
loop_flag_x[i] = lowerboundary[i];
loop_flag_y[i] = loop_flag_x[i] - HALF_Y_SIZE * width[i];
}
i = 0;
while (i >= 0) {
norm = 0;
for (k = 0; k < dimension; k++) {
av[k] = 0;
diff_av[k] = 0;
loop_flag_y[k] = loop_flag_x[k] - HALF_Y_SIZE * width[k];
}
int j = 0;
while (j >= 0) {
norm += distribution_x_y.get_value(loop_flag_x, loop_flag_y);
for (k = 0; k < dimension; k++) {
if (sigma_square[k].get_value(loop_flag_y) > EPSILON || sigma_square[k].get_value(loop_flag_y) < -EPSILON)
av[k] += distribution_x_y.get_value(loop_flag_x, loop_flag_y) * ( (loop_flag_x[k] + 0.5 * width[k]) - x_av[k].get_value(loop_flag_y)) / sigma_square[k].get_value(loop_flag_y);
diff_av[k] += distribution_x_y.get_value(loop_flag_x, loop_flag_y) * (loop_flag_x[k] - loop_flag_y[k]);
}
// iterate over any dimensions
j = dimension - 1;
while (j >= 0) {
loop_flag_y[j] += width[j];
if (loop_flag_y[j] > loop_flag_x[j] + HALF_Y_SIZE * width[j] - width[j] + EPSILON) {
loop_flag_y[j] = loop_flag_x[j] - HALF_Y_SIZE * width[j];
j--;
}
else
break;
}
}
std::vector<double> grad_temp(dimension, 0);
for (k = 0; k < dimension; k++) {
diff_av[k] /= (norm > 0 ? norm : 1);
av[k] = cvm::boltzmann() * temperature * av[k] / (norm > 0 ? norm : 1);
grad_temp[k] = av[k] - krestr[k] * diff_av[k];
}
grad.set_value(loop_flag_x, grad_temp);
count.set_value(loop_flag_x, norm);
// iterate over any dimensions
i = dimension - 1;
while (i >= 0) {
loop_flag_x[i] += width[i];
if (loop_flag_x[i] > upperboundary[i] - width[i] + EPSILON) {
loop_flag_x[i] = lowerboundary[i];
i--;
}
else
break;
}
}
}
// calculate 1D pmf
void calc_1D_pmf()
{
std::vector<double> last_position(1, 0);
std::vector<double> position(1, 0);
double min = 0;
double dG = 0;
double i;
oneD_pmf.set_value(lowerboundary, 0);
last_position = lowerboundary;
for (i = lowerboundary[0] + width[0]; i < upperboundary[0] + EPSILON; i += width[0]) {
position[0] = i + EPSILON;
if (restart == false || input_count.get_value(last_position) == 0) {
dG = oneD_pmf.get_value(last_position) + grad.get_value(last_position)[0] * width[0];
}
else {
dG = oneD_pmf.get_value(last_position) + ((grad.get_value(last_position)[0] * count.get_value(last_position) + input_grad.get_value(last_position)[0] * input_count.get_value(last_position)) / (count.get_value(last_position) + input_count.get_value(last_position))) * width[0];
}
if (dG < min)
min = dG;
oneD_pmf.set_value(position, dG);
last_position[0] = i + EPSILON;
}
for (i = lowerboundary[0]; i < upperboundary[0] + EPSILON; i += width[0]) {
position[0] = i + EPSILON;
oneD_pmf.set_value(position, oneD_pmf.get_value(position) - min);
}
}
// write 1D pmf
void write_1D_pmf() {
std::string pmf_filename = output_filename + ".UI.pmf";
// only for colvars module!
if (written_1D) cvm::backup_file(pmf_filename.c_str());
std::ostream* ofile_pmf = cvm::proxy->output_stream(pmf_filename.c_str());
std::vector<double> position(1, 0);
for (double i = lowerboundary[0]; i < upperboundary[0] + EPSILON; i += width[0]) {
*ofile_pmf << i << " ";
position[0] = i + EPSILON;
*ofile_pmf << oneD_pmf.get_value(position) << std::endl;
}
cvm::proxy->close_output_stream(pmf_filename.c_str());
written_1D = true;
}
// write heads of the output files
void writehead(std::ostream& os) const {
os << "# " << dimension << std::endl;
for (int i = 0; i < dimension; i++) {
os << "# " << lowerboundary[i] << " " << width[i] << " " << int((upperboundary[i] - lowerboundary[i]) / width[i] + EPSILON) << " " << 0 << std::endl;
}
os << std::endl;
}
// write interal data, used for testing
void write_interal_data() {
std::string internal_filename = output_filename + ".UI.internal";
std::ostream* ofile_internal = cvm::proxy->output_stream(internal_filename.c_str());
std::vector<double> loop_flag(dimension, 0);
for (int i = 0; i < dimension; i++) {
loop_flag[i] = lowerboundary[i];
}
int n = 0;
while (n >= 0) {
for (int j = 0; j < dimension; j++) {
*ofile_internal << loop_flag[j] + 0.5 * width[j] << " ";
}
for (int k = 0; k < dimension; k++) {
*ofile_internal << grad.get_value(loop_flag)[k] << " ";
}
std::vector<double> ii(dimension,0);
for (double i = loop_flag[0] - 10; i < loop_flag[0] + 10 + EPSILON; i+= width[0]) {
for (double j = loop_flag[1] - 10; j< loop_flag[1] + 10 + EPSILON; j+=width[1]) {
ii[0] = i;
ii[1] = j;
*ofile_internal << i <<" "<<j<<" "<< distribution_x_y.get_value(loop_flag,ii)<< " ";
}
}
*ofile_internal << std::endl;
// iterate over any dimensions
n = dimension - 1;
while (n >= 0) {
loop_flag[n] += width[n];
if (loop_flag[n] > upperboundary[n] - width[n] + EPSILON) {
loop_flag[n] = lowerboundary[n];
n--;
}
else
break;
}
}
cvm::proxy->close_output_stream(internal_filename.c_str());
}
// write output files
void write_files() {
std::string grad_filename = output_filename + ".UI.grad";
std::string hist_filename = output_filename + ".UI.hist.grad";
std::string count_filename = output_filename + ".UI.count";
int i, j;
//
// only for colvars module!
if (written) cvm::backup_file(grad_filename.c_str());
//if (written) cvm::backup_file(hist_filename.c_str());
if (written) cvm::backup_file(count_filename.c_str());
std::ostream* ofile = cvm::proxy->output_stream(grad_filename.c_str());
std::ostream* ofile_hist = cvm::proxy->output_stream(hist_filename.c_str(), std::ios::app);
std::ostream* ofile_count = cvm::proxy->output_stream(count_filename.c_str());
writehead(*ofile);
writehead(*ofile_hist);
writehead(*ofile_count);
if (dimension == 1) {
calc_1D_pmf();
write_1D_pmf();
}
std::vector<double> loop_flag(dimension, 0);
for (i = 0; i < dimension; i++) {
loop_flag[i] = lowerboundary[i];
}
i = 0;
while (i >= 0) {
for (j = 0; j < dimension; j++) {
*ofile << loop_flag[j] + 0.5 * width[j] << " ";
*ofile_hist << loop_flag[j] + 0.5 * width[j] << " ";
*ofile_count << loop_flag[j] + 0.5 * width[j] << " ";
}
if (restart == false) {
for (j = 0; j < dimension; j++) {
*ofile << grad.get_value(loop_flag)[j] << " ";
*ofile_hist << grad.get_value(loop_flag)[j] << " ";
}
*ofile << std::endl;
*ofile_hist << std::endl;
*ofile_count << count.get_value(loop_flag) << " " <<std::endl;
}
else {
double final_grad = 0;
for (j = 0; j < dimension; j++) {
int total_count_temp = (count.get_value(loop_flag) + input_count.get_value(loop_flag));
if (input_count.get_value(loop_flag) == 0)
final_grad = grad.get_value(loop_flag)[j];
else
final_grad = ((grad.get_value(loop_flag)[j] * count.get_value(loop_flag) + input_grad.get_value(loop_flag)[j] * input_count.get_value(loop_flag)) / total_count_temp);
*ofile << final_grad << " ";
*ofile_hist << final_grad << " ";
}
*ofile << std::endl;
*ofile_hist << std::endl;
*ofile_count << (count.get_value(loop_flag) + input_count.get_value(loop_flag)) << " " <<std::endl;
}
// iterate over any dimensions
i = dimension - 1;
while (i >= 0) {
loop_flag[i] += width[i];
if (loop_flag[i] > upperboundary[i] - width[i] + EPSILON) {
loop_flag[i] = lowerboundary[i];
i--;
*ofile << std::endl;
*ofile_hist << std::endl;
*ofile_count << std::endl;
}
else
break;
}
}
cvm::proxy->close_output_stream(grad_filename.c_str());
cvm::proxy->close_output_stream(hist_filename.c_str());
cvm::proxy->close_output_stream(count_filename.c_str());
written = true;
}
// read input files
void read_inputfiles(const std::vector<std::string> input_filename)
{
char sharp;
double nothing;
int dimension_temp;
int i, j, k, l, m;
std::vector<double> loop_bin_size(dimension, 0);
std::vector<double> position_temp(dimension, 0);
std::vector<double> grad_temp(dimension, 0);
int count_temp = 0;
for (i = 0; i < int(input_filename.size()); i++) {
int size = 1 , size_temp = 0;
std::string count_filename = input_filename[i] + ".UI.count";
std::string grad_filename = input_filename[i] + ".UI.grad";
std::ifstream count_file(count_filename.c_str(), std::ios::in);
std::ifstream grad_file(grad_filename.c_str(), std::ios::in);
count_file >> sharp >> dimension_temp;
grad_file >> sharp >> dimension_temp;
for (j = 0; j < dimension; j++) {
count_file >> sharp >> nothing >> nothing >> size_temp >> nothing;
grad_file >> sharp >> nothing >> nothing >> nothing >> nothing;
size *= size_temp;
}
for (j = 0; j < size; j++) {
do {
for (k = 0; k < dimension; k++) {
count_file >> position_temp[k];
grad_file >> nothing;
}
for (l = 0; l < dimension; l++) {
grad_file >> grad_temp[l];
}
count_file >> count_temp;
}
while (position_temp[i] < lowerboundary[i] - EPSILON || position_temp[i] > upperboundary[i] + EPSILON);
if (count_temp == 0) {
continue;
}
for (m = 0; m < dimension; m++) {
grad_temp[m] = (grad_temp[m] * count_temp + input_grad.get_value(position_temp)[m] * input_count.get_value(position_temp)) / (count_temp + input_count.get_value(position_temp));
}
input_grad.set_value(position_temp, grad_temp);
input_count.increase_value(position_temp, count_temp);
}
count_file.close();
grad_file.close();
}
}
};
};
#endif

View File

@ -817,6 +817,18 @@ int cvm::atom_group::create_sorted_ids(void)
}
int cvm::atom_group::overlap(const atom_group &g1, const atom_group &g2){
for (cvm::atom_const_iter ai1 = g1.begin(); ai1 != g1.end(); ai1++) {
for (cvm::atom_const_iter ai2 = g2.begin(); ai2 != g2.end(); ai2++) {
if (ai1->id == ai2->id) {
return (ai1->id + 1); // 1-based index to allow boolean usage
}
}
}
return 0;
}
void cvm::atom_group::center_ref_pos()
{
ref_pos_cog = cvm::atom_pos(0.0, 0.0, 0.0);

View File

@ -214,6 +214,12 @@ public:
{
return ag_features;
}
static void delete_features() {
for (size_t i=0; i < ag_features.size(); i++) {
delete ag_features[i];
}
ag_features.clear();
}
protected:
@ -280,6 +286,10 @@ public:
/// Allocates and populates the sorted list of atom ids
int create_sorted_ids(void);
/// Detect whether two groups share atoms
/// If yes, returns 1-based number of a common atom; else, returns 0
static int overlap(const atom_group &g1, const atom_group &g2);
/// \brief When updating atomic coordinates, translate them to align with the
/// center of mass of the reference coordinates
bool b_center;

View File

@ -10,6 +10,7 @@
#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarbias.h"
#include "colvargrid.h"
colvarbias::colvarbias(char const *key)
@ -31,12 +32,14 @@ int colvarbias::init(std::string const &conf)
{
colvarparse::init(conf);
size_t i = 0;
if (name.size() == 0) {
// first initialization
cvm::log("Initializing a new \""+bias_type+"\" instance.\n");
rank = cvm::num_biases_type(bias_type);
rank = cvm::main()->num_biases_type(bias_type);
get_keyval(conf, "name", name, bias_type+cvm::to_str(rank));
{
@ -62,7 +65,7 @@ int colvarbias::init(std::string const &conf)
INPUT_ERROR);
return INPUT_ERROR;
}
for (size_t i = 0; i < colvar_names.size(); i++) {
for (i = 0; i < colvar_names.size(); i++) {
add_colvar(colvar_names[i]);
}
}
@ -148,6 +151,13 @@ int colvarbias::clear()
}
int colvarbias::clear_state_data()
{
// no mutable content to delete for base class
return COLVARS_OK;
}
int colvarbias::add_colvar(std::string const &cv_name)
{
if (colvar *cv = cvm::colvar_by_name(cv_name)) {
@ -164,6 +174,8 @@ int colvarbias::add_colvar(std::string const &cv_name)
colvar_forces.back().is_derivative(); // colvar constraints are not applied to the force
colvar_forces.back().reset();
previous_colvar_forces.push_back(colvar_forces.back());
cv->biases.push_back(this); // add back-reference to this bias to colvar
if (is_enabled(f_cvb_apply_force)) {
@ -204,7 +216,8 @@ int colvarbias::update()
void colvarbias::communicate_forces()
{
for (size_t i = 0; i < num_variables(); i++) {
size_t i = 0;
for (i = 0; i < num_variables(); i++) {
if (cvm::debug()) {
cvm::log("Communicating a force to colvar \""+
variables(i)->name+"\".\n");
@ -216,6 +229,9 @@ void colvarbias::communicate_forces()
// aware of this bias' time_step_factor
variables(i)->add_bias_force(cvm::real(time_step_factor) * colvar_forces[i]);
}
for (i = 0; i < num_variables(); i++) {
previous_colvar_forces[i] = colvar_forces[i];
}
}
@ -389,6 +405,259 @@ std::ostream & colvarbias::write_traj(std::ostream &os)
return os;
}
colvarbias_ti::colvarbias_ti(char const *key)
: colvarbias(key)
{
provide(f_cvb_calc_ti_samples);
ti_avg_forces = NULL;
ti_count = NULL;
}
colvarbias_ti::~colvarbias_ti()
{
colvarbias_ti::clear_state_data();
}
int colvarbias_ti::clear_state_data()
{
if (ti_avg_forces != NULL) {
delete ti_avg_forces;
ti_avg_forces = NULL;
}
if (ti_count != NULL) {
delete ti_count;
ti_count = NULL;
}
return COLVARS_OK;
}
int colvarbias_ti::init(std::string const &conf)
{
int error_code = COLVARS_OK;
get_keyval_feature(this, conf, "writeTISamples",
f_cvb_write_ti_samples,
is_enabled(f_cvb_write_ti_samples));
get_keyval_feature(this, conf, "writeTIPMF",
f_cvb_write_ti_pmf,
is_enabled(f_cvb_write_ti_pmf));
if ((num_variables() > 1) && is_enabled(f_cvb_write_ti_pmf)) {
return cvm::error("Error: only 1-dimensional PMFs can be written "
"on the fly.\n"
"Consider using writeTISamples instead and "
"post-processing the sampled free-energy gradients.\n",
COLVARS_NOT_IMPLEMENTED);
} else {
error_code |= init_grids();
}
if (is_enabled(f_cvb_write_ti_pmf)) {
enable(f_cvb_write_ti_samples);
}
if (is_enabled(f_cvb_calc_ti_samples)) {
std::vector<std::string> const time_biases =
cvm::main()->time_dependent_biases();
if (time_biases.size() > 0) {
if ((time_biases.size() > 1) || (time_biases[0] != this->name)) {
for (size_t i = 0; i < num_variables(); i++) {
if (! variables(i)->is_enabled(f_cv_subtract_applied_force)) {
return cvm::error("Error: cannot collect TI samples while other "
"time-dependent biases are active and not all "
"variables have subtractAppliedForces on.\n",
INPUT_ERROR);
}
}
}
}
}
return error_code;
}
int colvarbias_ti::init_grids()
{
if (is_enabled(f_cvb_calc_ti_samples)) {
if (ti_avg_forces == NULL) {
ti_bin.resize(num_variables());
ti_system_forces.resize(num_variables());
for (size_t icv = 0; icv < num_variables(); icv++) {
ti_system_forces[icv].type(variables(icv)->value());
ti_system_forces[icv].is_derivative();
ti_system_forces[icv].reset();
}
ti_avg_forces = new colvar_grid_gradient(colvars);
ti_count = new colvar_grid_count(colvars);
ti_avg_forces->samples = ti_count;
ti_count->has_parent_data = true;
}
}
return COLVARS_OK;
}
int colvarbias_ti::update()
{
return update_system_forces(NULL);
}
int colvarbias_ti::update_system_forces(std::vector<colvarvalue> const
*subtract_forces)
{
if (! is_enabled(f_cvb_calc_ti_samples)) {
return COLVARS_OK;
}
has_data = true;
if (cvm::debug()) {
cvm::log("Updating system forces for bias "+this->name+"\n");
}
colvarproxy *proxy = cvm::main()->proxy;
size_t i;
if (proxy->total_forces_same_step()) {
for (i = 0; i < num_variables(); i++) {
ti_bin[i] = ti_avg_forces->current_bin_scalar(i);
}
}
// Collect total colvar forces
if ((cvm::step_relative() > 0) || proxy->total_forces_same_step()) {
if (ti_avg_forces->index_ok(ti_bin)) {
for (i = 0; i < num_variables(); i++) {
if (variables(i)->is_enabled(f_cv_subtract_applied_force)) {
// this colvar is already subtracting all applied forces
ti_system_forces[i] = variables(i)->total_force();
} else {
ti_system_forces[i] = variables(i)->total_force() -
((subtract_forces != NULL) ?
(*subtract_forces)[i] : previous_colvar_forces[i]);
}
}
ti_avg_forces->acc_value(ti_bin, ti_system_forces);
}
}
if (!proxy->total_forces_same_step()) {
// Set the index for use in the next iteration, when total forces come in
for (i = 0; i < num_variables(); i++) {
ti_bin[i] = ti_avg_forces->current_bin_scalar(i);
}
}
return COLVARS_OK;
}
std::string const colvarbias_ti::get_state_params() const
{
return std::string("");
}
int colvarbias_ti::set_state_params(std::string const &state_conf)
{
return COLVARS_OK;
}
std::ostream & colvarbias_ti::write_state_data(std::ostream &os)
{
if (! is_enabled(f_cvb_calc_ti_samples)) {
return os;
}
os << "\nhistogram\n";
ti_count->write_raw(os);
os << "\nsystem_forces\n";
ti_avg_forces->write_raw(os);
return os;
}
std::istream & colvarbias_ti::read_state_data(std::istream &is)
{
if (! is_enabled(f_cvb_calc_ti_samples)) {
return is;
}
if (cvm::debug()) {
cvm::log("Reading state data for the TI estimator.\n");
}
if (! read_state_data_key(is, "histogram")) {
return is;
}
if (! ti_count->read_raw(is)) {
return is;
}
if (! read_state_data_key(is, "system_forces")) {
return is;
}
if (! ti_avg_forces->read_raw(is)) {
return is;
}
if (cvm::debug()) {
cvm::log("Done reading state data for the TI estimator.\n");
}
return is;
}
int colvarbias_ti::write_output_files()
{
if (!has_data) {
// nothing to write
return COLVARS_OK;
}
std::string const ti_output_prefix = cvm::output_prefix()+"."+this->name;
std::ostream *os = NULL;
if (is_enabled(f_cvb_write_ti_samples)) {
std::string const ti_count_file_name(ti_output_prefix+".ti.count");
os = cvm::proxy->output_stream(ti_count_file_name);
if (os) {
ti_count->write_multicol(*os);
cvm::proxy->close_output_stream(ti_count_file_name);
}
std::string const ti_grad_file_name(ti_output_prefix+".ti.grad");
os = cvm::proxy->output_stream(ti_grad_file_name);
if (os) {
ti_avg_forces->write_multicol(*os);
cvm::proxy->close_output_stream(ti_grad_file_name);
}
}
if (is_enabled(f_cvb_write_ti_pmf)) {
std::string const pmf_file_name(ti_output_prefix+".ti.pmf");
cvm::log("Writing TI PMF to file \""+pmf_file_name+"\".\n");
os = cvm::proxy->output_stream(pmf_file_name);
if (os) {
// get the FE gradient
ti_avg_forces->multiply_constant(-1.0);
ti_avg_forces->write_1D_integral(*os);
ti_avg_forces->multiply_constant(-1.0);
cvm::proxy->close_output_stream(pmf_file_name);
}
}
return COLVARS_OK;
}
// Static members
std::vector<colvardeps::feature *> colvarbias::cvb_features;

View File

@ -109,6 +109,9 @@ public:
/// \brief Delete everything
virtual int clear();
/// \brief Delete only the allocatable data (save memory)
virtual int clear_state_data();
/// Destructor
virtual ~colvarbias();
@ -183,6 +186,12 @@ public:
{
return cvb_features;
}
static void delete_features() {
for (size_t i=0; i < cvb_features.size(); i++) {
delete cvb_features[i];
}
cvb_features.clear();
}
protected:
@ -194,6 +203,9 @@ protected:
/// \brief Current forces from this bias to the variables
std::vector<colvarvalue> colvar_forces;
/// \brief Forces last applied by this bias to the variables
std::vector<colvarvalue> previous_colvar_forces;
/// \brief Current energy of this bias (colvar_forces should be obtained by deriving this)
cvm::real bias_energy;
@ -209,4 +221,48 @@ protected:
};
class colvar_grid_gradient;
class colvar_grid_count;
/// \brief Base class for unconstrained thermodynamic-integration FE estimator
class colvarbias_ti : public virtual colvarbias {
public:
colvarbias_ti(char const *key);
virtual ~colvarbias_ti();
virtual int clear_state_data();
virtual int init(std::string const &conf);
virtual int init_grids();
virtual int update();
/// Subtract applied forces (either last forces or argument) from the total
/// forces
virtual int update_system_forces(std::vector<colvarvalue> const
*subtract_forces);
virtual std::string const get_state_params() const;
virtual int set_state_params(std::string const &state_conf);
virtual std::ostream & write_state_data(std::ostream &os);
virtual std::istream & read_state_data(std::istream &is);
virtual int write_output_files();
protected:
/// \brief Forces exerted from the system to the associated variables
std::vector<colvarvalue> ti_system_forces;
/// Averaged system forces
colvar_grid_gradient *ti_avg_forces;
/// Histogram of sampled data
colvar_grid_count *ti_count;
/// Because total forces may be from the last simulation step,
/// store the index of the variables then
std::vector<int> ti_bin;
};
#endif

View File

@ -14,6 +14,8 @@
colvarbias_abf::colvarbias_abf(char const *key)
: colvarbias(key),
b_UI_estimator(false),
b_CZAR_estimator(false),
system_force(NULL),
gradients(NULL),
samples(NULL),
@ -159,6 +161,7 @@ int colvarbias_abf::init(std::string const &conf)
// Data for eABF z-based estimator
if (b_extended) {
get_keyval(conf, "CZARestimator", b_CZAR_estimator, true);
// CZAR output files for stratified eABF
get_keyval(conf, "writeCZARwindowFile", b_czar_window_file, false,
colvarparse::parse_silent);
@ -187,8 +190,38 @@ int colvarbias_abf::init(std::string const &conf)
read_gradients_samples();
}
cvm::log("Finished ABF setup.\n");
// if extendedLangrangian is on, then call UI estimator
if (b_extended) {
get_keyval(conf, "UIestimator", b_UI_estimator, false);
if (b_UI_estimator) {
std::vector<double> UI_lowerboundary;
std::vector<double> UI_upperboundary;
std::vector<double> UI_width;
std::vector<double> UI_krestr;
bool UI_restart = (input_prefix.size() > 0);
for (size_t i = 0; i < colvars.size(); i++)
{
UI_lowerboundary.push_back(colvars[i]->lower_boundary);
UI_upperboundary.push_back(colvars[i]->upper_boundary);
UI_width.push_back(colvars[i]->width);
UI_krestr.push_back(colvars[i]->force_constant());
}
eabf_UI = UIestimator::UIestimator(UI_lowerboundary,
UI_upperboundary,
UI_width,
UI_krestr, // force constant in eABF
output_prefix, // the prefix of output files
cvm::restart_out_freq,
UI_restart, // whether restart from a .count and a .grad file
input_prefix, // the prefixes of input files
cvm::temperature());
}
}
cvm::log("Finished ABF setup.\n");
return COLVARS_OK;
}
@ -271,6 +304,10 @@ int colvarbias_abf::update()
// and subtract previous ABF force if necessary
update_system_force(i);
}
if (cvm::proxy->total_forces_same_step()) {
// e.g. in LAMMPS, total forces are current
force_bin = bin;
}
gradients->acc_force(force_bin, system_force);
}
if ( z_gradients && update_bias ) {
@ -288,8 +325,11 @@ int colvarbias_abf::update()
}
}
// save bin for next timestep
force_bin = bin;
if (!cvm::proxy->total_forces_same_step()) {
// e.g. in NAMD, total forces will be available for next timestep
// hence we store the current colvar bin
force_bin = bin;
}
// Reset biasing forces from previous timestep
for (size_t i = 0; i < colvars.size(); i++) {
@ -332,7 +372,7 @@ int colvarbias_abf::update()
}
// update the output prefix; TODO: move later to setup_output() function
if (cvm::num_biases_feature(colvardeps::f_cvb_calc_pmf) == 1) {
if (cvm::main()->num_biases_feature(colvardeps::f_cvb_calc_pmf) == 1) {
// This is the only bias computing PMFs
output_prefix = cvm::output_prefix();
} else {
@ -364,6 +404,20 @@ int colvarbias_abf::update()
cvm::log("Prepared sample and gradient buffers at step "+cvm::to_str(cvm::step_absolute())+".");
}
// update UI estimator every step
if (b_UI_estimator)
{
std::vector<double> x(colvars.size(),0);
std::vector<double> y(colvars.size(),0);
for (size_t i = 0; i < colvars.size(); i++)
{
x[i] = colvars[i]->actual_value();
y[i] = colvars[i]->value();
}
eabf_UI.update_output_filename(output_prefix);
eabf_UI.update(cvm::step_absolute(), x, y);
}
return COLVARS_OK;
}
@ -479,8 +533,8 @@ void colvarbias_abf::write_gradients_samples(const std::string &prefix, bool app
cvm::proxy->close_output_stream(pmf_out_name);
}
if (z_gradients) {
// Write eABF-related quantities
if (b_CZAR_estimator) {
// Write eABF CZAR-related quantities
std::string z_samples_out_name = prefix + ".zcount";
@ -588,7 +642,7 @@ void colvarbias_abf::read_gradients_samples()
is.close();
}
if (z_gradients) {
if (b_CZAR_estimator) {
// Read eABF z-averaged data for CZAR
cvm::log("Reading z-histogram from " + z_samples_in_name + " and z-gradient from " + z_gradients_in_name);
@ -621,7 +675,7 @@ std::ostream & colvarbias_abf::write_state_data(std::ostream& os)
os << "\ngradient\n";
gradients->write_raw(os, 8);
if (z_gradients) {
if (b_CZAR_estimator) {
os.setf(std::ios::fmtflags(0), std::ios::floatfield); // default floating-point format
os << "\nz_samples\n";
z_samples->write_raw(os, 8);
@ -655,7 +709,7 @@ std::istream & colvarbias_abf::read_state_data(std::istream& is)
return is;
}
if (z_gradients) {
if (b_CZAR_estimator) {
if (! read_state_data_key(is, "z_samples")) {
return is;

View File

@ -17,6 +17,7 @@
#include "colvarbias.h"
#include "colvargrid.h"
#include "colvar_UIestimator.h"
typedef cvm::real* gradient_t;
@ -50,6 +51,12 @@ private:
/// Write CZAR output file for stratified eABF (.zgrad)
bool b_czar_window_file;
size_t history_freq;
/// Umbrella Integration estimator of free energy from eABF
UIestimator::UIestimator eabf_UI;
// Run UI estimator?
bool b_UI_estimator;
// Run CZAR estimator?
bool b_CZAR_estimator;
/// Cap applied biasing force?
bool cap_force;

View File

@ -33,7 +33,7 @@
colvarbias_meta::colvarbias_meta(char const *key)
: colvarbias(key)
: colvarbias(key), colvarbias_ti(key)
{
new_hills_begin = hills.end();
hills_traj_os = NULL;
@ -44,6 +44,7 @@ colvarbias_meta::colvarbias_meta(char const *key)
int colvarbias_meta::init(std::string const &conf)
{
colvarbias::init(conf);
colvarbias_ti::init(conf);
enable(f_cvb_calc_pmf);
@ -104,7 +105,7 @@ int colvarbias_meta::init(std::string const &conf)
get_keyval(conf, "dumpFreeEnergyFile", dump_fes, true, colvarparse::parse_silent);
if (get_keyval(conf, "saveFreeEnergyFile", dump_fes_save, false, colvarparse::parse_silent)) {
cvm::log("Option \"saveFreeEnergyFile\" is deprecated, "
"please use \"keepFreeEnergyFile\" instead.");
"please use \"keepFreeEnergyFiles\" instead.");
}
get_keyval(conf, "keepFreeEnergyFiles", dump_fes_save, dump_fes_save);
@ -230,15 +231,7 @@ int colvarbias_meta::init_ebmeta_params(std::string const &conf)
colvarbias_meta::~colvarbias_meta()
{
if (hills_energy) {
delete hills_energy;
hills_energy = NULL;
}
if (hills_energy_gradients) {
delete hills_energy_gradients;
hills_energy_gradients = NULL;
}
colvarbias_meta::clear_state_data();
if (replica_hills_os) {
cvm::proxy->close_output_stream(replica_hills_file);
@ -250,13 +243,31 @@ colvarbias_meta::~colvarbias_meta()
hills_traj_os = NULL;
}
if(target_dist) {
if (target_dist) {
delete target_dist;
target_dist = NULL;
}
}
int colvarbias_meta::clear_state_data()
{
if (hills_energy) {
delete hills_energy;
hills_energy = NULL;
}
if (hills_energy_gradients) {
delete hills_energy_gradients;
hills_energy_gradients = NULL;
}
hills.clear();
hills_off_grid.clear();
return COLVARS_OK;
}
// **********************************************************************
// Hill management member functions
@ -336,6 +347,9 @@ int colvarbias_meta::update()
// update base class
error_code |= colvarbias::update();
// update the TI estimator (if defined)
error_code |= colvarbias_ti::update();
// update grid definition, if needed
error_code |= update_grid_params();
// add new biasing energy/forces
@ -1000,6 +1014,10 @@ void colvarbias_meta::update_replicas_registry()
(replicas.back())->hills_energy = new colvar_grid_scalar(colvars);
(replicas.back())->hills_energy_gradients = new colvar_grid_gradient(colvars);
}
if (is_enabled(f_cvb_calc_ti_samples)) {
(replicas.back())->enable(f_cvb_calc_ti_samples);
(replicas.back())->colvarbias_ti::init_grids();
}
}
}
} else {
@ -1374,6 +1392,8 @@ std::istream & colvarbias_meta::read_state_data(std::istream& is)
}
}
colvarbias_ti::read_state_data(is);
if (cvm::debug())
cvm::log("colvarbias_meta::read_restart() done\n");
@ -1474,7 +1494,7 @@ std::istream & colvarbias_meta::read_hill(std::istream &is)
int colvarbias_meta::setup_output()
{
output_prefix = cvm::output_prefix();
if (cvm::num_biases_feature(colvardeps::f_cvb_calc_pmf) > 1) {
if (cvm::main()->num_biases_feature(colvardeps::f_cvb_calc_pmf) > 1) {
// if this is not the only free energy integrator, append
// this bias's name, to distinguish it from the output of the other
// biases producing a .pmf file
@ -1631,6 +1651,7 @@ std::ostream & colvarbias_meta::write_state_data(std::ostream& os)
}
}
colvarbias_ti::write_state_data(os);
return os;
}
@ -1651,6 +1672,7 @@ int colvarbias_meta::write_state_to_replicas()
int colvarbias_meta::write_output_files()
{
colvarbias_ti::write_output_files();
if (dump_fes) {
write_pmf();
}

View File

@ -19,7 +19,10 @@
#include "colvargrid.h"
/// Metadynamics bias (implementation of \link colvarbias \endlink)
class colvarbias_meta : public colvarbias {
class colvarbias_meta
: public virtual colvarbias,
public virtual colvarbias_ti
{
public:
@ -35,10 +38,13 @@ public:
Communication comm;
colvarbias_meta(char const *key);
virtual ~colvarbias_meta();
virtual int init(std::string const &conf);
virtual int init_well_tempered_params(std::string const &conf);
virtual int init_ebmeta_params(std::string const &conf);
virtual ~colvarbias_meta();
virtual int clear_state_data();
virtual int update();
virtual int update_grid_params();

View File

@ -14,7 +14,7 @@
colvarbias_restraint::colvarbias_restraint(char const *key)
: colvarbias(key)
: colvarbias(key), colvarbias_ti(key)
{
}
@ -24,6 +24,8 @@ int colvarbias_restraint::init(std::string const &conf)
colvarbias::init(conf);
enable(f_cvb_apply_force);
colvarbias_ti::init(conf);
if (cvm::debug())
cvm::log("Initializing a new restraint bias.\n");
@ -86,7 +88,7 @@ std::ostream & colvarbias_restraint::write_traj(std::ostream &os)
colvarbias_restraint_centers::colvarbias_restraint_centers(char const *key)
: colvarbias(key), colvarbias_restraint(key)
: colvarbias(key), colvarbias_ti(key), colvarbias_restraint(key)
{
}
@ -145,7 +147,7 @@ int colvarbias_restraint_centers::change_configuration(std::string const &conf)
colvarbias_restraint_k::colvarbias_restraint_k(char const *key)
: colvarbias(key), colvarbias_restraint(key)
: colvarbias(key), colvarbias_ti(key), colvarbias_restraint(key)
{
force_k = -1.0;
}
@ -237,6 +239,7 @@ int colvarbias_restraint_moving::set_state_params(std::string const &conf)
colvarbias_restraint_centers_moving::colvarbias_restraint_centers_moving(char const *key)
: colvarbias(key),
colvarbias_ti(key),
colvarbias_restraint(key),
colvarbias_restraint_centers(key),
colvarbias_restraint_moving(key)
@ -284,14 +287,17 @@ int colvarbias_restraint_centers_moving::init(std::string const &conf)
target_centers[i],
0.5);
}
get_keyval(conf, "outputAccumulatedWork", b_output_acc_work,
b_output_acc_work); // TODO this conflicts with stages
} else {
target_centers.clear();
return COLVARS_OK;
}
// Output restraint centers even when they do not change; some NAMD REUS
// scripts expect this behavior
get_keyval(conf, "outputCenters", b_output_centers, b_output_centers);
get_keyval(conf, "outputAccumulatedWork", b_output_acc_work,
b_output_acc_work); // TODO this conflicts with stages
return COLVARS_OK;
}
@ -475,6 +481,7 @@ std::ostream & colvarbias_restraint_centers_moving::write_traj(std::ostream &os)
colvarbias_restraint_k_moving::colvarbias_restraint_k_moving(char const *key)
: colvarbias(key),
colvarbias_ti(key),
colvarbias_restraint(key),
colvarbias_restraint_k(key),
colvarbias_restraint_moving(key)
@ -712,6 +719,7 @@ std::ostream & colvarbias_restraint::write_state(std::ostream &os)
colvarbias_restraint_harmonic::colvarbias_restraint_harmonic(char const *key)
: colvarbias(key),
colvarbias_ti(key),
colvarbias_restraint(key),
colvarbias_restraint_centers(key),
colvarbias_restraint_moving(key),
@ -743,17 +751,22 @@ int colvarbias_restraint_harmonic::init(std::string const &conf)
int colvarbias_restraint_harmonic::update()
{
int error_code = COLVARS_OK;
// update the TI estimator (if defined)
error_code |= colvarbias_ti::update();
// update parameters (centers or force constant)
colvarbias_restraint_centers_moving::update();
colvarbias_restraint_k_moving::update();
error_code |= colvarbias_restraint_centers_moving::update();
error_code |= colvarbias_restraint_k_moving::update();
// update restraint energy and forces
colvarbias_restraint::update();
error_code |= colvarbias_restraint::update();
// update accumulated work using the current forces
colvarbias_restraint_centers_moving::update_acc_work();
error_code |= colvarbias_restraint_centers_moving::update_acc_work();
return COLVARS_OK;
return error_code;
}
@ -798,6 +811,18 @@ int colvarbias_restraint_harmonic::set_state_params(std::string const &conf)
}
std::ostream & colvarbias_restraint_harmonic::write_state_data(std::ostream &os)
{
return colvarbias_ti::write_state_data(os);
}
std::istream & colvarbias_restraint_harmonic::read_state_data(std::istream &is)
{
return colvarbias_ti::read_state_data(is);
}
std::ostream & colvarbias_restraint_harmonic::write_traj_label(std::ostream &os)
{
colvarbias_restraint::write_traj_label(os);
@ -845,6 +870,7 @@ cvm::real colvarbias_restraint_harmonic::energy_difference(std::string const &co
colvarbias_restraint_harmonic_walls::colvarbias_restraint_harmonic_walls(char const *key)
: colvarbias(key),
colvarbias_ti(key),
colvarbias_restraint(key),
colvarbias_restraint_k(key),
colvarbias_restraint_moving(key),
@ -967,11 +993,15 @@ int colvarbias_restraint_harmonic_walls::init(std::string const &conf)
int colvarbias_restraint_harmonic_walls::update()
{
colvarbias_restraint_k_moving::update();
int error_code = COLVARS_OK;
colvarbias_restraint::update();
error_code |= colvarbias_ti::update();
return COLVARS_OK;
error_code |= colvarbias_restraint_k_moving::update();
error_code |= colvarbias_restraint::update();
return error_code;
}
@ -1065,6 +1095,18 @@ int colvarbias_restraint_harmonic_walls::set_state_params(std::string const &con
}
std::ostream & colvarbias_restraint_harmonic_walls::write_state_data(std::ostream &os)
{
return colvarbias_ti::write_state_data(os);
}
std::istream & colvarbias_restraint_harmonic_walls::read_state_data(std::istream &is)
{
return colvarbias_ti::read_state_data(is);
}
std::ostream & colvarbias_restraint_harmonic_walls::write_traj_label(std::ostream &os)
{
colvarbias_restraint::write_traj_label(os);
@ -1084,6 +1126,7 @@ std::ostream & colvarbias_restraint_harmonic_walls::write_traj(std::ostream &os)
colvarbias_restraint_linear::colvarbias_restraint_linear(char const *key)
: colvarbias(key),
colvarbias_ti(key),
colvarbias_restraint(key),
colvarbias_restraint_centers(key),
colvarbias_restraint_moving(key),
@ -1120,17 +1163,22 @@ int colvarbias_restraint_linear::init(std::string const &conf)
int colvarbias_restraint_linear::update()
{
int error_code = COLVARS_OK;
// update the TI estimator (if defined)
error_code |= colvarbias_ti::update();
// update parameters (centers or force constant)
colvarbias_restraint_centers_moving::update();
colvarbias_restraint_k_moving::update();
error_code |= colvarbias_restraint_centers_moving::update();
error_code |= colvarbias_restraint_k_moving::update();
// update restraint energy and forces
colvarbias_restraint::update();
error_code |= colvarbias_restraint::update();
// update accumulated work using the current forces
colvarbias_restraint_centers_moving::update_acc_work();
error_code |= colvarbias_restraint_centers_moving::update_acc_work();
return COLVARS_OK;
return error_code;
}
@ -1196,6 +1244,18 @@ int colvarbias_restraint_linear::set_state_params(std::string const &conf)
}
std::ostream & colvarbias_restraint_linear::write_state_data(std::ostream &os)
{
return colvarbias_ti::write_state_data(os);
}
std::istream & colvarbias_restraint_linear::read_state_data(std::istream &is)
{
return colvarbias_ti::read_state_data(is);
}
std::ostream & colvarbias_restraint_linear::write_traj_label(std::ostream &os)
{
colvarbias_restraint::write_traj_label(os);

View File

@ -16,7 +16,8 @@
/// see derived classes for specific types
/// (implementation of \link colvarbias \endlink)
class colvarbias_restraint
: public virtual colvarbias
: public virtual colvarbias,
public virtual colvarbias_ti
{
public:
@ -95,7 +96,7 @@ protected:
/// Options to change the restraint configuration over time (shared between centers and k moving)
class colvarbias_restraint_moving
: public virtual colvarparse {
: public virtual colvarparse, public virtual colvardeps {
public:
colvarbias_restraint_moving(char const *key);
@ -226,6 +227,8 @@ public:
virtual int update();
virtual std::string const get_state_params() const;
virtual int set_state_params(std::string const &conf);
virtual std::ostream & write_state_data(std::ostream &os);
virtual std::istream & read_state_data(std::istream &os);
virtual std::ostream & write_traj_label(std::ostream &os);
virtual std::ostream & write_traj(std::ostream &os);
virtual int change_configuration(std::string const &conf);
@ -252,6 +255,8 @@ public:
virtual void communicate_forces();
virtual std::string const get_state_params() const;
virtual int set_state_params(std::string const &conf);
virtual std::ostream & write_state_data(std::ostream &os);
virtual std::istream & read_state_data(std::istream &os);
virtual std::ostream & write_traj_label(std::ostream &os);
virtual std::ostream & write_traj(std::ostream &os);
@ -292,6 +297,8 @@ public:
virtual std::string const get_state_params() const;
virtual int set_state_params(std::string const &conf);
virtual std::ostream & write_state_data(std::ostream &os);
virtual std::istream & read_state_data(std::istream &os);
virtual std::ostream & write_traj_label(std::ostream &os);
virtual std::ostream & write_traj(std::ostream &os);

View File

@ -140,7 +140,12 @@ public:
{
return cvc_features;
}
static void delete_features() {
for (size_t i=0; i < cvc_features.size(); i++) {
delete cvc_features[i];
}
cvc_features.clear();
}
/// \brief Obtain data needed for the calculation for the backend
virtual void read_data();

View File

@ -18,6 +18,7 @@
template<bool calculate_gradients>
cvm::real colvar::coordnum::switching_function(cvm::real const &r0,
int const &en,
@ -32,8 +33,8 @@ cvm::real colvar::coordnum::switching_function(cvm::real const &r0,
int const en2 = en/2;
int const ed2 = ed/2;
cvm::real const xn = std::pow(l2, en2);
cvm::real const xd = std::pow(l2, ed2);
cvm::real const xn = cvm::integer_power(l2, en2);
cvm::real const xd = cvm::integer_power(l2, ed2);
cvm::real const func = (1.0-xn)/(1.0-xd);
if (calculate_gradients) {
@ -62,8 +63,8 @@ cvm::real colvar::coordnum::switching_function(cvm::rvector const &r0_vec,
int const en2 = en/2;
int const ed2 = ed/2;
cvm::real const xn = std::pow(l2, en2);
cvm::real const xd = std::pow(l2, ed2);
cvm::real const xn = cvm::integer_power(l2, en2);
cvm::real const xd = cvm::integer_power(l2, ed2);
cvm::real const func = (1.0-xn)/(1.0-xd);
if (calculate_gradients) {
@ -87,6 +88,12 @@ colvar::coordnum::coordnum(std::string const &conf)
group1 = parse_group(conf, "group1");
group2 = parse_group(conf, "group2");
if (int atom_number = cvm::atom_group::overlap(*group1, *group2)) {
cvm::error("Error: group1 and group2 share a common atom (number: " +
cvm::to_str(atom_number) + ")\n");
return;
}
if (group1->b_dummy) {
cvm::error("Error: only group2 is allowed to be a dummy atom\n");
return;
@ -111,11 +118,17 @@ colvar::coordnum::coordnum(std::string const &conf)
if (r0_vec.z < 0.0) r0_vec.z *= -1.0;
}
get_keyval(conf, "expNumer", en, int(6) );
get_keyval(conf, "expDenom", ed, int(12));
get_keyval(conf, "expNumer", en, 6);
get_keyval(conf, "expDenom", ed, 12);
if ( (en%2) || (ed%2) ) {
cvm::error("Error: odd exponents provided, can only use even ones.\n", INPUT_ERROR);
cvm::error("Error: odd exponent(s) provided, can only use even ones.\n",
INPUT_ERROR);
}
if ( (en <= 0) || (ed <= 0) ) {
cvm::error("Error: negative exponent(s) provided.\n",
INPUT_ERROR);
}
if (!is_enabled(f_cvc_pbc_minimum_image)) {
@ -250,8 +263,13 @@ colvar::h_bond::h_bond(std::string const &conf)
get_keyval(conf, "expDenom", ed, 8);
if ( (en%2) || (ed%2) ) {
cvm::error("Error: odd exponents provided, can only use even ones.\n");
return;
cvm::error("Error: odd exponent(s) provided, can only use even ones.\n",
INPUT_ERROR);
}
if ( (en <= 0) || (ed <= 0) ) {
cvm::error("Error: negative exponent(s) provided.\n",
INPUT_ERROR);
}
if (cvm::debug())
@ -318,12 +336,18 @@ colvar::selfcoordnum::selfcoordnum(std::string const &conf)
group1 = parse_group(conf, "group1");
get_keyval(conf, "cutoff", r0, cvm::real(4.0 * cvm::unit_angstrom()));
get_keyval(conf, "expNumer", en, int(6) );
get_keyval(conf, "expDenom", ed, int(12));
get_keyval(conf, "expNumer", en, 6);
get_keyval(conf, "expDenom", ed, 12);
if ( (en%2) || (ed%2) ) {
cvm::error("Error: odd exponents provided, can only use even ones.\n");
return;
cvm::error("Error: odd exponent(s) provided, can only use even ones.\n",
INPUT_ERROR);
}
if ( (en <= 0) || (ed <= 0) ) {
cvm::error("Error: negative exponent(s) provided.\n",
INPUT_ERROR);
}
if (!is_enabled(f_cvc_pbc_minimum_image)) {
@ -401,12 +425,17 @@ colvar::groupcoordnum::groupcoordnum(std::string const &conf)
if (r0_vec.z < 0.0) r0_vec.z *= -1.0;
}
get_keyval(conf, "expNumer", en, int(6) );
get_keyval(conf, "expDenom", ed, int(12));
get_keyval(conf, "expNumer", en, 6);
get_keyval(conf, "expDenom", ed, 12);
if ( (en%2) || (ed%2) ) {
cvm::error("Error: odd exponents provided, can only use even ones.\n");
return;
cvm::error("Error: odd exponent(s) provided, can only use even ones.\n",
INPUT_ERROR);
}
if ( (en <= 0) || (ed <= 0) ) {
cvm::error("Error: negative exponent(s) provided.\n",
INPUT_ERROR);
}
if (!is_enabled(f_cvc_pbc_minimum_image)) {
@ -438,8 +467,8 @@ cvm::real colvar::groupcoordnum::switching_function(cvm::real const &r0,
int const en2 = en/2;
int const ed2 = ed/2;
cvm::real const xn = std::pow(l2, en2);
cvm::real const xd = std::pow(l2, ed2);
cvm::real const xn = cvm::integer_power(l2, en2);
cvm::real const xd = cvm::integer_power(l2, ed2);
cvm::real const func = (1.0-xn)/(1.0-xd);
if (calculate_gradients) {
@ -471,8 +500,8 @@ cvm::real colvar::groupcoordnum::switching_function(cvm::rvector const &r0_vec,
int const en2 = en/2;
int const ed2 = ed/2;
cvm::real const xn = std::pow(l2, en2);
cvm::real const xd = std::pow(l2, ed2);
cvm::real const xn = cvm::integer_power(l2, en2);
cvm::real const xd = cvm::integer_power(l2, ed2);
cvm::real const func = (1.0-xn)/(1.0-xd);
if (calculate_gradients) {

View File

@ -1066,8 +1066,9 @@ void colvar::rmsd::calc_force_invgrads()
void colvar::rmsd::calc_Jacobian_derivative()
{
// divergence of the rotated coordinates (including only derivatives of the rotation matrix)
cvm::real divergence = 0.0;
cvm::real rotation_term = 0.0;
// The rotation term only applies is coordinates are rotated
if (atoms->b_rotate) {
// gradient of the rotation matrix
@ -1104,7 +1105,7 @@ void colvar::rmsd::calc_Jacobian_derivative()
for (size_t alpha = 0; alpha < 3; alpha++) {
for (size_t beta = 0; beta < 3; beta++) {
divergence += grad_rot_mat[beta][alpha][alpha] * y[beta];
rotation_term += grad_rot_mat[beta][alpha][alpha] * y[beta];
// Note: equation was derived for inverse rotation (see colvars paper)
// so here the matrix is transposed
// (eq would give divergence += grad_rot_mat[alpha][beta][alpha] * y[beta];)
@ -1112,7 +1113,13 @@ void colvar::rmsd::calc_Jacobian_derivative()
}
}
}
jd.real_value = x.real_value > 0.0 ? (3.0 * atoms->size() - 4.0 - divergence) / x.real_value : 0.0;
// The translation term only applies is coordinates are centered
cvm::real translation_term = atoms->b_center ? 3.0 : 0.0;
jd.real_value = x.real_value > 0.0 ?
(3.0 * atoms->size() - 1.0 - translation_term - rotation_term) / x.real_value :
0.0;
}

View File

@ -150,8 +150,8 @@ void colvar::alpha_angles::calc_value()
(theta[i])->calc_value();
cvm::real const t = ((theta[i])->value().real_value-theta_ref)/theta_tol;
cvm::real const f = ( (1.0 - std::pow(t, (int) 2)) /
(1.0 - std::pow(t, (int) 4)) );
cvm::real const f = ( (1.0 - (t*t)) /
(1.0 - (t*t*t*t)) );
x.real_value += theta_norm * f;
@ -202,12 +202,12 @@ void colvar::alpha_angles::apply_force(colvarvalue const &force)
for (size_t i = 0; i < theta.size(); i++) {
cvm::real const t = ((theta[i])->value().real_value-theta_ref)/theta_tol;
cvm::real const f = ( (1.0 - std::pow(t, (int) 2)) /
(1.0 - std::pow(t, (int) 4)) );
cvm::real const f = ( (1.0 - (t*t)) /
(1.0 - (t*t*t*t)) );
cvm::real const dfdt =
1.0/(1.0 - std::pow(t, (int) 4)) *
( (-2.0 * t) + (-1.0*f)*(-4.0 * std::pow(t, (int) 3)) );
1.0/(1.0 - (t*t*t*t)) *
( (-2.0 * t) + (-1.0*f)*(-4.0 * (t*t*t)) );
(theta[i])->apply_force(theta_norm *
dfdt * (1.0/theta_tol) *

View File

@ -413,15 +413,27 @@ void colvardeps::init_cvb_requires() {
init_feature(f_cvb_apply_force, "apply force", f_type_user);
f_req_children(f_cvb_apply_force, f_cv_gradient);
init_feature(f_cvb_get_total_force, "obtain total force");
init_feature(f_cvb_get_total_force, "obtain total force", f_type_dynamic);
f_req_children(f_cvb_get_total_force, f_cv_total_force);
init_feature(f_cvb_history_dependent, "history-dependent", f_type_static);
init_feature(f_cvb_time_dependent, "time-dependent", f_type_static);
init_feature(f_cvb_scalar_variables, "require scalar variables", f_type_static);
f_req_children(f_cvb_scalar_variables, f_cv_scalar);
init_feature(f_cvb_calc_pmf, "calculate a PMF", f_type_static);
init_feature(f_cvb_calc_ti_samples, "calculate TI samples", f_type_dynamic);
f_req_self(f_cvb_calc_ti_samples, f_cvb_get_total_force);
f_req_children(f_cvb_calc_ti_samples, f_cv_grid);
init_feature(f_cvb_write_ti_samples, "write TI samples ", f_type_user);
f_req_self(f_cvb_write_ti_samples, f_cvb_calc_ti_samples);
init_feature(f_cvb_write_ti_pmf, "write TI PMF", f_type_user);
f_req_self(f_cvb_write_ti_pmf, f_cvb_calc_ti_samples);
}
// Initialize feature_states for each instance
@ -431,6 +443,9 @@ void colvardeps::init_cvb_requires() {
// Most features are available, so we set them so
// and list exceptions below
}
// only compute TI samples when deriving from colvarbias_ti
feature_states[f_cvb_calc_ti_samples].available = false;
}
@ -504,9 +519,6 @@ void colvardeps::init_cv_requires() {
init_feature(f_cv_subtract_applied_force, "subtract applied force from total force", f_type_user);
f_req_self(f_cv_subtract_applied_force, f_cv_total_force);
// There is no well-defined way to implement f_cv_subtract_applied_force
// in the case of extended-Lagrangian colvars
f_req_exclude(f_cv_subtract_applied_force, f_cv_extended_Lagrangian);
init_feature(f_cv_lower_boundary, "lower boundary", f_type_user);
f_req_self(f_cv_lower_boundary, f_cv_scalar);
@ -514,7 +526,7 @@ void colvardeps::init_cv_requires() {
init_feature(f_cv_upper_boundary, "upper boundary", f_type_user);
f_req_self(f_cv_upper_boundary, f_cv_scalar);
init_feature(f_cv_grid, "grid", f_type_user);
init_feature(f_cv_grid, "grid", f_type_dynamic);
f_req_self(f_cv_grid, f_cv_lower_boundary);
f_req_self(f_cv_grid, f_cv_upper_boundary);
@ -693,7 +705,6 @@ void colvardeps::print_state() {
}
void colvardeps::add_child(colvardeps *child) {
children.push_back(child);

View File

@ -180,8 +180,6 @@ public:
protected:
/// Parse a keyword and enable a feature accordingly
bool get_keyval_feature(colvarparse *cvp,
std::string const &conf, char const *key,
@ -229,10 +227,18 @@ public:
f_cvb_get_total_force,
/// \brief depends on simulation history
f_cvb_history_dependent,
/// \brief depends on time
f_cvb_time_dependent,
/// \brief requires scalar colvars
f_cvb_scalar_variables,
/// \brief whether this bias will compute a PMF
f_cvb_calc_pmf,
/// \brief whether this bias will compute TI samples
f_cvb_calc_ti_samples,
/// \brief whether this bias will write TI samples
f_cvb_write_ti_samples,
/// \brief whether this bias should write the TI PMF
f_cvb_write_ti_pmf,
f_cvb_ntot
};

View File

@ -1403,6 +1403,15 @@ public:
/// Constructor from a vector of colvars
colvar_grid_gradient(std::vector<colvar *> &colvars);
/// \brief Accumulate the value
inline void acc_value(std::vector<int> const &ix, std::vector<colvarvalue> const &values) {
for (size_t imult = 0; imult < mult; imult++) {
data[address(ix) + imult] += values[imult].real_value;
}
if (samples)
samples->incr_count(ix);
}
/// \brief Accumulate the gradient
inline void acc_grad(std::vector<int> const &ix, cvm::real const *grads) {
for (size_t imult = 0; imult < mult; imult++) {

View File

@ -22,7 +22,7 @@
#include "colvarbias_restraint.h"
#include "colvarscript.h"
#include "colvaratoms.h"
#include "colvarcomp.h"
colvarmodule::colvarmodule(colvarproxy *proxy_in)
{
@ -274,9 +274,9 @@ int colvarmodule::parse_global_params(std::string const &conf)
parse->get_keyval(conf, "colvarsRestartFrequency",
restart_out_freq, restart_out_freq);
// if this is true when initializing, it means
// we are continuing after a reset(): default to true
parse->get_keyval(conf, "colvarsTrajAppend", cv_traj_append, cv_traj_append);
// Deprecate append flag
parse->get_keyval(conf, "colvarsTrajAppend",
cv_traj_append, cv_traj_append, colvarparse::parse_silent);
parse->get_keyval(conf, "scriptedColvarForces", use_scripted_forces, false);
@ -409,22 +409,12 @@ int colvarmodule::parse_biases(std::string const &conf)
cvm::decrease_depth();
}
size_t i;
size_t n_hist_dep_biases = 0;
std::vector<std::string> hist_dep_biases_names;
for (i = 0; i < biases.size(); i++) {
if (biases[i]->is_enabled(colvardeps::f_cvb_apply_force) &&
biases[i]->is_enabled(colvardeps::f_cvb_history_dependent)) {
n_hist_dep_biases++;
hist_dep_biases_names.push_back(biases[i]->name);
}
}
if (n_hist_dep_biases > 1) {
cvm::log("WARNING: there are "+cvm::to_str(n_hist_dep_biases)+
" history-dependent biases with non-zero force parameters:\n"+
cvm::to_str(hist_dep_biases_names)+"\n"+
"Please make sure that their forces do not counteract each other.\n");
std::vector<std::string> const time_biases = time_dependent_biases();
if (time_biases.size() > 1) {
cvm::log("WARNING: there are "+cvm::to_str(time_biases.size())+
" time-dependent biases with non-zero force parameters:\n"+
cvm::to_str(time_biases)+"\n"+
"Please ensure that their forces do not counteract each other.\n");
}
if (biases.size() || use_scripted_forces) {
@ -441,7 +431,7 @@ int colvarmodule::parse_biases(std::string const &conf)
}
int colvarmodule::num_biases_feature(int feature_id)
int colvarmodule::num_biases_feature(int feature_id) const
{
colvarmodule *cv = cvm::main();
size_t n = 0;
@ -456,7 +446,7 @@ int colvarmodule::num_biases_feature(int feature_id)
}
int colvarmodule::num_biases_type(std::string const &type)
int colvarmodule::num_biases_type(std::string const &type) const
{
colvarmodule *cv = cvm::main();
size_t n = 0;
@ -471,6 +461,22 @@ int colvarmodule::num_biases_type(std::string const &type)
}
std::vector<std::string> const colvarmodule::time_dependent_biases() const
{
size_t i;
std::vector<std::string> biases_names;
for (i = 0; i < biases.size(); i++) {
if (biases[i]->is_enabled(colvardeps::f_cvb_apply_force) &&
biases[i]->is_enabled(colvardeps::f_cvb_active) &&
(biases[i]->is_enabled(colvardeps::f_cvb_history_dependent) ||
biases[i]->is_enabled(colvardeps::f_cvb_time_dependent))) {
biases_names.push_back(biases[i]->name);
}
}
return biases_names;
}
int colvarmodule::catch_input_errors(int result)
{
if (result != COLVARS_OK || get_error()) {
@ -673,8 +679,15 @@ int colvarmodule::calc()
}
// write restart files, if needed
if (restart_out_freq && restart_out_name.size()) {
error_code |= write_restart_files();
if (restart_out_freq && (cvm::step_relative() > 0) &&
((cvm::step_absolute() % restart_out_freq) == 0) ) {
if (restart_out_name.size()) {
// Write restart file, if different from main output
error_code |= write_restart_file(restart_out_name);
} else {
error_code |= write_restart_file(output_prefix()+".colvars.state");
}
write_output_files();
}
return error_code;
@ -916,21 +929,16 @@ int colvarmodule::calc_scripted_forces()
}
int colvarmodule::write_restart_files()
int colvarmodule::write_restart_file(std::string const &out_name)
{
if ( (cvm::step_relative() > 0) &&
((cvm::step_absolute() % restart_out_freq) == 0) ) {
cvm::log("Writing the state file \""+
restart_out_name+"\".\n");
proxy->backup_file(restart_out_name);
std::ostream *restart_out_os = proxy->output_stream(restart_out_name);
if (!restart_out_os) return cvm::get_error();
if (!write_restart(*restart_out_os)) {
return cvm::error("Error: in writing restart file.\n", FILE_ERROR);
}
proxy->close_output_stream(restart_out_name);
cvm::log("Saving collective variables state to \""+out_name+"\".\n");
proxy->backup_file(out_name);
std::ostream *restart_out_os = proxy->output_stream(out_name);
if (!restart_out_os) return cvm::get_error();
if (!write_restart(*restart_out_os)) {
return cvm::error("Error: in writing restart file.\n", FILE_ERROR);
}
proxy->close_output_stream(out_name);
return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK);
}
@ -1011,7 +1019,15 @@ colvarmodule::~colvarmodule()
{
if ((proxy->smp_thread_id() == COLVARS_NOT_IMPLEMENTED) ||
(proxy->smp_thread_id() == 0)) {
reset();
// Delete contents of static arrays
colvarbias::delete_features();
colvar::delete_features();
colvar::cvc::delete_features();
atom_group::delete_features();
delete parse;
parse = NULL;
proxy = NULL;
@ -1261,7 +1277,7 @@ continue the previous simulation.\n\n");
to:\n\
\""+ proxy->input_prefix()+".colvars.state\"\n");
output_prefix() = output_prefix()+".tmp";
write_output_files();
write_restart_file(output_prefix()+".colvars.state");
cvm::error("Exiting with error until issue is addressed.\n", FATAL_ERROR);
}
@ -1277,24 +1293,13 @@ int colvarmodule::backup_file(char const *filename)
int colvarmodule::write_output_files()
{
// if this is a simulation run (i.e. not a postprocessing), output data
// must be written to be able to restart the simulation
std::string const out_name =
(output_prefix().size() ?
std::string(output_prefix()+".colvars.state") :
std::string("colvars.state"));
cvm::log("Saving collective variables state to \""+out_name+"\".\n");
std::ostream * os = proxy->output_stream(out_name);
os->setf(std::ios::scientific, std::ios::floatfield);
this->write_restart(*os);
proxy->close_output_stream(out_name);
int error_code = COLVARS_OK;
cvm::increase_depth();
for (std::vector<colvar *>::iterator cvi = colvars.begin();
cvi != colvars.end();
cvi++) {
(*cvi)->write_output_files();
error_code |= (*cvi)->write_output_files();
}
cvm::decrease_depth();
@ -1302,8 +1307,8 @@ int colvarmodule::write_output_files()
for (std::vector<colvarbias *>::iterator bi = biases.begin();
bi != biases.end();
bi++) {
(*bi)->write_output_files();
(*bi)->write_state_to_replicas();
error_code |= (*bi)->write_output_files();
error_code |= (*bi)->write_state_to_replicas();
}
cvm::decrease_depth();
@ -1403,15 +1408,12 @@ std::ostream & colvarmodule::write_restart(std::ostream &os)
cvi != colvars.end();
cvi++) {
(*cvi)->write_restart(os);
error_code |= (*cvi)->write_output_files();
}
for (std::vector<colvarbias *>::iterator bi = biases.begin();
bi != biases.end();
bi++) {
(*bi)->write_state(os);
error_code |= (*bi)->write_state_to_replicas();
error_code |= (*bi)->write_output_files();
}
cvm::decrease_depth();

View File

@ -83,6 +83,15 @@ public:
/// Defining an abstract real number allows to switch precision
typedef double real;
/// Override std::pow with a product for n positive integer
static inline real integer_power(real x, int n)
{
real result = 1.0;
for (int i = 0; i < n; i++) result *= x;
return result;
}
/// Residue identifier
typedef int residue_id;
@ -293,10 +302,13 @@ private:
public:
/// Return how many biases have this feature enabled
static int num_biases_feature(int feature_id);
int num_biases_feature(int feature_id) const;
/// Return how many biases are defined with this type
static int num_biases_type(std::string const &type);
int num_biases_type(std::string const &type) const;
/// Return the names of time-dependent biases with forces enabled
std::vector<std::string> const time_dependent_biases() const;
private:
/// Useful wrapper to interrupt parsing if any error occurs
@ -334,9 +346,9 @@ public:
/// Write all trajectory files
int write_traj_files();
/// Write all restart files
int write_restart_files();
/// Write all FINAL output files
/// Write a state file useful to resume the simulation
int write_restart_file(std::string const &out_name);
/// Write all other output files
int write_output_files();
/// Backup a file before writing it
static int backup_file(char const *filename);
@ -580,7 +592,7 @@ public:
/// from static functions in the colvarmodule class
static colvarproxy *proxy;
/// \brief Accessor for the above
/// \brief Access the one instance of the Colvars module
static colvarmodule *main();
};

View File

@ -10,6 +10,10 @@
#include <sstream>
#include <string.h>
#if defined(_OPENMP)
#include <omp.h>
#endif
#include "colvarmodule.h"
#include "colvarproxy.h"
#include "colvarscript.h"
@ -40,6 +44,12 @@ bool colvarproxy_system::total_forces_enabled() const
}
bool colvarproxy_system::total_forces_same_step() const
{
return false;
}
cvm::real colvarproxy_system::position_dist2(cvm::atom_pos const &pos1,
cvm::atom_pos const &pos2)
{
@ -204,7 +214,13 @@ void colvarproxy_atom_groups::clear_atom_group(int index)
colvarproxy_smp::colvarproxy_smp()
{
b_smp_active = true;
b_smp_active = true; // May be disabled by user option
omp_lock_state = NULL;
#if defined(_OPENMP)
if (smp_thread_id() == 0) {
omp_init_lock(reinterpret_cast<omp_lock_t *>(omp_lock_state));
}
#endif
}
@ -213,60 +229,143 @@ colvarproxy_smp::~colvarproxy_smp() {}
int colvarproxy_smp::smp_enabled()
{
#if defined(_OPENMP)
if (b_smp_active) {
return COLVARS_OK;
}
return COLVARS_ERROR;
#else
return COLVARS_NOT_IMPLEMENTED;
#endif
}
int colvarproxy_smp::smp_colvars_loop()
{
#if defined(_OPENMP)
colvarmodule *cv = cvm::main();
colvarproxy *proxy = cv->proxy;
#pragma omp parallel for
for (size_t i = 0; i < cv->variables_active_smp()->size(); i++) {
colvar *x = (*(cv->variables_active_smp()))[i];
int x_item = (*(cv->variables_active_smp_items()))[i];
if (cvm::debug()) {
cvm::log("["+cvm::to_str(proxy->smp_thread_id())+"/"+
cvm::to_str(proxy->smp_num_threads())+
"]: calc_colvars_items_smp(), i = "+cvm::to_str(i)+", cv = "+
x->name+", cvc = "+cvm::to_str(x_item)+"\n");
}
x->calc_cvcs(x_item, 1);
}
return cvm::get_error();
#else
return COLVARS_NOT_IMPLEMENTED;
#endif
}
int colvarproxy_smp::smp_biases_loop()
{
#if defined(_OPENMP)
colvarmodule *cv = cvm::main();
#pragma omp parallel
{
#pragma omp for
for (size_t i = 0; i < cv->biases_active()->size(); i++) {
colvarbias *b = (*(cv->biases_active()))[i];
if (cvm::debug()) {
cvm::log("Calculating bias \""+b->name+"\" on thread "+
cvm::to_str(smp_thread_id())+"\n");
}
b->update();
}
}
return cvm::get_error();
#else
return COLVARS_NOT_IMPLEMENTED;
#endif
}
int colvarproxy_smp::smp_biases_script_loop()
{
#if defined(_OPENMP)
colvarmodule *cv = cvm::main();
#pragma omp parallel
{
#pragma omp single nowait
{
cv->calc_scripted_forces();
}
#pragma omp for
for (size_t i = 0; i < cv->biases_active()->size(); i++) {
colvarbias *b = (*(cv->biases_active()))[i];
if (cvm::debug()) {
cvm::log("Calculating bias \""+b->name+"\" on thread "+
cvm::to_str(smp_thread_id())+"\n");
}
b->update();
}
}
return cvm::get_error();
#else
return COLVARS_NOT_IMPLEMENTED;
#endif
}
int colvarproxy_smp::smp_thread_id()
{
#if defined(_OPENMP)
return omp_get_thread_num();
#else
return COLVARS_NOT_IMPLEMENTED;
#endif
}
int colvarproxy_smp::smp_num_threads()
{
#if defined(_OPENMP)
return omp_get_max_threads();
#else
return COLVARS_NOT_IMPLEMENTED;
#endif
}
int colvarproxy_smp::smp_lock()
{
#if defined(_OPENMP)
omp_set_lock(reinterpret_cast<omp_lock_t *>(omp_lock_state));
#endif
return COLVARS_OK;
}
int colvarproxy_smp::smp_trylock()
{
#if defined(_OPENMP)
return omp_test_lock(reinterpret_cast<omp_lock_t *>(omp_lock_state)) ?
COLVARS_OK : COLVARS_ERROR;
#else
return COLVARS_OK;
#endif
}
int colvarproxy_smp::smp_unlock()
{
#if defined(_OPENMP)
omp_unset_lock(reinterpret_cast<omp_lock_t *>(omp_lock_state));
#endif
return COLVARS_OK;
}
colvarproxy_replicas::colvarproxy_replicas() {}

View File

@ -80,6 +80,9 @@ public:
/// Are total forces being used?
virtual bool total_forces_enabled() const;
/// Are total forces from the current step available?
virtual bool total_forces_same_step() const;
};
@ -372,6 +375,11 @@ public:
/// Release the lock
virtual int smp_unlock();
protected:
/// Lock state for OpenMP
void *omp_lock_state;
};

View File

@ -1,5 +1,5 @@
#ifndef COLVARS_VERSION
#define COLVARS_VERSION "2017-08-06"
#define COLVARS_VERSION "2017-10-20"
// This file is part of the Collective Variables module (Colvars).
// The original version of Colvars and its updates are located at:
// https://github.com/colvars/colvars

View File

@ -11,7 +11,10 @@
#include <stdlib.h>
#include <string.h>
#define COLVARSCRIPT_CPP
#include "colvarscript.h"
#undef COLVARSCRIPT_CPP
#include "colvarproxy.h"
#include "colvardeps.h"
@ -21,6 +24,11 @@ colvarscript::colvarscript(colvarproxy *p)
colvars(p->colvars),
proxy_error(0)
{
comm_help.resize(colvarscript::cv_n_commands);
comm_fns.resize(colvarscript::cv_n_commands);
#define COLVARSCRIPT_INIT_FN
#include "colvarscript.h"
#undef COLVARSCRIPT_INIT_FN
}
@ -66,8 +74,7 @@ int colvarscript::run(int objc, unsigned char *const objv[])
}
if (objc < 2) {
result = help_string();
return COLVARS_OK;
return exec_command(cv_help, NULL, objc, objv);
}
std::string const cmd(obj_to_str(objv[1]));
@ -167,17 +174,7 @@ int colvarscript::run(int objc, unsigned char *const objv[])
/// Parse config from string
if (cmd == "config") {
if (objc < 3) {
result = "Missing arguments\n" + help_string();
return COLVARSCRIPT_ERROR;
}
std::string const conf(obj_to_str(objv[2]));
if (colvars->read_config_string(conf) == COLVARS_OK) {
return COLVARS_OK;
} else {
result = "Error parsing configuration string";
return COLVARSCRIPT_ERROR;
}
return exec_command(cv_config, NULL, objc, objv);
}
/// Load an input state file
@ -204,6 +201,8 @@ int colvarscript::run(int objc, unsigned char *const objv[])
proxy->output_prefix() = obj_to_str(objv[2]);
int error = 0;
error |= colvars->setup_output();
error |= colvars->write_restart_file(colvars->output_prefix()+
".colvars.state");
error |= colvars->write_output_files();
return error ? COLVARSCRIPT_ERROR : COLVARS_OK;
}
@ -255,6 +254,10 @@ int colvarscript::run(int objc, unsigned char *const objv[])
}
}
if (cmd == "help") {
return exec_command(cv_help, NULL, objc, objv);
}
result = "Syntax error\n" + help_string();
return COLVARSCRIPT_ERROR;
}
@ -295,7 +298,9 @@ int colvarscript::proc_colvar(colvar *cv, int objc, unsigned char *const objv[])
// colvar destructor is tasked with the cleanup
delete cv;
// TODO this could be done by the destructors
colvars->write_traj_label(*(colvars->cv_traj_os));
if (colvars->cv_traj_os != NULL) {
colvars->write_traj_label(*(colvars->cv_traj_os));
}
return COLVARS_OK;
}
@ -374,7 +379,6 @@ int colvarscript::proc_colvar(colvar *cv, int objc, unsigned char *const objv[])
int colvarscript::proc_bias(colvarbias *b, int objc, unsigned char *const objv[]) {
std::string const key(obj_to_str(objv[0]));
std::string const subcmd(obj_to_str(objv[2]));
if (subcmd == "energy") {
@ -425,7 +429,9 @@ int colvarscript::proc_bias(colvarbias *b, int objc, unsigned char *const objv[]
// the bias destructor takes care of the cleanup at cvm level
delete b;
// TODO this could be done by the destructors
colvars->write_traj_label(*(colvars->cv_traj_os));
if (colvars->cv_traj_os != NULL) {
colvars->write_traj_label(*(colvars->cv_traj_os));
}
return COLVARS_OK;
}
@ -528,7 +534,7 @@ int colvarscript::proc_features(colvardeps *obj,
}
std::string colvarscript::help_string()
std::string colvarscript::help_string() const
{
std::string buf;
buf = "Usage: cv <subcommand> [args...]\n\
@ -538,7 +544,7 @@ Managing the Colvars module:\n\
config <string> -- read configuration from the given string\n\
reset -- delete all internal configuration\n\
delete -- delete this Colvars module instance\n\
version -- return version of colvars code\n\
version -- return version of Colvars code\n\
\n\
Input and output:\n\
list -- return a list of all variables\n\
@ -564,6 +570,8 @@ Accessing collective variables:\n\
colvar <name> type -- return the type of colvar <name>\n\
colvar <name> delete -- delete colvar <name>\n\
colvar <name> addforce <F> -- apply given force on colvar <name>\n\
colvar <name> getappliedforce -- return applied force of colvar <name>\n\
colvar <name> gettotalforce -- return total force of colvar <name>\n\
colvar <name> getconfig -- return config string of colvar <name>\n\
colvar <name> cvcflags <fl> -- enable or disable cvcs according to 0/1 flags\n\
colvar <name> get <f> -- get the value of the colvar feature <f>\n\

View File

@ -8,21 +8,27 @@
// Colvars repository at GitHub.
#ifndef COLVARSCRIPT_H
#define COLVARSCRIPT_H
//#define COLVARSCRIPT_H // Delay definition until later
#include <string>
#include <vector>
#include <map>
#include "colvarmodule.h"
#include "colvarvalue.h"
#include "colvarbias.h"
#include "colvarproxy.h"
// Only these error values are part of the scripting interface
#define COLVARSCRIPT_ERROR -1
#define COLVARSCRIPT_OK 0
class colvarscript {
private:
colvarproxy *proxy;
colvarmodule *colvars;
@ -35,16 +41,93 @@ public:
colvarscript(colvarproxy * p);
inline ~colvarscript() {}
/// If an error is caught by the proxy through fatal_error(), this is set to COLVARSCRIPT_ERROR
/// If an error is caught by the proxy through fatal_error(), this is set to
/// COLVARSCRIPT_ERROR
int proxy_error;
/// If an error is returned by one of the methods, it should set this to the error message
/// If an error is returned by one of the methods, it should set this to the
/// error message
std::string result;
/// Run script command with given positional arguments (objects)
int run(int objc, unsigned char *const objv[]);
/// Set the return value of the script command to the given string
inline void set_str_result(std::string const &s)
{
result = s;
}
/// Build and return a short help
std::string help_string(void) const;
/// Use scripting language to get the string representation of an object
inline char const *obj_to_str(unsigned char *const obj)
{
return cvm::proxy->script_obj_to_str(obj);
}
enum command {
cv_help,
cv_version,
cv_config,
cv_configfile,
cv_reset,
cv_delete,
cv_list,
cv_list_biases,
cv_load,
cv_save,
cv_update,
cv_addenergy,
cv_getenergy,
cv_printframe,
cv_printframelabels,
cv_frame,
cv_colvar,
cv_colvar_value,
cv_colvar_update,
cv_colvar_type,
cv_colvar_delete,
cv_colvar_addforce,
cv_colvar_getappliedforce,
cv_colvar_gettotalforce,
cv_colvar_cvcflags,
cv_colvar_getconfig,
cv_colvar_get,
cv_colvar_set,
cv_bias,
cv_bias_energy,
cv_bias_update,
cv_bias_delete,
cv_bias_getconfig,
cv_bias_get,
cv_bias_set,
cv_n_commands
};
/// Execute a script command
inline int exec_command(command c,
void *pobj,
int objc, unsigned char * const *objv)
{
return (*(comm_fns[c]))(pobj, objc, objv);
}
/// Get help for a command (TODO reformat for each language?)
inline std::string command_help(colvarscript::command c) const
{
return comm_help[c];
}
/// Clear all object results
inline void clear_results()
{
result.clear();
}
private:
/// Run subcommands on colvar
int proc_colvar(colvar *cv, int argc, unsigned char *const argv[]);
@ -55,17 +138,146 @@ private:
int proc_features(colvardeps *obj,
int argc, unsigned char *const argv[]);
/// Build and return a short help
std::string help_string(void);
/// Internal identifiers of command strings
std::map<std::string, command> comm_str_map;
public:
/// Help strings for each command
std::vector<std::string> comm_help;
inline char const *obj_to_str(unsigned char *const obj)
{
return cvm::proxy->script_obj_to_str(obj);
}
/// Number of arguments for each command
std::vector<size_t> comm_n_args;
/// Arguments for each command
std::vector< std::vector<std::string> > comm_args;
/// Implementations of each command
std::vector<int (*)(void *, int, unsigned char * const *)> comm_fns;
};
/// Get a pointer to the main colvarscript object
inline static colvarscript *colvarscript_obj()
{
return cvm::main()->proxy->script;
}
/// Get a pointer to the colvar object pointed to by pobj
inline static colvar *colvar_obj(void *pobj)
{
return reinterpret_cast<colvar *>(pobj);
}
/// Get a pointer to the colvarbias object pointed to by pobj
inline static colvarbias *colvarbias_obj(void *pobj)
{
return reinterpret_cast<colvarbias *>(pobj);
}
#define CVSCRIPT_COMM_FNAME(COMM) cvscript_ ## COMM
#define CVSCRIPT_COMM_PROTO(COMM) \
int CVSCRIPT_COMM_FNAME(COMM)(void *, int, unsigned char *const *);
#define CVSCRIPT(COMM,HELP,N_ARGS_MIN,N_ARGS_MAX,ARGS,FN_BODY) \
CVSCRIPT_COMM_PROTO(COMM)
#undef COLVARSCRIPT_H
#endif // #ifndef COLVARSCRIPT_H
#ifdef COLVARSCRIPT_CPP
#define CVSCRIPT_COMM_FN(COMM,N_ARGS_MIN,N_ARGS_MAX,ARGS,FN_BODY) \
int CVSCRIPT_COMM_FNAME(COMM)(void *pobj, \
int objc, unsigned char *const objv[]) \
{ \
colvarscript *script = colvarscript_obj(); \
script->clear_results(); \
if (objc < 2+N_ARGS_MIN) /* "cv" and "COMM" are 1st and 2nd */ { \
script->set_str_result("Missing arguments\n" + \
script->command_help(colvarscript::COMM)); \
return COLVARSCRIPT_ERROR; \
} \
if (objc > 2+N_ARGS_MAX) { \
script->set_str_result("Too many arguments\n" + \
script->command_help(colvarscript::COMM)); \
return COLVARSCRIPT_ERROR; \
} \
FN_BODY; \
}
#undef CVSCRIPT
#define CVSCRIPT(COMM,HELP,N_ARGS_MIN,N_ARGS_MAX,ARGS,FN_BODY) \
CVSCRIPT_COMM_FN(COMM,N_ARGS_MIN,N_ARGS_MAX,ARGS,FN_BODY)
#endif // #ifdef COLVARSCRIPT_CPP
#ifdef COLVARSCRIPT_INIT_FN
#define CVSCRIPT_COMM_INIT(COMM,HELP,ARGS) { \
comm_str_map[#COMM] = COMM; \
comm_help[COMM] = HELP; \
comm_fns[COMM] = &(CVSCRIPT_COMM_FNAME(COMM)); \
}
#undef CVSCRIPT
#define CVSCRIPT(COMM,HELP,N_ARGS_MIN,N_ARGS_MAX,ARGS,FN_BODY) \
CVSCRIPT_COMM_INIT(COMM,HELP,ARGS)
#endif
#if !defined(COLVARSCRIPT_H) || defined(COLVARSCRIPT_INIT_FN)
#define COLVARSCRIPT_H
#ifndef COLVARSCRIPT_INIT_FN
#ifdef __cplusplus
extern "C" {
#endif
#endif
// Add optional arguments for command-specific help?
CVSCRIPT(cv_help,
"Print the help message",
0, 0,
{},
script->set_str_result(script->help_string());
return COLVARS_OK;
)
CVSCRIPT(cv_config,
"Read configuration from the given string",
1, 1,
{ "conf (str) - Configuration string" },
std::string const conf(script->obj_to_str(objv[2]));
if (cvm::main()->read_config_string(conf) == COLVARS_OK) {
return COLVARS_OK;
}
script->set_str_result("Error parsing configuration string");
return COLVARSCRIPT_ERROR;
)
CVSCRIPT(cv_addenergy,
"Add an energy to the MD engine",
1, 1,
{ "E (float) - Amount of energy to add" },
cvm::main()->total_bias_energy +=
strtod(script->obj_to_str(objv[2]), NULL);
return COLVARS_OK;
)
CVSCRIPT(cv_getenergy,
"Get the current Colvars energy",
1, 1,
{ "E (float) - Store the energy in this variable" },
double *energy = reinterpret_cast<double *>(objv[2]);
*energy = cvm::main()->total_bias_energy;
return COLVARS_OK;
)
#ifndef COLVARSCRIPT_INIT_FN
#ifdef __cplusplus
} // extern "C"
#endif
#endif
#undef CVSCRIPT
#endif // #ifndef COLVARSCRIPT_H

View File

@ -312,7 +312,7 @@ void colvarmodule::rotation::diagonalize_matrix(cvm::matrix2d<cvm::real> &S,
cvm::real norm2 = 0.0;
size_t i;
for (i = 0; i < 4; i++) {
norm2 += std::pow(S_eigvec[ie][i], int(2));
norm2 += S_eigvec[ie][i] * S_eigvec[ie][i];
}
cvm::real const norm = std::sqrt(norm2);
for (i = 0; i < 4; i++) {

View File

@ -705,7 +705,7 @@ public:
{
std::stringstream stream(s);
size_t i = 0;
while ((stream >> data[i]) && (i < data.size())) {
while ((i < data.size()) && (stream >> data[i])) {
i++;
}
if (i < data.size()) {

View File

@ -0,0 +1,43 @@
#ifndef LEPTON_H_
#define LEPTON_H_
/* -------------------------------------------------------------------------- *
* Lepton *
* -------------------------------------------------------------------------- *
* This is part of the Lepton expression parser originating from *
* Simbios, the NIH National Center for Physics-Based Simulation of *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2009 Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the "Software"), *
* to deal in the Software without restriction, including without limitation *
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
* and/or sell copies of the Software, and to permit persons to whom the *
* Software is furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
* THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
#include "lepton/CompiledExpression.h"
#include "lepton/CustomFunction.h"
#include "lepton/ExpressionProgram.h"
#include "lepton/ExpressionTreeNode.h"
#include "lepton/Operation.h"
#include "lepton/ParsedExpression.h"
#include "lepton/Parser.h"
#endif /*LEPTON_H_*/

View File

@ -0,0 +1,113 @@
#ifndef LEPTON_COMPILED_EXPRESSION_H_
#define LEPTON_COMPILED_EXPRESSION_H_
/* -------------------------------------------------------------------------- *
* Lepton *
* -------------------------------------------------------------------------- *
* This is part of the Lepton expression parser originating from *
* Simbios, the NIH National Center for Physics-Based Simulation of *
* Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. *
* *
* Portions copyright (c) 2013-2016 Stanford University and the Authors. *
* Authors: Peter Eastman *
* Contributors: *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the "Software"), *
* to deal in the Software without restriction, including without limitation *
* the rights to use, copy, modify, merge, publish, distribute, sublicense, *
* and/or sell copies of the Software, and to permit persons to whom the *
* Software is furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *
* THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
* USE OR OTHER DEALINGS IN THE SOFTWARE. *
* -------------------------------------------------------------------------- */
#include "ExpressionTreeNode.h"
#include "windowsIncludes.h"
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>
#ifdef LEPTON_USE_JIT
#include "asmjit.h"
#endif
namespace Lepton {
class Operation;
class ParsedExpression;
/**
* A CompiledExpression is a highly optimized representation of an expression for cases when you want to evaluate
* it many times as quickly as possible. You should treat it as an opaque object; none of the internal representation
* is visible.
*
* A CompiledExpression is created by calling createCompiledExpression() on a ParsedExpression.
*
* WARNING: CompiledExpression is NOT thread safe. You should never access a CompiledExpression from two threads at
* the same time.
*/
class LEPTON_EXPORT CompiledExpression {
public:
CompiledExpression();
CompiledExpression(const CompiledExpression& expression);
~CompiledExpression();
CompiledExpression& operator=(const CompiledExpression& expression);
/**
* Get the names of all variables used by this expression.
*/
const std::set<std::string>& getVariables() const;
/**
* Get a reference to the memory location where the value of a particular variable is stored. This can be used
* to set the value of the variable before calling evaluate().
*/
double& getVariableReference(const std::string& name);
/**
* You can optionally specify the memory locations from which the values of variables should be read.
* This is useful, for example, when several expressions all use the same variable. You can then set
* the value of that variable in one place, and it will be seen by all of them.
*/
void setVariableLocations(std::map<std::string, double*>& variableLocations);
/**
* Evaluate the expression. The values of all variables should have been set before calling this.
*/
double evaluate() const;
private:
friend class ParsedExpression;
CompiledExpression(const ParsedExpression& expression);
void compileExpression(const ExpressionTreeNode& node, std::vector<std::pair<ExpressionTreeNode, int> >& temps);
int findTempIndex(const ExpressionTreeNode& node, std::vector<std::pair<ExpressionTreeNode, int> >& temps);
std::map<std::string, double*> variablePointers;
std::vector<std::pair<double*, double*> > variablesToCopy;
std::vector<std::vector<int> > arguments;
std::vector<int> target;
std::vector<Operation*> operation;
std::map<std::string, int> variableIndices;
std::set<std::string> variableNames;
mutable std::vector<double> workspace;
mutable std::vector<double> argValues;
std::map<std::string, double> dummyVariables;
void* jitCode;
#ifdef LEPTON_USE_JIT
void generateJitCode();
void generateSingleArgCall(asmjit::X86Compiler& c, asmjit::X86XmmVar& dest, asmjit::X86XmmVar& arg, double (*function)(double));
std::vector<double> constants;
asmjit::JitRuntime runtime;
#endif
};
} // namespace Lepton
#endif /*LEPTON_COMPILED_EXPRESSION_H_*/

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