|
From: Moore, S. <st...@sa...> - 2025-03-20 16:57:29
|
In LAMMPS there is the "is_file" variable (https://docs.lammps.org/variable.html) that checks if a file exists, then you can feed that into "fix halt". It seems like it would be trivial to add into SPARTA too. Let us know if that would be useful. Stan ________________________________ From: Moore, Stan <st...@sa...> Sent: Thursday, March 20, 2025 10:47 AM To: Ramakrishnan, Sekaripuram [US] (DS) (Contr) <Sek...@ng...>; spa...@li... <spa...@li...> Subject: Re: [EXTERNAL] [sparta-users] clean exit from a run Rama, I think I may have misunderstood your question, apologies if so. If you mean cleanly exit from the run EARLY, then you can use "fix halt" plus the "write_restart" command that I referred to in the previous email: https://sparta.github.io/doc/fix_halt.html It appears that fix halt is not easily found by looking in the docs (missing some references), I will fix that. In LAMMPS there is an option to check if a file exists and feed that into fix halt, we could add that into SPARTA. So if you want to stop the run, you create a file and then it does "write_restart" after the run command. Stan ________________________________ From: Moore, Stan <st...@sa...> Sent: Thursday, March 20, 2025 10:35 AM To: Ramakrishnan, Sekaripuram [US] (DS) (Contr) <Sek...@ng...>; spa...@li... <spa...@li...> Subject: Re: [EXTERNAL] [sparta-users] clean exit from a run Rama, This question is easily answered by looking in the docs, please look there first before posting on the mail list. Hint, it is not the "restart" command but related. Even more of a hint: go to https://sparta.github.io/doc/restart.html and look at the "Related commands" section at the bottom of the page 🙂 Stan ________________________________ From: Ramakrishnan, Sekaripuram [US] (DS) (Contr) <Sek...@ng...> Sent: Thursday, March 20, 2025 10:25 AM To: spa...@li... <spa...@li...> Subject: [EXTERNAL] [sparta-users] clean exit from a run Is there a way to cleanly exit from a run with restart file written at the end of the run? Rama |