Another beginner question:
I'd like to output the total number of atoms per timestep. This can already be in the thermo_style output so can be extracted from the log file by editing out all the other compute comments and warnings, but this is a little tedious.
Is there a way to either suppress the comments during the solve or write out the thermo_style output to a separate file? Or perhaps put the atoms # into the dump file?
thanks.
richti83 | Thu, 12/13/2012 - 09:19
Hi,
Hi,
you did not tell us where you need the number of atoms, but if you are using Paraview for Postprozessing you can acces this information in a python-programmable-filter with
COUNT=input.GetNumberOfPoints()
Here is a usefull skript:
node/706
ahobbs | Thu, 12/13/2012 - 13:15
Thanks, I can post-process
Thanks, I can post-process the information, but that is an extra step. All I want is an quick way of plotting the # atoms vs time at the end of the simulation to judge if steady state has been achieved. Since the information is in thermo output it seems like there should be a way either to write this specific data to a separate log file or suppress the solver comments so only the thermo_style is reported to the log.liggghts.
sbateman | Thu, 12/13/2012 - 18:16
There are some scripts in LPP
There are some scripts in LPP/pizza.py which can parse log files to extract thermo output.
node/15
richti83 | Thu, 12/13/2012 - 20:28
This is easy
You can access every thermo style via a variable and output this via fix print
quick & dirty in 1 minute:
thermo_style custom step atoms ke cpu cu tpcpu spcpu
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
variable t equal step*dt
variable a equal atoms
fix screen all print 1 "$t,$a"
fix file all print 1 "$t,$a" file atoms_per_time.csv title "time,atoms"
ahobbs | Thu, 12/13/2012 - 20:53
Thanks, guys. Just what I
Thanks, guys. Just what I needed.