From fa4ef7082975d0fe2005fd071508cb6fd4a725c5 Mon Sep 17 00:00:00 2001 From: iafoss Date: Wed, 25 Mar 2020 20:18:07 -0400 Subject: [PATCH] code issues --- cmake/CMakeLists.txt | 2 +- doc/src/Commands_compute.rst | 11 +- doc/src/Commands_pair.rst | 6 +- doc/src/Packages_details.rst | 302 +++++++++++++---- doc/src/Packages_user.rst | 176 +++++----- doc/src/atom_style.rst | 49 +-- doc/src/compute.rst | 45 +-- doc/src/compute_mesont.rst | 45 +-- doc/src/compute_property_atom.rst | 2 + doc/src/pair_airebo.rst | 272 ---------------- doc/src/pair_mesont_tpm.rst | 34 +- doc/src/pair_style.rst | 13 +- doc/utils/sphinx-config/false_positives.txt | 59 +--- examples/USER/mesont/README | 3 +- examples/USER/mesont/bundle.in | 45 --- examples/USER/mesont/bundle_h.in | 46 --- examples/USER/mesont/bundle_h.init | 96 ------ .../USER/mesont/{bundle.init => data.bundle} | 0 .../USER/mesont/{system.init => data.film} | 0 examples/USER/mesont/in.bundle | 32 ++ examples/USER/mesont/in.film | 32 ++ .../USER/mesont/log.3Mar2020.bundle.g++.1 | 94 ++++++ examples/USER/mesont/log.3Mar2020.film.g++.1 | 85 +++++ examples/USER/mesont/system.in | 45 --- lib/mesont/ExportCNT.f90 | 10 +- lib/mesont/Install.py | 1 + lib/mesont/Makefile.gfortran | 2 +- lib/mesont/Makefile.ifort | 2 +- lib/mesont/Makefile.lammps.ifort | 4 +- src/Makefile | 6 +- src/USER-MESONT/README | 14 +- src/USER-MESONT/atom_vec_mesont.cpp | 144 ++++---- src/USER-MESONT/atom_vec_mesont.h | 10 +- src/USER-MESONT/compute_mesont.cpp | 163 ++++++++++ .../{compute_mesont_Et.h => compute_mesont.h} | 24 +- src/USER-MESONT/compute_mesont_B.cpp | 79 ----- src/USER-MESONT/compute_mesont_B.h | 51 --- src/USER-MESONT/compute_mesont_Eb.cpp | 129 -------- src/USER-MESONT/compute_mesont_Eb.h | 63 ---- src/USER-MESONT/compute_mesont_Eb_tot.cpp | 56 ---- src/USER-MESONT/compute_mesont_Eb_tot.h | 56 ---- src/USER-MESONT/compute_mesont_Es.cpp | 129 -------- src/USER-MESONT/compute_mesont_Es.h | 63 ---- src/USER-MESONT/compute_mesont_Es_tot.cpp | 56 ---- src/USER-MESONT/compute_mesont_Es_tot.h | 56 ---- src/USER-MESONT/compute_mesont_Et.cpp | 129 -------- src/USER-MESONT/compute_mesont_Et_tot.cpp | 56 ---- src/USER-MESONT/compute_mesont_Et_tot.h | 56 ---- src/USER-MESONT/mesont_list.cpp | 182 ----------- src/USER-MESONT/mesont_list.h | 120 ------- src/USER-MESONT/pair_mesont_tpm.cpp | 307 +++++++++++++++++- src/USER-MESONT/pair_mesont_tpm.h | 4 +- src/atom.cpp | 35 +- src/atom.h | 3 +- src/compute_property_atom.cpp | 22 +- src/compute_property_atom.h | 1 + 56 files changed, 1275 insertions(+), 2252 deletions(-) delete mode 100644 doc/src/pair_airebo.rst delete mode 100644 examples/USER/mesont/bundle.in delete mode 100644 examples/USER/mesont/bundle_h.in delete mode 100644 examples/USER/mesont/bundle_h.init rename examples/USER/mesont/{bundle.init => data.bundle} (100%) rename examples/USER/mesont/{system.init => data.film} (100%) create mode 100644 examples/USER/mesont/in.bundle create mode 100644 examples/USER/mesont/in.film create mode 100644 examples/USER/mesont/log.3Mar2020.bundle.g++.1 create mode 100644 examples/USER/mesont/log.3Mar2020.film.g++.1 delete mode 100644 examples/USER/mesont/system.in create mode 100644 lib/mesont/Install.py create mode 100644 src/USER-MESONT/compute_mesont.cpp rename src/USER-MESONT/{compute_mesont_Et.h => compute_mesont.h} (72%) delete mode 100644 src/USER-MESONT/compute_mesont_B.cpp delete mode 100644 src/USER-MESONT/compute_mesont_B.h delete mode 100644 src/USER-MESONT/compute_mesont_Eb.cpp delete mode 100644 src/USER-MESONT/compute_mesont_Eb.h delete mode 100644 src/USER-MESONT/compute_mesont_Eb_tot.cpp delete mode 100644 src/USER-MESONT/compute_mesont_Eb_tot.h delete mode 100644 src/USER-MESONT/compute_mesont_Es.cpp delete mode 100644 src/USER-MESONT/compute_mesont_Es.h delete mode 100644 src/USER-MESONT/compute_mesont_Es_tot.cpp delete mode 100644 src/USER-MESONT/compute_mesont_Es_tot.h delete mode 100644 src/USER-MESONT/compute_mesont_Et.cpp delete mode 100644 src/USER-MESONT/compute_mesont_Et_tot.cpp delete mode 100644 src/USER-MESONT/compute_mesont_Et_tot.h delete mode 100644 src/USER-MESONT/mesont_list.cpp delete mode 100644 src/USER-MESONT/mesont_list.h diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e0cecafcca..4dd079eaae 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -421,7 +421,7 @@ endforeach() ############################################## # add lib sources of (simple) enabled packages ############################################ -foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD USER-MESONT) +foreach(SIMPLE_LIB POEMS USER-ATC USER-AWPMD USER-H5MD) if(PKG_${SIMPLE_LIB}) string(REGEX REPLACE "^USER-" "" PKG_LIB "${SIMPLE_LIB}") string(TOLOWER "${PKG_LIB}" PKG_LIB) diff --git a/doc/src/Commands_compute.rst b/doc/src/Commands_compute.rst index 736aaf4fa3..a17bbe08ba 100644 --- a/doc/src/Commands_compute.rst +++ b/doc/src/Commands_compute.rst @@ -20,7 +20,7 @@ additional letters in parenthesis: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. .. table_from_list:: - :columns: 6 + :columns: 5 * :doc:`ackland/atom ` * :doc:`adf ` @@ -79,16 +79,10 @@ KOKKOS, o = USER-OMP, t = OPT. * :doc:`ke/atom/eff ` * :doc:`ke/eff ` * :doc:`ke/rigid ` - * :doc:`mesont/Es ` - * :doc:`mesont/Eb ` - * :doc:`mesont/Et ` - * :doc:`mesont/B ` - * :doc:`mesont/Es_tot ` - * :doc:`mesont/Eb_tot ` - * :doc:`mesont/Et_tot ` * :doc:`meso/e/atom ` * :doc:`meso/rho/atom ` * :doc:`meso/t/atom ` + * :doc:`mesont ` * :doc:`momentum ` * :doc:`msd ` * :doc:`msd/chunk ` @@ -170,4 +164,3 @@ KOKKOS, o = USER-OMP, t = OPT. * :doc:`vcm/chunk ` * :doc:`voronoi/atom ` * :doc:`xrd ` - diff --git a/doc/src/Commands_pair.rst b/doc/src/Commands_pair.rst index eb34dd2053..4effe71f42 100644 --- a/doc/src/Commands_pair.rst +++ b/doc/src/Commands_pair.rst @@ -26,6 +26,10 @@ OPT. * :doc:`zero ` * :doc:`hybrid (k) ` * :doc:`hybrid/overlay (k) ` + * :doc:`kim ` + * :doc:`list ` + * + * * * * @@ -110,14 +114,12 @@ OPT. * :doc:`hbond/dreiding/lj (o) ` * :doc:`hbond/dreiding/morse (o) ` * :doc:`ilp/graphene/hbn ` - * :doc:`kim ` * :doc:`kolmogorov/crespi/full ` * :doc:`kolmogorov/crespi/z ` * :doc:`lcbop ` * :doc:`lebedeva/z ` * :doc:`lennard/mdf ` * :doc:`line/lj ` - * :doc:`list ` * :doc:`lj/charmm/coul/charmm (iko) ` * :doc:`lj/charmm/coul/charmm/implicit (ko) ` * :doc:`lj/charmm/coul/long (gikot) ` diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index 61df2250bf..784deb3186 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -10,7 +10,7 @@ scripts, and pictures/movies (if available) that illustrate use of the package. The majority of packages can be included in a LAMMPS build with a -single setting (-D PGK_NAME for CMake) or command ("make yes-name" for +single setting (-D PGK\_NAME for CMake) or command ("make yes-name" for make). See the :doc:`Build package ` doc page for more info. A few packages may require additional steps; this is indicated in the descriptions below. The :doc:`Build extras ` doc @@ -60,6 +60,7 @@ page gives those details. * :ref:`SRD ` * :ref:`VORONOI ` + .. table_from_list:: :columns: 6 @@ -80,7 +81,7 @@ page gives those details. * :ref:`USER-LB ` * :ref:`USER-MANIFOLD ` * :ref:`USER-MEAMC ` - * :ref:`USER-MESODPD ` + * :ref:`USER-MESO ` * :ref:`USER-MESONT ` * :ref:`USER-MGPT ` * :ref:`USER-MISC ` @@ -106,8 +107,10 @@ page gives those details. * :ref:`USER-VTK ` * :ref:`USER-YAFF ` + ---------- + .. _PKG-ASPHERE: ASPHERE package @@ -124,15 +127,17 @@ particle models including ellipsoids, 2d lines, and 3d triangles. * :doc:`Howto spherical ` * :doc:`pair_style gayberne ` * :doc:`pair_style resquared ` -* `doc/PDF/pair_gayberne_extra.pdf `_ -* `doc/PDF/pair_resquared_extra.pdf `_ +* `doc/PDF/pair\_gayberne\_extra.pdf `_ +* `doc/PDF/pair\_resquared\_extra.pdf `_ * examples/ASPHERE * examples/ellipse -* https://lammps.sandia.gov/movies.html#line -* https://lammps.sandia.gov/movies.html#tri +* http://lammps.sandia.gov/movies.html#line +* http://lammps.sandia.gov/movies.html#tri + ---------- + .. _PKG-BODY: BODY package @@ -148,14 +153,16 @@ overview. **Supporting info:** * src/BODY filenames -> commands -* :doc:`Howto_body ` +* :doc:`Howto\_body ` * :doc:`atom_style body ` * :doc:`fix nve/body ` * :doc:`pair_style body/nparticle ` * examples/body + ---------- + .. _PKG-CLASS2: CLASS2 package @@ -175,8 +182,10 @@ CLASS2 molecular force field. * :doc:`improper_style class2 ` * :doc:`pair_style lj/class2 ` + ---------- + .. _PKG-COLLOID: COLLOID package @@ -205,8 +214,10 @@ Higdon's group at UIUC. * examples/colloid * examples/srd + ---------- + .. _PKG-COMPRESS: COMPRESS package @@ -236,8 +247,10 @@ This package has :ref:`specific installation instructions ` on the :do * :doc:`dump custom/gz ` * :doc:`dump xyz/gz ` + ---------- + .. _PKG-CORESHELL: CORESHELL package @@ -264,8 +277,10 @@ this package. * :doc:`pair_style lj/cut/coul/long/cs ` * examples/coreshell + ---------- + .. _PKG-DIPOLE: DIPOLE package @@ -285,8 +300,10 @@ short-range or long-range interactions. * :doc:`pair_style lj/long/dipole/long ` * examples/dipole + ---------- + .. _PKG-GPU: GPU package @@ -323,10 +340,12 @@ This package has :ref:`specific installation instructions ` on the :doc:`Bu * :doc:`package gpu ` * :doc:`Commands ` pages (:doc:`pair `, :doc:`kspace `) for styles followed by (g) -* `Benchmarks page `_ of web site +* `Benchmarks page `_ of web site + ---------- + .. _PKG-GRANULAR: GRANULAR package @@ -349,14 +368,16 @@ potentials. * examples/granregion * examples/pour * bench/in.chute -* https://lammps.sandia.gov/pictures.html#jamming -* https://lammps.sandia.gov/movies.html#hopper -* https://lammps.sandia.gov/movies.html#dem -* https://lammps.sandia.gov/movies.html#brazil -* https://lammps.sandia.gov/movies.html#granregion +* http://lammps.sandia.gov/pictures.html#jamming +* http://lammps.sandia.gov/movies.html#hopper +* http://lammps.sandia.gov/movies.html#dem +* http://lammps.sandia.gov/movies.html#brazil +* http://lammps.sandia.gov/movies.html#granregion + ---------- + .. _PKG-KIM: KIM package @@ -368,7 +389,7 @@ This package contains a set of commands that serve as a wrapper on the `Open Knowledgebase of Interatomic Models (OpenKIM) `_ repository of interatomic models (IMs) enabling compatible ones to be used in LAMMPS simulations. -This includes :doc:`kim_init and kim_interactions ` +This includes :doc:`kim_init and kim\_interactions ` commands to select, initialize and instantiate the IM, and a :doc:`kim_query ` command to perform web queries for material property predictions of OpenKIM IMs. @@ -378,7 +399,7 @@ is provided by the :doc:`pair_style kim ` command. .. note:: - The command *pair_style kim* is called by *kim_interactions* and + The command *pair\_style kim* is called by *kim\_interactions* and is not recommended to be directly used in input scripts. To use this package you must have the KIM API library available on your @@ -393,7 +414,7 @@ The KIM project is led by Ellad Tadmor and Ryan Elliott (U Minnesota) and is funded by the `National Science Foundation `_. **Authors:** Ryan Elliott (U Minnesota) is the main developer for the KIM -API and the *pair_style kim* command. Axel Kohlmeyer (Temple U) and +API and the *pair\_style kim* command. Axel Kohlmeyer (Temple U) and Ellad Tadmor (U Minnesota) contributed to the :doc:`kim_commands ` interface in close collaboration with Ryan Elliott. @@ -410,8 +431,10 @@ This package has :ref:`specific installation instructions ` on the :doc:`Bu * lib/kim/README * examples/kim + ---------- + .. _PKG-KOKKOS: KOKKOS package @@ -462,10 +485,12 @@ This package has :ref:`specific installation instructions ` on the :doc: * Search the :doc:`commands ` pages (:doc:`fix `, :doc:`compute `, :doc:`pair `, :doc:`bond, angle, dihedral, improper `, :doc:`kspace `) for styles followed by (k) -* `Benchmarks page `_ of web site +* `Benchmarks page `_ of web site + ---------- + .. _PKG-KSPACE: KSPACE package @@ -499,8 +524,10 @@ different FFT options for your LAMPMS build. * examples/peptide * bench/in.rhodo + ---------- + .. _PKG-LATTE: LATTE package @@ -518,6 +545,8 @@ description is given with the :doc:`fix latte ` command. .. _latte-home: https://github.com/lanl/LATTE + + **Authors:** Christian Negre (LANL) and Steve Plimpton (Sandia). LATTE itself is developed at Los Alamos National Laboratory by Marc Cawkwell, Anders Niklasson, and Christian Negre. @@ -535,8 +564,10 @@ This package has :ref:`specific installation instructions ` on the :doc:` * examples/latte * `LAMMPS-LATTE tutorial `_ + ---------- + .. _PKG-MANYBODY: MANYBODY package @@ -559,8 +590,10 @@ A variety of many-body and bond-order potentials. These include * examples/vashishta * bench/in.eam + ---------- + .. _PKG-MC: MC package @@ -582,10 +615,12 @@ bonds, for performing atomic swaps, and performing grand-canonical MC * :doc:`fix bond/swap ` * :doc:`fix gcmc ` * :doc:`pair_style dsmc ` -* https://lammps.sandia.gov/movies.html#gcmc +* http://lammps.sandia.gov/movies.html#gcmc + ---------- + .. _PKG-MESSAGE: MESSAGE package @@ -610,8 +645,10 @@ This package has :ref:`specific installation instructions ` on the :doc * :doc:`server mc ` * examples/message + ---------- + .. _PKG-MISC: MISC package @@ -639,11 +676,13 @@ listing, "ls src/MISC", to see the list of commands. * :doc:`fix viscosity ` * examples/KAPPA * examples/VISCOSITY -* https://lammps.sandia.gov/pictures.html#ttm -* https://lammps.sandia.gov/movies.html#evaporation +* http://lammps.sandia.gov/pictures.html#ttm +* http://lammps.sandia.gov/movies.html#evaporation + ---------- + .. _PKG-MOLECULE: MOLECULE package @@ -674,8 +713,10 @@ force fields, and a TIP4P water model. * bench/in.chain * bench/in.rhodo + ---------- + .. _PKG-MPIIO: MPIIO package @@ -696,8 +737,10 @@ written and read in parallel. * :doc:`write_restart ` * :doc:`read_restart ` + ---------- + .. _PKG-mscg: MSCG package @@ -710,6 +753,8 @@ Multi-Scale Coarse-Graining (MSCG) model using the open-source `MS-CG library ` on the :doc:`B * lib/mscg/README * examples/mscg + ---------- + .. _PKG-OPT: OPT package @@ -747,7 +794,7 @@ invoked at run time via the "-sf opt" or "-suffix opt" :doc:`command-line switch have styles optimized for CPU performance. **Authors:** James Fischer (High Performance Technologies), David Richie, -and Vincent Natoli (Stone Ridge Technology). +and Vincent Natoli (Stone Ridge Technolgy). **Install:** @@ -760,10 +807,12 @@ This package has :ref:`specific installation instructions ` on the :doc:`Bu * :doc:`Speed opt ` * :doc:`Section 2.6 -sf opt ` * Search the :doc:`pair style ` page for styles followed by (t) -* `Benchmarks page `_ of web site +* `Benchmarks page `_ of web site + ---------- + .. _PKG-PERI: PERI package @@ -783,18 +832,20 @@ Foster (UTSA). **Supporting info:** * src/PERI: filenames -> commands -* `doc/PDF/PDLammps_overview.pdf `_ -* `doc/PDF/PDLammps_EPS.pdf `_ -* `doc/PDF/PDLammps_VES.pdf `_ +* `doc/PDF/PDLammps\_overview.pdf `_ +* `doc/PDF/PDLammps\_EPS.pdf `_ +* `doc/PDF/PDLammps\_VES.pdf `_ * :doc:`atom_style peri ` * :doc:`pair_style peri/\* ` * :doc:`compute damage/atom ` * :doc:`compute plasticity/atom ` * examples/peri -* https://lammps.sandia.gov/movies.html#peri +* http://lammps.sandia.gov/movies.html#peri + ---------- + .. _PKG-POEMS: POEMS package @@ -822,8 +873,10 @@ This package has :ref:`specific installation instructions ` on the :doc:` * :doc:`fix poems ` * examples/rigid + ---------- + .. _PKG-PYTHON: PYTHON package @@ -855,8 +908,10 @@ This package has :ref:`specific installation instructions ` on the :doc: * lib/python/README * examples/python + ---------- + .. _PKG-QEQ: QEQ package @@ -875,8 +930,10 @@ part of their formulation. * examples/qeq * examples/streitz + ---------- + .. _PKG-REPLICA: REPLICA package @@ -906,8 +963,10 @@ another set. * examples/prd * examples/tad + ---------- + .. _PKG-RIGID: RIGID package @@ -930,11 +989,13 @@ Also several computes which calculate properties of rigid bodies. * examples/ASPHERE * examples/rigid * bench/in.rhodo -* https://lammps.sandia.gov/movies.html#box -* https://lammps.sandia.gov/movies.html#star +* http://lammps.sandia.gov/movies.html#box +* http://lammps.sandia.gov/movies.html#star + ---------- + .. _PKG-SHOCK: SHOCK package @@ -955,8 +1016,10 @@ a material. * examples/hugoniostat * examples/msst + ---------- + .. _PKG-SNAP: SNAP package @@ -980,8 +1043,10 @@ computes which analyze attributes of the potential. * :doc:`compute snav/atom ` * examples/snap + ---------- + .. _PKG-SPIN: SPIN package @@ -1010,8 +1075,10 @@ the usual manner via MD. Various pair, fix, and compute styles. * :doc:`neb/spin ` * examples/SPIN + ---------- + .. _PKG-SRD: SRD package @@ -1030,12 +1097,14 @@ colloidal particles. * :doc:`fix wall/srd ` * examples/srd * examples/ASPHERE -* https://lammps.sandia.gov/movies.html#tri -* https://lammps.sandia.gov/movies.html#line -* https://lammps.sandia.gov/movies.html#poly +* http://lammps.sandia.gov/movies.html#tri +* http://lammps.sandia.gov/movies.html#line +* http://lammps.sandia.gov/movies.html#poly + ---------- + .. _PKG-VORONOI: VORONOI package @@ -1050,6 +1119,8 @@ neighbors. .. _voro-home: http://math.lbl.gov/voro++ + + To use this package you must have the Voro++ library available on your system. @@ -1069,8 +1140,10 @@ This package has :ref:`specific installation instructions ` on the :doc * :doc:`compute voronoi/atom ` * examples/voronoi + ---------- + .. _PKG-USER-ADIOS: USER-ADIOS package @@ -1099,8 +1172,11 @@ This package has :ref:`specific installation instructions ` on the : * :doc:`dump custom/adios ` * :doc:`read_dump ` + + ---------- + .. _PKG-USER-ATC: USER-ATC package @@ -1124,10 +1200,12 @@ This package has :ref:`specific installation instructions ` on the :do * src/USER-ATC/README * :doc:`fix atc ` * examples/USER/atc -* https://lammps.sandia.gov/pictures.html#atc +* http://lammps.sandia.gov/pictures.html#atc + ---------- + .. _PKG-USER-AWPMD: USER-AWPMD package @@ -1153,8 +1231,10 @@ This package has :ref:`specific installation instructions ` on the : * :doc:`pair_style awpmd/cut ` * examples/USER/awpmd + ---------- + .. _PKG-USER-BOCS: USER-BOCS package @@ -1186,8 +1266,10 @@ J. Phys. Chem. B. 122, 13, 3363-3377 (2018). Example inputs are in the examples/USER/bocs folder. + ---------- + .. _PKG-USER-CGDNA: USER-CGDNA package @@ -1214,8 +1296,10 @@ rigid-body integrators with improved stability. * :doc:`bond_style oxrna2/\* ` * :doc:`fix nve/dotc/langevin ` + ---------- + .. _PKG-USER-CGSDK: USER-CGSDK package @@ -1237,10 +1321,12 @@ acids. * :doc:`pair_style lj/sdk/\* ` * :doc:`angle_style sdk ` * examples/USER/cgsdk -* https://lammps.sandia.gov/pictures.html#cg +* http://lammps.sandia.gov/pictures.html#cg + ---------- + .. _PKG-USER-COLVARS: USER-COLVARS package @@ -1274,8 +1360,10 @@ This package has :ref:`specific installation instructions ` on the * :doc:`fix colvars ` * examples/USER/colvars + ---------- + .. _PKG-USER-PLUMED: USER-PLUMED package @@ -1292,7 +1380,9 @@ script by using the :doc:`fix plumed ` command. Massimilliano Bonomi, Giovanni Bussi, Carlo Camiloni and Gareth Tribello. -.. _PLUMED: https://www.plumed.org +.. _PLUMED: http://www.plumed.org + + **Install:** @@ -1305,8 +1395,10 @@ This package has :ref:`specific installation instructions ` on the * :doc:`fix plumed ` * examples/USER/plumed + ---------- + .. _PKG-USER-DIFFRACTION: USER-DIFFRACTION package @@ -1327,8 +1419,10 @@ intensities based on kinematic diffraction theory. * :doc:`fix saed/vtk ` * examples/USER/diffraction + ---------- + .. _PKG-USER-DPD: USER-DPD package @@ -1368,8 +1462,10 @@ Brennan (ARL). * :doc:`pair_style multi/lucy/rx ` * examples/USER/dpd + ---------- + .. _PKG-USER-DRUDE: USER-DRUDE package @@ -1400,8 +1496,10 @@ Devemy (CNRS), and Agilio Padua (U Blaise Pascal). * examples/USER/drude * tools/drude + ---------- + .. _PKG-USER-EFF: USER-EFF package @@ -1434,10 +1532,12 @@ tools/eff; see its README file. * examples/USER/eff * tools/eff/README * tools/eff -* https://lammps.sandia.gov/movies.html#eff +* http://lammps.sandia.gov/movies.html#eff + ---------- + .. _PKG-USER-FEP: USER-FEP package @@ -1463,8 +1563,10 @@ for using this package in tools/fep; see its README file. * tools/fep/README * tools/fep + ---------- + .. _PKG-USER-H5MD: USER-H5MD package @@ -1480,6 +1582,8 @@ LAMMPS snapshots in this format. .. _HDF5: http://www.hdfgroup.org/HDF5 + + To use this package you must have the HDF5 library available on your system. @@ -1497,8 +1601,10 @@ This package has :ref:`specific installation instructions ` on the :d * lib/h5md/README * :doc:`dump h5md ` + ---------- + .. _PKG-USER-INTEL: USER-INTEL package @@ -1542,10 +1648,12 @@ This package has :ref:`specific installation instructions ` on the : * Search the :doc:`commands ` pages (:doc:`fix `, :doc:`compute `, :doc:`pair `, :doc:`bond, angle, dihedral, improper `, :doc:`kspace `) for styles followed by (i) * src/USER-INTEL/TEST -* `Benchmarks page `_ of web site +* `Benchmarks page `_ of web site + ---------- + .. _PKG-USER-LB: USER-LB package @@ -1568,8 +1676,10 @@ Ontario). * :doc:`fix lb/viscous ` * examples/USER/lb + ---------- + .. _PKG-USER-MGPT: USER-MGPT package @@ -1595,8 +1705,10 @@ matrix-MGPT algorithm due to Tomas Oppelstrup at LLNL. * :doc:`pair_style mgpt ` * examples/USER/mgpt + ---------- + .. _PKG-USER-MISC: USER-MISC package @@ -1618,8 +1730,10 @@ src/USER-MISC/README file. * one doc page per individual command listed in src/USER-MISC/README * examples/USER/misc + ---------- + .. _PKG-USER-MANIFOLD: USER-MANIFOLD package @@ -1647,10 +1761,12 @@ Waltham, MA, USA) * :doc:`fix nve/manifold/rattle ` * :doc:`fix nvt/manifold/rattle ` * examples/USER/manifold -* https://lammps.sandia.gov/movies.html#manifold +* http://lammps.sandia.gov/movies.html#manifold + ---------- + .. _PKG-USER-MEAMC: USER-MEAMC package @@ -1674,12 +1790,14 @@ Sandia. * :doc:`pair_style meam/c ` * examples/meamc + ---------- -.. _PKG-USER-MESODPD: -USER-MESODPD package --------------------- +.. _PKG-USER-MESO: + +USER-MESO package +----------------- **Contents:** @@ -1695,18 +1813,20 @@ algorithm. **Supporting info:** -* src/USER-MESODPD: filenames -> commands -* src/USER-MESODPD/README +* src/USER-MESO: filenames -> commands +* src/USER-MESO/README * :doc:`atom_style edpd ` -* :doc:`pair_style edpd ` -* :doc:`pair_style mdpd ` -* :doc:`pair_style tdpd ` +* :doc:`pair_style edpd ` +* :doc:`pair_style mdpd ` +* :doc:`pair_style tdpd ` * :doc:`fix mvv/dpd ` -* examples/USER/mesodpd -* https://lammps.sandia.gov/movies.html#mesodpd +* examples/USER/meso +* http://lammps.sandia.gov/movies.html#mesodpd + ---------- + .. _PKG-USER-MESONT: USER-MESONT package @@ -1731,18 +1851,14 @@ is provided in the papers listed below. * src/USER-MESONT/README * :doc:`atom_style mesont ` * :doc:`pair_style mesont/tpm ` -* :doc:`mesont/Es ` -* :doc:`mesont/Eb ` -* :doc:`mesont/Et ` -* :doc:`mesont/B ` -* :doc:`mesont/Es_tot ` -* :doc:`mesont/Eb_tot ` -* :doc:`mesont/Et_tot ` +* :doc:`compute mesont ` * examples/USER/mesont * tools/mesont + ---------- + .. _PKG-USER-MOFFF: USER-MOFFF package @@ -1761,6 +1877,8 @@ well as the `MOF+ `_ website. .. _MOFplus: https://www.mofplus.org/content/show/MOF-FF + + **Author:** Hendrik Heenen (Technical U of Munich), Rochus Schmid (Ruhr-University Bochum). @@ -1774,8 +1892,10 @@ Rochus Schmid (Ruhr-University Bochum). * :doc:`improper_style inversion/harmonic ` * examples/USER/mofff + ---------- + .. _PKG-USER-MOLFILE: USER-MOLFILE package @@ -1816,8 +1936,10 @@ This package has :ref:`specific installation instructions ` on the * lib/molfile/README * :doc:`dump molfile ` + ---------- + .. _PKG-USER-NETCDF: USER-NETCDF package @@ -1838,11 +1960,20 @@ tools: * `Ovito `_ (Ovito supports the AMBER convention and the extensions mentioned above) * `VMD `_ +* `AtomEye `_ (the libAtoms version of AtomEye contains a NetCDF reader not present in the standard distribution) .. _ovito: http://www.ovito.org + + .. _vmd-home: https://www.ks.uiuc.edu/Research/vmd/ + + +.. _atomeye: http://www.libatoms.org + + + **Author:** Lars Pastewka (Karlsruhe Institute of Technology). **Install:** @@ -1856,8 +1987,10 @@ This package has :ref:`specific installation instructions ` on the * lib/netcdf/README * :doc:`dump netcdf ` + ---------- + .. _PKG-USER-OMP: USER-OMP package @@ -1908,10 +2041,12 @@ This package has :ref:`specific installation instructions ` on the :do * Search the :doc:`commands ` pages (:doc:`fix `, :doc:`compute `, :doc:`pair `, :doc:`bond, angle, dihedral, improper `, :doc:`kspace `) for styles followed by (o) -* `Benchmarks page `_ of web site +* `Benchmarks page `_ of web site + ---------- + .. _PKG-USER-PHONON: USER-PHONON package @@ -1927,7 +2062,7 @@ And a :doc:`dynamical_matrix ` as well as a and third order tensor from finite differences. **Authors:** Ling-Ti Kong (Shanghai Jiao Tong University) for "fix phonon" -and Charlie Sievers (UC Davis) for "dynamical_matrix" and "third_order" +and Charlie Sievers (UC Davis) for "dynamical\_matrix" and "third\_order" **Supporting info:** @@ -1938,8 +2073,10 @@ and Charlie Sievers (UC Davis) for "dynamical_matrix" and "third_order" * :doc:`third_order ` * examples/USER/phonon + ---------- + .. _PKG-USER-PTM: USER-PTM package @@ -1955,13 +2092,15 @@ Matching methodology. **Supporting info:** -* src/USER-PTM: filenames not starting with ptm\_ -> commands -* src/USER-PTM: filenames starting with ptm\_ -> supporting code +* src/USER-PTM: filenames not starting with ptm\\_ -> commands +* src/USER-PTM: filenames starting with ptm\\_ -> supporting code * src/USER-PTM/LICENSE * :doc:`compute ptm/atom ` + ---------- + .. _PKG-USER-QMMM: USER-QMMM package @@ -1991,6 +2130,7 @@ changes to LAMMPS itself. **Authors:** Axel Kohlmeyer (Temple U). Mariella Ippolito and Carlo Cavazzoni (CINECA, Italy) + **Install:** This package has :ref:`specific installation instructions ` @@ -2005,8 +2145,10 @@ on the :doc:`Build extras ` doc page. * lib/qmmm/example-ec/README * lib/qmmm/example-mc/README + ---------- + .. _PKG-USER-QTB: USER-QTB package @@ -2033,8 +2175,10 @@ simulation. * :doc:`fix qbmsst ` * examples/USER/qtb + ---------- + .. _PKG-USER-QUIP: USER-QUIP package @@ -2048,6 +2192,8 @@ developed by the Cambridge University group. .. _quip: https://github.com/libAtoms/QUIP + + To use this package you must have the QUIP libAtoms library available on your system. @@ -2064,8 +2210,10 @@ This package has :ref:`specific installation instructions ` on the :d * :doc:`pair_style quip ` * examples/USER/quip + ---------- + .. _PKG-USER-REACTION: USER-REACTION package @@ -2095,8 +2243,10 @@ molecules, and chiral-sensitive reactions. * `2019 LAMMPS Workshop `_ * disarmmd.org + ---------- + .. _PKG-USER-REAXC: USER-REAXC package @@ -2120,8 +2270,10 @@ for monitoring molecules as bonds are created and destroyed. * :doc:`fix reax/c/species ` * examples/reax + ---------- + .. _PKG-USER-SCAFACOS: USER-SCAFACOS package @@ -2155,8 +2307,10 @@ This package has :ref:`specific installation instructions ` on th * :doc:`kspace_modify ` * examples/USER/scafacos + ---------- + .. _PKG-USER-SDPD: USER-SDPD package @@ -2169,7 +2323,7 @@ is an extension of smoothed particle hydrodynamics (SPH) to mesoscale where thermal fluctuations are important (see the :ref:`USER-SPH package `). Also two fixes for moving and rigid body integration of SPH/SDPD particles -(particles of atom_style meso). +(particles of atom\_style meso). **Author:** Morteza Jalalvand (Institute for Advanced Studies in Basic Sciences, Iran). @@ -2183,8 +2337,10 @@ Sciences, Iran). * :doc:`fix rigid/meso ` * examples/USER/sdpd + ---------- + .. _PKG-USER-SMD: USER-SMD package @@ -2217,12 +2373,14 @@ This package has :ref:`specific installation instructions ` on the :do * src/USER-SMD: filenames -> commands * src/USER-SMD/README -* doc/PDF/SMD_LAMMPS_userguide.pdf +* doc/PDF/SMD\_LAMMPS\_userguide.pdf * examples/USER/smd -* https://lammps.sandia.gov/movies.html#smd +* http://lammps.sandia.gov/movies.html#smd + ---------- + .. _PKG-USER-SMTBQ: USER-SMTBQ package @@ -2244,8 +2402,10 @@ Tetot (LAAS-CNRS, France). * :doc:`pair_style smtbq ` * examples/USER/smtbq + ---------- + .. _PKG-USER-SPH: USER-SPH package @@ -2274,12 +2434,14 @@ Dynamics, Ernst Mach Institute, Germany). * src/USER-SPH: filenames -> commands * src/USER-SPH/README -* doc/PDF/SPH_LAMMPS_userguide.pdf +* doc/PDF/SPH\_LAMMPS\_userguide.pdf * examples/USER/sph -* https://lammps.sandia.gov/movies.html#sph +* http://lammps.sandia.gov/movies.html#sph + ---------- + .. _PKG-USER-TALLY: USER-TALLY package @@ -2300,8 +2462,10 @@ stress, etc) about individual interactions. * :doc:`compute \*/tally ` * examples/USER/tally + ---------- + .. _PKG-USER-UEF: USER-UEF package @@ -2326,8 +2490,10 @@ supporting compute styles and an output option. * :doc:`dump cfg/uef ` * examples/uef + ---------- + .. _PKG-USER-VTK: USER-VTK package @@ -2341,8 +2507,12 @@ other visualization packages. .. _vtk: http://www.vtk.org + + .. _paraview: http://www.paraview.org + + To use this package you must have VTK library available on your system. @@ -2359,8 +2529,10 @@ This package has :ref:`specific installation instructions ` on the :do * lib/vtk/README * :doc:`dump vtk ` + ---------- + .. _PKG-USER-YAFF: USER-YAFF package @@ -2376,8 +2548,8 @@ The expressions and their use are discussed in the following papers which discuss the `QuickFF `_ methodology. -.. _vanduyfhuys2015: https://doi.org/10.1002/jcc.23877 -.. _vanduyfhuys2018: https://doi.org/10.1002/jcc.25173 +.. _vanduyfhuys2015: http://dx.doi.org/10.1002/jcc.23877 +.. _vanduyfhuys2018: http://dx.doi.org/10.1002/jcc.25173 .. _quickff: http://molmod.github.io/QuickFF .. _yaff: https://github.com/molmod/yaff diff --git a/doc/src/Packages_user.rst b/doc/src/Packages_user.rst index 7a1a67130b..8b938563e8 100644 --- a/doc/src/Packages_user.rst +++ b/doc/src/Packages_user.rst @@ -28,93 +28,93 @@ package: * int = internal library: provided with LAMMPS, but you may need to build it * ext = external library: you will need to download and install it on your machine -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| Package | Description | Doc page | Example | Library | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-ADIOS ` | dump output via ADIOS | :doc:`dump adios ` | USER/adios | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-ATC ` | Atom-to-Continuum coupling | :doc:`fix atc ` | USER/atc | int | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-AWPMD ` | wave packet MD | :doc:`pair_style awpmd/cut ` | USER/awpmd | int | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-BOCS ` | BOCS bottom up coarse graining | :doc:`fix bocs ` | USER/bocs | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-CGDNA ` | coarse-grained DNA force fields | src/USER-CGDNA/README | USER/cgdna | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-CGSDK ` | SDK coarse-graining model | :doc:`pair_style lj/sdk ` | USER/cgsdk | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-COLVARS ` | collective variables library | :doc:`fix colvars ` | USER/colvars | int | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-DIFFRACTION ` | virtual x-ray and electron diffraction | :doc:`compute xrd ` | USER/diffraction | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-DPD ` | reactive dissipative particle dynamics | src/USER-DPD/README | USER/dpd | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-DRUDE ` | Drude oscillators | :doc:`Howto drude ` | USER/drude | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-EFF ` | electron force field | :doc:`pair_style eff/cut ` | USER/eff | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-FEP ` | free energy perturbation | :doc:`compute fep ` | USER/fep | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-H5MD ` | dump output via HDF5 | :doc:`dump h5md ` | n/a | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-INTEL ` | optimized Intel CPU and KNL styles | :doc:`Speed intel ` | `Benchmarks `_ | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-LB ` | Lattice Boltzmann fluid | :doc:`fix lb/fluid ` | USER/lb | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-MANIFOLD ` | motion on 2d surfaces | :doc:`fix manifoldforce ` | USER/manifold | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-MEAMC ` | modified EAM potential (C++) | :doc:`pair_style meam/c ` | meamc | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-MESODPD ` | mesoscale DPD models | :doc:`pair_style edpd ` | USER/mesodpd | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-MESONT ` | mesoscopic tubular potential model | :doc:`pair_style mesont/tpm ` | USER/mesont | int | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-MGPT ` | fast MGPT multi-ion potentials | :doc:`pair_style mgpt ` | USER/mgpt | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-MISC ` | single-file contributions | USER-MISC/README | USER/misc | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-MOFFF ` | styles for `MOF-FF `_ force field | :doc:`pair_style buck6d/coul/gauss ` | USER/mofff | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-MOLFILE ` | `VMD `_ molfile plug-ins | :doc:`dump molfile ` | n/a | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-NETCDF ` | dump output via NetCDF | :doc:`dump netcdf ` | n/a | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-OMP ` | OpenMP-enabled styles | :doc:`Speed omp ` | `Benchmarks `_ | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-PHONON ` | phonon dynamical matrix | :doc:`fix phonon ` | USER/phonon | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-PLUMED ` | :ref:`PLUMED ` free energy library | :doc:`fix plumed ` | USER/plumed | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-PTM ` | Polyhedral Template Matching | :doc:`compute ptm/atom ` | n/a | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-QMMM ` | QM/MM coupling | :doc:`fix qmmm ` | USER/qmmm | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-QTB ` | quantum nuclear effects | :doc:`fix qtb ` :doc:`fix qbmsst ` | qtb | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-QUIP ` | QUIP/libatoms interface | :doc:`pair_style quip ` | USER/quip | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-REACTION ` | chemical reactions in classical MD | :doc:`fix bond/react ` | USER/reaction | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-REAXC ` | ReaxFF potential (C/C++) | :doc:`pair_style reaxc ` | reax | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-SCAFACOS ` | wrapper on ScaFaCoS solver | :doc:`kspace_style scafacos ` | USER/scafacos | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-SDPD ` | smoothed dissipative particle dynamics | :doc:`pair_style sdpd/taitwater/isothermal ` | USER/sdpd | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-SMD ` | smoothed Mach dynamics | `SMD User Guide `_ | USER/smd | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-SMTBQ ` | second moment tight binding QEq potential | :doc:`pair_style smtbq ` | USER/smtbq | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-SPH ` | smoothed particle hydrodynamics | `SPH User Guide `_ | USER/sph | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-TALLY ` | pairwise tally computes | :doc:`compute XXX/tally ` | USER/tally | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-UEF ` | extensional flow | :doc:`fix nvt/uef ` | USER/uef | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-VTK ` | dump output via VTK | :doc:`compute vtk ` | n/a | ext | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ -| :ref:`USER-YAFF ` | additional styles implemented in YAFF | :doc:`angle_style cross ` | USER/yaff | no | -+------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+------------------------------------------------------+---------+ ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| Package | Description | Doc page | Example | Library | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-ADIOS ` | dump output via ADIOS | :doc:`dump adios ` | USER/adios | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-ATC ` | Atom-to-Continuum coupling | :doc:`fix atc ` | USER/atc | int | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-AWPMD ` | wave packet MD | :doc:`pair_style awpmd/cut ` | USER/awpmd | int | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-BOCS ` | BOCS bottom up coarse graining | :doc:`fix bocs ` | USER/bocs | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-CGDNA ` | coarse-grained DNA force fields | src/USER-CGDNA/README | USER/cgdna | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-CGSDK ` | SDK coarse-graining model | :doc:`pair_style lj/sdk ` | USER/cgsdk | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-COLVARS ` | collective variables library | :doc:`fix colvars ` | USER/colvars | int | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-DIFFRACTION ` | virtual x-ray and electron diffraction | :doc:`compute xrd ` | USER/diffraction | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-DPD ` | reactive dissipative particle dynamics | src/USER-DPD/README | USER/dpd | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-DRUDE ` | Drude oscillators | :doc:`Howto drude ` | USER/drude | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-EFF ` | electron force field | :doc:`pair_style eff/cut ` | USER/eff | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-FEP ` | free energy perturbation | :doc:`compute fep ` | USER/fep | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-H5MD ` | dump output via HDF5 | :doc:`dump h5md ` | n/a | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-INTEL ` | optimized Intel CPU and KNL styles | :doc:`Speed intel ` | `Benchmarks `_ | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-LB ` | Lattice Boltzmann fluid | :doc:`fix lb/fluid ` | USER/lb | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-MANIFOLD ` | motion on 2d surfaces | :doc:`fix manifoldforce ` | USER/manifold | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-MEAMC ` | modified EAM potential (C++) | :doc:`pair_style meam/c ` | meamc | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-MESO ` | mesoscale DPD models | :doc:`pair_style edpd ` | USER/meso | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-MESONT ` | mesoscopic tubular potential model for nanotubes | :doc:`pair_style mesont/tpm ` | USER/mesont | int | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-MGPT ` | fast MGPT multi-ion potentials | :doc:`pair_style mgpt ` | USER/mgpt | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-MISC ` | single-file contributions | USER-MISC/README | USER/misc | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-MOFFF ` | styles for `MOF-FF `_ force field | :doc:`pair_style buck6d/coul/gauss ` | USER/mofff | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-MOLFILE ` | `VMD `_ molfile plug-ins | :doc:`dump molfile ` | n/a | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-NETCDF ` | dump output via NetCDF | :doc:`dump netcdf ` | n/a | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-OMP ` | OpenMP-enabled styles | :doc:`Speed omp ` | `Benchmarks `_ | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-PHONON ` | phonon dynamical matrix | :doc:`fix phonon ` | USER/phonon | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-PLUMED ` | :ref:`PLUMED ` free energy library | :doc:`fix plumed ` | USER/plumed | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-PTM ` | Polyhedral Template Matching | :doc:`compute ptm/atom ` | n/a | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-QMMM ` | QM/MM coupling | :doc:`fix qmmm ` | USER/qmmm | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-QTB ` | quantum nuclear effects | :doc:`fix qtb ` :doc:`fix qbmsst ` | qtb | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-QUIP ` | QUIP/libatoms interface | :doc:`pair_style quip ` | USER/quip | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-REACTION ` | chemical reactions in classical MD | :doc:`fix bond/react ` | USER/reaction | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-REAXC ` | ReaxFF potential (C/C++) | :doc:`pair_style reaxc ` | reax | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-SCAFACOS ` | wrapper on ScaFaCoS solver | :doc:`kspace_style scafacos ` | USER/scafacos | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-SDPD ` | smoothed dissipative particle dynamics | :doc:`pair_style sdpd/taitwater/isothermal ` | USER/sdpd | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-SMD ` | smoothed Mach dynamics | `SMD User Guide `_ | USER/smd | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-SMTBQ ` | second moment tight binding QEq potential | :doc:`pair_style smtbq ` | USER/smtbq | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-SPH ` | smoothed particle hydrodynamics | `SPH User Guide `_ | USER/sph | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-TALLY ` | pairwise tally computes | :doc:`compute XXX/tally ` | USER/tally | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-UEF ` | extensional flow | :doc:`fix nvt/uef ` | USER/uef | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-VTK ` | dump output via VTK | :doc:`compute vtk ` | n/a | ext | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ +| :ref:`USER-YAFF ` | additional styles implemented in YAFF | :doc:`angle_style cross ` | USER/yaff | no | ++------------------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------+-----------------------------------------------------+---------+ .. _MOFplus: https://www.mofplus.org/content/show/MOF-FF -.. _PLUMED: https://www.plumed.org +.. _PLUMED: http://www.plumed.org diff --git a/doc/src/atom_style.rst b/doc/src/atom_style.rst index 27e4d326cc..7f4ac8414f 100644 --- a/doc/src/atom_style.rst +++ b/doc/src/atom_style.rst @@ -6,14 +6,15 @@ atom_style command Syntax """""" + .. code-block:: LAMMPS atom_style style args * style = *angle* or *atomic* or *body* or *bond* or *charge* or *dipole* or *dpd* or *edpd* or *mdpd* or *tdpd* or *electron* or *ellipsoid* or *full* or *line* or *meso* or *molecular* or *peri* or *smd* or *sphere* or *spin* or *tri* or *template* or *hybrid* - + .. parsed-literal:: - + args = none for any style except the following *body* args = bstyle bstyle-args bstyle = style of body particles @@ -27,9 +28,11 @@ Syntax * accelerated styles (with same args) = *angle/kk* or *atomic/kk* or *bond/kk* or *charge/kk* or *full/kk* or *molecular/kk* + Examples """""""" + .. code-block:: LAMMPS atom_style atomic @@ -85,8 +88,6 @@ quantities. +--------------+-----------------------------------------------------+--------------------------------------+ | *charge* | charge | atomic system with charges | +--------------+-----------------------------------------------------+--------------------------------------+ -| *mesont* | mass, radius, length, buckling, connections, tube id| Carbon nanotubes | -+--------------+-----------------------------------------------------+--------------------------------------+ | *dipole* | charge and dipole moment | system with dipolar particles | +--------------+-----------------------------------------------------+--------------------------------------+ | *dpd* | internal temperature and internal energies | DPD particles | @@ -107,6 +108,8 @@ quantities. +--------------+-----------------------------------------------------+--------------------------------------+ | *meso* | rho, e, cv | SPH particles | +--------------+-----------------------------------------------------+--------------------------------------+ +| *mesont* | mass, radius, length, buckling, connections, tube id| mesoscopic nanotubes | ++--------------+-----------------------------------------------------+--------------------------------------+ | *molecular* | bonds, angles, dihedrals, impropers | uncharged molecules | +--------------+-----------------------------------------------------+--------------------------------------+ | *peri* | mass, volume | mesoscopic Peridynamic models | @@ -121,10 +124,9 @@ quantities. +--------------+-----------------------------------------------------+--------------------------------------+ | *tri* | corner points, angular momentum | rigid bodies | +--------------+-----------------------------------------------------+--------------------------------------+ -| *wavepacket* | charge, spin, eradius, etag, cs_re, cs_im | AWPMD | +| *wavepacket* | charge, spin, eradius, etag, cs\_re, cs\_im | AWPMD | +--------------+-----------------------------------------------------+--------------------------------------+ - .. note:: It is possible to add some attributes, such as a molecule ID, to @@ -161,7 +163,7 @@ For the *dipole* style, a point dipole is defined for each point particle. Note that if you wish the particles to be finite-size spheres as in a Stockmayer potential for a dipolar fluid, so that the particles can rotate due to dipole-dipole interactions, then you need -to use atom_style hybrid sphere dipole, which will assign both a +to use atom\_style hybrid sphere dipole, which will assign both a diameter and dipole moment to each particle. For the *electron* style, the particles representing electrons are 3d @@ -174,14 +176,14 @@ per-particle mass and volume. The *dpd* style is for dissipative particle dynamics (DPD) particles. Note that it is part of the USER-DPD package, and is not for use with the :doc:`pair_style dpd or dpd/stat ` commands, which can -simply use atom_style atomic. Atom_style dpd extends DPD particle +simply use atom\_style atomic. Atom\_style dpd extends DPD particle properties with internal temperature (dpdTheta), internal conductive energy (uCond), internal mechanical energy (uMech), and internal chemical energy (uChem). The *edpd* style is for energy-conserving dissipative particle -dynamics (eDPD) particles which store a temperature (edpd_temp), and -heat capacity(edpd_cv). +dynamics (eDPD) particles which store a temperature (edpd\_temp), and +heat capacity(edpd\_cv). The *mdpd* style is for many-body dissipative particle dynamics (mDPD) particles which store a density (rho) for considering @@ -189,7 +191,7 @@ density-dependent many-body interactions. The *tdpd* style is for transport dissipative particle dynamics (tDPD) particles which store a set of chemical concentration. An integer -"cc_species" is required to specify the number of chemical species +"cc\_species" is required to specify the number of chemical species involved in a tDPD system. The *meso* style is for smoothed particle hydrodynamics (SPH) @@ -208,7 +210,7 @@ Those spins have a norm (their magnetic moment) and a direction. The *wavepacket* style is similar to *electron*\ , but the electrons may consist of several Gaussian wave packets, summed up with coefficients -cs= (cs_re,cs_im). Each of the wave packets is treated as a separate +cs= (cs\_re,cs\_im). Each of the wave packets is treated as a separate particle in LAMMPS, wave packets belonging to the same electron must have identical *etag* values. @@ -239,7 +241,7 @@ can be advantageous for large-scale coarse-grained systems. .. note:: When using the *template* style with a :doc:`molecule template ` that contains multiple molecules, you should - insure the atom types, bond types, angle_types, etc in all the + insure the atom types, bond types, angle\_types, etc in all the molecules are consistent. E.g. if one molecule represents H2O and another CO2, then you probably do not want each molecule file to define 2 atom types and a single bond type, because they will conflict @@ -263,11 +265,13 @@ orientation and position can be time integrated due to forces and torques. Note that there may be additional arguments required along with the -*bstyle* specification, in the atom_style body command. These +*bstyle* specification, in the atom\_style body command. These arguments are described on the :doc:`Howto body ` doc page. + ---------- + Typically, simulations require only a single (non-hybrid) atom style. If some atoms in the simulation do not have all the properties defined by a particular style, use the simplest style that defines all the @@ -278,7 +282,7 @@ If some atoms have bonds, but others do not, use the *bond* style. The only scenario where the *hybrid* style is needed is if there is no single style which defines all needed properties of all atoms. For example, as mentioned above, if you want dipolar particles which will -rotate due to torque, you need to use "atom_style hybrid sphere +rotate due to torque, you need to use "atom\_style hybrid sphere dipole". When a hybrid style is used, atoms store and communicate the union of all quantities implied by the individual styles. @@ -289,8 +293,10 @@ per-atom basis. LAMMPS can be extended with new atom styles as well as new body styles; see the :doc:`Modify ` doc page. + ---------- + Styles with a *kk* 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 on @@ -315,6 +321,7 @@ instructions on how to use the accelerated styles effectively. Restrictions """""""""""" + This command cannot be used after the simulation box is defined by a :doc:`read_data ` or :doc:`create_box ` command. @@ -337,7 +344,7 @@ The *electron* style is part of the USER-EFF package for :doc:`electronic force The *dpd* style is part of the USER-DPD package for dissipative particle dynamics (DPD). -The *edpd*\ , *mdpd*\ , and *tdpd* styles are part of the USER-MESODPD package +The *edpd*\ , *mdpd*\ , and *tdpd* styles are part of the USER-MESO package for energy-conserving dissipative particle dynamics (eDPD), many-body dissipative particle dynamics (mDPD), and transport dissipative particle dynamics (tDPD), respectively. @@ -345,13 +352,13 @@ dynamics (tDPD), respectively. The *meso* style is part of the USER-SPH package for smoothed particle hydrodynamics (SPH). See `this PDF guide `_ to using SPH in LAMMPS. +The *mesont* style is part of the USER-MESONT package. + The *spin* style is part of the SPIN package. The *wavepacket* style is part of the USER-AWPMD package for the :doc:`antisymmetrized wave packet MD method `. -The *mesont* style is part of the USER-MESONT package. - Related commands """""""""""""""" @@ -360,11 +367,15 @@ Related commands Default """"""" -atom_style atomic +atom\_style atomic + ---------- + .. _Grime: + + **(Grime)** Grime and Voth, to appear in J Chem Theory & Computation (2014). diff --git a/doc/src/compute.rst b/doc/src/compute.rst index b560495b46..aa501f351b 100644 --- a/doc/src/compute.rst +++ b/doc/src/compute.rst @@ -6,6 +6,7 @@ compute command Syntax """""" + .. parsed-literal:: compute ID group-ID style args @@ -18,7 +19,8 @@ Syntax Examples """""""" -.. code-block:: LAMMPS + +.. parsed-literal:: compute 1 all temp compute newtemp flow temp/partial 1 1 0 @@ -41,8 +43,10 @@ various LAMMPS output options, many of which involve computes. The ID of a compute can only contain alphanumeric characters and underscores. + ---------- + Computes calculate one of three styles of quantities: global, per-atom, or local. A global quantity is one or more system-wide values, e.g. the temperature of the system. A per-atom quantity is @@ -72,11 +76,11 @@ discussed below, it can be referenced via the following bracket notation, where ID is the ID of the compute: +-------------+--------------------------------------------+ -| c_ID | entire scalar, vector, or array | +| c\_ID | entire scalar, vector, or array | +-------------+--------------------------------------------+ -| c_ID[I] | one element of vector, one column of array | +| c\_ID[I] | one element of vector, one column of array | +-------------+--------------------------------------------+ -| c_ID[I][J] | one element of array | +| c\_ID[I][J] | one element of array | +-------------+--------------------------------------------+ In other words, using one bracket reduces the dimension of the @@ -88,12 +92,14 @@ vector or array. Note that commands and :doc:`variables ` which use compute quantities typically do not allow for all kinds, e.g. a command may require a vector of values, not a scalar. This means there is no -ambiguity about referring to a compute quantity as c_ID even if it +ambiguity about referring to a compute quantity as c\_ID even if it produces, for example, both a scalar and vector. The doc pages for various commands explain the details. + ---------- + In LAMMPS, the values generated by a compute can be used in several ways: @@ -109,6 +115,7 @@ ways: command. Or the per-atom values can be referenced in an :doc:`atom-style variable `. * Local values can be reduced by the :doc:`compute reduce ` command, or histogrammed by the :doc:`fix ave/histo ` command, or output by the :doc:`dump local ` command. + The results of computes that calculate global quantities can be either "intensive" or "extensive" values. Intensive means the value is independent of the number of atoms in the simulation, @@ -116,20 +123,23 @@ e.g. temperature. Extensive means the value scales with the number of atoms in the simulation, e.g. total rotational kinetic energy. :doc:`Thermodynamic output ` will normalize extensive values by the number of atoms in the system, depending on the -"thermo_modify norm" setting. It will not normalize intensive values. +"thermo\_modify norm" setting. It will not normalize intensive values. If a compute value is accessed in another way, e.g. by a :doc:`variable `, you may want to know whether it is an intensive or extensive value. See the doc page for individual computes for further info. + ---------- + LAMMPS creates its own computes internally for thermodynamic output. -Three computes are always created, named "thermo_temp", -"thermo_press", and "thermo_pe", as if these commands had been invoked +Three computes are always created, named "thermo\_temp", +"thermo\_press", and "thermo\_pe", as if these commands had been invoked in the input script: -.. code-block:: LAMMPS + +.. parsed-literal:: compute thermo_temp all temp compute thermo_press all pressure thermo_temp @@ -156,8 +166,10 @@ Code for new computes can be added to LAMMPS; see the :doc:`Modify ` doc page for details. The results of their calculations accessed in the various ways described above. + ---------- + Each compute style has its own doc page which describes its arguments and what it does. Here is an alphabetic list of compute styles available in LAMMPS. They are also listed in more compact form on the @@ -225,13 +237,7 @@ The individual style names on the :doc:`Commands compute ` doc * :doc:`ke/atom/eff ` - per-atom translational and radial kinetic energy in the electron force field model * :doc:`ke/eff ` - kinetic energy of a group of nuclei and electrons in the electron force field model * :doc:`ke/rigid ` - translational kinetic energy of rigid bodies -* :doc:`mesont/Es ` - Nanotube (NT) stretching per node energy -* :doc:`mesont/Eb ` - NT bending per node energy -* :doc:`mesont/Et ` - NT intertube per node energy -* :doc:`mesont/B ` - NT per node buckling flag -* :doc:`mesont/Es_tot ` - NT stretching energy -* :doc:`mesont/Eb_tot ` - NT bending energy -* :doc:`mesont/Et_tot ` - NT intertube energy +* :doc:`mesont ` - Nanotube bending,stretching, and intertube energies * :doc:`meso/e/atom ` - per-atom internal energy of Smooth-Particle Hydrodynamics atoms * :doc:`meso/rho/atom ` - per-atom mesoscopic density of Smooth-Particle Hydrodynamics atoms * :doc:`meso/t/atom ` - per-atom internal temperature of Smooth-Particle Hydrodynamics atoms @@ -326,9 +332,4 @@ Related commands :doc:`uncompute `, :doc:`compute_modify `, :doc:`fix ave/atom `, :doc:`fix ave/time `, :doc:`fix ave/histo ` -**Default:** none - - -.. _lws: http://lammps.sandia.gov -.. _ld: Manual.html -.. _lc: Commands_all.html +**Default:** none \ No newline at end of file diff --git a/doc/src/compute_mesont.rst b/doc/src/compute_mesont.rst index e79cb80687..8470059bdd 100644 --- a/doc/src/compute_mesont.rst +++ b/doc/src/compute_mesont.rst @@ -1,36 +1,19 @@ .. index:: compute mesont -compute mesont/Es command +compute mesont command ========================== -compute mesont/Eb command -========================== - -compute mesont/Et command -========================== - -compute mesont/B command -========================== - -compute mesont/Es\_tot command -=============================== - -compute mesont/Eb\_tot command -=============================== - -compute mesont/Et\_tot command -=============================== - Syntax """""" .. parsed-literal:: - compute ID group-ID mesont/Es + compute ID group-ID mesont mode * ID, group-ID are documented in :doc:`compute ` command -* mesont/Es = style name of the compute command +* mesont = style name of the compute command +* mode = one of estretch, ebend, etube, stretch_tot, ebend_tot, and etube_tot (see details below) Examples """""""" @@ -38,23 +21,25 @@ Examples .. parsed-literal:: - compute 1 all mesont/Es + compute 1 all mesont estretch Description """"""""""" -These computes define computations for the per-node stretching (mesont/Es), -bending (mesont/Eb), and intertube (mesont/Et) energies, buckling flag (mesont/B), -as well as the total stretching (mesont/Es\_tot), bending (mesont/Eb\_tot), and -intertube (mesont/Et\_tot) energies for each atom (node) in a group. +These computes define computations for the per-node stretching (estretch), +bending (ebend), and intertube (etube) energies, as well as the total +stretching (estretch_tot), bending (ebend_tot), and intertube (etube_tot) +energies for each atom (node) in a group. The evaluated value is selected by +a parameter passed to the compute: estretch, ebend, etube, estretch_tot, +ebend_tot, and etube_tot. **Output info:** -These computes calculate per-node (per-atom) vectors (mesont/Es, mesont/Eb, mesont/Et, mesont/B), +These computes calculate per-node (per-atom) vectors (estretch, ebend, etube), which can be accessed by any command that uses per-atom values from a -compute as input, and global scalars (mesont/Es\_tot, mesont/Eb\_tot, -mesont/Et\_tot). See the :doc:`Howto output ` doc page for an -overview of LAMMPS output options. +compute as input, and global scalars (stretch_tot, ebend_tot, and etube_tot). +See the :doc:`Howto output ` doc page for an overview of LAMMPS +output options. The per-atom vector values will be in energy :doc:`units `. diff --git a/doc/src/compute_property_atom.rst b/doc/src/compute_property_atom.rst index 1643be8699..6b93bc0118 100644 --- a/doc/src/compute_property_atom.rst +++ b/doc/src/compute_property_atom.rst @@ -30,6 +30,7 @@ Syntax corner2x, corner2y, corner2z, corner3x, corner3y, corner3z, nbonds, + buckling, vfrac, s0, spin, eradius, ervel, erforce, rho, drho, e, de, cv, @@ -63,6 +64,7 @@ Syntax end12x, end12y, end12z = end points of line segment corner123x, corner123y, corner123z = corner points of triangle nbonds = number of bonds assigned to an atom + buckling = buckling flag used in mesoscopic simulation of nanotubes .. parsed-literal:: diff --git a/doc/src/pair_airebo.rst b/doc/src/pair_airebo.rst deleted file mode 100644 index b6d1af2a79..0000000000 --- a/doc/src/pair_airebo.rst +++ /dev/null @@ -1,272 +0,0 @@ -.. index:: pair_style airebo - -pair_style airebo command -========================= - -pair_style airebo/intel command -=============================== - -pair_style airebo/omp command -============================= - -pair_style airebo/morse command -=============================== - -pair_style airebo/morse/intel command -===================================== - -pair_style airebo/morse/omp command -=================================== - -pair_style rebo command -======================= - -pair_style rebo/intel command -============================= - -pair_style rebo/omp command -=========================== - -Syntax -"""""" - -.. code-block:: LAMMPS - - pair_style style cutoff LJ_flag TORSION_flag cutoff_min - -* style = *airebo* or *airebo/morse* or *rebo* -* cutoff = LJ or Morse cutoff (:math:`\sigma` scale factor) (AIREBO and AIREBO-M only) -* LJ_flag = 0/1 to turn off/on the LJ or Morse term (AIREBO and AIREBO-M only, optional) -* TORSION_flag = 0/1 to turn off/on the torsion term (AIREBO and AIREBO-M only, optional) -* cutoff_min = Start of the transition region of cutoff (:math:`\sigma` scale factor) (AIREBO and AIREBO-M only, optional) - -Examples -"""""""" - -.. code-block:: LAMMPS - - pair_style airebo 3.0 - pair_style airebo 2.5 1 0 - pair_coeff * * ../potentials/CH.airebo H C - - pair_style airebo/morse 3.0 - pair_coeff * * ../potentials/CH.airebo-m H C - - pair_style rebo - pair_coeff * * ../potentials/CH.rebo H C - -Description -""""""""""" - -The *airebo* pair style computes the Adaptive Intermolecular Reactive -Empirical Bond Order (AIREBO) Potential of :ref:`(Stuart) ` for a -system of carbon and/or hydrogen atoms. Note that this is the initial -formulation of AIREBO from 2000, not the later formulation. - -The *airebo/morse* pair style computes the AIREBO-M potential, which -is equivalent to AIREBO, but replaces the LJ term with a Morse potential. -The Morse potentials are parameterized by high-quality quantum chemistry -(MP2) calculations and do not diverge as quickly as particle density -increases. This allows AIREBO-M to retain accuracy to much higher pressures -than AIREBO (up to 40 GPa for Polyethylene). Details for this potential -and its parameterization are given in :ref:`(O'Conner) `. - -The *rebo* pair style computes the Reactive Empirical Bond Order (REBO) -Potential of :ref:`(Brenner) `. Note that this is the so-called -2nd generation REBO from 2002, not the original REBO from 1990. -As discussed below, 2nd generation REBO is closely related to the -initial AIREBO; it is just a subset of the potential energy terms -with a few slightly different parameters - -The AIREBO potential consists of three terms: - -.. math:: - - E & = \frac{1}{2} \sum_i \sum_{j \neq i} - \left[ E^{\text{REBO}}_{ij} + E^{\text{LJ}}_{ij} + - \sum_{k \neq i,j} \sum_{l \neq i,j,k} E^{\text{TORSION}}_{kijl} \right] \\ - -By default, all three terms are included. For the *airebo* style, if -the first two optional flag arguments to the pair_style command are -included, the LJ and torsional terms can be turned off. Note that -both or neither of the flags must be included. If both of the LJ an -torsional terms are turned off, it becomes the 2nd-generation REBO -potential, with a small caveat on the spline fitting procedure -mentioned below. This can be specified directly as pair_style *rebo* -with no additional arguments. - -The detailed formulas for this potential are given in -:ref:`(Stuart) `; here we provide only a brief description. - -The :math:`E^{\text{REBO}}` term has the same functional form as the hydrocarbon REBO -potential developed in :ref:`(Brenner) `. The coefficients for -:math:`E^{\text{REBO}}` in AIREBO are essentially the same as Brenner's potential, but -a few fitted spline values are slightly different. For most cases the -:math:`E^{\text{REBO}}` term in AIREBO will produce the same energies, forces and -statistical averages as the original REBO potential from which it was -derived. The :math:`E^{\text{REBO}}` term in the AIREBO potential gives the model its -reactive capabilities and only describes short-ranged C-C, C-H and H-H -interactions (:math:`r < 2` Angstroms). These interactions have strong -coordination-dependence through a bond order parameter, which adjusts -the attraction between the I,J atoms based on the position of other -nearby atoms and thus has 3- and 4-body dependence. - -The :math:`E^{\text{LJ}}` term adds longer-ranged interactions (:math:`2 < r < \text{cutoff}`) using a -form similar to the standard :doc:`Lennard Jones potential `. -The :math:`E^{\text{LJ}}` term in AIREBO contains a series of switching functions so -that the short-ranged LJ repulsion (:math:`1/r^{12}`) does not interfere with -the energetics captured by the :math:`E^{\text{REBO}}` term. The extent of the :math:`E^{\text{LJ}}` -interactions is determined by the *cutoff* argument to the pair_style -command which is a scale factor. For each type pair (C-C, C-H, H-H) -the cutoff is obtained by multiplying the scale factor by the sigma -value defined in the potential file for that type pair. In the -standard AIREBO potential, :math:`\sigma_{CC} = 3.4` Angstroms, so with a scale -factor of 3.0 (the argument in pair_style), the resulting :math:`E^{\text{LJ}}` cutoff -would be 10.2 Angstroms. - -By default, the longer-ranged interaction is smoothly switched off -between 2.16 and 3.0 :math:`\sigma`. By specifying *cutoff_min* in addition -to *cutoff*\ , the switching can be configured to take place between -*cutoff_min* and *cutoff*\ . *cutoff_min* can only be specified if all -optional arguments are given. - -The :math:`E^{\text{TORSION}}` term is an explicit 4-body potential that describes -various dihedral angle preferences in hydrocarbon configurations. - ----------- - -Only a single pair_coeff command is used with the *airebo*\ , *airebo* -or *rebo* style which specifies an AIREBO, REBO, or AIREBO-M potential -file with parameters for C and H. Note that as of LAMMPS version -15 May 2019 the *rebo* style in LAMMPS uses its own potential -file (CH.rebo). These are mapped to LAMMPS atom types by specifying -N additional arguments after the filename in the pair_coeff command, -where N is the number of LAMMPS atom types: - -* filename -* :math:`N` element names = mapping of AIREBO elements to atom types - -See the :doc:`pair_coeff ` doc page for alternate ways -to specify the path for the potential file. - -As an example, if your LAMMPS simulation has 4 atom types and you want -the 1st 3 to be C, and the 4th to be H, you would use the following -pair_coeff command: - -.. code-block:: LAMMPS - - pair_coeff * * CH.airebo C C C H - -The 1st 2 arguments must be \* \* so as to span all LAMMPS atom types. -The first three C arguments map LAMMPS atom types 1,2,3 to the C -element in the AIREBO file. The final H argument maps LAMMPS atom -type 4 to the H element in the SW file. If a mapping value is -specified as NULL, the mapping is not performed. This can be used -when a *airebo* potential is used as part of the *hybrid* pair style. -The NULL values are placeholders for atom types that will be used with -other potentials. - -The parameters/coefficients for the AIREBO potentials are listed in -the CH.airebo file to agree with the original :ref:`(Stuart) ` -paper. Thus the parameters are specific to this potential and the way -it was fit, so modifying the file should be done cautiously. - -Similarly the parameters/coefficients for the AIREBO-M potentials are -listed in the CH.airebo-m file to agree with the :ref:`(O'Connor) ` -paper. Thus the parameters are specific to this potential and the way -it was fit, so modifying the file should be done cautiously. The -AIREBO-M Morse potentials were parameterized using a cutoff of -3.0 (:math:`\sigma`). Modifying this cutoff may impact simulation accuracy. - -This pair style tallies a breakdown of the total AIREBO potential -energy into sub-categories, which can be accessed via the :doc:`compute pair ` command as a vector of values of length 3. -The 3 values correspond to the following sub-categories: - -1. :math:`E_{\text{REBO}}` = REBO energy -2. :math:`E_{\text{LJ}}` = Lennard-Jones energy -3. :math:`E_{\text{TORSION}}` = Torsion energy - -To print these quantities to the log file (with descriptive column -headings) the following commands could be included in an input script: - -.. code-block:: LAMMPS - - compute 0 all pair airebo - variable REBO equal c_0[1] - variable LJ equal c_0[2] - variable TORSION equal c_0[3] - thermo_style custom step temp epair v_REBO v_LJ v_TORSION - ----------- - -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 on the :doc:`Speed packages ` doc -page. 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 :doc:`Build package ` doc page for more info. - -You can specify the accelerated styles explicitly in your input script -by including their suffix, or you can use the :doc:`-suffix command-line switch ` when you invoke LAMMPS, or you can use the -:doc:`suffix ` command in your input script. - -See the :doc:`Speed packages ` doc page for more -instructions on how to use the accelerated styles effectively. - ----------- - -**Mixing, shift, table, tail correction, restart, rRESPA info**\ : - -These pair styles do not support the :doc:`pair_modify ` -mix, shift, table, and tail options. - -These pair styles do not write their information to :doc:`binary restart files `, since it is stored in potential files. Thus, you -need to re-specify the pair_style and pair_coeff commands in an input -script that reads a restart file. - -These pair styles can only be used via the *pair* keyword of the -:doc:`run_style respa ` command. They do not support the -*inner* , *middle*, *outer* keywords. - -Restrictions -"""""""""""" - -These pair styles are part of the MANYBODY package. They are only -enabled if LAMMPS was built with that package. See the :doc:`Build package ` doc page for more info. - -These pair potentials require the :doc:`newton ` setting to be -"on" for pair interactions. - -The CH.airebo and CH.airebo-m potential files provided with LAMMPS -(see the potentials directory) are parameterized for metal :doc:`units `. -You can use the AIREBO, AIREBO-M or REBO potential with any LAMMPS units, -but you would need to create your own AIREBO or AIREBO-M potential file -with coefficients listed in the appropriate units, if your simulation -does not use "metal" units. - -Related commands -"""""""""""""""" - -:doc:`pair_coeff ` - -**Default:** none - ----------- - -.. _Stuart: - -**(Stuart)** Stuart, Tutein, Harrison, J Chem Phys, 112, 6472-6486 -(2000). - -.. _Brenner: - -**(Brenner)** Brenner, Shenderova, Harrison, Stuart, Ni, Sinnott, J -Physics: Condensed Matter, 14, 783-802 (2002). - -.. _OConnor: - -**(O'Connor)** O'Connor et al., J. Chem. Phys. 142, 024903 (2015). diff --git a/doc/src/pair_mesont_tpm.rst b/doc/src/pair_mesont_tpm.rst index 191199ef93..7f6926e85d 100644 --- a/doc/src/pair_mesont_tpm.rst +++ b/doc/src/pair_mesont_tpm.rst @@ -1,6 +1,6 @@ -.. index:: pair\_style mesont/tpm +.. index:: pair_style mesont/tpm -pair\_style mesont/tpm command +pair_style mesont/tpm command ============================== Syntax @@ -9,13 +9,14 @@ Syntax .. parsed-literal:: - pair_style mesont/tpm cut table\_path BendingMode TPMType + pair_style mesont/tpm cut table_path BendingMode TPMType * cut = the cutoff distance -* table\_path = the path to the potential table, the default value is ./ +* table_path = the path to the potential table, the default value is ./ * BendingMode = the parameter defining the type of the bending potential for nanotubes: 0 - harmonic bending :ref:`[1] `, 1 - anharmonic potential of bending and bending-buckling :ref:`[2] ` * TPMType = the parameter determining the type of the inter-tube interaction term: 0 - segment-segment approach, 1 - segment-chain approach :ref:`[3 `, :ref:`4] ` +The segment-segment approach is approximetly 5 times slower than segment-chain approximation. The parameter BendingMode also affects the calculation of the inter-tube interaction term when TPMType = 1. In this case, when BendingMode = 1, each continuous chain of segments is additionally replaced by a number of sub-chains divided by bending buckling kinks. Examples @@ -160,77 +161,52 @@ Related commands ---------- - .. _Srivastava: - - **[1]** Zhigilei, Wei, Srivastava, Phys. Rev. B 71, 165417 (2005). .. _Zhigilei1: - - **[2]** Volkov and Zhigilei, ACS Nano 4, 6187 (2010). .. _Zhigilei2: - - **[3]** Volkov, Simov, Zhigilei, ASME paper IMECE2008, 68021 (2008). .. _Zhigilei3: - - **[4]** Volkov, Zhigilei, J. Phys. Chem. C 114, 5513 (2010). .. _Zhigilei4: - - **[5]** Wittmaack, Banna, Volkov, Zhigilei, Carbon 130, 69 (2018). .. _Zhigilei5: - - **[6]** Wittmaack, Volkov, Zhigilei, Compos. Sci. Technol. 166, 66 (2018). .. _Zhigilei6: - - **[7]** Wittmaack, Volkov, Zhigilei, Carbon 143, 587 (2019). .. _Zhigilei7: - - **[8]** Volkov, Zhigilei, Phys. Rev. Lett. 104, 215902 (2010). .. _Zhigilei8: - - **[9]** Volkov, Shiga, Nicholson, Shiomi, Zhigilei, J. Appl. Phys. 111, 053501 (2012). .. _Zhigilei9: - - **[10]** Volkov, Zhigilei, Appl. Phys. Lett. 101, 043113 (2012). .. _Zhigilei10: - - **[11]** Jacobs, Nicholson, Zemer, Volkov, Zhigilei, Phys. Rev. B 86, 165414 (2012). .. _Banna: - - **[12]** Volkov, Banna, Comp. Mater. Sci. 176, 109410 (2020). diff --git a/doc/src/pair_style.rst b/doc/src/pair_style.rst index 8e4154268a..4d54532ed6 100644 --- a/doc/src/pair_style.rst +++ b/doc/src/pair_style.rst @@ -1,7 +1,7 @@ -.. index:: pair\_style +.. index:: pair_style -pair\_style command -=================== +pair_style command +================== Syntax """""" @@ -127,7 +127,6 @@ accelerated styles exist. * :doc:`buck/mdf ` - Buckingham with a taper function * :doc:`buck6d/coul/gauss/dsf ` - dispersion-damped Buckingham with damped-shift-force model * :doc:`buck6d/coul/gauss/long ` - dispersion-damped Buckingham with long-range Coulombics -* :doc:`mesont/tpm ` - nanotubes mesoscopic force field * :doc:`colloid ` - integrated colloidal potential * :doc:`comb ` - charge-optimized many-body (COMB) potential * :doc:`comb3 ` - charge-optimized many-body (COMB3) potential @@ -244,6 +243,7 @@ accelerated styles exist. * :doc:`meam/spline ` - splined version of MEAM * :doc:`meam/sw/spline ` - splined version of MEAM with a Stillinger-Weber term * :doc:`mesocnt ` - mesoscale model for (carbon) nanotubes +* :doc:`mesont/tpm ` - nanotubes mesoscopic force field * :doc:`mgpt ` - simplified model generalized pseudopotential theory (MGPT) potential * :doc:`mie/cut ` - Mie potential * :doc:`mm3/switch3/coulgauss/long ` - smoothed MM3 vdW potential with Gaussian electrostatics @@ -352,8 +352,3 @@ Default .. code-block:: LAMMPS pair_style none - - -.. _lws: http://lammps.sandia.gov -.. _ld: Manual.html -.. _lc: Commands_all.html diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 662bf38633..e152d89467 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -204,6 +204,7 @@ bcolor bdiam bdw Beckman +behaviour Belak Bellott benchmarking @@ -261,8 +262,6 @@ Bogaerts Bogusz Bohrs Boltzman -BondAngle -BondBond bondchk bondmax bondtype @@ -395,7 +394,6 @@ cmake CMake cmap Cmax -cmd cmdlist Cmin cmm @@ -491,7 +489,6 @@ cstring cstyle csvr Ctypes -ctypes cuda Cuda CUDA @@ -708,6 +705,7 @@ eatom Eb Eba Ebeling +ebend ebond ebook ebt @@ -752,8 +750,6 @@ electronegative electronegativity Eleftheriou ElementN -elementset -elementsets elif Elj Ellad @@ -779,7 +775,6 @@ engrot engtrans engvib enobonds -EnSight enthalpy enums envoke @@ -822,9 +817,8 @@ erotate Ertas ervel Espanol -Eshelby -eshelby eskm +estretch esu esub esw @@ -836,8 +830,7 @@ ethernet etol etot etotal -Eulerian -eulerian +etube eulerimplicit Europhys ev @@ -858,8 +851,6 @@ extrema exy ey ez -faceset -facesets factorizable factorizations Fahrenberger @@ -877,7 +868,6 @@ fdotr fdt Fehlberg Fellinger -fe femtosecond femtoseconds fene @@ -901,7 +891,6 @@ fhg Fi Fichthorn Fickian -fieldname figshare Fij filelink @@ -1044,7 +1033,6 @@ Gmask gneb GNEB Goldfarb -Gonzalez-Melchor googlemail Gordan GPa @@ -1172,8 +1160,6 @@ Hugoniot Hura hux hwloc -hx -hy hydrophobicity hydrostatic hydrostatically @@ -1183,7 +1169,6 @@ hyperdynamics hyperradius hyperspherical hysteretic -hz Ibanez ibar ibm @@ -1312,7 +1297,6 @@ Izvekov izz Izz Jacobsen -Jadhav jagreat Jalalvand james @@ -1403,7 +1387,6 @@ Khvostov Ki Kikugawa kim -kinetostats kJ kk Klahn @@ -1607,7 +1590,6 @@ lucy Luding Lussetti Lustig -lval lwsock lx ly @@ -1619,7 +1601,7 @@ Mackay Mackrodt Macromolecules macroparticle -MacOS +macOS Madura Magda Magdeburg @@ -1688,7 +1670,6 @@ maxwell Maxwellian maxX Mayergoyz -Mayoral mbt Mbytes MBytes @@ -1717,7 +1698,6 @@ mediumvioletred Mees Mehl Mei -Melchor Meloni Melrose Mem @@ -1732,8 +1712,6 @@ Merz meshless meso mesocnt -MESODPD -mesodpd MESONT mesont mesoparticle @@ -1961,7 +1939,6 @@ Nelement Nelements nemd netcdf -netstat Nettleton Neumann Nevent @@ -2012,8 +1989,6 @@ Nocedal nocite nocoeff nodeless -nodeset -nodesets Noehring noforce Noid @@ -2083,7 +2058,6 @@ nucleotides num numa numactl -numdiff numericalfreedom numerics numpy @@ -2192,7 +2166,6 @@ parameterizations parameterize parameterized params -ParaView parmin Parrinello Partay @@ -2284,7 +2257,6 @@ pN png Podhorszki Poiseuille -poisson Polak polarizabilities polarizability @@ -2297,7 +2269,6 @@ polyA polybond polydisperse polydispersity -polyelectrolyte polyhedra popen Popov @@ -2318,6 +2289,8 @@ Prakash pre Pre prec +preceed +preceeded precession prefactor prefactors @@ -2369,7 +2342,6 @@ pymbar pymodule pymol pypar -pythonic Pyy pz Pz @@ -2592,7 +2564,8 @@ Salles sandia Sandia sandybrown -sanitizer +Sanitizer +sanitizers Sanyal sc scafacos @@ -2712,6 +2685,7 @@ smtbq sna snad snapcoeff +snaphots snapparam snav Snodin @@ -2796,8 +2770,6 @@ Stukowski Su subbox subcutoff -subcycle -subcycling Subramaniyan subscripted subscripting @@ -2812,7 +2784,6 @@ superset supersphere Supinski Surblys -surfactant surfactants Suter Sutmann @@ -2876,7 +2847,6 @@ tfmc tfMC th Thakkar -Thaokar thb thei Theodorou @@ -3067,13 +3037,11 @@ util utils utsa Uttormark -uval uvm uwo Uzdin vacf Vaid -Vaiwala valent Valeriu valgrind @@ -3102,7 +3070,6 @@ Vectorization vectorized Vegt vel -Velázquez Verlag verlet Verlet @@ -3187,6 +3154,7 @@ Whelan whitesmoke Wi Wicaksono +wih Wijk Wikipedia wildcard @@ -3231,7 +3199,6 @@ xmax Xmax xmgrace xMIC -xmin xmovie Xmovie xmu @@ -3265,8 +3232,6 @@ yhi yi ylat ylo -ymax -ymin Yoshida ys ysu @@ -3301,8 +3266,6 @@ Ziegenhain Zj zlim zlo -zmax -zmin zmq zN zs diff --git a/examples/USER/mesont/README b/examples/USER/mesont/README index 73cc53c87e..6d3eb95ab1 100644 --- a/examples/USER/mesont/README +++ b/examples/USER/mesont/README @@ -9,7 +9,6 @@ Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu "bundle" is an example with a single bundle composed of 7 nanotubes. -"system" is an example with a film composed of 396 200-nm-long +"film" is an example with a film composed of 396 200-nm-long nanotubes (79596 nodes). - diff --git a/examples/USER/mesont/bundle.in b/examples/USER/mesont/bundle.in deleted file mode 100644 index a2dc8d0ef1..0000000000 --- a/examples/USER/mesont/bundle.in +++ /dev/null @@ -1,45 +0,0 @@ -newton on -log cnt.log -echo both -units metal -lattice sc 1.0 -boundary fs fs p -neighbor 1.0 bin -neigh_modify every 5 delay 0 check yes - -atom_style mesont -# cut, path, BendingMode, TPMType -pair_style mesont/tpm 45.0 ../../../potentials/CNT_10_10 0 0 -read_data bundle.init -pair_coeff * * - -velocity all create 6000.0 2019 -timestep 0.005 -fix 1 all nve -#fix 1 all nvt temp 3000.0 3000.0 1.0 -thermo_modify flush yes -thermo 10 -reset_timestep 0 - -compute Es all mesont/Es -compute Eb all mesont/Eb -compute Et all mesont/Et -compute Ek all ke/atom -compute Es_tot all mesont/Es_tot -compute Eb_tot all mesont/Eb_tot -compute Et_tot all mesont/Et_tot -compute Ep_tot all pe -compute Ek_tot all ke -variable time_ equal time -variable Ep_ equal c_Ep_tot -variable Ek_ equal c_Ek_tot -variable Etot_ equal v_Ek_+v_Ep_ -variable Es_ equal c_Es_tot -variable Eb_ equal c_Eb_tot -variable Et_ equal c_Et_tot - -dump out_dump all custom 50 config.dump id type x y z c_Es c_Eb c_Et c_Ek ix iy iz -fix out_info all print 10 "${time_} ${Etot_} ${Ek_} ${Ep_} ${Es_} ${Eb_} ${Et_}" file "E.txt" screen no - -run 10000 -write_data system.data diff --git a/examples/USER/mesont/bundle_h.in b/examples/USER/mesont/bundle_h.in deleted file mode 100644 index 4775ddc280..0000000000 --- a/examples/USER/mesont/bundle_h.in +++ /dev/null @@ -1,46 +0,0 @@ -newton on -log cnt.log -echo both -units metal -lattice sc 1.0 -boundary p p p -neighbor 1.0 bin -neigh_modify every 5 delay 0 check yes - -atom_style mesont -# cut, path, BendingMode, TPMType -pair_style hybrid mesont/tpm 45.0 ../../../potentials/CNT_10_10 0 0 lj/cut 7.5 -read_data bundle_h.init -pair_coeff 1*2 2 lj/cut 0.1 3.0 -pair_coeff 1 1 mesont/tpm - -#velocity all create 6000.0 2019 -timestep 0.005 -fix 1 all nve -#fix 1 all nvt temp 3000.0 3000.0 1.0 -thermo_modify flush yes -thermo 10 -reset_timestep 0 - -compute Es all mesont/Es -compute Eb all mesont/Eb -compute Et all mesont/Et -compute Ek all ke/atom -compute Es_tot all mesont/Es_tot -compute Eb_tot all mesont/Eb_tot -compute Et_tot all mesont/Et_tot -compute Ep_tot all pe -compute Ek_tot all ke -variable time_ equal time -variable Ep_ equal c_Ep_tot -variable Ek_ equal c_Ek_tot -variable Etot_ equal v_Ek_+v_Ep_ -variable Es_ equal c_Es_tot -variable Eb_ equal c_Eb_tot -variable Et_ equal c_Et_tot - -dump out_dump all custom 50 config.dump id type x y z c_Es c_Eb c_Et c_Ek ix iy iz -fix out_info all print 10 "${time_} ${Etot_} ${Ek_} ${Ep_} ${Es_} ${Eb_} ${Et_}" file "E.txt" screen no - -run 10000 -write_data system.data diff --git a/examples/USER/mesont/bundle_h.init b/examples/USER/mesont/bundle_h.init deleted file mode 100644 index 4904135e58..0000000000 --- a/examples/USER/mesont/bundle_h.init +++ /dev/null @@ -1,96 +0,0 @@ - - -79 atoms - -2 atom types - --143.89 143.89 xlo xhi --143.89 143.89 ylo yhi -0 220 zlo zhi - -Masses - -1 1.0 -2 1.0 - -Atoms - -1 1 1 11 2 5860.43 6.785 20 0 0 0 0 0 0 0 -2 1 1 1 3 5860.43 6.785 20 0 0 0 20 0 0 0 -3 1 1 2 4 5860.43 6.785 20 0 0 0 40 0 0 0 -4 1 1 3 5 5860.43 6.785 20 0 0 0 60 0 0 0 -5 1 1 4 6 5860.43 6.785 20 0 0 0 80 0 0 0 -6 1 1 5 7 5860.43 6.785 20 0 0 0 100 0 0 0 -7 1 1 6 8 5860.43 6.785 20 0 0 0 120 0 0 0 -8 1 1 7 9 5860.43 6.785 20 0 0 0 140 0 0 0 -9 1 1 8 10 5860.43 6.785 20 0 0 0 160 0 0 0 -10 1 1 9 11 5860.43 6.785 20 0 0 0 180 0 0 0 -11 1 1 10 1 5860.43 6.785 20 0 0 0 200 0 0 0 -12 2 1 22 13 5860.43 6.785 20 0 16.6992 0 0 0 0 0 -13 2 1 12 14 5860.43 6.785 20 0 16.6992 0 20 0 0 0 -14 2 1 13 15 5860.43 6.785 20 0 16.6992 0 40 0 0 0 -15 2 1 14 16 5860.43 6.785 20 0 16.6992 0 60 0 0 0 -16 2 1 15 17 5860.43 6.785 20 0 16.6992 0 80 0 0 0 -17 2 1 16 18 5860.43 6.785 20 0 16.6992 0 100 0 0 0 -18 2 1 17 19 5860.43 6.785 20 0 16.6992 0 120 0 0 0 -19 2 1 18 20 5860.43 6.785 20 0 16.6992 0 140 0 0 0 -20 2 1 19 21 5860.43 6.785 20 0 16.6992 0 160 0 0 0 -21 2 1 20 22 5860.43 6.785 20 0 16.6992 0 180 0 0 0 -22 2 1 21 12 5860.43 6.785 20 0 16.6992 0 200 0 0 0 -23 3 1 33 24 5860.43 6.785 20 0 8.3496 14.4619 0 0 0 0 -24 3 1 23 25 5860.43 6.785 20 0 8.3496 14.4619 20 0 0 0 -25 3 1 24 26 5860.43 6.785 20 0 8.3496 14.4619 40 0 0 0 -26 3 1 25 27 5860.43 6.785 20 0 8.3496 14.4619 60 0 0 0 -27 3 1 26 28 5860.43 6.785 20 0 8.3496 14.4619 80 0 0 0 -28 3 1 27 29 5860.43 6.785 20 0 8.3496 14.4619 100 0 0 0 -29 3 1 28 30 5860.43 6.785 20 0 8.3496 14.4619 120 0 0 0 -30 3 1 29 31 5860.43 6.785 20 0 8.3496 14.4619 140 0 0 0 -31 3 1 30 32 5860.43 6.785 20 0 8.3496 14.4619 160 0 0 0 -32 3 1 31 33 5860.43 6.785 20 0 8.3496 14.4619 180 0 0 0 -33 3 1 32 23 5860.43 6.785 20 0 8.3496 14.4619 200 0 0 0 -34 4 1 44 35 5860.43 6.785 20 0 -8.3496 14.4619 0 0 0 0 -35 4 1 34 36 5860.43 6.785 20 0 -8.3496 14.4619 20 0 0 0 -36 4 1 35 37 5860.43 6.785 20 0 -8.3496 14.4619 40 0 0 0 -37 4 1 36 38 5860.43 6.785 20 0 -8.3496 14.4619 60 0 0 0 -38 4 1 37 39 5860.43 6.785 20 0 -8.3496 14.4619 80 0 0 0 -39 4 1 38 40 5860.43 6.785 20 0 -8.3496 14.4619 100 0 0 0 -40 4 1 39 41 5860.43 6.785 20 0 -8.3496 14.4619 120 0 0 0 -41 4 1 40 42 5860.43 6.785 20 0 -8.3496 14.4619 140 0 0 0 -42 4 1 41 43 5860.43 6.785 20 0 -8.3496 14.4619 160 0 0 0 -43 4 1 42 44 5860.43 6.785 20 0 -8.3496 14.4619 180 0 0 0 -44 4 1 43 34 5860.43 6.785 20 0 -8.3496 14.4619 200 0 0 0 -45 5 1 55 46 5860.43 6.785 20 0 -16.6992 0 0 0 0 0 -46 5 1 45 47 5860.43 6.785 20 0 -16.6992 0 20 0 0 0 -47 5 1 46 48 5860.43 6.785 20 0 -16.6992 0 40 0 0 0 -48 5 1 47 49 5860.43 6.785 20 0 -16.6992 0 60 0 0 0 -49 5 1 48 50 5860.43 6.785 20 0 -16.6992 0 80 0 0 0 -50 5 1 49 51 5860.43 6.785 20 0 -16.6992 0 100 0 0 0 -51 5 1 50 52 5860.43 6.785 20 0 -16.6992 0 120 0 0 0 -52 5 1 51 53 5860.43 6.785 20 0 -16.6992 0 140 0 0 0 -53 5 1 52 54 5860.43 6.785 20 0 -16.6992 0 160 0 0 0 -54 5 1 53 55 5860.43 6.785 20 0 -16.6992 0 180 0 0 0 -55 5 1 54 45 5860.43 6.785 20 0 -16.6992 0 200 0 0 0 -56 6 1 66 57 5860.43 6.785 20 0 -8.3496 -14.4619 0 0 0 0 -57 6 1 56 58 5860.43 6.785 20 0 -8.3496 -14.4619 20 0 0 0 -58 6 1 57 59 5860.43 6.785 20 0 -8.3496 -14.4619 40 0 0 0 -59 6 1 58 60 5860.43 6.785 20 0 -8.3496 -14.4619 60 0 0 0 -60 6 1 59 61 5860.43 6.785 20 0 -8.3496 -14.4619 80 0 0 0 -61 6 1 60 62 5860.43 6.785 20 0 -8.3496 -14.4619 100 0 0 0 -62 6 1 61 63 5860.43 6.785 20 0 -8.3496 -14.4619 120 0 0 0 -63 6 1 62 64 5860.43 6.785 20 0 -8.3496 -14.4619 140 0 0 0 -64 6 1 63 65 5860.43 6.785 20 0 -8.3496 -14.4619 160 0 0 0 -65 6 1 64 66 5860.43 6.785 20 0 -8.3496 -14.4619 180 0 0 0 -66 6 1 65 56 5860.43 6.785 20 0 -8.3496 -14.4619 200 0 0 0 -67 7 1 77 68 5860.43 6.785 20 0 8.3496 -14.4619 0 0 0 0 -68 7 1 67 69 5860.43 6.785 20 0 8.3496 -14.4619 20 0 0 0 -69 7 1 68 70 5860.43 6.785 20 0 8.3496 -14.4619 40 0 0 0 -70 7 1 69 71 5860.43 6.785 20 0 8.3496 -14.4619 60 0 0 0 -71 7 1 70 72 5860.43 6.785 20 0 8.3496 -14.4619 80 0 0 0 -72 7 1 71 73 5860.43 6.785 20 0 8.3496 -14.4619 100 0 0 0 -73 7 1 72 74 5860.43 6.785 20 0 8.3496 -14.4619 120 0 0 0 -74 7 1 73 75 5860.43 6.785 20 0 8.3496 -14.4619 140 0 0 0 -75 7 1 74 76 5860.43 6.785 20 0 8.3496 -14.4619 160 0 0 0 -76 7 1 75 77 5860.43 6.785 20 0 8.3496 -14.4619 180 0 0 0 -77 7 1 76 67 5860.43 6.785 20 0 8.3496 -14.4619 200 0 0 0 -78 8 2 -1 -1 100.0 0.0 0 0 20.0 20.0 100.0 0 0 0 -79 9 2 -1 -1 100.0 0.0 0 0 20.0 20.0 103.8 0 0 0 diff --git a/examples/USER/mesont/bundle.init b/examples/USER/mesont/data.bundle similarity index 100% rename from examples/USER/mesont/bundle.init rename to examples/USER/mesont/data.bundle diff --git a/examples/USER/mesont/system.init b/examples/USER/mesont/data.film similarity index 100% rename from examples/USER/mesont/system.init rename to examples/USER/mesont/data.film diff --git a/examples/USER/mesont/in.bundle b/examples/USER/mesont/in.bundle new file mode 100644 index 0000000000..b5b0e1b99a --- /dev/null +++ b/examples/USER/mesont/in.bundle @@ -0,0 +1,32 @@ +newton on +units metal +lattice sc 1.0 +boundary fs fs p +neighbor 1.0 bin +neigh_modify every 5 delay 0 check yes + +atom_style mesont +# cut, path, BendingMode, TPMType +pair_style mesont/tpm 45.0 ../../../potentials/CNT_10_10 0 0 +read_data data.bundle +pair_coeff * * + +velocity all create 6000.0 2019 +timestep 0.005 +fix 1 all nve +thermo_modify flush yes +thermo 10 +reset_timestep 0 + +compute Es all mesont estretch +compute Eb all mesont ebend +compute Et all mesont etube +compute B all property/atom buckling +compute Es_tot all mesont estretch_tot +compute Eb_tot all mesont ebend_tot +compute Et_tot all mesont etube_tot + +thermo_style custom step time temp etotal ke pe c_Es_tot c_Eb_tot c_Et_tot +#dump out_dump all custom 50 dump.bundle id type x y z c_Es c_Eb c_Et c_B ix iy iz + +run 100 \ No newline at end of file diff --git a/examples/USER/mesont/in.film b/examples/USER/mesont/in.film new file mode 100644 index 0000000000..bfcc77c242 --- /dev/null +++ b/examples/USER/mesont/in.film @@ -0,0 +1,32 @@ +newton on +units metal +lattice sc 1.0 +boundary p p fs +neighbor 1.0 bin +neigh_modify every 5 delay 0 check yes + +atom_style mesont +# cut, path, BendingMode, TPMType +pair_style mesont/tpm 25.0 ../../../potentials/CNT_10_10 1 0 +read_data data.film +pair_coeff * * + +velocity all create 600.0 2019 +timestep 0.01 +fix 1 all nve +thermo_modify flush yes +thermo 10 +reset_timestep 0 + +compute Es all mesont estretch +compute Eb all mesont ebend +compute Et all mesont etube +compute B all property/atom buckling +compute Es_tot all mesont estretch_tot +compute Eb_tot all mesont ebend_tot +compute Et_tot all mesont etube_tot + +thermo_style custom step time temp etotal ke pe c_Es_tot c_Eb_tot c_Et_tot +#dump out_dump all custom 10 dump.film id type x y z c_Es c_Eb c_Et c_B ix iy iz + +run 10 \ No newline at end of file diff --git a/examples/USER/mesont/log.3Mar2020.bundle.g++.1 b/examples/USER/mesont/log.3Mar2020.bundle.g++.1 new file mode 100644 index 0000000000..a1ef6640a6 --- /dev/null +++ b/examples/USER/mesont/log.3Mar2020.bundle.g++.1 @@ -0,0 +1,94 @@ +LAMMPS (3 Mar 2020) +newton on +units metal +lattice sc 1.0 +Lattice spacing in x,y,z = 1 1 1 +boundary fs fs p +neighbor 1.0 bin +neigh_modify every 5 delay 0 check yes + +atom_style mesont +# cut, path, BendingMode, TPMType +pair_style mesont/tpm 45.0 ../../../potentials/CNT_10_10 0 0 +read_data data.bundle + orthogonal box = (-143.89 -143.89 0) to (143.89 143.89 220) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 77 atoms + read_data CPU = 0.442627 secs +pair_coeff * * + +velocity all create 6000.0 2019 +timestep 0.005 +fix 1 all nve +thermo_modify flush yes +thermo 10 +reset_timestep 0 + +compute Es all mesont estretch +compute Eb all mesont ebend +compute Et all mesont etube +compute B all property/atom buckling +compute Es_tot all mesont estretch_tot +compute Eb_tot all mesont ebend_tot +compute Et_tot all mesont etube_tot + +thermo_style custom step time temp etotal ke pe c_Es_tot c_Eb_tot c_Et_tot +WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:708) +#dump out_dump all custom 50 dump.bundle id type x y z c_Es c_Eb c_Et c_B ix iy iz + +run 100 +Neighbor list info ... + update every 5 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 46 + ghost atom cutoff = 46 + binsize = 23, bins = 7 7 10 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair mesont/tpm, perpetual + attributes: full, newton on, ghost + pair build: full/bin/ghost + stencil: full/ghost/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 4.675 | 4.675 | 4.675 Mbytes +Step Time Temp TotEng KinEng PotEng c_Es_tot c_Eb_tot c_Et_tot + 0 0 6000 -201.86935 58.942626 -260.81198 0 0 -260.81198 + 10 0.05 5114.1875 -201.86234 50.240607 -252.10295 4.8334861 2.3998206 -259.33626 + 20 0.1 3437.2958 -201.8522 33.767207 -235.61941 11.42384 8.3426957 -255.38594 + 30 0.15 2430.6571 -201.85242 23.878219 -225.73064 10.346152 14.72688 -250.80367 + 40 0.2 2154.4755 -201.85683 21.165074 -223.0219 6.8146112 18.325709 -248.16222 + 50 0.25 2021.7899 -201.85503 19.861601 -221.71663 9.2972022 17.644143 -248.65798 + 60 0.3 2234.553 -201.85193 21.951737 -223.80367 13.541921 13.673721 -251.01931 + 70 0.35 3099.6503 -201.85721 30.450255 -232.30747 11.833679 9.0583807 -253.19953 + 80 0.4 3849.9855 -201.8635 37.821376 -239.68487 7.9899173 6.4332848 -254.10807 + 90 0.45 3618.1311 -201.85967 35.543692 -237.40336 9.2616931 7.0452637 -253.71032 + 100 0.5 2866.2722 -201.85273 28.157602 -230.01033 12.204916 10.284525 -252.49977 +Loop time of 0.455531 on 1 procs for 100 steps with 77 atoms + +Performance: 94.834 ns/day, 0.253 hours/ns, 219.524 timesteps/s +99.7% 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.4551 | 0.4551 | 0.4551 | 0.0 | 99.91 +Neigh | 6.485e-05 | 6.485e-05 | 6.485e-05 | 0.0 | 0.01 +Comm | 3.0994e-05 | 3.0994e-05 | 3.0994e-05 | 0.0 | 0.01 +Output | 0.00020385 | 0.00020385 | 0.00020385 | 0.0 | 0.04 +Modify | 8.6069e-05 | 8.6069e-05 | 8.6069e-05 | 0.0 | 0.02 +Other | | 4.697e-05 | | | 0.01 + +Nlocal: 77 ave 77 max 77 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 35 ave 35 max 35 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 2222 ave 2222 max 2222 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 2222 +Ave neighs/atom = 28.8571 +Neighbor list builds = 1 +Dangerous builds = 0 +Total wall time: 0:00:01 diff --git a/examples/USER/mesont/log.3Mar2020.film.g++.1 b/examples/USER/mesont/log.3Mar2020.film.g++.1 new file mode 100644 index 0000000000..7b375bda31 --- /dev/null +++ b/examples/USER/mesont/log.3Mar2020.film.g++.1 @@ -0,0 +1,85 @@ +LAMMPS (3 Mar 2020) +newton on +units metal +lattice sc 1.0 +Lattice spacing in x,y,z = 1 1 1 +boundary p p fs +neighbor 1.0 bin +neigh_modify every 5 delay 0 check yes + +atom_style mesont +# cut, path, BendingMode, TPMType +pair_style mesont/tpm 25.0 ../../../potentials/CNT_10_10 1 0 +read_data data.film + orthogonal box = (-2500 -2500 -300) to (2500 2500 402.42) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 79596 atoms + read_data CPU = 0.0903821 secs +pair_coeff * * + +velocity all create 600.0 2019 +timestep 0.01 +fix 1 all nve +thermo_modify flush yes +thermo 10 +reset_timestep 0 + +compute Es all mesont estretch +compute Eb all mesont ebend +compute Et all mesont etube +compute B all property/atom buckling +compute Es_tot all mesont estretch_tot +compute Eb_tot all mesont ebend_tot +compute Et_tot all mesont etube_tot + +thermo_style custom step time temp etotal ke pe c_Es_tot c_Eb_tot c_Et_tot +WARNING: New thermo_style command, previous thermo_modify settings will be lost (../output.cpp:708) +#dump out_dump all custom 10 dump.film id type x y z c_Es c_Eb c_Et c_B ix iy iz + +run 10 +Neighbor list info ... + update every 5 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 26 + ghost atom cutoff = 26 + binsize = 13, bins = 385 385 31 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair mesont/tpm, perpetual + attributes: full, newton on, ghost + pair build: full/bin/ghost + stencil: full/ghost/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 44.83 | 44.83 | 44.83 Mbytes +Step Time Temp TotEng KinEng PotEng c_Es_tot c_Eb_tot c_Et_tot + 0 0 600 1347.2177 6173.0767 -4825.859 28.669574 21.29406 -4875.8226 + 10 0.1 389.40755 1373.7883 4006.4045 -2632.6161 848.00269 1404.4323 -4885.0511 +Loop time of 4.21003 on 1 procs for 10 steps with 79596 atoms + +Performance: 2.052 ns/day, 11.695 hours/ns, 2.375 timesteps/s +97.8% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 4.1942 | 4.1942 | 4.1942 | 0.0 | 99.62 +Neigh | 0 | 0 | 0 | 0.0 | 0.00 +Comm | 0.00046039 | 0.00046039 | 0.00046039 | 0.0 | 0.01 +Output | 0.00029182 | 0.00029182 | 0.00029182 | 0.0 | 0.01 +Modify | 0.012385 | 0.012385 | 0.012385 | 0.0 | 0.29 +Other | | 0.002726 | | | 0.06 + +Nlocal: 79596 ave 79596 max 79596 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1567 ave 1567 max 1567 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 412798 ave 412798 max 412798 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 412798 +Ave neighs/atom = 5.18617 +Neighbor list builds = 0 +Dangerous builds = 0 +Total wall time: 0:00:05 diff --git a/examples/USER/mesont/system.in b/examples/USER/mesont/system.in deleted file mode 100644 index 4bce7103b5..0000000000 --- a/examples/USER/mesont/system.in +++ /dev/null @@ -1,45 +0,0 @@ -newton on -log cnt.log -echo both -units metal -lattice sc 1.0 -boundary p p fs -neighbor 1.0 bin -neigh_modify every 5 delay 0 check yes - -atom_style mesont -# cut, path, BendingMode, TPMType -pair_style mesont/tpm 25.0 ../../../potentials/CNT_10_10 0 0 -read_data system.init -pair_coeff * * - -velocity all create 600.0 2019 -timestep 0.010 -fix 1 all nve -#fix 1 all nvt temp 300.0 300.0 1.0 -thermo_modify flush yes -thermo 10 -reset_timestep 0 - -compute Es all mesont/Es -compute Eb all mesont/Eb -compute Et all mesont/Et -compute Ek all ke/atom -compute Es_tot all mesont/Es_tot -compute Eb_tot all mesont/Eb_tot -compute Et_tot all mesont/Et_tot -compute Ep_tot all pe -compute Ek_tot all ke -variable time_ equal time -variable Ep_ equal c_Ep_tot -variable Ek_ equal c_Ek_tot -variable Etot_ equal v_Ek_+v_Ep_ -variable Es_ equal c_Es_tot -variable Eb_ equal c_Eb_tot -variable Et_ equal c_Et_tot - -dump out_dump all custom 50 config_E.dump id type x y z c_Es c_Eb c_Et c_Ek ix iy iz -fix out_info all print 10 "${time_} ${Etot_} ${Ek_} ${Ep_} ${Es_} ${Eb_} ${Et_}" file "E.txt" screen no - -run 50 -write_data system_E.data diff --git a/lib/mesont/ExportCNT.f90 b/lib/mesont/ExportCNT.f90 index 3f3c8dba80..5f468edfcc 100644 --- a/lib/mesont/ExportCNT.f90 +++ b/lib/mesont/ExportCNT.f90 @@ -79,9 +79,9 @@ contains real(c_double), intent(inout) :: U1, U2 ! Interaction energies associated with nodes X1 and X2 real(c_double), intent(inout), dimension(0:2) :: F1, F2 ! Forces exerted on nodes X1 and X2 real(c_double), intent(inout), dimension(0:2,0:2) :: S1, S2 ! Contributions of nodes X1 and X2 to the virial stress tensor - real(c_double), intent(in), dimension(0:2) :: X1, X2 ! Coordinates of the segmnet nodes + real(c_double), intent(in), dimension(0:2) :: X1, X2 ! Coordinates of the segment nodes real(c_double), intent(in) :: R12 ! Radius of nanotube the segment (X1,X2) belongs to - real(c_double), intent(in) :: L12 ! Equilubrium length of segment (X1,X2) + real(c_double), intent(in) :: L12 ! Equilibrium length of segment (X1,X2) call TubeStretchingForceField(U1, U2, F1, F2, S1, S2, X1, X2, R12, L12) endsubroutine @@ -93,7 +93,7 @@ contains real(c_double), intent(inout), dimension(0:2,0:2) :: S1, S2, S3 ! Contributions of nodes X1, X2, and X3 to the virial stress tensor real(c_double), intent(in), dimension(0:2) :: X1, X2, X3 ! Coordinates of nodes real(c_double), intent(in) :: R123 ! Radius of nanotube the segment (X1,X2) belongs to - real(c_double), intent(in) :: L123 ! Equilubrium length of segment (X1,X2) and (X2,X3) (It is assumed to be the same for both segments) + real(c_double), intent(in) :: L123 ! Equilibrium length of segment (X1,X2) and (X2,X3) (It is assumed to be the same for both segments) integer(c_int), intent(inout) :: BBF2 call TubeBendingForceField(U1, U2, U3, F1, F2, F3, S1, S2, S3, X1, X2, X3, R123, L123, BBF2 ) @@ -110,13 +110,13 @@ contains real(c_double), intent(inout), dimension(0:2,0:2) :: S1, S2 ! Contributions of nodes X1 and X2 to the virial stress tensor real(c_double), intent(inout), dimension(0:2,0:2,0:N-1) :: S ! Contributions of nodes X to the virial stress tensor real(c_double), intent(inout), dimension(0:2,0:2) :: Se ! Contributions of node Xe to the virial stress tensor (can be updated only if Ee > 0) - real(c_double), intent(in), dimension(0:2) :: X1, X2 ! Coordinates of the segmnet nodes + real(c_double), intent(in), dimension(0:2) :: X1, X2 ! Coordinates of the segment nodes real(c_double), intent(in) :: R12 ! Radius of nanotube the segment (X1,X2) belongs to real(c_double), intent(in), dimension(0:2,0:N-1) :: X ! Coordinates of the nanotube nodes real(c_double), intent(in), dimension(0:2) :: Xe ! Additional node of the extended chain if Ee > 0 integer(c_int), intent(in), dimension(0:N-1) :: BBF ! Bending buckling flags (BBF(i) = 1 in a case of buckling in node i) real(c_double), intent(in) :: R ! Radius of nanotube X - integer(c_int), intent(in) :: E1, E2 ! E1 = 1 if the chnane node 0 is a CNT end; E2 = 1 if the chnane node N-1 is a CNT end; + integer(c_int), intent(in) :: E1, E2 ! E1 = 1 if the chain node 0 is a CNT end; E2 = 1 if the chain node N-1 is a CNT end; integer(c_int), intent(in) :: Ee ! Parameter defining the type of the extended chain (0,1,2) integer(c_int), intent(in) :: TPMType ! Type of the tubular potential (0 or 1) diff --git a/lib/mesont/Install.py b/lib/mesont/Install.py new file mode 100644 index 0000000000..ffe709d44c --- /dev/null +++ b/lib/mesont/Install.py @@ -0,0 +1 @@ +../Install.py \ No newline at end of file diff --git a/lib/mesont/Makefile.gfortran b/lib/mesont/Makefile.gfortran index 1d95965148..e6b8be2a43 100644 --- a/lib/mesont/Makefile.gfortran +++ b/lib/mesont/Makefile.gfortran @@ -20,7 +20,7 @@ OBJ = $(SRC:.f90=.o) F90 = gfortran CC = gcc -F90FLAGS = -O3 -fPIC -ffast-math -ftree-vectorize -fexpensive-optimizations -fno-second-underscore -g -ffree-line-length-none -cpp +F90FLAGS = -O3 -fPIC -ffast-math -ftree-vectorize -fexpensive-optimizations -fno-second-underscore -g -ffree-line-length-none #F90FLAGS = -O ARCHIVE = ar ARCHFLAG = -rc diff --git a/lib/mesont/Makefile.ifort b/lib/mesont/Makefile.ifort index 9c681ac67d..09c39dd69d 100644 --- a/lib/mesont/Makefile.ifort +++ b/lib/mesont/Makefile.ifort @@ -19,7 +19,7 @@ OBJ = $(SRC:.f90=.o) # ------ SETTINGS ------ F90 = ifort -F90FLAGS = -Ofast -fPIC -ipo -fpp +F90FLAGS = -Ofast -fPIC -ipo ARCHIVE = ar ARCHFLAG = -rc USRLIB = diff --git a/lib/mesont/Makefile.lammps.ifort b/lib/mesont/Makefile.lammps.ifort index e2ae373f07..228e3d4bd9 100644 --- a/lib/mesont/Makefile.lammps.ifort +++ b/lib/mesont/Makefile.lammps.ifort @@ -1,5 +1,5 @@ # Settings that the LAMMPS build will import when this package library is used mesont_SYSINC = -mesont_SYSLIB = -lifcore -lsvml -limf -ldl -lstdc++ -lgfortran -mesont_SYSPATH = -L/opt/intel/fce/10.0.023/lib +mesont_SYSLIB = -lifcore -lsvml -limf -ldl -lstdc++ +mesont_SYSPATH = diff --git a/src/Makefile b/src/Makefile index bce5089500..4dae04db2f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -60,7 +60,7 @@ PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ PACKUSER = user-adios user-atc user-awpmd user-bocs user-cgdna user-cgsdk user-colvars \ user-diffraction user-dpd user-drude user-eff user-fep user-h5md \ - user-intel user-lb user-manifold user-meamc user-mesodpd \ + user-intel user-lb user-manifold user-meamc user-meso \ user-mgpt user-misc user-mofff user-molfile \ user-netcdf user-omp user-phonon user-plumed user-ptm user-qmmm \ user-qtb user-quip user-reaction user-reaxc user-scafacos user-smd user-smtbq \ @@ -70,11 +70,11 @@ PACKLIB = compress gpu kim kokkos latte message mpiio mscg poems \ python voronoi \ user-adios user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \ user-netcdf user-plumed user-qmmm user-quip user-scafacos \ - user-smd user-vtk + user-smd user-vtk user-mesont PACKSYS = compress mpiio python user-lb -PACKINT = gpu kokkos message poems user-atc user-awpmd user-colvars +PACKINT = gpu kokkos message poems user-atc user-awpmd user-colvars user-mesont PACKEXT = kim latte mscg voronoi \ user-adios user-h5md user-molfile user-netcdf user-plumed user-qmmm user-quip \ diff --git a/src/USER-MESONT/README b/src/USER-MESONT/README index 90a07b8313..bb45e0ac34 100644 --- a/src/USER-MESONT/README +++ b/src/USER-MESONT/README @@ -32,14 +32,12 @@ pair_style mesont/tpm cut table_path BendingMode TPMType and Tcut = 10.2 A is the maximum distance between surfaces of interacting segments. -compute mesont/Es, mesont/Eb, mesont/Et, mesont/B - These commands allow for the evaluation of per atom values of stretching, - bending, and intertube interaction components of energies, and buckling - flags. - -compute mesont/Es_tot, mesont/Eb_tot, mesont/Et_tot - These commands allow for the evaluation of total values of stretching, - bending, and intertube interaction energies. +compute mesont + This command allows evaluation of per atom and total values of stretching, + bending, and intertube interaction components of energies. Use the following + flags to obtain specific values: 'estretch' and 'estretch_tot' are per atom (node) + and total stretching energies, 'ebend' and 'ebend_tot' are per atom and total + bending energy, 'etube' and 'etube_tot' are per atom and total intertube energies -- diff --git a/src/USER-MESONT/atom_vec_mesont.cpp b/src/USER-MESONT/atom_vec_mesont.cpp index 38052aeefb..6ef6bd6cd9 100644 --- a/src/USER-MESONT/atom_vec_mesont.cpp +++ b/src/USER-MESONT/atom_vec_mesont.cpp @@ -27,10 +27,12 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -AtomVecMESONT::AtomVecMESONT(LAMMPS *lmp) : AtomVec(lmp) +AtomVecMesoNT::AtomVecMesoNT(LAMMPS *lmp) : AtomVec(lmp) { mass_type = 1; - + atom->mesont_flag = 1; + molecular = 0; + comm_x_only = comm_f_only = 1; size_forward = 3; size_reverse = 3; @@ -47,7 +49,7 @@ AtomVecMESONT::AtomVecMESONT(LAMMPS *lmp) : AtomVec(lmp) n > 0 allocates arrays to size n ------------------------------------------------------------------------- */ -void AtomVecMESONT::grow(int n) +void AtomVecMesoNT::grow(int n) { if (n == 0) grow_nmax(); else nmax = n; @@ -68,7 +70,7 @@ void AtomVecMESONT::grow(int n) length = memory->grow(atom->length,nmax,"atom:length"); buckling = memory->grow(atom->buckling,nmax,"atom:buckling"); molecule = memory->grow(atom->molecule,nmax,"atom:molecule"); - bond_cnt = memory->grow(atom->bond_cnt,nmax,2,"atom:bond_cnt"); + bond_nt = memory->grow(atom->bond_nt,nmax,2,"atom:bond_nt"); if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) @@ -79,7 +81,7 @@ void AtomVecMESONT::grow(int n) reset local array ptrs ------------------------------------------------------------------------- */ -void AtomVecMESONT::grow_reset() +void AtomVecMesoNT::grow_reset() { tag = atom->tag; type = atom->type; mask = atom->mask; image = atom->image; @@ -90,14 +92,14 @@ void AtomVecMESONT::grow_reset() length = atom->length; buckling = atom->buckling; molecule = atom->molecule; - bond_cnt = atom->bond_cnt; + bond_nt = atom->bond_nt; } /* ---------------------------------------------------------------------- copy atom I info to atom J ------------------------------------------------------------------------- */ -void AtomVecMESONT::copy(int i, int j, int delflag) +void AtomVecMesoNT::copy(int i, int j, int delflag) { tag[j] = tag[i]; type[j] = type[i]; @@ -115,8 +117,8 @@ void AtomVecMESONT::copy(int i, int j, int delflag) length[j] = length[i]; buckling[j] = buckling[i]; molecule[j] = molecule[i]; - bond_cnt[j][0] = bond_cnt[i][0]; - bond_cnt[j][1] = bond_cnt[i][1]; + bond_nt[j][0] = bond_nt[i][0]; + bond_nt[j][1] = bond_nt[i][1]; if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) @@ -125,7 +127,7 @@ void AtomVecMESONT::copy(int i, int j, int delflag) /* ---------------------------------------------------------------------- */ -int AtomVecMESONT::pack_comm(int n, int *list, double *buf, +int AtomVecMesoNT::pack_comm(int n, int *list, double *buf, int pbc_flag, int *pbc) { int i,j,m; @@ -161,7 +163,7 @@ int AtomVecMESONT::pack_comm(int n, int *list, double *buf, /* ---------------------------------------------------------------------- */ -int AtomVecMESONT::pack_comm_vel(int n, int *list, double *buf, +int AtomVecMesoNT::pack_comm_vel(int n, int *list, double *buf, int pbc_flag, int *pbc) { int i,j,m; @@ -224,7 +226,7 @@ int AtomVecMESONT::pack_comm_vel(int n, int *list, double *buf, /* ---------------------------------------------------------------------- */ -void AtomVecMESONT::unpack_comm(int n, int first, double *buf) +void AtomVecMesoNT::unpack_comm(int n, int first, double *buf) { int i,m,last; @@ -239,7 +241,7 @@ void AtomVecMESONT::unpack_comm(int n, int first, double *buf) /* ---------------------------------------------------------------------- */ -void AtomVecMESONT::unpack_comm_vel(int n, int first, double *buf) +void AtomVecMesoNT::unpack_comm_vel(int n, int first, double *buf) { int i,m,last; @@ -257,7 +259,7 @@ void AtomVecMESONT::unpack_comm_vel(int n, int first, double *buf) /* ---------------------------------------------------------------------- */ -int AtomVecMESONT::pack_reverse(int n, int first, double *buf) +int AtomVecMesoNT::pack_reverse(int n, int first, double *buf) { int i,m,last; @@ -273,7 +275,7 @@ int AtomVecMESONT::pack_reverse(int n, int first, double *buf) /* ---------------------------------------------------------------------- */ -void AtomVecMESONT::unpack_reverse(int n, int *list, double *buf) +void AtomVecMesoNT::unpack_reverse(int n, int *list, double *buf) { int i,j,m; @@ -288,7 +290,7 @@ void AtomVecMESONT::unpack_reverse(int n, int *list, double *buf) /* ---------------------------------------------------------------------- */ -int AtomVecMESONT::pack_border(int n, int *list, double *buf, +int AtomVecMesoNT::pack_border(int n, int *list, double *buf, int pbc_flag, int *pbc) { int i,j,m; @@ -310,8 +312,8 @@ int AtomVecMESONT::pack_border(int n, int *list, double *buf, buf[m++] = length[j]; buf[m++] = ubuf(buckling[j]).d; buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(bond_cnt[j][0]).d; - buf[m++] = ubuf(bond_cnt[j][1]).d; + buf[m++] = ubuf(bond_nt[j][0]).d; + buf[m++] = ubuf(bond_nt[j][1]).d; } } else { if (domain->triclinic == 0) { @@ -337,8 +339,8 @@ int AtomVecMESONT::pack_border(int n, int *list, double *buf, buf[m++] = length[j]; buf[m++] = ubuf(buckling[j]).d; buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(bond_cnt[j][0]).d; - buf[m++] = ubuf(bond_cnt[j][1]).d; + buf[m++] = ubuf(bond_nt[j][0]).d; + buf[m++] = ubuf(bond_nt[j][1]).d; } } @@ -352,7 +354,7 @@ int AtomVecMESONT::pack_border(int n, int *list, double *buf, /* ---------------------------------------------------------------------- */ -int AtomVecMESONT::pack_border_vel(int n, int *list, double *buf, +int AtomVecMesoNT::pack_border_vel(int n, int *list, double *buf, int pbc_flag, int *pbc) { int i,j,m; @@ -373,8 +375,8 @@ int AtomVecMESONT::pack_border_vel(int n, int *list, double *buf, buf[m++] = length[j]; buf[m++] = ubuf(buckling[j]).d; buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(bond_cnt[j][0]).d; - buf[m++] = ubuf(bond_cnt[j][1]).d; + buf[m++] = ubuf(bond_nt[j][0]).d; + buf[m++] = ubuf(bond_nt[j][1]).d; buf[m++] = v[j][0]; buf[m++] = v[j][1]; buf[m++] = v[j][2]; @@ -403,8 +405,8 @@ int AtomVecMESONT::pack_border_vel(int n, int *list, double *buf, buf[m++] = length[j]; buf[m++] = ubuf(buckling[j]).d; buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(bond_cnt[j][0]).d; - buf[m++] = ubuf(bond_cnt[j][1]).d; + buf[m++] = ubuf(bond_nt[j][0]).d; + buf[m++] = ubuf(bond_nt[j][1]).d; buf[m++] = v[j][0]; buf[m++] = v[j][1]; buf[m++] = v[j][2]; @@ -426,8 +428,8 @@ int AtomVecMESONT::pack_border_vel(int n, int *list, double *buf, buf[m++] = length[j]; buf[m++] = ubuf(buckling[j]).d; buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(bond_cnt[j][0]).d; - buf[m++] = ubuf(bond_cnt[j][1]).d; + buf[m++] = ubuf(bond_nt[j][0]).d; + buf[m++] = ubuf(bond_nt[j][1]).d; if (mask[i] & deform_groupbit) { buf[m++] = v[j][0] + dvx; buf[m++] = v[j][1] + dvy; @@ -451,7 +453,7 @@ int AtomVecMESONT::pack_border_vel(int n, int *list, double *buf, /* ---------------------------------------------------------------------- */ -int AtomVecMESONT::pack_border_hybrid(int n, int *list, double *buf) +int AtomVecMesoNT::pack_border_hybrid(int n, int *list, double *buf) { int i,j,m; @@ -463,15 +465,15 @@ int AtomVecMESONT::pack_border_hybrid(int n, int *list, double *buf) buf[m++] = length[j]; buf[m++] = ubuf(buckling[j]).d; buf[m++] = ubuf(molecule[j]).d; - buf[m++] = ubuf(bond_cnt[j][0]).d; - buf[m++] = ubuf(bond_cnt[j][1]).d; + buf[m++] = ubuf(bond_nt[j][0]).d; + buf[m++] = ubuf(bond_nt[j][1]).d; } return m; } /* ---------------------------------------------------------------------- */ -void AtomVecMESONT::unpack_border(int n, int first, double *buf) +void AtomVecMesoNT::unpack_border(int n, int first, double *buf) { int i,m,last; @@ -491,8 +493,8 @@ void AtomVecMESONT::unpack_border(int n, int first, double *buf) length[i] = buf[m++]; buckling[i] = (int) ubuf(buf[m++]).i; molecule[i] = (tagint) ubuf(buf[m++]).i; - bond_cnt[i][0] = (tagint) ubuf(buf[m++]).i; - bond_cnt[i][1] = (tagint) ubuf(buf[m++]).i; + bond_nt[i][0] = (tagint) ubuf(buf[m++]).i; + bond_nt[i][1] = (tagint) ubuf(buf[m++]).i; } if (atom->nextra_border) @@ -503,7 +505,7 @@ void AtomVecMESONT::unpack_border(int n, int first, double *buf) /* ---------------------------------------------------------------------- */ -void AtomVecMESONT::unpack_border_vel(int n, int first, double *buf) +void AtomVecMesoNT::unpack_border_vel(int n, int first, double *buf) { int i,m,last; @@ -522,8 +524,8 @@ void AtomVecMESONT::unpack_border_vel(int n, int first, double *buf) length[i] = buf[m++]; buckling[i] = (int) ubuf(buf[m++]).i; molecule[i] = (tagint) ubuf(buf[m++]).i; - bond_cnt[i][0] = (tagint) ubuf(buf[m++]).i; - bond_cnt[i][1] = (tagint) ubuf(buf[m++]).i; + bond_nt[i][0] = (tagint) ubuf(buf[m++]).i; + bond_nt[i][1] = (tagint) ubuf(buf[m++]).i; v[i][0] = buf[m++]; v[i][1] = buf[m++]; v[i][2] = buf[m++]; @@ -537,7 +539,7 @@ void AtomVecMESONT::unpack_border_vel(int n, int first, double *buf) /* ---------------------------------------------------------------------- */ -int AtomVecMESONT::unpack_border_hybrid(int n, int first, double *buf) +int AtomVecMesoNT::unpack_border_hybrid(int n, int first, double *buf) { int i,m,last; @@ -549,8 +551,8 @@ int AtomVecMESONT::unpack_border_hybrid(int n, int first, double *buf) length[i] = buf[m++]; buckling[i] = (int) ubuf(buf[m++]).i; molecule[i] = (tagint) ubuf(buf[m++]).i; - bond_cnt[i][0] = (tagint) ubuf(buf[m++]).i; - bond_cnt[i][1] = (tagint) ubuf(buf[m++]).i; + bond_nt[i][0] = (tagint) ubuf(buf[m++]).i; + bond_nt[i][1] = (tagint) ubuf(buf[m++]).i; } return m; } @@ -560,7 +562,7 @@ int AtomVecMESONT::unpack_border_hybrid(int n, int first, double *buf) xyz must be 1st 3 values, so comm::exchange() can test on them ------------------------------------------------------------------------- */ -int AtomVecMESONT::pack_exchange(int i, double *buf) +int AtomVecMesoNT::pack_exchange(int i, double *buf) { int m = 1; buf[m++] = x[i][0]; @@ -579,8 +581,8 @@ int AtomVecMESONT::pack_exchange(int i, double *buf) buf[m++] = length[i]; buf[m++] = ubuf(buckling[i]).d; buf[m++] = ubuf(molecule[i]).d; - buf[m++] = ubuf(bond_cnt[i][0]).d; - buf[m++] = ubuf(bond_cnt[i][1]).d; + buf[m++] = ubuf(bond_nt[i][0]).d; + buf[m++] = ubuf(bond_nt[i][1]).d; if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) @@ -592,7 +594,7 @@ int AtomVecMESONT::pack_exchange(int i, double *buf) /* ---------------------------------------------------------------------- */ -int AtomVecMESONT::unpack_exchange(double *buf) +int AtomVecMesoNT::unpack_exchange(double *buf) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); @@ -614,8 +616,8 @@ int AtomVecMESONT::unpack_exchange(double *buf) length[nlocal] = buf[m++]; buckling[nlocal] = (int) ubuf(buf[m++]).i; molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - bond_cnt[nlocal][0] = (tagint) ubuf(buf[m++]).i; - bond_cnt[nlocal][1] = (tagint) ubuf(buf[m++]).i; + bond_nt[nlocal][0] = (tagint) ubuf(buf[m++]).i; + bond_nt[nlocal][1] = (tagint) ubuf(buf[m++]).i; if (atom->nextra_grow) for (int iextra = 0; iextra < atom->nextra_grow; iextra++) @@ -631,7 +633,7 @@ int AtomVecMESONT::unpack_exchange(double *buf) include extra data stored by fixes ------------------------------------------------------------------------- */ -int AtomVecMESONT::size_restart() +int AtomVecMesoNT::size_restart() { int i; @@ -652,7 +654,7 @@ int AtomVecMESONT::size_restart() molecular types may be negative, but write as positive ------------------------------------------------------------------------- */ -int AtomVecMESONT::pack_restart(int i, double *buf) +int AtomVecMesoNT::pack_restart(int i, double *buf) { int m = 1; buf[m++] = x[i][0]; @@ -667,8 +669,8 @@ int AtomVecMESONT::pack_restart(int i, double *buf) buf[m++] = length[i]; buf[m++] = ubuf(buckling[i]).d; buf[m++] = ubuf(molecule[i]).d; - buf[m++] = ubuf(bond_cnt[i][0]).d; - buf[m++] = ubuf(bond_cnt[i][1]).d; + buf[m++] = ubuf(bond_nt[i][0]).d; + buf[m++] = ubuf(bond_nt[i][1]).d; buf[m++] = v[i][0]; buf[m++] = v[i][1]; buf[m++] = v[i][2]; @@ -685,7 +687,7 @@ int AtomVecMESONT::pack_restart(int i, double *buf) unpack data for one atom from restart file including extra quantities ------------------------------------------------------------------------- */ -int AtomVecMESONT::unpack_restart(double *buf) +int AtomVecMesoNT::unpack_restart(double *buf) { int nlocal = atom->nlocal; if (nlocal == nmax) { @@ -707,8 +709,8 @@ int AtomVecMESONT::unpack_restart(double *buf) length[nlocal] = buf[m++]; buckling[nlocal] = (int) ubuf(buf[m++]).i; molecule[nlocal] = (tagint) ubuf(buf[m++]).i; - bond_cnt[nlocal][0] = (tagint) ubuf(buf[m++]).i; - bond_cnt[nlocal][1] = (tagint) ubuf(buf[m++]).i; + bond_nt[nlocal][0] = (tagint) ubuf(buf[m++]).i; + bond_nt[nlocal][1] = (tagint) ubuf(buf[m++]).i; v[nlocal][0] = buf[m++]; v[nlocal][1] = buf[m++]; v[nlocal][2] = buf[m++]; @@ -728,7 +730,7 @@ int AtomVecMESONT::unpack_restart(double *buf) set other values to defaults ------------------------------------------------------------------------- */ -void AtomVecMESONT::create_atom(int itype, double *coord) +void AtomVecMesoNT::create_atom(int itype, double *coord) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); @@ -746,8 +748,8 @@ void AtomVecMESONT::create_atom(int itype, double *coord) length[nlocal] = 1.0; buckling[nlocal] = 0; molecule[nlocal] = 0; - bond_cnt[nlocal][0] = -1; - bond_cnt[nlocal][1] = -1; + bond_nt[nlocal][0] = -1; + bond_nt[nlocal][1] = -1; v[nlocal][0] = 0.0; v[nlocal][1] = 0.0; v[nlocal][2] = 0.0; @@ -760,7 +762,7 @@ void AtomVecMESONT::create_atom(int itype, double *coord) initialize other atom quantities ------------------------------------------------------------------------- */ -void AtomVecMESONT::data_atom(double *coord, imageint imagetmp, char **values) +void AtomVecMesoNT::data_atom(double *coord, imageint imagetmp, char **values) { int nlocal = atom->nlocal; if (nlocal == nmax) grow(0); @@ -770,8 +772,8 @@ void AtomVecMESONT::data_atom(double *coord, imageint imagetmp, char **values) type[nlocal] = utils::inumeric(FLERR,values[2],true,lmp); if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes) error->one(FLERR,"Invalid atom type in Atoms section of data file"); - bond_cnt[nlocal][0] = utils::inumeric(FLERR,values[3],true,lmp); - bond_cnt[nlocal][1] = utils::inumeric(FLERR,values[4],true,lmp); + bond_nt[nlocal][0] = utils::inumeric(FLERR,values[3],true,lmp); + bond_nt[nlocal][1] = utils::inumeric(FLERR,values[4],true,lmp); rmass[nlocal] = utils::numeric(FLERR,values[5],true,lmp); radius[nlocal] = utils::numeric(FLERR,values[6],true,lmp); length[nlocal] = utils::numeric(FLERR,values[7],true,lmp); @@ -796,11 +798,11 @@ void AtomVecMESONT::data_atom(double *coord, imageint imagetmp, char **values) initialize other atom quantities for this sub-style ------------------------------------------------------------------------- */ -int AtomVecMESONT::data_atom_hybrid(int nlocal, char **values) +int AtomVecMesoNT::data_atom_hybrid(int nlocal, char **values) { molecule[nlocal] = utils::tnumeric(FLERR,values[0],true,lmp); - bond_cnt[nlocal][0] = utils::inumeric(FLERR,values[1],true,lmp); - bond_cnt[nlocal][1] = utils::inumeric(FLERR,values[2],true,lmp); + bond_nt[nlocal][0] = utils::inumeric(FLERR,values[1],true,lmp); + bond_nt[nlocal][1] = utils::inumeric(FLERR,values[2],true,lmp); rmass[nlocal] = utils::numeric(FLERR,values[3],true,lmp); radius[nlocal] = utils::numeric(FLERR,values[4],true,lmp); length[nlocal] = utils::numeric(FLERR,values[5],true,lmp); @@ -813,7 +815,7 @@ int AtomVecMESONT::data_atom_hybrid(int nlocal, char **values) pack atom info for data file including 3 image flags ------------------------------------------------------------------------- */ -void AtomVecMESONT::pack_data(double **buf) +void AtomVecMesoNT::pack_data(double **buf) { int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { @@ -821,8 +823,8 @@ void AtomVecMESONT::pack_data(double **buf) buf[i][m++] = ubuf(tag[i]).d; buf[i][m++] = ubuf(molecule[i]).d; buf[i][m++] = ubuf(type[i]).d; - buf[i][m++] = ubuf(bond_cnt[i][0]).d; - buf[i][m++] = ubuf(bond_cnt[i][1]).d; + buf[i][m++] = ubuf(bond_nt[i][0]).d; + buf[i][m++] = ubuf(bond_nt[i][1]).d; buf[i][m++] = rmass[i]; buf[i][m++] = radius[i]; buf[i][m++] = length[i]; @@ -840,12 +842,12 @@ void AtomVecMESONT::pack_data(double **buf) pack hybrid atom info for data file ------------------------------------------------------------------------- */ -int AtomVecMESONT::pack_data_hybrid(int i, double *buf) +int AtomVecMesoNT::pack_data_hybrid(int i, double *buf) { int m = 0; buf[m++] = ubuf(molecule[i]).d; - buf[m++] = ubuf(bond_cnt[i][0]).d; - buf[m++] = ubuf(bond_cnt[i][1]).d; + buf[m++] = ubuf(bond_nt[i][0]).d; + buf[m++] = ubuf(bond_nt[i][1]).d; buf[m++] = rmass[i]; buf[m++] = radius[i]; buf[m++] = length[i]; @@ -857,7 +859,7 @@ int AtomVecMESONT::pack_data_hybrid(int i, double *buf) write atom info to data file including 3 image flags ------------------------------------------------------------------------- */ -void AtomVecMESONT::write_data(FILE *fp, int n, double **buf) +void AtomVecMesoNT::write_data(FILE *fp, int n, double **buf) { for (int i = 0; i < n; i++) fprintf(fp, TAGINT_FORMAT " " TAGINT_FORMAT " %d " @@ -876,7 +878,7 @@ void AtomVecMESONT::write_data(FILE *fp, int n, double **buf) write hybrid atom info to data file ------------------------------------------------------------------------- */ -int AtomVecMESONT::write_data_hybrid(FILE *fp, double *buf) +int AtomVecMesoNT::write_data_hybrid(FILE *fp, double *buf) { fprintf(fp," " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT " %-1.16e %-1.16e %-1.16e %d", @@ -889,7 +891,7 @@ int AtomVecMESONT::write_data_hybrid(FILE *fp, double *buf) return # of bytes of allocated memory ------------------------------------------------------------------------- */ -bigint AtomVecMESONT::memory_usage() +bigint AtomVecMesoNT::memory_usage() { bigint bytes = 0; @@ -906,7 +908,7 @@ bigint AtomVecMESONT::memory_usage() if (atom->memcheck("length")) bytes += memory->usage(length,nmax); if (atom->memcheck("buckling")) bytes += memory->usage(buckling,nmax); if (atom->memcheck("molecule")) bytes += memory->usage(molecule,nmax); - if (atom->memcheck("bond_cnt")) bytes += memory->usage(bond_cnt,nmax,2); + if (atom->memcheck("bond_nt")) bytes += memory->usage(bond_nt,nmax,2); return bytes; } diff --git a/src/USER-MESONT/atom_vec_mesont.h b/src/USER-MESONT/atom_vec_mesont.h index 283e383308..d9c96fb542 100644 --- a/src/USER-MESONT/atom_vec_mesont.h +++ b/src/USER-MESONT/atom_vec_mesont.h @@ -15,7 +15,7 @@ #ifdef ATOM_CLASS -AtomStyle(mesont,AtomVecMESONT) +AtomStyle(mesont,AtomVecMesoNT) #else @@ -26,10 +26,10 @@ AtomStyle(mesont,AtomVecMESONT) namespace LAMMPS_NS { -class AtomVecMESONT : public AtomVec { +class AtomVecMesoNT : public AtomVec { public: - AtomVecMESONT(class LAMMPS *); - virtual ~AtomVecMESONT() {} + AtomVecMesoNT(class LAMMPS *); + virtual ~AtomVecMesoNT() {} void grow(int); void grow_reset(); void copy(int, int, int); @@ -66,7 +66,7 @@ class AtomVecMESONT : public AtomVec { double **x,**v,**f; double *rmass, *radius, *length; int *buckling; - tagint **bond_cnt; + tagint **bond_nt; tagint *molecule; }; diff --git a/src/USER-MESONT/compute_mesont.cpp b/src/USER-MESONT/compute_mesont.cpp new file mode 100644 index 0000000000..f34882f754 --- /dev/null +++ b/src/USER-MESONT/compute_mesont.cpp @@ -0,0 +1,163 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. + + Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu +------------------------------------------------------------------------- */ + +#include "compute_mesont.h" +#include +#include "atom.h" +#include "update.h" +#include "comm.h" +#include "force.h" +#include "modify.h" +#include "memory.h" +#include "error.h" +#include "pair.h" +#include + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +ComputeMesoNT::ComputeMesoNT(LAMMPS *lmp, int narg, char **arg) : + Compute(lmp, narg, arg), energy(NULL) { + if (narg != 4) error->all(FLERR,"Illegal compute mesont command"); + std::string ctype = arg[3]; + if (ctype == "estretch") compute_type = ES; + else if (ctype == "estretch_tot") compute_type = ESTOT; + else if (ctype == "ebend") compute_type = EB; + else if (ctype == "ebend_tot") compute_type = EBTOT; + else if (ctype == "etube") compute_type = ET; + else if (ctype == "etube_tot") compute_type = ETTOT; + else error->all(FLERR,"Illegal compute mesont command"); + + if ((compute_type == ES) || (compute_type == EB) || (compute_type == ET)) { + peratom_flag = 1; + size_peratom_cols = 0; + peatomflag = 1; + timeflag = 1; + comm_reverse = 1; + nmax = 0; + } else { + timeflag = 1; + extscalar = 1; + scalar_flag = 1; + } +} + +/* ---------------------------------------------------------------------- */ + +ComputeMesoNT::~ComputeMesoNT() { + memory->destroy(energy); +} + +/* ---------------------------------------------------------------------- */ + +double ComputeMesoNT::compute_scalar() { + invoked_scalar = update->ntimestep; + if (update->eflag_global != invoked_scalar) + error->all(FLERR,"Energy was not tallied on needed timestep"); + + int i; + double* ptr = NULL; + if (compute_type == ESTOT) + ptr = static_cast(force->pair->extract("mesonttpm_Es_tot",i)); + else if (compute_type == EBTOT) + ptr = static_cast(force->pair->extract("mesonttpm_Eb_tot",i)); + else if (compute_type == ETTOT) + ptr = static_cast(force->pair->extract("mesonttpm_Et_tot",i)); + else error->all(FLERR,"Illegal compute mesont command"); + + if (!ptr) error->all(FLERR, + "compute mesont is allowed only with mesont/tpm pair style"); + MPI_Allreduce(ptr,&scalar,1,MPI_DOUBLE,MPI_SUM,world); + + return scalar; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeMesoNT::compute_peratom() { + invoked_peratom = update->ntimestep; + if (update->eflag_atom != invoked_peratom) + error->all(FLERR,"Per-atom energy was not tallied on needed timestep"); + + // grow local energy array if necessary + // needs to be atom->nmax in length + if (atom->nmax > nmax) { + memory->destroy(energy); + nmax = atom->nmax; + memory->create(energy,nmax,"mesont_Eb:energy"); + vector_atom = energy; + } + + // npair includes ghosts if newton_bond is set + // ntotal includes ghosts if either newton flag is set + int nlocal = atom->nlocal; + int npair = nlocal; + if (force->newton) npair += atom->nghost; + int ntotal = nlocal; + if (force->newton) ntotal += atom->nghost; + int i; + // clear local energy array + for (int i = 0; i < ntotal; i++) energy[i] = 0.0; + double* ptr = NULL; + if (compute_type == ES) + ptr = static_cast(force->pair->extract("mesonttpm_Es",i)); + else if (compute_type == EB) + ptr = static_cast(force->pair->extract("mesonttpm_Eb",i)); + else if (compute_type == ET) + ptr = static_cast(force->pair->extract("mesonttpm_Et",i)); + else error->all(FLERR,"Illegal compute mesont command"); + + if (ptr) for (i = 0; i < npair; i++) energy[i] += ptr[i]; + else error->all(FLERR, + "compute mesont is allowed only with mesont/tpm pair style"); + + // communicate ghost energy between neighbor procs + if (force->newton) comm->reverse_comm_compute(this); + + // zero energy of atoms not in group + // only do this after comm since ghost contributions must be included + int *mask = atom->mask; + for (int i = 0; i < nlocal; i++) + if (!(mask[i] & groupbit)) energy[i] = 0.0; +} + +/* ---------------------------------------------------------------------- */ + +int ComputeMesoNT::pack_reverse_comm(int n, int first, double *buf) { + int m = 0; + int last = first + n; + for (int i = first; i < last; i++) buf[m++] = energy[i]; + return m; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeMesoNT::unpack_reverse_comm(int n, int *list, double *buf) { + int m = 0; + for (int i = 0; i < n; i++) { + int j = list[i]; + energy[j] += buf[m++]; + } +} + +/* ---------------------------------------------------------------------- + memory usage of local atom-based array +------------------------------------------------------------------------- */ + +double ComputeMesoNT::memory_usage() { + double bytes = nmax * sizeof(double); + return bytes; +} diff --git a/src/USER-MESONT/compute_mesont_Et.h b/src/USER-MESONT/compute_mesont.h similarity index 72% rename from src/USER-MESONT/compute_mesont_Et.h rename to src/USER-MESONT/compute_mesont.h index fe9f8f2384..6e4b1a3c5a 100644 --- a/src/USER-MESONT/compute_mesont_Et.h +++ b/src/USER-MESONT/compute_mesont.h @@ -15,30 +15,34 @@ #ifdef COMPUTE_CLASS -ComputeStyle(mesont/Et,ComputeMESONT_Et) +ComputeStyle(mesont,ComputeMesoNT) #else -#ifndef LMP_COMPUTE_MESONT_ET_ATOM_H -#define LMP_COMPUTE_MESONT_ET_ATOM_H +#ifndef LMP_COMPUTE_MESONT_ATOM_H +#define LMP_COMPUTE_MESONT_ATOM_H #include "compute.h" namespace LAMMPS_NS { -class ComputeMESONT_Et : public Compute { +class ComputeMesoNT : public Compute { public: - ComputeMESONT_Et(class LAMMPS *, int, char **); - ~ComputeMESONT_Et(); + ComputeMesoNT(class LAMMPS *, int, char **); + ~ComputeMesoNT(); void init() {} void compute_peratom(); + double compute_scalar(); int pack_reverse_comm(int, int, double *); void unpack_reverse_comm(int, int *, double *); double memory_usage(); - + private: int nmax; double *energy; + + enum ComputeType {ES, EB, ET, ESTOT, EBTOT, ETTOT}; + ComputeType compute_type; }; } @@ -48,7 +52,7 @@ class ComputeMESONT_Et : public Compute { /* ERROR/WARNING messages: -E: Illegal compute mesont/Et command +E: Illegal compute mesont command Incorrect argument list in the compute init. @@ -56,8 +60,8 @@ E: Per-atom energy was not tallied on needed timestep UNSPECIFIED. -E: mesont/Et is allowed only with mesont/tpm pair style +E: compute mesont is allowed only with mesont/tpm pair style -Use mesont/tpm pair style. +Use mesont pair style. */ diff --git a/src/USER-MESONT/compute_mesont_B.cpp b/src/USER-MESONT/compute_mesont_B.cpp deleted file mode 100644 index 9a3c6548e4..0000000000 --- a/src/USER-MESONT/compute_mesont_B.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#include "compute_mesont_B.h" -#include -#include "atom.h" -#include "update.h" -#include "comm.h" -#include "force.h" -#include "bond.h" -#include "modify.h" -#include "memory.h" -#include "error.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_B::ComputeMESONT_B(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg), - buckling(NULL) -{ - if (narg < 3) error->all(FLERR,"Illegal compute mesont/B command"); - - peratom_flag = 1; - size_peratom_cols = 0; - peatomflag = 1; - timeflag = 1; - comm_reverse = 0; - nmax = 0; -} - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_B::~ComputeMESONT_B() -{ - memory->destroy(buckling); -} - -/* ---------------------------------------------------------------------- */ - -void ComputeMESONT_B::compute_peratom() -{ - int i; - - // grow local buckling array if necessary - // needs to be atom->nmax in length - if (atom->nmax > nmax) { - memory->destroy(buckling); - nmax = atom->nmax; - memory->create(buckling,nmax,"mesont_B:buckling"); - vector_atom = buckling; - } - - int nlocal = atom->nlocal; - for (i = 0; i < nlocal; i++) buckling[i] = atom->buckling[i]; -} - -/* --------------------------------------------------------------------- - memory usage of local atom-based array -------------------------------------------------------------------------- */ - -double ComputeMESONT_B::memory_usage() -{ - double bytes = nmax * sizeof(int); - return bytes; -} diff --git a/src/USER-MESONT/compute_mesont_B.h b/src/USER-MESONT/compute_mesont_B.h deleted file mode 100644 index 4d94d2af36..0000000000 --- a/src/USER-MESONT/compute_mesont_B.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#ifdef COMPUTE_CLASS - -ComputeStyle(mesont/B,ComputeMESONT_B) - -#else - -#ifndef LMP_COMPUTE_MESONT_B_ATOM_H -#define LMP_COMPUTE_MESONT_B_ATOM_H - -#include "compute.h" - -namespace LAMMPS_NS { - -class ComputeMESONT_B : public Compute { - public: - ComputeMESONT_B(class LAMMPS *, int, char **); - ~ComputeMESONT_B(); - void init() {} - void compute_peratom(); - double memory_usage(); - - private: - int nmax; - double *buckling; -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -E: Illegal compute mesont/B command - -*/ diff --git a/src/USER-MESONT/compute_mesont_Eb.cpp b/src/USER-MESONT/compute_mesont_Eb.cpp deleted file mode 100644 index ba2a1cbb3f..0000000000 --- a/src/USER-MESONT/compute_mesont_Eb.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#include "compute_mesont_Eb.h" -#include -#include "atom.h" -#include "update.h" -#include "comm.h" -#include "force.h" -#include "modify.h" -#include "memory.h" -#include "error.h" -#include "pair.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_Eb::ComputeMESONT_Eb(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg), - energy(NULL) -{ - if (narg < 3) error->all(FLERR,"Illegal compute mesont/Eb command"); - - peratom_flag = 1; - size_peratom_cols = 0; - peatomflag = 1; - timeflag = 1; - comm_reverse = 1; - nmax = 0; -} - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_Eb::~ComputeMESONT_Eb() -{ - memory->destroy(energy); -} - -/* ---------------------------------------------------------------------- */ - -void ComputeMESONT_Eb::compute_peratom() -{ - int i; - - invoked_peratom = update->ntimestep; - if (update->eflag_atom != invoked_peratom) - error->all(FLERR,"Per-atom energy was not tallied on needed timestep"); - - // grow local energy array if necessary - // needs to be atom->nmax in length - if (atom->nmax > nmax) { - memory->destroy(energy); - nmax = atom->nmax; - memory->create(energy,nmax,"mesont_Eb:energy"); - vector_atom = energy; - } - - // npair includes ghosts if newton_bond is set - // ntotal includes ghosts if either newton flag is set - int nlocal = atom->nlocal; - int npair = nlocal; - if (force->newton) npair += atom->nghost; - int ntotal = nlocal; - if (force->newton) ntotal += atom->nghost; - - // clear local energy array - for (i = 0; i < ntotal; i++) energy[i] = 0.0; - double* ptr = static_cast(force->pair->extract("mesonttpm_Eb",i)); - if(ptr) for (i = 0; i < npair; i++) energy[i] += ptr[i]; - else error->all(FLERR, - "mesont/Eb is allowed only with mesont/tpm pair style"); - - // communicate ghost energy between neighbor procs - if (force->newton) comm->reverse_comm_compute(this); - - // zero energy of atoms not in group - // only do this after comm since ghost contributions must be included - int *mask = atom->mask; - for (i = 0; i < nlocal; i++) - if (!(mask[i] & groupbit)) energy[i] = 0.0; -} - -/* ---------------------------------------------------------------------- */ - -int ComputeMESONT_Eb::pack_reverse_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) buf[m++] = energy[i]; - return m; -} - -/* ---------------------------------------------------------------------- */ - -void ComputeMESONT_Eb::unpack_reverse_comm(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - energy[j] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- - memory usage of local atom-based array -------------------------------------------------------------------------- */ - -double ComputeMESONT_Eb::memory_usage() -{ - double bytes = nmax * sizeof(double); - return bytes; -} diff --git a/src/USER-MESONT/compute_mesont_Eb.h b/src/USER-MESONT/compute_mesont_Eb.h deleted file mode 100644 index 0a33f956eb..0000000000 --- a/src/USER-MESONT/compute_mesont_Eb.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#ifdef COMPUTE_CLASS - -ComputeStyle(mesont/Eb,ComputeMESONT_Eb) - -#else - -#ifndef LMP_COMPUTE_MESONT_EB_ATOM_H -#define LMP_COMPUTE_MESONT_EB_ATOM_H - -#include "compute.h" - -namespace LAMMPS_NS { - -class ComputeMESONT_Eb : public Compute { - public: - ComputeMESONT_Eb(class LAMMPS *, int, char **); - ~ComputeMESONT_Eb(); - void init() {} - void compute_peratom(); - int pack_reverse_comm(int, int, double *); - void unpack_reverse_comm(int, int *, double *); - double memory_usage(); - - private: - int nmax; - double *energy; -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -E: Illegal compute mesont/Eb command - -Incorrect argument list in the compute init. - -E: Per-atom energy was not tallied on needed timestep - -UNSPECIFIED. - -E: mesont/Eb is allowed only with mesont pair/tpm style - -Use mesont/tpm pair style. - -*/ diff --git a/src/USER-MESONT/compute_mesont_Eb_tot.cpp b/src/USER-MESONT/compute_mesont_Eb_tot.cpp deleted file mode 100644 index 589ee0a12b..0000000000 --- a/src/USER-MESONT/compute_mesont_Eb_tot.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#include "compute_mesont_Eb_tot.h" -#include -#include -#include "atom.h" -#include "update.h" -#include "force.h" -#include "modify.h" -#include "domain.h" -#include "error.h" -#include "pair.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_Eb_tot::ComputeMESONT_Eb_tot(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) -{ - if (narg < 3) error->all(FLERR,"Illegal compute mesont/Eb_tot command"); - if (igroup) error->all(FLERR,"Compute mesont/Eb_tot must use group all"); - timeflag = 1; - extscalar = 1; - scalar_flag = 1; -} - -/* ---------------------------------------------------------------------- */ - -double ComputeMESONT_Eb_tot::compute_scalar() -{ - invoked_scalar = update->ntimestep; - if (update->eflag_global != invoked_scalar) - error->all(FLERR,"Energy was not tallied on needed timestep"); - - int i; - double* ptr = static_cast(force->pair->extract("mesonttpm_Eb_tot",i)); - if(!ptr) error->all(FLERR, - "mesont/Eb_tot is allowed only with mesont/tpm pair style"); - MPI_Allreduce(ptr,&scalar,1,MPI_DOUBLE,MPI_SUM,world); - - return scalar; -} diff --git a/src/USER-MESONT/compute_mesont_Eb_tot.h b/src/USER-MESONT/compute_mesont_Eb_tot.h deleted file mode 100644 index cc4bf1ec19..0000000000 --- a/src/USER-MESONT/compute_mesont_Eb_tot.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#ifdef COMPUTE_CLASS - -ComputeStyle(mesont/Eb_tot,ComputeMESONT_Eb_tot) - -#else - -#ifndef LMP_COMPUTE_MESONT_EB_H -#define LMP_COMPUTE_MESONT_EB_H - -#include "compute.h" - -namespace LAMMPS_NS { - -class ComputeMESONT_Eb_tot : public Compute { - public: - ComputeMESONT_Eb_tot(class LAMMPS *, int, char **); - ~ComputeMESONT_Eb_tot() {} - void init() {} - double compute_scalar(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -E: Illegal compute mesont/Eb_tot command - -Incorrect argument list in the compute init. - -E: Compute mesont/Eb_tot must use group all - -UNSPECIFIED. - -E: mesont/Eb_tot is allowed only with mesont pair/tpm style - -Use mesont/tpm pair style. - -*/ diff --git a/src/USER-MESONT/compute_mesont_Es.cpp b/src/USER-MESONT/compute_mesont_Es.cpp deleted file mode 100644 index f5acb81b6e..0000000000 --- a/src/USER-MESONT/compute_mesont_Es.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#include "compute_mesont_Es.h" -#include -#include "atom.h" -#include "update.h" -#include "comm.h" -#include "force.h" -#include "modify.h" -#include "memory.h" -#include "error.h" -#include "pair.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_Es::ComputeMESONT_Es(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg), - energy(NULL) -{ - if (narg < 3) error->all(FLERR,"Illegal compute mesont/Es command"); - - peratom_flag = 1; - size_peratom_cols = 0; - peatomflag = 1; - timeflag = 1; - comm_reverse = 1; - nmax = 0; -} - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_Es::~ComputeMESONT_Es() -{ - memory->destroy(energy); -} - -/* ---------------------------------------------------------------------- */ - -void ComputeMESONT_Es::compute_peratom() -{ - int i; - - invoked_peratom = update->ntimestep; - if (update->eflag_atom != invoked_peratom) - error->all(FLERR,"Per-atom energy was not tallied on needed timestep"); - - // grow local energy array if necessary - // needs to be atom->nmax in length - if (atom->nmax > nmax) { - memory->destroy(energy); - nmax = atom->nmax; - memory->create(energy,nmax,"mesont_Es:energy"); - vector_atom = energy; - } - - // npair includes ghosts if newton_bond is set - // ntotal includes ghosts if either newton flag is set - int nlocal = atom->nlocal; - int npair = nlocal; - if (force->newton) npair += atom->nghost; - int ntotal = nlocal; - if (force->newton) ntotal += atom->nghost; - - // clear local energy array - for (i = 0; i < ntotal; i++) energy[i] = 0.0; - double* ptr = static_cast(force->pair->extract("mesonttpm_Es",i)); - if(ptr) for (i = 0; i < npair; i++) energy[i] += ptr[i]; - else error->all(FLERR, - "mesont/Es is allowed only with mesont/tpm pair style"); - - // communicate ghost energy between neighbor procs - if (force->newton) comm->reverse_comm_compute(this); - - // zero energy of atoms not in group - // only do this after comm since ghost contributions must be included - int *mask = atom->mask; - for (i = 0; i < nlocal; i++) - if (!(mask[i] & groupbit)) energy[i] = 0.0; -} - -/* ---------------------------------------------------------------------- */ - -int ComputeMESONT_Es::pack_reverse_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) buf[m++] = energy[i]; - return m; -} - -/* ---------------------------------------------------------------------- */ - -void ComputeMESONT_Es::unpack_reverse_comm(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - energy[j] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- - memory usage of local atom-based array -------------------------------------------------------------------------- */ - -double ComputeMESONT_Es::memory_usage() -{ - double bytes = nmax * sizeof(double); - return bytes; -} diff --git a/src/USER-MESONT/compute_mesont_Es.h b/src/USER-MESONT/compute_mesont_Es.h deleted file mode 100644 index 1ee6e366e1..0000000000 --- a/src/USER-MESONT/compute_mesont_Es.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#ifdef COMPUTE_CLASS - -ComputeStyle(mesont/Es,ComputeMESONT_Es) - -#else - -#ifndef LMP_COMPUTE_MESONT_ES_ATOM_H -#define LMP_COMPUTE_MESONT_ES_ATOM_H - -#include "compute.h" - -namespace LAMMPS_NS { - -class ComputeMESONT_Es : public Compute { - public: - ComputeMESONT_Es(class LAMMPS *, int, char **); - ~ComputeMESONT_Es(); - void init() {} - void compute_peratom(); - int pack_reverse_comm(int, int, double *); - void unpack_reverse_comm(int, int *, double *); - double memory_usage(); - - private: - int nmax; - double *energy; -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -E: Illegal compute mesont/Es command - -Incorrect argument list in the compute init. - -E: Per-atom energy was not tallied on needed timestep - -UNSPECIFIED. - -E: mesont/Es is allowed only with mesont/tpm pair style - -Use mesont/tpm pair style. - -*/ diff --git a/src/USER-MESONT/compute_mesont_Es_tot.cpp b/src/USER-MESONT/compute_mesont_Es_tot.cpp deleted file mode 100644 index 34651fd127..0000000000 --- a/src/USER-MESONT/compute_mesont_Es_tot.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#include "compute_mesont_Es_tot.h" -#include -#include -#include "atom.h" -#include "update.h" -#include "force.h" -#include "modify.h" -#include "domain.h" -#include "error.h" -#include "pair.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_Es_tot::ComputeMESONT_Es_tot(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) -{ - if (narg < 3) error->all(FLERR,"Illegal compute mesont/Es_tot command"); - if (igroup) error->all(FLERR,"Compute mesont/Es_tot must use group all"); - timeflag = 1; - extscalar = 1; - scalar_flag = 1; -} - -/* ---------------------------------------------------------------------- */ - -double ComputeMESONT_Es_tot::compute_scalar() -{ - invoked_scalar = update->ntimestep; - if (update->eflag_global != invoked_scalar) - error->all(FLERR,"Energy was not tallied on needed timestep"); - - int i; - double* ptr = static_cast(force->pair->extract("mesonttpm_Es_tot",i)); - if(!ptr) error->all(FLERR, - "mesont/Es_tot is allowed only with mesont/tpm pair style"); - MPI_Allreduce(ptr,&scalar,1,MPI_DOUBLE,MPI_SUM,world); - - return scalar; -} diff --git a/src/USER-MESONT/compute_mesont_Es_tot.h b/src/USER-MESONT/compute_mesont_Es_tot.h deleted file mode 100644 index 2a9de10dcc..0000000000 --- a/src/USER-MESONT/compute_mesont_Es_tot.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#ifdef COMPUTE_CLASS - -ComputeStyle(mesont/Es_tot,ComputeMESONT_Es_tot) - -#else - -#ifndef LMP_COMPUTE_MESONT_ES_H -#define LMP_COMPUTE_MESONT_ES_H - -#include "compute.h" - -namespace LAMMPS_NS { - -class ComputeMESONT_Es_tot : public Compute { - public: - ComputeMESONT_Es_tot(class LAMMPS *, int, char **); - ~ComputeMESONT_Es_tot() {} - void init() {} - double compute_scalar(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -E: Illegal compute mesont/Es_tot command - -Incorrect argument list in the compute init. - -E: Compute mesont/Es_tot must use group all - -UNSPECIFIED. - -E: mesont/Es_tot is allowed only with mesont/tpm pair style - -Use mesont/tpm pair style. - -*/ diff --git a/src/USER-MESONT/compute_mesont_Et.cpp b/src/USER-MESONT/compute_mesont_Et.cpp deleted file mode 100644 index 2a9c982c3f..0000000000 --- a/src/USER-MESONT/compute_mesont_Et.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#include "compute_mesont_Et.h" -#include -#include "atom.h" -#include "update.h" -#include "comm.h" -#include "force.h" -#include "modify.h" -#include "memory.h" -#include "error.h" -#include "pair.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_Et::ComputeMESONT_Et(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg), - energy(NULL) -{ - if (narg < 3) error->all(FLERR,"Illegal compute mesont/Et command"); - - peratom_flag = 1; - size_peratom_cols = 0; - peatomflag = 1; - timeflag = 1; - comm_reverse = 1; - nmax = 0; -} - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_Et::~ComputeMESONT_Et() -{ - memory->destroy(energy); -} - -/* ---------------------------------------------------------------------- */ - -void ComputeMESONT_Et::compute_peratom() -{ - int i; - - invoked_peratom = update->ntimestep; - if (update->eflag_atom != invoked_peratom) - error->all(FLERR,"Per-atom energy was not tallied on needed timestep"); - - // grow local energy array if necessary - // needs to be atom->nmax in length - if (atom->nmax > nmax) { - memory->destroy(energy); - nmax = atom->nmax; - memory->create(energy,nmax,"mesont_Et:energy"); - vector_atom = energy; - } - - // npair includes ghosts if newton_bond is set - // ntotal includes ghosts if either newton flag is set - int nlocal = atom->nlocal; - int npair = nlocal; - if (force->newton) npair += atom->nghost; - int ntotal = nlocal; - if (force->newton) ntotal += atom->nghost; - - // clear local energy array - for (i = 0; i < ntotal; i++) energy[i] = 0.0; - double* ptr = static_cast(force->pair->extract("mesonttpm_Et",i)); - if(ptr) for (i = 0; i < npair; i++) energy[i] += ptr[i]; - else error->all(FLERR, - "mesont/Et is allowed only with mesont/tpm pair style"); - - // communicate ghost energy between neighbor procs - if (force->newton) comm->reverse_comm_compute(this); - - // zero energy of atoms not in group - // only do this after comm since ghost contributions must be included - int *mask = atom->mask; - for (i = 0; i < nlocal; i++) - if (!(mask[i] & groupbit)) energy[i] = 0.0; -} - -/* ---------------------------------------------------------------------- */ - -int ComputeMESONT_Et::pack_reverse_comm(int n, int first, double *buf) -{ - int i,m,last; - - m = 0; - last = first + n; - for (i = first; i < last; i++) buf[m++] = energy[i]; - return m; -} - -/* ---------------------------------------------------------------------- */ - -void ComputeMESONT_Et::unpack_reverse_comm(int n, int *list, double *buf) -{ - int i,j,m; - - m = 0; - for (i = 0; i < n; i++) { - j = list[i]; - energy[j] += buf[m++]; - } -} - -/* ---------------------------------------------------------------------- - memory usage of local atom-based array -------------------------------------------------------------------------- */ - -double ComputeMESONT_Et::memory_usage() -{ - double bytes = nmax * sizeof(double); - return bytes; -} diff --git a/src/USER-MESONT/compute_mesont_Et_tot.cpp b/src/USER-MESONT/compute_mesont_Et_tot.cpp deleted file mode 100644 index a799658cc1..0000000000 --- a/src/USER-MESONT/compute_mesont_Et_tot.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#include "compute_mesont_Et_tot.h" -#include -#include -#include "atom.h" -#include "update.h" -#include "force.h" -#include "modify.h" -#include "domain.h" -#include "error.h" -#include "pair.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -ComputeMESONT_Et_tot::ComputeMESONT_Et_tot(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) -{ - if (narg < 3) error->all(FLERR,"Illegal compute mesont/Et_tot command"); - if (igroup) error->all(FLERR,"Compute mesont/Et_tot must use group all"); - timeflag = 1; - extscalar = 1; - scalar_flag = 1; -} - -/* ---------------------------------------------------------------------- */ - -double ComputeMESONT_Et_tot::compute_scalar() -{ - invoked_scalar = update->ntimestep; - if (update->eflag_global != invoked_scalar) - error->all(FLERR,"Energy was not tallied on needed timestep"); - - int i; - double* ptr = static_cast(force->pair->extract("mesonttpm_Et_tot",i)); - if(!ptr) error->all(FLERR, - "mesont/Et_tot is allowed only with mesont/tpm pair style"); - MPI_Allreduce(ptr,&scalar,1,MPI_DOUBLE,MPI_SUM,world); - - return scalar; -} diff --git a/src/USER-MESONT/compute_mesont_Et_tot.h b/src/USER-MESONT/compute_mesont_Et_tot.h deleted file mode 100644 index e49364b73d..0000000000 --- a/src/USER-MESONT/compute_mesont_Et_tot.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#ifdef COMPUTE_CLASS - -ComputeStyle(mesont/Et_tot,ComputeMESONT_Et_tot) - -#else - -#ifndef LMP_COMPUTE_MESONT_ET_H -#define LMP_COMPUTE_MESONT_ET_H - -#include "compute.h" - -namespace LAMMPS_NS { - -class ComputeMESONT_Et_tot : public Compute { - public: - ComputeMESONT_Et_tot(class LAMMPS *, int, char **); - ~ComputeMESONT_Et_tot() {} - void init() {} - double compute_scalar(); -}; - -} - -#endif -#endif - -/* ERROR/WARNING messages: - -E: Illegal compute mesont/Et_tot command - -Incorrect argument list in the compute init. - -E: Compute mesont/Et_tot must use group all - -UNSPECIFIED. - -E: mesont/Et_tot is allowed only with mesont/tpm pair style - -Use mesont/tpm pair style. - -*/ diff --git a/src/USER-MESONT/mesont_list.cpp b/src/USER-MESONT/mesont_list.cpp deleted file mode 100644 index 06e49b2999..0000000000 --- a/src/USER-MESONT/mesont_list.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#include "mesont_list.h" -#include -#include - -template -void vector_union(std::vector& v1, std::vector& v2, - std::vector& merged) { - std::sort(v1.begin(), v1.end()); - std::sort(v2.begin(), v2.end()); - merged.reserve(v1.size() + v2.size()); - typename std::vector::iterator it1 = v1.begin(); - typename std::vector::iterator it2 = v2.begin(); - - while (it1 != v1.end() && it2 != v2.end()) { - if (*it1 < *it2) { - if (merged.empty() || merged.back() < *it1) merged.push_back(*it1); - ++it1; - } - else { - if (merged.empty() || merged.back() < *it2) merged.push_back(*it2); - ++it2; - } - } - while (it1 != v1.end()) { - if (merged.empty() || merged.back() < *it1) merged.push_back(*it1); - ++it1; - } - - while (it2 != v2.end()) { - if (merged.empty() || merged.back() < *it2) merged.push_back(*it2); - ++it2; - } -} - -#ifndef NULL -#define NULL 0 -#endif - -MESONTList::MESONTList(const Atom* atom, const NeighList* nblist, double rc2){ - if (atom == NULL || nblist == NULL) return; - //number of local atoms at the node - int nlocal = atom->nlocal; - //total number of atoms in the node and ghost shell - int nall = nblist->inum + nblist->gnum; - int ntot = atom->nlocal + atom->nghost; - tagint* const g_id = atom->tag; - tagint** const bonds = atom->bond_cnt; - tagint* const chain_id = atom->molecule; - int* ilist = nblist->ilist; - - //convert bonds to local id representation - array2003 tmp_arr; - tmp_arr[0] = not_cnt; tmp_arr[1] = not_cnt; - chain_list.resize(ntot, tmp_arr); - for (int ii = 0; ii < nall; ii++) { - int i = ilist[ii]; - chain_list[i][0] = domain_end; - chain_list[i][1] = domain_end; - } - for (int ii = 0; ii < nall; ii++) { - int i = ilist[ii]; - int nnb = nblist->numneigh[i]; - for (int m = 0; m < 2; m++) - if (bonds[i][m] == cnt_end) chain_list[i][m] = cnt_end; - for (int j = 0; j < nnb; j++) { - int nb = nblist->firstneigh[i][j]; - if (bonds[i][0] == g_id[nb]){ - chain_list[i][0] = nb; - chain_list[nb][1] = i; - break; - } - } - } - - //reorder chains: index list - //list of indexes for conversion FROM reordered representation - index_list.reserve(nall); - index_list_b.resize(ntot, -1); // convert index TO reordered representation - for (int i = 0; i < ntot; i++) { - if (chain_list[i][0] == cnt_end || chain_list[i][0] == domain_end) { - index_list.push_back(i); - index_list_b[i] = index_list.size() - 1; - int idx = i; - while (1) { - idx = chain_list[idx][1]; - if (idx == cnt_end || idx == domain_end) break; - else index_list.push_back(idx); - index_list_b[idx] = index_list.size() - 1; - } - } - } - - //segment list - for (int i = 0; i < nlocal; i++) { - if (chain_list[i][0] == not_cnt) continue; - if (chain_list[i][0] != cnt_end && chain_list[i][0] != domain_end && - g_id[i] < g_id[chain_list[i][0]]){ - array2003 tmp_c; - tmp_c[0] = i; tmp_c[1] = chain_list[i][0]; - segments.push_back(tmp_c); - } - if (chain_list[i][1] != cnt_end && chain_list[i][1] != domain_end && - g_id[i] < g_id[chain_list[i][1]]){ - array2003 tmp_c; - tmp_c[0] = i; tmp_c[1] = chain_list[i][1]; - segments.push_back(tmp_c); - } - } - int nbonds = segments.size(); - - //triplets - for (int i = 0; i < nlocal; i++){ - if (chain_list[i][0] == not_cnt) continue; - if (chain_list[i][0] != cnt_end && chain_list[i][0] != domain_end && - chain_list[i][1] != cnt_end && chain_list[i][1] != domain_end) - triplets.push_back(get_triplet(i)); - } - - //segment neighbor list - nb_chains.resize(nbonds); - std::vector nb_list_i[2], nb_list; - for (int i = 0; i < nbonds; i++) { - //union of nb lists - for (int m = 0; m < 2; m++) { - nb_list_i[m].resize(0); - int idx = segments[i][m]; - if (idx >= nlocal) continue; - int nnb = nblist->numneigh[idx]; - for (int j = 0; j < nnb; j++) { - int jdx = nblist->firstneigh[idx][j]; - //no selfinteractions for nbs within the same tube - if (chain_id[jdx] == chain_id[idx] && - std::abs(index_list_b[idx] - index_list_b[jdx]) <= 5) continue; - nb_list_i[m].push_back(index_list_b[jdx]); - } - } - vector_union(nb_list_i[0], nb_list_i[1], nb_list); - - int nnb = nb_list.size(); - if (nnb > 0) { - int idx_s = nb_list[0]; - for (int j = 0; j < nnb; j++) { - //if nodes are not continous in the sorted representation - //or represent chain ends, create a new neighbor chain - int idx_next = chain_list[index_list[nb_list[j]]][1]; - if ((j == nnb - 1) || (nb_list[j] + 1 != nb_list[j+1]) || - (idx_next == cnt_end) || (idx_next == domain_end)) { - int idx_f = nb_list[j]; - array2003 chain; - chain[0] = idx_s; - chain[1] = nb_list[j]; - //make sure that segments having at least one node - //in the neighbor list are included - int idx0 = index_list[chain[0]]; // real id of the ends - int idx1 = index_list[chain[1]]; - if (chain_list[idx0][0] != cnt_end && - chain_list[idx0][0] != domain_end) chain[0] -= 1; - if (chain_list[idx1][1] != cnt_end && - chain_list[idx1][1] != domain_end) chain[1] += 1; - if(chain[0] != chain[1]) nb_chains[i].push_back(chain); - idx_s = (j == nnb - 1) ? -1 : nb_list[j + 1]; - } - } - } - nb_list.resize(0); - } -} diff --git a/src/USER-MESONT/mesont_list.h b/src/USER-MESONT/mesont_list.h deleted file mode 100644 index 471a77554f..0000000000 --- a/src/USER-MESONT/mesont_list.h +++ /dev/null @@ -1,120 +0,0 @@ -/* -*- c++ -*- ---------------------------------------------------------- - LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator - http://lammps.sandia.gov, Sandia National Laboratories - Steve Plimpton, sjplimp@sandia.gov - - Copyright (2003) Sandia Corporation. Under the terms of Contract - DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains - certain rights in this software. This software is distributed under - the GNU General Public License. - - See the README file in the top-level LAMMPS directory. - - Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu -------------------------------------------------------------------------- */ - -#pragma once -#include "neigh_list.h" -#include "atom.h" -#include - -using namespace LAMMPS_NS; - -//since LAMMPS is compiled with C++ 2003, define a substitution for std::array -template -class array2003{ -public: - T& operator[] (int idx){ return data[idx];}; - const T& operator[] (int idx) const{ return data[idx];}; -private: - T data[N]; -}; - - -class MESONTList { -public: - MESONTList(const Atom* atom, const NeighList* nblist, double rc2); - ~MESONTList() {}; - //list of segments - const std::vector >& get_segments() const; - //list of triplets - const std::vector >& get_triplets() const; - //list of neigbor chains [start,end] for segments - //(use idx() to get real indexes) - const std::vector > >& get_nbs() const; - //convert idx from sorted representation to real idx - int get_idx(int idx) const; - //return list of indexes for conversion from sorted representation - const std::vector& get_idx_list() const; - //convert idx from real idx to sorted representation - int get_idxb(int idx) const; - //return list of indexes for conversion to sorted representation - const std::vector& get_idxb_list() const; - //check if the node is the end of the tube - bool is_end(int idx) const; - - array2003 get_segment(int idx) const; - array2003 get_triplet(int idx) const; - - static const int cnt_end = -1; - static const int domain_end = -2; - static const int not_cnt = -3; -private: - std::vector > chain_list, segments; - std::vector > triplets; - std::vector > > nb_chains; - std::vector index_list, index_list_b; -}; - -//============================================================================= - -inline const std::vector > > & - MESONTList::get_nbs() const { - return nb_chains; -} - -inline int MESONTList::get_idx(int idx) const { - return index_list[idx]; -} - -inline const std::vector& MESONTList::get_idx_list() const { - return index_list; -}; - - -inline int MESONTList::get_idxb(int idx) const { - return index_list_b[idx]; -} - -inline const std::vector& MESONTList::get_idxb_list() const { - return index_list_b; -}; - -inline const std::vector > & MESONTList::get_segments() - const { - return segments; -} - -inline const std::vector > & MESONTList::get_triplets() - const { - return triplets; -} - -inline array2003 MESONTList::get_segment(int idx) const { - array2003 result; - result[0] = chain_list[idx][0]; - result[1] = idx; - return result; -} - -inline array2003 MESONTList::get_triplet(int idx) const { - array2003 result; - result[0] = chain_list[idx][0]; - result[1] = idx; - result[2] = chain_list[idx][1]; - return result; -} - -inline bool MESONTList::is_end(int idx) const { - return chain_list[idx][0] == cnt_end || chain_list[idx][1] == cnt_end; -}; diff --git a/src/USER-MESONT/pair_mesont_tpm.cpp b/src/USER-MESONT/pair_mesont_tpm.cpp index 3c48457164..e8488b275a 100644 --- a/src/USER-MESONT/pair_mesont_tpm.cpp +++ b/src/USER-MESONT/pair_mesont_tpm.cpp @@ -14,7 +14,6 @@ ------------------------------------------------------------------------- */ #include "pair_mesont_tpm.h" -#include "mesont_list.h" #include "export_mesont.h" #include @@ -28,14 +27,276 @@ #include "neigh_request.h" #include -#include #include #include #include #include +#include +#include using namespace LAMMPS_NS; +//since LAMMPS is compiled with C++ 2003, define a substitution for std::array +template +class array2003{ +public: + T& operator[] (int idx){ return data[idx];}; + const T& operator[] (int idx) const{ return data[idx];}; +private: + T data[N]; +}; + + +class MESONTList { +public: + MESONTList(const Atom* atom, const NeighList* nblist, double rc2); + ~MESONTList() {}; + //list of segments + const std::vector >& get_segments() const; + //list of triplets + const std::vector >& get_triplets() const; + //list of neighbor chains [start,end] for segments + //(use idx() to get real indexes) + const std::vector > >& get_nbs() const; + //convert idx from sorted representation to real idx + int get_idx(int idx) const; + //return list of indexes for conversion from sorted representation + const std::vector& get_idx_list() const; + //convert idx from real idx to sorted representation + int get_idxb(int idx) const; + //return list of indexes for conversion to sorted representation + const std::vector& get_idxb_list() const; + //check if the node is the end of the tube + bool is_end(int idx) const; + + array2003 get_segment(int idx) const; + array2003 get_triplet(int idx) const; + + static const int cnt_end = -1; + static const int domain_end = -2; + static const int not_cnt = -3; +private: + std::vector > chain_list, segments; + std::vector > triplets; + std::vector > > nb_chains; + std::vector index_list, index_list_b; +}; + +//============================================================================= + +inline const std::vector > > & + MESONTList::get_nbs() const { + return nb_chains; +} + +inline int MESONTList::get_idx(int idx) const { + return index_list[idx]; +} + +inline const std::vector& MESONTList::get_idx_list() const { + return index_list; +}; + + +inline int MESONTList::get_idxb(int idx) const { + return index_list_b[idx]; +} + +inline const std::vector& MESONTList::get_idxb_list() const { + return index_list_b; +}; + +inline const std::vector > & MESONTList::get_segments() + const { + return segments; +} + +inline const std::vector > & MESONTList::get_triplets() + const { + return triplets; +} + +inline array2003 MESONTList::get_segment(int idx) const { + array2003 result; + result[0] = chain_list[idx][0]; + result[1] = idx; + return result; +} + +inline array2003 MESONTList::get_triplet(int idx) const { + array2003 result; + result[0] = chain_list[idx][0]; + result[1] = idx; + result[2] = chain_list[idx][1]; + return result; +} + +inline bool MESONTList::is_end(int idx) const { + return chain_list[idx][0] == cnt_end || chain_list[idx][1] == cnt_end; +}; + +template +void vector_union(std::vector& v1, std::vector& v2, + std::vector& merged) { + std::sort(v1.begin(), v1.end()); + std::sort(v2.begin(), v2.end()); + merged.reserve(v1.size() + v2.size()); + typename std::vector::iterator it1 = v1.begin(); + typename std::vector::iterator it2 = v2.begin(); + + while (it1 != v1.end() && it2 != v2.end()) { + if (*it1 < *it2) { + if (merged.empty() || merged.back() < *it1) merged.push_back(*it1); + ++it1; + } + else { + if (merged.empty() || merged.back() < *it2) merged.push_back(*it2); + ++it2; + } + } + while (it1 != v1.end()) { + if (merged.empty() || merged.back() < *it1) merged.push_back(*it1); + ++it1; + } + + while (it2 != v2.end()) { + if (merged.empty() || merged.back() < *it2) merged.push_back(*it2); + ++it2; + } +} + +MESONTList::MESONTList(const Atom* atom, const NeighList* nblist, double rc2){ + if (atom == NULL || nblist == NULL) return; + //number of local atoms at the node + int nlocal = atom->nlocal; + //total number of atoms in the node and ghost shell + int nall = nblist->inum + nblist->gnum; + int ntot = atom->nlocal + atom->nghost; + tagint* const g_id = atom->tag; + tagint** const bonds = atom->bond_nt; + tagint* const chain_id = atom->molecule; + int* ilist = nblist->ilist; + + //convert bonds to local id representation + array2003 tmp_arr; + tmp_arr[0] = not_cnt; tmp_arr[1] = not_cnt; + chain_list.resize(ntot, tmp_arr); + for (int ii = 0; ii < nall; ii++) { + int i = ilist[ii]; + chain_list[i][0] = domain_end; + chain_list[i][1] = domain_end; + } + for (int ii = 0; ii < nall; ii++) { + int i = ilist[ii]; + int nnb = nblist->numneigh[i]; + for (int m = 0; m < 2; m++) + if (bonds[i][m] == cnt_end) chain_list[i][m] = cnt_end; + for (int j = 0; j < nnb; j++) { + int nb = nblist->firstneigh[i][j]; + if (bonds[i][0] == g_id[nb]){ + chain_list[i][0] = nb; + chain_list[nb][1] = i; + break; + } + } + } + + //reorder chains: index list + //list of indexes for conversion FROM reordered representation + index_list.reserve(nall); + index_list_b.resize(ntot, -1); // convert index TO reordered representation + for (int i = 0; i < ntot; i++) { + if (chain_list[i][0] == cnt_end || chain_list[i][0] == domain_end) { + index_list.push_back(i); + index_list_b[i] = index_list.size() - 1; + int idx = i; + while (1) { + idx = chain_list[idx][1]; + if (idx == cnt_end || idx == domain_end) break; + else index_list.push_back(idx); + index_list_b[idx] = index_list.size() - 1; + } + } + } + + //segment list + for (int i = 0; i < nlocal; i++) { + if (chain_list[i][0] == not_cnt) continue; + if (chain_list[i][0] != cnt_end && chain_list[i][0] != domain_end && + g_id[i] < g_id[chain_list[i][0]]){ + array2003 tmp_c; + tmp_c[0] = i; tmp_c[1] = chain_list[i][0]; + segments.push_back(tmp_c); + } + if (chain_list[i][1] != cnt_end && chain_list[i][1] != domain_end && + g_id[i] < g_id[chain_list[i][1]]){ + array2003 tmp_c; + tmp_c[0] = i; tmp_c[1] = chain_list[i][1]; + segments.push_back(tmp_c); + } + } + int nbonds = segments.size(); + + //triplets + for (int i = 0; i < nlocal; i++){ + if (chain_list[i][0] == not_cnt) continue; + if (chain_list[i][0] != cnt_end && chain_list[i][0] != domain_end && + chain_list[i][1] != cnt_end && chain_list[i][1] != domain_end) + triplets.push_back(get_triplet(i)); + } + + //segment neighbor list + nb_chains.resize(nbonds); + std::vector nb_list_i[2], nb_list; + for (int i = 0; i < nbonds; i++) { + //union of nb lists + for (int m = 0; m < 2; m++) { + nb_list_i[m].resize(0); + int idx = segments[i][m]; + if (idx >= nlocal) continue; + int nnb = nblist->numneigh[idx]; + for (int j = 0; j < nnb; j++) { + int jdx = nblist->firstneigh[idx][j]; + //no self interactions for nbs within the same tube + if (chain_id[jdx] == chain_id[idx] && + std::abs(index_list_b[idx] - index_list_b[jdx]) <= 5) continue; + nb_list_i[m].push_back(index_list_b[jdx]); + } + } + vector_union(nb_list_i[0], nb_list_i[1], nb_list); + + int nnb = nb_list.size(); + if (nnb > 0) { + int idx_s = nb_list[0]; + for (int j = 0; j < nnb; j++) { + //if nodes are not continuous in the sorted representation + //or represent chain ends, create a new neighbor chain + int idx_next = chain_list[index_list[nb_list[j]]][1]; + if ((j == nnb - 1) || (nb_list[j] + 1 != nb_list[j+1]) || + (idx_next == cnt_end) || (idx_next == domain_end)) { + int idx_f = nb_list[j]; + array2003 chain; + chain[0] = idx_s; + chain[1] = nb_list[j]; + //make sure that segments having at least one node + //in the neighbor list are included + int idx0 = index_list[chain[0]]; // real id of the ends + int idx1 = index_list[chain[1]]; + if (chain_list[idx0][0] != cnt_end && + chain_list[idx0][0] != domain_end) chain[0] -= 1; + if (chain_list[idx1][1] != cnt_end && + chain_list[idx1][1] != domain_end) chain[1] += 1; + if(chain[0] != chain[1]) nb_chains[i].push_back(chain); + idx_s = (j == nnb - 1) ? -1 : nb_list[j + 1]; + } + } + } + nb_list.resize(0); + } +} + +/* ---------------------------------------------------------------------- */ + // the cutoff distance between walls of tubes static const double TPBRcutoff = 3.0*3.4; int PairMESONTTPM::instance_count = 0; @@ -79,8 +340,9 @@ void PairMESONTTPM::compute(int eflag, int vflag){ //total number of atoms in the node and ghost shell int nall = list->inum + list->gnum; int ntot = atom->nlocal + atom->nghost; - int newton_pair = force->newton_pair; //check "newton command" - if(!newton_pair) error->all(FLERR,"set newton_pair"); + int newton_pair = force->newton_pair; + if(!newton_pair) + error->all(FLERR,"Pair style mesont/tpm requires newton pair on"); double **x = atom->x; double **f = atom->f; @@ -89,12 +351,30 @@ void PairMESONTTPM::compute(int eflag, int vflag){ double *l = atom->length; int *buckling = atom->buckling; tagint *g_id = atom->tag; - tagint **bonds = atom->bond_cnt; + tagint **bonds = atom->bond_nt; + + //check if cutoff is chosen correctly + double RT = mesont_lib_get_R(); + double Lmax = 0.0; + for (int ii = 0; ii < list->inum; ii++) { + int i = list->ilist[ii]; + if (Lmax < l[i]) Lmax = l[i]; + } + double Rcut_min = std::max(2.0*Lmax, std::sqrt(0.5*Lmax*Lmax + + std::pow((2.0*RT + TPBRcutoff),2))); + if (cut_global < Rcut_min){ + std::stringstream err; + err << "The selected cutoff is too small for the current system : " << + "L_max = " << Lmax << ", R_max = " << RT << ", Rc = " << cut_global << + ", Rcut_min = " << Rcut_min; + error->all(FLERR, err.str().c_str()); + } + //generate bonds and chain nblist MESONTList ntlist(atom, list, cut_global*cut_global); //reorder data to make it contiguous within tubes - //and compatable with Fortran functions + //and compatible with Fortran functions std::vector x_sort(3*nall), f_sort(3*nall), s_sort(9*nall); std::vector u_ts_sort(nall), u_tb_sort(nall), u_tt_sort(nall); std::vector b_sort(nall); @@ -135,8 +415,8 @@ void PairMESONTTPM::compute(int eflag, int vflag){ //segment-segment and segment-tube interactions int n_segments = ntlist.get_segments().size(); - double Lmax = 0.0, Rmax = 0.0; - double RT = mesont_lib_get_R(); + double Rmax = 0.0; + Lmax = 0.0; for (int i = 0; i < n_segments; i++) { const array2003& s = ntlist.get_segments()[i]; //idx of a segment end 1 in sorted representation @@ -208,13 +488,14 @@ void PairMESONTTPM::compute(int eflag, int vflag){ } //check if cutoff is chosen correctly - double Rcut_min = std::max(2.0*Lmax, std::sqrt(0.5*Lmax*Lmax + + Rcut_min = std::max(2.0*Lmax, std::sqrt(0.5*Lmax*Lmax + std::pow((2.0*Rmax + TPBRcutoff),2))); if (cut_global < Rcut_min){ - std::cout << "L_max: = " << Lmax << ", R_max = " << Rmax << ", Rc = " - << cut_global << ", Rcut_min = " << Rcut_min << std::endl; - error->all(FLERR, - "The selected cutoff is too small for the current system"); + std::stringstream err; + err << "The selected cutoff is too small for the current system : " << + "L_max = " << Lmax << ", R_max = " << RT << ", Rc = " << cut_global << + ", Rcut_min = " << Rcut_min; + error->all(FLERR, err.str().c_str()); } // set per atom values and accumulators diff --git a/src/USER-MESONT/pair_mesont_tpm.h b/src/USER-MESONT/pair_mesont_tpm.h index 05234365fe..704556d75e 100644 --- a/src/USER-MESONT/pair_mesont_tpm.h +++ b/src/USER-MESONT/pair_mesont_tpm.h @@ -66,9 +66,9 @@ class PairMESONTTPM : public Pair { /* ERROR/WARNING messages: -E: set newton_pair +E: Pair style mesont/tpm requires newton pair on -newton_pair must be set to true +newton_pair must be set to on E: The selected cutoff is too small for the current system diff --git a/src/atom.cpp b/src/atom.cpp index 7aa99a3e39..350f41336c 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -109,10 +109,11 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) edpd_temp = edpd_flux = edpd_cv = NULL; // USER-MESONT package - + + mesont_flag = 0; length = NULL; buckling = NULL; - bond_cnt = NULL; + bond_nt = NULL; // USER-SMD @@ -377,9 +378,10 @@ Atom::~Atom() memory->sfree(molecules); // USER-MESONT package + memory->destroy(length); memory->destroy(buckling); - memory->destroy(bond_cnt); + memory->destroy(bond_nt); // delete per-type arrays @@ -984,23 +986,16 @@ void Atom::data_atoms(int n, char *buf, tagint id_offset, tagint mol_offset, error->all(FLERR,"Incorrect atom format in data file"); } - int imx = 0; - int imy = 0; - int imz = 0; - if (imageflag) { - imx = utils::inumeric(FLERR,values[iptr],false,lmp); - imy = utils::inumeric(FLERR,values[iptr+1],false,lmp); - imz = utils::inumeric(FLERR,values[iptr+2],false,lmp); - if ((domain->dimension == 2) && (imz != 0)) - error->all(FLERR,"Z-direction image flag must be 0 for 2d-systems"); - } - imagedata = ((imageint) (imx + IMGMAX) & IMGMASK) | - (((imageint) (imy + IMGMAX) & IMGMASK) << IMGBITS) | - (((imageint) (imz + IMGMAX) & IMGMASK) << IMG2BITS); + if (imageflag) + imagedata = ((imageint) (atoi(values[iptr]) + IMGMAX) & IMGMASK) | + (((imageint) (atoi(values[iptr+1]) + IMGMAX) & IMGMASK) << IMGBITS) | + (((imageint) (atoi(values[iptr+2]) + IMGMAX) & IMGMASK) << IMG2BITS); + else imagedata = ((imageint) IMGMAX << IMG2BITS) | + ((imageint) IMGMAX << IMGBITS) | IMGMAX; - xdata[0] = utils::numeric(FLERR,values[xptr],false,lmp); - xdata[1] = utils::numeric(FLERR,values[xptr+1],false,lmp); - xdata[2] = utils::numeric(FLERR,values[xptr+2],false,lmp); + xdata[0] = atof(values[xptr]); + xdata[1] = atof(values[xptr+1]); + xdata[2] = atof(values[xptr+2]); if (shiftflag) { xdata[0] += shift[0]; xdata[1] += shift[1]; @@ -2308,7 +2303,7 @@ void *Atom::extract(char *name) // USER-MESONT package if (strcmp(name,"length") == 0) return (void *) length; if (strcmp(name,"buckling") == 0) return (void *) buckling; - if (strcmp(name,"bond_cnt") == 0) return (void *) bond_cnt; + if (strcmp(name,"bond_nt") == 0) return (void *) bond_nt; return NULL; } diff --git a/src/atom.h b/src/atom.h index 6bf5928391..124fbcf13b 100644 --- a/src/atom.h +++ b/src/atom.h @@ -114,7 +114,7 @@ class Atom : protected Pointers { // USER-MESONT package double *length; int *buckling; - tagint **bond_cnt; + tagint **bond_nt; // molecular info @@ -160,6 +160,7 @@ class Atom : protected Pointers { int cs_flag,csforce_flag,vforce_flag,ervelforce_flag,etag_flag; int rho_flag,e_flag,cv_flag,vest_flag; int dpd_flag,edpd_flag,tdpd_flag; + int mesont_flag; //USER-SPIN package diff --git a/src/compute_property_atom.cpp b/src/compute_property_atom.cpp index 065e3eeb82..9dc197f9aa 100644 --- a/src/compute_property_atom.cpp +++ b/src/compute_property_atom.cpp @@ -375,7 +375,12 @@ ComputePropertyAtom::ComputePropertyAtom(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Compute property/atom floating point " "vector does not exist"); pack_choice[i] = &ComputePropertyAtom::pack_dname; - + } + else if (strcmp(arg[iarg],"buckling") == 0) { + if (!atom->mesont_flag) + error->all(FLERR,"Compute property/atom for " + "atom property that isn't allocated"); + pack_choice[i] = &ComputePropertyAtom::pack_buckling; // check if atom style recognizes keyword } else { @@ -1774,6 +1779,21 @@ void ComputePropertyAtom::pack_corner3z(int n) /* ---------------------------------------------------------------------- */ +void ComputePropertyAtom::pack_buckling(int n) +{ + int *buckling = atom->buckling; + int *mask = atom->mask; + int nlocal = atom->nlocal; + + for (int i = 0; i < nlocal; i++) { + if (mask[i] & groupbit) buf[n] = static_cast(buckling[i]); + else buf[n] = 0.0; + n += nvalues; + } +} + +/* ---------------------------------------------------------------------- */ + void ComputePropertyAtom::pack_nbonds(int n) { int *num_bond = atom->num_bond; diff --git a/src/compute_property_atom.h b/src/compute_property_atom.h index eb002457fb..cab9d3ea1b 100644 --- a/src/compute_property_atom.h +++ b/src/compute_property_atom.h @@ -125,6 +125,7 @@ class ComputePropertyAtom : public Compute { void pack_corner3x(int); void pack_corner3y(int); void pack_corner3z(int); + void pack_buckling(int); void pack_nbonds(int);