Dear Sir
I am trying to use log.py file for extracting log.lammps thermodynamic data.
in the command line, I am using below command
python log.py log.lammps > output.txt
I am getting error:
File “log.py”, line 79
raise StandardError,"no log file specified"
^
SyntaxError: invalid syntax
log.py (9.57 KB)
log.lammps (8.61 KB)
even I have tried log2txt.py file with same command (./log2txt.py log.lammps data.txt ) line and got the below error;
File “./log2txt.py”, line 19
raise StandardError, “Syntax: log2txt.py log.lammps data.txt X Y …”
^
SyntaxError: invalid syntax
log2txt.py (944 Bytes)
The correct syntax is
python log2txt,py log.lammps data.txt
where data.txt will be written as a text file with columns of data.
See the top of the log2txt.py file.
But you have another problem. Your log file starts each line of
thermo output with “ec”. No idea why, since the timestep comes
after that. Log.py will fail with a non-numeric error when it tries
to read that. That’s the error I get.
Steve
Please post to the mail list, not to me.
The error looks like one you might get if using Python 3.
I believe the Python scripts in tools/python are only
compatible with Python 2. No one has converted them
to work with both yet. So try Python 2 if you can.
Steve