Unverified Commit d6a918f4 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1270 from akohlmey/get-moltemplate-from-web

Replace bundled moltemplate distribution with installation instructions only
parents 7606529f f96f9824
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -391,15 +391,16 @@ definition file. This tool was used to create the system for the

moltemplate tool :h4,link(moltemplate)

The moltemplate sub-directory contains a Python-based tool for
building molecular systems based on a text-file description, and
creating LAMMPS data files that encode their molecular topology as
lists of bonds, angles, dihedrals, etc.  See the README.TXT file for
more information.
The moltemplate sub-directory contains instructions for installing
moltemplate, a Python-based tool for building molecular systems based
on a text-file description, and creating LAMMPS data files that encode
their molecular topology as lists of bonds, angles, dihedrals, etc.
See the README.txt file for more information.

This tool was written by Andrew Jewett (jewett.aij at gmail.com), who
supports it.  It has its own WWW page at
"http://moltemplate.org"_http://moltemplate.org.
The latest sources can be found "on its GitHub page"_https://github.com/jewettaij/moltemplate/releases

:line

+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ lmp2arc convert LAMMPS output to Accelrys Insight format
lmp2cfg		       convert LAMMPS output to CFG files for AtomEye viz
matlab		       MatLab scripts for post-processing LAMMPS output
micelle2d	       create a data file of small lipid chains in solvent
moltemplate            Moltemplate builder program
moltemplate            Instructions for installing the Moltemplate builder program
msi2lmp		       use Accelrys Insight code to setup LAMMPS input
phonon                 post-process output of the fix phonon command
polybond               Python tool for programmable polymer bonding

tools/moltemplate/.gitignore

deleted100644 → 0
+0 −180
Original line number Diff line number Diff line
# from https://github.com/github/gitignore/blob/master/Python.gitignore

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
.venv/
venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

# text-editor temporary files:
*~

# misc rubbish
deleteme*
DELETEME*

######## files specific to moltemplate and lammps ########

# latex/bibtex temporary files for the moltemplate manual:
moltemplate_manual*.aux
moltemplate_manual*.bbl
moltemplate_manual*.blg
moltemplate_manual*.log
moltemplate_manual*.out
moltemplate_manual*.toc

######## files created by running LAMMPS: ########

log.lammps
log.cite
traj*.lammpstrj

######## files generated by running moltemplate: ########

system.data
system.in
system.in.init
system.in.settings
system.in.charges
system.psf
ttree_assignments.txt
output_ttree/

# Sections from the LAMMPS data file generated by moltemplate.sh
"Data Header"*
"Data Atoms"*
"Data Masses"*
"Data Velocities"*
"Data Bonds"*
"Data Bond List"*
"Data Bonds AtomId AtomId"*
"Data Angles"*
"Data Dihedrals"*
"Data Impropers"*
"Data Bond Coeffs"*
"Data Angle Coeffs"*
"Data Dihedral Coeffs"*
"Data Improper Coeffs"*
"Data Pair Coeffs"*
"Data PairIJ Coeffs"*

# interactions-by-type (not id. This is not part of the LAMMPS standard.)
"Data Charge By Bond"*
"Data Bonds By Type"*
"Data Angles By Type"*
"Data Dihedrals By Type"*
"Data Impropers By Type"*

# class2 data sections
"Data BondBond Coeffs"*
"Data BondAngle Coeffs"*
"Data MiddleBondTorsion Coeffs"*
"Data EndBondTorsion Coeffs"*
"Data AngleTorsion Coeffs"*
"Data AngleAngleTorsion Coeffs"*
"Data BondBond13 Coeffs"*
"Data AngleAngle Coeffs"*

# sections for non-point-like particles:
"Data Ellipsoids"*
"Data Lines"*
"Data Triangles"*

# periodic boundary conditions
"Data Boundary"*

# Sections from the LAMMPS input script(s) generated by moltemplate.sh

"In Init"*
"In Settings"*
"In Coords"*
"In Charges"*
#temporary file created by moltemplate.sh for storing coordinates
tmp_atom_coords.dat

tools/moltemplate/LICENSE.md

deleted100644 → 0
+0 −29
Original line number Diff line number Diff line
Modified BSD License (BSD-3-Clause)
====================

_Copyright © `2012`, `University of California, Santa Barbara`_  
_All rights reserved._

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holders nor the names of its
   contributors may be used to endorse or promote products derived from 
   this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
+142 −0
Original line number Diff line number Diff line
[![Build Status](https://travis-ci.org/jewettaij/moltemplate.svg?branch=master)](https://travis-ci.org/jewettaij/moltemplate.svg?branch=master)

Moltemplate
===========

##  Description

Moltemplate is a *general* cross-platform text-based molecule builder for **LAMMPS** and **ESPResSo**.  Moltemplate was intended for building custom coarse-grained molecular models, but it can be used to prepare realistic all-atom simulations as well.  It currently supports the **OPLS**, **COMPASS**, **AMBER**(GAFF,GAFF2), **MARTINI**, **SDK**, **LOPLS**(2015), and **TraPPE**(1998) force fields, and includes approximately 40 examples.  (New force fields and examples are added continually by users.)
This folder used to contain a distribution of Moltemplate, a general purpose,
cross-platform, text-based molecule and topology builder for LAMMPS.
Moltemplate was originally conceived for building custom coarse-grained
molecular models, but it has since been generalized for all-atom simulations
as well.  It currently supports the OPLS, COMPASS, AMBER(GAFF,GAFF2),
MARTINI, SDK, LOPLS(2015), and TraPPE(1998) force fields, and includes
(New force fields and examples are added continually through user
contributions).

Moltemplate is now distributed via the pip python package manager,
or can be downloaded from http://www.moltemplate.org/download.html
or https://github.com/jewettaij/moltemplate/releases
The most up-to-date version is usually available through GitHub

## Typical usage

@@ -26,28 +37,51 @@ suitable shell environment has been installed. See below.)

## INSTALLATION INSTRUCTIONS

This directory should contain 3 folders:
## Download / install via pip
If you have a working installation of "pip" and access to the internet,
you can download and install it into your home directory ($HOME/.local/bin
and the corresponding python package folders) simply by:

   pip install moltemplate --user

If instead, you want a system-wide installation, you need superuser access,
e.g. via:

   sudo pip install moltemplate

Updates to this distribution method are less frequent, than others, so if
you need a more recent version, you can download it as a .tar.gz or .zip
archive from the moltemplate home page or GitHub (see linke above). After
downloading an archive and unpacking it, you should have 3 folders.

    moltemplate/                  <-- source code and force fields
    doc/                          <-- the moltemplate reference manual
    examples/                     <-- examples built with moltemplate

There are two ways to install moltemplate:
From here on, you can use pip to install this downloaded version as well
by issuing the following command from within the top-level directory of
the unpacked source archive:

## Installation using pip
If you are familiar with pip, then run the following command from within the directory where this README file is located:
    pip install . --user

    pip install .
If you want to install into a system folder, then you need to run pip with
superuser priviledges. e.g. with:

If you receive an error regarding permissions, then run pip with the "--user" argument:
    sudo pip install .

    pip install . --user
Make sure that your default pip install bin directory is in your PATH.
This is usually something like ~/.local/bin/ or ~/anaconda3/bin/.
If you have installed anaconda, this will be done for you automatically.
As you can see, this is mostly identical to the direct install with pip.

Make sure that your default pip install bin directory is in your PATH.  (This is usually something like ~/.local/bin/ or ~/anaconda3/bin/.  If you have installed anaconda, this will be done for you automatically.)  Later, you can uninstall moltemplate using:
Later, you can uninstall moltemplate using:

    pip uninstall moltemplate

If you continue to run into difficulty, try installing moltemplate into a temporary virtual environment by installing "*virtualenv*", downloading moltemplate (to "~/moltemplate" in the example below), and running these commands:
If you continue to run into difficulty, try installing moltemplate into
a temporary virtual environment by installing virtualenv, downloading
moltemplate (to "~/moltemplate" in the example below), and running
these commands:

    cd ~/moltemplate
    virtualenv venv
@@ -55,16 +89,22 @@ If you continue to run into difficulty, try installing moltemplate into a tempor
    pip install .
    #(now do something useful with moltemplate...)

(You will have to "run source ~/moltemplate/venv/bin/activate" beforehand every time you want to run moltemplate.
The *virtualenv* tool is
[explained in detail here](http://docs.python-guide.org/en/latest/dev/virtualenvs/))  If all this fails, then try installing moltemplate by manually updating your \$PATH environment variable.  Instructions for doing that are included below.
(You will have to "run source ~/moltemplate/venv/bin/activate" beforehand
every time you want to run moltemplate.
The *virtualenv* tool is explained in detail here:

http://docs.python-guide.org/en/latest/dev/virtualenvs/

If all this fails, then try installing moltemplate by manually updating
your \$PATH environment variable.  Instructions for doing that are included below.

## Manual installation:

Alternatively, you can edit your $PATH environment variable manually to 
include the subdirectory where the "moltemplate.sh" script is located,
as well as the subdirectory where most of the python scripts are located.
Suppose the directory with this README file is named "moltemplate"
Alternatively, after downloading and unpacking the moltemplate source archive,
you can edit your $PATH environment variable manually to include the subdirectory
where the "moltemplate.sh" script is located, as well as the subdirectory where
most of the python scripts are located.
Suppose the top-level directory of the unpacked archive "moltemplate"
and is located in your home directory:

If you use the bash shell, typically you would edit your
@@ -87,7 +127,9 @@ After making these changes, you may need to start a new terminal (shell) for the

### WINDOWS installation suggestions

You can install both moltemplate and LAMMPS in windows, but you will first need to install the BASH shell environment on your computer.  If you are using Windows 10 or later, try installing the "Windows Subsystem for Linux (WSL)"
You can install both moltemplate and LAMMPS in windows, but you will
first need to install the BASH shell environment on your computer.
If you are using Windows 10 or later, try installing the "Windows Subsystem for Linux (WSL)"

https://solarianprogrammer.com/2017/04/15/install-wsl-windows-subsystem-for-linux/
https://msdn.microsoft.com/en-us/commandline/wsl/faq
@@ -98,7 +140,3 @@ https://sourceforge.net/p/lammps/mailman/message/32599824/

To use LAMMPS and moltemplate, You will also need to install (and learn how to use) a text editor.  (Word, Wordpad, and Notepad will not work.)  Popular free text editors which you can safely install and run from within the WSL terminal include: **nano**, **ne**, **emacs**, **vim**, and **jove**.  (Unfortunately, as of 2017-5-17, [graphical unix-friendly text editors such as Atom, VSCode, Notepad++, and sublime won't work with WSL, and may cause file system corruption.  Avoid these editors for now.](https://www.reddit.com/r/bashonubuntuonwindows/comments/6bu1d1/since_we_shouldnt_edit_files_stored_in_wsl_with/))
## License

Moltemplate is available under the terms of the open-source 3-clause BSD
license.  (See `LICENSE.md`.)
Loading