LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Questions about calling python from lammps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Questions about calling python from lammps


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Sun, 19 Nov 2017 08:58:05 -0500



On Sun, Nov 19, 2017 at 7:30 AM, Xuechen Zheng <xuechen_zheng@...730...> wrote:


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.
 

 Thanks! 


Sincerely,


Xuechen Zheng

Department of Chemistry

Zhejiang University

------------------------------------------------------------------------------
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@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...12...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.