Skip to content

configuration.m

Calvin Eiber edited this page Jun 30, 2021 · 1 revision

open "+tools/configuration.json" and look for an entry matching this computer name, username, and machine type. If called by itself, returns a structure containing the configuration entries for this machine. If a specific configuration field is requested (e.g. tools.configuration('eidors'), return the requested entry as a string.

tools.configuration stores this information in a persistent variable and only loads from disk as needed. This may cause the first call to tools.configuration (and tools.file) to take a little while. If you have edited the configuration file, you will need to call tools.configuration('refresh'). Calling tools.configuration('make-new-file', config) erases the current configuration file and replaces it with the data in config, and calling tools.configuration('open') opens the config file in MATLAB's text editor. tools.configuration('noload') returns only your machine information without loading the json file.

tools.configuration is part of package +tools

{
    "name": "my-wonderful-desktop",
    "user": "Calvin",
    "machine": "win64",
    "cache": "pn-mdl-%d/",
    "gmsh": "C:/Program Files/GMSH 4.8.3/gmsh.exe",
    "neuron": "C:/nrn/bin/nrniv.exe",
    "eidors": "C:/Users/Calvin/Documents/MATLAB/EIDORS/"
} 

Operational notes

If you see Warning: Adding configuration file entry for name="...", user="...", machine="..." it's likely that the config file got erased or otherwise modified (e.g. due to a git pull). If you know the path to gmsh, neuron, and eidors on your system you can attempt to repair it manually.

See also install_ViNERS.m

Clone this wiki locally