replace more parsed-literal with code-block sections

This commit is contained in:
Axel Kohlmeyer 2020-02-22 05:42:05 -05:00
parent f9b451de32
commit ff316aa4d0
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
7 changed files with 78 additions and 115 deletions

View File

@ -8,14 +8,14 @@ instructions to install `Miniconda <mini_conda_install_>`_, then create a conda
environment (named `my-lammps-env` or whatever you prefer) for your lammps
install:
.. parsed-literal::
.. code-block:: bash
% conda config --add channels conda-forge
% conda create -n my-lammps-env
Then, you can install lammps on your system with the following command:
.. parsed-literal::
.. code-block:: bash
% conda activate my-lammps-env
% conda install lammps
@ -25,8 +25,7 @@ results in Conda also installing the `kim-api` binaries when LAMMPS is
installed. In order to use potentials from `openkim.org <openkim_>`_, you can
install the `openkim-models` package
.. parsed-literal::
.. code-block:: bash
% conda install openkim-models
@ -36,9 +35,6 @@ Thanks to Jan Janssen (Max-Planck-Institut fuer Eisenforschung) for setting
up the Conda capability.
.. _conda_forge_lammps: https://github.com/conda-forge/lammps-feedstock/issues
.. _openkim: https://openkim.org
.. _conda: https://docs.conda.io/en/latest/index.html
.. _mini_conda_install: https://docs.conda.io/en/latest/miniconda.html

View File

@ -1,4 +1,4 @@
Download the LAMMPS source with Git
Download the LAMMPS source with git
===================================
All LAMMPS development is coordinated through the "LAMMPS GitHub
@ -11,32 +11,30 @@ has several advantages:
* You can submit your new features back to GitHub for inclusion in
LAMMPS.
You must have `Git <git_>`_ installed on your system to communicate with
the public Git server for LAMMPS.
You must have `git <git_>`_ installed on your system to communicate with
the public git server for LAMMPS.
.. warning::
As of October 2016, the official home of public LAMMPS development is
on GitHub. The previously advertised LAMMPS git repositories on
git.lammps.org and bitbucket.org are now deprecated, may not be
up-to-date, and may go away at any time.
git.lammps.org and bitbucket.org are now deprecated, and may go away at any time.
.. _git: https://git-scm.com
You can follow LAMMPS development on 3 different Git branches:
You can follow LAMMPS development on 3 different git branches:
* **stable** : this branch is updated with every stable release
* **unstable** : this branch is updated with every patch release
* **master** : this branch continuously follows ongoing development
To access the Git repositories on your box, use the clone command to
To access the git repositories on your box, use the clone command to
create a local copy of the LAMMPS repository with a command like:
.. parsed-literal::
.. code-block:: bash
git clone -b unstable https://github.com/lammps/lammps.git mylammps
$ git clone -b unstable https://github.com/lammps/lammps.git mylammps
where "mylammps" is the name of the directory you wish to create on
your machine and "unstable" is one of the 3 branches listed above.
@ -52,33 +50,32 @@ typing "make html" from the doc directory.
After initial cloning, as bug fixes and new features are added to
LAMMPS, as listed on :doc:`this page <Errors_bugs>`, you can stay
up-to-date by typing the following Git commands from within the
up-to-date by typing the following git commands from within the
"mylammps" directory:
.. parsed-literal::
.. code-block:: bash
git checkout unstable # not needed if you always stay in this branch
git checkout stable # use one of the 3 checkout commands
git checkout master
git pull
$ git checkout unstable # not needed if you always stay in this branch
$ git checkout stable # use one of the 3 checkout commands
$ git checkout master
$ git pull
Doing a "pull" will not change any files you have added to the LAMMPS
directory structure. It will also not change any existing LAMMPS
files you have edited, unless those files have changed in the
repository. In that case, Git will attempt to merge the new
repository. In that case, git will attempt to merge the new
repository file with your version of the file and tell you if there
are any conflicts. See the Git documentation for details.
are any conflicts. See the git documentation for details.
If you want to access a particular previous release version of LAMMPS,
you can instead "checkout" any version with a published tag. See the
output of "git tag -l" for the list of tags. The Git command to do
output of "git tag -l" for the list of tags. The git command to do
this is as follows.
.. code-block:: bash
.. parsed-literal::
git checkout tagID
$ git checkout tagID
Stable versions and what tagID to use for a particular stable version
are discussed on :doc:`this page <Errors_bugs>`. Note that this command
@ -92,11 +89,11 @@ checkout"), you still need to re-build LAMMPS if any source files have
changed. To do this, you should cd to the src directory and type:
.. parsed-literal::
.. code-block:: bash
make purge # remove any deprecated src files
make package-update # sync package files with src files
make foo # re-build for your machine (mpi, serial, etc)
$ make purge # remove any deprecated src files
$ make package-update # sync package files with src files
$ make foo # re-build for your machine (mpi, serial, etc)
just as described on the :doc:`Install patch <Install_patch>` doc page,
after a patch has been installed.

