Skip to content

Usage fundamentals

mkadlof edited this page Nov 3, 2020 · 1 revision

Usage

To run your simulation you need to provide multiple parameters. Most of them are specified using the config.ini file. But for some applications this is impractical. Imagine you want to run multiple simulations with the same parameters but with different initial structures. Creating multiple config files that differ only in the path to the file is impractical. Therefore, in addition to the configuration file, parameters can be passed from the command line. This way, you can have one config file and run multiple simulations in a bash loop iterating over filenames.

The parameters have their default values. These are overwritten with those in config file, and these in turn can be overwritten from the command line.

For example:

./run.py -c config.ini --initial_structure_path my_file.pdb

In the above example -c option indicates the config file, and --initial_structure_path parameter override. Every single parametr (except -c which is special) have both versions: for config file, and for command line. Parameter names are written uppercase in config file and lower case as command-line options. All of them (including type, help text, and default values) are listed in the file: args_definition.py file in the list args.

Automatically generated config file

After you create your very own config file, and try to run your simulation, in the working dir there will be created another config file named: config_auto.ini This file contain all of your explicitly indicated parameters and also all others with default values. There will be also help texts in comments. Running your simulation with both file is equivalent. You may use both. Exploring config_auto.ini may be helpful if you want to get familiar with parameters or in case of debugging unstable simulations.

Your very first simulation

In the repository there is example config file for the very first simulation. This good point to start. Probably you want to run this simulation just to check if everything is working. After you finish setup then simply type:

./run.py -c config.ini

After about half of a minute your simulation should be finished and en the end you should see message:

Everything is done

The results will be saved in example_data/example_result directory. You can always look into your config file and check if you forgot.

WARNING: md_soft will overwrite your result without notice if you run it several times!

If everything seem work fine then congratulation! Now you are redy to start modifying your config file tu run your own simulations!

Clone this wiki locally