Hi,
I am new to using python and not able to find solution for my problem. I want to use one of lammps post-processing python scripts “neb_combine.py”. But this is the error I run into
[agoyal@…4594… TEST]$ ./neb_combine.py -o output -r dump.neb.*
Traceback (most recent call last):
File “./neb_combine.py”, line 13, in ?
path = os.environ[“LAMMPS_PYTHON_TOOLS”]
File “/usr/lib64/python2.4/UserDict.py”, line 17, in getitem
def getitem(self, key): return self.data[key]
KeyError: ‘LAMMPS_PYTHON_TOOLS’
Possibly it is about setting the right path in the python script to access files in /lammps/tools/python/pizza.
- if I set it to
Path = os.environ["/home/agoyal/MD/LAMMPS/lammps-16Aug13/tools/python/pizza"] which is the right path for /pizza on my machine. I still get the error.
-
Or, even if I copy files from /pizza to present working directory. It doesn’t work.
-
If I set LAMMPS_PYTHON_TOOLS=/home/agoyal/MD/LAMMPS/lammps-16Aug13/tools/python
In my ./bashrc and then run “neb_combine.py” it gives
ImportError: No module named dump
So do I need to install install.py or install some modules to use python Or may be I am doing something fundamentally wrong.
Please advise.
Thanks in Advance,
Anuj
Hi,
I am new to using python and not able to find solution for my problem. I
want to use one of lammps post-processing python scripts "neb_combine.py".
But this is the error I run into
[[email protected]... TEST]$ ./neb_combine.py -o output -r dump.neb.*
Traceback (most recent call last):
File "./neb_combine.py", line 13, in ?
path = os.environ["LAMMPS_PYTHON_TOOLS"]
File "/usr/lib64/python2.4/UserDict.py", line 17, in __getitem__
def __getitem__(self, key): return self.data[key]
KeyError: 'LAMMPS_PYTHON_TOOLS'
Possibly it is about setting the right path in the python script to access
files in /lammps/tools/python/pizza.
1. if I set it to
Path =
os.environ["/home/agoyal/MD/LAMMPS/lammps-16Aug13/tools/python/pizza"] which
is the right path for /pizza on my machine. I still get the error.
this is complete nonsense. this part of the code is to query an
environment variable not the path directly.
2. Or, even if I copy files from /pizza to present working directory. It
doesn't work.
3. If I set
LAMMPS_PYTHON_TOOLS=/home/agoyal/MD/LAMMPS/lammps-16Aug13/tools/python
In my ./bashrc and then run "neb_combine.py" it gives
ImportError: No module named dump
of course you get this error message, because this is not correct.
So do I need to install install.py or install some modules to use python Or
may be I am doing something fundamentally wrong.
all you need to do is read the README file (there is a reason it has
this name) in the tools/python directory. it explains how you should
use the scripts and provide access to the python support modules.
plain and simple.
axel.
Sorry, but I did go through README.
It works now. As I downloaded pizza toolkit from LAMMPS site and setenv in
my bash file as
Export
LAMMPS_PYTHON_TOOLS=/home/agoyal/MD/LAMMPS/lammps-16Aug13/pizza-11Sep13/src
Thanks,
Anuj
Sorry, but I did go through README.
but you didn't pay attention
It works now. As I downloaded pizza toolkit from LAMMPS site and setenv in
this is not necessary. the distribution of files shipped with LAMMPS
is sufficient, but you *HAVE* to use the correct path, and you
obviously didn't.
axel.