diff --git a/doc/src/Section_example.txt b/doc/src/Section_example.txt index 26dc3b969..f8b39be17 100644 --- a/doc/src/Section_example.txt +++ b/doc/src/Section_example.txt @@ -1,144 +1,145 @@ "Previous Section"_Section_howto.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_perf.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line 7. Example problems :h3 The LAMMPS distribution includes an examples sub-directory with many sample problems. Many are 2d models that run quickly are are straightforward to visualize, requiring at most a couple of minutes to run on a desktop machine. Each problem has an input script (in.*) and produces a log file (log.*) when it runs. Some use a data file (data.*) of initial coordinates as additional input. A few sample log file run on different machines and different numbers of processors are included in the directories to compare your answers to. E.g. a log file like log.date.crack.foo.P means the "crack" example was run on P processors of machine "foo" on that date (i.e. with that version of LAMMPS). Many of the input files have commented-out lines for creating dump files and image files. If you uncomment the "dump"_dump.html command in the input script, a text dump file will be produced, which can be animated by various "visualization programs"_http://lammps.sandia.gov/viz.html. If you uncomment the "dump image"_dump.html command in the input script, and assuming you have built LAMMPS with a JPG library, JPG snapshot images will be produced when the simulation runs. They can be quickly post-processed into a movie using commands described on the "dump image"_dump_image.html doc page. Animations of many of the examples can be viewed on the Movies section of the "LAMMPS web site"_lws. There are two kinds of sub-directories in the examples dir. Lowercase dirs contain one or a few simple, quick-to-run problems. Uppercase dirs contain up to several complex scripts that illustrate a particular kind of simulation method or model. Some of these run for longer times, e.g. to measure a particular quantity. Lists of both kinds of directories are given below. :line Lowercase directories :h4 accelerate: run with various acceleration options (OpenMP, GPU, Phi) +airebo: polyethylene with AIREBO potential balance: dynamic load balancing, 2d system body: body particles, 2d system cmap: CMAP 5-body contributions to CHARMM force field colloid: big colloid particles in a small particle solvent, 2d system comb: models using the COMB potential coreshell: core/shell model using CORESHELL package controller: use of fix controller as a thermostat crack: crack propagation in a 2d solid deposit: deposit atoms and molecules on a surface dipole: point dipolar particles, 2d system dreiding: methanol via Dreiding FF eim: NaCl using the EIM potential ellipse: ellipsoidal particles in spherical solvent, 2d system flow: Couette and Poiseuille flow in a 2d channel friction: frictional contact of spherical asperities between 2d surfaces gcmc: Grand Canonical Monte Carlo (GCMC) via the fix gcmc command granregion: use of fix wall/region/gran as boundary on granular particles hugoniostat: Hugoniostat shock dynamics indent: spherical indenter into a 2d solid kim: use of potentials in Knowledge Base for Interatomic Models (KIM) meam: MEAM test for SiC and shear (same as shear examples) melt: rapid melt of 3d LJ system micelle: self-assembly of small lipid-like molecules into 2d bilayers min: energy minimization of 2d LJ melt mscg: parameterize a multi-scale coarse-graining (MSCG) model msst: MSST shock dynamics nb3b: use of nonbonded 3-body harmonic pair style neb: nudged elastic band (NEB) calculation for barrier finding nemd: non-equilibrium MD of 2d sheared system obstacle: flow around two voids in a 2d channel peptide: dynamics of a small solvated peptide chain (5-mer) peri: Peridynamic model of cylinder impacted by indenter pour: pouring of granular particles into a 3d box, then chute flow prd: parallel replica dynamics of vacancy diffusion in bulk Si python: using embedded Python in a LAMMPS input script qeq: use of the QEQ package for charge equilibration reax: RDX and TATB models using the ReaxFF rigid: rigid bodies modeled as independent or coupled shear: sideways shear applied to 2d solid, with and without a void snap: NVE dynamics for BCC tantalum crystal using SNAP potential srd: stochastic rotation dynamics (SRD) particles as solvent streitz: use of Streitz/Mintmire potential with charge equilibration tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si vashishta: use of the Vashishta potential voronoi: Voronoi tesselation via compute voronoi/atom command :tb(s=:) Here is how you can run and visualize one of the sample problems: cd indent cp ../../src/lmp_linux . # copy LAMMPS executable to this dir lmp_linux -in in.indent # run the problem :pre Running the simulation produces the files {dump.indent} and {log.lammps}. You can visualize the dump file of snapshots with a variety of 3rd-party tools highlighted on the "Visualization"_http://lammps.sandia.gov/viz.html page of the LAMMPS web site. If you uncomment the "dump image"_dump_image.html line(s) in the input script a series of JPG images will be produced by the run (assuming you built LAMMPS with JPG support; see "Section 2.2"_Section_start.html#start_2 for details). These can be viewed individually or turned into a movie or animated by tools like ImageMagick or QuickTime or various Windows-based tools. See the "dump image"_dump_image.html doc page for more details. E.g. this Imagemagick command would create a GIF file suitable for viewing in a browser. % convert -loop 1 *.jpg foo.gif :pre :line Uppercase directories :h4 ASPHERE: various aspherical particle models, using ellipsoids, rigid bodies, line/triangle particles, etc COUPLE: examples of how to use LAMMPS as a library DIFFUSE: compute diffusion coefficients via several methods ELASTIC: compute elastic constants at zero temperature ELASTIC_T: compute elastic constants at finite temperature KAPPA: compute thermal conductivity via several methods MC: using LAMMPS in a Monte Carlo mode to relax the energy of a system USER: examples for USER packages and USER-contributed commands VISCOSITY: compute viscosity via several methods :tb(s=:) Nearly all of these directories have README files which give more details on how to understand and use their contents. The USER directory has a large number of sub-directories which correspond by name to a USER package. They contain scripts that illustrate how to use the command(s) provided in that package. Many of the sub-directories have their own README files which give further instructions. See the "Section 4"_Section_packages.html doc page for more info on specific USER packages. diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 76f88b8ab..a65e51065 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -1,2634 +1,2658 @@ "Previous Section"_Section_commands.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_accelerate.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line 4. Packages :h3 This section gives an overview of the optional packages that extend LAMMPS functionality with instructions on how to build LAMMPS with each of them. Packages are groups of files that enable a specific set of features. For example, force fields for molecular systems or granular systems are in packages. You can see the list of all packages and "make" commands to manage them by typing "make package" from within the src directory of the LAMMPS distribution. "Section 2.3"_Section_start.html#start_3 gives general info on how to install and un-install packages as part of the LAMMPS build process. There are two kinds of packages in LAMMPS, standard and user packages: "Table of standard packages"_#table_standard "Table of user packages"_#table_user :ul Standard packages are supported by the LAMMPS developers and are written in a syntax and style consistent with the rest of LAMMPS. This means the developers will answer questions about them, debug and fix them if necessary, and keep them compatible with future changes to LAMMPS. User packages have been contributed by users, and begin with the "user" prefix. If they are a single command (single file), they are typically in the user-misc package. User packages don't necessarily meet the requirements of the standard packages. If you have problems using a feature provided in a user package, you may need to contact the contributor directly to get help. Information on how to submit additions you make to LAMMPS as single files or as a standard or user package are given in "this section"_Section_modify.html#mod_15 of the manual. Following the next two tables is a sub-section for each package. It lists authors (if applicable) and summarizes the package contents. It has specific instructions on how to install the package, including (if necessary) downloading or building any extra library it requires. It also gives links to documentation, example scripts, and pictures/movies (if available) that illustrate use of the package. NOTE: To see the complete list of commands a package adds to LAMMPS, just look at the files in its src directory, e.g. "ls src/GRANULAR". Files with names that start with fix, compute, atom, pair, bond, angle, etc correspond to commands with the same style names. In these two tables, the "Example" column is a sub-directory in the examples directory of the distribution which has an input script that uses the package. E.g. "peptide" refers to the examples/peptide directory; USER/atc refers to the examples/USER/atc directory. The "Library" column indicates whether an extra library is needed to build and use the package: dash = no library sys = system library: you likely have it on your machine 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 :ul :line :line [Standard packages] :link(table_standard),p Package, Description, Doc page, Example, Library "ASPHERE"_#ASPHERE, aspherical particle models, "Section 6.6.14"_Section_howto.html#howto_14, ellipse, - "BODY"_#BODY, body-style particles, "body"_body.html, body, - "CLASS2"_#CLASS2, class 2 force fields, "pair_style lj/class2"_pair_class2.html, -, - "COLLOID"_#COLLOID, colloidal particles, "atom_style colloid"_atom_style.html, colloid, - "COMPRESS"_#COMPRESS, I/O compression, "dump */gz"_dump.html, -, sys "CORESHELL"_#CORESHELL, adiabatic core/shell model, "Section 6.6.25"_Section_howto.html#howto_25, coreshell, - "DIPOLE"_#DIPOLE, point dipole particles, "pair_style dipole/cut"_pair_dipole.html, dipole, - "GPU"_#GPU, GPU-enabled styles, "Section 5.3.1"_accelerate_gpu.html, WWW bench, int "GRANULAR"_#GRANULAR, granular systems, "Section 6.6.6"_Section_howto.html#howto_6, pour, - "KIM"_#KIM, openKIM wrapper, "pair_style kim"_pair_kim.html, kim, ext "KOKKOS"_#KOKKOS, Kokkos-enabled styles, "Section 5.3.3"_accelerate_kokkos.html, WWW bench, - "KSPACE"_#KSPACE, long-range Coulombic solvers, "kspace_style"_kspace_style.html, peptide, - "MANYBODY"_#MANYBODY, many-body potentials, "pair_style tersoff"_pair_tersoff.html, shear, - "MC"_#MC, Monte Carlo options, "fix gcmc"_fix_gcmc.html, -, - "MEAM"_#MEAM, modified EAM potential, "pair_style meam"_pair_meam.html, meam, int "MISC"_#MISC, miscellanous single-file commands, -, -, - "MOLECULE"_#MOLECULE, molecular system force fields, "Section 6.6.3"_Section_howto.html#howto_3, peptide, - "MPIIO"_#MPIIO, MPI parallel I/O dump and restart, "dump"_dump.html, -, - "MSCG"_#MSCG, multi-scale coarse-graining wrapper, "fix mscg"_fix_mscg.html, mscg, ext "OPT"_#OPT, optimized pair styles, "Section 5.3.5"_accelerate_opt.html, WWW bench, - "PERI"_#PERI, Peridynamics models, "pair_style peri"_pair_peri.html, peri, - "POEMS"_#POEMS, coupled rigid body motion, "fix poems"_fix_poems.html, rigid, int "PYTHON"_#PYTHON, embed Python code in an input script, "python"_python.html, python, sys "QEQ"_#QEQ, QEq charge equilibration, "fix qeq"_fix_qeq.html, qeq, - "REAX"_#REAX, ReaxFF potential (Fortran), "pair_style reax"_pair_reax.html, reax, int "REPLICA"_#REPLICA, multi-replica methods, "Section 6.6.5"_Section_howto.html#howto_5, tad, - "RIGID"_#RIGID, rigid bodies and constraints, "fix rigid"_fix_rigid.html, rigid, - "SHOCK"_#SHOCK, shock loading methods, "fix msst"_fix_msst.html, -, - "SNAP"_#SNAP, quantum-fitted potential, "pair snap"_pair_snap.html, snap, - "SRD"_#SRD, stochastic rotation dynamics, "fix srd"_fix_srd.html, srd, - "VORONOI"_#VORONOI, Voronoi tesselation, "compute voronoi/atom"_compute_voronoi_atom.html, -, ext :tb(ea=c,ca1=l) [USER packages] :link(table_user),p Package, Description, Doc page, Example, Library "USER-ATC"_#USER-ATC, atom-to-continuum coupling, "fix atc"_fix_atc.html, USER/atc, int "USER-AWPMD"_#USER-AWPMD, wave-packet MD, "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, int "USER-CGDNA"_#USER-CGDNA, coarse-grained DNA force fields, src/USER-CGDNA/README, USER/cgdna, - "USER-CGSDK"_#USER-CGSDK, SDK coarse-graining model, "pair_style lj/sdk"_pair_sdk.html, USER/cgsdk, - "USER-COLVARS"_#USER-COLVARS, collective variables library, "fix colvars"_fix_colvars.html, USER/colvars, int "USER-DIFFRACTION"_#USER-DIFFRACTION, virtual x-ray and electron diffraction,"compute xrd"_compute_xrd.html, USER/diffraction, - "USER-DPD"_#USER-DPD, reactive dissipative particle dynamics, src/USER-DPD/README, USER/dpd, - "USER-DRUDE"_#USER-DRUDE, Drude oscillators, "tutorial"_tutorial_drude.html, USER/drude, - "USER-EFF"_#USER-EFF, electron force field,"pair_style eff/cut"_pair_eff.html, USER/eff, - "USER-FEP"_#USER-FEP, free energy perturbation,"compute fep"_compute_fep.html, USER/fep, - "USER-H5MD"_#USER-H5MD, dump output via HDF5,"dump h5md"_dump_h5md.html, -, ext "USER-INTEL"_#USER-INTEL, optimized Intel CPU and KNL styles,"Section 5.3.2"_accelerate_intel.html, WWW bench, - "USER-LB"_#USER-LB, Lattice Boltzmann fluid,"fix lb/fluid"_fix_lb_fluid.html, USER/lb, - "USER-MANIFOLD"_#USER-MANIFOLD, motion on 2d surfaces,"fix manifoldforce"_fix_manifoldforce.html, USER/manifold, - "USER-MEAMC"_#USER-MEAMC, modified EAM potential (C++), "pair_style meam/c"_pair_meam.html, meam, - "USER-MGPT"_#USER-MGPT, fast MGPT multi-ion potentials, "pair_style mgpt"_pair_mgpt.html, USER/mgpt, - "USER-MISC"_#USER-MISC, single-file contributions, USER-MISC/README, USER/misc, - "USER-MOLFILE"_#USER-MOLFILE, "VMD"_vmd_home molfile plug-ins,"dump molfile"_dump_molfile.html, -, ext "USER-NETCDF"_#USER-NETCDF, dump output via NetCDF,"dump netcdf"_dump_netcdf.html, -, ext "USER-OMP"_#USER-OMP, OpenMP-enabled styles,"Section 5.3.4"_accelerate_omp.html, WWW bench, - "USER-PHONON"_#USER-PHONON, phonon dynamical matrix,"fix phonon"_fix_phonon.html, USER/phonon, - "USER-QMMM"_#USER-QMMM, QM/MM coupling,"fix qmmm"_fix_qmmm.html, USER/qmmm, ext "USER-QTB"_#USER-QTB, quantum nuclear effects,"fix qtb"_fix_qtb.html "fix qbmsst"_fix_qbmsst.html, qtb, - "USER-QUIP"_#USER-QUIP, QUIP/libatoms interface,"pair_style quip"_pair_quip.html, USER/quip, ext "USER-REAXC"_#USER-REAXC, ReaxFF potential (C/C++) ,"pair_style reaxc"_pair_reaxc.html, reax, - "USER-SMD"_#USER-SMD, smoothed Mach dynamics,"SMD User Guide"_PDF/SMD_LAMMPS_userguide.pdf, USER/smd, ext "USER-SMTBQ"_#USER-SMTBQ, second moment tight binding QEq potential,"pair_style smtbq"_pair_smtbq.html, USER/smtbq, - "USER-SPH"_#USER-SPH, smoothed particle hydrodynamics,"SPH User Guide"_PDF/SPH_LAMMPS_userguide.pdf, USER/sph, - "USER-TALLY"_#USER-TALLY, pairwise tally computes,"compute XXX/tally"_compute_tally.html, USER/tally, - "USER-VTK"_#USER-VTK, dump output via VTK, "compute vtk"_dump_vtk.html, -, ext :tb(ea=c,ca1=l) :line :line ASPHERE package :link(ASPHERE),h4 [Contents:] Computes, time-integration fixes, and pair styles for aspherical particle models including ellipsoids, 2d lines, and 3d triangles. [Install or un-install:] make yes-asphere make machine :pre make no-asphere make machine :pre [Supporting info:] src/ASPHERE: filenames -> commands "Section 6.14"_Section_howto.html#howto_14 "pair_style gayberne"_pair_gayberne.html "pair_style resquared"_pair_resquared.html "doc/PDF/pair_gayberne_extra.pdf"_PDF/pair_gayberne_extra.pdf "doc/PDF/pair_resquared_extra.pdf"_PDF/pair_resquared_extra.pdf examples/ASPHERE examples/ellipse http://lammps.sandia.gov/movies.html#line http://lammps.sandia.gov/movies.html#tri :ul :line BODY package :link(BODY),h4 [Contents:] Body-style particles with internal structure. Computes, time-integration fixes, pair styles, as well as the body styles themselves. See the "body"_body.html doc page for an overview. [Install or un-install:] make yes-body make machine :pre make no-body make machine :pre [Supporting info:] src/BODY filenames -> commands "body"_body.html "atom_style body"_atom_style.html "fix nve/body"_fix_nve_body.html "pair_style body"_pair_body.html examples/body :ul :line CLASS2 package :link(CLASS2),h4 [Contents:] Bond, angle, dihedral, improper, and pair styles for the COMPASS CLASS2 molecular force field. [Install or un-install:] make yes-class2 make machine :pre make no-class2 make machine :pre [Supporting info:] src/CLASS2: filenames -> commands "bond_style class2"_bond_class2.html "angle_style class2"_angle_class2.html "dihedral_style class2"_dihedral_class2.html "improper_style class2"_improper_class2.html "pair_style lj/class2"_pair_class2.html :ul :line COLLOID package :link(COLLOID),h4 [Contents:] Coarse-grained finite-size colloidal particles. Pair stayle and fix wall styles for colloidal interactions. Includes the Fast Lubrication Dynamics (FLD) method for hydrodynamic interactions, which is a simplified approximation to Stokesian dynamics. [Authors:] This package includes Fast Lubrication Dynamics pair styles which were created by Amit Kumar and Michael Bybee from Jonathan Higdon's group at UIUC. [Install or un-install:] make yes-colloid make machine :pre make no-colloid make machine :pre [Supporting info:] src/COLLOID: filenames -> commands "fix wall/colloid"_fix_wall.html "pair_style colloid"_pair_colloid.html "pair_style yukawa/colloid"_pair_yukawa_colloid.html "pair_style brownian"_pair_brownian.html "pair_style lubricate"_pair_lubricate.html "pair_style lubricateU"_pair_lubricateU.html examples/colloid examples/srd :ul :line COMPRESS package :link(COMPRESS),h4 [Contents:] Compressed output of dump files via the zlib compression library, using dump styles with a "gz" in their style name. To use this package you must have the zlib compression library available on your system. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] Note that building with this package assumes you have the zlib compression library available on your system. The LAMMPS build uses the settings in the lib/compress/Makefile.lammps file in the compile/link process. You should only need to edit this file if the LAMMPS build fails on your system. make yes-compress make machine :pre make no-compress make machine :pre [Supporting info:] src/COMPRESS: filenames -> commands src/COMPRESS/README lib/compress/README "dump atom/gz"_dump.html "dump cfg/gz"_dump.html "dump custom/gz"_dump.html "dump xyz/gz"_dump.html :ul :line CORESHELL package :link(CORESHELL),h4 [Contents:] Compute and pair styles that implement the adiabatic core/shell model for polarizability. The pair styles augment Born, Buckingham, and Lennard-Jones styles with core/shell capabilities. The "compute temp/cs"_compute_temp_cs.html command calculates the temperature of a system with core/shell particles. See "Section 6.26"_Section_howto.html#howto_26 for an overview of how to use this package. [Author:] Hendrik Heenen (Technical U of Munich). [Install or un-install:] make yes-coreshell make machine :pre make no-coreshell make machine :pre [Supporting info:] src/CORESHELL: filenames -> commands "Section 6.26"_Section_howto.html#howto_26 "Section 6.25"_Section_howto.html#howto_25 "compute temp/cs"_compute_temp_cs.html "pair_style born/coul/long/cs"_pair_cs.html "pair_style buck/coul/long/cs"_pair_cs.html "pair_style lj/cut/coul/long/cs"_pair_lj.html examples/coreshell :ul :line DIPOLE package :link(DIPOLE),h4 [Contents:] An atom style and several pair styles for point dipole models with short-range or long-range interactions. [Install or un-install:] make yes-dipole make machine :pre make no-dipole make machine :pre [Supporting info:] src/DIPOLE: filenames -> commands "atom_style dipole"_atom_style.html "pair_style lj/cut/dipole/cut"_pair_dipole.html "pair_style lj/cut/dipole/long"_pair_dipole.html "pair_style lj/long/dipole/long"_pair_dipole.html examples/dipole :ul :line GPU package :link(GPU),h4 [Contents:] Dozens of pair styles and a version of the PPPM long-range Coulombic solver optimized for NVIDIA GPUs. All such styles have a "gpu" as a suffix in their style name. "Section 5.3.1"_accelerate_gpu.html gives details of what hardware and Cuda software is required on your system, and details on how to build and use this package. Its styles can be invoked at run time via the "-sf gpu" or "-suffix gpu" "command-line switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS package, which has GPU-enabled styles. [Authors:] Mike Brown (Intel) while at Sandia and ORNL and Trung Nguyen (Northwestern U) while at ORNL. [Install or un-install:] Before building LAMMPS with this package, you must first build the GPU library in lib/gpu from a set of provided C and Cuda files. You can do this manually if you prefer; follow the instructions in lib/gpu/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/gpu/Install.py script with the specified args: make lib-gpu # print help message make lib-gpu args="-m" # build GPU library with default Makefile.linux make lib-gpu args="-i xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision make lib-gpu args="-i xk7 -p single -o xk7.single -m" # ditto, also build GPU library Note that this procedure starts with one of the existing Makefile.machine files in lib/gpu. It allows you to alter 4 important settings in that Makefile, via the -h, -a, -p, -e switches, and save the new Makefile, if desired: CUDA_HOME = where NVIDIA Cuda software is installed on your system CUDA_ARCH = what GPU hardware you have (see help message for details) CUDA_PRECISION = precision (double, mixed, single) EXTRAMAKE = which Makefile.lammps.* file to copy to Makefile.lammps :ul If the library build is successful, 2 files should be created: lib/gpu/libgpu.a and lib/gpu/Makefile.lammps. The latter has settings that enable LAMMPS to link with Cuda libraries. If the settings in Makefile.lammps for your machine are not correct, the LAMMPS build will fail. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-gpu make machine :pre make no-gpu make machine :pre NOTE: If you re-build the GPU library in lib/gpu, you should always un-install the GPU package, then re-install it and re-build LAMMPS. This is because the compilation of files in the GPU package use the library settings from the lib/gpu/Makefile.machine used to build the GPU library. [Supporting info:] src/GPU: filenames -> commands src/GPU/README lib/gpu/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.1"_accelerate_gpu.html "Section 2.7 -sf gpu"_Section_start.html#start_7 "Section 2.7 -pk gpu"_Section_start.html#start_7 "package gpu"_package.html Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (g) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line GRANULAR package :link(GRANULAR),h4 [Contents:] Pair styles and fixes for finite-size granular particles, which interact with each other and boundaries via frictional and dissipative potentials. [Install or un-install:] make yes-granular make machine :pre make no-granular make machine :pre [Supporting info:] src/GRANULAR: filenames -> commands "Section 6.6"_Section_howto.html#howto_6, "fix pour"_fix_pour.html "fix wall/gran"_fix_wall_gran.html "pair_style gran/hooke"_pair_gran.html "pair_style gran/hertz/history"_pair_gran.html examples/granregion examples/pour bench/in.chute 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 :ul :line KIM package :link(KIM),h4 [Contents:] A "pair_style kim"_pair_kim.html command which is a wrapper on the Knowledge Base for Interatomic Models (KIM) repository of interatomic potentials, enabling any of them to be used in LAMMPS simulations. To use this package you must have the KIM library available on your system. Information about the KIM project can be found at its website: https://openkim.org. The KIM project is led by Ellad Tadmor and Ryan Elliott (U Minnesota) and James Sethna (Cornell U). [Authors:] Ryan Elliott (U Minnesota) is the main developer for the KIM API which the "pair_style kim"_pair_kim.html command uses. He developed the pair style in collaboration with Valeriu Smirichinski (U Minnesota). [Install or un-install:] -Using this package requires the KIM library and its models -(interatomic potentials) to be downloaded and installed on your -system. The library can be downloaded and built in lib/kim or -elsewhere on your system. Details of the download, build, and install -process for KIM are given in the lib/kim/README file. +Before building LAMMPS with this package, you must first download and +build the KIM library and include the KIM models that you want to +use. You can do this manually if you prefer; follow the instructions +in lib/kim/README. You can also do it in one step from the lammps/src +dir, using a command like these, which simply invoke the +lib/kim/Install.py script with the specified args. + +make lib-kim # print help message +make lib-kim args="-b . none" # install KIM API lib with only example models +make lib-kim args="-b . Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model +make lib-kim args="-b . OpenKIM" # install KIM API lib with all models +make lib-kim args="-a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver :pre + +Note that in LAMMPS lingo, a KIM model driver is a pair style +(e.g. EAM or Tersoff). A KIM model is a pair style for a particular +element or alloy and set of parameters, e.g. EAM for Cu with a +specific EAM potential file. Also note that installing the KIM API +library with all its models, may take around 30 min to build. Of +course you only need to do that once. + +See the list of KIM model drivers here: +https://openkim.org/kim-items/model-drivers/alphabetical -Once that process is complete, you can then install/un-install the -package and build LAMMPS in the usual manner: +See the list of all KIM models here: +https://openkim.org/kim-items/models/by-model-drivers + +See the list of example KIM models included by default here: +https://openkim.org/kim-api +in the "What is in the KIM API source package?" section + +You can then install/un-install the package and build LAMMPS in the +usual manner: make yes-kim make machine :pre make no-kim make machine :pre [Supporting info:] src/KIM: filenames -> commands src/KIM/README lib/kim/README "pair_style kim"_pair_kim.html examples/kim :ul :line KOKKOS package :link(KOKKOS),h4 [Contents:] Dozens of atom, pair, bond, angle, dihedral, improper, fix, compute styles adapted to compile using the Kokkos library which can convert them to OpenMP or Cuda code so that they run efficiently on multicore CPUs, KNLs, or GPUs. All the styles have a "kk" as a suffix in their style name. "Section 5.3.3"_accelerate_kokkos.html gives details of what hardware and software is required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf kk" or "-suffix kk" "command-line switches"_Section_start.html#start_7. Also see the "GPU"_#GPU, "OPT"_#OPT, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs, KNLs, and GPUs. You must have a C++11 compatible compiler to use this package. [Authors:] The KOKKOS package was created primarily by Christian Trott and Stan Moore (Sandia), with contributions from other folks as well. It uses the open-source "Kokkos library"_https://github.com/kokkos which was developed by Carter Edwards, Christian Trott, and others at Sandia, and which is included in the LAMMPS distribution in lib/kokkos. [Install or un-install:] For the KOKKOS package, you have 3 choices when building. You can build with either CPU or KNL or GPU support. Each choice requires additional settings in your Makefile.machine for the KOKKOS_DEVICES and KOKKOS_ARCH settings. See the src/MAKE/OPTIONS/Makefile.kokkos* files for examples. For multicore CPUs using OpenMP: KOKKOS_DEVICES = OpenMP KOKKOS_ARCH = HSW # HSW = Haswell, SNB = SandyBridge, BDW = Broadwell, etc For Intel KNLs using OpenMP: KOKKOS_DEVICES = OpenMP KOKKOS_ARCH = KNL For NVIDIA GPUs using Cuda: KOKKOS_DEVICES = Cuda KOKKOS_ARCH = Pascal60,Power8 # P100 hosted by an IBM Power8, etc KOKKOS_ARCH = Kepler37,Power8 # K80 hosted by an IBM Power8, etc For GPUs, you also need these 2 lines in your Makefile.machine before the CC line is defined, in this case for use with OpenMPI mpicxx. The 2 lines define a nvcc wrapper compiler, which will use nvcc for compiling Cuda files or use a C++ compiler for non-Kokkos, non-Cuda files. KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd) export OMPI_CXX = $(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper CC = mpicxx Once you have an appropriate Makefile.machine, you can install/un-install the package and build LAMMPS in the usual manner. Note that you cannot build one executable to run on multiple hardware targets (CPU or KNL or GPU). You need to build LAMMPS once for each hardware target, to produce a separate executable. Also note that we do not recommend building with other acceleration packages installed (GPU, OPT, USER-INTEL, USER-OMP) when also building with KOKKOS. make yes-kokkos make machine :pre make no-kokkos make machine :pre [Supporting info:] src/KOKKOS: filenames -> commands src/KOKKOS/README lib/kokkos/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.3"_accelerate_kokkos.html "Section 2.7 -k on ..."_Section_start.html#start_7 "Section 2.7 -sf kk"_Section_start.html#start_7 "Section 2.7 -pk kokkos"_Section_start.html#start_7 "package kokkos"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (k) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line KSPACE package :link(KSPACE),h4 [Contents:] A variety of long-range Coulombic solvers, as well as pair styles which compute the corresponding short-range pairwise Coulombic interactions. These include Ewald, particle-particle particle-mesh (PPPM), and multilevel summation method (MSM) solvers. [Install or un-install:] Building with this package requires a 1d FFT library be present on your system for use by the PPPM solvers. This can be the KISS FFT library provided with LAMMPS, 3rd party libraries like FFTW, or a vendor-supplied FFT library. See step 6 of "Section 2.2.2"_Section_start.html#start_2_2 of the manual for details on how to select different FFT options in your machine Makefile. make yes-kspace make machine :pre make no-kspace make machine :pre [Supporting info:] src/KSPACE: filenames -> commands "kspace_style"_kspace_style.html "doc/PDF/kspace.pdf"_PDF/kspace.pdf "Section 6.7"_Section_howto.html#howto_7 "Section 6.8"_Section_howto.html#howto_8 "Section 6.9"_Section_howto.html#howto_9 "pair_style coul"_pair_coul.html Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 with "long" or "msm" in pair style name examples/peptide bench/in.rhodo :ul :line MANYBODY package :link(MANYBODY),h4 [Contents:] A variety of manybody and bond-order potentials. These include (AI)REBO, BOP, EAM, EIM, Stillinger-Weber, and Tersoff potentials. [Install or un-install:] make yes-manybody make machine :pre make no-manybody make machine :pre [Supporting info:] src/MANYBODY: filenames -> commands Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 examples/comb examples/eim examples/nb3d examples/shear examples/streitz examples/vashishta bench/in.eam :ul :line MC package :link(MC),h4 [Contents:] Several fixes and a pair style that have Monte Carlo (MC) or MC-like attributes. These include fixes for creating, breaking, and swapping bonds, for performing atomic swaps, and performing grand-canonical MC (GCMC) in conjuction with dynamics. [Install or un-install:] make yes-mc make machine :pre make no-mc make machine :pre [Supporting info:] src/MC: filenames -> commands "fix atom/swap"_fix_atom_swap.html "fix bond/break"_fix_bond_break.html "fix bond/create"_fix_bond_create.html "fix bond/swap"_fix_bond_swap.html "fix gcmc"_fix_gcmc.html "pair_style dsmc"_pair_dsmc.html http://lammps.sandia.gov/movies.html#gcmc :ul :line MEAM package :link(MEAM),h4 [Contents:] A pair style for the modified embedded atom (MEAM) potential. [Author:] Greg Wagner (Northwestern U) while at Sandia. [Install or un-install:] Before building LAMMPS with this package, you must first build the MEAM library in lib/meam. You can do this manually if you prefer; follow the instructions in lib/meam/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/meam/Install.py script with the specified args: make lib-meam # print help message make lib-meam args="-m gfortran" # build with GNU Fortran compiler make lib-meam args="-m ifort" # build with Intel ifort compiler :pre The build should produce two files: lib/meam/libmeam.a and lib/meam/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with Fortran (MEAM library). Typically the two compilers used for LAMMPS and the MEAM library need to be consistent (e.g. both Intel or both GNU compilers). If necessary, you can edit/create a new lib/meam/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-meam make machine :pre make no-meam make machine :pre NOTE: You should test building the MEAM library with both the Intel and GNU compilers to see if a simulation runs faster with one versus the other on your system. [Supporting info:] src/MEAM: filenames -> commands src/meam/README lib/meam/README "pair_style meam"_pair_meam.html examples/meam :ul :line MISC package :link(MISC),h4 [Contents:] A variety of compute, fix, pair, dump styles with specialized capabilities that don't align with other packages. Do a directory listing, "ls src/MISC", to see the list of commands. [Install or un-install:] make yes-misc make machine :pre make no-misc make machine :pre [Supporting info:] src/MISC: filenames -> commands "compute ti"_compute_ti.html "fix evaporate"_fix_evaporate.html "fix orient/fcc"_fix_orient.html "fix ttm"_fix_ttm.html "fix thermal/conductivity"_fix_thermal_conductivity.html "fix viscosity"_fix_viscosity.html examples/KAPPA examples/VISCOSITY http://lammps.sandia.gov/pictures.html#ttm http://lammps.sandia.gov/movies.html#evaporation :ul :line MOLECULE package :link(MOLECULE),h4 [Contents:] A large number of atom, pair, bond, angle, dihedral, improper styles that are used to model molecular systems with fixed covalent bonds. The pair styles include the Dreiding (hydrogen-bonding) and CHARMM force fields, and a TIP4P water model. [Install or un-install:] make yes-molecule make machine :pre make no-molecule make machine :pre [Supporting info:] src/MOLECULE: filenames -> commands "atom_style"_atom_style.html "bond_style"_bond_style.html "angle_style"_angle_style.html "dihedral_style"_dihedral_style.html "improper_style"_improper_style.html "pair_style hbond/dreiding/lj"_pair_hbond_dreiding.html "pair_style lj/charmm/coul/charmm"_pair_charmm.html "Section 6.3"_Section_howto.html#howto_3 examples/cmap examples/dreiding examples/micelle, examples/peptide bench/in.chain bench/in.rhodo :ul :line MPIIO package :link(MPIIO),h4 [Contents:] Support for parallel output/input of dump and restart files via the MPIIO library. It adds "dump styles"_dump.html with a "mpiio" in their style name. Restart files with an ".mpiio" suffix are also written and read in parallel. [Install or un-install:] Note that MPIIO is part of the standard message-passing interface (MPI) library, so you should not need any additional compiler or link settings, beyond what LAMMPS normally uses for MPI on your system. make yes-mpiio make machine :pre make no-mpiio make machine :pre [Supporting info:] src/MPIIO: filenames -> commands "dump"_dump.html "restart"_restart.html "write_restart"_write_restart.html "read_restart"_read_restart.html :ul :line MSCG package :link(mscg),h4 [Contents:] A "fix mscg"_fix_mscg.html command which can parameterize a Mulit-Scale Coarse-Graining (MSCG) model using the open-source "MS-CG library"_mscg_home. :link(mscg_home,https://github.com/uchicago-voth/MSCG-release) To use this package you must have the MS-CG library available on your system. [Authors:] The fix was written by Lauren Abbott (Sandia). The MS-CG library was developed by Jacob Wagner in Greg Voth's group at the University of Chicago. [Install or un-install:] Before building LAMMPS with this package, you must first download and build the MS-CG library. Building the MS-CG library and using it from LAMMPS requires a C++11 compatible compiler, and that LAPACK and GSL (GNU Scientific Library) libraries be installed on your machine. See the lib/mscg/README and MSCG/Install files for more details. Assuming these libraries are in place, you can do the download and build of MS-CG manually if you prefer; follow the instructions in lib/mscg/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/mscg/Install.py script with the specified args: make lib-mscg # print help message make lib-mscg args="-g -b -l" # download and build in default lib/mscg/MSCG-release-master make lib-mscg args="-h . MSCG -g -b -l" # download and build in lib/mscg/MSCG make lib-mscg args="-h ~ MSCG -g -b -l" # download and build in ~/mscg :pre Note that the final -l switch is to create 2 symbolic (soft) links, "includelink" and "liblink", in lib/mscg to point to the MS-CG src dir. When LAMMPS builds it will use these links. You should not need to edit the lib/mscg/Makefile.lammps file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-mscg make machine :pre make no-mscg make machine :pre [Supporting info:] src/MSCG: filenames -> commands src/MSCG/README lib/mscg/README examples/mscg :ul :line OPT package :link(OPT),h4 [Contents:] A handful of pair styles which are optimized for improved CPU performance on single or multiple cores. These include EAM, LJ, CHARMM, and Morse potentials. The styles have an "opt" suffix in their style name. "Section 5.3.5"_accelerate_opt.html gives details of how to build and use this package. Its styles can be invoked at run time via the "-sf opt" or "-suffix opt" "command-line switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPU performance. [Authors:] James Fischer (High Performance Technologies), David Richie, and Vincent Natoli (Stone Ridge Technolgy). [Install or un-install:] make yes-opt make machine :pre make no-opt make machine :pre NOTE: The compile flag "-restrict" must be used to build LAMMPS with the OPT package. It should be added to the CCFLAGS line of your Makefile.machine. See Makefile.opt in src/MAKE/OPTIONS for an example. CCFLAGS: add -restrict :ul [Supporting info:] src/OPT: filenames -> commands "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.5"_accelerate_opt.html "Section 2.7 -sf opt"_Section_start.html#start_7 Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (t) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line PERI package :link(PERI),h4 [Contents:] An atom style, several pair styles which implement different Peridynamics materials models, and several computes which calculate diagnostics. Peridynamics is a a particle-based meshless continuum model. [Authors:] The original package was created by Mike Parks (Sandia). Additional Peridynamics models were added by Rezwanur Rahman and John Foster (UTSA). [Install or un-install:] make yes-peri make machine :pre make no-peri make machine :pre [Supporting info:] src/PERI: filenames -> commands "doc/PDF/PDLammps_overview.pdf"_PDF/PDLammps_overview.pdf "doc/PDF/PDLammps_EPS.pdf"_PDF/PDLammps_EPS.pdf "doc/PDF/PDLammps_VES.pdf"_PDF/PDLammps_VES.pdf "atom_style peri"_atom_style.html "pair_style peri/*"_pair_peri.html "compute damage/atom"_compute_damage_atom.html "compute plasticity/atom"_compute_plasticity_atom.html examples/peri http://lammps.sandia.gov/movies.html#peri :ul :line POEMS package :link(POEMS),h4 [Contents:] A fix that wraps the Parallelizable Open source Efficient Multibody Software (POEMS) library, which is able to simulate the dynamics of articulated body systems. These are systems with multiple rigid bodies (collections of particles) whose motion is coupled by connections at hinge points. [Author:] Rudra Mukherjee (JPL) while at RPI. [Install or un-install:] Before building LAMMPS with this package, you must first build the POEMS library in lib/poems. You can do this manually if you prefer; follow the instructions in lib/poems/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/poems/Install.py script with the specified args: make lib-poems # print help message make lib-poems args="-m g++" # build with GNU g++ compiler make lib-poems args="-m icc" # build with Intel icc compiler :pre The build should produce two files: lib/poems/libpoems.a and lib/poems/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the POEMS library (though typically the settings are just blank). If necessary, you can edit/create a new lib/poems/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-poems make machine :pre make no-meam make machine :pre [Supporting info:] src/POEMS: filenames -> commands src/POEMS/README lib/poems/README "fix poems"_fix_poems.html examples/rigid :ul :line PYTHON package :link(PYTHON),h4 [Contents:] A "python"_python.html command which allow you to execute Python code from a LAMMPS input script. The code can be in a separate file or embedded in the input script itself. See "Section 11.2"_Section_python.html#py_2 for an overview of using Python from LAMMPS in this manner and the entire section for other ways to use LAMMPS and Python together. [Install or un-install:] make yes-python make machine :pre make no-python make machine :pre NOTE: Building with the PYTHON package assumes you have a Python shared library available on your system, which needs to be a Python 2 version, 2.6 or later. Python 3 is not yet supported. See the lib/python/README for more details. Note that the build uses the lib/python/Makefile.lammps file in the compile/link process. You should only need to create a new Makefile.lammps.* file (and copy it to Makefile.lammps) if the LAMMPS build fails. [Supporting info:] src/PYTHON: filenames -> commands "Section 11"_Section_python.html lib/python/README examples/python :ul :line QEQ package :link(QEQ),h4 [Contents:] Several fixes for performing charge equilibration (QEq) via different algorithms. These can be used with pair styles that perform QEq as part of their formulation. [Install or un-install:] make yes-qeq make machine :pre make no-qeq make machine :pre [Supporting info:] src/QEQ: filenames -> commands "fix qeq/*"_fix_qeq.html examples/qeq examples/streitz :ul :line REAX package :link(REAX),h4 [Contents:] A pair style which wraps a Fortran library which implements the ReaxFF potential, which is a universal reactive force field. See the "USER-REAXC package"_#USER-REAXC for an alternate implementation in C/C++. Also a "fix reax/bonds"_fix_reax_bonds.html command for monitoring molecules as bonds are created and destroyed. [Author:] Aidan Thompson (Sandia). [Install or un-install:] Before building LAMMPS with this package, you must first build the REAX library in lib/reax. You can do this manually if you prefer; follow the instructions in lib/reax/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/reax/Install.py script with the specified args: make lib-reax # print help message make lib-reax args="-m gfortran" # build with GNU Fortran compiler make lib-reax args="-m ifort" # build with Intel ifort compiler :pre The build should produce two files: lib/reax/libreax.a and lib/reax/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with Fortran (REAX library). Typically the two compilers used for LAMMPS and the REAX library need to be consistent (e.g. both Intel or both GNU compilers). If necessary, you can edit/create a new lib/reax/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-reax make machine :pre make no-reax make machine :pre [Supporting info:] src/REAX: filenames -> commands lib/reax/README "pair_style reax"_pair_reax.html "fix reax/bonds"_fix_reax_bonds.html examples/reax :ul :line REPLICA package :link(REPLICA),h4 [Contents:] A collection of multi-replica methods which can be used when running multiple LAMMPS simulations (replicas). See "Section 6.5"_Section_howto.html#howto_5 for an overview of how to run multi-replica simulations in LAMMPS. Methods in the package include nudged elastic band (NEB), parallel replica dynamics (PRD), temperature accelerated dynamics (TAD), parallel tempering, and a verlet/split algorithm for performing long-range Coulombics on one set of processors, and the remainder of the force field calcalation on another set. [Install or un-install:] make yes-replica make machine :pre make no-replica make machine :pre [Supporting info:] src/REPLICA: filenames -> commands "Section 6.5"_Section_howto.html#howto_5 "neb"_neb.html "prd"_prd.html "tad"_tad.html "temper"_temper.html, "run_style verlet/split"_run_style.html examples/neb examples/prd examples/tad :ul :line RIGID package :link(RIGID),h4 [Contents:] Fixes which enforce rigid constraints on collections of atoms or particles. This includes SHAKE and RATTLE, as well as varous rigid-body integrators for a few large bodies or many small bodies. Also several computes which calculate properties of rigid bodies. To install/build: make yes-rigid make machine :pre To un-install/re-build: make no-rigid make machine :pre [Supporting info:] src/RIGID: filenames -> commands "compute erotate/rigid"_compute_erotate_rigid.html fix shake"_fix_shake.html "fix rattle"_fix_shake.html "fix rigid/*"_fix_rigid.html examples/ASPHERE examples/rigid bench/in.rhodo http://lammps.sandia.gov/movies.html#box http://lammps.sandia.gov/movies.html#star :ul :line SHOCK package :link(SHOCK),h4 [Contents:] Fixes for running impact simulations where a shock-wave passes through a material. [Install or un-install:] make yes-shock make machine :pre make no-shock make machine :pre [Supporting info:] src/SHOCK: filenames -> commands "fix append/atoms"_fix_append_atoms.html "fix msst"_fix_msst.html "fix nphug"_fix_nphug.html "fix wall/piston"_fix_wall_piston.html examples/hugoniostat examples/msst :ul :line SNAP package :link(SNAP),h4 [Contents:] A pair style for the spectral neighbor analysis potential (SNAP). SNAP is methodology for deriving a highly accurate classical potential fit to a large archive of quantum mechanical (DFT) data. Also several computes which analyze attributes of the potential. [Author:] Aidan Thompson (Sandia). [Install or un-install:] make yes-snap make machine :pre make no-snap make machine :pre [Supporting info:] src/SNAP: filenames -> commands "pair snap"_pair_snap.html "compute sna/atom"_compute_sna_atom.html "compute snad/atom"_compute_sna_atom.html "compute snav/atom"_compute_sna_atom.html examples/snap :ul :line SRD package :link(SRD),h4 [Contents:] A pair of fixes which implement the Stochastic Rotation Dynamics (SRD) method for coarse-graining of a solvent, typically around large colloidal particles. To install/build: make yes-srd make machine :pre To un-install/re-build: make no-srd make machine :pre [Supporting info:] src/SRD: filenames -> commands "fix srd"_fix_srd.html "fix wall/srd"_fix_wall_srd.html examples/srd examples/ASPHERE http://lammps.sandia.gov/movies.html#tri http://lammps.sandia.gov/movies.html#line http://lammps.sandia.gov/movies.html#poly :ul :line VORONOI package :link(VORONOI),h4 [Contents:] A compute command which calculates the Voronoi tesselation of a collection of atoms by wrapping the "Voro++ library"_voro_home. This can be used to calculate the local volume or each atoms or its near neighbors. :link(voro_home,http://math.lbl.gov/voro++) To use this package you must have the Voro++ library available on your system. [Author:] Daniel Schwen (INL) while at LANL. The open-source Voro++ library was written by Chris Rycroft (Harvard U) while at UC Berkeley and LBNL. [Install or un-install:] Before building LAMMPS with this package, you must first download and build the Voro++ library. You can do this manually if you prefer; follow the instructions in lib/voronoi/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/voronoi/Install.py script with the specified args: make lib-voronoi # print help message make lib-voronoi args="-g -b -l" # download and build in default lib/voronoi/voro++-0.4.6 make lib-voronoi args="-h . voro++ -g -b -l" # download and build in lib/voronoi/voro++ make lib-voronoi args="-h ~ voro++ -g -b -l" # download and build in ~/voro++ :pre Note that the final -l switch is to create 2 symbolic (soft) links, "includelink" and "liblink", in lib/voronoi to point to the Voro++ src dir. When LAMMPS builds it will use these links. You should not need to edit the lib/voronoi/Makefile.lammps file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-voronoi make machine :pre make no-voronoi make machine :pre [Supporting info:] src/VORONOI: filenames -> commands src/VORONOI/README lib/voronoi/README "compute voronoi/atom"_compute_voronoi_atom.html examples/voronoi :ul :line :line USER-ATC package :link(USER-ATC),h4 [Contents:] ATC stands for atoms-to-continuum. This package implements a "fix atc"_fix_atc.html command to either couple molecular dynamics with continuum finite element equations or perform on-the-fly conversion of atomic information to continuum fields. [Authors:] Reese Jones, Jeremy Templeton, Jon Zimmerman (Sandia). [Install or un-install:] Before building LAMMPS with this package, you must first build the ATC library in lib/atc. You can do this manually if you prefer; follow the instructions in lib/atc/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/atc/Install.py script with the specified args: make lib-atc # print help message make lib-atc args="-m g++" # build with GNU g++ compiler make lib-atc args="-m icc" # build with Intel icc compiler :pre The build should produce two files: lib/atc/libatc.a and lib/atc/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the ATC library. If necessary, you can edit/create a new lib/atc/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. Note that the Makefile.lammps file has settings for the BLAS and LAPACK linear algebra libraries. As explained in lib/atc/README these can either exist on your system, or you can use the files provided in lib/linalg. In the latter case you also need to build the library in lib/linalg with a command like these: make lib-linalg # print help message -make lib-atc args="-m gfortran" # build with GNU Fortran compiler +make lib-linalg args="-m gfortran" # build with GNU Fortran compiler You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-atc make machine :pre make no-user-atc make machine :pre [Supporting info:] src/USER-ATC: filenames -> commands src/USER-ATC/README "fix atc"_fix_atc.html examples/USER/atc http://lammps.sandia.gov/pictures.html#atc :ul :line USER-AWPMD package :link(USER-AWPMD),h4 [Contents:] AWPMD stands for Antisymmetrized Wave Packet Molecular Dynamics. This package implements an atom, pair, and fix style which allows electrons to be treated as explicit particles in a classical molecular dynamics model. [Author:] Ilya Valuev (JIHT, Russia). [Install or un-install:] Before building LAMMPS with this package, you must first build the AWPMD library in lib/awpmd. You can do this manually if you prefer; follow the instructions in lib/awpmd/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/awpmd/Install.py script with the specified args: make lib-awpmd # print help message make lib-awpmd args="-m g++" # build with GNU g++ compiler make lib-awpmd args="-m icc" # build with Intel icc compiler :pre The build should produce two files: lib/awpmd/libawpmd.a and lib/awpmd/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the AWPMD library. If necessary, you can edit/create a new lib/awpmd/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. Note that the Makefile.lammps file has settings for the BLAS and LAPACK linear algebra libraries. As explained in lib/awpmd/README these can either exist on your system, or you can use the files provided in lib/linalg. In the latter case you also need to build the library in lib/linalg with a command like these: make lib-linalg # print help message make lib-atc args="-m gfortran" # build with GNU Fortran compiler You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-awpmd make machine :pre make no-user-awpmd make machine :pre [Supporting info:] src/USER-AWPMD: filenames -> commands src/USER-AWPMD/README "pair awpmd/cut"_pair_awpmd.html examples/USER/awpmd :ul :line USER-CGDNA package :link(USER-CGDNA),h4 [Contents:] Several pair styles, a bond style, and integration fixes for coarse-grained models of single- and double-stranded DNA based on the oxDNA model of Doye, Louis and Ouldridge at the University of Oxford. This includes Langevin-type rigid-body integrators with improved stability. [Author:] Oliver Henrich (University of Strathclyde, Glasgow). [Install or un-install:] make yes-user-cgdna make machine :pre make no-user-cgdna make machine :pre [Supporting info:] src/USER-CGDNA: filenames -> commands /src/USER-CGDNA/README "pair_style oxdna/*"_pair_oxdna.html "pair_style oxdna2/*"_pair_oxdna2.html "bond_style oxdna/*"_bond_oxdna.html "bond_style oxdna2/*"_bond_oxdna.html "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html :ul :line USER-CGSDK package :link(USER-CGSDK),h4 [Contents:] Several pair styles and an angle style which implement the coarse-grained SDK model of Shinoda, DeVane, and Klein which enables simulation of ionic liquids, electrolytes, lipids and charged amino acids. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] make yes-user-cgsdk make machine :pre make no-user-cgsdk make machine :pre [Supporting info:] src/USER-CGSDK: filenames -> commands src/USER-CGSDK/README "pair_style lj/sdk/*"_pair_sdk.html "angle_style sdk"_angle_sdk.html examples/USER/cgsdk http://lammps.sandia.gov/pictures.html#cg :ul :line USER-COLVARS package :link(USER-COLVARS),h4 [Contents:] COLVARS stands for collective variables, which can be used to implement various enhanced sampling methods, including Adaptive Biasing Force, Metadynamics, Steered MD, Umbrella Sampling and Restraints. A "fix colvars"_fix_colvars.html command is implemented which wraps a COLVARS library, which implements these methods. simulations. [Authors:] Axel Kohlmeyer (Temple U). The COLVARS library was written by Giacomo Fiorin (ICMS, Temple University, Philadelphia, PA, USA) and Jerome Henin (LISM, CNRS, Marseille, France). [Install or un-install:] Before building LAMMPS with this package, you must first build the COLVARS library in lib/colvars. You can do this manually if you prefer; follow the instructions in lib/colvars/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/colvars/Install.py script with the specified args: make lib-colvars # print help message make lib-colvars args="-m g++" # build with GNU g++ compiler :pre The build should produce two files: lib/colvars/libcolvars.a and lib/colvars/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the COLVARS library (though typically the settings are just blank). If necessary, you can edit/create a new lib/colvars/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-colvars make machine :pre make no-user-colvars make machine :pre [Supporting info:] src/USER-COLVARS: filenames -> commands "doc/PDF/colvars-refman-lammps.pdf"_PDF/colvars-refman-lammps.pdf src/USER-COLVARS/README lib/colvars/README "fix colvars"_fix_colvars.html examples/USER/colvars :ul :line USER-DIFFRACTION package :link(USER-DIFFRACTION),h4 [Contents:] Two computes and a fix for calculating x-ray and electron diffraction intensities based on kinematic diffraction theory. [Author:] Shawn Coleman while at the U Arkansas. [Install or un-install:] make yes-user-diffraction make machine :pre make no-user-diffraction make machine :pre [Supporting info:] src/USER-DIFFRACTION: filenames -> commands "compute saed"_compute_saed.html "compute xrd"_compute_xrd.html "fix saed/vtk"_fix_saed_vtk.html examples/USER/diffraction :ul :line USER-DPD package :link(USER-DPD),h4 [Contents:] DPD stands for dissipative particle dynamics. This package implements coarse-grained DPD-based models for energetic, reactive molecular crystalline materials. It includes many pair styles specific to these systems, including for reactive DPD, where each particle has internal state for multiple species and a coupled set of chemical reaction ODEs are integrated each timestep. Highly accurate time intergrators for isothermal, isoenergetic, isobaric and isenthalpic conditions are included. These enable long timesteps via the Shardlow splitting algorithm. [Authors:] Jim Larentzos (ARL), Tim Mattox (Engility Corp), and and John Brennan (ARL). [Install or un-install:] make yes-user-dpd make machine :pre make no-user-dpd make machine :pre [Supporting info:] src/USER-DPD: filenames -> commands /src/USER-DPD/README "compute dpd"_compute_dpd.html "compute dpd/atom"_compute_dpd_atom.html "fix eos/cv"_fix_eos_table.html "fix eos/table"_fix_eos_table.html "fix eos/table/rx"_fix_eos_table_rx.html "fix shardlow"_fix_shardlow.html "fix rx"_fix_rx.html "pair table/rx"_pair_table_rx.html "pair dpd/fdt"_pair_dpd_fdt.html "pair dpd/fdt/energy"_pair_dpd_fdt.html "pair exp6/rx"_pair_exp6_rx.html "pair multi/lucy"_pair_multi_lucy.html "pair multi/lucy/rx"_pair_multi_lucy_rx.html examples/USER/dpd :ul :line USER-DRUDE package :link(USER-DRUDE),h4 [Contents:] Fixes, pair styles, and a compute to simulate thermalized Drude oscillators as a model of polarization. See "Section 6.27"_Section_howto.html#howto_27 for an overview of how to use the package. There are auxiliary tools for using this package in tools/drude. [Authors:] Alain Dequidt (U Blaise Pascal Clermont-Ferrand), Julien Devemy (CNRS), and Agilio Padua (U Blaise Pascal). [Install or un-install:] make yes-user-drude make machine :pre make no-user-drude make machine :pre [Supporting info:] src/USER-DRUDE: filenames -> commands "Section 6.27"_Section_howto.html#howto_27 "Section 6.25"_Section_howto.html#howto_25 src/USER-DRUDE/README "fix drude"_fix_drude.html "fix drude/transform/*"_fix_drude_transform.html "compute temp/drude"_compute_temp_drude.html "pair thole"_pair_thole.html "pair lj/cut/thole/long"_pair_thole.html examples/USER/drude tools/drude :ul :line USER-EFF package :link(USER-EFF),h4 [Contents:] EFF stands for electron force field which allows a classical MD code to model electrons as particles of variable radius. This package contains atom, pair, fix and compute styles which implement the eFF as described in A. Jaramillo-Botero, J. Su, Q. An, and W.A. Goddard III, JCC, 2010. The eFF potential was first introduced by Su and Goddard, in 2007. There are auxiliary tools for using this package in tools/eff; see its README file. [Author:] Andres Jaramillo-Botero (CalTech). [Install or un-install:] make yes-user-eff make machine :pre make no-user-eff make machine :pre [Supporting info:] src/USER-EFF: filenames -> commands src/USER-EFF/README "atom_style electron"_atom_style.html "fix nve/eff"_fix_nve_eff.html "fix nvt/eff"_fix_nh_eff.html "fix npt/eff"_fix_nh_eff.html "fix langevin/eff"_fix_langevin_eff.html "compute temp/eff"_compute_temp_eff.html "pair eff/cut"_pair_eff.html "pair eff/inline"_pair_eff.html examples/USER/eff tools/eff/README tools/eff http://lammps.sandia.gov/movies.html#eff :ul :line USER-FEP package :link(USER-FEP),h4 [Contents:] FEP stands for free energy perturbation. This package provides methods for performing FEP simulations by using a "fix adapt/fep"_fix_adapt_fep.html command with soft-core pair potentials, which have a "soft" in their style name. There are auxiliary tools for using this package in tools/fep; see its README file. [Author:] Agilio Padua (Universite Blaise Pascal Clermont-Ferrand) [Install or un-install:] make yes-user-fep make machine :pre make no-user-fep make machine :pre [Supporting info:] src/USER-FEP: filenames -> commands src/USER-FEP/README "fix adapt/fep"_fix_adapt_fep.html "compute fep"_compute_fep.html "pair_style */soft"_pair_lj_soft.html examples/USER/fep tools/fep/README tools/fep :ul :line USER-H5MD package :link(USER-H5MD),h4 [Contents:] H5MD stands for HDF5 for MD. "HDF5"_HDF5 is a portable, binary, self-describing file format, used by many scientific simulations. H5MD is a format for molecular simulations, built on top of HDF5. This package implements a "dump h5md"_dump_h5md.html command to output LAMMPS snapshots in this format. :link(HDF5,http://www.hdfgroup.org/HDF5) To use this package you must have the HDF5 library available on your system. [Author:] Pierre de Buyl (KU Leuven) created both the package and the H5MD format. [Install or un-install:] Note that to follow these steps to compile and link to the CH5MD library, you need the standard HDF5 software package installed on your system, which should include the h5cc compiler and the HDF5 library. Before building LAMMPS with this package, you must first build the CH5MD library in lib/h5md. You can do this manually if you prefer; follow the instructions in lib/h5md/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/h5md/Install.py script with the specified args: make lib-h5md # print help message make lib-hm5d args="-m h5cc" # build with h5cc compiler :pre The build should produce two files: lib/h5md/libch5md.a and lib/h5md/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the system HDF5 library. If necessary, you can edit/create a new lib/h5md/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-h5md make machine :pre make no-user-h5md make machine :pre [Supporting info:] src/USER-H5MD: filenames -> commands src/USER-H5MD/README lib/h5md/README "dump h5md"_dump_h5md.html :ul :line USER-INTEL package :link(USER-INTEL),h4 [Contents:] Dozens of pair, fix, bond, angle, dihedral, improper, and kspace styles which are optimized for Intel CPUs and KNLs (Knights Landing). All of them have an "intel" in their style name. "Section 5.3.2"_accelerate_intel.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf intel" or "-suffix intel" "command-line switches"_Section_start.html#start_7. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs and KNLs. You need to have an Intel compiler, version 14 or higher to take full advantage of this package. [Author:] Mike Brown (Intel). [Install or un-install:] For the USER-INTEL package, you have 2 choices when building. You can build with either CPU or KNL support. Each choice requires additional settings in your Makefile.machine for CCFLAGS and LINKFLAGS and optimized malloc libraries. See the src/MAKE/OPTIONS/Makefile.intel_cpu and src/MAKE/OPTIONS/Makefile.knl files for examples. For CPUs: OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \ -fno-alias -ansi-alias -restrict $(OPTFLAGS) LINKFLAGS = -g -qopenmp $(OPTFLAGS) LIB = -ltbbmalloc -ltbbmalloc_proxy For KNLs: OPTFLAGS = -xMIC-AVX512 -O2 -fp-model fast=2 -no-prec-div -qoverride-limits CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \ -fno-alias -ansi-alias -restrict $(OPTFLAGS) LINKFLAGS = -g -qopenmp $(OPTFLAGS) LIB = -ltbbmalloc Once you have an appropriate Makefile.machine, you can install/un-install the package and build LAMMPS in the usual manner. Note that you cannot build one executable to run on multiple hardware targets (Intel CPUs or KNL). You need to build LAMMPS once for each hardware target, to produce a separate executable. You should also typically install the USER-OMP package, as it can be used in tandem with the USER-INTEL package to good effect, as explained in "Section 5.3.2"_accelerate_intel.html. make yes-user-intel yes-user-omp make machine :pre make no-user-intel no-user-omp make machine :pre [Supporting info:] src/USER-INTEL: filenames -> commands src/USER-INTEL/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.2"_accelerate_gpu.html "Section 2.7 -sf intel"_Section_start.html#start_7 "Section 2.7 -pk intel"_Section_start.html#start_7 "package intel"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (i) src/USER-INTEL/TEST "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line USER-LB package :link(USER-LB),h4 [Contents:] Fixes which implement a background Lattice-Boltzmann (LB) fluid, which can be used to model MD particles influenced by hydrodynamic forces. [Authors:] Frances Mackay and Colin Denniston (University of Western Ontario). [Install or un-install:] make yes-user-lb make machine :pre make no-user-lb make machine :pre [Supporting info:] src/USER-LB: filenames -> commands src/USER-LB/README "fix lb/fluid"_fix_lb_fluid.html "fix lb/momentum"_fix_lb_momentum.html "fix lb/viscous"_fix_lb_viscous.html examples/USER/lb :ul :line USER-MGPT package :link(USER-MGPT),h4 [Contents:] A pair style which provides a fast implementation of the quantum-based MGPT multi-ion potentials. The MGPT or model GPT method derives from first-principles DFT-based generalized pseudopotential theory (GPT) through a series of systematic approximations valid for mid-period transition metals with nearly half-filled d bands. The MGPT method was originally developed by John Moriarty at LLNL. The pair style in this package calculates forces and energies using an optimized matrix-MGPT algorithm due to Tomas Oppelstrup at LLNL. [Authors:] Tomas Oppelstrup and John Moriarty (LLNL). [Install or un-install:] make yes-user-mgpt make machine :pre make no-user-mgpt make machine :pre [Supporting info:] src/USER-MGPT: filenames -> commands src/USER-MGPT/README "pair_style mgpt"_pair_mgpt.html examples/USER/mgpt :ul :line USER-MISC package :link(USER-MISC),h4 [Contents:] A potpourri of (mostly) unrelated features contributed to LAMMPS by users. Each feature is a single fix, compute, pair, bond, angle, dihedral, improper, or command style. [Authors:] The author for each style in the package is listed in the src/USER-MISC/README file. [Install or un-install:] make yes-user-misc make machine :pre make no-user-misc make machine :pre [Supporting info:] src/USER-MISC: filenames -> commands src/USER-MISC/README one doc page per individual command listed in src/USER-MISC/README examples/USER/misc :ul :line USER-MANIFOLD package :link(USER-MANIFOLD),h4 [Contents:] Several fixes and a "manifold" class which enable simulations of particles constrained to a manifold (a 2D surface within the 3D simulation box). This is done by applying the RATTLE constraint algorithm to formulate single-particle constraint functions g(xi,yi,zi) = 0 and their derivative (i.e. the normal of the manifold) n = grad(g). [Author:] Stefan Paquay (until 2017: Eindhoven University of Technology (TU/e), The Netherlands; since 2017: Brandeis University, Waltham, MA, USA) [Install or un-install:] make yes-user-manifold make machine :pre make no-user-manifold make machine :pre [Supporting info:] src/USER-MANIFOLD: filenames -> commands src/USER-MANIFOLD/README "doc/manifolds"_manifolds.html "fix manifoldforce"_fix_manifoldforce.html "fix nve/manifold/rattle"_fix_nve_manifold_rattle.html "fix nvt/manifold/rattle"_fix_nvt_manifold_rattle.html examples/USER/manifold http://lammps.sandia.gov/movies.html#manifold :ul :line USER-MEAMC package :link(USER-MEAMC),h4 [Contents:] A pair style for the modified embedded atom (MEAM) potential translated from the Fortran version in the "MEAM"_MEAM package to plain C++. In contrast to the MEAM package, no library needs to be compiled and the pair style can be instantiated multiple times. [Author:] Sebastian Huetter, (Otto-von-Guericke University Magdeburg) based on the Fortran version of Greg Wagner (Northwestern U) while at Sandia. [Install or un-install:] make yes-user-meamc make machine :pre make no-user-meamc make machine :pre [Supporting info:] src/USER-MEAMC: filenames -> commands src/USER-MEAMC/README "pair meam/c"_pair_meam.html examples/meam :ul :line USER-MOLFILE package :link(USER-MOLFILE),h4 [Contents:] A "dump molfile"_dump_molfile.html command which uses molfile plugins that are bundled with the "VMD"_vmd_home molecular visualization and analysis program, to enable LAMMPS to dump snapshots in formats compatible with various molecular simulation tools. :link(vmd_home,http://www.ks.uiuc.edu/Research/vmd) To use this package you must have the desired VMD plugins available on your system. Note that this package only provides the interface code, not the plugins themselves, which will be accessed when requesting a specific plugin via the "dump molfile"_dump_molfile.html command. Plugins can be obtained from a VMD installation which has to match the platform that you are using to compile LAMMPS for. By adding plugins to VMD, support for new file formats can be added to LAMMPS (or VMD or other programs that use them) without having to recompile the application itself. More information about the VMD molfile plugins can be found at "http://www.ks.uiuc.edu/Research/vmd/plugins/molfile"_http://www.ks.uiuc.edu/Research/vmd/plugins/molfile. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] Note that the lib/molfile/Makefile.lammps file has a setting for a dynamic loading library libdl.a that should is typically present on all systems, which is required for LAMMPS to link with this package. If the setting is not valid for your system, you will need to edit the Makefile.lammps file. See lib/molfile/README and lib/molfile/Makefile.lammps for details. make yes-user-molfile make machine :pre make no-user-molfile make machine :pre [Supporting info:] src/USER-MOLFILE: filenames -> commands src/USER-MOLFILE/README lib/molfile/README "dump molfile"_dump_molfile.html :ul :line USER-NETCDF package :link(USER-NETCDF),h4 [Contents:] Dump styles for writing NetCDF formatted dump files. NetCDF is a portable, binary, self-describing file format developed on top of HDF5. The file contents follow the AMBER NetCDF trajectory conventions (http://ambermd.org/netcdf/nctraj.xhtml), but include extensions. To use this package you must have the NetCDF library available on your system. Note that NetCDF files can be directly visualized with the following tools: "Ovito"_ovito (Ovito supports the AMBER convention and the extensions mentioned above) "VMD"_vmd_home "AtomEye"_atomeye (the libAtoms version of AtomEye contains a NetCDF reader not present in the standard distribution) :ul :link(ovito,http://www.ovito.org) :link(atomeye,http://www.libatoms.org) [Author:] Lars Pastewka (Karlsruhe Institute of Technology). [Install or un-install:] Note that to follow these steps, you need the standard NetCDF software package installed on your system. The lib/netcdf/Makefile.lammps file has settings for NetCDF include and library files that LAMMPS needs to compile and linkk with this package. If the settings are not valid for your system, you will need to edit the Makefile.lammps file. See lib/netcdf/README for details. make yes-user-netcdf make machine :pre make no-user-netcdf make machine :pre [Supporting info:] src/USER-NETCDF: filenames -> commands src/USER-NETCDF/README lib/netcdf/README "dump netcdf"_dump_netcdf.html :ul :line USER-OMP package :link(USER-OMP),h4 [Contents:] Hundreds of pair, fix, compute, bond, angle, dihedral, improper, and kspace styles which are altered to enable threading on many-core CPUs via OpenMP directives. All of them have an "omp" in their style name. "Section 5.3.4"_accelerate_omp.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf omp" or "-suffix omp" "command-line switches"_Section_start.html#start_7. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-INTEL"_#USER-INTEL packages, which have styles optimized for CPUs. [Author:] Axel Kohlmeyer (Temple U). NOTE: The compile flags "-restrict" and "-fopenmp" must be used to build LAMMPS with the USER-OMP package, as well as the link flag "-fopenmp". They should be added to the CCFLAGS and LINKFLAGS lines of your Makefile.machine. See src/MAKE/OPTIONS/Makefile.omp for an example. Once you have an appropriate Makefile.machine, you can install/un-install the package and build LAMMPS in the usual manner: [Install or un-install:] make yes-user-omp make machine :pre make no-user-omp make machine :pre CCFLAGS: add -fopenmp and -restrict LINKFLAGS: add -fopenmp :ul [Supporting info:] src/USER-OMP: filenames -> commands src/USER-OMP/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.4"_accelerate_omp.html "Section 2.7 -sf omp"_Section_start.html#start_7 "Section 2.7 -pk omp"_Section_start.html#start_7 "package omp"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (o) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line USER-PHONON package :link(USER-PHONON),h4 [Contents:] A "fix phonon"_fix_phonon.html command that calculates dynamical matrices, which can then be used to compute phonon dispersion relations, directly from molecular dynamics simulations. [Author:] Ling-Ti Kong (Shanghai Jiao Tong University). [Install or un-install:] make yes-user-phonon make machine :pre make no-user-phonon make machine :pre [Supporting info:] src/USER-PHONON: filenames -> commands src/USER-PHONON/README "fix phonon"_fix_phonon.html examples/USER/phonon :ul :line USER-QMMM package :link(USER-QMMM),h4 [Contents:] A "fix qmmm"_fix_qmmm.html command which allows LAMMPS to be used in a QM/MM simulation, currently only in combination with the "Quantum ESPRESSO"_espresso package. :link(espresso,http://www.quantum-espresso.org) To use this package you must have Quantum ESPRESSO available on your system. The current implementation only supports an ONIOM style mechanical coupling to the Quantum ESPRESSO plane wave DFT package. Electrostatic coupling is in preparation and the interface has been written in a manner that coupling to other QM codes should be possible without changes to LAMMPS itself. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] Before building LAMMPS with this package, you must first build the QMMM library in lib/qmmm. You can do this manually if you prefer; follow the first two steps explained in lib/colvars/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/colvars/Install.py script with the specified args: make lib-qmmm # print help message make lib-qmmm args="-m gfortran" # build with GNU Fortran compiler :pre The build should produce two files: lib/qmmm/libqmmm.a and lib/qmmm/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the QMMM library (though typically the settings are just blank). If necessary, you can edit/create a new lib/qmmm/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-qmmm make machine :pre make no-user-qmmm make machine :pre NOTE: The LAMMPS executable these steps produce is not yet functional for a QM/MM simulation. You must also build Quantum ESPRESSO and create a new executable which links LAMMPS and Quanutm ESPRESSO together. These are steps 3 and 4 described in the lib/qmmm/README file. [Supporting info:] src/USER-QMMM: filenames -> commands src/USER-QMMM/README lib/qmmm/README "fix phonon"_fix_phonon.html lib/qmmm/example-ec/README lib/qmmm/example-mc/README :ul :line USER-QTB package :link(USER-QTB),h4 [Contents:] Two fixes which provide a self-consistent quantum treatment of vibrational modes in a classical molecular dynamics simulation. By coupling the MD simulation to a colored thermostat, it introduces zero point energy into the system, altering the energy power spectrum and the heat capacity to account for their quantum nature. This is useful when modeling systems at temperatures lower than their classical limits or when temperatures ramp across the classical limits in a simulation. [Author:] Yuan Shen (Stanford U). [Install or un-install:] make yes-user-qtb make machine :pre make no-user-qtb make machine :pre [Supporting info:] src/USER-QTB: filenames -> commands src/USER-QTB/README "fix qtb"_fix_qtb.html "fix qbmsst"_fix_qbmsst.html examples/USER/qtb :ul :line USER-QUIP package :link(USER-QUIP),h4 [Contents:] A "pair_style quip"_pair_quip.html command which wraps the "QUIP libAtoms library"_quip, which includes a variety of interatomic potentials, including Gaussian Approximation Potential (GAP) models developed by the Cambridge University group. :link(quip,https://github.com/libAtoms/QUIP) To use this package you must have the QUIP libAatoms library available on your system. [Author:] Albert Bartok (Cambridge University) [Install or un-install:] Note that to follow these steps to compile and link to the QUIP library, you must first download and build QUIP on your systems. It can be obtained from GitHub. See step 1 and step 1.1 in the lib/quip/README file for details on how to do this. Note that it requires setting two environment variables, QUIP_ROOT and QUIP_ARCH, which will be accessed by the lib/quip/Makefile.lammps file which is used when you compile and link LAMMPS with this package. You should only need to edit this file if the LAMMPS build can not use its settings to successfully build on your system. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-quip make machine :pre make no-user-quip make machine :pre [Supporting info:] src/USER-QUIP: filenames -> commands src/USER-QUIP/README "pair_style quip"_pair_quip.html examples/USER/quip :ul :line USER-REAXC package :link(USER-REAXC),h4 [Contents:] A pair style which implements the ReaxFF potential in C/C++ (in contrast to the "REAX package"_#REAX and its Fortran library). ReaxFF is universal reactive force field. See the src/USER-REAXC/README file for more info on differences between the two packages. Also two fixes for monitoring molecules as bonds are created and destroyed. [Author:] Hasan Metin Aktulga (MSU) while at Purdue University. [Install or un-install:] make yes-user-reaxc make machine :pre make no-user-reaxc make machine :pre [Supporting info:] src/USER-REAXC: filenames -> commands src/USER-REAXC/README "pair_style reax/c"_pair_reaxc.html "fix reax/c/bonds"_fix_reax_bonds.html "fix reax/c/species"_fix_reaxc_species.html examples/reax :ul :line USER-SMD package :link(USER-SMD),h4 [Contents:] An atom style, fixes, computes, and several pair styles which implements smoothed Mach dynamics (SMD) for solids, which is a model related to smoothed particle hydrodynamics (SPH) for liquids (see the "USER-SPH package"_#USER-SPH). This package solves solids mechanics problems via a state of the art stabilized meshless method with hourglass control. It can specify hydrostatic interactions independently from material strength models, i.e. pressure and deviatoric stresses are separated. It provides many material models (Johnson-Cook, plasticity with hardening, Mie-Grueneisen, Polynomial EOS) and allows new material models to be added. It implements rigid boundary conditions (walls) which can be specified as surface geometries from *.STL files. [Author:] Georg Ganzenmuller (Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute, Germany). [Install or un-install:] Before building LAMMPS with this package, you must first download the Eigen library. Eigen is a template library, so you do not need to build it, just download it. You can do this manually if you prefer; follow the instructions in lib/smd/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/smd/Install.py script with the specified args: make lib-smd # print help message -make lib-smd args="-g -l" # download in default lib/smd/eigen-eigen-* -make lib-smd args="-h . eigen -g -l" # download in lib/smd/eigen +make lib-smd args="-g -l" # download and build in default lib/smd/eigen-eigen-* +make lib-smd args="-h . eigen -g -l" # download and build in lib/smd/eigen make lib-smd args="-h ~ eigen -g -l" # download and build in ~/eigen :pre Note that the final -l switch is to create a symbolic (soft) link named "includelink" in lib/smd to point to the Eigen dir. When LAMMPS builds it will use this link. You should not need to edit the lib/smd/Makefile.lammps file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-smd make machine :pre make no-user-smd make machine :pre [Supporting info:] src/USER-SMD: filenames -> commands src/USER-SMD/README doc/PDF/SMD_LAMMPS_userguide.pdf examples/USER/smd http://lammps.sandia.gov/movies.html#smd :ul :line USER-SMTBQ package :link(USER-SMTBQ),h4 [Contents:] A pair style which implements a Second Moment Tight Binding model with QEq charge equilibration (SMTBQ) potential for the description of ionocovalent bonds in oxides. [Authors:] Nicolas Salles, Emile Maras, Olivier Politano, and Robert Tetot (LAAS-CNRS, France). [Install or un-install:] make yes-user-smtbq make machine :pre make no-user-smtbq make machine :pre [Supporting info:] src/USER-SMTBQ: filenames -> commands src/USER-SMTBQ/README "pair_style smtbq"_pair_smtbq.html examples/USER/smtbq :ul :line USER-SPH package :link(USER-SPH),h4 [Contents:] An atom style, fixes, computes, and several pair styles which implements smoothed particle hydrodynamics (SPH) for liquids. See the related "USER-SMD package"_#USER-SMD package for smooth Mach dynamics (SMD) for solids. This package contains ideal gas, Lennard-Jones equation of states, Tait, and full support for complete (i.e. internal-energy dependent) equations of state. It allows for plain or Monaghans XSPH integration of the equations of motion. It has options for density continuity or density summation to propagate the density field. It has "set"_set.html command options to set the internal energy and density of particles from the input script and allows the same quantities to be output with thermodynamic output or to dump files via the "compute property/atom"_compute_property_atom.html command. [Author:] Georg Ganzenmuller (Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute, Germany). [Install or un-install:] make yes-user-sph make machine :pre make no-user-sph make machine :pre [Supporting info:] src/USER-SPH: filenames -> commands src/USER-SPH/README doc/PDF/SPH_LAMMPS_userguide.pdf examples/USER/sph http://lammps.sandia.gov/movies.html#sph :ul :line USER-TALLY package :link(USER-TALLY),h4 [Contents:] Several compute styles that can be called when pairwise interactions are calculated to tally information (forces, heat flux, energy, stress, etc) about individual interactions. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] make yes-user-tally make machine :pre make no-user-tally make machine :pre [Supporting info:] src/USER-TALLY: filenames -> commands src/USER-TALLY/README "compute */tally"_compute_tally.html examples/USER/tally :ul :line USER-VTK package :link(USER-VTK),h4 [Contents:] A "dump vtk"_dump_vtk.html command which outputs snapshot info in the "VTK format"_vtk, enabling visualization by "Paraview"_paraview or other visuzlization packages. :link(vtk,http://www.vtk.org) :link(paraview,http://www.paraview.org) To use this package you must have VTK library available on your system. [Authors:] Richard Berger (JKU) and Daniel Queteschiner (DCS Computing). [Install or un-install:] The lib/vtk/Makefile.lammps file has settings for accessing VTK files and its library, which are required for LAMMPS to build and link with this package. If the settings are not valid for your system, check if one of the other lib/vtk/Makefile.lammps.* files is compatible and copy it to Makefile.lammps. If none of the provided files work, you will need to edit the Makefile.lammps file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-vtk make machine :pre make no-user-vtk make machine :pre [Supporting info:] src/USER-VTK: filenames -> commands src/USER-VTK/README lib/vtk/README "dump vtk"_dump_vtk.html :ul diff --git a/doc/src/neigh_modify.txt b/doc/src/neigh_modify.txt index 5c149d892..c4544cb29 100644 --- a/doc/src/neigh_modify.txt +++ b/doc/src/neigh_modify.txt @@ -1,217 +1,218 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line neigh_modify command :h3 [Syntax:] neigh_modify keyword values ... :pre one or more keyword/value pairs may be listed :ulb,l keyword = {delay} or {every} or {check} or {once} or {cluster} or {include} or {exclude} or {page} or {one} or {binsize} {delay} value = N N = delay building until this many steps since last build {every} value = M M = build neighbor list every this many steps {check} value = {yes} or {no} {yes} = only build if some atom has moved half the skin distance or more {no} = always build on 1st step that {every} and {delay} are satisfied {once} {yes} = only build neighbor list once at start of run and never rebuild {no} = rebuild neighbor list according to other settings {cluster} {yes} = check bond,angle,etc neighbor list for nearby clusters {no} = do not check bond,angle,etc neighbor list for nearby clusters {include} value = group-ID group-ID = only build pair neighbor lists for atoms in this group {exclude} values: type M N M,N = exclude if one atom in pair is type M, other is type N group group1-ID group2-ID group1-ID,group2-ID = exclude if one atom is in 1st group, other in 2nd molecule/intra group-ID group-ID = exclude if both atoms are in the same molecule and in group molecule/inter group-ID group-ID = exclude if both atoms are in different molecules and in group none delete all exclude settings {page} value = N N = number of pairs stored in a single neighbor page {one} value = N N = max number of neighbors of one atom {binsize} value = size size = bin size for neighbor list construction (distance units) :pre :ule [Examples:] neigh_modify every 2 delay 10 check yes page 100000 neigh_modify exclude type 2 3 neigh_modify exclude group frozen frozen check no neigh_modify exclude group residue1 chain3 neigh_modify exclude molecule/intra rigid :pre [Description:] This command sets parameters that affect the building and use of pairwise neighbor lists. Depending on what pair interactions and other commands are defined, a simulation may require one or more neighbor lists. The {every}, {delay}, {check}, and {once} options affect how often lists are built as a simulation runs. The {delay} setting means never build new lists until at least N steps after the previous build. The {every} setting means build lists every M steps (after the delay has passed). If the {check} setting is {no}, the lists are built on the first step that satisfies the {delay} and {every} settings. If the {check} setting is {yes}, then the {every} and {delay} settings determine when a build may possibly be performed, but an actual build only occurs if some atom has moved more than half the skin distance (specified in the "neighbor"_neighbor.html command) since the last build. If the {once} setting is yes, then the neighbor list is only built once at the beginning of each run, and never rebuilt, except on steps when a restart file is written, or steps when a fix forces a rebuild to occur (e.g. fixes that create or delete atoms, such as "fix deposit"_fix_deposit.html or "fix evaporate"_fix_evaporate.html). This setting should only be made if you are certain atoms will not move far enough that the neighbor list should be rebuilt, e.g. running a simulation of a cold crystal. Note that it is not that expensive to check if neighbor lists should be rebuilt. When the rRESPA integrator is used (see the "run_style"_run_style.html command), the {every} and {delay} parameters refer to the longest (outermost) timestep. The {cluster} option does a sanity test every time neighbor lists are built for bond, angle, dihedral, and improper interactions, to check that each set of 2, 3, or 4 atoms is a cluster of nearby atoms. It does this by computing the distance between pairs of atoms in the interaction and insuring they are not further apart than half the periodic box length. If they are, an error is generated, since the interaction would be computed between far-away atoms instead of their nearby periodic images. The only way this should happen is if the pairwise cutoff is so short that atoms that are part of the same interaction are not communicated as ghost atoms. This is an unusual model (e.g. no pair interactions at all) and the problem can be fixed by use of the "comm_modify cutoff"_comm_modify.html command. Note that to save time, the default {cluster} setting is {no}, so that this check is not performed. The {include} option limits the building of pairwise neighbor lists to atoms in the specified group. This can be useful for models where a large portion of the simulation is particles that do not interact with other particles or with each other via pairwise interactions. The group specified with this option must also be specified via the -"atom_modify first"_atom_modify.html command. +"atom_modify first"_atom_modify.html command. Note that specifying +"all" as the group-ID effectively turns off the {include} option. The {exclude} option turns off pairwise interactions between certain pairs of atoms, by not including them in the neighbor list. These are sample scenarios where this is useful: In crack simulations, pairwise interactions can be shut off between 2 slabs of atoms to effectively create a crack. :ulb,l When a large collection of atoms is treated as frozen, interactions between those atoms can be turned off to save needless computation. E.g. Using the "fix setforce"_fix_setforce.html command to freeze a wall or portion of a bio-molecule. :l When one or more rigid bodies are specified, interactions within each body can be turned off to save needless computation. See the "fix rigid"_fix_rigid.html command for more details. :l :ule The {exclude type} option turns off the pairwise interaction if one atom is of type M and the other of type N. M can equal N. The {exclude group} option turns off the interaction if one atom is in the first group and the other is the second. Group1-ID can equal group2-ID. The {exclude molecule/intra} option turns off the interaction if both atoms are in the specified group and in the same molecule, as determined by their molecule ID. The {exclude molecule/inter} turns off the interaction between pairs of atoms that have different molecule IDs and are both in the specified group. Each of the exclude options can be specified multiple times. The {exclude type} option is the most efficient option to use; it requires only a single check, no matter how many times it has been specified. The other exclude options are more expensive if specified multiple times; they require one check for each time they have been specified. Note that the exclude options only affect pairwise interactions; see the "delete_bonds"_delete_bonds.html command for information on turning off bond interactions. NOTE: Excluding pairwise interactions will not work correctly when also using a long-range solver via the "kspace_style"_kspace_style.html command. LAMMPS will give a warning to this effect. This is because the short-range pairwise interaction needs to subtract off a term from the total energy for pairs whose short-range interaction is excluded, to compensate for how the long-range solver treats the interaction. This is done correctly for pairwise interactions that are excluded (or weighted) via the "special_bonds"_special_bonds.html command. But it is not done for interactions that are excluded via these neigh_modify exclude options. The {page} and {one} options affect how memory is allocated for the neighbor lists. For most simulations the default settings for these options are fine, but if a very large problem is being run or a very long cutoff is being used, these parameters can be tuned. The indices of neighboring atoms are stored in "pages", which are allocated one after another as they fill up. The size of each page is set by the {page} value. A new page is allocated when the next atom's neighbors could potentially overflow the list. This threshold is set by the {one} value which tells LAMMPS the maximum number of neighbor's one atom can have. NOTE: LAMMPS can crash without an error message if the number of neighbors for a single particle is larger than the {page} setting, which means it is much, much larger than the {one} setting. This is because LAMMPS doesn't error check these limits for every pairwise interaction (too costly), but only after all the particle's neighbors have been found. This problem usually means something is very wrong with the way you've setup your problem (particle spacing, cutoff length, neighbor skin distance, etc). If you really expect that many neighbors per particle, then boost the {one} and {page} settings accordingly. The {binsize} option allows you to specify what size of bins will be used in neighbor list construction to sort and find neighboring atoms. By default, for "neighbor style bin"_neighbor.html, LAMMPS uses bins that are 1/2 the size of the maximum pair cutoff. For "neighbor style multi"_neighbor.html, the bins are 1/2 the size of the minimum pair cutoff. Typically these are good values values for minimizing the time for neighbor list construction. This setting overrides the default. If you make it too big, there is little overhead due to looping over bins, but more atoms are checked. If you make it too small, the optimal number of atoms is checked, but bin overhead goes up. If you set the binsize to 0.0, LAMMPS will use the default binsize of 1/2 the cutoff. [Restrictions:] If the "delay" setting is non-zero, then it must be a multiple of the "every" setting. The molecule/intra and molecule/inter exclude options can only be used with atom styles that define molecule IDs. The value of the {page} setting must be at least 10x larger than the {one} setting. This insures neighbor pages are not mostly empty space. [Related commands:] "neighbor"_neighbor.html, "delete_bonds"_delete_bonds.html [Default:] The option defaults are delay = 10, every = 1, check = yes, once = no, -cluster = no, include = all, exclude = none, page = 100000, one = -2000, and binsize = 0.0. +cluster = no, include = all (same as no include option defined), +exclude = none, page = 100000, one = 2000, and binsize = 0.0. diff --git a/examples/README b/examples/README index e4312e259..0ec28aa2c 100644 --- a/examples/README +++ b/examples/README @@ -1,178 +1,179 @@ LAMMPS example problems There are 3 flavors of sub-directories in this file, each with sample problems you can run with LAMMPS. lower-case directories = simple test problems for LAMMPS and its packages upper-case directories = more complex problems USER directory with its own sub-directories = tests for USER packages Each is discussed below. ------------------------------------------ Lower-case directories Each of these sub-directories contains a sample problem you can run with LAMMPS. Most are 2d models so that they run quickly, requiring a few seconds to a few minutes to run on a desktop machine. Each problem has an input script (in.*) and produces a log file (log.*) and (optionally) a dump file (dump.*) or image files (image.*) or movie (movie.mpg) when it runs. Some use a data file (data.*) of initial coordinates as additional input. Some require that you install one or more optional LAMMPS packages. A few sample log file outputs on different machines and different numbers of processors are included in the directories to compare your answers to. E.g. a log file like log.crack.date.foo.P means it ran on P processors of machine "foo" with the dated version of LAMMPS. Note that these problems should get statistically similar answers when run on different machines or different numbers of processors, but not identical answers to those in the log of dump files included here. See the Errors section of the LAMMPS documentation for more discussion. Most of the example input scripts have commented-out lines that produce dump snapshots of the running simulation in any of 3 formats. If you uncomment the dump command in the input script, a text dump file will be produced, which can be animated by various visualization programs (see http://lammps.sandia.gov/viz.html) such as Ovito, VMD, or AtomEye. If you uncomment the dump image command in the input script, and assuming you have built LAMMPS with a JPG library, JPG snapshot images will be produced when the simulation runs. They can be quickly post-processed into a movie using commands described on the dump image doc page. If you uncomment the dump movie command in the input script, and assuming you have built LAMMPS with the FFMPEG library, an MPG movie will be produced when the simulation runs. The movie file can be played using various viewers, such as mplayer or QuickTime. Animations of many of these examples can be viewed on the Movies section of the LAMMPS WWW Site. These are the sample problems and their output in the various sub-directories: accelerate: use of all the various accelerator packages +airebo: polyethylene with AIREBO potential balance: dynamic load balancing, 2d system body: body particles, 2d system cmap: CMAP 5-body contributions to CHARMM force field colloid: big colloid particles in a small particle solvent, 2d system comb: models using the COMB potential coreshell: adiabatic core/shell model controller: use of fix controller as a thermostat crack: crack propagation in a 2d solid deposit: deposition of atoms and molecules onto a 3d substrate dipole: point dipolar particles, 2d system dreiding: methanol via Dreiding FF eim: NaCl using the EIM potential ellipse: ellipsoidal particles in spherical solvent, 2d system flow: Couette and Poiseuille flow in a 2d channel friction: frictional contact of spherical asperities between 2d surfaces gcmc: Grand Canonical Monte Carlo (GCMC) via the fix gcmc command granregion: use of fix wall/region/gran as boundary on granular particles hugoniostat: Hugoniostat shock dynamics indent: spherical indenter into a 2d solid kim: use of potentials in Knowledge Base for Interatomic Models (KIM) meam: MEAM test for SiC and shear (same as shear examples) melt: rapid melt of 3d LJ system micelle: self-assembly of small lipid-like molecules into 2d bilayers min: energy minimization of 2d LJ melt mscg: parameterize a multi-scale coarse-graining (MSCG) model msst: MSST shock dynamics nb3b: use of nonbonded 3-body harmonic pair style neb: nudged elastic band (NEB) calculation for barrier finding nemd: non-equilibrium MD of 2d sheared system obstacle: flow around two voids in a 2d channel peptide: dynamics of a small solvated peptide chain (5-mer) peri: Peridynamic model of cylinder impacted by indenter pour: pouring of granular particles into a 3d box, then chute flow prd: parallel replica dynamics of vacancy diffusion in bulk Si python: use of PYTHON package to invoke Python code from input script qeq: use of QEQ package for charge equilibration reax: RDX and TATB models using the ReaxFF rigid: rigid bodies modeled as independent or coupled shear: sideways shear applied to 2d solid, with and without a void snap: use of SNAP potential for Ta srd: stochastic rotation dynamics (SRD) particles as solvent snap: NVE dynamics for BCC tantalum crystal using SNAP potential streitz: Streitz-Mintmire potential for Al2O3 tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si vashishta: models using the Vashishta potential voronoi: Voronoi tesselation via compute voronoi/atom command Here is a src/Make.py command which will perform a parallel build of a LAMMPS executable "lmp_mpi" with all the packages needed by all the examples, with the exception of the accelerate sub-directory. See the accelerate/README for Make.py commands suitable for its example scripts. cd src Make.py -j 16 -p none std no-lib reax meam poems reaxc orig -a lib-all mpi Here is how you might run and visualize one of the sample problems: cd indent cp ../../src/lmp_mpi . # copy LAMMPS executable to this dir lmp_mpi < in.indent # run the problem Running the simulation produces the files {dump.indent} and {log.lammps}. You can visualize the dump file as follows: ../../tools/xmovie/xmovie -scale dump.indent If you uncomment the dump image line(s) in the input script a series of JPG images will be produced by the run. These can be viewed individually or turned into a movie or animated by tools like ImageMagick or QuickTime or various Windows-based tools. See the dump image doc page for more details. E.g. this Imagemagick command would create a GIF file suitable for viewing in a browser. % convert -loop 1 *.jpg foo.gif ------------------------------------------ Upper-case directories The ASPHERE directory has examples of how to model aspherical particles with or without solvent, in 3 styles LAMMPS provides. Namely point ellipsoids, rigid bodies, and generalized aspherical bodies built from line/triangle surface facets in 2d/3d. See the ASPHERE/README file to get started. The COUPLE directory has examples of how to use LAMMPS as a library, either by itself or in tandem with another code or library. See the COUPLE/README file to get started. The ELASTIC directory has an example script for computing elastic constants at zero temperature, using an Si example. See the ELASTIC/in.elastic file for more info. The ELASTIC_T directory has an example script for computing elastic constants at finite temperature, using an Si example. See the ELASTIC_T/in.elastic file for more info. The HEAT directory has example scripts for heat exchange algorithms (e.g. used for establishing a thermal gradient), using two different methods. See the HEAT/README file for more info. The KAPPA directory has example scripts for computing the thermal conductivity (kappa) of a LJ liquid using 5 different methods. See the KAPPA/README file for more info. The MC directory has an example script for using LAMMPS as an energy-evaluation engine in a iterative Monte Carlo energy-relaxation loop. The USER directory contains subdirectories of user-provided example scripts for ser packages. See the README files in those directories for more info. See the doc/Section_start.html file for more info about installing and building user packages. The VISCOSITY directory has example scripts for computing the viscosity of a LJ liquid using 4 different methods. See the VISCOSITY/README file for more info. diff --git a/lib/Install.py b/lib/Install.py index 18b426f92..29270560a 100644 --- a/lib/Install.py +++ b/lib/Install.py @@ -1,82 +1,91 @@ #!/usr/bin/env python # install.py tool to do a generic build of a library # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) print >>fp,line, fp.close() # make the library via Makefile.auto print "Building lib%s.a ..." % lib cmd = "make -f Makefile.auto clean; make -f Makefile.auto" txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/atc/Install.py b/lib/atc/Install.py index 18b426f92..29270560a 100644 --- a/lib/atc/Install.py +++ b/lib/atc/Install.py @@ -1,82 +1,91 @@ #!/usr/bin/env python # install.py tool to do a generic build of a library # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) print >>fp,line, fp.close() # make the library via Makefile.auto print "Building lib%s.a ..." % lib cmd = "make -f Makefile.auto clean; make -f Makefile.auto" txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/awpmd/Install.py b/lib/awpmd/Install.py index 18b426f92..29270560a 100644 --- a/lib/awpmd/Install.py +++ b/lib/awpmd/Install.py @@ -1,82 +1,91 @@ #!/usr/bin/env python # install.py tool to do a generic build of a library # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) print >>fp,line, fp.close() # make the library via Makefile.auto print "Building lib%s.a ..." % lib cmd = "make -f Makefile.auto clean; make -f Makefile.auto" txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/colvars/Install.py b/lib/colvars/Install.py index 18b426f92..29270560a 100644 --- a/lib/colvars/Install.py +++ b/lib/colvars/Install.py @@ -1,82 +1,91 @@ #!/usr/bin/env python # install.py tool to do a generic build of a library # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) print >>fp,line, fp.close() # make the library via Makefile.auto print "Building lib%s.a ..." % lib cmd = "make -f Makefile.auto clean; make -f Makefile.auto" txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/gpu/Install.py b/lib/gpu/Install.py index d396be5e1..c6cd1f302 100644 --- a/lib/gpu/Install.py +++ b/lib/gpu/Install.py @@ -1,146 +1,155 @@ #!/usr/bin/env python # Install.py tool to build the GPU library # used to automate the steps described in the README file in this dir import sys,os,re,commands # help message help = """ -Syntax: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix - specify one or more options, order does not matter - copies an existing Makefile.isuffix in lib/gpu to Makefile.auto - optionally edits these variables in Makefile.auto: - CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE - optionally uses Makefile.auto to build the GPU library -> libgpu.a - and to copy a Makefile.lammps.esuffix -> Makefile.lammps - optionally copies Makefile.auto to a new Makefile.osuffix +Syntax from src dir: make lib-gpu args="-i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix" +Syntax from lib dir: python Install.py -i isuffix -h hdir -a arch -p precision -e esuffix -m -o osuffix + +specify one or more options, order does not matter + +copies an existing Makefile.isuffix in lib/gpu to Makefile.auto +optionally edits these variables in Makefile.auto: + CUDA_HOME, CUDA_ARCH, CUDA_PRECISION, EXTRAMAKE +optionally uses Makefile.auto to build the GPU library -> libgpu.a + and to copy a Makefile.lammps.esuffix -> Makefile.lammps +optionally copies Makefile.auto to a new Makefile.osuffix -i = use Makefile.isuffix as starting point, copy to Makefile.auto default isuffix = linux -h = set CUDA_HOME variable in Makefile.auto to hdir hdir = path to NVIDIA Cuda software, e.g. /usr/local/cuda -a = set CUDA_ARCH variable in Makefile.auto to arch use arch = ?? for K40 (Tesla) use arch = 37 for dual K80 (Tesla) use arch = 60 for P100 (Pascal) -p = set CUDA_PRECISION variable in Makefile.auto to precision use precision = double or mixed or single -e = set EXTRAMAKE variable in Makefile.auto to Makefile.lammps.esuffix -m = make the GPU library using Makefile.auto first performs a "make clean" produces libgpu.a if successful also copies EXTRAMAKE file -> Makefile.lammps -e can set which Makefile.lammps.esuffix file is copied -o = copy final Makefile.auto to Makefile.osuffix + +Examples: + +make lib-gpu args="-m" # build GPU lib with default Makefile.linux +make lib-gpu args="-i xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision +make lib-gpu args="-i xk7 -p single -o xk7.single -m" # ditto, also build GPU lib """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() isuffix = "linux" hflag = aflag = pflag = eflag = 0 makeflag = 0 outflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-i": if iarg+2 > nargs: error() isuffix = args[iarg+1] iarg += 2 elif args[iarg] == "-h": if iarg+2 > nargs: error() hflag = 1 hdir = args[iarg+1] iarg += 2 elif args[iarg] == "-a": if iarg+2 > nargs: error() aflag = 1 arch = args[iarg+1] iarg += 2 elif args[iarg] == "-p": if iarg+2 > nargs: error() pflag = 1 precision = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() eflag = 1 lmpsuffix = args[iarg+1] iarg += 2 elif args[iarg] == "-m": makeflag = 1 iarg += 1 elif args[iarg] == "-o": if iarg+2 > nargs: error() outflag = 1 osuffix = args[iarg+1] iarg += 2 else: error() if pflag: if precision == "double": precstr = "-D_DOUBLE_DOUBLE" elif precision == "mixed": precstr = "-D_SINGLE_DOUBLE" elif precision == "single": precstr = "-D_SINGLE_SINGLE" else: error("Invalid precision setting") # create Makefile.auto # reset EXTRAMAKE, CUDA_HOME, CUDA_ARCH, CUDA_PRECISION if requested if not os.path.exists("Makefile.%s" % isuffix): error("lib/gpu/Makefile.%s does not exist" % isuffix) lines = open("Makefile.%s" % isuffix,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) != 3: print >>fp,line, continue if hflag and words[0] == "CUDA_HOME" and words[1] == '=': line = line.replace(words[2],hdir) if aflag and words[0] == "CUDA_ARCH" and words[1] == '=': line = line.replace(words[2],"-arch=sm_%s" % arch) if pflag and words[0] == "CUDA_PRECISION" and words[1] == '=': line = line.replace(words[2],precstr) if eflag and words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % lmpsuffix) print >>fp,line, fp.close() # perform make # make operations copies EXTRAMAKE file to Makefile.lammps if makeflag: print "Building libgpu.a ..." cmd = "rm -f libgpu.a" commands.getoutput(cmd) cmd = "make -f Makefile.auto clean; make -f Makefile.auto" commands.getoutput(cmd) if not os.path.exists("libgpu.a"): error("Build of lib/gpu/libgpu.a was NOT successful") if not os.path.exists("Makefile.lammps"): error("lib/gpu/Makefile.lammps was NOT created") # copy new Makefile.auto to Makefile.osuffix if outflag: print "Creating new Makefile.%s" % osuffix cmd = "cp Makefile.auto Makefile.%s" % osuffix commands.getoutput(cmd) diff --git a/lib/h5md/Install.py b/lib/h5md/Install.py index 18b426f92..29270560a 100644 --- a/lib/h5md/Install.py +++ b/lib/h5md/Install.py @@ -1,82 +1,91 @@ #!/usr/bin/env python # install.py tool to do a generic build of a library # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) print >>fp,line, fp.close() # make the library via Makefile.auto print "Building lib%s.a ..." % lib cmd = "make -f Makefile.auto clean; make -f Makefile.auto" txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/kim/Install.py b/lib/kim/Install.py index bcd22dcbb..9f36f9fed 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -1,150 +1,257 @@ #!/usr/bin/env python -# install.py tool to setup the kim-api library +# install.pa tool to setup the kim-api library # used to automate the steps described in the README file in this dir import sys,os,re,urllib,commands help = """ -Syntax: install.py -v version -c kim-dir -b kim-model-name -a kim-name - specify one or more options, order does not matter - -v = version of kim-api to download and work with - default = kim-api-v1.8.2 (current as of June 2017) - -c = create Makefile.KIM_DIR within lammps lib/kim to configure lammps - for use with the kim-api library installed at "kim-dir" (absolute - path). default = this dir - -b = build kim-api and kim model where kim-model-name can be a specific - openkim.org model name (such as - "EAM_Dynamo_Ackland_W__MO_141627196590_002") or the keyword - "OpenKIM" to install all compatible models from the openkim.org - site. - -a = add kim-name openkim.org item (model driver or model) to existing - kim-api instalation. +Syntax from src dir: make lib-kim args="-v version -b kim-install-dir kim-name -a kim-name" +Syntax from lib dir: python Install.py -v version -b kim-install-dir kim-name -a kim-name + +specify one or more options, order does not matter + + -v = version of KIM API library to use + default = kim-api-v1.8.2 (current as of June 2017) + -b = download and build KIM API library with KIM models + kim-dir = where to install/build the KIM API library + use "." to install in lib/kim + kim-name = none to install only the example KIM models + kim-name = KIM model name (see example below) + examples + kim-name = OpenKIM to install all models + from the openkim.org site (this can take 30 minutes or more) + -a = add single KIM model or model driver with kim-name + to existing KIM API lib (see example below) + +Examples: + +make lib-kim args="-b . none" # install KIM API lib with only example models +make lib-kim args="-b . Glue_Ercolessi_Adams_Al__MO_324507536345_001" # ditto plus one model +make lib-kim args="-b . OpenKIM" # install KIM API lib with all models +make lib-kim args="-a EAM_Dynamo_Ackland_W__MO_141627196590_002" # add one model or model driver + +See the list of KIM model drivers here: +https://openkim.org/kim-items/model-drivers/alphabetical + +See the list of all KIM models here: +https://openkim.org/kim-items/models/by-model-drivers + +See the list of example KIM models included by default here: +https://openkim.org/kim-api +in the "What is in the KIM API source package?" section """ def error(): print help sys.exit() # parse args -args = sys.argv +args = sys.argv[1:] +nargs = len(args) +if nargs == 0: error() thisdir = os.environ['PWD'] -dir = thisdir version = "kim-api-v1.8.2" -dirflag = 0 buildflag = 0 addflag = 0 -iarg = 1 +iarg = 0 while iarg < len(args): if args[iarg] == "-v": if iarg+2 > len(args): error() version = args[iarg+1] iarg += 2 - elif args[iarg] == "-c": - dirflag = 1 - if iarg+2 > len(args): error() - dir = args[iarg+1] - iarg += 2 elif args[iarg] == "-b": buildflag = 1 - if iarg+2 > len(args): error() - modelname = args[iarg+1] - iarg += 2 + if iarg+3 > len(args): error() + dir = args[iarg+1] + modelname = args[iarg+2] + iarg += 3 elif args[iarg] == "-a": addflag = 1 if iarg+2 > len(args): error() addmodelname = args[iarg+1] iarg += 2 else: error() thisdir = os.path.abspath(thisdir) -dir = os.path.abspath(dir) url = "https://s3.openkim.org/kim-api/%s.tgz" % version -# download and unpack tarball +# download KIM tarball, unpack, build KIM +# either in lib/kim or user-requested location + +if buildflag == 1: + + # set install directory + dir = os.path.abspath(dir) + "/installed-" + version + + # check to see if an installed kim-api already exists + + if os.path.isdir(dir): + print "kim-api is already installed at %s" % dir + print "Must remove this directory in order to resintall at this location" + sys.exit() + # configure LAMMPS to use kim-api to be installed -if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): - open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) - open("%s/Makefile.KIM_Config" % thisdir, 'w').write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) + mkfle = open("%s/Makefile.KIM_DIR" % thisdir, 'w') + mkfle.write("KIM_INSTALL_DIR=%s\n" % dir) + mkfle.write("\n") + mkfle.write(".DUMMY: print_dir\n") + mkfle.write("\n") + mkfle.write("print_dir:\n") + mkfle.write(" @printf $(KIM_INSTALL_DIR)\n") + mkfle.close() + open("%s/Makefile.KIM_Config" % thisdir, 'w'). \ + write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) print "Created %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) -else: - if dirflag == 1: - open("%s/Makefile.KIM_DIR" % thisdir, 'w').write("KIM_INSTALL_DIR=%s" % dir) - open("%s/Makefile.KIM_Config" % thisdir, 'w').write("include %s/lib/kim-api/Makefile.KIM_Config" % dir) - print "Updated %s/Makefile.KIM_DIR : using %s" % (thisdir,dir) + # download entire kim-api tarball + # try first via urllib + # if fails (probably due to no SSL support), use wget -if buildflag == 1: - # download kim-api print "Downloading kim-api tarball ..." - urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) + + try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,version)) + except: + cmd = "wget %s %s/%s.tgz" % (url,thisdir,version) + txt = commands.getstatusoutput(cmd) + print txt[1] + if not os.path.isfile("%s/%s.tgz" % (thisdir,version)): + print "Both urllib.urlretrieve() and wget command failed to download" + sys.exit() + print "Unpacking kim-api tarball ..." cmd = "cd %s; rm -rf %s; tar zxvf %s.tgz" % (thisdir,version,version) txt = commands.getstatusoutput(cmd) if txt[0] != 0: error() # configure kim-api + print "Configuring kim-api ..." cmd = "cd %s/%s; ./configure --prefix='%s'" % (thisdir,version,dir) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() # build kim-api + print "Configuring model : %s" % modelname - cmd = "cd %s/%s; make add-%s" % (thisdir,version,modelname) + if modelname == "none": + cmd = "cd %s/%s; make add-examples" % (thisdir,version) + else: + if modelname == "OpenKIM": + print "configuring all OpenKIM models, this will take a while ..." + cmd = "cd %s/%s; make add-examples; make add-%s" % \ + (thisdir,version,modelname) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() - # + print "Building kim-api ..." cmd = "cd %s/%s; make" % (thisdir,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() # install kim-api + print "Installing kim-api ..." cmd = "cd %s/%s; make install" % (thisdir,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() - # + cmd = "cd %s/%s; make install-set-default-to-v1" %(thisdir,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() # remove source files + print "Removing kim-api source and build files ..." cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" % (thisdir,version,version) txt = commands.getstatusoutput(cmd) print txt[1] if txt[0] != 0: error() +# add a single model (and possibly its driver) to existing KIM installation + if addflag == 1: - # download model - url = "https://openkim.org/download/%s.tgz" % addmodelname + + # get location of installed kim-api + + if not os.path.isfile("%s/Makefile.KIM_DIR" % thisdir): + print "kim-api is not installed" + error() + else: + cmd = "cd %s; make -f Makefile.KIM_DIR print_dir" % thisdir + dir = commands.getstatusoutput(cmd)[1] + + # download single model + # try first via urllib + # if fails (probably due to no SSL support), use wget + print "Downloading item tarball ..." - urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) + + url = "https://openkim.org/download/%s.tgz" % addmodelname + + try: urllib.urlretrieve(url,"%s/%s.tgz" % (thisdir,addmodelname)) + except: + cmd = "wget %s %s/%s.tgz" % (url,thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if not os.path.isfile("%s/%s.tgz" % (thisdir,addmodelname)): + print "Both urllib.urlretrieve() and wget command failed to download" + sys.exit() + print "Unpacking item tarball ..." cmd = "cd %s; tar zxvf %s.tgz" % (thisdir,addmodelname) txt = commands.getstatusoutput(cmd) if txt[0] != 0: error() - # + print "Building item ..." cmd = "cd %s/%s; make; make install" %(thisdir,addmodelname) txt = commands.getstatusoutput(cmd) - print txt[1] - if txt[0] != 0: error() - # - print "Removing kim item source and build files ..." - cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) - txt = commands.getstatusoutput(cmd) - print txt[1] - if txt[0] != 0: error() + firstRunOutput = txt[1] + if txt[0] != 0: + # Error: but first, check to see if it needs a driver + + cmd = "cd %s/%s; make kim-item-type" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + if txt[1] == "ParameterizedModel": + + # Get and install driver + + cmd = "cd %s/%s; make model-driver-name" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + adddrivername = txt[1] + print "First Installing model driver: %s" % adddrivername + cmd = "cd %s; python Install.py -a %s" % (thisdir,adddrivername) + txt = commands.getstatusoutput(cmd) + if txt[0] != 0: + print firstRunOutput + print txt[1] + error() + else: + print txt[1] + cmd = "cd %s; python Install.py -a %s" % (thisdir,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: + error() + else: + print firstRunOutput + error() + else: + + # success + + print firstRunOutput + print "Removing kim item source and build files ..." + cmd = "cd %s; rm -rf %s; rm -rf %s.tgz" %(thisdir,addmodelname,addmodelname) + txt = commands.getstatusoutput(cmd) + print txt[1] + if txt[0] != 0: error() diff --git a/lib/kim/README b/lib/kim/README index 00d6ea8fa..7a4230dc2 100644 --- a/lib/kim/README +++ b/lib/kim/README @@ -1,74 +1,76 @@ This directory contains build settings for the KIM API library which is required to use the KIM package and its pair_style kim command in a LAMMPS input script. Information about the KIM project can be found at https://openkim.org. The KIM project is lead by Ellad Tadmor and Ryan Elliott (U Minn) and James Sethna (Cornell U). Ryan Elliott is the main developer for the KIM API and he also maintains the code that implements the pair_style kim command. -To download, build, and install the KIM API on your system, follow -these steps. You can use the install.py script to automate these steps. +You can type "make lib-kim" from the src directory to see help on +how to download and build this library via make commands, or you can +do the same thing by typing "python Install.py" from within this +directory, or you can do it manually by following the instructions +below. ----------------- Instructions: - 1. Configure lammps for use with the kim-api library installed in this directory $ printf "KIM_INSTALL_DIR=${PWD}\n" > ./Makefile.KIM_DIR $ printf "include ${PWD}/lib/kim-api/Makefile.KIM_Config\n" > ./Makefile.KIM_Config 2. Download and unpack the kim-api # replace X.Y.Z as appropriate here and below $ wget http://s3.openkim.org/kim-api/kim-api-vX.Y.Z.tgz $ tar zxvf kim-api-vX.Y.Z.tgz # configure the kim-api $ cd kim-api-vX.Y.Z $ ./configure --prefix=${PWD}/../ # setup the desired kim item $ make add-Pair_Johnson_Fe__MO_857282754307_002 3. Build and install the kim-api and model $ make $ make install # replace X with the KIM API major version number $ make install-set-default-to-vX $ cd ../ 4. Remove source and build files $ rm -rf kim-api-vX.Y.Z $ rm -rf kim-api-vX.Y.Z.tgz 5. To add additional items do the following (replace the kim item name with your desired value) $ wget https://openkim.org/download/EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz $ tar zxvf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz $ cd EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001 $ make $ make install $ cd .. $ rm -rf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001 $ rm -rf EAM_Johnson_NearestNeighbor_Cu__MO_887933271505_001.tgz ----------------- When these steps are complete you can build LAMMPS with the KIM package installed: -$ cd ../../src +$ cd lammpos/src $ make yes-kim $ make g++ (or whatever target you wish) Note that the Makefile.lammps and Makefile.KIM_DIR files in this directory are required to allow the LAMMPS build to find the necessary KIM files. You should not normally need to edit this file. diff --git a/lib/linalg/Install.py b/lib/linalg/Install.py index c7076ca52..560afecec 100644 --- a/lib/linalg/Install.py +++ b/lib/linalg/Install.py @@ -1,52 +1,58 @@ #!/usr/bin/env python # install.py tool to do build of the linear algebra library # used to automate the steps described in the README file in this dir import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine +Syntax from src dir: make lib-linalg args="-m machine" +Syntax from lib dir: python Install.py -m machine + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file + +Example: + +make lib-linalg args="-m gfortran" # build with GNU Fortran compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # make the library print "Building lib%s.a ..." % lib cmd = "make -f Makefile.%s clean; make -f Makefile.%s" % (machine,machine) txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) diff --git a/lib/meam/Install.py b/lib/meam/Install.py index 18b426f92..29270560a 100644 --- a/lib/meam/Install.py +++ b/lib/meam/Install.py @@ -1,82 +1,91 @@ #!/usr/bin/env python # install.py tool to do a generic build of a library # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) print >>fp,line, fp.close() # make the library via Makefile.auto print "Building lib%s.a ..." % lib cmd = "make -f Makefile.auto clean; make -f Makefile.auto" txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/mscg/Install.py b/lib/mscg/Install.py index e54723261..7b10be189 100644 --- a/lib/mscg/Install.py +++ b/lib/mscg/Install.py @@ -1,122 +1,129 @@ #!/usr/bin/env python # Install.py tool to download, unpack, build, and link to the MS-CG library # used to automate the steps described in the README file in this dir import sys,os,re,commands # help message help = """ -Syntax: python Install.py -h hpath hdir -g -b [suffix] -l - specify one or more options, order does not matter +Syntax from src dir: make lib-mscg args="-h hpath hdir -g -b [suffix] -l" +Syntax from lib dir: python Install.py -h hpath hdir -g -b [suffix] -l + +specify one or more options, order does not matter + -h = set home dir of MS-CG to be hpath/hdir hpath can be full path, contain '~' or '.' chars default hpath = . = lib/mscg default hdir = MSCG-release-master = what GitHub zipfile unpacks to -g = grab (download) zipfile from MS-CG GitHub website unpack it to hpath/hdir hpath must already exist if hdir already exists, it will be deleted before unpack -b = build MS-CG library in its src dir optional suffix specifies which src/Make/Makefile.suffix to use default suffix = g++_simple -l = create 2 softlinks (includelink,liblink) in lib/mscg to MS-CG src dir + +Example: + +make lib-mscg args="-g -b -l" # download/build in lib/mscg/MSCG-release-master """ # settings url = "https://github.com/uchicago-voth/MSCG-release/archive/master.zip" zipfile = "MS-CG-master.zip" zipdir = "MSCG-release-master" # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # expand to full path name # process leading '~' or relative path def fullpath(path): return os.path.abspath(os.path.expanduser(path)) # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() homepath = "." homedir = zipdir grabflag = 0 buildflag = 0 msuffix = "g++_simple" linkflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-h": if iarg+3 > nargs: error() homepath = args[iarg+1] homedir = args[iarg+2] iarg += 3 elif args[iarg] == "-g": grabflag = 1 iarg += 1 elif args[iarg] == "-b": buildflag = 1 if iarg+1 < nargs and args[iarg+1][0] != '-': msuffix = args[iarg+1] iarg += 1 iarg += 1 elif args[iarg] == "-l": linkflag = 1 iarg += 1 else: error() homepath = fullpath(homepath) if not os.path.isdir(homepath): error("MS-CG path does not exist") homedir = "%s/%s" % (homepath,homedir) # download and unpack MS-CG zipfile if grabflag: print "Downloading MS-CG ..." cmd = "curl -L %s > %s/%s" % (url,homepath,zipfile) print cmd print commands.getoutput(cmd) print "Unpacking MS-CG zipfile ..." if os.path.exists("%s/%s" % (homepath,zipdir)): commands.getoutput("rm -rf %s/%s" % (homepath,zipdir)) cmd = "cd %s; unzip %s" % (homepath,zipfile) commands.getoutput(cmd) if os.path.basename(homedir) != zipdir: if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) os.rename("%s/%s" % (homepath,zipdir),homedir) # build MS-CG if buildflag: print "Building MS-CG ..." cmd = "cd %s/src; cp Make/Makefile.%s .; make -f Makefile.%s" % \ (homedir,msuffix,msuffix) txt = commands.getoutput(cmd) print txt # create 2 links in lib/mscg to MS-CG src dir if linkflag: print "Creating links to MS-CG include and lib files" if os.path.isfile("includelink") or os.path.islink("includelink"): os.remove("includelink") if os.path.isfile("liblink") or os.path.islink("liblink"): os.remove("liblink") cmd = "ln -s %s/src includelink" % homedir commands.getoutput(cmd) cmd = "ln -s %s/src liblink" % homedir commands.getoutput(cmd) diff --git a/lib/poems/Install.py b/lib/poems/Install.py index 18b426f92..29270560a 100644 --- a/lib/poems/Install.py +++ b/lib/poems/Install.py @@ -1,82 +1,91 @@ #!/usr/bin/env python # install.py tool to do a generic build of a library # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) print >>fp,line, fp.close() # make the library via Makefile.auto print "Building lib%s.a ..." % lib cmd = "make -f Makefile.auto clean; make -f Makefile.auto" txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/qmmm/Install.py b/lib/qmmm/Install.py index 18b426f92..29270560a 100644 --- a/lib/qmmm/Install.py +++ b/lib/qmmm/Install.py @@ -1,82 +1,91 @@ #!/usr/bin/env python # install.py tool to do a generic build of a library # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) print >>fp,line, fp.close() # make the library via Makefile.auto print "Building lib%s.a ..." % lib cmd = "make -f Makefile.auto clean; make -f Makefile.auto" txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/reax/Install.py b/lib/reax/Install.py index 18b426f92..29270560a 100644 --- a/lib/reax/Install.py +++ b/lib/reax/Install.py @@ -1,82 +1,91 @@ #!/usr/bin/env python # install.py tool to do a generic build of a library # soft linked to by many of the lib/Install.py files # used to automate the steps described in the corresponding lib/README import sys,commands,os # help message help = """ -Syntax: python Install.py -m machine -e suffix - specify -m and optionally -e, order does not matter +Syntax from src dir: make lib-libname args="-m machine -e suffix" +Syntax from lib dir: python Install.py -m machine -e suffix + +libname = name of lib dir (e.g. atc, colvars, h5md, meam, poems, etc) +specify -m and optionally -e, order does not matter + -m = peform a clean followed by "make -f Makefile.machine" machine = suffix of a lib/Makefile.* file -e = set EXTRAMAKE variable in Makefile.machine to Makefile.lammps.suffix does not alter existing Makefile.machine + +Examplesx: + +make lib-colvars args="-m g++" # build COLVARS lib with GNU g++ compiler +make lib-meam args="-m ifort" # build MEAM lib with Intel ifort compiler """ # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() machine = None extraflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-m": if iarg+2 > nargs: error() machine = args[iarg+1] iarg += 2 elif args[iarg] == "-e": if iarg+2 > nargs: error() extraflag = 1 suffix = args[iarg+1] iarg += 2 else: error() # set lib from working dir cwd = os.getcwd() lib = os.path.basename(cwd) # create Makefile.auto as copy of Makefile.machine # reset EXTRAMAKE if requested if not os.path.exists("Makefile.%s" % machine): error("lib/%s/Makefile.%s does not exist" % (lib,machine)) lines = open("Makefile.%s" % machine,'r').readlines() fp = open("Makefile.auto",'w') for line in lines: words = line.split() if len(words) == 3 and extraflag and \ words[0] == "EXTRAMAKE" and words[1] == '=': line = line.replace(words[2],"Makefile.lammps.%s" % suffix) print >>fp,line, fp.close() # make the library via Makefile.auto print "Building lib%s.a ..." % lib cmd = "make -f Makefile.auto clean; make -f Makefile.auto" txt = commands.getoutput(cmd) print txt if os.path.exists("lib%s.a" % lib): print "Build was successful" else: error("Build of lib/%s/lib%s.a was NOT successful" % (lib,lib)) if not os.path.exists("Makefile.lammps"): print "lib/%s/Makefile.lammps was NOT created" % lib diff --git a/lib/smd/Install.py b/lib/smd/Install.py index dc0a3187c..e6fe8926a 100644 --- a/lib/smd/Install.py +++ b/lib/smd/Install.py @@ -1,103 +1,110 @@ #!/usr/bin/env python # Install.py tool to download, unpack, and point to the Eigen library # used to automate the steps described in the README file in this dir import sys,os,re,glob,commands # help message help = """ -Syntax: python Install.py -h hpath hdir -g -l - specify one or more options, order does not matter +Syntax from src dir: make lib-smd args="-h hpath hdir -g -l" +Syntax from lib dir: python Install.py -h hpath hdir -g -l + +specify one or more options, order does not matter + -h = set home dir of Eigen to be hpath/hdir hpath can be full path, contain '~' or '.' chars default hpath = . = lib/smd default hdir = "ee" = what tarball unpacks to (eigen-eigen-*) -g = grab (download) tarball from http://eigen.tuxfamily.org website unpack it to hpath/hdir hpath must already exist if hdir already exists, it will be deleted before unpack -l = create softlink (includelink) in lib/smd to Eigen src dir + +Example: + +make lib-smd args="-g -l" # download/build in default lib/smd/eigen-eigen-* """ # settings url = "http://bitbucket.org/eigen/eigen/get/3.3.3.tar.gz" tarball = "eigen.tar.gz" # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # expand to full path name # process leading '~' or relative path def fullpath(path): return os.path.abspath(os.path.expanduser(path)) # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() homepath = "." homedir = "ee" grabflag = 0 linkflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-h": if iarg+3 > nargs: error() homepath = args[iarg+1] homedir = args[iarg+2] iarg += 3 elif args[iarg] == "-g": grabflag = 1 iarg += 1 elif args[iarg] == "-l": linkflag = 1 iarg += 1 else: error() homepath = fullpath(homepath) if not os.path.isdir(homepath): error("Eigen path does not exist") # download and unpack Eigen tarball # glob to find name of dir it unpacks to if grabflag: print "Downloading Eigen ..." cmd = "curl -L %s > %s/%s" % (url,homepath,tarball) print cmd print commands.getoutput(cmd) print "Unpacking Eigen tarball ..." edir = glob.glob("%s/eigen-eigen-*" % homepath) for one in edir: if os.path.isdir(one): commands.getoutput("rm -rf %s" % one) cmd = "cd %s; tar zxvf %s" % (homepath,tarball) commands.getoutput(cmd) if homedir != "ee": if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) edir = glob.glob("%s/eigen-eigen-*" % homepath) os.rename(edir[0],"%s/%s" % (homepath,homedir)) # create link in lib/smd to Eigen src dir if linkflag: print "Creating link to Eigen files" if os.path.isfile("includelink") or os.path.islink("includelink"): os.remove("includelink") if homedir == "ee": edir = glob.glob("%s/eigen-eigen-*" % homepath) linkdir = edir[0] else: linkdir = "%s/%s" % (homepath,homedir) cmd = "ln -s %s includelink" % linkdir commands.getoutput(cmd) diff --git a/lib/voronoi/Install.py b/lib/voronoi/Install.py index 7d847183b..54246f113 100644 --- a/lib/voronoi/Install.py +++ b/lib/voronoi/Install.py @@ -1,118 +1,125 @@ #!/usr/bin/env python # Install.py tool to download, unpack, build, and link to the Voro++ library # used to automate the steps described in the README file in this dir import sys,os,re,urllib,commands # help message help = """ -Syntax: python Install.py -v version -h hpath hdir -g -b -l - specify one or more options, order does not matter +Syntax from src dir: make lib-voronoi args="-v version -h hpath hdir -g -b -l" +Syntax from lib dir: python Install.py -v version -h hpath hdir -g -b -l + +specify one or more options, order does not matter + -v = version of Voro++ to download and build default version = voro++-0.4.6 (current as of Jan 2015) -h = set home dir of Voro++ to be hpath/hdir hpath can be full path, contain '~' or '.' chars default hpath = . = lib/voronoi default hdir = voro++-0.4.6 = what tarball unpacks to -g = grab (download) tarball from math.lbl.gov/voro++ website unpack it to hpath/hdir hpath must already exist if hdir already exists, it will be deleted before unpack -b = build Voro++ library in its src dir -l = create 2 softlinks (includelink,liblink) in lib/voronoi to Voro++ src dir + +Example: + +make lib-voronoi args="-g -b -l" # download/build in lib/voronoi/voro++-0.4.6 """ # settings version = "voro++-0.4.6" url = "http://math.lbl.gov/voro++/download/dir/%s.tar.gz" % version # print error message or help def error(str=None): if not str: print help else: print "ERROR",str sys.exit() # expand to full path name # process leading '~' or relative path def fullpath(path): return os.path.abspath(os.path.expanduser(path)) # parse args args = sys.argv[1:] nargs = len(args) if nargs == 0: error() homepath = "." homedir = version grabflag = 0 buildflag = 0 linkflag = 0 iarg = 0 while iarg < nargs: if args[iarg] == "-v": if iarg+2 > nargs: error() version = args[iarg+1] iarg += 2 elif args[iarg] == "-h": if iarg+3 > nargs: error() homepath = args[iarg+1] homedir = args[iarg+2] iarg += 3 elif args[iarg] == "-g": grabflag = 1 iarg += 1 elif args[iarg] == "-b": buildflag = 1 iarg += 1 elif args[iarg] == "-l": linkflag = 1 iarg += 1 else: error() homepath = fullpath(homepath) if not os.path.isdir(homepath): error("Voro++ path does not exist") homedir = "%s/%s" % (homepath,homedir) # download and unpack Voro++ tarball if grabflag: print "Downloading Voro++ ..." urllib.urlretrieve(url,"%s/%s.tar.gz" % (homepath,version)) print "Unpacking Voro++ tarball ..." if os.path.exists("%s/%s" % (homepath,version)): commands.getoutput("rm -rf %s/%s" % (homepath,version)) cmd = "cd %s; tar zxvf %s.tar.gz" % (homepath,version) commands.getoutput(cmd) if os.path.basename(homedir) != version: if os.path.exists(homedir): commands.getoutput("rm -rf %s" % homedir) os.rename("%s/%s" % (homepath,version),homedir) # build Voro++ if buildflag: print "Building Voro++ ..." cmd = "cd %s; make" % homedir txt = commands.getoutput(cmd) print txt # create 2 links in lib/voronoi to Voro++ src dir if linkflag: print "Creating links to Voro++ include and lib files" if os.path.isfile("includelink") or os.path.islink("includelink"): os.remove("includelink") if os.path.isfile("liblink") or os.path.islink("liblink"): os.remove("liblink") cmd = "ln -s %s/src includelink" % homedir commands.getoutput(cmd) cmd = "ln -s %s/src liblink" % homedir commands.getoutput(cmd) diff --git a/src/Makefile b/src/Makefile index c7b20dcb1..3d1085e0b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,383 +1,384 @@ # LAMMPS multiple-machine -*- Makefile -*- SHELL = /bin/bash PYTHON = python #.IGNORE: # Definitions ROOT = lmp EXE = lmp_$@ ARLIB = liblammps_$@.a SHLIB = liblammps_$@.so ARLINK = liblammps.a SHLINK = liblammps.so OBJDIR = Obj_$@ OBJSHDIR = Obj_shared_$@ SRC = $(wildcard *.cpp) INC = $(wildcard *.h) OBJ = $(SRC:.cpp=.o) SRCLIB = $(filter-out main.cpp,$(SRC)) OBJLIB = $(filter-out main.o,$(OBJ)) # Command-line options for mode: exe (default), shexe, lib, shlib mode = exe objdir = $(OBJDIR) ifeq ($(mode),shexe) objdir = $(OBJSHDIR) endif ifeq ($(mode),lib) objdir = $(OBJDIR) endif ifeq ($(mode),shlib) objdir = $(OBJSHDIR) endif # Package variables # PACKAGE = standard packages # PACKUSER = user packagse # PACKLIB = all packages that require an additional lib # should be PACKSYS + PACKINT + PACKEXT # PACKSYS = subset that reqiure a common system library # include MPIIO and LB b/c require full MPI, not just STUBS # PACKINT = subset that require an internal (provided) library # PACKEXT = subset that require an external (downloaded) library PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ granular kim kokkos kspace manybody mc meam misc molecule \ mpiio mscg opt peri poems \ python qeq reax replica rigid shock snap srd voronoi PACKUSER = user-atc user-awpmd 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-mgpt user-misc user-molfile \ user-netcdf user-omp user-phonon user-qmmm user-qtb \ user-quip user-reaxc user-smd user-smtbq user-sph user-tally \ user-vtk PACKLIB = compress gpu kim kokkos meam mpiio mscg poems \ python reax voronoi \ user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \ user-netcdf user-qmmm user-quip user-smd user-vtk PACKSYS = compress mpiio python user-lb PACKINT = gpu kokkos meam poems reax user-atc user-awpmd user-colvars PACKEXT = kim mscg voronoi \ user-h5md user-molfile user-netcdf user-qmmm user-quip \ user-smd user-vtk PACKALL = $(PACKAGE) $(PACKUSER) PACKAGEUC = $(shell echo $(PACKAGE) | tr a-z A-Z) PACKUSERUC = $(shell echo $(PACKUSER) | tr a-z A-Z) YESDIR = $(shell echo $(@:yes-%=%) | tr a-z A-Z) NODIR = $(shell echo $(@:no-%=%) | tr a-z A-Z) LIBDIR = $(shell echo $(@:lib-%=%)) LIBUSERDIR = $(shell echo $(@:lib-user-%=%)) # List of all targets help: @echo '' @echo 'make clean-all delete all object files' @echo 'make clean-machine delete object files for one machine' @echo 'make mpi-stubs build dummy MPI library in STUBS' @echo 'make install-python install LAMMPS wrapper in Python' @echo 'make tar create lmp_src.tar.gz for src dir and packages' @echo '' @echo 'make package list available packages and their dependencies' @echo 'make package-status (ps) status of all packages' @echo 'make yes-package install a single pgk in src dir' @echo 'make no-package remove a single pkg from src dir' @echo 'make yes-all install all pgks in src dir' @echo 'make no-all remove all pkgs from src dir' @echo 'make yes-standard (yes-std) install all standard pkgs' @echo 'make no-standard (no-std) remove all standard pkgs' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' @echo 'make yes-lib install all pkgs with libs (included or ext)' @echo 'make no-lib remove all pkgs with libs (included or ext)' @echo 'make yes-ext install all pkgs with external libs' @echo 'make no-ext remove all pkgs with external libs' @echo '' @echo 'make package-update (pu) replace src files with updated package files' @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package files' @echo '' - @echo 'make lib-package download/build/install a package library' + @echo 'make lib-package help for download/build/install a package library' + @echo 'make lib-package args="..." download/build/install a package library' @echo 'make purge purge obsolete copies of source files' @echo '' @echo 'make machine build LAMMPS for machine' @echo 'make mode=lib machine build LAMMPS as static lib for machine' @echo 'make mode=shlib machine build LAMMPS as shared lib for machine' @echo 'make mode=shexe machine build LAMMPS as shared exe for machine' @echo 'make makelist create Makefile.list used by old makes' @echo 'make -f Makefile.list machine build LAMMPS for machine (old)' @echo '' @echo 'machine is one of these from src/MAKE:' @echo '' @files="`ls MAKE/Makefile.*`"; \ for file in $$files; do head -1 $$file; done @echo '' @echo '... or one of these from src/MAKE/OPTIONS:' @echo '' @files="`ls MAKE/OPTIONS/Makefile.*`"; \ for file in $$files; do head -1 $$file; done @echo '' @echo '... or one of these from src/MAKE/MACHINES:' @echo '' @files="`ls MAKE/MACHINES/Makefile.*`"; \ for file in $$files; do head -1 $$file; done @echo '' @echo '... or one of these from src/MAKE/MINE:' @echo '' @files="`ls MAKE/MINE/Makefile.* 2>/dev/null`"; \ for file in $$files; do head -1 $$file; done @echo '' # Build LAMMPS in one of 4 modes # exe = exe with static compile in Obj_machine (default) # shexe = exe with shared compile in Obj_shared_machine # lib = static lib in Obj_machine # shlib = shared lib in Obj_shared_machine .DEFAULT: @if [ $@ = "serial" -a ! -f STUBS/libmpi_stubs.a ]; \ then $(MAKE) mpi-stubs; fi @test -f MAKE/Makefile.$@ -o -f MAKE/OPTIONS/Makefile.$@ -o \ -f MAKE/MACHINES/Makefile.$@ -o -f MAKE/MINE/Makefile.$@ @if [ ! -d $(objdir) ]; then mkdir $(objdir); fi @$(SHELL) Make.sh style @if [ -f MAKE/MACHINES/Makefile.$@ ]; \ then cp MAKE/MACHINES/Makefile.$@ $(objdir)/Makefile; fi @if [ -f MAKE/OPTIONS/Makefile.$@ ]; \ then cp MAKE/OPTIONS/Makefile.$@ $(objdir)/Makefile; fi @if [ -f MAKE/Makefile.$@ ]; \ then cp MAKE/Makefile.$@ $(objdir)/Makefile; fi @if [ -f MAKE/MINE/Makefile.$@ ]; \ then cp MAKE/MINE/Makefile.$@ $(objdir)/Makefile; fi @if [ ! -e Makefile.package ]; \ then cp Makefile.package.empty Makefile.package; fi @if [ ! -e Makefile.package.settings ]; \ then cp Makefile.package.settings.empty Makefile.package.settings; fi @cp Makefile.package Makefile.package.settings $(objdir) @cd $(objdir); rm -f .depend; \ $(MAKE) $(MFLAGS) "SRC = $(SRC)" "INC = $(INC)" depend || : ifeq ($(mode),exe) @cd $(objdir); \ $(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" "SHFLAGS =" \ "EXE = ../$(EXE)" ../$(EXE) endif ifeq ($(mode),shexe) @cd $(objdir); \ $(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" \ "EXE = ../$(EXE)" ../$(EXE) endif ifeq ($(mode),lib) @cd $(objdir); \ $(MAKE) $(MFLAGS) "OBJ = $(OBJLIB)" "INC = $(INC)" "SHFLAGS =" \ "EXE = ../$(ARLIB)" lib @rm -f $(ARLINK) @ln -s $(ARLIB) $(ARLINK) endif ifeq ($(mode),shlib) @cd $(objdir); \ $(MAKE) $(MFLAGS) "OBJ = $(OBJLIB)" "INC = $(INC)" \ "EXE = ../$(SHLIB)" shlib @rm -f $(SHLINK) @ln -s $(SHLIB) $(SHLINK) endif # Remove machine-specific object files clean: @echo 'make clean-all delete all object files' @echo 'make clean-machine delete object files for one machine' clean-all: rm -rf Obj_* clean-%: rm -rf Obj_$(@:clean-%=%) Obj_shared_$(@:clean-%=%) # Create Makefile.list makelist: @$(SHELL) Make.sh style @$(SHELL) Make.sh Makefile.list # Make MPI STUBS library mpi-stubs: @cd STUBS; $(MAKE) clean; $(MAKE) # install LAMMPS shared lib and Python wrapper for Python usage # include python package settings to # automatically adapt name of python interpreter sinclude ../lib/python/Makefile.lammps install-python: @$(PYTHON) ../python/install.py # Create a tarball of src dir and packages tar: @cd STUBS; $(MAKE) clean @cd ..; tar cvzf src/$(ROOT)_src.tar.gz \ src/Make* src/Package.sh src/Depend.sh src/Install.sh \ src/MAKE src/DEPEND src/*.cpp src/*.h src/STUBS \ $(patsubst %,src/%,$(PACKAGEUC)) $(patsubst %,src/%,$(PACKUSERUC)) \ --exclude=*/.svn @cd STUBS; $(MAKE) @echo "Created $(ROOT)_src.tar.gz" # Package management package: @echo 'Standard packages:' $(PACKAGE) @echo '' @echo 'User-contributed packages:' $(PACKUSER) @echo '' @echo 'Packages that need system libraries:' $(PACKSYS) @echo '' @echo 'Packages that need provided libraries:' $(PACKINT) @echo '' @echo 'Packages that need external libraries:' $(PACKEXT) @echo '' @echo 'make package list available packages' @echo 'make package list available packages' @echo 'make package-status (ps) status of all packages' @echo 'make yes-package install a single pgk in src dir' @echo 'make no-package remove a single pkg from src dir' @echo 'make yes-all install all pgks in src dir' @echo 'make no-all remove all pkgs from src dir' @echo 'make yes-standard (yes-std) install all standard pkgs' @echo 'make no-standard (no-srd) remove all standard pkgs' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' @echo 'make yes-lib install all pkgs with libs (included or ext)' @echo 'make no-lib remove all pkgs with libs (included or ext)' @echo 'make yes-ext install all pkgs with external libs' @echo 'make no-ext remove all pkgs with external libs' @echo '' @echo 'make package-update (pu) replace src files with package files' @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package file' @echo '' @echo 'make lib-package build and/or download a package library' yes-all: @for p in $(PACKALL); do $(MAKE) yes-$$p; done no-all: @for p in $(PACKALL); do $(MAKE) no-$$p; done yes-standard yes-std: @for p in $(PACKAGE); do $(MAKE) yes-$$p; done no-standard no-std: @for p in $(PACKAGE); do $(MAKE) no-$$p; done yes-user: @for p in $(PACKUSER); do $(MAKE) yes-$$p; done no-user: @for p in $(PACKUSER); do $(MAKE) no-$$p; done yes-lib: @for p in $(PACKLIB); do $(MAKE) yes-$$p; done no-lib: @for p in $(PACKLIB); do $(MAKE) no-$$p; done yes-ext: @for p in $(PACKEXT); do $(MAKE) yes-$$p; done no-ext: @for p in $(PACKEXT); do $(MAKE) no-$$p; done yes-%: @if [ ! -e Makefile.package ]; \ then cp Makefile.package.empty Makefile.package; fi @if [ ! -e Makefile.package.settings ]; \ then cp Makefile.package.settings.empty Makefile.package.settings; fi @if [ ! -e $(YESDIR) ]; then \ echo "Package $(@:yes-%=%) does not exist"; \ elif [ -e $(YESDIR)/Install.sh ]; then \ echo "Installing package $(@:yes-%=%)"; \ cd $(YESDIR); $(SHELL) Install.sh 1; cd ..; \ $(SHELL) Depend.sh $(YESDIR) 1; \ else \ echo "Installing package $(@:yes-%=%)"; \ cd $(YESDIR); $(SHELL) ../Install.sh 1; cd ..; \ $(SHELL) Depend.sh $(YESDIR) 1; \ fi; no-%: @if [ ! -e $(NODIR) ]; then \ echo "Package $(@:no-%=%) does not exist"; \ elif [ -e $(NODIR)/Install.sh ]; then \ echo "Uninstalling package $(@:no-%=%)"; \ cd $(NODIR); $(SHELL) Install.sh 0; cd ..; \ $(SHELL) Depend.sh $(NODIR) 0; \ else \ echo "Uninstalling package $(@:no-%=%)"; \ cd $(NODIR); $(SHELL) ../Install.sh 0; cd ..; \ $(SHELL) Depend.sh $(NODIR) 0; \ fi; # download/build/install a package library lib-%: @if [ -e ../lib/$(LIBDIR)/Install.py ]; then \ echo "Installing lib $(@:lib-%=%)"; \ cd ../lib/$(LIBDIR); python Install.py $(args); \ elif [ -e ../lib/$(LIBUSERDIR)/Install.py ]; then \ echo "Installing lib $(@:lib-user-%=%)"; \ cd ../lib/$(LIBUSERDIR); python Install.py $(args); \ else \ echo "Install script for lib $(@:lib-%=%) does not exist"; \ fi; # status = list src files that differ from package files # update = replace src files with newer package files # overwrite = overwrite package files with newer src files # diff = show differences between src and package files # purge = delete obsolete and auto-generated package files package-status ps: @for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p status; done @echo '' @for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p status; done package-update pu: @for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p update; done @echo '' @for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p update; done package-overwrite: @for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p overwrite; done @echo '' @for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p overwrite; done package-diff pd: @for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p diff; done @echo '' @for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p diff; done purge: Purge.list @echo 'Purging obsolete and auto-generated source files' @for f in `grep -v '#' Purge.list` ; \ do test -f $$f && rm $$f && echo $$f || : ; \ done