LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] pylammps thermo_style issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] pylammps thermo_style issue


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Thu, 19 Oct 2017 01:12:04 -0400

On Tue, Oct 17, 2017 at 12:56 AM, Gideon Simpson
<gideon.simpson@...24...> wrote:
> I’ve been trying my hand at rewriting some examples using PyLammps, and I
> have the following difficulty with my rewrite of USER/DIFFUSE/in.msd.2d
> which makes an estimate of the mean square displacement.  The following is
> giving me trouble

PyLammps is quite new and not complete. Thus issues like this one are
to be expected.
if you want to help improving it, please file an issue on github at:
https://github.com/lammps/lammps/issues
including the information to reproduce it, that you are listing here.
issues reported to the mailing list sometimes are overlooked or
forgotten.

thanks,
     axel.

>
> If I use the lines
>
> L.compute("msd", "all", "msd", "com", "yes")
> L.variable("msd", "equal", "c_msd[4]")
> L.thermo_style("custom","step", "v_msd")
>
> It works as expected, but
>
> L.compute("msd", "all", "msd", "com", "yes")
> L.thermo_style("custom","step", “c_msd[4]")
>
> generates the error
>
> Traceback (most recent call last):
>   File "msd2d.py", line 51, in <module>
>     L.run(10000)
>   File "/opt/lammps/python/lammps.py", line 689, in run
>     self.runs += get_thermo_data(output)
>   File "/opt/lammps/python/lammps.py", line 633, in get_thermo_data
>     thermo_data = namedtuple('ThermoData',
> list(current_run.keys()))(*list(current_run.values()))
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/collections.py",
> line 351, in namedtuple
>     'alphanumeric characters and underscores: %r' % name)
> ValueError: Type names and field names can only contain alphanumeric
> characters and underscores: 'c_msd[4]'
>
>
>
> -gideon
>
>
> ------------------------------------------------------------------------------
> 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.