|From:||Axel Kohlmeyer <akohlmey@...24...>|
|Date:||Wed, 18 Oct 2017 14:09:14 -0400|
In a project I am trying to run lammps from python and between each simulation step I would like to do some analysis.In a loop:lmp=lammps()for i in range(10000):lmp.command(“ run 1”)analysis_function ( lmp)Assuming that analysis function wont take much time is it a good approach? Is there any overhead running lammps step by step?
I tested this for a very small system:lmp.command(“ run 10000)vsfor i in range(10000):lmp.command(“run 1”)Time spent for the latter case was three times of the first one.To be more specific I would like to compare bonding information at each step to detect chemical reactions. If there is a way to access fix reax/bond data through lammps during the simulationI could save it to a different variable and analyze it after the md simulation.
Thanks for your time.