Questions about calling python from lammps

Dear all,

I have a python script that could deal with the data of the output file from lammps. I want to add a command in lammps input file so that can call python directly.I try to follow the manual but failed. I add a command \

“python !!plotxy_model2.py invoke”

and the result is

“LAMMPS is not built with Python embedded (…/variable.cpp:684)”

Could you tell me how to solve this problem?

Thanks!

Sincerely,

Dear all,

  I have a python script that could deal with the data of the output file
from lammps. I want to add a command in lammps input file so that can call
python directly.I try to follow the manual but failed. I add a command \

"python !!plotxy_model2.py invoke"

and the result is

"LAMMPS is not built with Python embedded (../variable.cpp:684)"

Could you tell me how to solve this problem?

​for starters, you should read the documentation more thoroughly and
carefully.
you cannot use a python style variable without compiling LAMMPS with the
PYTHON package installed.
and it doesn't look like you are using it correctly in the first place.

but if it is only about running a python script that doesn't use any input
from LAMMPS internal data, a python variable would be overkill and you can
simply use the "shell" command instead.

axel.