jump file label
jump newfile jump in.run2 runloop
This command closes the current input script file, opens the file with the specified name, and begins reading ChemCell commands from that file. The original file is not returned to, although by using multiple jump commands it is possible to chain from file to file or back to the original file.
Optionally, if a 2nd argument is used, it is treated as a label and the new file is scanned (without executing commands) until the label is found, and commands are executed from that point forward. This can be used to loop over a portion of the input script, as in this example. These commands perform 10 runs, each of 10000 steps, and create 10 dump files named file.1, file.2, etc. The next command is used to exit the loop after 10 iterations. When the "a" variable has been incremented for the tenth time, it will cause the next jump command to be skipped.
variable a loop 10 label loop dump 1 all atom 100 file.$a run 10000 undump 1 next a jump in.lj loop
If the jump file argument is a variable, the jump command can be used to cause different processor partitions to run different input scripts. In this example, ChemCell is run on 40 processors, with 4 partitions of 10 procs each. An in.file containing the example variable and jump command will cause each partition to run a different simulation.
mpirun -np 40 ccell_ibm -partition 4x10 -in in.file
variable f world script.1 script.2 script.3 script.4 jump $f
If you jump to a file and it does not contain the specified label, ChemCell will come to the end of the file and exit.
variable, include, label, next