10.3. Local Settings#

Note

The data set for this tutorial is now available as the molass_data package. This section is left as an alternative way when you locate the data set elsewhere.

10.3.1. Download Data for this Tutorial#

To run and follow this tutorial, download data from the following links:

You can use one or both of these. They are similar, but not the same. The former is from a real experiment on a few standard proteins, while the latter has been generated using simple, but not realistic, models.

The data sets you have downloaded will be referenced in the tutorial. You should unzip them and specify the unzipped folder locations in a Python script named local_settings.py, placed in one of the parent folders relative to the notebook you are running. Copy and modify the code block below to fit your environment.

LocalSettings = dict(
    TUTORIAL_DATA=r"D:\MolassData\tutorial_data",   # unzipped data folder
    SIMULATED_DATA=r"D:\MolassData\simulated_data", # unzipped data folder, optional
)

Save the script to any parent folder, for example as shown below:

    any_upper_folder/
        local_settings.py
        ...
        parent_folder/
            ...
            current_folder/
                working-notebook.ipynb

The get_local_settings() function introduced in the next section will search for this script, walking upward several levels from the current folder until it finds the filename and imports the settings dictionary you have specified.

You can check your local settings in the next section.

10.3.2. Local Settings Check#

To check your local settings, download this book using the button at the upper right corner and run the following cell.

from molass.Local import get_local_settings
local_settings = get_local_settings(debug=True)
TUTORIAL_DATA = local_settings['TUTORIAL_DATA']
SIMULATED_DATA = local_settings['SIMULATED_DATA']
print(TUTORIAL_DATA)
print(SIMULATED_DATA)
[0] C:\Users\takahashi\GitHub\molass-technical\chapters\local_settings.py
[1] C:\Users\takahashi\GitHub\molass-technical\local_settings.py
[2] C:\Users\takahashi\GitHub\local_settings.py
C:\Users\takahashi\MolassData\tutorial_data
C:\Users\takahashi\MolassData\simulated_data

Note

For this check, you only need to run the single cell above. Other cells (markdown text) are not relevant.

If the folder locations are printed as expected, you are ready to continue.