From d24f74b582408a308bc0fd37fda06e175239b1d8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 2 Apr 2021 12:31:46 -0400 Subject: [PATCH] add stop on file example to fix halt docs --- doc/src/fix_halt.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/src/fix_halt.rst b/doc/src/fix_halt.rst index 964132518d..06f068bb7d 100644 --- a/doc/src/fix_halt.rst +++ b/doc/src/fix_halt.rst @@ -115,6 +115,18 @@ The version with "bondmax" will just run somewhat faster, due to less overhead in computing bond lengths and not storing them in a separate compute. +A variable can be used to implement a large variety of conditions, +including to stop when a specific file exists. Example: + +.. code-block:: LAMMPS + + variable exit equal is_file(EXIT) + fix 10 all halt 100 v_exit != 0 error soft + +Will stop the current run command when a file ``EXIT`` is created +in the current working directory. The condition can be cleared +by removing the file through the :doc:`shell ` command. + The choice of operators listed above are the usual comparison operators. The XOR operation (exclusive or) is also included as "\|\^". In this context, XOR means that if either the attribute or avalue is