Full Code of choderalab/pymbar for AI

main ed40ec3bbef0 cached
399 files
28.1 MB
7.4M tokens
234 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (29,552K chars total). Download the full file to get everything.
Repository: choderalab/pymbar
Branch: main
Commit: ed40ec3bbef0
Files: 399
Total size: 28.1 MB

Directory structure:
gitextract_b_fel8s7/

├── .codecov.yml
├── .gitattributes
├── .github/
│   └── workflows/
│       └── CI.yaml
├── .gitignore
├── .pylintrc
├── .readthedocs.yml
├── LICENSE
├── README.md
├── appveyor.yml
├── devtools/
│   ├── README.md
│   ├── appveyor/
│   │   ├── install.ps1
│   │   └── run_with_env.cmd
│   ├── conda-envs/
│   │   ├── test_env.yaml
│   │   └── test_env_jax.yaml
│   ├── conda-recipe/
│   │   ├── README.md
│   │   ├── bld.bat
│   │   ├── build.sh
│   │   └── meta.yaml
│   └── travis-ci/
│       ├── after_success.sh
│       ├── index.html
│       ├── install.sh
│       └── push-docs-to-s3.py
├── docs/
│   ├── Makefile
│   ├── conf.py
│   ├── fes_with_pymbar.rst
│   ├── getting_started.rst
│   ├── index.rst
│   ├── mbar.rst
│   ├── moving_from_pymbar3.rst
│   ├── other_estimators.rst
│   ├── references.bib
│   ├── strategies_for_solution.rst
│   ├── timeseries.rst
│   ├── utils.rst
│   └── zbibliography.rst
├── examples/
│   ├── README.md
│   ├── alchemical-free-energy/
│   │   └── README.md
│   ├── constant-force-optical-trap/
│   │   ├── README.md
│   │   ├── extract-data.py
│   │   ├── force-bias-optical-trap.py
│   │   ├── original-data/
│   │   │   └── 20R55_4T_data.xls.bz2
│   │   ├── output/
│   │   │   ├── counts-expected-0.out
│   │   │   ├── counts-expected-1.out
│   │   │   ├── counts-expected-10.out
│   │   │   ├── counts-expected-11.out
│   │   │   ├── counts-expected-12.out
│   │   │   ├── counts-expected-13.out
│   │   │   ├── counts-expected-14.out
│   │   │   ├── counts-expected-15.out
│   │   │   ├── counts-expected-2.out
│   │   │   ├── counts-expected-3.out
│   │   │   ├── counts-expected-4.out
│   │   │   ├── counts-expected-5.out
│   │   │   ├── counts-expected-6.out
│   │   │   ├── counts-expected-7.out
│   │   │   ├── counts-expected-8.out
│   │   │   ├── counts-expected-9.out
│   │   │   ├── counts-observed-0.out
│   │   │   ├── counts-observed-1.out
│   │   │   ├── counts-observed-10.out
│   │   │   ├── counts-observed-11.out
│   │   │   ├── counts-observed-12.out
│   │   │   ├── counts-observed-13.out
│   │   │   ├── counts-observed-14.out
│   │   │   ├── counts-observed-15.out
│   │   │   ├── counts-observed-2.out
│   │   │   ├── counts-observed-3.out
│   │   │   ├── counts-observed-4.out
│   │   │   ├── counts-observed-5.out
│   │   │   ├── counts-observed-6.out
│   │   │   ├── counts-observed-7.out
│   │   │   ├── counts-observed-8.out
│   │   │   ├── counts-observed-9.out
│   │   │   ├── pmf-expected-0.out
│   │   │   ├── pmf-expected-1.out
│   │   │   ├── pmf-expected-10.out
│   │   │   ├── pmf-expected-11.out
│   │   │   ├── pmf-expected-12.out
│   │   │   ├── pmf-expected-13.out
│   │   │   ├── pmf-expected-14.out
│   │   │   ├── pmf-expected-15.out
│   │   │   ├── pmf-expected-2.out
│   │   │   ├── pmf-expected-3.out
│   │   │   ├── pmf-expected-4.out
│   │   │   ├── pmf-expected-5.out
│   │   │   ├── pmf-expected-6.out
│   │   │   ├── pmf-expected-7.out
│   │   │   ├── pmf-expected-8.out
│   │   │   ├── pmf-expected-9.out
│   │   │   ├── pmf-observed-0.out
│   │   │   ├── pmf-observed-1.out
│   │   │   ├── pmf-observed-10.out
│   │   │   ├── pmf-observed-11.out
│   │   │   ├── pmf-observed-12.out
│   │   │   ├── pmf-observed-13.out
│   │   │   ├── pmf-observed-14.out
│   │   │   ├── pmf-observed-15.out
│   │   │   ├── pmf-observed-2.out
│   │   │   ├── pmf-observed-3.out
│   │   │   ├── pmf-observed-4.out
│   │   │   ├── pmf-observed-5.out
│   │   │   ├── pmf-observed-6.out
│   │   │   ├── pmf-observed-7.out
│   │   │   ├── pmf-observed-8.out
│   │   │   ├── pmf-observed-9.out
│   │   │   └── pmf-unbiased.out
│   │   └── processed-data/
│   │       ├── 20R55_4T.forces
│   │       └── 20R55_4T.trajectories
│   ├── harmonic-oscillators/
│   │   ├── README.md
│   │   ├── harmonic-oscillators-distributions.py
│   │   ├── harmonic-oscillators-distributions.py_output.txt
│   │   ├── harmonic-oscillators.py
│   │   └── harmonic-oscillators.py_output.txt
│   ├── heat-capacity/
│   │   ├── README.md
│   │   ├── energydata/
│   │   │   ├── TEMP0/
│   │   │   │   ├── ener_box0.output
│   │   │   │   └── simul0.output
│   │   │   ├── TEMP1/
│   │   │   │   ├── ener_box1.output
│   │   │   │   └── simul1.output
│   │   │   ├── TEMP10/
│   │   │   │   ├── ener_box10.output
│   │   │   │   └── simul10.output
│   │   │   ├── TEMP11/
│   │   │   │   ├── ener_box11.output
│   │   │   │   └── simul11.output
│   │   │   ├── TEMP12/
│   │   │   │   ├── ener_box12.output
│   │   │   │   └── simul12.output
│   │   │   ├── TEMP13/
│   │   │   │   ├── ener_box13.output
│   │   │   │   └── simul13.output
│   │   │   ├── TEMP14/
│   │   │   │   ├── ener_box14.output
│   │   │   │   └── simul14.output
│   │   │   ├── TEMP15/
│   │   │   │   ├── ener_box15.output
│   │   │   │   └── simul15.output
│   │   │   ├── TEMP2/
│   │   │   │   ├── ener_box2.output
│   │   │   │   └── simul2.output
│   │   │   ├── TEMP3/
│   │   │   │   ├── ener_box3.output
│   │   │   │   └── simul3.output
│   │   │   ├── TEMP4/
│   │   │   │   ├── ener_box4.output
│   │   │   │   └── simul4.output
│   │   │   ├── TEMP5/
│   │   │   │   ├── ener_box5.output
│   │   │   │   └── simul5.output
│   │   │   ├── TEMP6/
│   │   │   │   ├── ener_box6.output
│   │   │   │   └── simul6.output
│   │   │   ├── TEMP7/
│   │   │   │   ├── ener_box7.output
│   │   │   │   └── simul7.output
│   │   │   ├── TEMP8/
│   │   │   │   ├── ener_box8.output
│   │   │   │   └── simul8.output
│   │   │   └── TEMP9/
│   │   │       ├── ener_box9.output
│   │   │       └── simul9.output
│   │   ├── heat-capacity.py
│   │   ├── heat-capacity.py.sample_out_bootstrap
│   │   └── heat-capacity.py.sample_out_no_bootstrap
│   ├── parallel-tempering-2dfes/
│   │   ├── README.md
│   │   ├── data/
│   │   │   ├── README.md
│   │   │   ├── backbone-torsions/
│   │   │   │   ├── 0.phi
│   │   │   │   ├── 0.psi
│   │   │   │   ├── 1.phi
│   │   │   │   ├── 1.psi
│   │   │   │   ├── 10.phi
│   │   │   │   ├── 10.psi
│   │   │   │   ├── 11.phi
│   │   │   │   ├── 11.psi
│   │   │   │   ├── 12.phi
│   │   │   │   ├── 12.psi
│   │   │   │   ├── 13.phi
│   │   │   │   ├── 13.psi
│   │   │   │   ├── 14.phi
│   │   │   │   ├── 14.psi
│   │   │   │   ├── 15.phi
│   │   │   │   ├── 15.psi
│   │   │   │   ├── 16.phi
│   │   │   │   ├── 16.psi
│   │   │   │   ├── 17.phi
│   │   │   │   ├── 17.psi
│   │   │   │   ├── 18.phi
│   │   │   │   ├── 18.psi
│   │   │   │   ├── 19.phi
│   │   │   │   ├── 19.psi
│   │   │   │   ├── 2.phi
│   │   │   │   ├── 2.psi
│   │   │   │   ├── 20.phi
│   │   │   │   ├── 20.psi
│   │   │   │   ├── 21.phi
│   │   │   │   ├── 21.psi
│   │   │   │   ├── 22.phi
│   │   │   │   ├── 22.psi
│   │   │   │   ├── 23.phi
│   │   │   │   ├── 23.psi
│   │   │   │   ├── 24.phi
│   │   │   │   ├── 24.psi
│   │   │   │   ├── 25.phi
│   │   │   │   ├── 25.psi
│   │   │   │   ├── 26.phi
│   │   │   │   ├── 26.psi
│   │   │   │   ├── 27.phi
│   │   │   │   ├── 27.psi
│   │   │   │   ├── 28.phi
│   │   │   │   ├── 28.psi
│   │   │   │   ├── 29.phi
│   │   │   │   ├── 29.psi
│   │   │   │   ├── 3.phi
│   │   │   │   ├── 3.psi
│   │   │   │   ├── 30.phi
│   │   │   │   ├── 30.psi
│   │   │   │   ├── 31.phi
│   │   │   │   ├── 31.psi
│   │   │   │   ├── 32.phi
│   │   │   │   ├── 32.psi
│   │   │   │   ├── 33.phi
│   │   │   │   ├── 33.psi
│   │   │   │   ├── 34.phi
│   │   │   │   ├── 34.psi
│   │   │   │   ├── 35.phi
│   │   │   │   ├── 35.psi
│   │   │   │   ├── 36.phi
│   │   │   │   ├── 36.psi
│   │   │   │   ├── 37.phi
│   │   │   │   ├── 37.psi
│   │   │   │   ├── 38.phi
│   │   │   │   ├── 38.psi
│   │   │   │   ├── 39.phi
│   │   │   │   ├── 39.psi
│   │   │   │   ├── 4.phi
│   │   │   │   ├── 4.psi
│   │   │   │   ├── 5.phi
│   │   │   │   ├── 5.psi
│   │   │   │   ├── 6.phi
│   │   │   │   ├── 6.psi
│   │   │   │   ├── 7.phi
│   │   │   │   ├── 7.psi
│   │   │   │   ├── 8.phi
│   │   │   │   ├── 8.psi
│   │   │   │   ├── 9.phi
│   │   │   │   └── 9.psi
│   │   │   ├── configurations/
│   │   │   │   ├── a1e.equil_all.pdb
│   │   │   │   └── a1e.solute-only.pdb
│   │   │   ├── end-to-end-distance/
│   │   │   │   ├── 0.dist
│   │   │   │   ├── 1.dist
│   │   │   │   ├── 10.dist
│   │   │   │   ├── 11.dist
│   │   │   │   ├── 12.dist
│   │   │   │   ├── 13.dist
│   │   │   │   ├── 14.dist
│   │   │   │   ├── 15.dist
│   │   │   │   ├── 16.dist
│   │   │   │   ├── 17.dist
│   │   │   │   ├── 18.dist
│   │   │   │   ├── 19.dist
│   │   │   │   ├── 2.dist
│   │   │   │   ├── 20.dist
│   │   │   │   ├── 21.dist
│   │   │   │   ├── 22.dist
│   │   │   │   ├── 23.dist
│   │   │   │   ├── 24.dist
│   │   │   │   ├── 25.dist
│   │   │   │   ├── 26.dist
│   │   │   │   ├── 27.dist
│   │   │   │   ├── 28.dist
│   │   │   │   ├── 29.dist
│   │   │   │   ├── 3.dist
│   │   │   │   ├── 30.dist
│   │   │   │   ├── 31.dist
│   │   │   │   ├── 32.dist
│   │   │   │   ├── 33.dist
│   │   │   │   ├── 34.dist
│   │   │   │   ├── 35.dist
│   │   │   │   ├── 36.dist
│   │   │   │   ├── 37.dist
│   │   │   │   ├── 38.dist
│   │   │   │   ├── 39.dist
│   │   │   │   ├── 4.dist
│   │   │   │   ├── 5.dist
│   │   │   │   ├── 6.dist
│   │   │   │   ├── 7.dist
│   │   │   │   ├── 8.dist
│   │   │   │   └── 9.dist
│   │   │   ├── energies/
│   │   │   │   └── potential-energies
│   │   │   ├── replica-indices
│   │   │   └── temperatures
│   │   ├── parallel-tempering-2dfes.py
│   │   └── parallel-tempering-2dfes.sampleoutput
│   └── umbrella-sampling-fes/
│       ├── README.md
│       ├── assumedatauncorrelated.output.txt
│       ├── data/
│       │   ├── prod0_dihed.xvg
│       │   ├── prod0_energies.xvg
│       │   ├── prod10_dihed.xvg
│       │   ├── prod10_energies.xvg
│       │   ├── prod11_dihed.xvg
│       │   ├── prod11_energies.xvg
│       │   ├── prod12_dihed.xvg
│       │   ├── prod12_energies.xvg
│       │   ├── prod13_dihed.xvg
│       │   ├── prod13_energies.xvg
│       │   ├── prod14_dihed.xvg
│       │   ├── prod14_energies.xvg
│       │   ├── prod15_dihed.xvg
│       │   ├── prod15_energies.xvg
│       │   ├── prod16_dihed.xvg
│       │   ├── prod16_energies.xvg
│       │   ├── prod17_dihed.xvg
│       │   ├── prod17_energies.xvg
│       │   ├── prod18_dihed.xvg
│       │   ├── prod18_energies.xvg
│       │   ├── prod19_dihed.xvg
│       │   ├── prod19_energies.xvg
│       │   ├── prod1_dihed.xvg
│       │   ├── prod1_energies.xvg
│       │   ├── prod20_dihed.xvg
│       │   ├── prod20_energies.xvg
│       │   ├── prod21_dihed.xvg
│       │   ├── prod21_energies.xvg
│       │   ├── prod22_dihed.xvg
│       │   ├── prod22_energies.xvg
│       │   ├── prod23_dihed.xvg
│       │   ├── prod23_energies.xvg
│       │   ├── prod24_dihed.xvg
│       │   ├── prod24_energies.xvg
│       │   ├── prod25_dihed.xvg
│       │   ├── prod25_energies.xvg
│       │   ├── prod2_dihed.xvg
│       │   ├── prod2_energies.xvg
│       │   ├── prod3_dihed.xvg
│       │   ├── prod3_energies.xvg
│       │   ├── prod4_dihed.xvg
│       │   ├── prod4_energies.xvg
│       │   ├── prod5_dihed.xvg
│       │   ├── prod5_energies.xvg
│       │   ├── prod6_dihed.xvg
│       │   ├── prod6_energies.xvg
│       │   ├── prod7_dihed.xvg
│       │   ├── prod7_energies.xvg
│       │   ├── prod8_dihed.xvg
│       │   ├── prod8_energies.xvg
│       │   ├── prod9_dihed.xvg
│       │   └── prod9_energies.xvg
│       ├── pmf.out
│       ├── umbrella-sampling-advanced-fes.py
│       ├── umbrella-sampling.py
│       ├── umbrella-sampling.sample_output
│       └── wham/
│           ├── PMF_144
│           ├── PMF_18
│           ├── PMF_288
│           ├── PMF_36
│           ├── PMF_72
│           ├── data/
│           │   ├── prod0_dihed.xvg
│           │   ├── prod10_dihed.xvg
│           │   ├── prod11_dihed.xvg
│           │   ├── prod12_dihed.xvg
│           │   ├── prod13_dihed.xvg
│           │   ├── prod14_dihed.xvg
│           │   ├── prod15_dihed.xvg
│           │   ├── prod16_dihed.xvg
│           │   ├── prod17_dihed.xvg
│           │   ├── prod18_dihed.xvg
│           │   ├── prod19_dihed.xvg
│           │   ├── prod1_dihed.xvg
│           │   ├── prod20_dihed.xvg
│           │   ├── prod21_dihed.xvg
│           │   ├── prod22_dihed.xvg
│           │   ├── prod23_dihed.xvg
│           │   ├── prod24_dihed.xvg
│           │   ├── prod25_dihed.xvg
│           │   ├── prod2_dihed.xvg
│           │   ├── prod3_dihed.xvg
│           │   ├── prod4_dihed.xvg
│           │   ├── prod5_dihed.xvg
│           │   ├── prod6_dihed.xvg
│           │   ├── prod7_dihed.xvg
│           │   ├── prod8_dihed.xvg
│           │   └── prod9_dihed.xvg
│           ├── dowham.pl
│           ├── gdbinit
│           ├── pmfwham144.txt
│           ├── pmfwham18.txt
│           ├── pmfwham36.txt
│           ├── pmfwham72.txt
│           └── setupwham.pl
├── pymbar/
│   ├── __init__.py
│   ├── confidenceintervals.py
│   ├── fes.py
│   ├── mbar.py
│   ├── mbar_solvers.py
│   ├── other_estimators.py
│   ├── tests/
│   │   ├── README.md
│   │   ├── __init__.py
│   │   ├── test_bar.py
│   │   ├── test_covariance.py
│   │   ├── test_exp.py
│   │   ├── test_fes.py
│   │   ├── test_mbar.py
│   │   ├── test_mbar_solvers.py
│   │   ├── test_timeseries.py
│   │   └── test_utils.py
│   ├── testsystems/
│   │   ├── __init__.py
│   │   ├── exponential_distributions.py
│   │   ├── gaussian_work.py
│   │   ├── harmonic_oscillators.py
│   │   └── timeseries.py
│   ├── timeseries.py
│   ├── utils.py
│   └── utils_for_testing.py
└── pyproject.toml

================================================
FILE CONTENTS
================================================

================================================
FILE: .codecov.yml
================================================
# Codecov configuration to make it a bit less noisy
coverage:
  ignore:
    - pymbar/tests/.*
    - pymbar/testsystems/.*
    - setup.py
    - versioneer.py
    - pymbar/_version.py
    - pymbar/old_mbar.py
  status:
    patch: false
    project:
      default:
        threshold: 50%
comment:
  layout: "header"
  require_changes: false
  branches: null
  behavior: default
  flags: null
  paths: null

================================================
FILE: .gitattributes
================================================
pymbar/_version.py export-subst

================================================
FILE: .github/workflows/CI.yaml
================================================
name: CI

on:
  push:
    branches:
      - 'main'
      - 'pymbar4'
      - 'gha'
  pull_request:
    branches:
      - 'main'
      - 'pymbar4'
      - 'gha'
  schedule:
    # Nightly Tests
    - cron: '0 0 * * *'


defaults:
  run:
    shell: bash -leo pipefail {0}

concurrency:
  group: "${{ github.workflow }}-${{ github.ref }}"
  cancel-in-progress: true

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [macOS-latest, ubuntu-latest, windows-latest]
        python-version: ["3.11", "3.12", "3.13", "3.14"]  # Check against oldest and newest versions
        jax: ["", "_jax"]
        exclude:  # Skip win + jax
          - jax: "_jax"
            os: windows-latest
    env:
      PYVER: ${{ matrix.python-version }}
      CI_OS: ${{ matrix.os }}
      PACKAGE: "pymbar"

    steps:
    - name: Checkout the code
      uses: actions/checkout@v4

    - name: Additional info about the build
      shell: bash
      run: |
        uname -a
        df -h
        ulimit -a

    - name: Setup Conda via Mamba
      uses: mamba-org/setup-micromamba@v1
      with:
        environment-file: devtools/conda-envs/test_env${{ matrix.jax }}.yaml
        environment-name: test
        condarc: |
          channels:
            - conda-forge
        create-args: >-
          python=${{ matrix.python-version }}

    - name: Install package
      run: |
        python -m pip install . --no-deps
        micromamba list

    - name: Run tests (pytest)
      run: |
        pytest -v --cov=$PACKAGE --cov-report=xml --color=yes --doctest-modules $PACKAGE/

    - name: Run examples
      run: |
        ### constant-force-optical-trap
        cd examples/constant-force-optical-trap
        python extract-data.py
        python force-bias-optical-trap.py
        ### harmonic-oscillators
        cd ../harmonic-oscillators
        python harmonic-oscillators.py
        python harmonic-oscillators-distributions.py
        cd ../heat-capacity
        python heat-capacity.py -b 2
        ### parallel-tempering-2dfes
        cd ../parallel-tempering-2dfes
        python parallel-tempering-2dfes.py
        ### umbrella-sampling-fes
        cd ../umbrella-sampling-fes
        python umbrella-sampling.py
        python umbrella-sampling-advanced-fes.py

    - name: CodeCov
      uses: codecov/codecov-action@v1
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        file: ./coverage.xml
        flags: unittests

  lint-format:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.11"]
    env:
      PACKAGE: "pymbar"

    steps:
    - name: Checkout the code
      uses: actions/checkout@v1

    - name: Setup Conda via Mamba
      uses: mamba-org/setup-micromamba@v1
      with:
        environment-file: devtools/conda-envs/test_env.yaml
        environment-name: test
        condarc: |
          channels:
            - conda-forge
        create-args: >-
          python=${{ matrix.python-version }}
    - name: Install linter and formatter
      run: |
        micromamba install pylint black

    - name: Run pylint
      run: |
        pylint $PACKAGE/

    # Black has a default --exclude which reads .gitignore.
    # Black's --exclude and --extend-exclude are single specified RegEx patterns and overwrite if multi-marked.
    - name: Run black check
      if: always()
      run: |
        black --check -l 99 $PACKAGE/ examples/


================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
#   For a library or package, you might want to ignore these files since the code is
#   intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# VSCode project settings
.vscode/

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# static files generated from Django application using `collectstatic`
media
static

# The docs build directories
docs/pymbar-docs
docs/_build
tools/hash_dict.pickle
docs/examples/generated/

