Help about Initial Structure optimization and Selection (LixMn2O4 MD Simulation)

Hello Lammps Users,

Did anybody manage to find the solution for the this thread? for automatic solution to run simulations for LixMn2O4.

I suggest you use any programming language you are comfortable
with and write a small program that generates the 700,000 LAMMPS input
files and runs them, one at a time, and renames the produced log.lammps
file to log.N, where N runs from 1 to 700,000.

Then you can post-process the log files however you wish, e.g. with another
small program.

Python is ideal for this. You don’t need the Python interface to LAMMPS,
just Python. But if you know Matlab better, I imagine you
can do it in Matlab as well.

In Python it would be as simple as something like this:

for i in xrange(700000):
infile = "in.d" i
fp = open(infile,“w”)

… code to write an input script into infile

cmd = "lmp_g++ < s" infile
out = commands.getoutput(cmd)
os.rename(“log.lammps”,infile)

Steve

The answer to the previous Q was you can drive LAMMPS with a shell script
or Python, or Matlab (assuming Matlan can launch shell commands). But
it was suggesting the previous user has to do the work to write
the scripts. I don’t see that you are asking a new Q ?

Steve