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

Re: [lammps-users] Moltemplate installation


From: Andrew Jewett <jewett@...1937...>
Date: Tue, 22 Aug 2017 16:58:05 -0700

Some apologies to follow.

There is some confusion because there are 3 versions of moltemplate
being distributed, and PIP compatibility currently depends on which
version you are using.  I'll fix this today.

  1) the version available from github.com.  This is the version which
is most up to date.  This version does not have the PIP/packaging
issue that Varsha found.  You can install it using PIP using "pip
install . --user" (thanks Rajesh)

  2) the version available at http://moltemplate.org/download.html (as
a .tar.gz file).  Unfortunately, this version has a problem with PIP
which Varsha just discovered (in the 2017-4-17 version).  This is
really embarrassing.  I will fix this and post a new file on this
website today.

  3) the version of moltemplate which is distributed with LAMMPS.
This is probably the most stable version.  However it does not yet
work with PIP.  (Thanks Axel for pointing this out.)

All 3 versions work and can still be installed the "old fashioned"
way: by manually editing your .bashrc file to change your $PATH
environment variable.  I'll make some updates today to eliminate these
discrepancies so that PIP works on all of them.

More comments to follow:

>> pip install . --user

Thanks Rajesh for pointing this out.  The "--user" flag is necessary
in some operating systems, if you don't have admin privileges.  (I was
not aware of this issue because the versions of PIP which are packaged
with ubuntu install python packages in ~/.local by default.  Other
linux flavors like arch, do it differently.)  I will change
installation instructions.

Another alternative is to use "virtualenv".  Virtualenv creates a
temporary python package environment where you can safely experiment
with installing python packages without risk of messing up your
system, and it temporarily and reversibly updates your $PATH variable
as well.)  I highly recommend installing "virtualenv" and installing
moltemplate this way:

git clone https://github.com/jewettaij/moltemplate ~/moltemplate
cd ~/moltemplate
virtualenv venv
source venv/bin/activate
pip install .

The only drawback to installing moltemplate with virtualenv is that
whenever you want to run moltemplate, you will have to run the "source
~/moltemplate/venv/bin/activate" command in your shell at some point
beforehand.  (In addition to this issue, python modules you use
frequently, such as numpy, will not be installed in this new
environment, and you will have to run commands like "pip install
numpy" if you need them.  Moltemplate might require numpy in the
future.)

I'm grateful people are posting difficulties with moltemplate.
I'll clean this up today.

Andrew


On Mon, Aug 21, 2017 at 8:58 PM, R. Varsha <varsharani.0909@...24...> wrote:
> Thanks Andrew, and Rajesh.
> Still I am not able to install moltemplate by using both the commands.
>
>
>
> On Tue, Aug 22, 2017 at 7:04 AM, Rajesh <creativeidleminds@...24...> wrote:
>>
>> Dear Andrew,
>> Thank you for your response. Only pip install . Doesn't work and give some
>> error due to permission issue. I used pip install . --user command to
>> install it.
>>
>> Thank you
>> Rajesh.
>>
>> On Aug 22, 2017 01:49, "Andrew Jewett" <jewett@...1937...> wrote:
>>>
>>> Thanks Rajesh
>>>    Sorry for the slow reply Varsha
>>>    I never bothered to registered moltemplate with PyPI.  Perhaps I
>>> should.  (That's why you currently can't install it using "pip install
>>> moltemplate")
>>>
>>> Instead you must manually download moltemplate at moltemplate.org (and
>>> unpack it if you got the gzipped version), and install it by running:
>>>
>>> pip install .
>>>
>>> ...from within the moltemplate directory that you downloaded.  (The
>>> directory containing setup.py)
>>>
>>> Documentation is available here:
>>>
>>> http://moltemplate.org/doc
>>>
>>> Cheers
>>> andrew
>>>
>>>
>>> On Aug 21, 2017 10:36 AM, "Rajesh" <creativeidleminds@...24...> wrote:
>>>
>>> Dear Varsha,
>>> You can install it using correct command
>>> pip install . --user
>>>
>>>
>>> On Mon, Aug 21, 2017 at 10:51 PM, Rajesh <creativeidleminds@...24...>
>>> wrote:
>>>>
>>>> Dear Axel,
>>>>
>>>> It is there in moltemplate manual if we understand it correctly and are
>>>> not wrong. Can you please suggest correct way to install it?
>>>>
>>>> Thank you.
>>>>
>>>> Rajesh
>>>>
>>>> On Mon, Aug 21, 2017 at 6:56 PM, Axel Kohlmeyer <akohlmey@...24...>
>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Aug 21, 2017 at 1:06 AM, R. Varsha <varsharani.0909@...24...>
>>>>> wrote:
>>>>>>
>>>>>> Hello everyone.!
>>>>>>
>>>>>> I am facing a trouble to install the moltemplate.
>>>>>> I have attached a snapshot of my problem.
>>>>>
>>>>>
>>>>> is there anywhere in the moltemplate documentation where it says it can
>>>>> be installed via pip?
>>>>>
>>>>> axel.
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>> Help me in this regard.
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Check out the vibrant tech community on one of the world's most
>>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>>> _______________________________________________
>>>>>> lammps-users mailing list
>>>>>> lammps-users@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
>>>>> College of Science & Technology, Temple University, Philadelphia PA,
>>>>> USA
>>>>> International Centre for Theoretical Physics, Trieste. Italy.
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Check out the vibrant tech community on one of the world's most
>>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>>> _______________________________________________
>>>>> lammps-users mailing list
>>>>> lammps-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>>>>>
>>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> lammps-users mailing list
>>> lammps-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>>>
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> lammps-users mailing list
>> lammps-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>>
>