# The examples directory outputs
examples/*/*.pdf

# OS Files
.DS_Store


================================================
FILE: .pylintrc
================================================
# Based on Apache 2.0 licensed code from https://github.com/ClusterHQ/flocker

[MASTER]

# Specify a configuration file.
#rcfile=

# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=

# Add files or directories to the blacklist. They should be base names, not
# paths.
ignore=old_mbar.py,_version.py

# Pickle collected data for later comparisons.
persistent=no

# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=

# Use multiple processes to speed up Pylint.
# DO NOT CHANGE THIS VALUES >1 HIDE RESULTS!!!!!
jobs=1

# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no

# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code
extension-pkg-whitelist=

# Allow optimization of some AST trees. This will activate a peephole AST
# optimizer, which will apply various small optimizations. For instance, it can
# be used to obtain the result of joining multiple strings with the addition
# operator. Joining a lot of strings can lead to a maximum recursion error in
# Pylint and this flag can prevent that. It has one side effect, the resulting
# AST will be different than the one from reality.
optimize-ast=no


[MESSAGES CONTROL]

# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
confidence=

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time. See also the "--disable" option for examples.
disable=all

enable=import-error,
       import-self,
       reimported,
       wildcard-import,
       misplaced-future,
       deprecated-module,
       unpacking-non-sequence,
       invalid-all-object,
       undefined-all-variable,
       used-before-assignment,
       cell-var-from-loop,
       global-variable-undefined,
       redefine-in-handler,
       unused-import,
       unused-wildcard-import,
       global-variable-not-assigned,
       undefined-loop-variable,
       global-statement,
       global-at-module-level,
       bad-open-mode,
       redundant-unittest-assert,
       boolean-datetime
       deprecated-method,
       anomalous-unicode-escape-in-string,
       anomalous-backslash-in-string,
       not-in-loop,
       continue-in-finally,
       abstract-class-instantiated,
       star-needs-assignment-target,
       duplicate-argument-name,
       return-in-init,
       too-many-star-expressions,
       nonlocal-and-global,
       return-outside-function,
       return-arg-in-generator,
       invalid-star-assignment-target,
       bad-reversed-sequence,
       nonexistent-operator,
       yield-outside-function,
       init-is-generator,
       nonlocal-without-binding,
       lost-exception,
       assert-on-tuple,
       dangerous-default-value,
       duplicate-key,
       useless-else-on-loop
       expression-not-assigned,
       confusing-with-statement,
       unnecessary-lambda,
       pointless-statement,
       pointless-string-statement,
       unnecessary-pass,
       unreachable,
       eval-used,
       exec-used,
       using-constant-test,
       bad-super-call,
       missing-super-argument,
       slots-on-old-class,
       super-on-old-class,
       property-on-old-class,
       not-an-iterable,
       not-a-mapping,
       format-needs-mapping,
       truncated-format-string,
       missing-format-string-key,
       mixed-format-string,
       too-few-format-args,
       bad-str-strip-call,
       too-many-format-args,
       bad-format-character,
       format-combined-specification,
       bad-format-string-key,
       bad-format-string,
       missing-format-attribute,
       missing-format-argument-key,
       unused-format-string-argument
       unused-format-string-key,
       invalid-format-index,
       bad-indentation,
       mixed-indentation,
       unnecessary-semicolon,
       lowercase-l-suffix,
       invalid-encoded-data,
       unpacking-in-except,
       import-star-module-level,
       long-suffix,
       old-octal-literal,
       old-ne-operator,
       backtick,
       old-raise-syntax,
       metaclass-assignment,
       next-method-called,
       dict-iter-method,
       dict-view-method,
       indexing-exception,
       raising-string,
       using-cmp-argument,
       cmp-method,
       coerce-method,
       delslice-method,
       getslice-method,
       hex-method,
       nonzero-method,
       t-method,
       setslice-method,
       logging-format-truncated,
       logging-too-few-args,
       logging-too-many-args,
       logging-unsupported-format,
       logging-format-interpolation,
       invalid-unary-operand-type,
       unsupported-binary-operation,
       not-callable,
       redundant-keyword-arg,
       assignment-from-no-return,
       assignment-from-none,
       not-context-manager,
       repeated-keyword,
       missing-kwoa,
       no-value-for-parameter,
       invalid-sequence-index,
       invalid-slice-index,
       unexpected-keyword-arg,
       unsupported-membership-test,
       unsubscriptable-object,
       access-member-before-definition,
       method-hidden,
       assigning-non-slot,
       duplicate-bases,
       inconsistent-mro,
       inherit-non-class,
       invalid-slots,
       invalid-slots-object,
       no-method-argument,
       no-self-argument,
       unexpected-special-method-signature,
       non-iterator-returned,
       arguments-differ,
       signature-differs,
       bad-staticmethod-argument,
       non-parent-init-called,
       bad-except-order,
       catching-non-exception,
       bad-exception-context,
       notimplemented-raised,
       raising-bad-type,
       raising-non-exception,
       misplaced-bare-raise,
       duplicate-except,
       broad-except,
       nonstandard-exception,
       binary-op-exception,
       bare-except,
       not-async-context-manager,
       yield-inside-async-function

# Needs investigation:
# abstract-method (might be indicating a bug? probably not though)
# protected-access (requires some refactoring)
# attribute-defined-outside-init (requires some refactoring)
# super-init-not-called (requires some cleanup)

# Things we'd like to enable someday:
# redefined-builtin (requires a bunch of work to clean up our code first)
# redefined-outer-name (requires a bunch of work to clean up our code first)
# undefined-variable (re-enable when pylint fixes https://github.com/PyCQA/pylint/issues/760)
# no-name-in-module (giving us spurious warnings https://github.com/PyCQA/pylint/issues/73)
# unused-argument (need to clean up or code a lot, e.g. prefix unused_?)
# function-redefined (@overload causes lots of spurious warnings)
# too-many-function-args (@overload causes spurious warnings... I think)
# parameter-unpacking (needed for eventual Python 3 compat)
# print-statement (needed for eventual Python 3 compat)
# filter-builtin-not-iterating (Python 3)
# map-builtin-not-iterating (Python 3)
# range-builtin-not-iterating (Python 3)
# zip-builtin-not-iterating (Python 3)
# many others relevant to Python 3
# unused-variable (a little work to cleanup, is all)

# ...
[REPORTS]

# Set the output format. Available formats are text, parseable, colorized, msvs
# (visual studio) and html. You can also give a reporter class, eg
# mypackage.mymodule.MyReporterClass.
output-format=parseable

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
files-output=no

# Tells whether to display a full report or only the messages
reports=no

# Python expression which should return a note less than 10 (10 is the highest
# note). You have access to the variables errors warning, statement which
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (RP0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)

# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details
#msg-template=


[LOGGING]

# Logging modules to check that the string format arguments are in logging
# function parameter format
logging-modules=logging


[FORMAT]

# Maximum number of characters on a single line.
max-line-length=100

# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$

# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no

# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1  : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator

# Maximum number of lines in a module
max-module-lines=1000

# String used as indentation unit. This is usually "    " (4 spaces) or "\t" (1
# tab).
indent-string='    '

# Number of spaces of indent required inside a hanging  or continued line.
indent-after-paren=4

# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=


[TYPECHECK]

# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes

# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis. It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=

# List of classes names for which member attributes should not be checked
# (useful for classes with attributes dynamically set). This supports can work
# with qualified names.
ignored-classes=

# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=


[VARIABLES]

# Tells whether we should check for unused import in __init__ files.
init-import=no

# A regular expression matching the name of dummy variables (i.e. expectedly
# not used).
dummy-variables-rgx=_$|dummy

# List of additional names supposed to be defined in builtins. Remember that
# you should avoid to define new builtins when possible.
additional-builtins=

# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,_cb


[SIMILARITIES]

# Minimum lines number of a similarity.
min-similarity-lines=4

# Ignore comments when computing similarities.
ignore-comments=yes

# Ignore docstrings when computing similarities.
ignore-docstrings=yes

# Ignore imports when computing similarities.
ignore-imports=no


[SPELLING]

# Spelling dictionary name. Available dictionaries: none. To make it working
# install python-enchant package.
spelling-dict=

# List of comma separated words that should not be checked.
spelling-ignore-words=

# A path to a file that contains private dictionary; one word per line.
spelling-private-dict-file=

# Tells whether to store unknown words to indicated private dictionary in
# --spelling-private-dict-file option instead of raising a message.
spelling-store-unknown-words=no


[MISCELLANEOUS]

# List of note tags to take in consideration, separated by a comma.
notes=FIXME,XXX,TODO


[BASIC]

# List of builtins function names that should not be used, separated by a comma
bad-functions=map,filter,input

# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_

# Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata

# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=

# Include a hint for the correct naming format with invalid-name
include-naming-hint=no

# Regular expression matching correct function names
function-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for function names
function-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct variable names
variable-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for variable names
variable-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$

# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$

# Regular expression matching correct attribute names
attr-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for attribute names
attr-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct argument names
argument-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for argument names
argument-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$

# Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$

# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$

# Regular expression matching correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$

# Naming hint for class names
class-name-hint=[A-Z_][a-zA-Z0-9]+$

# Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression matching correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$

# Naming hint for method names
method-name-hint=[a-z_][a-z0-9_]{2,30}$

# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_

# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1


[ELIF]

# Maximum number of nested blocks for function / method body
max-nested-blocks=5


[IMPORTS]

# Deprecated modules which should not be used, separated by a comma
deprecated-modules=regsub,TERMIOS,Bastion,rexec

# Create a graph of every (i.e. internal and external) dependencies in the
# given file (report RP0402 must not be disabled)
import-graph=

# Create a graph of external dependencies in the given file (report RP0402 must
# not be disabled)
ext-import-graph=

# Create a graph of internal dependencies in the given file (report RP0402 must
# not be disabled)
int-import-graph=


[DESIGN]

# Maximum number of arguments for function / method
max-args=5

# Argument names that match this expression will be ignored. Default to name
# with leading underscore
ignored-argument-names=_.*

# Maximum number of locals for function / method body
max-locals=15

# Maximum number of return / yield for function / method body
max-returns=6

# Maximum number of branch for function / method body
max-branches=12

# Maximum number of statements in function / method body
max-statements=50

# Maximum number of parents for a class (see R0901).
max-parents=7

# Maximum number of attributes for a class (see R0902).
max-attributes=7

# Minimum number of public methods for a class (see R0903).
min-public-methods=2

# Maximum number of public methods for a class (see R0904).
max-public-methods=20

# Maximum number of boolean expressions in a if statement
max-bool-expr=5


[CLASSES]

# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp

# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls

# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=mcs

# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,_fields,_replace,_source,_make


[EXCEPTIONS]

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=builtins.Exception


================================================
FILE: .readthedocs.yml
================================================
# .readthedocs.yml

version: 2

build:
  os: "ubuntu-20.04"
  tools:
    python: "mambaforge-4.10"

python:
  install:
    - method: pip
      path: .

sphinx:
   configuration: docs/conf.py

conda:
  environment: devtools/conda-envs/test_env_jax.yaml


================================================
FILE: LICENSE
================================================
Copyright 2017 Michael R. Shirts, John D. Chodera, Shirts Lab, Chodera Lab

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

================================================
FILE: README.md
================================================
[![Build Status](https://travis-ci.org/choderalab/pymbar.png)](https://travis-ci.org/choderalab/pymbar)
[![Anaconda Cloud Downloads Badge](https://anaconda.org/conda-forge/pymbar/badges/downloads.svg)](https://anaconda.org/conda-forge/pymbar)
[![Anaconda Cloud Badge](https://anaconda.org/conda-forge/pymbar/badges/installer/conda.svg)](https://anaconda.org/conda-forge/pymbar)
[![PyPI Version](https://badge.fury.io/py/pymbar.png)](https://pypi.python.org/pypi/pymbar)
[![DOI](https://zenodo.org/badge/9991771.svg)](https://zenodo.org/badge/latestdoi/9991771)

pymbar
======

Python implementation of the [multistate Bennett acceptance ratio (MBAR)](http://www.alchemistry.org/wiki/Multistate_Bennett_Acceptance_Ratio) method for estimating expectations and free energy differences from equilibrium samples from multiple probability densities.
See our [docs](http://pymbar.readthedocs.org/en/latest/).


Installation
------------

The easiest way to install the `pymbar` release is via [conda](http://conda.pydata.org):

```bash
conda install -c conda-forge pymbar
```
which will come with JAX to speed up the code. Or to get the non-JAX accelerated version:
```bash
conda install -c conda-forge pymbar-core
```

You can also install JAX accelerated `pymbar` from the [Python package index](https://pypi.python.org/pypi/pymbar) 
using `pip`:
```bash
pip install pymbar[jax]
```
or the non-jax-accelerated version with
```bash
pip install pymbar
```
Whether you install the JAX accelerated or non-JAX-accelerated version does not 
change any calls or how the code is run. The non-Jax version is smaller on disk due to smaller
dependencies, but may not run as fast.


The development version can be installed directly from github via `pip`:

```bash
# Get the compressed tarball
pip install https://github.com/choderalab/pymbar/archive/main.tar.gz
# Or obtain a temporary clone of the repo with git
pip install git+https://github.com/choderalab/pymbar.git
```

Usage
-----

Basic usage involves importing `pymbar` and constructing an `MBAR` object from the [reduced potential](http://www.alchemistry.org/wiki/Multistate_Bennett_Acceptance_Ratio#Reduced_potential) of simulation or experimental data.

Suppose we sample a 1D harmonic oscillator from a few thermodynamic states:
```python
>>> from pymbar import testsystems
>>> x_n, u_kn, N_k, s_n = testsystems.HarmonicOscillatorsTestCase().sample()
```
We have the `nsamples` sampled oscillator positions `x_n` (with samples from all states concatenated), [reduced potentials](http://www.alchemistry.org/wiki/Multistate_Bennett_Acceptance_Ratio#Reduced_potential) in the `(nstates,nsamples)` matrix `u_kn`, number of samples per state in the `nsamples` array `N_k`, and indices `s_n` denoting which thermodynamic state each sample was drawn from.

To analyze this data, we first initialize the `MBAR` object:

```python
>>> from pymbar import MBAR
>>> mbar = MBAR(u_kn, N_k)
```

Estimating dimensionless free energy differences between the sampled thermodynamic states and their associated uncertainties (standard errors) simply requires a call to `compute_free_energy_differences()`:

```python
>>> results = mbar.compute_free_energy_differences()
```

Here `results` is a dictionary with keys `Deltaf_ij`, `dDeltaf`, and `Theta`. `Deltaf_ij[i,j]` is the matrix of dimensionless free energy differences `f_j - f_i`, `dDeltaf_ij[i,j]` is the matrix of standard errors in this matrices estimate, and `Theta` is a covariance matrix that can be used to propagate error into quantities derived from the free energies.

Expectations and associated uncertainties can easily be estimated for observables `A(x)` for all states:

```python
>>> A_kn = x_kn # use position of harmonic oscillator as observable
>>> results = mbar.compute_expectations(A_kn)
```

where `results` is a dictionary with keys `mu`, `sigma`, and `Theta`, where `mu[i]` is the array of the estimate for the average of the observable for in state i, `sigma[i]` is the estimated standard deviation of the `mu` estimates,  and `Theta[i,j]` is the covariance matrix of the log weights.

See the docstring help for these individual methods for more information on exact usage; in Python or IPython, you can view the docstrings with `help()`.

How to disable JAX
------------------

JAX acceleration is automatic and the existence of the `jax` package in your software environment enables JAX acceleration.
The easiest way to disable `jax` is to install the version of `pymbar` that doesn't have `jax` as a dependency.
This can be done via `conda` with:

```bash
conda install -c conda-forge pymbar-core
```

Or via `pip` with:
```bash
pip install pymbar
```

However, many packages released on conda-forge specify `pymbar` as a dependency, making it impossible to install the non-jax accelerated of PyMbar.
In `pymbar >= 4.2.0` JAX acceleration can be controlled with the environmental variable `PYMBAR_DISABLE_JAX`.
Setting `PYMBAR_DISABLE_JAX` to a truth-y value (`TRUE`, `YES`, `1`) will disable JAX acceleration even if the `jax` package is installed.
These environment variable checks are case insensitive. 

JAX needs 64-bit mode
---------------------
PyMBAR needs 64-bit floats to provide reliable answers. JAX by default uses 
[32-bit (Single) bitsize](https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html#double-64bit-precision). 
PyMBAR will turn on JAX's 64-bit mode, which may cause issues with some separate uses of JAX in the same code as PyMBAR, 
such as existing Neural Network (NN) Models for machine learning.

Authors
-------
* Kyle A. Beauchamp <kyle.beauchamp@choderalab.org>
* John D. Chodera <john.chodera@choderalab.org>
* Levi N. Naden <lnaden@vt.edu>
* Michael R. Shirts <michael.shirts@colorado.edu>

References
----------

* Please cite the original MBAR paper:

  > Shirts MR and Chodera JD. Statistically optimal analysis of samples from multiple equilibrium states. J. Chem. Phys. 129:124105 (2008).  [DOI](http://dx.doi.org/10.1063/1.2978177)

* Some timeseries algorithms can be found in the following reference:

  > Chodera JD, Swope WC, Pitera JW, Seok C, and Dill KA. Use of the weighted histogram analysis method for the analysis of simulated and parallel tempering simulations. J. Chem. Theor. Comput. 3(1):26-41 (2007).  [DOI](http://dx.doi.org/10.1021/ct0502864)

* The automatic equilibration detection method provided in `pymbar.timeseries.detectEquilibration()` is described here:

  > Chodera JD. A simple method for automated equilibration detection in molecular simulations. J. Chem. Theor. Comput. 12:1799, 2016.  [DOI](http://dx.doi.org/10.1021/acs.jctc.5b00784)

License
-------

`pymbar` is free software and is licensed under the MIT license.


Thanks
------
We would especially like to thank a large number of people for helping us identify issues
and ways to improve `pymbar`, including Tommy Knotts, David Mobley, Himanshu Paliwal,
Zhiqiang Tan, Patrick Varilly, Todd Gingrich, Aaron Keys, Anna Schneider, Adrian Roitberg,
Nick Schafer, Thomas Speck, Troy van Voorhis, Gupreet Singh, Jason Wagoner, Gabriel Rocklin,
Yannick Spill, Ilya Chorny, Greg Bowman, Vincent Voelz, Peter Kasson, Dave Caplan, Sam Moors,
Carl Rogers, Josua Adelman, Javier Palacios, David Chandler, Andrew Jewett, Stefano Martiniani, and Antonia Mey.

Notes
-----
* `alchemical-analysis.py` described in [this publication](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4420631/) has been [relocated here](https://github.com/MobleyLab/alchemical-analysis).


================================================
FILE: appveyor.yml
================================================
environment:
  global:
    # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
    # /E:ON and /V:ON options are not enabled in the batch script intepreter
    # See: http://stackoverflow.com/a/13751649/163740
    CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\devtools\\appveyor\\run_with_env.cmd"

  matrix:
    - PYTHON: "C:\\Python27_64"
      PYTHON_VERSION: "2.7"
      PYTHON_ARCH: "64"
      CONDA_PY: "27"
      CONDA_NPY: "112"

    - PYTHON: "C:\\Python36_64"
      PYTHON_VERSION: "3.6"
      PYTHON_ARCH: "64"
      CONDA_PY: "36"
      CONDA_NPY: "112"

    - PYTHON: "C:\\Python37_64"
      PYTHON_VERSION: "3.7"
      PYTHON_ARCH: "64"
      CONDA_PY: "37"
      CONDA_NPY: "112"

install:
  # this installs the appropriate Miniconda (Py2/Py3, 32/64 bit),
  # as well as pip, conda-build, and the binstar CLI
  - ps: . ".\\devtools\\appveyor\\install.ps1"
  - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
  - conda config --add channels conda-forge
  - conda install --yes conda-build jinja2

build: false

test_script:
  - "%CMD_IN_ENV% conda build --quiet devtools\\conda-recipe"


================================================
FILE: devtools/README.md
================================================
# Developer Notes / Tools

Assorted notes for developers.

## How to do a release

<!-- This is outdated now! -->

- Update the whatsnew.rst document. Use the github view that shows all the commits to master since the last release to write it.
- Update the version number in `setup.py`, change `ISRELEASED` to `True`
- Commit to master, and [tag](https://github.com/choderalab/pymbar/releases) the release on github
- To push the source to PyPI, use `python setup.py sdist --formats=gztar,zip upload`
- Conda binaries need to built separately on each platform (`conda build pymbar; binstar upload <path to .tar.bz2>`)
- Make an annoucement on github / email
- After tagging the release, make a NEW commit that changes `ISRELEASED` back to `False` in `setup.py`

It's important that the version which is tagged on github for the release be
the one with the ISRELEASED flag in setup.py set to true.


================================================
FILE: devtools/appveyor/install.ps1
================================================
# Sample script to install Miniconda under Windows
# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner, Robert McGibbon
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/

$MINICONDA_URL = "http://repo.continuum.io/miniconda/"


function DownloadMiniconda ($python_version, $platform_suffix) {
    $webclient = New-Object System.Net.WebClient
    if ($python_version -match "2.7") {
        $filename = "Miniconda2-latest-Windows-" + $platform_suffix + ".exe"
    } else {
        $filename = "Miniconda3-latest-Windows-" + $platform_suffix + ".exe"
    }
    $url = $MINICONDA_URL + $filename

    $basedir = $pwd.Path + "\"
    $filepath = $basedir + $filename
    if (Test-Path $filename) {
        Write-Host "Reusing" $filepath
        return $filepath
    }

    # Download and retry up to 3 times in case of network transient errors.
    Write-Host "Downloading" $filename "from" $url
    $retry_attempts = 2
    for($i=0; $i -lt $retry_attempts; $i++){
        try {
            $webclient.DownloadFile($url, $filepath)
            break
        }
        Catch [Exception]{
            Start-Sleep 1
        }
   }
   if (Test-Path $filepath) {
       Write-Host "File saved at" $filepath
   } else {
       # Retry once to get the error message if any at the last try
       $webclient.DownloadFile($url, $filepath)
   }
   return $filepath
}


function InstallMiniconda ($python_version, $architecture, $python_home) {
    Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home
    if (Test-Path $python_home) {
        Write-Host $python_home "already exists, skipping."
        return $false
    }
    if ($architecture -match "32") {
        $platform_suffix = "x86"
    } else {
        $platform_suffix = "x86_64"
    }

    $filepath = DownloadMiniconda $python_version $platform_suffix
    Write-Host "Installing" $filepath "to" $python_home
    $install_log = $python_home + ".log"
    $args = "/S /D=$python_home"
    Write-Host $filepath $args
    Start-Process -FilePath $filepath -ArgumentList $args -Wait
    if (Test-Path $python_home) {
        Write-Host "Python $python_version ($architecture) installation complete"
    } else {
        Write-Host "Failed to install Python in $python_home"
        Get-Content -Path $install_log
        Exit 1
    }
}


function InstallCondaPackages ($python_home, $spec) {
    $conda_path = $python_home + "\Scripts\conda.exe"
    $args = "install --yes --quiet $spec"
    Write-Host ("conda " + $args)
    Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait
}

function UpdateConda ($python_home) {
    $conda_path = $python_home + "\Scripts\conda.exe"
    Write-Host "Updating conda..."
    $args = "update --yes --quiet conda"
    Write-Host $conda_path $args
    Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait
}


function main () {
    InstallMiniconda $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
    UpdateConda $env:PYTHON
    InstallCondaPackages $env:PYTHON "conda-build pip jinja2 binstar"
}

main


================================================
FILE: devtools/appveyor/run_with_env.cmd
================================================
:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
::
:: To build extensions for 64 bit Python 2, we need to configure environment
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
::
:: 32 bit builds do not require specific environment configurations.
::
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
:: cmd interpreter, at least for (SDK v7.0)
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
:: http://stackoverflow.com/a/13751649/163740
::
:: Author: Olivier Grisel
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
@ECHO OFF

SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows

SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%"
IF %MAJOR_PYTHON_VERSION% == "2" (
    SET WINDOWS_SDK_VERSION="v7.0"
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" (
    SET WINDOWS_SDK_VERSION="v7.1"
) ELSE (
    ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
    EXIT 1
)

IF "%PYTHON_ARCH%"=="64" (
    ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
    SET DISTUTILS_USE_SDK=1
    SET MSSdk=1
    "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
    "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
    ECHO Executing: %COMMAND_TO_RUN%
    call %COMMAND_TO_RUN% || EXIT 1
) ELSE (
    ECHO Using default MSVC build environment for 32 bit architecture
    ECHO Executing: %COMMAND_TO_RUN%
    call %COMMAND_TO_RUN% || EXIT 1
)


================================================
FILE: devtools/conda-envs/test_env.yaml
================================================
name: test
channels:
  - conda-forge
  - conda-forge/label/python_rc
dependencies:
    # Base depends
  - python
  - pip
  - numpy >=1.12
  - scipy
  - numexpr

    # Testing
  - pytest
  - pytest-cov
  - flaky
  - codecov
  - statsmodels
  - scikit-learn  # Provides the sklearn module
  - matplotlib-base
  - xlrd


================================================
FILE: devtools/conda-envs/test_env_jax.yaml
================================================
name: test
channels:
  - conda-forge
  - conda-forge/label/python_rc
dependencies:
    # Base depends
  - python
  - pip
  - numpy >=1.12
  - scipy
  - numexpr
  - jaxlib
  - jax
  - numba
    # Testing
  - pytest
  - pytest-cov
  - flaky
  - codecov
  - statsmodels
  - scikit-learn  # Provides the sklearn module
  - matplotlib-base
  - xlrd
    # Docs
  - numpydoc
  - sphinx
  - sphinx-rtd-theme
  - sphinxcontrib-bibtex


================================================
FILE: devtools/conda-recipe/README.md
================================================
This is a recipe for building the current development package into a conda
binary.

The installation on travis-ci is done by building the conda package, installing
it, running the tests, and then if successful pushing the package to binstar
(and the docs to AWS S3). The binstar auth token is an encrypted environment
variable generated using:

binstar auth -n repex-travis -o conda-forge --max-age 22896000 -c --scopes api:write

and then saved in the environment variable BINSTAR_TOKEN.

You can set up travis to store an encrypted token via

gem install travis travis encrypt BINSTAR_TOKEN=xx

where xx is the token output by binstar. The final command should print a line (containing 'secure') for inclusion in your .travis.yml file.


================================================
FILE: devtools/conda-recipe/bld.bat
================================================
"%PYTHON%" setup.py install
if errorlevel 1 exit 1


================================================
FILE: devtools/conda-recipe/build.sh
================================================
#!/bin/bash

$PYTHON setup.py install

# Add more build steps here, if they are necessary.

# See
# http://docs.continuum.io/conda/build.html
# for a list of environment variables that are set during the build process.


================================================
FILE: devtools/conda-recipe/meta.yaml
================================================
package:
  name: pymbar-dev
  version: !!str 3.0.4.dev0

source:
  path: ../../

requirements:
  build:
    - python
    - setuptools
    - numpy 1.11.*
    - toolchain
  run:
    - python
    - numpy >=1.12
    - scipy
    - numexpr

test:
  requires:
    - pytest
    - statsmodels <0.13
  imports:
    - pymbar
  commands:
    - pytest -v --color=yes --doctest-modules pymbar/

about:
  home: https://github.com/choderalab/pymbar
  license: MIT
  summary: Python implementation of the multistate Bennett acceptance ratio (MBAR) method.


================================================
FILE: devtools/travis-ci/after_success.sh
================================================
#!/bin/bash
# Must be invoked with $PACKAGENAME

echo $TRAVIS_PULL_REQUEST $TRAVIS_BRANCH
PUSH_DOCS_TO_S3=false

if [ "$TRAVIS_PULL_REQUEST" = true ]; then
    echo "This is a pull request. No deployment will be done."; exit 0
fi


if [ "$TRAVIS_BRANCH" != "master" ]; then
    echo "No deployment on BRANCH='$TRAVIS_BRANCH'"; exit 0
fi


# Deploy to binstar
conda install --yes anaconda-client jinja2
pushd .
cd $HOME/miniconda/conda-bld
FILES=*/${PACKAGENAME}-dev-*.tar.bz2
for filename in $FILES; do
    anaconda -t $BINSTAR_TOKEN remove --force ${ORGNAME}/${PACKAGENAME}-dev/${filename}
    anaconda -t $BINSTAR_TOKEN upload --force -u ${ORGNAME} -p ${PACKAGENAME}-dev ${filename}
done
popd

if [ $PUSH_DOCS_TO_S3 = true ]; then
   # Create the docs and push them to S3
   # -----------------------------------
    conda install --yes pip
    conda config --add channels $ORGNAME
    conda install --yes `conda build devtools/conda-recipe --output`
    pip install numpydoc s3cmd msmb_theme
    conda install --yes `cat docs/requirements.txt | xargs`

    conda list -e

    (cd docs && make html && cd -)
    ls -lt docs/_build
    pwd
    python devtools/ci/push-docs-to-s3.py
fi


================================================
FILE: devtools/travis-ci/index.html
================================================
<html><head><meta http-equiv="refresh" content="0;URL='/latest'"/></head></html>


================================================
FILE: devtools/travis-ci/install.sh
================================================
# Temporarily change directory to $HOME to install software
pushd .
cd $HOME

# Install Miniconda
MINICONDA=Miniconda3-latest-Linux-x86_64.sh
# Sed cuts out everything before the first digit, then traps the first digit and everything after
MINICONDA_HOME=$HOME/miniconda
MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *<td>\(.*\)<\/td> */\1/p')
wget -q https://repo.continuum.io/miniconda/$MINICONDA
if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then
    echo "Miniconda MD5 mismatch"
    exit 1
fi

bash $MINICONDA -b -p $MINICONDA_HOME

# Configure miniconda
export PIP_ARGS="-U"
export PATH=$MINICONDA_HOME/bin:$PATH
conda update --yes conda
conda install --yes conda-build jinja2 anaconda-client pip

# Restore original directory
popd


================================================
FILE: devtools/travis-ci/push-docs-to-s3.py
================================================
#!/usr/bin/env python

"""
Must have the vollowing environment variables defined:
* BUCKET_NAME : AWS bucket name
* PREFIX : 'latest' or other version number

"""

import os
import pip
import tempfile
import subprocess
import thermopyl.version


BUCKET_NAME = 'thermopyl.org'
if not thermopyl.version.release:
    PREFIX = 'latest'
else:
    PREFIX = thermopyl.version.short_version

if not any(d.project_name == 's3cmd' for d in pip.get_installed_distributions()):
    raise ImportError('The s3cmd pacakge is required. try $ pip install s3cmd')
# The secret key is available as a secure environment variable
# on travis-ci to push the build documentation to Amazon S3.
with tempfile.NamedTemporaryFile('w') as f:
    f.write('''[default]
access_key = {AWS_ACCESS_KEY_ID}
secret_key = {AWS_SECRET_ACCESS_KEY}
'''.format(**os.environ))
    f.flush()

    template = ('s3cmd --guess-mime-type --config {config} '
                'sync docs/_build/ s3://{bucket}/{prefix}/')
    cmd = template.format(
            config=f.name,
            bucket=BUCKET_NAME,
            prefix=PREFIX)
    return_val = subprocess.call(cmd.split())

    # Sync index file.
    template = ('s3cmd --guess-mime-type --config {config} '
                'sync devtools/ci/index.html s3://{bucket}/')
    cmd = template.format(
            config=f.name,
            bucket=BUCKET_NAME)
    return_val = subprocess.call(cmd.split())


================================================
FILE: docs/Makefile
================================================
# Makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS    =
SPHINXBUILD   = sphinx-build
PAPER         =
BUILDDIR      = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif

# Internal variables.
PAPEROPT_a4     = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

help:
	@echo "Please use \`make <target>' where <target> is one of"
	@echo "  html       to make standalone HTML files"
	@echo "  dirhtml    to make HTML files named index.html in directories"
	@echo "  singlehtml to make a single large HTML file"
	@echo "  pickle     to make pickle files"
	@echo "  json       to make JSON files"
	@echo "  htmlhelp   to make HTML files and a HTML help project"
	@echo "  qthelp     to make HTML files and a qthelp project"
	@echo "  devhelp    to make HTML files and a Devhelp project"
	@echo "  epub       to make an epub"
	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
	@echo "  text       to make text files"
	@echo "  man        to make manual pages"
	@echo "  texinfo    to make Texinfo files"
	@echo "  info       to make Texinfo files and run them through makeinfo"
	@echo "  gettext    to make PO message catalogs"
	@echo "  changes    to make an overview of all changed/added/deprecated items"
	@echo "  xml        to make Docutils-native XML files"
	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
	@echo "  linkcheck  to check all external links for integrity"
	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"