View File

@ -11,10 +11,8 @@ Binaries are available for different versions of Linux:
| :ref:`Arch Linux build-script <arch>`
|
----------
.. _ubuntu:
Pre-built Ubuntu Linux executables
@ -29,42 +27,37 @@ operating system.
To install the appropriate personal-package archive (PPA), do the
following once:
.. code-block:: bash
.. parsed-literal::
sudo add-apt-repository ppa:gladky-anton/lammps
sudo apt-get update
$ sudo add-apt-repository ppa:gladky-anton/lammps
$ sudo apt-get update
To install LAMMPS do the following once:
.. code-block:: bash
.. parsed-literal::
sudo apt-get install lammps-daily
$ sudo apt-get install lammps-daily
This downloads an executable named "lmp\_daily" to your box, which
can then be used in the usual way to run input scripts:
.. code-block:: bash
.. parsed-literal::
lmp_daily -in in.lj
$ lmp_daily -in in.lj
To update LAMMPS to the most current version, do the following:
.. code-block:: bash
.. parsed-literal::
sudo apt-get update
$ sudo apt-get update
which will also update other packages on your system.
To get a copy of the current documentation and examples:
.. code-block:: bash
.. parsed-literal::
sudo apt-get install lammps-daily-doc
$ sudo apt-get install lammps-daily-doc
which will download the doc files in
/usr/share/doc/lammps-daily-doc/doc and example problems in
@ -75,26 +68,27 @@ files and auxiliary tools.
To un-install LAMMPS, do the following:
.. code-block:: bash
.. parsed-literal::
sudo apt-get remove lammps-daily
$ sudo apt-get remove lammps-daily
Note that the lammps-daily executable is built with the following
sequence of make commands, as if you had done the same with the
unpacked tarball files in the src directory:
make yes-all; make no-lib; make openmpi
.. code-block:: bash
$ make yes-all
$ make no-lib
$ make mpi
Thus it builds with FFTW3 and OpenMPI.
Thanks to Anton Gladky (gladky.anton at gmail.com) for setting up this
Ubuntu package capability.
----------
.. _fedora:
Pre-built Fedora Linux executables
@ -118,12 +112,11 @@ The same mechanism applies when loading the LAMMPS python module.
To install LAMMPS with OpenMPI and run an input in.lj with 2 CPUs do:
.. code-block:: bash
.. parsed-literal::
dnf install lammps-openmpi
module load mpi/openmpi-x86_64
mpirun -np 2 lmp -in in.lj
$ dnf install lammps-openmpi
$ module load mpi/openmpi-x86_64
$ mpirun -np 2 lmp -in in.lj
The "dnf install" command is needed only once. In case of a new LAMMPS
stable release, "dnf update" will automatically update to the newer
@ -137,9 +130,9 @@ results in the above command also installing the `kim-api` binaries when LAMMPS
is installed. In order to use potentials from `openkim.org <openkim_>`_, you
can install the `openkim-models` package
.. parsed-literal::
.. code-block:: bash
dnf install openkim-models
$ dnf install openkim-models
Please use "lmp -help" to see which compilation options, packages,
and styles are included in the binary.
@ -150,7 +143,6 @@ Thanks to Christoph Junghans (LANL) for making LAMMPS available in Fedora.
----------
.. _epel:
Pre-built EPEL Linux executable
@ -169,10 +161,8 @@ and styles are included in the binary.
Thanks to Christoph Junghans (LANL) for making LAMMPS available in EPEL.
----------
.. _opensuse:
Pre-built OpenSuse Linux executable
@ -181,18 +171,16 @@ Pre-built OpenSuse Linux executable
A pre-built LAMMPS package for stable releases is available
in OpenSuse as of Leap 15.0. You can install the package with:
.. code-block:: bash
.. parsed-literal::
zypper install lammps
$ zypper install lammps
This includes support for OpenMPI. The name of the LAMMPS executable
is *lmp*\ . Thus to run an input in parallel on 2 CPUs you would do:
.. code-block:: bash
.. parsed-literal::
mpirun -np 2 lmp -in in.lj
$ mpirun -np 2 lmp -in in.lj
Please use "lmp -help" to see which compilation options, packages,
and styles are included in the binary.
@ -202,16 +190,14 @@ results in the above command also installing the `kim-api` binaries when LAMMPS
is installed. In order to use potentials from `openkim.org <openkim_>`_, you
can install the `openkim-models` package
.. parsed-literal::
.. code-block:: bash
zypper install openkim-models
$ zypper install openkim-models
Thanks to Christoph Junghans (LANL) for making LAMMPS available in OpenSuse.
----------
.. _gentoo:
Gentoo Linux executable
@ -221,7 +207,7 @@ LAMMPS is part of Gentoo's main package tree and can be installed by
typing:
.. parsed-literal::
.. code-block:: bash
% emerge --ask lammps
@ -231,7 +217,7 @@ built on the your machine.
Certain LAMMPS packages can be enable via USE flags, type
.. parsed-literal::
.. code-block:: bash
% equery uses lammps
@ -240,40 +226,32 @@ for details.
Thanks to Nicolas Bock and Christoph Junghans (LANL) for setting up
this Gentoo capability.
----------
.. _arch:
Archlinux build-script
---------------------------------
LAMMPS is available via Arch's unofficial Arch User repository (AUR).
There are three scripts available, named lammps, lammps-beta and lammps-git.
They respectively package the stable, patch and git releases.
To install, you will need to have the git package installed. You may use
any of the above names in-place of lammps.
.. parsed-literal::
.. code-block:: bash
$ git clone https://aur.archlinux.org/lammps.git
$ cd lammps
$ makepkg -s
# makepkg -i
$ makepkg -i
To update, you may repeat the above, or change into the cloned directory,
and execute the following, after which, if there are any changes, you may
use makepkg as above.
.. parsed-literal::
.. code-block:: bash
$ git pull

