diff --git a/python/examples/in.simple b/python/examples/in.simple index 5f6ebdc4f2..3dc80bdfea 100644 --- a/python/examples/in.simple +++ b/python/examples/in.simple @@ -20,4 +20,6 @@ neigh_modify delay 0 every 20 check no fix 1 all nve +variable fx atom fx + run 10 diff --git a/python/examples/simple.py b/python/examples/simple.py index 5a6157f87c..168ec94aa9 100755 --- a/python/examples/simple.py +++ b/python/examples/simple.py @@ -45,6 +45,12 @@ x[0] += epsilon lmp.scatter_atoms("x",1,3,x) lmp.command("run 1"); +f = lmp.extract_atom("f",3) +print "Force on 1 atom via extract_atom: ",f[0][0] + +fx = lmp.extract_variable("fx","all",1) +print "Force on 1 atom via extract_variable:",fx[0] + # uncomment if running in parallel via Pypar #print "Proc %d out of %d procs has" % (me,nprocs), lmp #pypar.finalize()