This is a brief note for anybody using BioPhysCode to perform simulation analysis.

The omnicalc documentation is currently out of date. Many apologies! The header to this documentation instructs the users to set up paths in a file called paths.yaml. This has been deprecated in favor of a simpler, python script called config.py.

We encourage any users who wish to perform simulation analysis to use the entire factory code. To get started, clone it and run make help. Documentation for the factory and associated testsets is forthcoming and will be linked here when it’s ready.

Running a standalone instance of omnicalc

The factory prepares an omnicalc instance for a set of projects. It sets up the analysis according to a “connection file”. Users who wish to use omnicalc as a standalone product should have a python distribution with all of the necessary analysis libraries loaded. They should also set up a config.py in their omnicalc folder which looks like the following (pretty printed example).

#!/usr/bin/env python -B
{'activate_env': '/home/rpb/factory/env/envs/py2/bin/activate py2',
 'calculations_repo': 'http://github.com/bradleyrp/omni-single',
 'commands': ['omni/config.py', 'omni/cli.py', 'omni/docs/docs.py'],
 'commands_aliases': [('set', 'set_config')],
 'meta_filter': ['specs_banana.yaml'],
 'mpl_agg': True,
 'post_data_spot': '/home/rpb/analyze-project-banana-post/',
 'post_plot_spot': '/home/rpb/analyze-project-banana-plot/',
 'spots': {'sims': {'namer': 'lambda name,spot: name',
                    'regexes': {'part': {'edr': 'md\\.part([0-9]{4})\\.edr',
                                         'structure': '(system|system-input|structure)\\.(gro|pdb)',
                                         'tpr': 'md\\.part([0-9]{4})\\.tpr',
                                         'trr': 'md\\.part([0-9]{4})\\.trr',
                                         'xtc': 'md\\.part([0-9]{4})\\.xtc'},
                                'step': '([stuv])([0-9]+)-([^\\/]+)',
                                'top': '(.+)'},
                    'route_to_data': '/home/rpb',
                    'spot_directory': 'dataset-project-banana'}}}

This config file was automatically generated from the following, more readable factory connection file.

banana:
  notes: |
    The name of this dictionary is the project_name. Do not use spaces.
    Note that the project name replaces PROJECT_NAME in the paths below.
    If a folder is missing, it will be created.
  # location of the omnicalc instance
  calc: calc/PROJECT_NAME
  # sets the omnicalc "meta_filter" variable to use only these files in calcs/specs
  calc_meta_filters: ['banana.yaml']
  # this repo is cloned to the calcs folder in omnicalc
  repo: http://github.com/bradleyrp/omni-single
  # path to post-processing data and pre-sliced data for import
  post_spot: /home/rpb/analyze-project-banana-post
  # path to store the plots
  plot_spot: /home/rpb/analyze-project-banana-plot
  # Django infrastructure locations
  site: site/PROJECT_NAME  
  database: data/PROJECT_NAME/db.factory.sqlite3
  # where to make new simulations with the factory interface (if desired)
  simulation_spot: data/PROJECT_NAME/sims
  # the "spots" tells omnicalc how to import AUTOMACS-style simulations
  # note that all other imports should come from prepared slices in the post folder
  spots:
    # each import is a named "spot" in omnicalc (the default is "sims")
    # when requesting a simulation name, omnicalc infers the spot name, thereby merging datasets
    # note that different spots cannot have redundant simulation names
    sims:
      # the namer changes the simulation name for readability in the post folder
      # the default namer just returns the simulation name
      namer: "lambda name,spot: name"
      # parent directory for spot_directory (useful for changing mounts)
      route_to_data: /home/rpb/
      # folder that holds the AUTOMACS simulations (child of route_to_data)
      spot_directory: dataset-project-banana
      # identify simulations with regular expressions
      regexes:
        # regex pattern for valid simulations. the default is "(.+)" which accepts all folder names
        top: '(.+)'
        # regex pattern for step folders within each simulation
        step: '([stuv])([0-9]+)-([^\/]+)'
        # regex patterns for different types of files, each of which is parsed by omnicalc
        part: 
          xtc: 'md\.part([0-9]{4})\.xtc'
          trr: 'md\.part([0-9]{4})\.trr'
          edr: 'md\.part([0-9]{4})\.edr'
          tpr: 'md\.part([0-9]{4})\.tpr'
          # most calculations require a struture file named here
          structure: '(system|system-input|structure)\.(gro|pdb)'

Stay tuned for instructions for using the above connection file in a factory.