diff --git a/swig/run_lua_example.sh b/swig/run_lua_example.sh index beaa32cc2e..4dc7bad2f8 100755 --- a/swig/run_lua_example.sh +++ b/swig/run_lua_example.sh @@ -6,7 +6,14 @@ require("lualammps") lmp = lualammps.lammps_open_no_mpi(0,nil,nil) ver = lualammps.lammps_version(lmp) +lualammps.lammps_command(lmp, "units real") +lualammps.lammps_command(lmp, "lattice fcc 2.5") +lualammps.lammps_command(lmp, "region box block -5 5 -5 5 -5 5") +lualammps.lammps_command(lmp, "create_box 1 box") +lualammps.lammps_command(lmp, "create_atoms 1 box") + print("LAMMPS version ", ver) +print("Number of created atoms: ", lualammps.lammps_get_natoms(lmp)) lualammps.lammps_close(lmp ) EOF diff --git a/swig/run_perl_example.sh b/swig/run_perl_example.sh index 2fb59fe885..2714bcba6f 100755 --- a/swig/run_perl_example.sh +++ b/swig/run_perl_example.sh @@ -6,7 +6,14 @@ use pllammps; \$lmp = pllammps::lammps_open_no_mpi(0,undef,undef); \$ver = pllammps::lammps_version(\$lmp); +pllammps::lammps_command(\$lmp, "units real"); +pllammps::lammps_command(\$lmp, "lattice fcc 2.5"); +pllammps::lammps_command(\$lmp, "region box block -5 5 -5 5 -5 5"); +pllammps::lammps_command(\$lmp, "create_box 1 box"); +pllammps::lammps_command(\$lmp, "create_atoms 1 box"); + print("LAMMPS version ",\$ver,"\n"); +print("Number of created atoms: ", pllammps::lammps_get_natoms(\$lmp), "\n"); pllammps::lammps_close(\$lmp) EOF diff --git a/swig/run_python_example.sh b/swig/run_python_example.sh index 7b2aefd5a5..a09f2f119e 100755 --- a/swig/run_python_example.sh +++ b/swig/run_python_example.sh @@ -5,8 +5,14 @@ from pylammps import * lmp = lammps_open_no_mpi(0,None,None) ver = lammps_version(lmp) +lammps_command(lmp, "units real") +lammps_command(lmp, "lattice fcc 2.5") +lammps_command(lmp, "region box block -5 5 -5 5 -5 5") +lammps_command(lmp, "create_box 1 box") +lammps_command(lmp, "create_atoms 1 box") print("LAMMPS version ",ver) +print("Number of created atoms: %g" % lammps_get_natoms(lmp)) lammps_close(lmp) EOF diff --git a/swig/run_tcl_example.sh b/swig/run_tcl_example.sh index a54bfa74f5..00ae2e7579 100755 --- a/swig/run_tcl_example.sh +++ b/swig/run_tcl_example.sh @@ -6,7 +6,14 @@ load ./tcllammps.so set lmp [lammps_open_no_mpi 0 NULL NULL ] set ver [lammps_version \$lmp] +lammps_command \$lmp "units real" +lammps_command \$lmp "lattice fcc 2.5" +lammps_command \$lmp "region box block -5 5 -5 5 -5 5" +lammps_command \$lmp "create_box 1 box" +lammps_command \$lmp "create_atoms 1 box" + puts "LAMMPS version \$ver" +puts [format "Number of created atoms: %g" [lammps_get_natoms \$lmp]] lammps_close \$lmp EOF