LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] error when running python script to call lammps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] error when running python script to call lammps

From: Steve Plimpton <sjplimp@...24...>
Date: Tue, 19 Sep 2017 08:45:32 -0600

I have no idea why piping the output to script.output would
fail with that kind of error.  Maybe Richard (CCd) has an idea.


On Mon, Sep 18, 2017 at 11:38 PM, Shenli Zhang <shlzhang@...584...> wrote:
Dear Lammps users,

I've wrote a python script (attached) to call Lammps and do some analysis. However, I found the script runs fine if I directly use:

but will generate the following error if I use:

Error message:

File "", line 55, in <module>
    extract_y(12, 40.129, 64.129, 92.258, 2)
  File "", line 21, in extract_y
  File "/share/apps/lammps-11Aug17/python/", line 643, in atoms
    return AtomList(self)
  File "/share/apps/lammps-11Aug17/python/", line 465, in __init__
    self.natoms = self.lmp.system.natoms
  File "/share/apps/lammps-11Aug17/python/", line 648, in system
    d = self._parse_info_system(output)
  File "/share/apps/lammps-11Aug17/python/", line 699, in _parse_info_system
    lines = output[6:-2]
TypeError: 'NoneType' object has no attribute '__getitem__'

Could you please help with this problem? Thank you!
Shenli Zhang

Graduate Student of Materials Science
University of California, Davis

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list