clean:
	rm -rf $(BUILDDIR)/*

html:
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
	@echo
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml:
	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
	@echo
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

singlehtml:
	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
	@echo
	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

pickle:
	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
	@echo
	@echo "Build finished; now you can process the pickle files."

json:
	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
	@echo
	@echo "Build finished; now you can process the JSON files."

htmlhelp:
	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
	@echo
	@echo "Build finished; now you can run HTML Help Workshop with the" \
	      ".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp:
	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
	@echo
	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pymbar.qhcp"
	@echo "To view the help file:"
	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pymbar.qhc"

devhelp:
	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
	@echo
	@echo "Build finished."
	@echo "To view the help file:"
	@echo "# mkdir -p $$HOME/.local/share/devhelp/pymbar"
	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pymbar"
	@echo "# devhelp"

epub:
	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
	@echo
	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

latex:
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
	@echo
	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
	@echo "Run \`make' in that directory to run these through (pdf)latex" \
	      "(use \`make latexpdf' here to do that automatically)."

latexpdf:
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
	@echo "Running LaTeX files through pdflatex..."
	$(MAKE) -C $(BUILDDIR)/latex all-pdf
	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

latexpdfja:
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
	@echo "Running LaTeX files through platex and dvipdfmx..."
	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

text:
	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
	@echo
	@echo "Build finished. The text files are in $(BUILDDIR)/text."

man:
	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
	@echo
	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

texinfo:
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
	@echo
	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
	@echo "Run \`make' in that directory to run these through makeinfo" \
	      "(use \`make info' here to do that automatically)."

info:
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
	@echo "Running Texinfo files through makeinfo..."
	make -C $(BUILDDIR)/texinfo info
	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext:
	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
	@echo
	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

changes:
	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
	@echo
	@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
	@echo
	@echo "Link check complete; look for any errors in the above output " \
	      "or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
	@echo "Testing of doctests in the sources finished, look at the " \
	      "results in $(BUILDDIR)/doctest/output.txt."

xml:
	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
	@echo
	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."

pseudoxml:
	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
	@echo
	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."


================================================
FILE: docs/conf.py
================================================
# -*- coding: utf-8 -*-
#
# pymbar documentation build configuration file, created by
# sphinx-quickstart on Mon May  5 20:07:25 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
from datetime import datetime
import pymbar

# KAB: As of July 22, 2015 it seems that it might be preferable to no longer mock out numpy and scipy.

# Use mock to make our code think that numpy and scipy are available, even though they might not be available on readthedocs
# import mock

# MOCK_MODULES = ['numpy', 'scipy', "numpy.linalg", "scipy.special", "scipy.stats"]
# for mod_name in MOCK_MODULES:
#    sys.modules[mod_name] = mock.Mock()

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
# extensions = [
#    'sphinx.ext.autodoc',
#    'sphinx.ext.mathjax',
#    'numpydoc',
#    'sphinx.ext.autosummary'
# ]
extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.doctest",
    "sphinx.ext.intersphinx",
    "sphinx.ext.todo",
    "sphinx.ext.imgmath",
    "sphinx.ext.ifconfig",
    "sphinx.ext.napoleon",
    "sphinx.ext.inheritance_diagram",
    "sphinx.ext.autosummary",
    "sphinx.ext.extlinks",
    "sphinx.ext.mathjax",
    "sphinxcontrib.bibtex",
]

autosummary_generate = True
autodoc_default_flags = ["members", "inherited-members"]
numpydoc_show_class_members = False

# concatenate both class and __init__ docstrings when generating autodoc class
# docs
autoclass_content = "both"

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = ".rst"

# The encoding of source files.
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = "index"

# General information about the project.
project = "pymbar"
copyright = f"{datetime.now().year}, {pymbar.__maintainer__}"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
# import pymbar
# version = pymbar.version.short_version
# The full version, including alpha/beta/rc tags.
# release = version

# The full version, including alpha/beta/rc tags.
release = pymbar.__version__
version = release.split("+")[0]

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ["_build"]

# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None

# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
# add_module_names = True

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
# show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"

# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
# html_theme = "default"
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
html_theme = "sphinx_rtd_theme"
if not on_rtd:  # only import and set the theme if we're building docs locally
    import sphinx_rtd_theme

    html_theme = "sphinx_rtd_theme"
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
# html_title = None

# A shorter title for the navigation bar.  Default is the same as html_title.
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []

# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
# html_extra_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}

# If false, no module index is generated.
# html_domain_indices = True

# If false, no index is generated.
# html_use_index = True

# If true, the index is split into individual pages for each letter.
# html_split_index = False

# If true, links to the reST sources are added to the pages.
# html_show_sourcelink = True

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
# html_show_sphinx = True

# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
# html_show_copyright = True

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it.  The value of this option must be the
# base URL from which the finished HTML is served.
# html_use_opensearch = ''

# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None

# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
# html_search_language = 'en'

# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
# html_search_options = {'type': 'default'}

# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
# html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = "pymbardoc"

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
    # The paper size ('letterpaper' or 'a4paper').
    #'papersize': 'letterpaper',
    # The font size ('10pt', '11pt' or '12pt').
    #'pointsize': '10pt',
    # Additional stuff for the LaTeX preamble.
    #'preamble': '',
    # Latex figure (float) alignment
    #'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
#  author, documentclass [howto, manual, or own class]).
latex_documents = [
    ("index", "pymbar.tex", "pymbar Documentation", pymbar.__maintainer__, "manual",),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False

# If true, show page references after internal links.
# latex_show_pagerefs = False

# If true, show URL addresses after external links.
# latex_show_urls = False

# Documents to append as an appendix to all manuals.
# latex_appendices = []

# If false, no module index is generated.
# latex_domain_indices = True

bibtex_bibfiles = ['references.bib']

# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [("index", "pymbar", "pymbar Documentation", [pymbar.__maintainer__], 1,)]

# If true, show URL addresses after external links.
# man_show_urls = False


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
#  dir menu entry, description, category)
texinfo_documents = [
    (
        "index",
        "pymbar",
        "pymbar Documentation",
        pymbar.__maintainer__,
        "pymbar",
        "One line description of project.",
        "Miscellaneous",
    ),
]

# Documents to append as an appendix to all manuals.
# texinfo_appendices = []

# If false, no module index is generated.
# texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'

# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False



================================================
FILE: docs/fes_with_pymbar.rst
================================================
.. _fes_with_pymbar:

Free energy surfaces with pymbar
#################################

-------------------
Free energy surfces
-------------------

``pymbar`` can be used to estimate free energy surfaces using samples
from *K* biased simulations.  It is important to note that MBAR itself
is not enough to generate a free energy surface.  MBAR takes a set of
samples from *K* different states, and can compute the weight that
should be given to each sample in in the unbiased state, i.e. the
state in which one desires to compute the free energy surface. Thus,
there can be no MBAR estimator of the free energy surface; that would
consist only in a set of weighted delta functions.  This is done by
initializing the ``pymbar.FES`` class, which takes :math:`u_{kn}` and :math:`N_k`
matrices and passes them to MBAR.

The second step that needs to be carried out is to determine the best
approximation of the continuous function that the samples are
estimated from. ``pymbar.FES`` supports several methods to estimate
this continuous function.  ``generate_fes``, given an initialized MBAR
object, a set of points, the energies at that point, and a method,
generates an object that contains the FES information.  The current
options are ``histogram``, ``kde``, and spline.  ``histogram`` behaves
as one might expect, creating a free energy surface as a histogram,
and refer to ``FES.rst`` for additional information. ``kde`` creates a
kernel density approximation, using the
``sklearn.neighbors.KernelDensity function``, and parameters can be
passed to that function using the ``kde_parameters`` keyword.
Finally, the ``spline`` method uses a maximum likelhood approach to
calculate the spline most consistent with the input data, using the
formalism presented in Shirts et al. :cite:`shirts_fes_2020`.  The ``spline``
functionality includes the ability to perform Monte Carlo sampling in
the spline parameters to generate confidence intervals for the points
in the spline curve.

``histogram`` and ``kde`` methods can generate multidimesional free
energy surfaces, while ``splines`` for now is limited to a single free
energy surface.

The method `get_fes` return values of the free energy surface at the
specified coordinates, and when available, returns the uncertainties
in the values as well.

Examples `parallel-tempering-2d` and `umbrella-sampling` have been
rewnamed `parallel-tempering-2dfes and `umbrella-sampling` and
rewritten to demonstrate the new functionality.

.. autoclass:: pymbar.FES
   :members:


================================================
FILE: docs/getting_started.rst
================================================
.. _getting-started:

Getting started
###############

.. highlight: bash

Installing ``pymbar``
=====================

This documentation covers ``pymbar`` 4.  For the previous versions of pymbar, see: `pymbar 3.0.7 <https://pymbar.readthedocs.io/en/3.0.7/>`_.

conda (recommended)
-------------------

The easiest way to install the ``pymbar`` release is via `conda <http://conda.pydata.org>`_:

.. code-block:: console

   $ conda install -c conda-forge pymbar

You can also install ``pymbar`` from the `Python package index <https://pypi.python.org/pypi/pymbar>`_ using ``pip``:

.. code-block:: console

   $ pip install pymbar

Development version
-------------------

The development version can be installed directly from GitHub via ``pip``: 

.. code-block:: console

   $ pip install git+https://github.com/choderalab/pymbar.git

In beta testing, this is way to download pymbar 4.

Running the tests
=================

Running the tests is a great way to verify that everything is working.

The test suite uses `pytest <https://docs.pytest.org/>`_, in addition to `statsmodels <http://statsmodels.sourceforge.net/>`_ and `pytables <http://www.pytables.org/>`_, which you can install via ``conda``:

.. code-block:: console

   $ conda install pytest statsmodels


You can then run the tests from within the `pymbar` directory with:

.. code-block:: console
		
   $ pytest -v pymbar


================================================
FILE: docs/index.rst
================================================
.. pymbar documentation master file, created by
   sphinx-quickstart on Mon May  5 19:35:19 2014.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

pymbar
======

Python implementation of the `multistate Bennett acceptance ratio (MBAR) <http://www.alchemistry.org/wiki/Multistate_Bennett_Acceptance_Ratio>`_ method for estimating expectations and free energy differences

Documentation
-------------


.. toctree::
   :maxdepth: 2

   getting_started
   moving_from_pymbar3
   strategies_for_solution
   mbar
   fes_with_pymbar
   other_estimators
   timeseries
   utils
   zbibliography

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


================================================
FILE: docs/mbar.rst
================================================
.. currentmodule:: pymbar.mbar

The :mod:`mbar` module: :class:`MBAR`
======================================

The :mod:`mbar` module contains the :class:`MBAR` class, which implements the `multistate Bennett acceptance ratio (MBAR) <http://www.alchemistry.org/wiki/Multistate_Bennett_Acceptance_Ratio>`_ method :cite:`shirts-chodera:jcp:2008:mbar`.

.. autoclass:: pymbar.MBAR
   :members:


================================================
FILE: docs/moving_from_pymbar3.rst
================================================
.. _moving_from_pymbar3:

Moving from ``pymbar`` version 3
################################

Pymbar v4.0 contains several changes to improve the API longer
term. This, however, breaks the API used in 3.x and previous versions.

The main changes include:

    * Making various estimators return dictionaries, not tuples, making it easier to return optional information requested at call time. 
    * Standardizing on snake_case for function names. 
    * Making the built-in solvers work to have an interface closer to like ``scipy`` solvers. 

----------
Snake case
----------

Previous version of `pymbar` had mixed cases in functions. We have
standardized on snake case, and tried to make the method names that do
similar things more consistent.  Specific changes include:

    * ``getFreeEnergyDifferences`` is now ``compute_free_energy_differences``
    * ``computeExpectations`` is now ``compute_expectations``
    * ``computeMultipleExpectations`` is now ``compute_multiple_expectations``
    * ``computePerturbedFreeEnergies`` is now ``compute_perturbed_free_energies``
    * ``computeEntropyAndEnthalpy`` is now ``compute_entropy_and_enthalpy``

In the submodule `timeseries`:

    * ``statisticalInefficiency`` is now ``statistical_inefficiency``
    * ``statisticalInefficiencyMltiple`` is now ``statistical_inefficiency_multiple``  
    * ``integratedAutocorrelationTime`` is now ``integrated_autocorrelation_time``
    * ``normalizedFluctuationCorrelationFunction`` is now ``normalized_fluctuation_correlation_function``
    * ``normalizedFluctuationCorrelationFunctionMultiple`` is now ``normalized_fluctuation_correlation_function_multiple``
    * ``subsampleCorrelatedData`` is now ``subsample_correlated_data``
    * ``detectEquilibration`` is now ``detect_equilibration``
    * ``statisticalInefficiency_fft`` is now ``statistical_inefficiency_fft``
    * ``detectEquilibration_binary_search`` is now ``detect_equilibration_binary_search``

Additionally, the other estimators such as the Bennett Acceptance
Ratio and exponential averaging/Zwanzig equation have different, more
consistent, call signatures.  All other estimators are now in the
``other_estimators`` module.

    * ``BAR`` is now ``bar``
    * ``EXP`` is now ``exp``
    * ``EXPGauss``  is now ``exp_gauss``
    * ``PMF`` is now ``FEP`` and is greatly expanded (see :ref:`fes_with_pymbar`).   

------------------------------------
More consistent return functionality
------------------------------------

Previously, different pymbar functions returned different information
as tuples. This became problematic when different functions returned
different types of information or different numbers of results. We
have thus consolidated on an API where all functions return a
dictionary.

As an example of both API changes of API, a short bit of code that
would load in data and calculate free energies, instead of being

.. code-block:: python
    :caption: Example of initializing ``MBAR`` in 3.0.7

    mbar = MBAR(u_kn, N_k)
    results, errors = mbar.getFreeEnergyDifferences()                                                                 
    print(results[0])
    print(errors[0]) 

    
Would now be written as:

.. code-block:: python
    :caption: Example of initializing ``MBAR`` in 4.0

    mbar = MBAR(u_kn, N_k)
    results = mbar.compute_free_energy_differences()
    print(results['Delta_f'])
    print(results['dDelta_f'])


Other estimators including ``bar`` and ``exp`` also use a dictionary for return data.

The ``pymbar.timeseries`` submodule return patterns have *not* changed
in 4.0, however, and one should refer to the individual function
documentations for these return patterns.

.. code-block:: python
		
   results = bar(w_F, w_R)        
   print(f'Free energy difference is {results['Delta_f']:.3f} +- {results['Delta_f']:.3f} kT')


   and:

.. code-block:: python
		
   results = exp(w_F)
   print(f"Forward free energy difference is {results['Delta_f']:.3f} +- {results['dDelta_f']:.3f} kT)
   results = exp(w_R)
   print(f"Reverse free energy difference is {results['Delta_f']:.3f} +- {results['dDelta_f']:.3f} kT)

-----------------
Simulation output
-----------------

Previously, ``pymbar`` send all messages to standard out when verbose
was set to ``True``.  ``pymbar`` now uses the logging module to output
this information.  If you wish to set messages, even if the verbose is
set to ``True``, you will need to turn on logging for your script by
importing the logging module, and adding the lines:

.. code-block:: python
  :caption: Enabling logging in ``pybmar``
	    
  import logging
  import sys
  logging.basicConfig(stream=sys.stdout, level=logging.INFO)


``pymbar`` generally uses the logging levels ``info`` for information
that previously was set to standard out.  Note that for a given method
to produce extensive information, even with logging, the verbose flag
still needs to be set to true.

--------------------
Free energy surfaces
--------------------

Previously, ``pymbar`` had a method ``PMF`` that estimated a free
energy from a series of umbrella samples using a histogram
approach. This was semantically problematic in two ways. First, the
term PMF (potential of mean force) is somewhat of an ambiguous term,
as the potential of mean force has some dependence on the coordinate
system in which the mean force is calculated. Since ``pymbar`` does
not calculate free energies by integration of mean force, this caused
some confusion. To be clearer, we now have renamed the class
``FES``, for "free energy surface".

The inclusion of a PMF function also created some confusion where some
authors referred to MBAR as a method to calculate a free energy
surface.  MBAR can only be used to take biased samples an estimate the
unbiased weight of each sample. In order to calculate a free energy
surface, one must also find a way to take the set of discrete weighted
samples and calculate a continous potential of mean force: see Shirts
and Ferguson :cite:`shirts_fes_2020` for a further discussion of the
separation of these two distinct tasks in the construction of free
energy surfaces. The pymbar code more cleanly separates the
calculation of biasing weights associated with umbrella samples, and
the estimation of the free energy surface.

For more information on the options for computing free energy surfaces
with the code, please see: :ref:`fes_with_pymbar`. 

------------
Acceleration
------------

Previous version of ``pymbar`` include acceleration using explicit C++
inner loops.  The C++ interface has become out of date. ``pymbar``
optimization routines are now accelerated with ``jax``. This provides
approximately a 2x speed up when performed on most CPUs, and
additional acceleration when a GPU can be detected (pymbar does not
install the appropriate GPU libraries). ``jax`` will be installed when
``pymbar`` in installed via conda, but ``pymbar`` will function with
or without ``jax`` installed if there are issues with the JAX configuration.

To disable the ``jax`` acceleration, set the environment variable 
``PYMBAR_DISABLE_JAX=TRUE``. This will disable ``jax`` acceleration
of ``pymbar`` even when the ``jax`` software package is installed.

-------------
Other changes
-------------

Additional changes not affecting the API:
  * Removed legacy `old_mbar.py` support.
  * Moved testing framework to pytest, added significant numbers of tests.
  * Improved code linting using `black`
  * Bootstrapping for errors in free energies and expectations is now supported; see :ref:`strategies_for_solution` for more information.
  * Added a `bar_overlap` function to find overlap when using just `bar`
  * Fixed an error in computing expectations of small numbers.
  * Improved automated adaptive choice of samplers; see :ref:`strategies_for_solution` for more information.
  * Many instances of code cleanup.
  * Improved docstring documentation.



================================================
FILE: docs/other_estimators.rst
================================================
.. _other_estimators:

Other estimators 
#################################

``pymbar`` implements other reweighting estimators, specifically the
Bennett Acceptance Ratio, exponential averaging, and a Gaussian
approximation to exponential averaging.

.. automodule:: pymbar.other_estimators
   :members:


================================================
FILE: docs/references.bib
================================================
@article{shirts-chodera:jcp:2008:mbar,
   author = {Michael R. Shirts and John D. Chodera},
   title = {Statistically optimal analysis of samples from multiple equilibrium states},
   journal = {Journal of Chemical Physics},
   volume = {129},
   pages = {124105},
   year = {2008},
   type = {Journal Article}
}

@article{chodera:jctc:2016:automatic-equilibration-detection,
   author = {John D. Chodera},
   title = {A simple method for automated equilibration detection in molecular simulations},
   journal = {Journal of Chemical Theory and Computation},
   volume = {12},
   pages = {1799},
   year = {2016},
   type = {Journal Article}
}

@article{shirts_fes_2020,
author = {Shirts, Michael R. and Ferguson, Andrew L.},
title = {Statistically Optimal Continuous Free Energy Surfaces from Biased Simulations and Multistate Reweighting},
journal = {Journal of Chemical Theory and Computation},
volume = {16},
number = {7},
pages = {4107-4125},
year = {2020},
}



================================================
FILE: docs/strategies_for_solution.rst
================================================
.. _strategies_for_solution:

Strategies for solution
#######################

----------------------------------------
Approaches to solving the MBAR equations
----------------------------------------

The multistate reweighting approach to calculate free energies can be
formulated in several ways.  The multistate reweighting equations are
a set of coupled, implicit equations for the free energies of *K*
states, given samples from these *K* states. If one can calculate the
energies of each of the *K* states, for each sample, then one can
solve for the *K* free energies satisfying the equations. The
solutions are unique only up to an overall constant, which ``pymbar``
removes by setting the first free energy to zero to 0, leaving *K-1*.
free energies.

By rearrangement, this set of self-consistent equations can be written
as simultaneous roots to *K* equations.  This set of roots also turns
out to be the Jacobian of single maximum likelihood function of all
the free energies.  We then can find the MBAR solutions by either
maximization/minimization techiques, or by root finding.

Because the second derivative of the likelihood is always negative,
there is only one possivle solution. However, if there is poor
overlap, it is not uncommon that some of the optimal :math:`f_k` could be
in extremely flat region of solution space, and therefore have
significant round-off errors resulting in slow or no convergence to the
solution, and low overlap can also lead to underflow and overflow
leading to crashed solutions.

-----------------
``scipy`` solvers
-----------------

``pymbar`` is set up to use the ``scipy.optimize.minimize()`` and
``scipy.optimize.roots()`` functionality to perform this
minimization. We use only the gradient-based methods, as the
analytical gradient-based optimization is obtainable from the MBAR
equations.  Available ``scipy.optimize.minimize()`` methods include
``L-BFGS-B``, ``dogleg``, ``CG``, ``BFGS``, ``Newton-CG``, ``TNC``, ``trust-ncg``,
``trust-krylov``, ``trust-exact``, and ``SLSQP``. and
``scipy.optimize.roots`` options are ``hybr`` and ``lm``. Methods that
take a Hessian (``dogleg``, ``Newton-CG``, ``trust-ncg``, ``trust-krylov``,
``trust-exact``) are passed the analytical Hessian.  Options can be
passed to each of these methods through the ``MBAR`` object
initialization interface.

------------------
Built-in solutions
------------------

In addition to the ``scipy`` solcers, ``pymbar`` also includes an
adaptive solver designed directly for MBAR.  At every step, the
adaptive solver calculates both the next iteration of the
self-consistent iterative formula presented in Shirts et
al. :cite:`shirts-chodera:jcp:2008:mbar`, and takes a Newton-Raphson
step.  In both cases, it calculates the gradients of the points
resulting after the two steps, and selects the move that makes the
magnitude of the gradient (i.e. the dot product of the gradient with
itself) smallest. Far from the solution, the self-consistent iteration
tends have the smaller gradient, while closer to the solution, the
Newton-Raphson step tends to have the smallest gradient. It always
chooses the self-consistent iteration for the first `min_sc_iter`
iterations, as if overlap is poor then Newton=Raphson iteration can
fail. ``min_sc_iter``'s default is 2, but if one is starting from a
good guess for the free energies, one could start with
``min_sc_iter=0``

-----------------------------
Constructing solver protocols
-----------------------------

We have found that in general, different solvers have different
convergence properties and difference convergence behavior.  Even at
the same input tolerance level, different algorithms may not yield the
same result.  Additionally, accurate free energy estimates and other.
Although data with states that have significant overlap in
configuration states usually converge successfully with all simulation
algorithms, different algorithms succeed and fail on different "hard"
data sets. We have therefore constructed a very general interface to
allow the user to try different algorithms.

``pymbar`` uses the concept of a "solver protocol", where one applies
a series of methods one or multiple times.  In most cases, one will
never need to interact with this interface, because several different
protocols have already been implemented, and are accessible with
string keywords.  These are currently ``solver_protocl=default`` (also
the default) and ``solver_protocol=robust``.

However, a user has the option of creating their own solver
protocol. Solver protocols are created as tuples of dictionaries,
where each dictionary is an optimization operation. The user has the
ability to continue with the resulting free energies each time, or
restarting back from the initialized free energies.

Take for example the default solver protocol, designed to give a high
accuracy answer in most circumstances:

.. code-block:: python

   solver_protocol = (
          dict(method="hybr", continuation=True),
          dict(method="adaptive", options=dict(min_sc_iter=0)),
   )

Here, the first pass through optimization uses the ``scipy.optimize.roots`` function ``hybr``,
and then if it is successful, continues on by running the built-in ``adaptive`` method, but
with no self-consistent iteration choices forced, as described above. If `hybr` fails,
it will still attempted to continue on with the resulting free energies, from whatever point it
ended up, issue a warning in case that `adaptive` is still unable to solve the result.

The ``options`` dictionary is passed onto the method, so whatever
options the scipy method uses it its documentation, it can be passed
on through this approach.  ``tol`` is a direct option to
`scipy.optimize` methods, and not passed on through the dictionary,
and thus is passed on directly in the solver protocol.

.. code-block:: python

    solver_protocol = (
            dict(method="hybr"),
            dict(method="L-BFGS-B", tol = 1.0e-5, continuation = True, options=dict(maxiter=1000)),
            dict(method="adaptive", tol = 1.0e-12, options=dict(maxiter=1000,min_sc_iter=5))
    )

In this case, it would first use "hybr" with the default options and
tolerance and if successful, exit.  If not successful with "hybr", it
would continue on to "L-BFGS-B", with 1000 maximum iterations, and a
tolerance of :math:`10^{-5}` but would not use the results from the "hybr"
call. If "L-BFGS-B" was either successful or unsuccessful, it would
pass the results to "adaptive", where it would choose the
self-consistent iteration the first five times, the numberof maximum
iteractions would be 1000, and the tolerance is :math:`10^{-12}`.

--------------
Initialization
--------------

One can initialize the soution process in a number of ways. The
simplest is to start from all zeros, which is the default (and also
has keyword ``initialize=zeros``). If the keyword ``f_k_initial`` is
used, then the length *K*.

Two other options for ``initialize`` are ``BAR`` and
``average-enthalpies``. ``average-enthalpies`` which approximates the
free energy of each state using the average enthalpy of each states,
which will be valid in the limit of no entropy differences beween
states.  ``initialize=BAR`` can be used whenever states are given in a
natural sequence of overlap, such that state 0 has the most
configurational overlap with state 1, state 1 has significant
configurational overlap with both states 0 and state 2, and so forth.
In the limit there is only overlap between neighboring states, MBAR
converges to give the same answer for :math:`\Delta f_k = f_{k+1} - f_k`
that BAR gives. Although BAR also requires an iterative solution, it
is a single variable problem, and thus the *K-1* BAR iterations that
need to be done are much faster than a single *K-1* dimensional
problem. The initial input for state *k* in the solution process is
then :math:`f_{k,initial} = \sum_j \Delta f_{j,BAR}`

Note that if both ``initialize`` and ``f_k_initial`` are selected, the
logic is somewhat different. Specifing ``f_k_initial`` overwrites
``initialize=zeros``, but ``initialize=BAR`` starts each application
of BAR with the (reduced) free energy difference between states *k*
and *k+1* in from ``f_k_initial``.

-----------------------------
Calculating uncertainties
-----------------------------

The MBAR equations contain analytical estimates of uncertainties.
These are essentially, however, the functional form is bit more
complicated, since they include modifications for error propagation
with implicit equations.

For free energies and expectations, one includes the analytical
uncertainties by adding the keyword ``compute_uncertainties=True``.

In some cases, to peform additional error analysis, one might need
access to the covariance matrix of $\ln f_k$. This is accessed in
``results['Theta']``, and included by setting ``compute_theta=True``, or
if ``compute_uncertainties=True`` and uncertainty_method is not
``bootstrap``.

If ``uncertainty_method=bootstrap``, then the analytical error
analysis is not performed, and instead bootstrap samples are pulled
from the original distribution.  Bootstrapping is done on each set of
$N_k$ samples from each *K* states individually, rather than on the
set as a whole, as the number of samples drawn from each state should
not change in the bootstrapping process, or it would be a different
process. 

For bootstrapping to be used in calculating error estimates, the
``MBAR`` object must be initialized with the keyword `n_bootstraps`,
which must be an integer greater than zero.  In general, 50--200
bootstraps should be used to estimate uncertainties with a good degree
of accuracy.
 

Note that users have complete control over the solver sequence for
bootstrapped solutions, using the same API as for solvers of the
original solution, with keyword ``bootstrap_solver_protocol``.  As an
example, the default bootstrap protocol is:

.. code-block:: python
		
   bootstrap_solver_protocol = (dict(method="adaptive", tol = 1e-6, options=dict(min_sc_iter=0,maximum_iterations=100)))

The solutions for bootstrapped data should be relatively close to the
solutions for the original data set; additionally, they do not need to
be quite as accurate, since they are used to compute the variances.

Bootstrapped uncertainties (using ``uncertainty_method=bootstrap`` is
also available for all functions calculating expectations, but again
requires initialization with "n_bootstraps" when initalizing the MBAR
object.


================================================
FILE: docs/timeseries.rst
================================================
.. currentmodule:: pymbar.timeseries

The timeseries module :mod:`pymbar.timeseries`
==============================================

The :mod:`pymbar.timeseries` module contains tools for dealing with timeseries data.
The `MBAR <http://www.alchemistry.org/wiki/Multistate_Bennett_Acceptance_Ratio>`_ method is only applicable to
uncorrelated samples from probability distributions, so we provide a number of tools that can be used to decorrelate
simulation data.

Automatically identifying the equilibrated production region
------------------------------------------------------------

Most simulations start from initial conditions that are highly unrepresentative of equilibrated samples that occur
late in the simulation.
We can improve our estimates by discarding these initial regions to "equilibration" (also known as "burn-in").
We recommend a simple scheme described in Ref. :cite:`chodera:jctc:2016:automatic-equilibration-detection`, which
identifies the production region as the final contiguous region containing the *largest* number of uncorrelated samples.
This scheme is implemented in the :func:`detect_equilibration` method:

.. code-block:: python

   from pymbar import timeseries
   t0, g, Neff_max = timeseries.detect_equilibration(A_t) # compute indices of uncorrelated timeseries
   A_t_equil = A_t[t0:]
   indices = timeseries.subsample_correlated_data(A_t_equil, g=g)
   A_n = A_t_equil[indices]

In this example, the :func:`detect_equilibration` method is used on the correlated timeseries ``A_t`` to identify the
sample index corresponding to the beginning of the production region, ``t_0``, the statistical inefficiency of the
production region ``[t0:]``, ``g``, and the effective number of uncorrelated samples in the production
region, ``Neff_max``.
The production (equilibrated) region of the timeseries is extracted as ``A_t_equil`` and then subsampled using
the :func:`subsample_correlated_data` method with the provided statistical inefficiency ``g``.
Finally, the decorrelated samples are stored in ``A_n``.

Note that, by default, the statistical inefficiency is computed for every time origin in a call to
:func:`detect_equilibration`, which can be slow.
If your dataset is more than a few hundred samples, you may want to evaluate only every ``nskip`` samples as potential
time origins.
This may result in discarding slightly more data than strictly necessary, but may not have a significant impact if the
timeseries is long.

.. code-block:: python

   nskip = 10 # only try every 10 samples for time origins
   t0, g, Neff_max = timeseries.detect_equilibration(A_t, nskip=nskip)

Subsampling timeseries data
---------------------------

If there is no need to discard the initial transient to equilibration, the :func:`subsample_correlated_data` method can be
used directly to identify an effectively uncorrelated subset of data.

.. code-block:: python

   from pymbar import timeseries
   indices = timeseries.subsample_correlated_data(A_t_equil)
   A_n = A_t_equil[indices]

Here, the statistical inefficiency ``g`` is computed automatically.

Other utility timeseries functions
----------------------------------

A number of other useful functions for computing autocorrelation functions from one or more timeseries sampled from the
same process are also provided.

.. automodule:: pymbar.timeseries
   :members:


================================================
FILE: docs/utils.rst
================================================
.. currentmodule:: pymbar.utils

Utilities : :mod:`pymbar.utils`
===============================

These functions are some miscellaneous functions used by other parts of the ``pymbar`` library.

.. automodule:: pymbar.utils
   :members:


================================================
FILE: docs/zbibliography.rst
================================================
.. only:: html

   Bibliography
   ############

.. bibliography:: references.bib
   :style: unsrt


================================================
FILE: examples/README.md
================================================
pymbar-examples
===============

Examples illustrating the use of [MBAR](http://github.com/choderalab/pymbar) for various applications in computational and experimental chemistry.

Contents
--------

* `alchemical-free-energy/` - example illustrating the calculation of free energy differences from simulations with alchemical intermediates between two end states with a number of methods.  Note that this example has moved to https://github.com/MobleyLab/alchemical-analysis
* `constant-force-optical-trap/` - calculation of PMF of dsDNA extension from constant-force optical trap experiments
* `harmonic-oscillators/` - examples all of the functionality of pymbar, including validation of the distribution of error estimates. 
* `heat-capacity/` - calculation of heat capacities using the fluctuation theorem, including Cv at interpolated temperatures.
* `parallel-tempering-2dpmf/` - example illustrating computation of 2D PMF from parallel tempering data
* `umbrella-sampling-pmf/` - example illustrating computation of 1D PMF from umbrella sampling data




================================================
FILE: examples/alchemical-free-energy/README.md
================================================
The alchemical_analysis.py script has been moved to

https://github.com/MobleyLab/alchemical-analysis

It contains an implementation of the recommended practices for
analyzing alchemical free energy calculations, as described in
Klimovich et al., JCAMD 29:397-411 (2015). This is based on earlier
work illustrating how to apply MBAR to alchemical free energy
calculations (and a comparison with other methods) as in Paliwal and
Shirts, J. Chem. Theory Comp, v. 7, 4115-4134 (2011).



================================================
FILE: examples/constant-force-optical-trap/README.md
================================================
# MBAR analysis of single-molecule DNA hairpin single-molecule equilibrium experiments under constant force load.

## References

[1] Woodside MT, Behnke-Parks WM, Larizadeh K, Travers K, Herschlag D, and Block SM. Nanomechanical measurements of the sequence-dependent folding landscapes of single nucleic acid hairpins. PNAS 103(16):6190-6195, 2006.

[2] Greenleaf WJ, Woodside MT, Abbondanzieri EA, and Block SM. Passive all-optical force clamp for high-resolution laser trapping. PRL 95:208102, 2005.

## Manifest

* `original-data/` - original data in Excel spreadsheet form, provided by Michael T. Woodside <Michael.Woodside@nrc-cnrc.gc.ca>, corresponding author of [1].  Data has been compressed with bzip2 as `20R55_4T_data.xls.bz2`
* `processed-data/` - external biasing forces (in pN) and extension trajectories (in nm, 0.1 ms time resolution) extracted from the Excel files in original-data/
* `extract-data.py` - Python script to extract data from Excel datafiles (run as `extract_data.py` in place)
* `force-bias-optical-trap.py` - Python script to compute potentials of mean force (PMFs) using MBAR
* `plots/` - directory containing plots
* `output/` - directory containing PMFs

## Usage

Correspondence with the corresponding author, Michael T. Woodside, describing the dataset appears below.

    ---------------------------------------------------------------

    Hi John,

    Here are 5s records, with data points every 0.1 ms, recorded at 16
    different forces for the same molecule, hairpin 20R55/4T in the naming
    scheme I used in the paper. It's the same hairpin as for Fig. 1. I stuck
    the data in an Excel file.

    As far as errors go, there are some reasonably large systematic errors
    that can crop up in the force, so the absolute force values are known to
    within about 10% or so for a given molecule (bead size variations are a
    large factor here). As a first pass, by all means feel free to ignore
    the errors, but it's a good idea to keep them in mind for further down
    the road. Definitely, the file does not quote significant digits
    properly!!

    I have three more datasets that are ready to be sent, and several more
    to sort through. Hopefully this will give you something to work with for
    now...

    Cheers,

    --Michael

    ---------------------------------------------------------------
    Michael Woodside
    National Institute for Nanotechnology, NRC
    and Dept. of Physics, University of Alberta
    ---------------------------------------------------------------



================================================
FILE: examples/constant-force-optical-trap/extract-data.py
================================================
"""
Extract forces and extension timeseries data from Excel spreadsheet files (.xls) provided by Michael T. Woodside

REQUIREMENTS:

* xlrd (pure Python Excel spreadsheet (.xls) file reader) - http://www.lexicon.net/sjmachin/xlrd.htm
"""

# =============================================================================================
# IMPORTS
# =============================================================================================

import sys
import bz2
import tempfile
from pathlib import Path

from numpy import zeros, float64

try:
    import xlrd  # pure Python Excel spreadsheet (.xls) file reader
except ImportError:
    print("ERROR: This example requires xlrd, run:", "  pip install xlrd", sep="\n")
    sys.exit()

# =============================================================================================
# PARAMETERS
# =============================================================================================
# location of original data (.xls files)
original_data_directory = Path("original-data")
# location for where processed data is to be stored
processed_data_directory = Path("processed-data")
# prefixes of datasets to process (filenames are f'({prefix}_data.xls')
datasets = ["20R55_4T"]

# =============================================================================================
# SUBROUTINES
# =============================================================================================

# =============================================================================================
# MAIN
# =============================================================================================


def main():
    ORIGINAL_DATA = Path(original_data_directory)
    PROCESSED_DATA = Path(processed_data_directory)
    # process all datasets
    for dataset in datasets:
        print(f"Extracting data from dataset '{dataset}'...")

        # Extract compressed Excel spreadsheet file and load it with xlrd
        with bz2.open(ORIGINAL_DATA / f"{dataset}_data.xls.bz2") as f:
            with tempfile.NamedTemporaryFile(suffix=".xls", delete=False) as temp:
                temp.write(f.read())
        workbook = xlrd.open_workbook(temp.name)

        # DEBUG
        print(
            f"Workbook contains {workbook.nsheets:d} worksheets:", workbook.sheet_names(), sep="\n"
        )

        # Get the first worksheet.
        worksheet = workbook.sheet_by_index(0)

        # DEBUG
        print(
            f"1st worksheet '{worksheet.name}' has {worksheet.ncols:d} columns and {worksheet.nrows:d} rows."
        )

        # Extract biasing forces.
        K = worksheet.ncols - 1
        biasing_force_k = zeros([K], float64)
        for k in range(K):
            biasing_force_k[k] = worksheet.cell_value(rowx=1, colx=1 + k)
        print(f"{K:d} biasing forces (in pN):", biasing_force_k, sep="\n")

        # Write biasing forces.
        filename = PROCESSED_DATA / f"{dataset}.forces"
        print(f"Writing biasing forces to '{filename}'...")
        with open(filename, "w") as outfile:
            for k in range(K):
                if k > 0:
                    outfile.write(" ")
                outfile.write(f"{biasing_force_k[k]:.2f}")

        # Read trajectories.
        T_max = worksheet.nrows - 3
        x_kt = zeros([K, T_max])
        for k in range(K):
            print(f"Reading trajectory {k + 1:d} / {K + 1:d}...")
            for t in range(T_max):
                x_kt[k, t] = worksheet.cell_value(colx=1 + k, rowx=3 + t)
        print(f"Read {K:d} trajectories of {T_max:d} samples each.")

        # Write trajectories.
        filename = PROCESSED_DATA / f"{dataset}.trajectories"
        print(f"Writing trajectories to '{filename}'...")
        with open(filename, "w") as outfile:
            for t in range(T_max):
                for k in range(K):
                    if k > 0:
                        outfile.write(" ")
                    outfile.write(f"{x_kt[k, t]:f}")
                outfile.write("\n")


if __name__ == "__main__":
    main()


================================================
FILE: examples/constant-force-optical-trap/force-bias-optical-trap.py
================================================
"""
Example illustrating the application of MBAR to compute a 1D free energy profile
from a series of force-clamp single-molecule experiments.

REFERENCE

    Woodside MT, Behnke-Parks WL, Larizadeh K, Travers K, Herschlag D, and Block SM.
    Nanomechanical measurements of the sequence-dependent folding landscapes of single
    nucleic acid hairpins. PNAS 103:6190, 2006.

"""

# =============================================================================================
# IMPORTS
# =============================================================================================
import subprocess
import time
from pathlib import Path

import numpy as np
import matplotlib

matplotlib.use("Agg")
import matplotlib.pyplot as plt

import pymbar  # multistate Bennett acceptance ratio analysis (provided by pymbar)
from pymbar import timeseries, FES  # timeseries analysis (provided by pymbar)

# =============================================================================================
# PARAMETERS
# =============================================================================================

prefix = "20R55_4T"  # for paper
# prefix = '10R50_4T'
# prefix = '25R50_4T'
# prefix = '30R50_4T'
directory = Path("processed-data")
temperature = 296.15  # temperature (in K)
nbins = 50  # number of bins for 1D FES
output_directory = Path("output")
plot_directory = Path("plots")

# =============================================================================================
# CONSTANTS
# =============================================================================================

kB = 1.381e-23  # Boltzmann constant (in J/K)
pN_nm_to_kT = (1.0e-9) * (1.0e-12) / (kB * temperature)  # conversion from nM pN to units of kT

# =============================================================================================
# SUBROUTINES
# =============================================================================================


def construct_nonuniform_bins(x_n, nbins):
    """Construct histogram using bins of unequal size to ensure approximately equal population in each bin.

    Parameters
    ----------
    x_n : 1D array of float
        x_n[n] is data point n

    Returns
    -------
    bin_left_boundary_i : 1D array of floats
        data in bin i will satisfy bin_left_boundary_i[i] <= x < bin_left_boundary_i[i+1]
    bin_center_i : 1D array of floats
        bin_center_i[i] is the center of bin i
    bin_width_i : 1D array of floats
        bin_width_i[i] is the width of bin i
    bin_n : 1D array of int32
        bin_n[n] is the bin index (in range(nbins)) of x_n[n]
    """

    # Determine number of samples.
    N = x_n.size

    # Get indices of elements of x_n sorted in order.
    sorted_indices = x_n.argsort()

    # Allocate storage for results.
    bin_left_boundary_i = np.zeros([nbins + 1])
    bin_center_i = np.zeros([nbins])
    bin_width_i = np.zeros([nbins])
    bin_n = np.zeros([N])

    # Determine sampled range, adding a little bit to the rightmost range to ensure no samples escape the range.
    x_min = x_n.min()
    x_max = x_n.max()
    x_max += (x_max - x_min) * 1.0e-5

    # Determine bin boundaries and bin assignments.
    for bin_index in range(nbins):
        # indices of first and last data points in this span
        first_index = int(float(N) / float(nbins) * float(bin_index))
        last_index = int(float(N) / float(nbins) * float(bin_index + 1))

        # store left bin boundary
        bin_left_boundary_i[bin_index] = x_n[sorted_indices[first_index]]

        # store assignments
        bin_n[sorted_indices[first_index:last_index]] = bin_index

    # set rightmost boundary
    bin_left_boundary_i[nbins] = x_max

    # Determine bin centers and widths
    for bin_index in range(nbins):
        bin_center_i[bin_index] = (
            bin_left_boundary_i[bin_index] + bin_left_boundary_i[bin_index + 1]
        ) / 2.0
        bin_width_i[bin_index] = (
            bin_left_boundary_i[bin_index + 1] - bin_left_boundary_i[bin_index]
        )

    return bin_left_boundary_i, bin_center_i, bin_width_i, bin_n


# =============================================================================================
# MAIN
# =============================================================================================


def main():
    # read biasing forces for different trajectories
    filename = directory / f"{prefix}.forces"
    with open(filename) as infile:
        elements = infile.readline().split()
        K = len(elements)  # number of biasing forces
        # biasing_force_k[k] is the constant external biasing force used to collect trajectory k (in pN)
        biasing_force_k = np.zeros([K])
        for k in range(K):
            biasing_force_k[k] = float(elements[k])
    print("biasing forces (in pN) = ", biasing_force_k)

    # Determine maximum number of snapshots in all trajectories.
    filename = directory / f"{prefix}.trajectories"
    T_max = 0
    with open(filename) as f:
        for line in f:
            T_max += 1

    # Allocate storage for original (correlated) trajectories
    T_k = np.zeros([K], int)  # T_k[k] is the number of snapshots from umbrella simulation k`
    # x_kt[k,t] is the position of snapshot t from trajectory k (in nm)
    x_kt = np.zeros([K, T_max])

    # Read the trajectories.
    filename = directory / f"{prefix}.trajectories"
    print(f"Reading {filename}...")
    with open(filename) as infile:
        for line in infile:
            elements = line.split()
            for k in range(K):
                t = T_k[k]
                x_kt[k, t] = float(elements[k])
                T_k[k] += 1

    # Create a list of indices of all configurations in kt-indexing.
    mask_kt = np.zeros([K, T_max], dtype=bool)
    for k in range(K):
        mask_kt[k, 0 : T_k[k]] = True
    # Create a list from this mask.
    all_data_indices = np.where(mask_kt)

    # Construct equal-frequency extension bins
    print("binning data...")
    bin_kt = np.zeros([K, T_max], int)
    bin_left_boundary_i, bin_center_i, bin_width_i, bin_assignments = construct_nonuniform_bins(
        x_kt[all_data_indices], nbins
    )
    bin_kt[all_data_indices] = bin_assignments

    # Compute correlation times.
    N_max = 0
    g_k = np.zeros([K])
    for k in range(K):
        # Compute statistical inefficiency for extension timeseries
        g = timeseries.statistical_inefficiency(x_kt[k, 0 : T_k[k]], x_kt[k, 0 : T_k[k]])
        # store statistical inefficiency
        g_k[k] = g
        print(
            f"timeseries {k + 1:d} : g = {g:.1f}, {int(np.floor(T_k[k] / g)):.0f} "
            f"uncorrelated samples (of {T_k[k]:d} total samples)"
        )
        N_max = max(N_max, int(np.ceil(T_k[k] / g)) + 1)

    # Subsample trajectory position data.
    x_kn = np.zeros([K, N_max])
    bin_kn = np.zeros([K, N_max])
    N_k = np.zeros([K], int)
    for k in range(K):
        # Compute correlation times for potential energy and chi timeseries.
        indices = timeseries.subsample_correlated_data(x_kt[k, 0 : T_k[k]])
        # Store subsampled positions.
        N_k[k] = len(indices)
        x_kn[k, 0 : N_k[k]] = x_kt[k, indices]
        bin_kn[k, 0 : N_k[k]] = bin_kt[k, indices]

    # Set arbitrarynp.zeros for external biasing potential.
    x0_k = np.zeros([K])  # x position corresponding to zero of potential
    for k in range(K):
        x0_k[k] = x_kn[k, 0 : N_k[k]].mean()
    print("x0_k = ", x0_k)

    # Compute bias energies in units of kT.
    # u_kln[k,l,n] is the reduced (dimensionless) relative potential energy of
    # snapshot n from umbrella simulation k evaluated at umbrella l
    u_kln = np.zeros([K, K, N_max])
    for k in range(K):
        for l in range(K):
            # compute relative energy difference from sampled state to each other state
            # U_k(x) = F_k x
            # where F_k is external biasing force
            # (F_k pN) (x nm) (pN /
            # u_kln[k,l,0:N_k[k]] = - pN_nm_to_kT * (biasing_force_k[l] - biasing_force_k[k]) * x_kn[k,0:N_k[k]]
            u_kln[k, l, 0 : N_k[k]] = -pN_nm_to_kT * biasing_force_k[l] * (
                x_kn[k, 0 : N_k[k]] - x0_k[l]
            ) + pN_nm_to_kT * biasing_force_k[k] * (x_kn[k, 0 : N_k[k]] - x0_k[k])

    # DEBUG
    start_time = time.time()

    # Initialize MBAR.
    print("Running MBAR...")
    # TODO: change to u_kn inputs
    mbar = pymbar.MBAR(
        u_kln, N_k, verbose=True, relative_tolerance=1.0e-10, solver_protocol="robust"
    )

    # Compute unbiased energies (all biasing forces are zero).
    # u_n[n] is the reduced potential energy without umbrella restraints of snapshot n
    u_n = np.zeros([np.sum(N_k)])
    x_n = np.zeros([np.sum(N_k)])

    Nstart = 0
    for k in range(K):
        #    u_n[N_k[k]:N_k[k+1]] = - pN_nm_to_kT * (0.0 - biasing_force_k[k]) * x_kn[k,0:N_k[k]]
        u_n[Nstart : Nstart + N_k[k]] = 0.0 + pN_nm_to_kT * biasing_force_k[k] * (
            x_kn[k, 0 : N_k[k]] - x0_k[k]
        )
        x_n[Nstart : Nstart + N_k[k]] = x_kn[k, 0 : N_k[k]]
        Nstart += N_k[k]

    # Compute free energy profile in unbiased potential (in units of kT).

    print("Computing free energy profile...")
    fes = FES(u_kln, N_k, mbar_options=dict(solver_protocol="robust"))
    histogram_parameters = dict()
    # 1D array of parameters, one entry because 1D
    histogram_parameters["bin_edges"] = bin_left_boundary_i
    fes.generate_fes(u_n, x_n, histogram_parameters=histogram_parameters)
    results = fes.get_fes(
        bin_center_i, reference_point="from-lowest", uncertainty_method="analytical"
    )
    f_i = results["f_i"]
    df_i = results["df_i"]

    # compute estimate of FES including Jacobian term
    fes_i = f_i + np.log(bin_width_i)
    # Write out unbiased estimate of FES
    print("Unbiased FES (in units of kT)")
    print(f"{'bin':>8s} {'f':>8s} {'df':>8s} {'fes':>8s} {'width':>8s}")
    for i in range(nbins):
        print(
            f"{bin_center_i[i]:8.3f}",
            f"{f_i[i]:8.3f}",
            f"{df_i[i]:8.3f}",
            f"{fes_i[i]:8.3f}",
            f"{bin_width_i[i]:8.3f}",
        )

    filename = output_directory / "fes-unbiased.out"
    with open(filename, "w") as outfile:
        for i in range(nbins):
            outfile.write(f"{bin_center_i[i]:8.3f} {fes_i[i]:8.3f} {df_i[i]:8.3f}\n")

    fig_filename = plot_directory / f"fes-unbiased.pdf"
    fig, ax = plt.subplots()
    ax.errorbar(bin_center_i, fes_i, yerr=df_i, fmt="_ ", elinewidth=0.3)
    ax.set_title("Unbiased estimate of free energy profile")
    ax.set_ylabel("Free energy profile of mean force (kT)")
    ax.set_xlabel("Extension (nm)")
    fig.savefig(fig_filename)

    # DEBUG
    stop_time = time.time()
    elapsed_time = stop_time - start_time
    print(f"analysis took {elapsed_time:f} seconds")

    # compute observed and expected histograms at each state
    for l in range(K):
        # compute FES at state l
        Nstart = 0
        for k in range(K):
            u_n[Nstart : Nstart + N_k[k]] = u_kln[k, l, 0 : N_k[k]]
            Nstart += N_k[k]
        fes.generate_fes(u_n, x_n, histogram_parameters=histogram_parameters)
        results = fes.get_fes(
            bin_center_i, reference_point="from-lowest", uncertainty_method="analytical"
        )
        f_i = results["f_i"]
        df_i = results["df_i"]

        # compute estimate of FES including Jacobian term
        fes_i = f_i + np.log(bin_width_i)
        # center fes
        fes_i -= fes_i.mean()
        # compute probability distribution
        p_i = np.exp(-f_i + f_i.min())
        p_i /= p_i.sum()
        # compute observed histograms, filtering to within [x_min,x_max] range
        N_i_observed = np.zeros([nbins])
        dN_i_observed = np.zeros([nbins])
        for t in range(T_k[l]):
            bin_index = bin_kt[l, t]
            N_i_observed[bin_index] += 1
        N = N_i_observed.sum()
        # estimate uncertainties in observed counts
        for bin_index in range(nbins):
            dN_i_observed[bin_index] = np.sqrt(
                g_k[l] * N_i_observed[bin_index] * (1.0 - N_i_observed[bin_index] / float(N))
            )
        # compute expected histograms
        N_i_expected = float(N) * p_i
        # only approximate, since correlations df_i df_j are neglected
        dN_i_expected = np.sqrt(float(N) * p_i * (1.0 - p_i))
        # plot
        print(f"state {l:d} ({biasing_force_k[l]:f} pN)")
        for bin_index in range(nbins):
            print(
                f"{bin_center_i[bin_index]:8.3f}",
                f"{N_i_expected[bin_index]:10f}",
                f"{N_i_observed[bin_index]:10f} +- {dN_i_observed[bin_index]:10f}",
            )

        # Write out observed bin counts
        filename = output_directory / f"counts-observed-{l:d}.out"
        with open(filename, "w") as outfile:
            for i in range(nbins):
                outfile.write(
                    f"{bin_center_i[i]:8.3f} {N_i_observed[i]:16f} {dN_i_observed[i]:16f}\n"
                )

        # write out expected bin counts
        filename = output_directory / f"counts-expected-{l:d}.out"
        with open(filename, "w") as outfile:
            for i in range(nbins):
                outfile.write(
                    f"{bin_center_i[i]:8.3f} {N_i_expected[i]:16f} {dN_i_expected[i]:16f}\n"
                )

        # compute FES from observed counts
        indices = np.where(N_i_observed > 0)[0]
        fes_i_observed = np.zeros([nbins])
        dfes_i_observed = np.zeros([nbins])
        fes_i_observed[indices] = -np.log(N_i_observed[indices]) + np.log(bin_width_i[indices])
        fes_i_observed[indices] -= fes_i_observed[indices].mean()  # shift observed FES
        dfes_i_observed[indices] = dN_i_observed[indices] / N_i_observed[indices]
        # write out observed FES
        filename = output_directory / f"fes-observed-{l:d}.out"
        with open(filename, "w") as outfile:
            for i in indices:
                outfile.write(
                    f"{bin_center_i[i]:8.3f} {fes_i_observed[i]:8.3f} {dfes_i_observed[i]:8.3f}\n"
                )

        # Write out unbiased estimate of FES
        fes_i -= fes_i[indices].mean()  # shift to align with observed
        filename = output_directory / f"fes-expected-{l:d}.out"
        with open(filename, "w") as outfile:
            for i in range(nbins):
                outfile.write(f"{bin_center_i[i]:8.3f} {fes_i[i]:8.3f} {df_i[i]:8.3f}\n")

        # make plots
        biasing_force = biasing_force_k[l]
        fig_filename = plot_directory / f"fes-comparison-{l:d}.pdf"
        fig, ax = plt.subplots()
        ax.errorbar(
            bin_center_i, fes_i, yerr=df_i, fmt="x ", elinewidth=0.3, label="MBAR optimal estimate"
        )
        ax.errorbar(
            bin_center_i,
            fes_i_observed,
            yerr=dfes_i_observed,
            fmt="x ",
            elinewidth=0.3,
            label="Observed from single experiment",
        )
        ax.set_title(f"{prefix.title()} - {biasing_force:.2f} pN")
        ax.set_ylabel("Free energy of profile (kT)")
        ax.set_xlabel("Extension (nm)")
        ax.legend()
        fig.savefig(fig_filename)


if __name__ == "__main__":
    main()


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-0.out
================================================
 494.896      3701.000374        58.541031
 503.672      3501.459165        57.063603
 504.992      2816.929479        51.558003
 505.929      2793.516982        51.356034
 506.689      2546.607513        49.162011
 507.343      2391.851151        47.722449
 507.929      2271.389473        46.563991
 508.465      2542.012528        49.120016
 508.968      2082.442491        44.673383
 509.452      2127.091875        45.128721
 509.918      1939.726148        43.179572
 510.372      1874.471166        42.475856
 510.820      1805.421265        41.716068
 511.269      1819.153717        41.868452
 511.720      1729.565108        40.862418
 512.177      1753.647089        41.135648
 512.644      1690.931379        40.419629
 513.126      1507.809663        38.240553
 513.636      1129.192462        33.221844
 514.182      1273.399977        35.227390
 514.771      1113.779939        32.999543
 515.424       951.093963        30.545087
 516.188      1055.190327        32.139101
 517.124       782.561256        27.754517
 518.363       739.693341        26.995378
 520.110       474.653286        21.682882
 522.124       373.055476        19.242455
 523.791       243.753459        15.574503
 524.970       175.008895        13.205920
 525.871       130.853353        11.424137
 526.616       118.970609        10.894381
 527.264        89.762731         9.465811
 527.846        75.190997         8.664752
 528.381        65.111477         8.063913
 528.885        57.132879         7.554310
 529.369        47.118781         6.861077
 529.840        39.624306         6.292289
 530.303        34.771036         5.894646
 530.764        27.349090         5.228205
 531.222        22.081390         4.698046
 531.685        19.751685         4.443409
 532.158        15.738728         3.966582
 532.649        12.963633         3.600038
 533.173        10.942440         3.307574
 533.743         8.412853         2.900248
 534.376         6.346576         2.519081
 535.103         5.050433         2.247203
 535.989         3.441465         1.855055
 537.233         2.169526         1.472899
 543.381         0.807067         0.898362


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-1.out
================================================
 494.896      2313.702359        46.974865
 503.672      2539.283830        49.095057
 504.992      2174.223836        45.603496
 505.929      2253.173772        46.385751
 506.689      2134.080496        45.199497
 507.343      2068.467176        44.529721
 507.929      2019.916808        44.026305
 508.465      2318.775876        47.023839
 508.968      1950.174445        43.291002
 509.452      2040.208817        44.237538
 509.918      1904.294186        42.799153
 510.372      1879.878524        42.534688
 510.820      1850.752461        42.216665
 511.269      1905.767810        42.815053
 511.720      1852.406856        42.234804
 512.177      1919.870552        42.966877
 512.644      1894.056851        42.688498
 513.126      1730.452081        40.872519
 513.636      1327.701202        35.950597
 514.182      1537.574164        38.604294
 514.771      1386.151162        36.711345
 515.424      1219.745512        34.496231
 516.188      1402.751625        36.924211
 517.124      1088.592916        32.632686
 518.363      1091.827941        32.680058
 520.110       763.851592        27.425940
 522.124       664.102637        25.598476
 523.791       472.166972        21.626561
 524.970       358.520430        18.866629
 525.871       280.226555        16.692993
 526.616       263.977390        16.204435
 527.264       205.392014        14.302038
 527.846       177.107402        13.284580
 528.381       157.442046        12.527820
 528.885       141.598722        11.882665
 529.369       119.578269        10.922101
 529.840       102.946291        10.135795
 530.303        92.323455         9.599635
 530.764        74.297045         8.613167
 531.222        61.353284         7.828027
 531.685        56.142395         7.488615
 532.158        45.756655         6.761271
 532.649        38.640615         6.213755
 533.173        33.453683         5.781981
 533.743        26.418960         5.138580
 534.376        20.554356         4.532759
 535.103        16.955081         4.116957
 535.989        12.043311         3.469929
 537.233         8.029054         2.833331
 543.381         3.290527         1.813921


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-10.out
================================================
 494.896        70.722425         8.403713
 503.672       140.994193        11.857344
 504.992       158.729321        12.578769
 505.929       199.829122        14.107817
 506.689       224.226544        14.940582
 507.343       250.021124        15.772473
 507.929       276.358346        16.578024
 508.465       355.186789        18.779341
 508.968       335.769539        18.262385
 509.452       390.742554        19.689819
 509.918       404.487995        20.030372
 510.372       438.996668        20.860065
 510.820       476.488808        21.724364
 511.269       540.428230        23.121137
 511.720       579.581998        23.934571
 512.177       662.342905        25.564994
 512.644       723.501784        26.702672
 513.126       736.479265        26.937543
 513.636       629.434163        24.930111
 514.182       820.550021        28.409223
 514.771       846.440962        28.846347
 515.424       851.588183        28.932406
 516.188      1149.354924        33.510216
 517.124      1092.411056        32.688588
 518.363      1431.695601        37.292098
 520.110      1475.944792        37.846751
 522.124      2010.560862        43.928507
 523.791      2071.802617        44.564058
 524.970      2013.730188        43.961665
 525.871      1916.021122        42.925498
 526.616      2112.904712        44.984635
 527.264      1884.804356        42.588198
 527.846      1848.485558        42.191795
 528.381      1846.640260        42.171538
 528.885      1853.291413        42.244498
 529.369      1738.930690        40.968928
 529.840      1661.830337        40.082374
 530.303      1641.765660        39.847933
 530.764      1462.834094        37.683371
 531.222      1335.321106        36.050790
 531.685      1352.073993        36.269986
 532.158      1218.325912        34.476652
 532.649      1149.713522        33.515320
 533.173      1114.431289        33.008971
 533.743       991.669012        31.176928
 534.376       885.258681        29.488727
 535.103       857.157633        29.025217
 535.989       733.010132        26.874971
 537.233       628.719850        24.916141
 543.381       408.409689        20.126443


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-11.out
================================================
 494.896        74.834655         8.644226
 503.672       148.268614        12.158493
 504.992       166.411673        12.878580
 505.929       209.045478        14.428149
 506.689       234.123221        15.265220
 507.343       260.645405        16.102381
 507.929       287.701908        16.912908
 508.465       369.297469        19.146014
 508.968       348.650912        18.606982
 509.452       405.247532        20.049015
 509.918       419.015707        20.383921
 510.372       454.280129        21.216803
 510.820       492.537145        22.083598
 511.269       558.023952        23.490341
 511.720       597.791653        24.303180
 512.177       682.402912        25.943967
 512.644       744.561244        27.082722
 513.126       756.995937        27.304488
 513.636       646.184583        25.255366
 514.182       841.265266        28.759533
 514.771       866.496239        29.180129
 515.424       870.451208        29.245470
 516.188      1172.700796        33.840748
 517.124      1112.054971        32.974561
 518.363      1453.018541        37.560528
 520.110      1491.373676        38.038004
 522.124      2021.356315        44.041329
 523.791      2074.349489        44.590256
 524.970      2010.658718        43.929532
 525.871      1908.890285        42.848723
 526.616      2101.323237        44.866603
 527.264      1871.599500        42.444573
 527.846      1832.886447        42.020197
 528.381      1828.657859        41.973540
 528.885      1832.985876        42.021294
 529.369      1717.844648        40.728673
 529.840      1639.754473        39.824347
 530.303      1618.196339        39.570509
 530.764      1440.184267        37.399220
 531.222      1313.166344        35.758611
 531.685      1328.129411        35.956235
 532.158      1195.400784        34.158763
 532.649      1126.671827        33.185600
 533.173      1090.709977        32.663696
 533.743       969.259228        30.829693
 534.376       863.915626        29.137409
 535.103       834.984817        28.653810
 535.989       712.555782        26.502850
 537.233       609.430839        24.535744
 543.381       393.707080        19.763779


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-12.out
================================================
 494.896        15.430832         3.927604
 503.672        35.820985         5.982919
 504.992        43.503565         6.592853
 505.929        57.823771         7.599796
 506.689        68.034436         8.242685
 507.343        78.908487         8.876033
 507.929        90.300385         9.494067
 508.465       119.794040        10.931927
 508.968       117.021816        10.804996
 509.452       140.318122        11.828962
 509.918       149.538450        12.210291
 510.372       166.670942        12.888575
 510.820       185.933713        13.610374
 511.269       216.685586        14.688313
 511.720       238.892765        15.419188
 512.177       280.605977        16.704227
 512.644       315.415974        17.703848
 513.126       330.979489        18.132527
 513.636       291.582900        17.025936
 514.182       392.989686        19.745908
 514.771       421.039399        20.432668
 515.424       439.893388        20.881170
 516.188       621.042077        24.765464
 517.124       625.031424        24.843875
 518.363       884.028026        29.468592
 520.110      1017.137452        31.566534
 522.124      1571.765123        39.017383
 523.791      1795.075121        41.600832
 524.970      1868.900603        42.415148
 525.871      1878.762155        42.522549
 526.616      2165.393420        45.514996
 527.264      2007.128698        43.892566
 527.846      2040.783433        44.243502
 528.381      2106.666461        44.921104
 528.885      2180.336456        45.664637
 529.369      2107.198031        44.926522
 529.840      2073.701778        44.583596
 530.303      2105.099473        44.905129
 530.764      1930.119164        43.076815
 531.222      1812.166708        41.791001
 531.685      1887.844916        42.621189
 532.158      1749.751277        41.091589
 532.649      1703.573947        40.565141
 533.173      1704.604883        40.576980
 533.743      1568.588704        38.979216
 534.376      1455.534353        37.592057
 535.103      1474.360731        37.827053
 535.989      1328.625812        35.962771
 537.233      1224.282916        34.558726
 543.381       915.312150        29.975927


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-13.out
================================================
 494.896         2.867677         1.693373
 503.672         7.709115         2.776315
 504.992        10.095481         3.177018
 505.929        14.165116         3.763124
 506.689        17.474302         4.179497
 507.343        21.081692         4.590512
 507.929        24.975926         4.996344
 508.465        34.199535         5.846036
 508.968        34.521734         5.873491
 509.452        42.652043         6.528067
 509.918        46.795220         6.837501
 510.372        53.561838         7.314674
 510.820        61.413292         7.831849
 511.269        73.539451         8.569206
 511.720        83.346813         9.121835
 512.177       100.626367        10.021170
 512.644       116.393968        10.776039
 513.126       125.906275        11.206660
 513.636       114.336418        10.680588
 514.182       159.322501        12.602176
 514.771       177.285822        13.291246
 515.424       192.359173        13.842656
 516.188       284.083560        16.806829
 517.124       302.779945        17.347808
 518.363       462.377939        21.403319
 520.110       593.992416        24.226760
 522.124      1041.200040        31.929893
 523.791      1317.125052        35.811013
 524.970      1468.468964        37.753688
 525.871      1559.522699        38.870046
 526.616      1878.570117        42.520461
 527.264      1809.285096        41.759009
 527.846      1907.162307        42.830094
 528.381      2034.311304        44.176270
 528.885      2171.234316        45.573558
 529.369      2161.368963        45.474593
 529.840      2190.311306        45.764200
 530.303      2284.720222        46.693911
 530.764      2155.630470        45.416909
 531.222      2081.663909        44.665394
 531.685      2231.177852        46.169414
 532.158      2127.116035        45.128966
 532.649      2136.673748        45.225726
 533.173      2207.026568        45.930461
 533.743      2100.241192        44.855556
 534.376      2025.855273        44.088247
 535.103      2146.834627        45.328321
 535.989      2038.896548        44.223914
 537.233      2019.214514        44.018973
 543.381      1748.525259        41.077712


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-14.out
================================================
 494.896         0.479734         0.692625
 503.672         1.486223         1.219090
 504.992         2.097724         1.448322
 505.929         3.106600         1.762500
 506.689         4.017774         2.004358
 507.343         5.042053         2.245338
 507.929         6.183781         2.486567
 508.465         8.739717         2.956043
 508.968         9.115995         3.018995
 509.452        11.605248         3.406252
 509.918        13.108017         3.620025
 510.372        15.407547         3.924640
 510.820        18.157286         4.260363
 511.269        22.340590         4.725527
 511.720        26.029058         5.100540
 512.177        32.300785         5.681542
 512.644        38.447273         6.198202
 513.126        42.873104         6.544948
 513.636        40.133170         6.332532
 514.182        57.820052         7.599552
 514.771        66.824529         8.169163
 515.424        75.302878         8.671186
 516.188       116.336286        10.773375
 517.124       131.325084        11.444656
 518.363       216.635805        14.686633
 520.110       310.856426        17.576228
 522.124       618.072117        24.706919
 523.791       865.496455        29.163586
 524.970      1033.052308        31.807363
 525.871      1158.898371        33.645764
 526.616      1458.939475        37.634683
 527.264      1459.981056        37.647711
 527.846      1595.415550        39.300236
 528.381      1758.461046        41.190015
 528.885      1935.435954        43.133719
 529.369      1984.442462        43.654120
 529.840      2070.860482        44.554363
 530.303      2219.616491        46.055212
 530.764      2155.019532        45.410762
 531.222      2140.467707        45.264066
 531.685      2360.421863        47.423518
 532.158      2314.694303        46.984445
 532.649      2398.870716        47.788901
 533.173      2557.939869        49.265391
 533.743      2517.286261        48.893268
 534.376      2524.141762        48.956265
 535.103      2798.535026        51.399407
 535.989      2801.388067        51.424047
 537.233      2982.954325        52.962194
 543.381      3013.836065        53.218154


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-15.out
================================================
 494.896         0.093341         0.305517
 503.672         0.326441         0.571348
 504.992         0.491981         0.701410
 505.929         0.763943         0.874031
 506.689         1.029884         1.014822
 507.343         1.338065         1.156732
 507.929         1.691744         1.300649
 508.465         2.458477         1.567915
 508.968         2.639330         1.624559
 509.452         3.449762         1.857289
 509.918         3.997392         1.999268
 510.372         4.809800         2.193020
 510.820         5.806671         2.409564
 511.269         7.317151         2.704825
 511.720         8.734967         2.955240
 512.177        11.104995         3.332046
 512.644        13.555455         3.681274
 513.126        15.525804         3.939668
 513.636        14.927135         3.862988
 514.182        22.146419         4.704956
 514.771        26.463693         5.142926
 515.424        30.832535         5.550993
 516.188        49.561448         7.036499
 517.124        58.854034         7.667122
 518.363       103.949157        10.184942
 520.110       164.465826        12.803314
 522.124       365.338218        19.043865
 523.791       559.166623        23.514108
 524.970       708.548290        26.429292
 525.871       834.056980        28.638156
 526.616      1091.524012        32.675610
 527.264      1129.715263        33.229356
 527.846      1274.245932        35.238784
 528.381      1445.547740        37.466726
 528.885      1634.663996        39.764576
 529.369      1720.215310        40.755766
 529.840      1842.051493        42.121116
 530.303      2022.143905        44.049547
 530.764      2013.387095        43.958077
 531.222      2049.927366        44.338283
 531.685      2317.904332        47.015431
 532.158      2330.112857        47.133049
 532.649      2482.169844        48.568987
 533.173      2721.934441        50.732198
 533.743      2759.018510        51.056585
 534.376      2862.661088        51.949634
 535.103      3302.731587        55.538913
 535.989      3463.062385        56.773289
 537.233      3931.784150        60.188085
 543.381      4581.753134        64.512820


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-2.out
================================================
 494.896      2088.020847        44.730574
 503.672      2358.996570        47.409907
 504.992      2045.115104        44.288432
 505.929      2138.088633        45.240028
 506.689      2040.610518        44.241708
 507.343      1990.359284        43.716458
 507.929      1954.520625        43.337254
 508.465      2255.136016        46.404992
 508.968      1906.649444        42.824563
 509.452      2004.240406        43.862294
 509.918      1879.447320        42.530000
 510.372      1863.275303        42.353741
 510.820      1842.465953        42.125673
 511.269      1905.492527        42.812083
 511.720      1860.344481        42.321707
 512.177      1936.578999        43.145941
 512.644      1919.304510        42.960795
 513.126      1762.056793        41.230570
 513.636      1358.516477        36.353888
 514.182      1581.645360        39.135832
 514.771      1434.538049        37.328006
 515.424      1269.928587        35.180594
 516.188      1470.999074        37.785213
 517.124      1151.968093        33.547392
 518.363      1169.218125        33.791666
 520.110       832.280399        28.608156
 522.124       738.349275        26.971208
 523.791       533.873621        22.982019
 524.970       409.929491        20.163547
 525.871       323.262410        17.921285
 526.616       306.684603        17.458622
 527.264       240.093306        15.457697
 527.846       208.232688        14.400190
 528.381       186.084947        13.615888
 528.885       168.186642        12.946849
 529.369       142.705662        11.928888
 529.840       123.434846        11.096401
 530.303       111.180369        10.532481
 530.764        89.882391         9.472107
 531.222        74.558532         8.628288
 531.685        68.537098         8.273038
 532.158        56.111078         7.486528
 532.649        47.621734         6.897563
 533.173        41.438898         6.434637
 533.743        32.900978         5.734050
 534.376        25.755889         5.073719
 535.103        21.399093         4.624925
 535.989        15.326790         3.914344
 537.233        10.333365         3.214223
 543.381         4.318794         2.078081


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-3.out
================================================
 494.896      1257.910671        35.018051
 503.672      1614.718903        39.529389
 504.992      1480.167987        37.899209
 505.929      1609.812001        39.471282
 506.689      1590.122109        39.237130
 507.343      1595.527414        39.301568
 507.929      1606.624389        39.433483
 508.465      1896.603410        42.716055
 508.968      1641.905531        39.849573
 509.452      1763.510875        41.246957
 509.918      1688.698476        40.393866
 510.372      1706.583675        40.599694
 510.820      1721.147718        40.766417
 511.269      1815.153496        41.824130
 511.720      1807.748714        41.741941
 512.177      1919.371730        42.961517
 512.644      1941.836122        43.202101
 513.126      1822.141641        41.901523
 513.636      1435.812575        37.344095
 514.182      1712.115290        40.663110
 514.771      1595.753364        39.304259
 515.424      1451.371492        37.539871
 516.188      1736.447448        40.940719
 517.124      1416.611471        37.100886
 518.363      1517.113796        38.354675
 520.110      1167.574397        33.768473
 522.124      1134.288334        33.294987
 523.791       884.583149        29.477676
 524.970       714.178147        26.532568
 525.871       586.092656        24.067043
 526.616       574.057105        23.821551
 527.264       462.019570        21.395101
 527.846       411.287780        20.196649
 528.381       376.322393        19.325890
 528.885       347.757269        18.583287
 529.369       301.425842        17.309208
 529.840       266.286132        16.274765
 530.303       244.590141        15.601079
 530.764       201.849522        14.178669
 531.222       170.865415        13.049196
 531.685       160.314114        12.641207
 532.158       133.940728        11.557765
 532.649       116.257590        10.769739
 533.173       103.500037        10.162962
 533.743        84.182570         9.167379
 534.376        67.756811         8.225873
 535.103        58.147402         7.621009
 535.989        43.235968         6.572563
 537.233        30.662893         5.535710
 543.381        14.013736         3.742968


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-4.out
================================================
 494.896      1111.004781        32.959341
 503.672      1466.324239        37.726941
 504.992      1360.857789        36.384325
 505.929      1493.084468        38.059144
 506.689      1486.116626        37.972961
 507.343      1500.586097        38.151683
 507.929      1519.469897        38.383514
 508.465      1802.852825        41.687495
 508.968      1568.969500        38.983794
 509.452      1693.256221        40.446432
 509.918      1628.985949        39.697784
 510.372      1653.268121        39.982524
 510.820      1674.703802        40.231967
 511.269      1773.859762        41.363368
 511.720      1774.449448        41.369989
 512.177      1892.305950        42.669538
 512.644      1923.236566        43.003021
 513.126      1813.477466        41.805543
 513.636      1435.928144        37.345553
 514.182      1721.383869        40.769114
 514.771      1614.134573        39.522474
 515.424      1476.944698        37.859178
 516.188      1779.795781        41.429969
 517.124      1465.243366        37.713454
 518.363      1588.078093        39.212731
 520.110      1243.604183        34.823457
 522.124      1232.783734        34.675476
 523.791       977.644105        30.960109
 524.970       798.148960        28.025134
 525.871       660.827302        25.536120
 526.616       651.859413        25.364562
 527.264       527.872378        22.853870
 527.846       472.637598        21.637233
 528.381       434.730993        20.759363
 528.885       403.717648        20.011444
 529.369       351.591498        18.684731
 529.840       312.064604        17.610137
 530.303       287.888113        16.918349
 530.764       238.671102        15.412067
 531.222       202.946972        14.217005
 531.685       191.282705        13.804018
 532.158       160.537370        12.649977
 532.649       140.040037        11.817268
 533.173       125.307058        11.180028
 533.743       102.467613        10.112251
 534.376        82.984918         9.102043
 535.103        71.730186         8.463290
 535.989        53.781541         7.329645
 537.233        38.574195         6.208417
 543.381        17.987741         4.240433


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-5.out
================================================
 494.896       510.237704        22.472892
 503.672       781.785205        27.740970
 504.992       776.434345        27.647375
 505.929       893.892140        29.629568
 506.689       927.811132        30.176058
 507.343       969.858155        30.839028
 507.929      1012.619440        31.497801
 508.465      1235.502371        34.712722
 508.968      1106.749391        32.897591
 509.452      1226.277840        34.586163
 509.918      1210.309859        34.365868
 510.372      1257.471232        35.012092
 510.820      1304.867716        35.648480
 511.269      1415.536000        37.087210
 511.720      1450.851781        37.533350
 512.177      1585.035194        39.176376
 512.644      1652.016655        39.967906
 513.126      1599.925496        39.353910
 513.636      1301.066931        35.597913
 514.182      1606.026010        39.426382
 514.771      1556.962102        38.839149
 515.424      1472.572942        37.804808
 516.188      1846.133245        42.165971
 517.124      1597.914685        39.329989
 518.363      1850.031257        42.208754
 520.110      1594.266988        39.286553
 522.124      1765.940495        41.274321
 523.791      1535.255220        38.576094
 524.970      1332.362654        36.011926
 525.871      1158.109028        33.634576
 526.616      1187.770965        34.052239
 527.264       994.915482        31.226885
 527.846       919.615055        30.044987
 528.381       870.616828        29.248203
 528.885       830.725184        28.581867
 529.369       742.551675        27.046701
 529.840       676.304189        25.829372
 530.303       639.012442        25.116642
 530.764       543.271244        23.181207
 531.222       473.542087        21.657729
 531.685       457.633804        21.294253
 532.158       393.727724        19.764293
 532.649       353.016206        18.722281
 533.173       324.820991        17.964154
 533.743       273.570235        16.494648
 534.376       229.212500        15.105023
 535.103       206.129144        14.327573
 535.989       161.801482        12.699523
 537.233       123.495169        11.099106
 543.381        64.444384         8.022551


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-6.out
================================================
 494.896       245.421426        15.627437
 503.672       420.331068        20.415619
 504.992       439.791046        20.878762
 505.929       525.467876        22.802314
 506.689       563.338603        23.600669
 507.343       604.843759        24.444366
 507.929       646.626052        25.263878
 508.465       806.155032        28.163049
 508.968       738.448020        26.972985
 509.452       835.015198        28.654322
 509.918       840.598356        28.748326
 510.372       889.304560        29.554819
 510.820       940.184877        30.372783
 511.269      1038.922335        31.895692
 511.720      1085.033633        32.580480
 512.177      1207.716746        34.329945
 512.644      1283.484794        35.362949
 513.126      1268.954077        35.167445
 513.636      1053.406693        32.112511
 514.182      1330.067286        35.981741
 514.771      1323.056407        35.889369
 515.424      1283.796691        35.367132
 516.188      1659.446946        40.054609
 517.124      1493.098756        38.059321
 518.363      1819.578585        41.873157
 520.110      1688.765911        40.394645
 522.124      2038.143700        44.216096
 523.791      1901.680701        42.770935
 524.970      1729.907648        40.866319
 525.871      1561.162858        38.889822
 526.616      1650.045234        39.944865
 527.264      1418.685173        37.127238
 527.846      1343.936089        36.163695
 528.381      1301.007819        35.597126
 528.885      1267.666936        35.150069
 529.369      1156.142718        33.606687
 529.840      1074.207794        32.421125
 530.303      1033.908385        31.820262
 530.764       896.267272        29.668188
 531.222       796.329266        27.993686
 531.685       784.603128        27.790126
 532.158       688.106927        26.050664
 532.649       630.187201        24.944829
 533.173       592.506604        24.196804
 533.743       510.530435        22.479271
 534.376       439.139475        20.863427
 535.103       407.195490        20.096749
 535.989       331.174970        18.137845
 537.233       265.266356        16.243738
 543.381       151.343087        12.283525


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-7.out
================================================
 494.896       530.676214        22.913836
 503.672       807.708350        28.189723
 504.992       799.718852        28.052234
 505.929       918.688971        30.030138
 506.689       951.734982        30.555179
 507.343       993.301119        31.202054
 507.929      1035.653417        31.846536
 508.465      1262.003566        35.073501
 508.968      1129.005013        33.219151
 509.452      1249.441140        34.902995
 509.918      1231.738120        34.661139
 510.372      1278.372507        35.294302
 510.820      1325.103317        35.916366
 511.269      1435.928032        37.345552
 511.720      1470.127199        37.774353
 512.177      1604.331063        39.406262
 512.644      1670.215328        40.179882
 513.126      1615.586480        39.539652
 513.636      1312.210997        35.745951
 514.182      1617.628622        39.563799
 514.771      1565.837773        38.946127
 515.424      1478.739906        37.881479
 516.188      1850.533424        42.214262
 517.124      1598.077887        39.331931
 518.363      1844.663395        42.149825
 520.110      1582.728963        39.148797
 522.124      1744.336498        41.030261
 523.791      1510.167621        38.269511
 524.970      1306.961340        35.676300
 525.871      1133.523068        33.284014
 526.616      1160.499369        33.668445
 527.264       970.580076        30.850277
 527.846       895.825177        29.661003
 528.381       846.983195        28.855426
 528.885       807.179360        28.180642
 529.369       720.651628        26.650795
 529.840       655.588405        25.436047
 530.303       618.765850        24.720607
 530.764       525.456569        22.802072
 531.222       457.498484        21.291134
 531.685       441.626587        20.921900
 532.158       379.527481        19.407387
 532.649       339.859858        18.372527
 533.173       312.318710        17.617260
 533.743       262.688009        16.165021
 534.376       219.754953        14.791522
 535.103       197.268491        14.017496
 535.989       154.523645        12.411531
 537.233       117.606712        10.831901
 543.381        61.054279         7.808952


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-8.out
================================================
 494.896       202.873662        14.214447
 503.672       356.517718        18.814240
 504.992       377.614781        19.358794
 505.929       455.131473        21.236492
 506.689       491.658296        22.064083
 507.343       531.217926        22.925402
 507.929       571.081781        23.760452
 508.465       715.595097        26.558493
 508.968       658.945711        25.500226
 509.452       748.691781        27.156601
 509.918       757.211944        27.308324
 510.372       804.504842        28.134681
 510.820       854.271808        28.977167
 511.269       948.094966        30.497824
 511.720       994.561054        31.221435
 512.177      1111.887463        32.972134
 512.644      1187.065999        34.042378
 513.126      1179.344817        33.934168
 513.636       983.778335        31.055144
 514.182      1248.783288        34.894041
 514.771      1249.748483        34.907178
 515.424      1219.995596        34.499678
 516.188      1588.367420        39.216185
 517.124      1442.250347        37.425240
 518.363      1778.990167        41.420937
 520.110      1680.213177        40.295792
 522.124      2069.159600        44.536852
 523.791      1962.917058        43.426446
 524.970      1805.466628        41.716573
 525.871      1643.791037        39.871670
 526.616      1749.714556        41.091173
 527.264      1513.645281        38.312176
 527.846      1442.205198        37.424672
 528.381      1403.479098        36.933508
 528.885      1374.266216        36.558092
 529.369      1259.310197        35.037023
 529.840      1175.567387        33.881089
 530.303      1136.396295        33.325191
 530.764       989.630838        31.145521
 531.222       883.251426        29.455878
 531.685       874.214100        29.307492
 532.158       770.164020        27.537265
 532.649       708.868005        26.435168
 533.173       669.877181        25.708023
 533.743       580.302162        23.949262
 534.376       502.251359        22.298122
 535.103       469.085599        21.556548
 535.989       384.712287        19.538480
 537.233       311.676021        17.599238
 543.381       181.650519        13.453274


================================================
FILE: examples/constant-force-optical-trap/output/counts-expected-9.out
================================================
 494.896       193.232482        13.873922
 503.672       341.757438        18.423395
 504.992       363.089161        18.985586
 505.929       438.579080        20.850229
 506.689       474.679044        21.683465
 507.343       513.680814        22.547804
 507.929       552.996963        23.385484
 508.465       693.813401        26.156947
 508.968       639.727717        25.130513
 509.452       727.726775        26.779377
 509.918       736.864776        26.944487
 510.372       783.720651        27.774742
 510.820       833.114853        28.622251
 511.269       925.618718        30.141057
 511.720       972.056720        30.873271
 512.177      1087.922298        32.622857
 512.644      1162.810690        33.701159
 513.126      1156.651845        33.613910
 513.636       966.019065        30.779136
 514.182      1227.873506        34.608092
 514.771      1230.684949        34.646692
 515.424      1203.197888        34.267247
 516.188      1569.318901        38.987994
 517.124      1428.210500        37.248017
 518.363      1767.008296        41.286341
 520.110      1676.209050        40.249416
 522.124      2074.668980        44.593542
 523.791      1976.318762        43.568361
 524.970      1822.823348        41.909064
 525.871      1663.257564        40.098991
 526.616      1773.569790        41.360111
 527.264      1536.638916        38.592923
 527.846      1466.230708        37.725774
 528.381      1428.731425        37.254610
 528.885      1400.717051        36.898196
 529.369      1285.068105        35.384179
 529.840      1201.020558        34.236991
 530.303      1162.264164        33.693427
 530.764      1013.316816        31.508421
 531.222       905.410173        29.816352
 531.685       897.166116        29.682789
 532.158       791.276307        27.906163
 532.649       729.209726        26.806245
 533.173       689.975770        26.085522
 533.743       598.515638        24.317714
 534.376       518.816786        22.659068
 535.103       485.431213        21.925290
 535.989       398.950668        19.893904
 537.233       324.132731        17.945236
 543.381       189.923105        13.755061


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-0.out
================================================
 494.896      2755.000000       407.379024
 503.672      2583.000000       395.174739
 504.992      2449.000000       385.331182
 505.929      2337.000000       376.859943
 506.689      2239.000000       369.252707
 507.343      2168.000000       363.620906
 507.929      2139.000000       361.290225
 508.465      2142.000000       361.532164
 508.968      2055.000000       354.435741
 509.452      2054.000000       354.353189
 509.918      1985.000000       348.601023
 510.372      1883.000000       339.886853
 510.820      1881.000000       339.713362
 511.269      1851.000000       337.098469
 511.720      1737.000000       326.939204
 512.177      1805.000000       333.042402
 512.644      1734.000000       326.666903
 513.126      1674.000000       321.164908
 513.636      1619.000000       316.024519
 514.182      1623.000000       316.401593
 514.771      1510.000000       305.544521
 515.424      1424.000000       296.979044
 516.188      1375.000000       291.971924
 517.124      1276.000000       281.550783
 518.363      1092.000000       260.952346
 520.110       768.000000       219.565593
 522.124       356.000000       150.113004
 523.791       188.000000       109.271234
 524.970       104.000000        81.340993
 525.871       112.000000        84.404770
 526.616       104.000000        81.340993
 527.264        83.000000        72.681389
 527.846        92.000000        76.513652
 528.381        72.000000        67.701496
 528.885        85.000000        73.550382
 529.369        57.000000        60.246896
 529.840        69.000000        66.278033
 530.303        68.000000        65.796664
 530.764        54.000000        58.641784
 531.222        57.000000        60.246896
 531.685        60.000000        61.810154
 532.158        47.000000        54.712890
 532.649        45.000000        53.537202
 533.173        34.000000        46.541104
 533.743        41.000000        51.104452
 534.376        23.000000        38.283263
 535.103        27.000000        41.477209
 535.989        22.000000        37.442144
 537.233        17.000000        32.915129
 543.381        25.000000        39.912262


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-1.out
================================================
 494.896      2652.000000       491.611384
 503.672      2561.000000       483.567276
 504.992      2300.000000       459.523217
 505.929      2221.000000       451.936230
 506.689      2275.000000       457.138733
 507.343      2173.000000       447.250448
 507.929      2007.000000       430.573192
 508.465      2074.000000       437.395509
 508.968      1929.000000       422.466273
 509.452      1942.000000       423.830114
 509.918      1997.000000       429.543918
 510.372      1862.000000       415.353822
 510.820      1823.000000       411.147413
 511.269      1857.000000       414.817317
 511.720      1792.000000       407.767784
 512.177      1723.000000       400.126327
 512.644      1695.000000       396.976909
 513.126      1652.000000       392.083557
 513.636      1663.000000       393.342001
 514.182      1584.000000       384.199144
 514.771      1445.000000       367.481309
 515.424      1416.000000       363.883709
 516.188      1397.000000       361.504821
 517.124      1231.000000       339.926720
 518.363      1163.000000       330.634903
 520.110       871.000000       286.987110
 522.124       449.000000       206.934896
 523.791       227.000000       147.466777
 524.970       215.000000       143.533355
 525.871       167.000000       126.561351
 526.616       140.000000       115.910961
 527.264       161.000000       124.274479
 527.846       127.000000       110.412682
 528.381       128.000000       110.845414
 528.885       128.000000       110.845414
 529.369        88.000000        91.945012
 529.840        97.000000        96.523608
 530.303        90.000000        92.982109
 530.764        85.000000        90.366893
 531.222       100.000000        98.001929
 531.685        78.000000        86.572038
 532.158        78.000000        86.572038
 532.649        69.000000        81.431799
 533.173        44.000000        65.043592
 533.743        58.000000        74.667449
 534.376        45.000000        65.777913
 535.103        37.000000        59.649865
 535.989        34.000000        57.182232
 537.233        28.000000        51.895145
 543.381        22.000000        46.002891


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-10.out
================================================
 494.896       209.000000       171.864223
 503.672       267.000000       194.139931
 504.992       292.000000       202.974501
 505.929       346.000000       220.826953
 506.689       332.000000       216.343718
 507.343       341.000000       219.236614
 507.929       375.000000       229.827929
 508.465       414.000000       241.388524
 508.968       367.000000       227.381541
 509.452       413.000000       241.099247
 509.918       425.000000       244.547224
 510.372       444.000000       249.905905
 510.820       451.000000       251.850391
 511.269       440.000000       248.787696
 511.720       489.000000       262.145369
 512.177       506.000000       266.617374
 512.644       495.000000       263.732737
 513.126       518.000000       269.727616
 513.636       518.000000       269.727616
 514.182       610.000000       292.429608
 514.771       658.000000       303.569568
 515.424       644.000000       300.365344
 516.188       738.000000       321.233709
 517.124       783.000000       330.731348
 518.363       871.000000       348.509764
 520.110      1203.000000       408.193689
 522.124      1546.000000       461.112052
 523.791      1752.000000       489.828014
 524.970      1726.000000       486.310839
 525.871      1807.000000       497.173495
 526.616      1790.000000       494.916567
 527.264      1726.000000       486.310839
 527.846      1729.000000       486.718165
 528.381      1726.000000       486.310839
 528.885      1682.000000       480.290925
 529.369      1629.000000       472.922510
 529.840      1708.000000       483.858573
 530.303      1539.000000       460.100184
 530.764      1588.000000       467.130982
 531.222      1529.000000       458.650259
 531.685      1492.000000       453.239766
 532.158      1445.000000       446.259848
 532.649      1497.000000       453.975182
 533.173      1398.000000       439.154732
 533.743      1468.000000       449.690831
 534.376      1362.000000       433.624007
 535.103      1335.000000       429.423599
 535.989      1272.000000       419.439918
 537.233      1150.000000       399.317290
 543.381       955.000000       364.616205


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-11.out
================================================
 494.896       157.000000       138.463500
 503.672       248.000000       173.865936
 504.992       293.000000       188.897399
 505.929       278.000000       184.026380
 506.689       310.000000       194.266867
 507.343       343.000000       204.277574
 507.929       346.000000       205.162773
 508.465       381.000000       215.213685
 508.968       378.000000       214.371192
 509.452       443.000000       231.919763
 509.918       460.000000       236.287261
 510.372       461.000000       236.541568
 510.820       506.000000       247.705088
 511.269       540.000000       255.803998
 511.720       514.000000       249.635374
 512.177       560.000000       260.445367
 512.644       603.000000       270.142139
 513.126       596.000000       268.588602
 513.636       657.000000       281.824569
 514.182       652.000000       280.764353
 514.771       724.000000       295.644904
 515.424       774.000000       305.528090
 516.188       780.000000       306.691329
 517.124       909.000000       330.648284
 518.363      1059.000000       356.342638
 520.110      1212.000000       380.619653
 522.124      1538.000000       427.328862
 523.791      1612.000000       437.154292
 524.970      1588.000000       433.995427
 525.871      1603.000000       435.972779
 526.616      1561.000000       430.410074
 527.264      1592.000000       434.523724
 527.846      1611.000000       437.023193
 528.381      1577.000000       432.538813
 528.885      1575.000000       432.273373
 529.369      1589.000000       434.127570
 529.840      1572.000000       431.874865
 530.303      1603.000000       435.972779
 530.764      1596.000000       435.051290
 531.222      1471.000000       418.206135
 531.685      1534.000000       426.790418
 532.158      1411.000000       409.841450
 532.649      1486.000000       420.268014
 533.173      1377.000000       405.015121
 533.743      1438.000000       413.629130
 534.376      1382.000000       405.728913
 535.103      1432.000000       412.790801
 535.989      1274.000000       389.985523
 537.233      1314.000000       395.897830
 543.381      1080.000000       359.781223


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-12.out
================================================
 494.896        84.000000        91.135617
 503.672       124.000000       110.684105
 504.992       145.000000       119.664951
 505.929       125.000000       111.128401
 506.689       179.000000       132.911127
 507.343       182.000000       134.016245
 507.929       208.000000       143.232001
 508.465       185.000000       135.112191
 508.968       210.000000       143.916079
 509.452       225.000000       148.944853
 509.918       228.000000       149.930012
 510.372       246.000000       155.707725
 510.820       252.000000       157.585658
 511.269       272.000000       163.686761
 511.720       292.000000       169.563814
 512.177       306.000000       173.556665
 512.644       316.000000       176.352014
 513.126       348.000000       185.006336
 513.636       354.000000       186.583128
 514.182       382.000000       193.767045
 514.771       390.000000       195.769722
 515.424       431.000000       205.718013
 516.188       492.000000       219.658922
 517.124       556.000000       233.358057
 518.363       606.000000       243.501711
 520.110       881.000000       292.779941
 522.124      1391.000000       365.974238
 523.791      1580.000000       389.286679
 524.970      1715.000000       405.010970
 525.871      1787.000000       413.116899
 526.616      1761.000000       410.211123
 527.264      1789.000000       413.339440
 527.846      1921.000000       427.730286
 528.381      1849.000000       419.952061
 528.885      1761.000000       410.211123
 529.369      1909.000000       426.445440
 529.840      1737.000000       407.507562
 530.303      1883.000000       423.645929
 530.764      1886.000000       423.970054
 531.222      1846.000000       419.624309
 531.685      1823.000000       417.101563
 532.158      1852.000000       420.279516
 532.649      1765.000000       410.659716
 533.173      1781.000000       412.448440
 533.743      1776.000000       411.890431
 534.376      1752.000000       409.199708
 535.103      1655.000000       398.110276
 535.989      1667.000000       399.501379
 537.233      1660.000000       398.690579
 543.381      1435.000000       371.549134


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-13.out
================================================
 494.896         4.000000        10.615086
 503.672         5.000000        11.867908
 504.992        13.000000        19.134895
 505.929        16.000000        21.227623
 506.689        17.000000        21.880715
 507.343        10.000000        16.782917
 507.929        14.000000        19.857021
 508.465        16.000000        21.227623
 508.968        24.000000        25.996342
 509.452        26.000000        27.057310
 509.918        30.000000        29.063050
 510.372        31.000000        29.543167
 510.820        53.000000        38.620556
 511.269        38.000000        32.706765
 511.720        39.000000        33.133991
 512.177        53.000000        38.620556
 512.644        61.000000        41.429598
 513.126        68.000000        43.739098
 513.636        54.000000        38.982808
 514.182        69.000000        44.059094
 514.771        79.000000        47.139076
 515.424        92.000000        50.863340
 516.188       148.000000        64.475992
 517.124       138.000000        62.265900
 518.363       230.000000        80.310738
 520.110       440.000000       110.845449
 522.124       852.000000       153.602613
 523.791      1149.000000       177.837205
 524.970      1362.000000       193.197850
 525.871      1432.000000       197.957746
 526.616      1492.000000       201.937501
 527.264      1648.000000       211.890607
 527.846      1660.000000       212.634264
 528.381      1814.000000       221.924352
 528.885      1851.000000       224.090129
 529.369      1903.000000       227.093273
 529.840      1985.000000       231.736585
 530.303      1958.000000       230.219848
 530.764      2130.000000       239.688609
 531.222      2139.000000       240.171880
 531.685      2137.000000       240.064587
 532.158      2287.000000       247.957543
 532.649      2312.000000       249.243792
 533.173      2311.000000       249.192497
 533.743      2421.000000       254.759818
 534.376      2505.000000       258.912901
 535.103      2560.000000       261.588232
 535.989      2688.000000       267.686313
 537.233      2697.000000       268.108570
 543.381      2939.000000       279.161967


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-14.out
================================================
 494.896         2.000000         5.861478
 503.672         5.000000         9.267532
 504.992         5.000000         9.267532
 505.929         2.000000         5.861478
 506.689         6.000000        10.151971
 507.343        10.000000        13.105614
 507.929        11.000000        13.745147
 508.465         7.000000        10.965273
 508.968        10.000000        13.105614
 509.452         4.000000         8.289216
 509.918        19.000000        18.063217
 510.372        15.000000        16.050231
 510.820        27.000000        21.531060
 511.269        29.000000        22.313815
 511.720        25.000000        20.718687
 512.177        24.000000        20.300287
 512.644        31.000000        23.069968
 513.126        21.000000        18.989750
 513.636        34.000000        24.159757
 514.182        39.000000        25.874006
 514.771        34.000000        24.159757
 515.424        48.000000        28.702047
 516.188        65.000000        33.394506
 517.124        84.000000        37.955555
 518.363       120.000000        45.349203
 520.110       296.000000        71.097993
 522.124       669.000000       106.485098
 523.791       921.000000       124.621647
 524.970      1033.000000       131.831055
 525.871      1177.000000       140.512927
 526.616      1380.000000       151.831834
 527.264      1426.000000       154.268592
 527.846      1534.000000       159.825874
 528.381      1691.000000       167.533494
 528.885      1650.000000       165.560233
 529.369      1818.000000       173.482299
 529.840      1923.000000       178.227264
 530.303      1949.000000       179.379559
 530.764      1958.000000       179.776409
 531.222      2093.000000       185.609380
 531.685      2223.000000       191.027102
 532.158      2376.000000       197.175055
 532.649      2396.000000       197.961597
 533.173      2585.000000       205.212575
 533.743      2558.000000       204.196166
 534.376      2739.000000       210.893545
 535.103      2853.000000       214.977860
 535.989      3055.000000       221.981150
 537.233      3219.000000       227.463154
 543.381      3801.000000       245.629792


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-15.out
================================================
 494.896         3.000000         4.904183
 503.672         3.000000         4.904183
 504.992         3.000000         4.904183
 505.929         3.000000         4.904183
 506.689         2.000000         4.004289
 507.343         5.000000         6.331147
 507.929         8.000000         8.008098
 508.465         7.000000         7.490964
 508.968        12.000000         9.807484
 509.452         5.000000         6.331147
 509.918        12.000000         9.807484
 510.372        11.000000         9.390045
 510.820        15.000000        10.964771
 511.269        17.000000        11.672657
 511.720         7.000000         7.490964
 512.177        20.000000        12.660394
 512.644        19.000000        12.339949
 513.126        24.000000        13.868212
 513.636        21.000000        12.972914
 514.182        38.000000        17.448006
 514.771        34.000000        16.504822
 515.424        39.000000        17.675918
 516.188        50.000000        20.011832
 517.124        69.000000        23.504109
 518.363       108.000000        29.394186
 520.110       216.000000        41.524640
 522.124       593.000000        68.541830
 523.791       868.000000        82.694417
 524.970      1027.000000        89.804414
 525.871      1203.000000        97.020494
 526.616      1313.000000       101.244858
 527.264      1381.000000       103.760954
 527.846      1535.000000       109.220059
 528.381      1573.000000       110.520350
 528.885      1730.000000       115.716638
 529.369      1719.000000       115.361309
 529.840      1805.000000       118.106474
 530.303      2012.000000       124.426940
 530.764      1977.000000       123.384920
 531.222      2202.000000       129.911509
 531.685      2279.000000       132.056882
 532.158      2260.000000       131.531428
 532.649      2444.000000       136.517198
 533.173      2627.000000       141.263378
 533.743      2664.000000       142.199148
 534.376      2829.000000       146.281068
 535.103      2943.000000       149.018901
 535.989      3097.000000       152.617741
 537.233      3374.000000       158.825681
 543.381      3794.000000       167.660963


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-2.out
================================================
 494.896      2026.000000       372.540684
 503.672      1989.000000       369.265547
 504.992      1923.000000       363.336764
 505.929      1938.000000       364.694176
 506.689      2021.000000       372.100089
 507.343      1914.000000       362.519452
 507.929      2000.000000       370.242814
 508.465      1926.000000       363.608722
 508.968      1957.000000       366.405086
 509.452      1937.000000       364.603866
 509.918      1967.000000       367.301801
 510.372      2014.000000       371.482218
 510.820      1903.000000       361.517571
 511.269      1904.000000       361.608785
 511.720      1872.000000       358.676440
 512.177      1789.000000       350.937083
 512.644      1854.000000       357.014613
 513.126      1862.000000       357.754315
 513.636      1845.000000       356.180304
 514.182      1798.000000       351.785872
 514.771      1850.000000       356.644090
 515.424      1851.000000       356.736763
 516.188      1762.000000       348.376314
 517.124      1715.000000       343.865972
 518.363      1568.000000       329.298879
 520.110      1148.000000       282.984820
 522.124       451.000000       178.630963
 523.791       147.000000       102.295219
 524.970       110.000000        88.522591
 525.871        75.000000        73.120759
 526.616        65.000000        68.078539
 527.264        59.000000        64.864286
 527.846        39.000000        52.747136
 528.381        59.000000        64.864286
 528.885        60.000000        65.411019
 529.369        52.000000        60.899222
 529.840        52.000000        60.899222
 530.303        56.000000        63.195579
 530.764        49.000000        59.118194
 531.222        52.000000        60.899222
 531.685        44.000000        56.023623
 532.158        30.000000        46.266466
 532.649        38.000000        52.067021
 533.173        48.000000        58.512423
 533.743        36.000000        50.679331
 534.376        33.000000        48.523222
 535.103        42.000000        54.736647
 535.989        26.000000        43.073459
 537.233        23.000000        40.513525
 543.381        21.000000        38.712788


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-3.out
================================================
 494.896      1987.000000       790.203327
 503.672      1939.000000       780.990596
 504.992      1857.000000       764.949959
 505.929      1920.000000       777.308367
 506.689      1788.000000       751.141626
 507.343      1924.000000       778.085274
 507.929      1876.000000       768.701582
 508.465      1813.000000       756.178535
 508.968      1857.000000       764.949959
 509.452      1754.000000       744.227904
 509.918      1758.000000       745.045140
 510.372      1744.000000       742.180260
 510.820      1807.000000       754.973236
 511.269      1739.000000       741.153985
 511.720      1710.000000       735.168951
 512.177      1718.000000       736.825597
 512.644      1720.000000       737.239088
 513.126      1755.000000       744.432311
 513.636      1699.000000       732.884015
 514.182      1652.000000       723.027435
 514.771      1645.000000       721.546200
 515.424      1554.000000       701.964208
 516.188      1528.000000       696.253908
 517.124      1470.000000       683.320283
 518.363      1384.000000       663.617997
 520.110      1101.000000       593.614017
 522.124       633.000000       452.252235
 523.791       448.000000       381.179995
 524.970       368.000000       345.752474
 525.871       297.000000       310.835079
 526.616       282.000000       302.929716
 527.264       249.000000       284.748260
 527.846       258.000000       289.822417
 528.381       252.000000       286.449839
 528.885       230.000000       273.721075
 529.369       240.000000       279.580132
 529.840       200.000000       255.323135
 530.303       217.000000       265.907690
 530.764       176.000000       239.572038
 531.222       176.000000       239.572038
 531.685       176.000000       239.572038
 532.158       160.000000       228.459650
 532.649       145.000000       217.519833
 533.173       143.000000       216.018820
 533.743       130.000000       205.992714
 534.376       126.000000       202.806968
 535.103       111.000000       190.381344
 535.989       117.000000       195.447316
 537.233        90.000000       171.465022
 543.381        77.000000       158.619362


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-4.out
================================================
 494.896      1614.000000       636.199626
 503.672      1560.000000       625.815261
 504.992      1627.000000       638.670815
 505.929      1631.000000       639.428984
 506.689      1684.000000       649.379109
 507.343      1651.000000       643.204491
 507.929      1560.000000       625.815261
 508.465      1651.000000       643.204491
 508.968      1693.000000       651.051429
 509.452      1577.000000       629.105491
 509.918      1586.000000       630.839469
 510.372      1589.000000       631.416256
 510.820      1532.000000       620.352756
 511.269      1554.000000       624.649293
 511.720      1567.000000       627.172442
 512.177      1553.000000       624.454725
 512.644      1582.000000       630.069484
 513.126      1531.000000       620.156655
 513.636      1517.000000       617.403826
 514.182      1469.000000       607.858230
 514.771      1473.000000       608.660164
 515.424      1511.000000       616.219773
 516.188      1492.000000       612.453159
 517.124      1408.000000       595.477694
 518.363      1378.000000       589.281493
 520.110      1165.000000       543.013144
 522.124       877.000000       472.524162
 523.791       764.000000       441.539787
 524.970       663.000000       411.741760
 525.871       586.000000       387.396414
 526.616       568.000000       381.469695
 527.264       504.000000       359.568885
 527.846       520.000000       365.172698
 528.381       438.000000       335.423318
 528.885       470.000000       347.348059
 529.369       406.000000       323.042282
 529.840       421.000000       328.905937
 530.303       414.000000       326.183127
 530.764       347.000000       298.826610
 531.222       386.000000       315.048602
 531.685       343.000000       297.111240
 532.158       318.000000       286.150743
 532.649       298.000000       277.061925
 533.173       291.000000       273.807784
 533.743       260.000000       258.893620
 534.376       239.000000       248.270594
 535.103       217.000000       236.620399
 535.989       199.000000       226.635195
 537.233       172.000000       210.757353
 543.381       144.000000       192.895344


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-5.out
================================================
 494.896      1358.000000       547.329680
 503.672      1357.000000       547.133746
 504.992      1432.000000       561.616710
 505.929      1423.000000       559.900941
 506.689      1366.000000       548.894334
 507.343      1404.000000       556.259214
 507.929      1398.000000       555.103619
 508.465      1438.000000       562.757288
 508.968      1454.000000       565.786175
 509.452      1432.000000       561.616710
 509.918      1356.000000       546.937734
 510.372      1379.000000       551.426304
 510.820      1429.000000       561.045443
 511.269      1431.000000       561.426361
 511.720      1437.000000       562.567372
 512.177      1422.000000       559.709935
 512.644      1350.000000       545.760009
 513.126      1386.000000       552.784295
 513.636      1454.000000       565.786175
 514.182      1432.000000       561.616710
 514.771      1446.000000       564.274021
 515.424      1370.000000       549.674792
 516.188      1391.000000       553.752004
 517.124      1385.000000       552.590525
 518.363      1338.000000       543.395999
 520.110      1318.000000       539.430271
 522.124      1023.000000       476.680415
 523.791       962.000000       462.537888
 524.970       910.000000       450.101660
 525.871       850.000000       435.275904
 526.616       746.000000       408.209934
 527.264       760.000000       411.963957
 527.846       745.000000       407.940384
 528.381       668.000000       386.585887
 528.885       681.000000       390.278017
 529.369       611.000000       369.938153
 529.840       526.000000       343.538003
 530.303       529.000000       344.505836
 530.764       531.000000       345.149484
 531.222       481.000000       328.663801
 531.685       469.000000       324.577471
 532.158       439.000000       314.120075
 532.649       459.000000       321.130925
 533.173       382.000000       293.187001
 533.743       412.000000       304.389948
 534.376       345.000000       278.730467
 535.103       328.000000       271.822966
 535.989       308.000000       263.458369
 537.233       258.000000       241.248642
 543.381       191.000000       207.713153


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-6.out
================================================
 494.896       881.000000       430.916491
 503.672       984.000000       454.932418
 504.992      1065.000000       472.895305
 505.929      1080.000000       476.140917
 506.689      1058.000000       471.372338
 507.343      1187.000000       498.624383
 507.929      1164.000000       493.886250
 508.465      1160.000000       493.057109
 508.968      1184.000000       498.009180
 509.452      1249.000000       511.155909
 509.918      1266.000000       514.533060
 510.372      1326.000000       526.260390
 510.820      1288.000000       518.867315
 511.269      1254.000000       512.151752
 511.720      1337.000000       528.378996
 512.177      1363.000000       533.349288
 512.644      1390.000000       538.456487
 513.126      1367.000000       534.109361
 513.636      1370.000000       534.678623
 514.182      1384.000000       537.326252
 514.771      1441.000000       547.957985
 515.424      1472.000000       553.643880
 516.188      1392.000000       538.832641
 517.124      1476.000000       554.372755
 518.363      1458.000000       551.084248
 520.110      1527.000000       563.572600
 522.124      1272.000000       515.719142
 523.791      1133.000000       487.419833
 524.970      1018.000000       462.564765
 525.871       945.000000       446.003171
 526.616       923.000000       440.879856
 527.264       892.000000       433.549763
 527.846       755.000000       399.424729
 528.381       794.000000       409.448877
 528.885       807.000000       412.732648
 529.369       741.000000       395.760369
 529.840       745.000000       396.810998
 530.303       693.000000       382.914057
 530.764       684.000000       380.454193
 531.222       654.000000       372.130489
 531.685       620.000000       362.453076
 532.158       564.000000       345.892875
 532.649       548.000000       341.006464
 533.173       555.000000       343.153225
 533.743       516.000000       331.007361
 534.376       473.000000       317.053085
 535.103       486.000000       321.338338
 535.989       417.000000       297.861814
 537.233       367.000000       279.575234
 543.381       275.000000       242.233467


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-7.out
================================================
 494.896      1122.000000       494.822006
 503.672      1139.000000       498.469857
 504.992      1255.000000       522.616075
 505.929      1286.000000       528.863072
 506.689      1264.000000       524.438228
 507.343      1270.000000       525.649105
 507.929      1362.000000       543.841408
 508.465      1321.000000       535.818984
 508.968      1298.000000       531.259376
 509.452      1419.000000       554.779348
 509.918      1347.000000       540.921786
 510.372      1423.000000       555.537856
 510.820      1451.000000       560.815120
 511.269      1416.000000       554.209702
 511.720      1514.000000       572.488780
 512.177      1454.000000       561.377229
 512.644      1470.000000       564.364485
 513.126      1498.000000       569.549656
 513.636      1426.000000       556.105974
 514.182      1526.000000       574.681954
 514.771      1522.000000       573.951951
 515.424      1554.000000       579.762783
 516.188      1465.000000       563.432887
 517.124      1557.000000       580.304161
 518.363      1515.000000       572.671908
 520.110      1357.000000       542.870151
 522.124      1096.000000       489.185225
 523.791       922.000000       449.474183
 524.970       812.000000       422.282866
 525.871       777.000000       413.228639
 526.616       781.000000       414.274091
 527.264       747.000000       405.296178
 527.846       686.000000       388.636008
 528.381       643.000000       376.422632
 528.885       629.000000       372.354964
 529.369       633.000000       373.521914
 529.840       594.000000       361.975297
 530.303       558.000000       350.962713
 530.764       558.000000       350.962713
 531.222       490.000000       329.109460
 531.685       511.000000       336.016538
 532.158       490.000000       329.109460
 532.649       442.000000       312.725924
 533.173       461.000000       319.315459
 533.743       390.000000       293.908929
 534.376       401.000000       297.991935
 535.103       345.000000       276.558432
 535.989       313.000000       263.505340
 537.233       294.000000       255.431196
 543.381       196.000000       208.764193


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-8.out
================================================
 494.896       762.000000       379.366235
 503.672       813.000000       391.652973
 504.992       881.000000       407.421271
 505.929       914.000000       414.842178
 506.689       910.000000       413.950297
 507.343       873.000000       405.600266
 507.929       994.000000       432.263740
 508.465       894.000000       410.361894
 508.968      1009.000000       435.446418
 509.452       948.000000       422.341264
 509.918       971.000000       427.333677
 510.372       955.000000       423.867425
 510.820       950.000000       422.777918
 511.269      1011.000000       435.868869
 511.720      1067.000000       447.521720
 512.177       996.000000       432.689565
 512.644      1000.000000       433.539854
 513.126      1005.000000       434.600177
 513.636      1067.000000       447.521720
 514.182      1020.000000       437.764422
 514.771      1019.000000       437.554246
 515.424      1045.000000       442.983611
 516.188      1063.000000       446.700347
 517.124      1088.000000       451.807197
 518.363      1125.000000       459.251553
 520.110      1299.000000       492.611450
 522.124      1529.000000       533.182295
 523.791      1480.000000       524.834337
 524.970      1494.000000       527.234738
 525.871      1420.000000       514.403499
 526.616      1348.000000       501.563913
 527.264      1292.000000       491.317680
 527.846      1207.000000       475.295150
 528.381      1228.000000       479.308855
 528.885      1149.000000       464.010417
 529.369      1121.000000       458.453137
 529.840      1072.000000       448.546127
 530.303       995.000000       432.476709
 530.764       995.000000       432.476709
 531.222       951.000000       422.996062
 531.685       877.000000       406.511863
 532.158       937.000000       419.930900
 532.649       870.000000       404.915121
 533.173       799.000000       388.321415
 533.743       760.000000       378.875746
 534.376       687.000000       360.487382
 535.103       630.000000       345.408344
 535.989       585.000000       332.995466
 537.233       518.000000       313.559158
 543.381       377.000000       267.881776


================================================
FILE: examples/constant-force-optical-trap/output/counts-observed-9.out
================================================
 494.896       384.000000       250.905585
 503.672       423.000000       263.235311
 504.992       460.000000       274.404203
 505.929       480.000000       280.249456
 506.689       549.000000       299.507397
 507.343       545.000000       298.426370
 507.929       538.000000       296.524660
 508.465       571.000000       305.381559
 508.968       563.000000       303.259276
 509.452       572.000000       305.645760
 509.918       593.000000       311.139701
 510.372       617.000000       317.296410
 510.820       632.000000       321.081400
 511.269       647.000000       324.819999
 511.720       601.000000       313.206060
 512.177       708.000000       339.577331
 512.644       680.000000       332.889297
 513.126       695.000000       336.489662
 513.636       702.000000       338.155961
 514.182       722.000000       342.869597
 514.771       730.000000       344.735932
 515.424       775.000000       355.040221
 516.188       862.000000       374.107326
 517.124       855.000000       372.611770
 518.363       985.000000       399.407725
 520.110      1198.000000       439.522448
 522.124      1725.000000       524.553190
 523.791      1847.000000       542.099447
 524.970      1855.000000       543.227058
 525.871      1762.000000       529.945783
 526.616      1746.000000       527.621666
 527.264      1691.000000       519.540813
 527.846      1581.000000       502.930165
 528.381      1488.000000       488.382279
 528.885      1512.000000       492.183299
 529.369      1484.000000       487.745516
 529.840      1494.000000       489.335666
 530.303      1436.000000       480.029897
 530.764      1386.000000       471.841499
 531.222      1373.000000       469.686252
 531.685      1334.000000       463.153108
 532.158      1306.000000       458.398466
 532.649      1186.000000       437.369390
 533.173      1164.000000       433.391485
 533.743      1072.000000       416.303408
 534.376      1059.000000       413.826446
 535.103       999.000000       402.178692
 535.989       926.000000       387.494073
 537.233       819.000000       364.816498
 543.381       668.000000       329.979100


================================================
FILE: examples/constant-force-optical-trap/output/pmf-expected-0.out
================================================
 494.896    0.288    0.000
 503.672   -1.964    0.122
 504.992   -2.159    0.127
 505.929   -2.396    0.125
 506.689   -2.471    0.126
 507.343   -2.535    0.127
 507.929   -2.579    0.127
 508.465   -2.771    0.122
 508.968   -2.615    0.127
 509.452   -2.673    0.125
 509.918   -2.619    0.127
 510.372   -2.597    0.127
 510.820   -2.574    0.126
 511.269   -2.565    0.125
 511.720   -2.520    0.125
 512.177   -2.501    0.123
 512.644   -2.455    0.122
 513.126   -2.289    0.124
 513.636   -1.937    0.131
 514.182   -1.987    0.125
 514.771   -1.769    0.126
 515.424   -1.489    0.128
 516.188   -1.408    0.121
 517.124   -0.893    0.125
 518.363   -0.505    0.120
 520.110    0.290    0.121
 522.124    0.494    0.114
 523.791    0.545    0.112
 524.970    0.568    0.111
 525.871    0.641    0.110
 526.616    0.581    0.108
 527.264    0.741    0.109
 527.846    0.825    0.108
 528.381    0.896    0.107
 528.885    0.980    0.106
 529.369    1.138    0.106
 529.840    1.291    0.106
 530.303    1.411    0.106
 530.764    1.649    0.106
 531.222    1.856    0.106
 531.685    1.992    0.105
 532.158    2.242    0.106
 532.649    2.486    0.105
 533.173    2.730    0.105
 533.743    3.090    0.105
 534.376    3.486    0.105
 535.103    3.871    0.104
 535.989    4.487    0.104
 537.233    5.365    0.104
 543.381    8.328    0.105


================================================
FILE: examples/constant-force-optical-trap/output/pmf-expected-1.out
================================================
 494.896    1.249    0.122
 503.672   -1.151    0.000
 504.992   -1.409    0.124
 505.929   -1.690    0.122
 506.689   -1.803    0.123
 507.343   -1.898    0.124
 507.929   -1.970    0.124
 508.465   -2.188    0.119
 508.968   -2.059    0.124
 509.452   -2.140    0.122
 509.918   -2.110    0.124
 510.372   -2.109    0.124
 510.820   -2.108    0.123
 511.269   -2.120    0.122
 511.720   -2.098    0.122
 512.177   -2.101    0.120
 512.644   -2.078    0.119
 513.126   -1.936    0.121
 513.636   -1.608    0.128
 514.182   -1.685    0.122
 514.771   -1.497    0.123
 515.424   -1.247    0.125
 516.188   -1.202    0.118
 517.124   -0.732    0.122
 518.363   -0.404    0.117
 520.110    0.305    0.117
 522.124    0.408    0.110
 523.791    0.374    0.108
 524.970    0.342    0.107
 525.871    0.371    0.107
 526.616    0.275    0.104
 527.264    0.404    0.105
 527.846    0.459    0.104
 528.381    0.504    0.103
 528.885    0.564    0.103
 529.369    0.698    0.103
 529.840    0.828    0.102
 530.303    0.926    0.102
 530.764    1.141    0.102
 531.222    1.325    0.102
 531.685    1.439    0.101
 532.158    1.666    0.102
 532.649    1.885    0.101
 533.173    2.103    0.101
 533.743    2.436    0.101
 534.376    2.802    0.101
 535.103    3.151    0.100
 535.989    3.725    0.100
 537.233    4.547    0.100
 543.381    7.414    0.101


================================================
FILE: examples/constant-force-optical-trap/output/pmf-expected-10.out
================================================
 494.896    5.458    0.111
 503.672    2.461    0.105
 504.992    1.929    0.109
 505.929    1.454    0.107
 506.689    1.171    0.109
 507.343    0.936    0.109
 507.929    0.740    0.109
 508.465    0.410    0.103
 508.968    0.422    0.109
 509.452    0.234    0.106
 509.918    0.160    0.108
 510.372    0.066    0.107
 510.820   -0.030    0.107
 511.269   -0.139    0.105
 511.720   -0.215    0.105
 512.177   -0.315    0.102
 512.644   -0.394    0.101
 513.126   -0.361    0.103
 513.636   -0.140    0.111
 514.182   -0.336    0.103
 514.771   -0.283    0.104
 515.424   -0.167    0.106
 516.188   -0.281    0.097
 517.124   -0.014    0.101
 518.363    0.046    0.094
 520.110    0.367    0.093
 522.124    0.022    0.082
 523.791   -0.383    0.078
 524.970   -0.663    0.076
 525.871   -0.830    0.075
 526.616   -1.084    0.000
 527.264   -1.092    0.072
 527.846   -1.165    0.071
 528.381   -1.237    0.069
 528.885   -1.287    0.068
 529.369   -1.258    0.068
 529.840   -1.233    0.067
 530.303   -1.231    0.067
 530.764   -1.118    0.067
 531.222   -1.035    0.067
 531.685   -1.022    0.066
 532.158   -0.895    0.066
 532.649   -0.787    0.066
 533.173   -0.681    0.065
 533.743   -0.468    0.065
 534.376   -0.240    0.065
 535.103   -0.051    0.064
 535.989    0.338    0.063
 537.233    0.908    0.063
 543.381    3.313    0.063


================================================
FILE: examples/constant-force-optical-trap/output/pmf-expected-11.out
================================================
 494.896    5.411    0.111
 503.672    2.420    0.105
 504.992    1.892    0.109
 505.929    1.419    0.107
 506.689    1.138    0.109
 507.343    0.904    0.109
 507.929    0.709    0.109
 508.465    0.380    0.103
 508.968    0.394    0.109
 509.452    0.207    0.106
 509.918    0.135    0.108
 510.372    0.042    0.107
 510.820   -0.053    0.107
 511.269   -0.161    0.105
 511.720   -0.236    0.105
 512.177   -0.335    0.102
 512.644   -0.413    0.101
 513.126   -0.378    0.103
 513.636   -0.157    0.111
 514.182   -0.351    0.103
 514.771   -0.297    0.104
 515.424   -0.179    0.106
 516.188   -0.292    0.097
 517.124   -0.022    0.101
 518.363    0.041    0.094
 520.110    0.367    0.093
 522.124    0.026    0.082
 523.791   -0.375    0.078
 524.970   -0.651    0.076
 525.871   -0.817    0.075
 526.616   -1.069    0.000
 527.264   -1.075    0.072
 527.846   -1.147    0.071
 528.381   -1.218    0.069
 528.885   -1.266    0.068
 529.369   -1.236    0.068
 529.840   -1.210    0.067
 530.303   -1.207    0.067
 530.764   -1.093    0.067
 531.222   -1.008    0.067
 531.685   -0.994    0.066
 532.158   -0.866    0.066
 532.649   -0.757    0.066
 533.173   -0.650    0.065
 533.743   -0.435    0.065
 534.376   -0.206    0.065
 535.103   -0.015    0.064
 535.989    0.376    0.063
 537.233    0.948    0.063
 543.381    3.360    0.063


================================================
FILE: examples/constant-force-optical-trap/output/pmf-expected-12.out
================================================
 494.896    6.624    0.111
 503.672    3.474    0.103
 504.992    2.867    0.108
 505.929    2.338    0.106
 506.689    2.007    0.107
 507.343    1.733    0.107
 507.929    1.502    0.108
 508.465    1.140    0.102
 508.968    1.119    0.107
 509.452    0.901    0.105
 509.918    0.799    0.106
 510.372    0.678    0.106
 510.820    0.555    0.105
 511.269    0.419    0.10
Download .txt
gitextract_b_fel8s7/

├── .codecov.yml
├── .gitattributes
├── .github/
│   └── workflows/
│       └── CI.yaml
├── .gitignore
├── .pylintrc
├── .readthedocs.yml
├── LICENSE
├── README.md
├── appveyor.yml
├── devtools/
│   ├── README.md
│   ├── appveyor/
│   │   ├── install.ps1
│   │   └── run_with_env.cmd
│   ├── conda-envs/
│   │   ├── test_env.yaml
│   │   └── test_env_jax.yaml
│   ├── conda-recipe/
│   │   ├── README.md
│   │   ├── bld.bat
│   │   ├── build.sh
│   │   └── meta.yaml
│   └── travis-ci/
│       ├── after_success.sh
│       ├── index.html
│       ├── install.sh
│       └── push-docs-to-s3.py
├── docs/
│   ├── Makefile
│   ├── conf.py
│   ├── fes_with_pymbar.rst
│   ├── getting_started.rst
│   ├── index.rst
│   ├── mbar.rst
│   ├── moving_from_pymbar3.rst
│   ├── other_estimators.rst
│   ├── references.bib
│   ├── strategies_for_solution.rst
│   ├── timeseries.rst
│   ├── utils.rst
│   └── zbibliography.rst
├── examples/
│   ├── README.md
│   ├── alchemical-free-energy/
│   │   └── README.md
│   ├── constant-force-optical-trap/
│   │   ├── README.md
│   │   ├── extract-data.py
│   │   ├── force-bias-optical-trap.py
│   │   ├── original-data/
│   │   │   └── 20R55_4T_data.xls.bz2
│   │   ├── output/
│   │   │   ├── counts-expected-0.out
│   │   │   ├── counts-expected-1.out
│   │   │   ├── counts-expected-10.out
│   │   │   ├── counts-expected-11.out
│   │   │   ├── counts-expected-12.out
│   │   │   ├── counts-expected-13.out
│   │   │   ├── counts-expected-14.out
│   │   │   ├── counts-expected-15.out
│   │   │   ├── counts-expected-2.out
│   │   │   ├── counts-expected-3.out
│   │   │   ├── counts-expected-4.out
│   │   │   ├── counts-expected-5.out
│   │   │   ├── counts-expected-6.out
│   │   │   ├── counts-expected-7.out
│   │   │   ├── counts-expected-8.out
│   │   │   ├── counts-expected-9.out
│   │   │   ├── counts-observed-0.out
│   │   │   ├── counts-observed-1.out
│   │   │   ├── counts-observed-10.out
│   │   │   ├── counts-observed-11.out
│   │   │   ├── counts-observed-12.out
│   │   │   ├── counts-observed-13.out
│   │   │   ├── counts-observed-14.out
│   │   │   ├── counts-observed-15.out
│   │   │   ├── counts-observed-2.out
│   │   │   ├── counts-observed-3.out
│   │   │   ├── counts-observed-4.out
│   │   │   ├── counts-observed-5.out
│   │   │   ├── counts-observed-6.out
│   │   │   ├── counts-observed-7.out
│   │   │   ├── counts-observed-8.out
│   │   │   ├── counts-observed-9.out
│   │   │   ├── pmf-expected-0.out
│   │   │   ├── pmf-expected-1.out
│   │   │   ├── pmf-expected-10.out
│   │   │   ├── pmf-expected-11.out
│   │   │   ├── pmf-expected-12.out
│   │   │   ├── pmf-expected-13.out
│   │   │   ├── pmf-expected-14.out
│   │   │   ├── pmf-expected-15.out
│   │   │   ├── pmf-expected-2.out
│   │   │   ├── pmf-expected-3.out
│   │   │   ├── pmf-expected-4.out
│   │   │   ├── pmf-expected-5.out
│   │   │   ├── pmf-expected-6.out
│   │   │   ├── pmf-expected-7.out
│   │   │   ├── pmf-expected-8.out
│   │   │   ├── pmf-expected-9.out
│   │   │   ├── pmf-observed-0.out
│   │   │   ├── pmf-observed-1.out
│   │   │   ├── pmf-observed-10.out
│   │   │   ├── pmf-observed-11.out
│   │   │   ├── pmf-observed-12.out
│   │   │   ├── pmf-observed-13.out
│   │   │   ├── pmf-observed-14.out
│   │   │   ├── pmf-observed-15.out
│   │   │   ├── pmf-observed-2.out
│   │   │   ├── pmf-observed-3.out
│   │   │   ├── pmf-observed-4.out
│   │   │   ├── pmf-observed-5.out
│   │   │   ├── pmf-observed-6.out
│   │   │   ├── pmf-observed-7.out
│   │   │   ├── pmf-observed-8.out
│   │   │   ├── pmf-observed-9.out
│   │   │   └── pmf-unbiased.out
│   │   └── processed-data/
│   │       ├── 20R55_4T.forces
│   │       └── 20R55_4T.trajectories
│   ├── harmonic-oscillators/
│   │   ├── README.md
│   │   ├── harmonic-oscillators-distributions.py
│   │   ├── harmonic-oscillators-distributions.py_output.txt
│   │   ├── harmonic-oscillators.py
│   │   └── harmonic-oscillators.py_output.txt
│   ├── heat-capacity/
│   │   ├── README.md
│   │   ├── energydata/
│   │   │   ├── TEMP0/
│   │   │   │   ├── ener_box0.output
│   │   │   │   └── simul0.output
│   │   │   ├── TEMP1/
│   │   │   │   ├── ener_box1.output
│   │   │   │   └── simul1.output
│   │   │   ├── TEMP10/
│   │   │   │   ├── ener_box10.output
│   │   │   │   └── simul10.output
│   │   │   ├── TEMP11/
│   │   │   │   ├── ener_box11.output
│   │   │   │   └── simul11.output
│   │   │   ├── TEMP12/
│   │   │   │   ├── ener_box12.output
│   │   │   │   └── simul12.output
│   │   │   ├── TEMP13/
│   │   │   │   ├── ener_box13.output
│   │   │   │   └── simul13.output
│   │   │   ├── TEMP14/
│   │   │   │   ├── ener_box14.output
│   │   │   │   └── simul14.output
│   │   │   ├── TEMP15/
│   │   │   │   ├── ener_box15.output
│   │   │   │   └── simul15.output
│   │   │   ├── TEMP2/
│   │   │   │   ├── ener_box2.output
│   │   │   │   └── simul2.output
│   │   │   ├── TEMP3/
│   │   │   │   ├── ener_box3.output
│   │   │   │   └── simul3.output
│   │   │   ├── TEMP4/
│   │   │   │   ├── ener_box4.output
│   │   │   │   └── simul4.output
│   │   │   ├── TEMP5/
│   │   │   │   ├── ener_box5.output
│   │   │   │   └── simul5.output
│   │   │   ├── TEMP6/
│   │   │   │   ├── ener_box6.output
│   │   │   │   └── simul6.output
│   │   │   ├── TEMP7/
│   │   │   │   ├── ener_box7.output
│   │   │   │   └── simul7.output
│   │   │   ├── TEMP8/
│   │   │   │   ├── ener_box8.output
│   │   │   │   └── simul8.output
│   │   │   └── TEMP9/
│   │   │       ├── ener_box9.output
│   │   │       └── simul9.output
│   │   ├── heat-capacity.py
│   │   ├── heat-capacity.py.sample_out_bootstrap
│   │   └── heat-capacity.py.sample_out_no_bootstrap
│   ├── parallel-tempering-2dfes/
│   │   ├── README.md
│   │   ├── data/
│   │   │   ├── README.md
│   │   │   ├── backbone-torsions/
│   │   │   │   ├── 0.phi
│   │   │   │   ├── 0.psi
│   │   │   │   ├── 1.phi
│   │   │   │   ├── 1.psi
│   │   │   │   ├── 10.phi
│   │   │   │   ├── 10.psi
│   │   │   │   ├── 11.phi
│   │   │   │   ├── 11.psi
│   │   │   │   ├── 12.phi
│   │   │   │   ├── 12.psi
│   │   │   │   ├── 13.phi
│   │   │   │   ├── 13.psi
│   │   │   │   ├── 14.phi
│   │   │   │   ├── 14.psi
│   │   │   │   ├── 15.phi
│   │   │   │   ├── 15.psi
│   │   │   │   ├── 16.phi
│   │   │   │   ├── 16.psi
│   │   │   │   ├── 17.phi
│   │   │   │   ├── 17.psi
│   │   │   │   ├── 18.phi
│   │   │   │   ├── 18.psi
│   │   │   │   ├── 19.phi
│   │   │   │   ├── 19.psi
│   │   │   │   ├── 2.phi
│   │   │   │   ├── 2.psi
│   │   │   │   ├── 20.phi
│   │   │   │   ├── 20.psi
│   │   │   │   ├── 21.phi
│   │   │   │   ├── 21.psi
│   │   │   │   ├── 22.phi
│   │   │   │   ├── 22.psi
│   │   │   │   ├── 23.phi
│   │   │   │   ├── 23.psi
│   │   │   │   ├── 24.phi
│   │   │   │   ├── 24.psi
│   │   │   │   ├── 25.phi
│   │   │   │   ├── 25.psi
│   │   │   │   ├── 26.phi
│   │   │   │   ├── 26.psi
│   │   │   │   ├── 27.phi
│   │   │   │   ├── 27.psi
│   │   │   │   ├── 28.phi
│   │   │   │   ├── 28.psi
│   │   │   │   ├── 29.phi
│   │   │   │   ├── 29.psi
│   │   │   │   ├── 3.phi
│   │   │   │   ├── 3.psi
│   │   │   │   ├── 30.phi
│   │   │   │   ├── 30.psi
│   │   │   │   ├── 31.phi
│   │   │   │   ├── 31.psi
│   │   │   │   ├── 32.phi
│   │   │   │   ├── 32.psi
│   │   │   │   ├── 33.phi
│   │   │   │   ├── 33.psi
│   │   │   │   ├── 34.phi
│   │   │   │   ├── 34.psi
│   │   │   │   ├── 35.phi
│   │   │   │   ├── 35.psi
│   │   │   │   ├── 36.phi
│   │   │   │   ├── 36.psi
│   │   │   │   ├── 37.phi
│   │   │   │   ├── 37.psi
│   │   │   │   ├── 38.phi
│   │   │   │   ├── 38.psi
│   │   │   │   ├── 39.phi
│   │   │   │   ├── 39.psi
│   │   │   │   ├── 4.phi
│   │   │   │   ├── 4.psi
│   │   │   │   ├── 5.phi
│   │   │   │   ├── 5.psi
│   │   │   │   ├── 6.phi
│   │   │   │   ├── 6.psi
│   │   │   │   ├── 7.phi
│   │   │   │   ├── 7.psi
│   │   │   │   ├── 8.phi
│   │   │   │   ├── 8.psi
│   │   │   │   ├── 9.phi
│   │   │   │   └── 9.psi
│   │   │   ├── configurations/
│   │   │   │   ├── a1e.equil_all.pdb
│   │   │   │   └── a1e.solute-only.pdb
│   │   │   ├── end-to-end-distance/
│   │   │   │   ├── 0.dist
│   │   │   │   ├── 1.dist
│   │   │   │   ├── 10.dist
│   │   │   │   ├── 11.dist
│   │   │   │   ├── 12.dist
│   │   │   │   ├── 13.dist
│   │   │   │   ├── 14.dist
│   │   │   │   ├── 15.dist
│   │   │   │   ├── 16.dist
│   │   │   │   ├── 17.dist
│   │   │   │   ├── 18.dist
│   │   │   │   ├── 19.dist
│   │   │   │   ├── 2.dist
│   │   │   │   ├── 20.dist
│   │   │   │   ├── 21.dist
│   │   │   │   ├── 22.dist
│   │   │   │   ├── 23.dist
│   │   │   │   ├── 24.dist
│   │   │   │   ├── 25.dist
│   │   │   │   ├── 26.dist
│   │   │   │   ├── 27.dist
│   │   │   │   ├── 28.dist
│   │   │   │   ├── 29.dist
│   │   │   │   ├── 3.dist
│   │   │   │   ├── 30.dist
│   │   │   │   ├── 31.dist
│   │   │   │   ├── 32.dist
│   │   │   │   ├── 33.dist
│   │   │   │   ├── 34.dist
│   │   │   │   ├── 35.dist
│   │   │   │   ├── 36.dist
│   │   │   │   ├── 37.dist
│   │   │   │   ├── 38.dist
│   │   │   │   ├── 39.dist
│   │   │   │   ├── 4.dist
│   │   │   │   ├── 5.dist
│   │   │   │   ├── 6.dist
│   │   │   │   ├── 7.dist
│   │   │   │   ├── 8.dist
│   │   │   │   └── 9.dist
│   │   │   ├── energies/
│   │   │   │   └── potential-energies
│   │   │   ├── replica-indices
│   │   │   └── temperatures
│   │   ├── parallel-tempering-2dfes.py
│   │   └── parallel-tempering-2dfes.sampleoutput
│   └── umbrella-sampling-fes/
│       ├── README.md
│       ├── assumedatauncorrelated.output.txt
│       ├── data/
│       │   ├── prod0_dihed.xvg
│       │   ├── prod0_energies.xvg
│       │   ├── prod10_dihed.xvg
│       │   ├── prod10_energies.xvg
│       │   ├── prod11_dihed.xvg
│       │   ├── prod11_energies.xvg
│       │   ├── prod12_dihed.xvg
│       │   ├── prod12_energies.xvg
│       │   ├── prod13_dihed.xvg
│       │   ├── prod13_energies.xvg
│       │   ├── prod14_dihed.xvg
│       │   ├── prod14_energies.xvg
│       │   ├── prod15_dihed.xvg
│       │   ├── prod15_energies.xvg
│       │   ├── prod16_dihed.xvg
│       │   ├── prod16_energies.xvg
│       │   ├── prod17_dihed.xvg
│       │   ├── prod17_energies.xvg
│       │   ├── prod18_dihed.xvg
│       │   ├── prod18_energies.xvg
│       │   ├── prod19_dihed.xvg
│       │   ├── prod19_energies.xvg
│       │   ├── prod1_dihed.xvg
│       │   ├── prod1_energies.xvg
│       │   ├── prod20_dihed.xvg
│       │   ├── prod20_energies.xvg
│       │   ├── prod21_dihed.xvg
│       │   ├── prod21_energies.xvg
│       │   ├── prod22_dihed.xvg
│       │   ├── prod22_energies.xvg
│       │   ├── prod23_dihed.xvg
│       │   ├── prod23_energies.xvg
│       │   ├── prod24_dihed.xvg
│       │   ├── prod24_energies.xvg
│       │   ├── prod25_dihed.xvg
│       │   ├── prod25_energies.xvg
│       │   ├── prod2_dihed.xvg
│       │   ├── prod2_energies.xvg
│       │   ├── prod3_dihed.xvg
│       │   ├── prod3_energies.xvg
│       │   ├── prod4_dihed.xvg
│       │   ├── prod4_energies.xvg
│       │   ├── prod5_dihed.xvg
│       │   ├── prod5_energies.xvg
│       │   ├── prod6_dihed.xvg
│       │   ├── prod6_energies.xvg
│       │   ├── prod7_dihed.xvg
│       │   ├── prod7_energies.xvg
│       │   ├── prod8_dihed.xvg
│       │   ├── prod8_energies.xvg
│       │   ├── prod9_dihed.xvg
│       │   └── prod9_energies.xvg
│       ├── pmf.out
│       ├── umbrella-sampling-advanced-fes.py
│       ├── umbrella-sampling.py
│       ├── umbrella-sampling.sample_output
│       └── wham/
│           ├── PMF_144
│           ├── PMF_18
│           ├── PMF_288
│           ├── PMF_36
│           ├── PMF_72
│           ├── data/
│           │   ├── prod0_dihed.xvg
│           │   ├── prod10_dihed.xvg
│           │   ├── prod11_dihed.xvg
│           │   ├── prod12_dihed.xvg
│           │   ├── prod13_dihed.xvg
│           │   ├── prod14_dihed.xvg
│           │   ├── prod15_dihed.xvg
│           │   ├── prod16_dihed.xvg
│           │   ├── prod17_dihed.xvg
│           │   ├── prod18_dihed.xvg
│           │   ├── prod19_dihed.xvg
│           │   ├── prod1_dihed.xvg
│           │   ├── prod20_dihed.xvg
│           │   ├── prod21_dihed.xvg
│           │   ├── prod22_dihed.xvg
│           │   ├── prod23_dihed.xvg
│           │   ├── prod24_dihed.xvg
│           │   ├── prod25_dihed.xvg
│           │   ├── prod2_dihed.xvg
│           │   ├── prod3_dihed.xvg
│           │   ├── prod4_dihed.xvg
│           │   ├── prod5_dihed.xvg
│           │   ├── prod6_dihed.xvg
│           │   ├── prod7_dihed.xvg
│           │   ├── prod8_dihed.xvg
│           │   └── prod9_dihed.xvg
│           ├── dowham.pl
│           ├── gdbinit
│           ├── pmfwham144.txt
│           ├── pmfwham18.txt
│           ├── pmfwham36.txt
│           ├── pmfwham72.txt
│           └── setupwham.pl
├── pymbar/
│   ├── __init__.py
│   ├── confidenceintervals.py
│   ├── fes.py
│   ├── mbar.py
│   ├── mbar_solvers.py
│   ├── other_estimators.py
│   ├── tests/
│   │   ├── README.md
│   │   ├── __init__.py
│   │   ├── test_bar.py
│   │   ├── test_covariance.py
│   │   ├── test_exp.py
│   │   ├── test_fes.py
│   │   ├── test_mbar.py
│   │   ├── test_mbar_solvers.py
│   │   ├── test_timeseries.py
│   │   └── test_utils.py
│   ├── testsystems/
│   │   ├── __init__.py
│   │   ├── exponential_distributions.py
│   │   ├── gaussian_work.py
│   │   ├── harmonic_oscillators.py
│   │   └── timeseries.py
│   ├── timeseries.py
│   ├── utils.py
│   └── utils_for_testing.py
└── pyproject.toml
Download .txt
SYMBOL INDEX (234 symbols across 26 files)

FILE: examples/constant-force-optical-trap/extract-data.py
  function main (line 45) | def main():

FILE: examples/constant-force-optical-trap/force-bias-optical-trap.py
  function construct_nonuniform_bins (line 55) | def construct_nonuniform_bins(x_n, nbins):
  function main (line 124) | def main():

FILE: examples/harmonic-oscillators/harmonic-oscillators.py
  function stddev_away (line 39) | def stddev_away(namex, errorx, dx):
  function get_analytical (line 46) | def get_analytical(beta, K, O, observables):
  function generate_fes_data (line 674) | def generate_fes_data(

FILE: examples/heat-capacity/heat-capacity.py
  function parse_cli (line 21) | def parse_cli():
  function read_total_energies (line 107) | def read_total_energies(pathname, colnum):
  function read_simulation_temps (line 151) | def read_simulation_temps(pathname, num_temps):
  function print_results (line 179) | def print_results(string, E, dE, Cv, dCv, types):

FILE: examples/parallel-tempering-2dfes/parallel-tempering-2dfes.py
  function read_file (line 58) | def read_file(filename):

FILE: examples/umbrella-sampling-fes/umbrella-sampling-advanced-fes.py
  function bias_potential (line 205) | def bias_potential(x, k):
  function deltag (line 214) | def deltag(c, scalef=1, n=nspline):
  function ddeltag (line 223) | def ddeltag(c, scalef=1, n=nspline):
  function dddeltag (line 247) | def dddeltag(c, scalef=1, n=nspline):

FILE: pymbar/confidenceintervals.py
  function order_replicates (line 32) | def order_replicates(replicates, K):
  function anderson_darling (line 76) | def anderson_darling(replicates, K):
  function qq_plot (line 127) | def qq_plot(replicates, K, title="Generic Q-Q plot", filename="qq.pdf"):
  function generate_confidence_intervals (line 225) | def generate_confidence_intervals(replicates, K):

FILE: pymbar/fes.py
  class FES (line 47) | class FES:
    method __init__ (line 74) | def __init__(self, u_kn, N_k, verbose=False, mbar_options=None, timing...
    method generate_fes (line 221) | def generate_fes(
    method _setup_fes_histogram (line 440) | def _setup_fes_histogram(self, histogram_parameters):
    method _generate_fes_histogram (line 476) | def _generate_fes_histogram(self, b, x_n, w_nb, log_w_nb):
    method _setup_fes_kde (line 602) | def _setup_fes_kde(self, kde_parameters):
    method _generate_fes_kde (line 650) | def _generate_fes_kde(self, b, x_n, w_n):
    method _setup_fes_spline (line 701) | def _setup_fes_spline(self, spline_parameters):
    method _get_initial_spline_points (line 809) | def _get_initial_spline_points(self):
    method _get_initial_spline (line 883) | def _get_initial_spline(self, xinit, yinit):
    method _generate_fes_spline (line 971) | def _generate_fes_spline(self, b, x_n, w_n):
    method _calculate_information_criteria (line 1101) | def _calculate_information_criteria(nparameters, minus_log_likelihood,...
    method get_information_criteria (line 1136) | def get_information_criteria(self, type="akaike"):
    method get_fes (line 1167) | def get_fes(
    method get_mbar (line 1233) | def get_mbar(self):
    method get_kde (line 1245) | def get_kde(self):
    method _get_fes_histogram (line 1263) | def _get_fes_histogram(
    method _get_fes_kde (line 1523) | def _get_fes_kde(
    method _get_fes_spline (line 1611) | def _get_fes_spline(
    method sample_parameter_distribution (line 1696) | def sample_parameter_distribution(
    method get_confidence_intervals (line 1859) | def get_confidence_intervals(self, xplot, plow, phigh, reference="zero"):
    method get_mc_data (line 1928) | def get_mc_data(self):
    method _get_MC_loglikelihood (line 1954) | def _get_MC_loglikelihood(self, x_n, w_n, spline_weights, spline, xran...
    method _MC_step (line 2012) | def _MC_step(self, x_n, w_n, stepsize, xrange, spline_weights, logprior):
    method _bspline_calculate_f (line 2102) | def _bspline_calculate_f(self, xi, x_n, w_n):
    method _bspline_calculate_g (line 2188) | def _bspline_calculate_g(self, xi, x_n, w_n):
    method _bspline_calculate_h (line 2308) | def _bspline_calculate_h(self, xi, x_n, w_n):
    method _integrate (line 2419) | def _integrate(func, xlow, xhigh, args=(), method="quad"):  # could ad...
    method _val_to_spline (line 2430) | def _val_to_spline(self, x, form=None):

FILE: pymbar/mbar.py
  class MBAR (line 65) | class MBAR:
    method __init__ (line 86) | def __init__(
    method W_nk (line 468) | def W_nk(self):
    method weights (line 482) | def weights(self):
    method compute_effective_sample_number (line 497) | def compute_effective_sample_number(self, verbose=False):
    method compute_overlap (line 564) | def compute_overlap(self):
    method compute_free_energy_differences (line 621) | def compute_free_energy_differences(
    method compute_expectations_inner (line 733) | def compute_expectations_inner(
    method compute_covariance_of_sums (line 1034) | def compute_covariance_of_sums(self, d_ij, K, a):
    method compute_expectations (line 1125) | def compute_expectations(
    method compute_multiple_expectations (line 1316) | def compute_multiple_expectations(
    method compute_perturbed_free_energies (line 1443) | def compute_perturbed_free_energies(
    method compute_entropy_and_enthalpy (line 1525) | def compute_entropy_and_enthalpy(
    method _ErrorOfDifferences (line 1688) | def _ErrorOfDifferences(self, cov, warning_cutoff=1.0e-10):
    method _pseudoinverse (line 1718) | def _pseudoinverse(self, A, tol=1.0e-10):
    method _zerosamestates (line 1740) | def _zerosamestates(self, A):
    method _computeAsymptoticCovarianceMatrix (line 1757) | def _computeAsymptoticCovarianceMatrix(self, W, N_k, method=None):
    method _initializeFreeEnergies (line 1869) | def _initializeFreeEnergies(self, verbose=False, method="zeros", f_k_i...
    method _computeUnnormalizedLogWeights (line 1920) | def _computeUnnormalizedLogWeights(self, u_n):
    method _initialize_with_bar (line 1937) | def _initialize_with_bar(self, u_kn, f_k_init=None):

FILE: pymbar/mbar_solvers.py
  function _setup_jax_acceleration (line 18) | def _setup_jax_acceleration():
  function jit_or_passthrough (line 96) | def jit_or_passthrough(fn):
  function _mbar_loss_and_grad_numba_python (line 115) | def _mbar_loss_and_grad_numba_python(
  function _mbar_loss_and_grad_numba_wrapper (line 207) | def _mbar_loss_and_grad_numba_wrapper(
  function jit_or_pass_after_bitsize (line 299) | def jit_or_pass_after_bitsize(jitable_fn):
  function validate_inputs (line 331) | def validate_inputs(u_kn, N_k, f_k):
  function self_consistent_update (line 363) | def self_consistent_update(u_kn, N_k, f_k, states_with_samples=None):
  function _jit_self_consistent_update (line 389) | def _jit_self_consistent_update(u_kn, N_k, f_k):
  function jax_self_consistent_update (line 402) | def jax_self_consistent_update(u_kn, N_k, f_k, states_with_samples=None):
  function mbar_gradient (line 417) | def mbar_gradient(u_kn, N_k, f_k):
  function jax_mbar_gradient (line 442) | def jax_mbar_gradient(u_kn, N_k, f_k):
  function mbar_objective (line 452) | def mbar_objective(u_kn, N_k, f_k):
  function jax_mbar_objective (line 485) | def jax_mbar_objective(u_kn, N_k, f_k):
  function jax_mbar_objective_and_gradient (line 499) | def jax_mbar_objective_and_gradient(u_kn, N_k, f_k):
  function mbar_objective_and_gradient (line 515) | def mbar_objective_and_gradient(u_kn, N_k, f_k):
  function jax_mbar_hessian (line 553) | def jax_mbar_hessian(u_kn, N_k, f_k):
  function mbar_hessian (line 571) | def mbar_hessian(u_kn, N_k, f_k):
  function jax_mbar_log_W_nk (line 597) | def jax_mbar_log_W_nk(u_kn, N_k, f_k):
  function mbar_log_W_nk (line 609) | def mbar_log_W_nk(u_kn, N_k, f_k):
  function jax_mbar_W_nk (line 634) | def jax_mbar_W_nk(u_kn, N_k, f_k):
  function mbar_W_nk (line 643) | def mbar_W_nk(u_kn, N_k, f_k):
  function adaptive (line 667) | def adaptive(u_kn, N_k, f_k, tol=1.0e-8, options=None):
  function jax_core_adaptive (line 828) | def jax_core_adaptive(u_kn, N_k, f_k, gamma):
  function jax_precondition_u_kn (line 855) | def jax_precondition_u_kn(u_kn, N_k, f_k):
  function precondition_u_kn (line 867) | def precondition_u_kn(u_kn, N_k, f_k):
  function solve_mbar_once (line 895) | def solve_mbar_once(
  function solve_mbar (line 1069) | def solve_mbar(u_kn_nonzero, N_k_nonzero, f_k_nonzero, solver_protocol=N...
  function solve_mbar_for_all_states (line 1160) | def solve_mbar_for_all_states(u_kn, N_k, f_k, states_with_samples, solve...

FILE: pymbar/other_estimators.py
  function bar_zero (line 56) | def bar_zero(w_F, w_R, DeltaF):
  function bar (line 156) | def bar(
  function bar_overlap (line 534) | def bar_overlap(w_F, w_R):
  function exp (line 572) | def exp(w_F, compute_uncertainty=True, is_timeseries=False):
  function exp_gauss (line 650) | def exp_gauss(w_F, compute_uncertainty=True, is_timeseries=False):

FILE: pymbar/tests/test_bar.py
  function generate_ho (line 19) | def generate_ho(O_k=np.array([1.0, 2.0]), K_k=np.array([0.5, 2.0])):
  function generate_exp (line 23) | def generate_exp(rates=np.array([1.0, 4.0])):  # Rates, e.g. Lambda
  function bar_and_test (line 31) | def bar_and_test(request):
  function test_sample (line 48) | def test_sample(system_generator):
  function test_bar_free_energies (line 60) | def test_bar_free_energies(bar_and_test):
  function test_bar_overlap (line 101) | def test_bar_overlap():

FILE: pymbar/tests/test_covariance.py
  function _test (line 15) | def _test(statesa, statesb, test_system):

FILE: pymbar/tests/test_exp.py
  function generate_ho (line 18) | def generate_ho(O_k=np.array([1.0, 2.0]), K_k=np.array([0.5, 1.0])):
  function generate_exp (line 22) | def generate_exp(rates=np.array([1.0, 4.0])):  # Rates, e.g. Lambda
  function exp_and_test (line 30) | def exp_and_test(request):
  function test_sample (line 46) | def test_sample(system_generator):
  function test_EXP_free_energies (line 58) | def test_EXP_free_energies(exp_and_test):

FILE: pymbar/tests/test_fes.py
  function generate_fes_data (line 19) | def generate_fes_data(ndim=1, nsamples=1000, K0=20.0, Ku=100.0, gridscal...
  function fes_1d (line 99) | def fes_1d():
  function fes_2d (line 190) | def fes_2d():
  function test_1d_fes_histogram (line 319) | def test_1d_fes_histogram(fes_1d, reference_point):
  function base_1d_fes_kde (line 343) | def base_1d_fes_kde(fes_1d, gen_kwargs, reference_point):
  function test_1d_fes_kde (line 388) | def test_1d_fes_kde(fes_1d, gen_kwargs, reference_point):
  function test_1d_fes_kde_bootstraped (line 396) | def test_1d_fes_kde_bootstraped(fes_1d):
  function base_1d_fes_spline (line 402) | def base_1d_fes_spline(fes_1d, gen_kwargs, reference_point):
  function test_1d_fes_spline (line 464) | def test_1d_fes_spline(fes_1d, gen_kwargs, reference_point):
  function test_1d_fes_spline_bootstraped (line 468) | def test_1d_fes_spline_bootstraped(fes_1d):
  function test_2d_fes_histogram (line 483) | def test_2d_fes_histogram(fes_2d, reference_point):
  function test_2d_fes_kde (line 531) | def test_2d_fes_kde(fes_2d, gen_kwargs, reference_point):

FILE: pymbar/tests/test_mbar.py
  function generate_ho (line 19) | def generate_ho(O_k=np.array([1.0, 2.0, 3.0, 4.0]), K_k=np.array([0.5, 1...
  function generate_exp (line 23) | def generate_exp(rates=np.array([1.0, 2.0, 3.0, 4.0])):  # Rates, e.g. L...
  function convert_to_differences (line 27) | def convert_to_differences(x_ij, dx_ij, xa):
  function mbar_and_test (line 45) | def mbar_and_test(request):
  function mbar_and_test_harmonic (line 55) | def mbar_and_test_harmonic():
  function mbar_and_test_kln (line 65) | def mbar_and_test_kln():
  function fixed_harmonic_sample (line 75) | def fixed_harmonic_sample():
  function single_harmonic_u_kn (line 81) | def single_harmonic_u_kn(fixed_harmonic_sample):
  function free_energies_almost_equal (line 86) | def free_energies_almost_equal(mbar_fe, err_fe, analytical_fe):
  function test_ukln (line 95) | def test_ukln(mbar_and_test_kln):
  function test_duplicate_state (line 104) | def test_duplicate_state(fixed_harmonic_sample, caplog):
  function test_x_kindices (line 116) | def test_x_kindices(fixed_harmonic_sample):
  function test_bad_inital_f_k (line 128) | def test_bad_inital_f_k(fixed_harmonic_sample):
  function test_covariance_of_sums_runs (line 133) | def test_covariance_of_sums_runs(mbar_and_test_kln):
  function test_analytical (line 143) | def test_analytical(system_generator):
  function test_sample (line 155) | def test_sample(system_generator):
  function test_mbar_free_energies (line 183) | def test_mbar_free_energies(mbar_and_test, uncertainty_method):
  function test_mbar_bad_bootstrap (line 197) | def test_mbar_bad_bootstrap(single_harmonic_u_kn, n_bootstrap):
  function test_mbar_initialization (line 207) | def test_mbar_initialization(fixed_harmonic_sample, method):
  function test_mbar_compute_expectations_position_averages (line 217) | def test_mbar_compute_expectations_position_averages(mbar_and_test):
  function test_mbar_compute_expectations_position_differences (line 231) | def test_mbar_compute_expectations_position_differences(mbar_and_test):
  function test_mbar_compute_expectations_position2 (line 243) | def test_mbar_compute_expectations_position2(mbar_and_test):
  function test_mbar_compute_expectations_potential (line 256) | def test_mbar_compute_expectations_potential(mbar_and_test):
  function test_mbar_compute_expectations_edges (line 283) | def test_mbar_compute_expectations_edges(
  function multiExpectationAssertion (line 315) | def multiExpectationAssertion(results, test, state=1):
  function test_mbar_compute_multiple_expectations (line 326) | def test_mbar_compute_multiple_expectations(mbar_and_test):
  function test_mbar_compute_multiple_expectations_more_dims (line 343) | def test_mbar_compute_multiple_expectations_more_dims(mbar_and_test_kln):
  function test_mbar_compute_entropy_and_enthalpy (line 362) | def test_mbar_compute_entropy_and_enthalpy(mbar_and_test, with_uxx=True):
  function test_mbar_compute_entropy_and_enthalpy_edges (line 404) | def test_mbar_compute_entropy_and_enthalpy_edges(
  function test_mbar_compute_effective_sample_number (line 414) | def test_mbar_compute_effective_sample_number(mbar_and_test):
  function test_mbar_compute_overlap_analytical (line 425) | def test_mbar_compute_overlap_analytical():
  function test_mbar_compute_overlap_nonanalytical (line 451) | def test_mbar_compute_overlap_nonanalytical(mbar_and_test):
  function test_mbar_weights (line 466) | def test_mbar_weights(mbar_and_test):
  function test_mbar_computePerturbedFreeEnergeies (line 484) | def test_mbar_computePerturbedFreeEnergeies(system_generator, mode, bad_n):
  function test_mbar_compute_expectations_inner (line 518) | def test_mbar_compute_expectations_inner(mbar_and_test):
  function test_mbar_bootstrap_deterministic_given_same_seed (line 534) | def test_mbar_bootstrap_deterministic_given_same_seed(fixed_harmonic_sam...
  function test_mbar_numba_solver_matches_default (line 548) | def test_mbar_numba_solver_matches_default(fixed_harmonic_sample):

FILE: pymbar/tests/test_mbar_solvers.py
  function base_oscillator (line 14) | def base_oscillator():
  function more_oscillators (line 20) | def more_oscillators():
  function test_solvers (line 30) | def test_solvers(statesa, statesb, test_system):
  function run_mbar_protocol (line 44) | def run_mbar_protocol(oscillator_bundle, protocol):
  function test_protocols (line 75) | def test_protocols(base_oscillator, more_oscillators, protocol):
  class TestPymbarJaxDisabled (line 94) | class TestPymbarJaxDisabled:
    method test_env_values (line 117) | def test_env_values(self, monkeypatch, env_value, expected):
    method test_unset_variable (line 122) | def test_unset_variable(self, monkeypatch):

FILE: pymbar/tests/test_timeseries.py
  function data (line 22) | def data(N=10000, K=10):
  function test_statistical_inefficiency_single (line 36) | def test_statistical_inefficiency_single(data):
  function test_statistical_inefficiency_multiple (line 50) | def test_statistical_inefficiency_multiple(data):
  function test_statistical_inefficiency_fft (line 61) | def test_statistical_inefficiency_fft(data):
  function test_statistical_inefficiency_fft_gaussian (line 77) | def test_statistical_inefficiency_fft_gaussian():
  function test_detectEquil (line 107) | def test_detectEquil():
  function test_detectEquil_binary (line 113) | def test_detectEquil_binary():
  function test_compare_detectEquil (line 119) | def test_compare_detectEquil(show_hist=False):
  function test_detectEquil_constant_trailing (line 147) | def test_detectEquil_constant_trailing():
  function test_correlationFunctionMultiple (line 161) | def test_correlationFunctionMultiple():

FILE: pymbar/tests/test_utils.py
  function test_logsumexp (line 13) | def test_logsumexp():
  function test_logsumexp_single_infinite (line 24) | def test_logsumexp_single_infinite():
  function test_logsumexp_b (line 31) | def test_logsumexp_b():
  function test_logsum (line 43) | def test_logsum():
  function test_non_normalized_w_badrow (line 51) | def test_non_normalized_w_badrow():
  function test_non_normalized_w_badcol (line 58) | def test_non_normalized_w_badcol():
  function test_type_ensure (line 195) | def test_type_ensure(fn_args_and_kwargs, expected, warn):
  function test_kln_to_nk_to_k (line 209) | def test_kln_to_nk_to_k(n_k):

FILE: pymbar/testsystems/exponential_distributions.py
  class ExponentialTestCase (line 4) | class ExponentialTestCase(object):
    method __init__ (line 41) | def __init__(self, rates=(1, 2, 3, 4, 5), beta=1.0):
    method analytical_free_energies (line 62) | def analytical_free_energies(self):
    method analytical_means (line 66) | def analytical_means(self):
    method analytical_variances (line 69) | def analytical_variances(self):
    method analytical_standard_deviations (line 72) | def analytical_standard_deviations(self):
    method analytical_observable (line 75) | def analytical_observable(self, observable="position"):
    method analytical_entropies (line 86) | def analytical_entropies(self):
    method analytical_x_squared (line 92) | def analytical_x_squared(self):
    method sample (line 95) | def sample(self, N_k=(10, 20, 30, 40, 50), mode="u_kln", seed=None):
    method evenly_spaced_exponentials (line 201) | def evenly_spaced_exponentials(

FILE: pymbar/testsystems/gaussian_work.py
  function gaussian_work_example (line 4) | def gaussian_work_example(N_F=200, N_R=200, mu_F=2.0, DeltaF=None, sigma...

FILE: pymbar/testsystems/harmonic_oscillators.py
  class HarmonicOscillatorsTestCase (line 4) | class HarmonicOscillatorsTestCase(object):
    method __init__ (line 41) | def __init__(self, O_k=(0, 1, 2, 3, 4), K_k=(1, 2, 4, 8, 16), beta=1.0):
    method analytical_means (line 73) | def analytical_means(self):
    method analytical_variances (line 76) | def analytical_variances(self):
    method analytical_standard_deviations (line 79) | def analytical_standard_deviations(self):
    method analytical_observable (line 82) | def analytical_observable(self, observable="position"):
    method analytical_free_energies (line 92) | def analytical_free_energies(self, subtract_component=0):
    method analytical_entropies (line 98) | def analytical_entropies(self, subtract_component=0):
    method sample (line 103) | def sample(self, N_k=(10, 20, 30, 40, 50), mode="u_kn", seed=None):
    method evenly_spaced_oscillators (line 210) | def evenly_spaced_oscillators(

FILE: pymbar/testsystems/timeseries.py
  function correlated_timeseries_example (line 4) | def correlated_timeseries_example(N=10000, tau=5.0, seed=None):

FILE: pymbar/timeseries.py
  function statistical_inefficiency (line 83) | def statistical_inefficiency(A_n, B_n=None, fast=False, mintime=3, fft=F...
  function statistical_inefficiency_multiple (line 209) | def statistical_inefficiency_multiple(A_kn, fast=False, return_correlati...
  function integrated_autocorrelation_time (line 371) | def integrated_autocorrelation_time(A_n, B_n=None, fast=False, mintime=3):
  function integrated_autocorrelation_timeMultiple (line 388) | def integrated_autocorrelation_timeMultiple(A_kn, fast=False):
  function normalized_fluctuation_correlation_function (line 405) | def normalized_fluctuation_correlation_function(A_n, B_n=None, N_max=Non...
  function normalized_fluctuation_correlation_function_multiple (line 509) | def normalized_fluctuation_correlation_function_multiple(
  function subsample_correlated_data (line 664) | def subsample_correlated_data(A_t, g=None, fast=False, conservative=Fals...
  function detect_equilibration (line 771) | def detect_equilibration(A_t, fast=True, nskip=1):
  function statistical_inefficiency_fft (line 839) | def statistical_inefficiency_fft(A_n, mintime=3):
  function detect_equilibration_binary_search (line 901) | def detect_equilibration_binary_search(A_t, bs_nodes=10):

FILE: pymbar/utils.py
  class TypeCastPerformanceWarning (line 36) | class TypeCastPerformanceWarning(RuntimeWarning):
  function kln_to_kn (line 40) | def kln_to_kn(kln, N_k=None, cleanup=False):
  function kn_to_n (line 77) | def kn_to_n(kn, N_k=None, cleanup=False):
  function ensure_type (line 116) | def ensure_type(
  function _logsum (line 234) | def _logsum(a_n):
  function logsumexp (line 278) | def logsumexp(a, axis=None, b=None, use_numexpr=True):
  function check_w_normalized (line 339) | def check_w_normalized(W, N_k, tolerance=1.0e-4):
  class ParameterError (line 400) | class ParameterError(Exception):
  class ConvergenceError (line 406) | class ConvergenceError(Exception):
  class BoundsError (line 412) | class BoundsError(Exception):
  class DataError (line 418) | class DataError(Exception):

FILE: pymbar/utils_for_testing.py
  function oscillators (line 62) | def oscillators(n_states, n_samples, provide_test=False):
  function exponentials (line 75) | def exponentials(n_states, n_samples, provide_test=False):
Copy disabled (too large) Download .json
Condensed preview — 399 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (31,138K chars).
[
  {
    "path": ".codecov.yml",
    "chars": 402,
    "preview": "# Codecov configuration to make it a bit less noisy\ncoverage:\n  ignore:\n    - pymbar/tests/.*\n    - pymbar/testsystems/."
  },
  {
    "path": ".gitattributes",
    "chars": 31,
    "preview": "pymbar/_version.py export-subst"
  },
  {
    "path": ".github/workflows/CI.yaml",
    "chars": 3466,
    "preview": "name: CI\n\non:\n  push:\n    branches:\n      - 'main'\n      - 'pymbar4'\n      - 'gha'\n  pull_request:\n    branches:\n      -"
  },
  {
    "path": ".gitignore",
    "chars": 2356,
    "preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
  },
  {
    "path": ".pylintrc",
    "chars": 16689,
    "preview": "# Based on Apache 2.0 licensed code from https://github.com/ClusterHQ/flocker\n\n[MASTER]\n\n# Specify a configuration file."
  },
  {
    "path": ".readthedocs.yml",
    "chars": 252,
    "preview": "# .readthedocs.yml\n\nversion: 2\n\nbuild:\n  os: \"ubuntu-20.04\"\n  tools:\n    python: \"mambaforge-4.10\"\n\npython:\n  install:\n "
  },
  {
    "path": "LICENSE",
    "chars": 1098,
    "preview": "Copyright 2017 Michael R. Shirts, John D. Chodera, Shirts Lab, Chodera Lab\n\nPermission is hereby granted, free of charge"
  },
  {
    "path": "README.md",
    "chars": 7512,
    "preview": "[![Build Status](https://travis-ci.org/choderalab/pymbar.png)](https://travis-ci.org/choderalab/pymbar)\n[![Anaconda Clou"
  },
  {
    "path": "appveyor.yml",
    "chars": 1100,
    "preview": "environment:\n  global:\n    # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the\n    # /E:ON and /V:ON optio"
  },
  {
    "path": "devtools/README.md",
    "chars": 897,
    "preview": "# Developer Notes / Tools\n\nAssorted notes for developers.\n\n## How to do a release\n\n<!-- This is outdated now! -->\n\n- Upd"
  },
  {
    "path": "devtools/appveyor/install.ps1",
    "chars": 3091,
    "preview": "# Sample script to install Miniconda under Windows\n# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner, Robert M"
  },
  {
    "path": "devtools/appveyor/run_with_env.cmd",
    "chars": 1842,
    "preview": ":: To build extensions for 64 bit Python 3, we need to configure environment\n:: variables to use the MSVC 2010 C++ compi"
  },
  {
    "path": "devtools/conda-envs/test_env.yaml",
    "chars": 316,
    "preview": "name: test\nchannels:\n  - conda-forge\n  - conda-forge/label/python_rc\ndependencies:\n    # Base depends\n  - python\n  - pip"
  },
  {
    "path": "devtools/conda-envs/test_env_jax.yaml",
    "chars": 425,
    "preview": "name: test\nchannels:\n  - conda-forge\n  - conda-forge/label/python_rc\ndependencies:\n    # Base depends\n  - python\n  - pip"
  },
  {
    "path": "devtools/conda-recipe/README.md",
    "chars": 738,
    "preview": "This is a recipe for building the current development package into a conda\nbinary.\n\nThe installation on travis-ci is don"
  },
  {
    "path": "devtools/conda-recipe/bld.bat",
    "chars": 51,
    "preview": "\"%PYTHON%\" setup.py install\nif errorlevel 1 exit 1\n"
  },
  {
    "path": "devtools/conda-recipe/build.sh",
    "chars": 219,
    "preview": "#!/bin/bash\n\n$PYTHON setup.py install\n\n# Add more build steps here, if they are necessary.\n\n# See\n# http://docs.continuu"
  },
  {
    "path": "devtools/conda-recipe/meta.yaml",
    "chars": 539,
    "preview": "package:\n  name: pymbar-dev\n  version: !!str 3.0.4.dev0\n\nsource:\n  path: ../../\n\nrequirements:\n  build:\n    - python\n   "
  },
  {
    "path": "devtools/travis-ci/after_success.sh",
    "chars": 1186,
    "preview": "#!/bin/bash\n# Must be invoked with $PACKAGENAME\n\necho $TRAVIS_PULL_REQUEST $TRAVIS_BRANCH\nPUSH_DOCS_TO_S3=false\n\nif [ \"$"
  },
  {
    "path": "devtools/travis-ci/index.html",
    "chars": 81,
    "preview": "<html><head><meta http-equiv=\"refresh\" content=\"0;URL='/latest'\"/></head></html>\n"
  },
  {
    "path": "devtools/travis-ci/install.sh",
    "chars": 823,
    "preview": "# Temporarily change directory to $HOME to install software\npushd .\ncd $HOME\n\n# Install Miniconda\nMINICONDA=Miniconda3-l"
  },
  {
    "path": "devtools/travis-ci/push-docs-to-s3.py",
    "chars": 1410,
    "preview": "#!/usr/bin/env python\n\n\"\"\"\nMust have the vollowing environment variables defined:\n* BUCKET_NAME : AWS bucket name\n* PREF"
  },
  {
    "path": "docs/Makefile",
    "chars": 6762,
    "preview": "# Makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line.\nSPHINXOPTS    =\nSPHINXBUILD "
  },
  {
    "path": "docs/conf.py",
    "chars": 10708,
    "preview": "# -*- coding: utf-8 -*-\n#\n# pymbar documentation build configuration file, created by\n# sphinx-quickstart on Mon May  5 "
  },
  {
    "path": "docs/fes_with_pymbar.rst",
    "chars": 2517,
    "preview": ".. _fes_with_pymbar:\n\nFree energy surfaces with pymbar\n#################################\n\n-------------------\nFree energ"
  },
  {
    "path": "docs/getting_started.rst",
    "chars": 1392,
    "preview": ".. _getting-started:\n\nGetting started\n###############\n\n.. highlight: bash\n\nInstalling ``pymbar``\n=====================\n\n"
  },
  {
    "path": "docs/index.rst",
    "chars": 749,
    "preview": ".. pymbar documentation master file, created by\n   sphinx-quickstart on Mon May  5 19:35:19 2014.\n   You can adapt this "
  },
  {
    "path": "docs/mbar.rst",
    "chars": 390,
    "preview": ".. currentmodule:: pymbar.mbar\n\nThe :mod:`mbar` module: :class:`MBAR`\n======================================\n\nThe :mod:`"
  },
  {
    "path": "docs/moving_from_pymbar3.rst",
    "chars": 7909,
    "preview": ".. _moving_from_pymbar3:\n\nMoving from ``pymbar`` version 3\n################################\n\nPymbar v4.0 contains severa"
  },
  {
    "path": "docs/other_estimators.rst",
    "chars": 303,
    "preview": ".. _other_estimators:\n\nOther estimators \n#################################\n\n``pymbar`` implements other reweighting esti"
  },
  {
    "path": "docs/references.bib",
    "chars": 966,
    "preview": "@article{shirts-chodera:jcp:2008:mbar,\n   author = {Michael R. Shirts and John D. Chodera},\n   title = {Statistically op"
  },
  {
    "path": "docs/strategies_for_solution.rst",
    "chars": 10487,
    "preview": ".. _strategies_for_solution:\n\nStrategies for solution\n#######################\n\n----------------------------------------\n"
  },
  {
    "path": "docs/timeseries.rst",
    "chars": 3359,
    "preview": ".. currentmodule:: pymbar.timeseries\n\nThe timeseries module :mod:`pymbar.timeseries`\n==================================="
  },
  {
    "path": "docs/utils.rst",
    "chars": 237,
    "preview": ".. currentmodule:: pymbar.utils\n\nUtilities : :mod:`pymbar.utils`\n===============================\n\nThese functions are so"
  },
  {
    "path": "docs/zbibliography.rst",
    "chars": 99,
    "preview": ".. only:: html\n\n   Bibliography\n   ############\n\n.. bibliography:: references.bib\n   :style: unsrt\n"
  },
  {
    "path": "examples/README.md",
    "chars": 1061,
    "preview": "pymbar-examples\n===============\n\nExamples illustrating the use of [MBAR](http://github.com/choderalab/pymbar) for variou"
  },
  {
    "path": "examples/alchemical-free-energy/README.md",
    "chars": 483,
    "preview": "The alchemical_analysis.py script has been moved to\n\nhttps://github.com/MobleyLab/alchemical-analysis\n\nIt contains an im"
  },
  {
    "path": "examples/constant-force-optical-trap/README.md",
    "chars": 2554,
    "preview": "# MBAR analysis of single-molecule DNA hairpin single-molecule equilibrium experiments under constant force load.\n\n## Re"
  },
  {
    "path": "examples/constant-force-optical-trap/extract-data.py",
    "chars": 4035,
    "preview": "\"\"\"\nExtract forces and extension timeseries data from Excel spreadsheet files (.xls) provided by Michael T. Woodside\n\nRE"
  },
  {
    "path": "examples/constant-force-optical-trap/force-bias-optical-trap.py",
    "chars": 15252,
    "preview": "\"\"\"\nExample illustrating the application of MBAR to compute a 1D free energy profile\nfrom a series of force-clamp single"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-0.out",
    "chars": 2150,
    "preview": " 494.896      3701.000374        58.541031\n 503.672      3501.459165        57.063603\n 504.992      2816.929479        5"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-1.out",
    "chars": 2150,
    "preview": " 494.896      2313.702359        46.974865\n 503.672      2539.283830        49.095057\n 504.992      2174.223836        4"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-10.out",
    "chars": 2150,
    "preview": " 494.896        70.722425         8.403713\n 503.672       140.994193        11.857344\n 504.992       158.729321        1"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-11.out",
    "chars": 2150,
    "preview": " 494.896        74.834655         8.644226\n 503.672       148.268614        12.158493\n 504.992       166.411673        1"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-12.out",
    "chars": 2150,
    "preview": " 494.896        15.430832         3.927604\n 503.672        35.820985         5.982919\n 504.992        43.503565         "
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-13.out",
    "chars": 2150,
    "preview": " 494.896         2.867677         1.693373\n 503.672         7.709115         2.776315\n 504.992        10.095481         "
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-14.out",
    "chars": 2150,
    "preview": " 494.896         0.479734         0.692625\n 503.672         1.486223         1.219090\n 504.992         2.097724         "
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-15.out",
    "chars": 2150,
    "preview": " 494.896         0.093341         0.305517\n 503.672         0.326441         0.571348\n 504.992         0.491981         "
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-2.out",
    "chars": 2150,
    "preview": " 494.896      2088.020847        44.730574\n 503.672      2358.996570        47.409907\n 504.992      2045.115104        4"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-3.out",
    "chars": 2150,
    "preview": " 494.896      1257.910671        35.018051\n 503.672      1614.718903        39.529389\n 504.992      1480.167987        3"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-4.out",
    "chars": 2150,
    "preview": " 494.896      1111.004781        32.959341\n 503.672      1466.324239        37.726941\n 504.992      1360.857789        3"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-5.out",
    "chars": 2150,
    "preview": " 494.896       510.237704        22.472892\n 503.672       781.785205        27.740970\n 504.992       776.434345        2"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-6.out",
    "chars": 2150,
    "preview": " 494.896       245.421426        15.627437\n 503.672       420.331068        20.415619\n 504.992       439.791046        2"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-7.out",
    "chars": 2150,
    "preview": " 494.896       530.676214        22.913836\n 503.672       807.708350        28.189723\n 504.992       799.718852        2"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-8.out",
    "chars": 2150,
    "preview": " 494.896       202.873662        14.214447\n 503.672       356.517718        18.814240\n 504.992       377.614781        1"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-expected-9.out",
    "chars": 2150,
    "preview": " 494.896       193.232482        13.873922\n 503.672       341.757438        18.423395\n 504.992       363.089161        1"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-0.out",
    "chars": 2150,
    "preview": " 494.896      2755.000000       407.379024\n 503.672      2583.000000       395.174739\n 504.992      2449.000000       38"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-1.out",
    "chars": 2150,
    "preview": " 494.896      2652.000000       491.611384\n 503.672      2561.000000       483.567276\n 504.992      2300.000000       45"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-10.out",
    "chars": 2150,
    "preview": " 494.896       209.000000       171.864223\n 503.672       267.000000       194.139931\n 504.992       292.000000       20"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-11.out",
    "chars": 2150,
    "preview": " 494.896       157.000000       138.463500\n 503.672       248.000000       173.865936\n 504.992       293.000000       18"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-12.out",
    "chars": 2150,
    "preview": " 494.896        84.000000        91.135617\n 503.672       124.000000       110.684105\n 504.992       145.000000       11"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-13.out",
    "chars": 2150,
    "preview": " 494.896         4.000000        10.615086\n 503.672         5.000000        11.867908\n 504.992        13.000000        1"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-14.out",
    "chars": 2150,
    "preview": " 494.896         2.000000         5.861478\n 503.672         5.000000         9.267532\n 504.992         5.000000         "
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-15.out",
    "chars": 2150,
    "preview": " 494.896         3.000000         4.904183\n 503.672         3.000000         4.904183\n 504.992         3.000000         "
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-2.out",
    "chars": 2150,
    "preview": " 494.896      2026.000000       372.540684\n 503.672      1989.000000       369.265547\n 504.992      1923.000000       36"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-3.out",
    "chars": 2150,
    "preview": " 494.896      1987.000000       790.203327\n 503.672      1939.000000       780.990596\n 504.992      1857.000000       76"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-4.out",
    "chars": 2150,
    "preview": " 494.896      1614.000000       636.199626\n 503.672      1560.000000       625.815261\n 504.992      1627.000000       63"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-5.out",
    "chars": 2150,
    "preview": " 494.896      1358.000000       547.329680\n 503.672      1357.000000       547.133746\n 504.992      1432.000000       56"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-6.out",
    "chars": 2150,
    "preview": " 494.896       881.000000       430.916491\n 503.672       984.000000       454.932418\n 504.992      1065.000000       47"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-7.out",
    "chars": 2150,
    "preview": " 494.896      1122.000000       494.822006\n 503.672      1139.000000       498.469857\n 504.992      1255.000000       52"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-8.out",
    "chars": 2150,
    "preview": " 494.896       762.000000       379.366235\n 503.672       813.000000       391.652973\n 504.992       881.000000       40"
  },
  {
    "path": "examples/constant-force-optical-trap/output/counts-observed-9.out",
    "chars": 2150,
    "preview": " 494.896       384.000000       250.905585\n 503.672       423.000000       263.235311\n 504.992       460.000000       27"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-0.out",
    "chars": 1350,
    "preview": " 494.896    0.288    0.000\n 503.672   -1.964    0.122\n 504.992   -2.159    0.127\n 505.929   -2.396    0.125\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-1.out",
    "chars": 1350,
    "preview": " 494.896    1.249    0.122\n 503.672   -1.151    0.000\n 504.992   -1.409    0.124\n 505.929   -1.690    0.122\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-10.out",
    "chars": 1350,
    "preview": " 494.896    5.458    0.111\n 503.672    2.461    0.105\n 504.992    1.929    0.109\n 505.929    1.454    0.107\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-11.out",
    "chars": 1350,
    "preview": " 494.896    5.411    0.111\n 503.672    2.420    0.105\n 504.992    1.892    0.109\n 505.929    1.419    0.107\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-12.out",
    "chars": 1350,
    "preview": " 494.896    6.624    0.111\n 503.672    3.474    0.103\n 504.992    2.867    0.108\n 505.929    2.338    0.106\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-13.out",
    "chars": 1350,
    "preview": " 494.896    7.784    0.113\n 503.672    4.488    0.103\n 504.992    3.805    0.107\n 505.929    3.222    0.105\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-14.out",
    "chars": 1350,
    "preview": " 494.896    8.939    0.112\n 503.672    5.501    0.100\n 504.992    4.743    0.105\n 505.929    4.106    0.103\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-15.out",
    "chars": 1350,
    "preview": " 494.896    9.951    0.114\n 503.672    6.392    0.101\n 504.992    5.569    0.105\n 505.929    4.884    0.103\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-2.out",
    "chars": 1350,
    "preview": " 494.896    1.441    0.122\n 503.672   -0.989    0.000\n 504.992   -1.259    0.124\n 505.929   -1.548    0.122\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-3.out",
    "chars": 1350,
    "preview": " 494.896    2.299    0.123\n 503.672   -0.258    0.119\n 504.992   -0.584    0.124\n 505.929   -0.913    0.122\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-4.out",
    "chars": 1350,
    "preview": " 494.896    2.489    0.123\n 503.672   -0.096    0.119\n 504.992   -0.434    0.124\n 505.929   -0.772    0.122\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-5.out",
    "chars": 1350,
    "preview": " 494.896    3.531    0.121\n 503.672    0.797    0.117\n 504.992    0.391    0.121\n 505.929    0.005    0.119\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-6.out",
    "chars": 1350,
    "preview": " 494.896    4.333    0.115\n 503.672    1.487    0.110\n 504.992    1.029    0.115\n 505.929    0.606    0.113\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-7.out",
    "chars": 1350,
    "preview": " 494.896    3.484    0.122\n 503.672    0.757    0.118\n 504.992    0.354    0.123\n 505.929   -0.030    0.121\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-8.out",
    "chars": 1350,
    "preview": " 494.896    4.521    0.115\n 503.672    1.649    0.110\n 504.992    1.179    0.115\n 505.929    0.747    0.113\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-expected-9.out",
    "chars": 1350,
    "preview": " 494.896    4.568    0.115\n 503.672    1.690    0.110\n 504.992    1.216    0.115\n 505.929    0.783    0.113\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-0.out",
    "chars": 1350,
    "preview": " 494.896    0.999    0.148\n 503.672   -1.244    0.153\n 504.992   -1.603    0.157\n 505.929   -1.802    0.161\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-1.out",
    "chars": 1350,
    "preview": " 494.896    1.220    0.185\n 503.672   -1.052    0.189\n 504.992   -1.357    0.200\n 505.929   -1.567    0.203\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-10.out",
    "chars": 1350,
    "preview": " 494.896    4.441    0.822\n 503.672    1.889    0.727\n 504.992    1.386    0.695\n 505.929    0.972    0.638\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-11.out",
    "chars": 1350,
    "preview": " 494.896    4.741    0.882\n 503.672    1.976    0.701\n 504.992    1.397    0.645\n 505.929    1.204    0.662\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-12.out",
    "chars": 1350,
    "preview": " 494.896    5.128    1.085\n 503.672    2.431    0.893\n 504.992    1.862    0.825\n 505.929    1.765    0.889\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-13.out",
    "chars": 1350,
    "preview": " 494.896    7.200    2.654\n 503.672    4.670    2.374\n 504.992    3.301    1.472\n 505.929    2.849    1.327\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-14.out",
    "chars": 1350,
    "preview": " 494.896    7.508    2.931\n 503.672    4.284    1.854\n 504.992    3.871    1.854\n 505.929    4.543    2.931\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-15.out",
    "chars": 1350,
    "preview": " 494.896    6.956    1.635\n 503.672    4.648    1.635\n 504.992    4.235    1.635\n 505.929    3.991    1.635\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-2.out",
    "chars": 1350,
    "preview": " 494.896    1.264    0.184\n 503.672   -1.025    0.186\n 504.992   -1.404    0.189\n 505.929   -1.656    0.188\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-3.out",
    "chars": 1350,
    "preview": " 494.896    1.875    0.398\n 503.672   -0.408    0.403\n 504.992   -0.778    0.412\n 505.929   -1.056    0.405\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-4.out",
    "chars": 1350,
    "preview": " 494.896    2.339    0.394\n 503.672    0.065    0.401\n 504.992   -0.390    0.393\n 505.929   -0.637    0.392\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-5.out",
    "chars": 1350,
    "preview": " 494.896    2.624    0.403\n 503.672    0.317    0.403\n 504.992   -0.149    0.392\n 505.929   -0.388    0.393\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-6.out",
    "chars": 1350,
    "preview": " 494.896    3.118    0.489\n 503.672    0.700    0.462\n 504.992    0.208    0.444\n 505.929   -0.051    0.441\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-7.out",
    "chars": 1350,
    "preview": " 494.896    2.823    0.441\n 503.672    0.500    0.438\n 504.992   -0.010    0.416\n 505.929   -0.279    0.411\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-8.out",
    "chars": 1350,
    "preview": " 494.896    3.309    0.498\n 503.672    0.937    0.482\n 504.992    0.444    0.462\n 505.929    0.162    0.454\n 506.689   -"
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-observed-9.out",
    "chars": 1350,
    "preview": " 494.896    3.927    0.653\n 503.672    1.523    0.622\n 504.992    1.026    0.597\n 505.929    0.738    0.584\n 506.689    "
  },
  {
    "path": "examples/constant-force-optical-trap/output/pmf-unbiased.out",
    "chars": 1350,
    "preview": " 494.896    2.770    0.000\n 503.672   20.816    0.980\n 504.992   24.958    0.978\n 505.929   27.635    0.976\n 506.689   3"
  },
  {
    "path": "examples/constant-force-optical-trap/processed-data/20R55_4T.forces",
    "chars": 95,
    "preview": "12.35 12.55 12.59 12.77 12.81 13.03 13.20 13.02 13.24 13.25 13.44 13.43 13.69 13.94 14.19 14.41"
  },
  {
    "path": "examples/constant-force-optical-trap/processed-data/20R55_4T.trajectories",
    "chars": 8800000,
    "preview": "508.658493 500.419414 510.554524 503.680961 511.764737 520.049065 522.264364 517.300813 508.683559 529.654671 534.133573"
  },
  {
    "path": "examples/harmonic-oscillators/README.md",
    "chars": 2930,
    "preview": "# Harmonic oscillators\n\n\nThis folder contains two examples illustrating application of MBAR to\na set of harmonic oscilla"
  },
  {
    "path": "examples/harmonic-oscillators/harmonic-oscillators-distributions.py",
    "chars": 12900,
    "preview": "\"\"\"\nTest MBAR by performing statistical tests on a set of of 1D harmonic oscillators, for which\nthe true free energy dif"
  },
  {
    "path": "examples/harmonic-oscillators/harmonic-oscillators-distributions.py_output.txt",
    "chars": 117194,
    "preview": "Gaussian widths:\n[0.2        0.25       0.33333333 0.5        1.         1.        ]\nComputing dimensionless free energi"
  },
  {
    "path": "examples/harmonic-oscillators/harmonic-oscillators.py",
    "chars": 36178,
    "preview": "\"\"\"\nTest MBAR by performing statistical tests on a set of of 1D harmonic oscillators, for which\nthe true free energy dif"
  },
  {
    "path": "examples/harmonic-oscillators/harmonic-oscillators.py_output.txt",
    "chars": 79011,
    "preview": "Computing dimensionless free energies analytically...\nThis script will draw samples from 6 harmonic oscillators.\nThe har"
  },
  {
    "path": "examples/heat-capacity/README.md",
    "chars": 2637,
    "preview": "# Heat capacity\n\n## Usage\n\nFor calling with MBAR error estimates:\n\n```\npython heat-capacity.py -r 0 > heat-capacity.py.s"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP0/ener_box0.output",
    "chars": 129128,
    "preview": "15000000\t12590\t78.828012\t48.292446\t0.000000\t252.100287\t0.000000\t-388.402619\t0.000000\t-9.181874\t222.852144\t213.670270 0.0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP0/simul0.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP1/ener_box1.output",
    "chars": 129166,
    "preview": "15005000\t27031\t82.012250\t58.654990\t0.000000\t247.464400\t0.000000\t-364.557059\t0.000000\t23.574581\t259.167991\t282.742572 0.0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP1/simul1.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP10/ener_box10.output",
    "chars": 130336,
    "preview": "15005000\t28217\t97.303643\t61.474386\t0.000000\t265.755342\t0.000000\t-93.365838\t0.000000\t331.167533\t235.689182\t566.856715 0.0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP10/simul10.output",
    "chars": 237404,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP11/ener_box11.output",
    "chars": 130314,
    "preview": "15005000\t28459\t97.407887\t91.992016\t0.000000\t290.817697\t0.000000\t-85.345534\t0.000000\t394.872065\t290.521897\t685.393962 0.0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP11/simul11.output",
    "chars": 237404,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP12/ener_box12.output",
    "chars": 130345,
    "preview": "15005000\t28742\t100.766301\t73.204551\t0.000000\t309.317480\t0.000000\t-64.871040\t0.000000\t418.417291\t253.250193\t671.667483 0."
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP12/simul12.output",
    "chars": 237404,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP13/ener_box13.output",
    "chars": 130393,
    "preview": "15005000\t28792\t106.515243\t98.728074\t0.000000\t266.839619\t0.000000\t-112.825352\t0.000000\t359.257584\t269.701240\t628.958824 0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP13/simul13.output",
    "chars": 237404,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP14/ener_box14.output",
    "chars": 130321,
    "preview": "15005000\t27106\t108.678670\t67.907348\t0.000000\t275.518528\t0.000000\t-139.462775\t0.000000\t312.641771\t295.900571\t608.542342 0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP14/simul14.output",
    "chars": 237404,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP15/ener_box15.output",
    "chars": 130307,
    "preview": "15005000\t12720\t123.579108\t117.942510\t0.000000\t283.312647\t0.000000\t-119.254818\t0.000000\t405.579447\t293.931250\t699.510698 "
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP15/simul15.output",
    "chars": 237404,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP2/ener_box2.output",
    "chars": 129187,
    "preview": "15005000\t28895\t69.158381\t84.261891\t0.000000\t250.464982\t0.000000\t-365.294043\t0.000000\t38.591211\t188.902555\t227.493766 0.0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP2/simul2.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP3/ener_box3.output",
    "chars": 129229,
    "preview": "15005000\t28795\t64.159932\t83.427826\t0.000000\t247.008482\t0.000000\t-371.960300\t0.000000\t22.635940\t302.113055\t324.748994 0.0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP3/simul3.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP4/ener_box4.output",
    "chars": 129269,
    "preview": "15005000\t28281\t68.589662\t60.254940\t0.000000\t250.822257\t0.000000\t-331.571479\t0.000000\t48.095381\t248.596677\t296.692058 0.0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP4/simul4.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP5/ener_box5.output",
    "chars": 129366,
    "preview": "15005000\t26119\t66.771324\t51.877800\t0.000000\t246.012933\t0.000000\t-353.723056\t0.000000\t10.939000\t240.186423\t251.125424 0.0"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP5/simul5.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP6/ener_box6.output",
    "chars": 129551,
    "preview": "15005000\t19540\t78.594445\t78.816271\t0.000000\t273.181289\t0.000000\t-118.899052\t0.000000\t311.692953\t285.211845\t596.904798 0."
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP6/simul6.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP7/ener_box7.output",
    "chars": 130131,
    "preview": "15005000\t19403\t115.381342\t42.180277\t0.000000\t249.544529\t0.000000\t-381.535374\t0.000000\t25.570774\t272.962101\t298.532875 0."
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP7/simul7.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP8/ener_box8.output",
    "chars": 130297,
    "preview": "15005000\t25651\t72.841786\t67.340838\t0.000000\t259.333710\t0.000000\t-103.517469\t0.000000\t295.998865\t294.342166\t590.341031 0."
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP8/simul8.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP9/ener_box9.output",
    "chars": 130344,
    "preview": "15005000\t27704\t103.953322\t65.639172\t0.000000\t286.959489\t0.000000\t-66.130268\t0.000000\t390.421715\t242.833192\t633.254907 0."
  },
  {
    "path": "examples/heat-capacity/energydata/TEMP9/simul9.output",
    "chars": 237402,
    "preview": "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ \n@@@@@@      Biological Molecule Simulation Code     @@@@@@ \n"
  },
  {
    "path": "examples/heat-capacity/heat-capacity.py",
    "chars": 19512,
    "preview": "\"\"\"\ntodo -- simplify the total energy read in, the kinetic energy read-in, temperature read-in\n\"\"\"\n\n# =================="
  },
  {
    "path": "examples/heat-capacity/heat-capacity.py.sample_out_bootstrap",
    "chars": 62007,
    "preview": "\nPreparing data:\n--Reading temperatures from energydata/...\n--Reading total energies from energydata/...\n--Adding interm"
  },
  {
    "path": "examples/heat-capacity/heat-capacity.py.sample_out_no_bootstrap",
    "chars": 23083,
    "preview": "\nPreparing data:\n--Reading temperatures from energydata/...\n--Reading total energies from energydata/...\n--Adding interm"
  },
  {
    "path": "examples/parallel-tempering-2dfes/README.md",
    "chars": 1851,
    "preview": "# Estimate 2D potential of mean force for alanine dipeptide parallel tempering data using MBAR.\n\nThis example demonstrat"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/README.md",
    "chars": 1301,
    "preview": "# Parallel tempering data for alanine dipeptide in explicit solvent.\n\n## Reference\n\n> [1] Chodera JD, Swope WC, Pitera J"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/0.phi",
    "chars": 70000,
    "preview": "-147.4\n-125.5\n-165.8\n-143.3\n-128.0\n-137.6\n-134.1\n-135.3\n-150.5\n-145.9\n-158.3\n-152.2\n-139.7\n-127.6\n-162.2\n-146.1\n-152.0\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/0.psi",
    "chars": 70000,
    "preview": "+138.7\n+124.9\n+140.5\n+148.7\n+089.3\n+143.4\n+108.3\n+104.9\n+113.1\n+126.0\n+135.0\n+097.1\n+135.4\n+131.7\n+112.0\n+132.3\n+156.8\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/1.phi",
    "chars": 70000,
    "preview": "-139.5\n-149.7\n-138.1\n-142.0\n-111.1\n-162.2\n-148.2\n-139.2\n-093.2\n-051.1\n-063.9\n-062.6\n-078.7\n-073.9\n-063.7\n-070.7\n-086.5\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/1.psi",
    "chars": 70000,
    "preview": "+143.5\n+163.5\n+149.6\n+140.4\n+168.5\n+150.0\n+137.7\n+131.8\n+130.0\n+131.2\n+118.4\n+142.8\n+154.3\n+172.3\n+140.3\n+158.1\n+174.6\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/10.phi",
    "chars": 70000,
    "preview": "-159.8\n-161.0\n-125.9\n-134.6\n-143.9\n-148.9\n-138.5\n-124.7\n-127.8\n-083.9\n-085.2\n-139.0\n-137.9\n-138.1\n-077.5\n-033.9\n-072.2\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/10.psi",
    "chars": 70000,
    "preview": "+156.6\n+103.2\n+171.1\n+117.0\n-154.4\n-166.4\n+149.8\n+158.7\n+162.8\n-158.5\n-140.4\n+167.7\n+160.3\n+108.8\n+146.1\n+121.6\n+175.9\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/11.phi",
    "chars": 70000,
    "preview": "-076.1\n-073.4\n-048.5\n-118.4\n-044.0\n-063.0\n-086.6\n-154.9\n-145.6\n-132.7\n-149.6\n-131.6\n-064.6\n-083.3\n-038.9\n-063.8\n-057.1\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/11.psi",
    "chars": 70000,
    "preview": "+144.1\n+171.6\n-177.9\n+161.2\n+108.1\n+117.2\n+173.8\n+160.2\n+130.6\n+121.0\n+083.4\n+151.0\n+162.8\n+168.5\n+142.7\n+133.2\n+133.6\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/12.phi",
    "chars": 70000,
    "preview": "-067.0\n-061.0\n-063.9\n-073.4\n-140.1\n-152.5\n-134.0\n-146.3\n-147.0\n-156.6\n-125.3\n-154.0\n-141.1\n-068.7\n-152.3\n-139.7\n-146.9\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/12.psi",
    "chars": 70000,
    "preview": "+160.9\n+125.2\n+153.9\n+144.9\n+152.4\n-178.3\n+142.1\n+135.5\n+140.8\n+071.3\n+172.4\n+158.0\n+141.2\n+158.7\n-175.2\n+137.1\n+161.3\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/13.phi",
    "chars": 70000,
    "preview": "-030.1\n-083.0\n-070.0\n-082.1\n-050.0\n-066.6\n-128.7\n-137.3\n-139.4\n-146.7\n-142.5\n-162.3\n-141.3\n-057.9\n-049.7\n-119.8\n-117.5\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/13.psi",
    "chars": 70000,
    "preview": "+108.4\n+111.7\n+107.0\n+163.8\n+124.8\n+144.5\n+150.3\n+154.0\n+141.4\n+112.9\n+119.6\n+142.2\n-173.3\n+165.4\n+123.4\n+155.0\n+164.5\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/14.phi",
    "chars": 70000,
    "preview": "-130.5\n-160.5\n-149.2\n-115.0\n-130.4\n-145.3\n-147.2\n-067.2\n-140.3\n-166.0\n-141.6\n-152.4\n-058.1\n-127.2\n-053.1\n-102.7\n-087.5\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/14.psi",
    "chars": 70000,
    "preview": "+168.3\n-177.6\n+176.9\n+157.6\n+138.2\n+142.9\n+087.5\n+049.9\n+098.2\n+173.2\n-171.4\n-071.9\n-056.9\n-068.1\n-069.5\n+034.7\n-015.3\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/15.phi",
    "chars": 70000,
    "preview": "-143.5\n-087.0\n-112.3\n-074.6\n-150.7\n-141.6\n-177.7\n-143.3\n-152.8\n-147.6\n-114.9\n-138.3\n-116.0\n-136.0\n-126.6\n-125.5\n-084.5\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/15.psi",
    "chars": 70000,
    "preview": "+169.4\n+152.5\n+153.8\n+128.0\n+177.3\n+145.7\n+150.6\n+148.4\n+146.8\n+148.3\n+134.6\n+065.0\n+163.4\n+096.5\n+133.1\n+171.3\n+149.5\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/16.phi",
    "chars": 70000,
    "preview": "-098.4\n-119.1\n-125.5\n-139.8\n-151.2\n-143.3\n-134.1\n-161.2\n-149.4\n-135.0\n-139.1\n-160.4\n-164.9\n-135.7\n-059.4\n-116.4\n-116.7\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/16.psi",
    "chars": 70000,
    "preview": "-173.0\n+159.3\n+161.2\n+143.1\n+167.2\n+161.5\n+168.7\n+138.6\n+163.8\n+163.1\n+154.6\n+148.9\n+151.4\n+129.8\n+168.5\n+152.1\n+147.7\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/17.phi",
    "chars": 70000,
    "preview": "-121.7\n-122.8\n-146.9\n-146.6\n-084.6\n-151.6\n-132.4\n-110.3\n-151.6\n-174.6\n-161.5\n-119.7\n-125.8\n-139.7\n-154.6\n-091.0\n-042.7\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/17.psi",
    "chars": 70000,
    "preview": "+158.3\n+160.7\n+113.8\n+078.9\n+082.2\n+157.0\n+157.6\n+150.0\n+155.7\n+142.7\n+145.9\n+171.1\n+056.8\n+051.1\n+115.5\n+153.3\n+138.9\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/18.phi",
    "chars": 70000,
    "preview": "-134.3\n-140.5\n-142.2\n-158.9\n-160.4\n-143.3\n-147.5\n-163.8\n-149.6\n-149.9\n-142.2\n-144.3\n-125.7\n-059.6\n-064.4\n-059.1\n-041.6\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/18.psi",
    "chars": 70000,
    "preview": "+156.3\n-161.4\n-164.3\n-160.3\n+149.0\n+126.5\n+127.2\n+147.8\n+123.2\n+151.9\n+118.6\n+155.2\n+144.2\n+127.1\n+140.0\n+123.4\n-164.0\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/19.phi",
    "chars": 70000,
    "preview": "-082.8\n-035.6\n-076.7\n-097.2\n-069.6\n-138.4\n-066.6\n-066.0\n-155.3\n-149.8\n-163.4\n-160.6\n-132.1\n-130.8\n-141.4\n-124.5\n-106.8\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/19.psi",
    "chars": 70000,
    "preview": "+145.0\n+112.2\n-179.0\n-167.1\n-156.8\n+154.8\n+157.3\n+134.3\n+165.4\n-147.3\n-177.7\n+114.5\n+147.9\n+172.3\n+174.7\n+150.0\n+126.0\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/2.phi",
    "chars": 70000,
    "preview": "-058.4\n-056.4\n-065.6\n-065.9\n-065.0\n-070.5\n-071.0\n-093.9\n-075.8\n-048.0\n-057.8\n-058.9\n-042.3\n-064.2\n-058.0\n-096.1\n-061.6\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/2.psi",
    "chars": 70000,
    "preview": "+137.4\n+153.9\n+151.2\n+133.9\n+136.5\n+159.6\n+149.9\n+141.3\n+128.3\n+108.7\n+141.9\n+151.0\n+136.9\n+146.4\n+157.6\n+169.8\n+144.9\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/20.phi",
    "chars": 70000,
    "preview": "-058.0\n-067.4\n-067.3\n-086.8\n-069.1\n-108.9\n-097.9\n-124.9\n-168.8\n-141.0\n-114.3\n-142.4\n-140.1\n-094.3\n-057.6\n-098.8\n-140.6\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/20.psi",
    "chars": 70000,
    "preview": "+116.9\n-172.3\n+158.5\n+111.0\n+133.8\n+077.7\n+165.5\n+168.7\n+176.2\n+169.0\n+141.7\n+156.4\n-166.6\n+123.2\n+157.0\n+156.5\n+166.8\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/21.phi",
    "chars": 70000,
    "preview": "+040.3\n+048.6\n+062.8\n+038.3\n-147.3\n-162.4\n+174.7\n-145.6\n-076.5\n-145.3\n-119.2\n-143.6\n-135.4\n-161.3\n-122.1\n-121.5\n-165.6\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/21.psi",
    "chars": 70000,
    "preview": "+071.1\n+076.1\n+044.9\n+069.0\n+150.7\n+172.9\n-160.6\n+151.9\n+126.9\n+153.9\n+072.8\n+135.2\n+164.1\n+119.4\n+171.4\n-179.4\n-171.4\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/22.phi",
    "chars": 70000,
    "preview": "-082.2\n-054.3\n-155.0\n-101.7\n-140.8\n-134.4\n-146.5\n-091.2\n-098.5\n-082.2\n-048.3\n-080.1\n-088.4\n-076.9\n-052.7\n-039.4\n-140.2\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/22.psi",
    "chars": 70000,
    "preview": "+136.3\n+112.9\n-171.8\n+158.6\n-173.1\n+109.3\n+173.8\n+109.0\n+072.0\n+130.8\n-048.0\n-059.9\n-044.5\n-052.5\n-050.1\n-037.8\n-076.7\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/23.phi",
    "chars": 70000,
    "preview": "-147.3\n-138.7\n-147.7\n-149.5\n-116.7\n-083.7\n-136.0\n-135.4\n-079.1\n-050.7\n-047.2\n-069.7\n-047.6\n-075.4\n-153.1\n+174.2\n-146.2\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/23.psi",
    "chars": 70000,
    "preview": "+170.8\n-051.7\n-049.5\n-153.5\n+132.2\n+078.6\n+073.7\n-177.2\n+170.0\n+100.1\n+167.3\n+149.5\n+092.1\n+174.3\n+174.8\n+144.0\n+161.2\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/24.phi",
    "chars": 70000,
    "preview": "-078.4\n-075.6\n-130.4\n-174.9\n-132.6\n-121.4\n-119.2\n-053.5\n-055.5\n-074.4\n-067.3\n-142.7\n-144.1\n-129.5\n-122.5\n-117.8\n-151.0\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/24.psi",
    "chars": 70000,
    "preview": "+109.6\n+071.2\n+167.1\n+175.5\n-149.8\n-155.0\n-156.7\n+177.2\n+133.4\n+129.7\n+155.4\n+166.0\n+140.4\n+133.0\n+169.7\n+156.9\n+153.7\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/25.phi",
    "chars": 70000,
    "preview": "-131.5\n-137.8\n-138.1\n-156.9\n-105.5\n-154.7\n-104.3\n-172.5\n-085.9\n-054.2\n-064.7\n-139.0\n-141.7\n-158.6\n-162.3\n-145.7\n-154.3\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/25.psi",
    "chars": 70000,
    "preview": "-069.8\n-036.0\n+076.4\n+119.2\n-116.7\n+140.9\n+155.4\n+164.1\n+148.4\n+142.3\n-173.6\n+100.0\n+159.9\n+117.8\n-158.8\n+161.5\n+173.6\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/26.phi",
    "chars": 70000,
    "preview": "-175.7\n-150.6\n-146.4\n-134.6\n-145.7\n-109.1\n-136.5\n-164.6\n-155.2\n-138.9\n-124.4\n-148.9\n-142.1\n-048.7\n-139.3\n-129.0\n-134.6\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/26.psi",
    "chars": 70000,
    "preview": "+107.7\n+169.0\n+158.8\n+147.0\n+092.5\n+118.0\n+113.0\n-157.2\n+112.7\n+161.1\n+170.5\n+178.1\n+157.1\n+115.1\n-171.9\n+141.2\n+140.1\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/27.phi",
    "chars": 70000,
    "preview": "-123.8\n-142.5\n-148.3\n-057.0\n-069.4\n-100.5\n-144.4\n-159.4\n-131.9\n-136.6\n-156.8\n-161.0\n-056.8\n-119.4\n-124.1\n-132.0\n-134.4\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/27.psi",
    "chars": 70000,
    "preview": "+168.4\n+141.5\n+143.5\n+136.9\n+167.2\n+141.2\n+149.2\n+053.2\n+107.5\n-155.2\n+143.1\n+130.7\n+148.1\n+155.1\n-177.9\n-179.0\n+135.7\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/28.phi",
    "chars": 70000,
    "preview": "-152.5\n-158.0\n-067.5\n-114.8\n-133.6\n-149.3\n-116.6\n-115.7\n-048.2\n-080.7\n-082.5\n-113.3\n-109.3\n-094.0\n-129.7\n-146.4\n-098.2\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/28.psi",
    "chars": 70000,
    "preview": "+177.4\n+142.4\n-120.9\n-039.3\n-043.5\n-072.0\n-062.9\n-050.3\n-030.5\n-107.8\n-048.6\n-003.3\n-004.9\n+000.0\n-070.0\n-106.9\n-080.3\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/29.phi",
    "chars": 70000,
    "preview": "-139.2\n-057.8\n-094.9\n-110.8\n-153.0\n-145.4\n-128.7\n-131.5\n-135.6\n-149.7\n-154.9\n-126.3\n-068.9\n-144.9\n-129.6\n-144.6\n-164.7\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/29.psi",
    "chars": 70000,
    "preview": "+141.5\n+106.3\n-169.7\n-123.2\n+141.2\n+007.4\n-086.9\n-064.8\n-033.5\n+172.0\n+113.2\n+039.5\n+077.1\n+135.4\n+174.2\n-155.9\n+156.1\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/3.phi",
    "chars": 70000,
    "preview": "-072.1\n-052.1\n-053.9\n-035.7\n-068.4\n-077.6\n-078.0\n-076.6\n-079.0\n-078.8\n-057.4\n-083.4\n-063.2\n-050.4\n-064.8\n-064.2\n-074.3\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/3.psi",
    "chars": 70000,
    "preview": "+156.2\n+139.8\n+145.8\n+136.4\n+131.7\n+150.3\n+137.9\n+132.2\n+167.0\n+132.4\n+116.9\n+154.5\n+149.5\n+120.0\n+128.6\n+161.1\n-178.1\n+"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/30.phi",
    "chars": 70000,
    "preview": "-076.4\n-067.0\n-123.1\n-150.8\n-117.6\n-148.5\n-140.5\n-134.2\n-148.6\n-157.9\n-134.6\n-128.9\n-156.8\n-147.9\n-086.3\n-120.5\n-138.1\n-"
  },
  {
    "path": "examples/parallel-tempering-2dfes/data/backbone-torsions/30.psi",
    "chars": 70000,
    "preview": "+142.8\n+173.6\n+154.9\n+044.7\n+015.7\n+067.4\n+138.3\n+164.6\n+125.4\n+156.5\n+147.6\n+132.7\n+171.1\n+134.4\n+138.0\n+161.1\n+161.5\n+"
  }
]

// ... and 199 more files (download for full content)

About this extraction

This page contains the full source code of the choderalab/pymbar GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 399 files (28.1 MB), approximately 7.4M tokens, and a symbol index with 234 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!