Skip to content

Commit

Permalink
Fix a typo (#61)
Browse files Browse the repository at this point in the history
* fixes on PR #60 
* typo fixes
* Update MANIFEST.in
  • Loading branch information
xiki-tempula authored Oct 26, 2021
1 parent e85f7cb commit ca759c7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include *.rst
recursive-include src/alchemtest *.gz *.bz2 *.zip *.rst *.txt *.out *.xvg
recursive-include src/alchemtest *.gz *.bz2 *.zip *.rst *.txt *.out *.xvg *.npy
include README.rst
include LICENSE
include versioneer.py
Expand Down
6 changes: 3 additions & 3 deletions docs/generic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ The usage is like this ::
>>> import numpy as np
>>> from pymbar import MBAR
>>> from alchemtest.generic import load_MBAR_BGFS
>>> u_kn = np.load(load_MBAR_BGFS()['data']['u_kn'])
>>> u_nk = np.load(load_MBAR_BGFS()['data']['u_nk'])
>>> N_k = np.load(load_MBAR_BGFS()['data']['N_k'])
>>> solver_options = {"maximum_iterations":10000,"verbose":True}
>>> solver_protocol = {"method":"adaptive","options":solver_options}
>>> mbar = MBAR(u_kn, N_k, solver_protocol=(solver_protocol,))
>>> mbar = MBAR(u_nk, N_k, solver_protocol=(solver_protocol,))
>>> results, errors = mbar.getFreeEnergyDifferences()

Which will give the :class:`pymbar.utils.ParameterError` ::

>>> solver_options = {"maximum_iterations":10000,"verbose":True}
>>> solver_protocol = {"method":"BFGS","options":solver_options}
>>> mbar = MBAR(u_kn, N_k, solver_protocol=(solver_protocol,))
>>> mbar = MBAR(u_nk, N_k, solver_protocol=(solver_protocol,))
>>> results, errors = mbar.getFreeEnergyDifferences()

Which will work.
Expand Down
2 changes: 1 addition & 1 deletion src/alchemtest/generic/BFGS/descr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ generic: MBAR solver stability test
==============================================


u_kn and N_k files that could be calculated with MBAR using BGFS method but not
u_nk and N_k files that could be calculated with MBAR using BGFS method but not
the adaptive method.

Notes
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/alchemtest/generic/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ def load_MBAR_BGFS():
data: Bunch
Dictionary-like object, the interesting attributes are:
- 'data' : the data files for u_kn and N_k
- 'data' : the data files for u_nk and N_k
"""
module_path = dirname(__file__)
data = {'u_kn': join(module_path, 'BFGS/u_kn.npy'),
data = {'u_nk': join(module_path, 'BFGS/u_nk.npy'),
'N_k': join(module_path, 'BFGS/N_k.npy'),}

with open(join(module_path, 'BFGS', 'descr.rst')) as rst_file:
Expand Down
2 changes: 1 addition & 1 deletion src/alchemtest/tests/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class TestGeneric(BaseDatasetTest):
@pytest.fixture(scope="class",
params = [(load_MBAR_BGFS, ('u_kn', 'N_k'), (1, 1)),
params = [(load_MBAR_BGFS, ('u_nk', 'N_k'), (1, 1)),
])
def dataset(self, request):
return super(TestGeneric, self).dataset(request)

0 comments on commit ca759c7

Please sign in to comment.