View File

@ -11,7 +11,7 @@ After installing Homebrew, you can install LAMMPS on your system with
the following commands:
.. parsed-literal::
.. code-block:: bash
% brew install lammps
@ -22,7 +22,7 @@ Once LAMMPS is installed, you can test the installation with the
Lennard-Jones benchmark file:
.. parsed-literal::
.. code-block:: bash
% brew test lammps -v
@ -32,7 +32,7 @@ installed. In order to use potentials from `openkim.org <openkim_>`_, you can
install the `openkim-models` package
.. parsed-literal::
.. code-block:: bash
% brew install openkim-models

View File

@ -2,7 +2,7 @@ Applying patches
================
It is easy to stay current with the most recent LAMMPS patch releases
if you use Git or SVN to track LAMMPS development. Instructions for
if you use git or SVN to track LAMMPS development. Instructions for
how to stay current are on the :doc:`Install git <Install_git>` and
:doc:`Install svn <Install_svn>` doc pages.
@ -15,8 +15,8 @@ LAMMPS directory.
.. note::
You should not apply patch files to a local Git or SVN repo of
LAMMPS, only to an unpacked tarball. Use Git and SVN commands to
You should not apply patch files to a local git or SVN repo of
LAMMPS, only to an unpacked tarball. Use git and SVN commands to
update repo versions of LAMMPS.
Here are the steps to apply a patch file. Note that if your version
@ -33,9 +33,9 @@ up to date.
LAMMPS directory, where the redirected file is the name of the patch
file.
.. parsed-literal::
.. code-block:: bash
patch -bp1 < patch.12Dec16
$ patch -bp1 < patch.12Dec16
* A list of updated files print out to the screen. The -b switch
creates backup files of your originals (e.g. src/force.cpp.orig), so
@ -47,10 +47,10 @@ up to date.
command removes deprecated src files if any were removed by the patch
from package sub-directories.
.. parsed-literal::
.. code-block:: bash
make purge
make package-update
$ make purge
$ make package-update
* Re-build LAMMPS via the "make" command.

View File

@ -9,7 +9,6 @@ of the `LAMMPS website <lws_>`_.
.. _older: http://lammps.sandia.gov/tars
.. _lws: http://lammps.sandia.gov
You have two choices of tarballs, either the most recent stable
release or the most current patch release. Stable releases occur a
few times per year, and undergo more testing before release. Patch
@ -25,27 +24,23 @@ Older versions of LAMMPS can also be downloaded from `this page <older_>`_.
Once you have a tarball, unzip and untar it with the following
command:
.. code-block:: bash
.. parsed-literal::
tar -xzvf lammps\*.tar.gz
$ tar -xzvf lammps\*.tar.gz
This will create a LAMMPS directory with the version date
in its name, e.g. lammps-23Jun18.
----------
You can also download a zip file via the "Clone or download" button on
the `LAMMPS GitHub site <git_>`_. The file name will be lammps-master.zip
which can be unzipped with the following command, to create
a lammps-master dir:
.. code-block:: bash
.. parsed-literal::
unzip lammps\*.zip
$ unzip lammps\*.zip
This version is the most up-to-date LAMMPS development version. It
will have the date of the most recent patch release (see the file
@ -55,9 +50,6 @@ the next patch release tarball.
.. _git: https://github.com/lammps/lammps
----------

View File

@ -14,8 +14,8 @@ Specifically, LAMMPS was not conceived and designed for:
* visualize your MD simulation interactively
* plot your output data
Although over the years these limitations have been somewhat
reduced through features added to LAMMPS or external tools
Over the years some of these limitations have been reduced or
removed, through features added to LAMMPS or external tools
that either closely interface with LAMMPS or extend LAMMPS.
Here are suggestions on how to perform these tasks: