Commit 1536eb5d authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #630 from akohlmey/moltemplate-update

Update for moltemplate to version 2017-8-22
parents f7a0a6eb 12150ffa
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
Modified BSD License (BSD-3-Clause)
====================

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

Author: Andrew Jewett, Shea Group, http://www.chem.ucsb.edu/~sheagroup/
Copyright (c) 2014, Regents of the University of California
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

  * Redistributions of source code must retain the above copyright notice, 
    this list of conditions and the following disclaimer.
  * 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.
  * Neither the name of the University of California, Santa Barbara nor the 
    names of its contributors may be used to endorse or promote products 
    derived from this software without specific prior written permission.
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" 
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
@@ -25,4 +27,3 @@ 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.

tools/moltemplate/README.TXT

deleted100644 → 0
+0 −61
Original line number Diff line number Diff line
   --  Description:  --

Moltemplate is a cross-platform text-based molecule builder for LAMMPS. 

   --  Typical usage:  --

moltemplate.sh [-atomstyle style] [-pdb/-xyz coord_file] [-vmd]  system.lt

   --  Web page:  --

Documentation, examples, and supporting code can be downloaded at:

    http://www.moltemplate.org
The most up-to-date version of moltemplate can be downloaded here.
(After download, you can unpack the archive using:
    tar xzf moltemplate_2012-3-31.tar.gz
The date will vary from version to version.)

----------------------------------------------------
----------  INSTALLATION INSTRUCTIONS:  ------------
----------------------------------------------------

This directory should contain two folders:
    src/       <-- location of all python and bash scripts
    common/    <-- location of shared force fields and molecules 

The ``moltemplate.sh'' script and the python scripts that it invokes are 
located in the ``src/'' subdirectory.  You should update your PATH environment 
variable to include this directory.  

If you do not know what a PATH environment variable is, read:
    http://www.linfo.org/path_env_var.html
(I receive this question often.)

It is also a good idea to set your MOLTEMPLATE_PATH environment variable to 
point to the ``common/'' subdirectory.
(Force fields and commonly used molecules will eventually be located here.)

   --  Installation example ---

Suppose the directory with this README.TXT file is located at ~/moltemplate.

If you use the bash shell, typically you would edit your 
~/.profile, ~/.bash_profile or ~/.bashrc files to contain the following lines:
    export PATH="$PATH:$HOME/moltemplate/src"
    export MOLTEMPLATE_PATH="$HOME/moltemplate/common"
If you use the tcsh shell, typically you would edit your 
~/.login, ~/.cshrc, or ~/.tcshrc files to contain the following lines:
    setenv PATH "$PATH:$HOME/moltemplate/src"
    setenv MOLTEMPLATE_PATH "$HOME/moltemplate/common"

   --  Requirements:  --

Moltemplate requires the Bourne-shell, and a recent version of python 
(2.7, 3.0 or higher), and can run on OS X, linux, or windows (if a 
suitable shell environment has been installed).

   --  License:  --

Moltemplate is available under the terms of the open-source 3-clause BSD 
license.  (See LICENSE.TXT.)
+100 −0
Original line number Diff line number Diff line
Moltemplate
===========

##  Description

Moltemplate is a cross-platform text-based molecule builder for LAMMPS.

## Typical usage

    moltemplate.sh [-atomstyle style] [-pdb/-xyz coord_file] [-vmd] system.lt

## Web page

Documentation, examples, and supporting code can be downloaded at:

http://www.moltemplate.org

## Requirements

Moltemplate requires the Bourne-shell, and a recent version of python
(2.7, 3.0 or higher), and can run on OS X, linux, or windows. (...if a
suitable shell environment has been installed.  See below.)


## INSTALLATION INSTRUCTIONS

This directory should contain 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:

## 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 .

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

    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.)  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:

    cd ~/moltemplate
    virtualenv venv
    source venv/bin/activate
    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.)  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"
and is located in your home directory:

If you use the bash shell, typically you would edit your
`~/.profile`, `~/.bash_profile` or `~/.bashrc` files
to contain the following lines:

    export PATH="$PATH:$HOME/moltemplate/moltemplate"
    export PATH="$PATH:$HOME/moltemplate/moltemplate/scripts"

If you use the tcsh shell, typically you would edit your
`~/.login`, `~/.cshrc`, or `~/.tcshrc` files to contain the following lines:

    setenv PATH "$PATH:$HOME/moltemplate/moltemplate"
    setenv PATH "$PATH:$HOME/moltemplate/moltemplate/scripts"

After making these changes, you may need to start a new terminal (shell) for the changes to take effect.  If you do not know what a `PATH` environment variable is and are curious, read:
    http://www.linfo.org/path_env_var.html
(I receive this question often.)


### 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)"

https://solarianprogrammer.com/2017/04/15/install-wsl-windows-subsystem-for-linux/
https://msdn.microsoft.com/en-us/commandline/wsl/faq

If you are using an older version of windows, try following the tutorial written by Yanqing Fu instead:

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`.)
+14.6 KiB
Loading image diff...
Loading