LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Problem in Moltemplate installation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Problem in Moltemplate installation


From: Andrew Jewett <jewett@...1937...>
Date: Mon, 19 Jun 2017 13:48:35 -0700

Hi Sousa

  I am unable to reproduce your problem.  I am using anaconda 4.4.0
(python3 version) in ubuntu 16.04.  (However I don't think your
problem is a result of using a different version of anaconda.)  I am
also using a similar procedure to install moltemplate:
git clone https://github.com/jewettaij/moltemplate ~/moltemplate
cd ~/moltemplate
pip install .

  Your problem sounds like an issue with the way anaconda was
installed in your system.  I suppose it could also mean that you might
have some old version of moltemplate that you installed previously
using pip that was not successful and/or not cleanly uninstalled.
(I'm just guessing here.)

   If you don't have time to fix your issues with anaconda, you can
always set your PATH environment variable manually by adding the
following lines to your ~/.bashrc  (or ~/.profile)  file:

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

That's all you need to do.  Once you have done this, you do not need
to use pip.  (However you need to start a new terminal for the changes
to take effect.)  This assumes you moved/renamed the moltemplate
directory into your home directory:  (mv moltempalte_2017-4-11
~/moltemplate)

Cheers
Andrew

P.S. If you don't want to manually change your PATH, you could also
try using "virtualenv" to create an independent python environment
where you can safely install and remove packages.  This is a safe and
useful way to install python packages in general, without risk of
mucking things up:
cd ~/moltemplate  #
virtualenv venv
source venv/bin/activate
pip install .
... Then in the future, whenever you want moltemplate.sh (and
ttree.py) to be in your path, run this command beforehand:

source ~/moltemplate/venv/bin/activate



On Sun, Jun 18, 2017 at 1:28 PM, Sousa Javan Nikkhah
<s.javannikkhah@...24...> wrote:
>
> Dear users
>
> I want to use Moltemplate to create input file for LAMMPS. I work with LAMMPS in linux bash shell in windows 10. But I have faced with a problem in Moltemplate installation, and be appreciated if help me.
>
> I installed Moltemplate according to its manual. After downloading moltemplate via
>
> -wget http://www.moltemplate.org/downloads/moltemplate_2017_4-11.tar.gz
>
> then unpacked it by:
>
> -tar -xzvf moltemplate_2017-4-11.tar.gz
>
> therefore I applied the first method of installation via pip:
>
> -cd moltempalte_2017-4-11
>
> then installed by:
>
> -pip install  .
>
> In addition I have installed anaconda to update the PATH automatically.
>
> But after logging out and  log in and typing:
>
> -moltemplate.sh
>
> This error is appeared:
>
> ---------
>
> Error: Missing file "/root/anaconda2/bin/../ttree.py"
>
>
>
> INSTALLATION ERROR:
>
> Follow the instructions in the "Installation" chapter of the moltemplate manual.
>
> (Note: You may need to log out and log in again before the changes take effect.)
>
> ---------
>
> Would you please tell me how I can fix it?
>
> Best Regards
>
> sjns