When a string is “generated” from an embedded python function, it is truncated after its 64th character.
Here’s a MWE:
variable lmpstr python testPy
python testPy return v_lmpstr format s here “”"
def testPy():
pystr=“this is a very very very very extra long and even way longer string”
print “python: s" pystr
return pystr
“””
print “lammps: ${lmpstr}”
resulting in:
python: this is a very very very very extra long and even way longer string
lammps: this is a very very very very extra long and even way longer st
LAMMPS version: 17 Nov 2016, built with mpi
Python version: 2.7
Note: Actually, the string I need is a series of 50 pairs of bin/fraction, computed from a near-gaussian distribution. It is meant to be used as the “diam poly” argument in a “fix pour” command. e.g.:
fix ins all pour 3000 1 300719 vol 0.1 50 region slab diam poly 50 ${distr}
As a result, its length is typically larger than 1000.
Any advice/workaround would be appreciated.
Thank you.