Skip to content

Automatic session saving

Many aspects of application state are automatically saved to a preferences file when changed. This file is created on demand in the same directory as the Molchanica executable, and is called molchanica_prefs.mca. This includes, for example, UI settings, and which molecules were opened. This file is in a binary format, and grows with the number of molecules you've opened, as it stores per-molecule settings. Deleting it is harmless, other than resetting these conveniences.

For an example of how this works, let's say you open the application for the first time. You change the View/Select level to Residue, and open a protein and small molecule. If you close the application and re-open it, these molecules will automatically re-open, and the View/Select level will be as you last set it. Here is a sample of state saved:

  • Open molecules
  • A list of recently-opened files (molecules, electron density, MD trajectories, force field parameters)
  • Camera scenes and position
  • View and filter settings
  • MD parameters. (Integrator, number of steps, dt, temperature, pressure, etc)
  • Graphics and input settings

Where Molchanica keeps its data

Molchanica keeps everything it writes in one folder: the one its executable is in. Nothing is installed system-wide, and nothing is scattered across the OS's various per-user data locations — an install can be found, backed up, moved, or deleted in a single place.

<install folder>/
    molchanica[.exe]         the program itself
    cufft64_12.dll           the cuFFT library, if your download shipped with it
    gemmi/                   Gemmi, if your download shipped with it
    molchanica_prefs.mca     preferences and per-molecule settings
    managed_molecules/       molecules downloaded or generated in the app
    gpu_cache/               the graphics pipeline cache
    process_executables/     optional third-party tools installed from the Tools panel
        python_envs/<tool>   one isolated Python or Conda environment per Python-backed tool
    datasets/                PDBbind and similar, when used

The About window has an Open data folder button that shows this folder in your file browser, and displays its path. (The Tools panel has the equivalent button for process_executables/.)

Where that folder is, per platform:

Platform Installed with Folder
Windows setup_molchanica.ps1 C:\Users\<you>\AppData\Local\Programs\Molchanica
Linux setup_molchanica.sh ~/molchanica
Any No setup script — run the binary in place Wherever you unzipped or built it

Both setup scripts deliberately install somewhere you can write without administrator or root rights, which is what makes this possible. On Windows that means %LOCALAPPDATA%\Programs rather than Program Files; on Linux it means your home directory rather than /usr/local/bin.

If you'd rather keep this data elsewhere — the tool installs under process_executables/ can run to several GB — set the MOLCHANICA_DATA_DIR environment variable to a folder of your choice, and Molchanica uses that instead. If the executable's own folder can't be written to, which happens when the program is installed somewhere like Program Files or /usr/bin, Molchanica falls back to the OS's per-user data directory. Earlier versions kept tools and datasets there always; they're moved into the data folder on the first launch after upgrading. See the third-party tools section for details on that move.

managed_molecules/ holds durable source files for molecules that didn't come from your disk: RCSB, PubChem, DrugBank, ChEBI, and Amber Geostd downloads, molecules built from SMILES, and generated structures. Keeping them as real files on disk is what lets them be restored on the next launch the same way a file you opened is.

Compatibility with future Molchanica versions

The .mca file which stores state may be incompatible with future versions of the application. If this occurs, the application will launch with its default settings, and no opened molecules.