Running the program =================== Running with default configurations can be achieved by running the below in a terminal:: mango This will run the program with the default values shown in the input file. See further examples in :ref:`examples`. If not specified, the positions of the molecules will be the stable Leonard Jones configuration downloaded from http://doye.chem.ox.ac.uk/jon/structures/LJ/ Other commandline functions include: MPI calculation command:: mango_mpi Running the mango test suite:: mango_test Restart and input file regenerators:: mango_inputregen mango_restartregen The rest have their own help with ``-h``:: mango_plotsuscep mango_strings mango_vars mango_vis Jupyter Notebook or Module use ------------------------------ There are currently two functions designed for use as a module import or as part of a `jupyter notebook `_ and they are:: mango.run() mango.help() Run takes a dictionary as input with the keys and values the same as the input file. To run a simple simulation a python script would be; .. code-block:: python3 import mango mango.run({'SusceptibilityCalc': True, 'Iterations': 100000, 'Repetitions': 1, 'NumberParticles': 5, 'PositionFile': './Position_file'}) Help prints the help shown below. Running with an Input or Restarting ----------------------------------- To use an input file:: -I Inputfile To restart a run, specify the restart file as shown:: -R Run1restart Saving Mechanism ---------------- Saving happens in two stages when running the main calculation as shown below. This reduces the amount of I/O to disk. There are a two commands to deal with the saving. These are SkipSave (--skip) and SaveChunk (--savechunk). SkipSave deals with the number of iterations that are saved to memory and SaveChunk is the number of saved iterations to be collected before writing to disk. .. figure:: _static/SavingMechanism.svg :target: _static/SavingMechanism.svg :width: 75 % Errors ------ Errors are split into 2 categories, warning and critical. The program will still run under warnings but it will kill itself under critical errors. Warning messages will be written like so:: Warning: maximum number of iterations exceeded! [MD step 1] x10 The above message tells us that the error has happened 10 times on the first MD step. Internal Help ------------- To print the help from the commandline use the command ``mango -h``, to print the input file help from the commandline use ``mango -ifh`` or call ``mango.help()`` from an interactive prompt. For the full input file see :ref:`inputfile`. The commandline help is shown below. .. program-output:: python3 helpout.py