-
Notifications
You must be signed in to change notification settings - Fork 59
Implement the workflow pipeline #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
148 commits
Select commit
Hold shift + click to select a range
eed8ab8
load_data
xiki-tempula 4f96b58
update
xiki-tempula f05c5dd
update
xiki-tempula 36f107a
update
xiki-tempula 70d56bd
add doc
xiki-tempula d415427
add test
xiki-tempula f814bac
Update mbar_.py
xiki-tempula e197f67
cleanup
xiki-tempula 61c9de2
Merge branch 'master' into workf
xiki-tempula 37a2503
remove dependency for scipy constant
xiki-tempula ba2dcc3
dump test
xiki-tempula 94d7bb6
Update test_workflow.py
xiki-tempula e4f6627
bump test
xiki-tempula 2e0aed0
cleanup
xiki-tempula 5ab748e
Delete result.log
xiki-tempula ddcaa8d
cleanup
xiki-tempula e566131
Merge branch 'workf' of https://github.com/xiki-tempula/alchemlyb int…
xiki-tempula 90d033a
logging is a global variable
xiki-tempula c5a9b44
Revert "logging is a global variable"
xiki-tempula 26e83fb
move some part to other PR
xiki-tempula eff7981
clean up
xiki-tempula 71524fc
Merge branch 'master' into workf
xiki-tempula ea6b834
bump coverage
xiki-tempula f4b736c
dump coverage
xiki-tempula 7dcce77
typo
xiki-tempula a926597
update
xiki-tempula cf142a1
revert change
xiki-tempula ce1539a
update
xiki-tempula c5724e1
Update ti_dhdl.py
xiki-tempula 3cc332d
Merge branch 'master' into workf
xiki-tempula 1a97228
Update abfe.py
xiki-tempula 4d5425b
update to pass the test
xiki-tempula 058aa99
Merge branch 'master' into workf
xiki-tempula ef52952
Update mbar_.py
xiki-tempula 9d2eb06
update
xiki-tempula ab1ab76
Update abfe.py
xiki-tempula 10fbdc4
Update mbar_.py
xiki-tempula 622125a
Merge branch 'master' into workf
xiki-tempula 4a72c2a
Revert "Update mbar_.py"
xiki-tempula 90495b5
Merge branch 'workf' of https://github.com/xiki-tempula/alchemlyb int…
xiki-tempula dd1735e
Update mbar_.py
xiki-tempula eaf0b6e
Merge branch 'master' into workf
xiki-tempula cd2ff92
Create convergence.py
xiki-tempula aa3054e
Update convergence.py
xiki-tempula ef21b2d
Update convergence.py
xiki-tempula 7238298
update
xiki-tempula 8ad6bb2
update
xiki-tempula e87867f
update doc
xiki-tempula 7d2b936
update doc
xiki-tempula 36f9adc
update
xiki-tempula f9d08bc
update
xiki-tempula daa9870
Merge branch 'master' into convergence
orbeckst 305ceac
update
xiki-tempula 212e955
change parser
xiki-tempula d281582
Update test_convergence.py
xiki-tempula f6ce666
update
xiki-tempula e9601fb
Update convergence.py
xiki-tempula a4d379a
Update convergence.py
xiki-tempula 1340367
Update convergence.py
xiki-tempula 8b5135e
Merge branch 'master' into workf
xiki-tempula 6a38d27
Merge pull request #1 from xiki-tempula/convergence
xiki-tempula e082035
Update abfe.py
xiki-tempula e7ce4fb
update
xiki-tempula 3cbd016
Update abfe.py
xiki-tempula b70e68c
Update abfe.py
xiki-tempula 204d22a
Merge branch 'master' into workf
xiki-tempula c8b7f66
Update convergence.py
xiki-tempula 696c36d
Merge branch 'master' into workf
xiki-tempula 24298a4
Update abfe.py
xiki-tempula 73b781e
Update convergence.py
xiki-tempula e93d3bf
update
xiki-tempula 281a864
update
xiki-tempula 602b98b
Update test_workflow_ABFE.py
xiki-tempula b8606dd
Reobust gmx (#2)
xiki-tempula bbd281d
update
xiki-tempula dd5a604
Merge branch 'master' into workf
xiki-tempula 1c40e97
test
xiki-tempula aecac7e
Update test_workflow.py
xiki-tempula 672a41a
Merge branch 'workf' into base
xiki-tempula afb22f5
Base (#3)
xiki-tempula 09efd77
Revert "Merge branch 'workf' into base"
xiki-tempula b173d93
Update base.py
xiki-tempula 9ddc811
Update alchemlyb.workflows.base.rst
xiki-tempula 3dc8c2a
update
xiki-tempula ecd29ee
update
xiki-tempula 0b37cf4
Update base.py
xiki-tempula 9b73218
Merge branch 'master' into base
xiki-tempula dd74acf
update
xiki-tempula b8355bb
Update CHANGES
xiki-tempula 3132af3
Merge branch 'base' into workf
xiki-tempula 36ca207
update
xiki-tempula 02e9520
update
xiki-tempula b58d117
update
xiki-tempula 58f52e7
update
xiki-tempula a71d32f
update
xiki-tempula 3dbc165
update
xiki-tempula 36ed0d0
Merge branch 'master' into workf
xiki-tempula f045017
update
xiki-tempula 7da1bda
Merge branch 'workf' of https://github.com/xiki-tempula/alchemlyb int…
xiki-tempula 81c33b8
Merge branch 'master' into workf
xiki-tempula b5a27a3
update
xiki-tempula 87c473e
update
xiki-tempula 5ee44a8
update
xiki-tempula db5232e
Update abfe.py
xiki-tempula 1d2d536
update
xiki-tempula e79d31b
Merge branch 'master' into workf
orbeckst 1d28042
update
xiki-tempula 456288a
Update abfe.py
xiki-tempula aea041a
Merge branch 'master' into workf
xiki-tempula d859c4e
update
xiki-tempula 03aad47
Update docs/workflows/alchemlyb.workflows.ABFE.rst
xiki-tempula 995bba1
Update docs/workflows/alchemlyb.workflows.ABFE.rst
xiki-tempula 5e3d6c4
update
xiki-tempula 1a9f155
Merge branch 'master' into workf
xiki-tempula 2ccef0c
resolve comments
xiki-tempula 7aa6ecb
fix name
xiki-tempula eca06db
fix test
xiki-tempula 720a76b
fix test
xiki-tempula 5c829d0
fix test
xiki-tempula 50f7432
fix test
xiki-tempula 2b0941d
remove no cover
xiki-tempula 2d173a8
bump coverage
xiki-tempula b2ed582
bump coverage
xiki-tempula 80b9bb3
bump coverage
xiki-tempula d5c9ea5
remove no cover
xiki-tempula bd8873b
Merge branch 'master' into workf
orbeckst d061fdc
update
xiki-tempula a778a0e
update
xiki-tempula ab71686
update doc.
xiki-tempula c246e9c
fix docs
xiki-tempula c35ca7a
Update docs/workflows/alchemlyb.workflows.ABFE.rst
xiki-tempula 9f17cbc
Update src/alchemlyb/convergence/convergence.py
xiki-tempula cc33374
Update src/alchemlyb/convergence/convergence.py
xiki-tempula f840d27
Update src/alchemlyb/estimators/mbar_.py
xiki-tempula 5070fe6
Update src/alchemlyb/estimators/mbar_.py
xiki-tempula f7c7c21
Update src/alchemlyb/estimators/mbar_.py
xiki-tempula 30bccd3
Update src/alchemlyb/estimators/mbar_.py
xiki-tempula fa4c4bf
update changes
xiki-tempula 6cf8895
no cover
xiki-tempula 8a31787
Update CHANGES
xiki-tempula be55f59
update
xiki-tempula e6752c9
update
xiki-tempula 282e98d
fix test
xiki-tempula 594bb33
changes
xiki-tempula 77ce671
raise OSError from original_exception in ABFE.read()
orbeckst ed3871d
fixed tests for OSError exceptions
orbeckst d6d7b9f
use upper case estimators in tests
orbeckst ef4a8d7
fix test for windows, too
orbeckst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,6 @@ | |
| .vscode | ||
| *.DS_Store | ||
| build | ||
| .idea/ | ||
| docs/_build/ | ||
| src/alchemlyb.egg-info/ | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
docs/visualisation/alchemlyb.visualisation.plot_convergence.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| .. _visualisation_plot_convergence: | ||
|
orbeckst marked this conversation as resolved.
|
||
|
|
||
| Plot the Forward and Backward Convergence | ||
| ========================================= | ||
|
|
||
| The function :func:`~alchemlyb.visualisation.plot_convergence` allows | ||
| the user to visualise the convergence by plotting the free energy change | ||
| computed using the equilibrated snapshots between the proper target time frames | ||
| in both forward (data points are stored in `forward` and `forward_error`) and | ||
| reverse (data points are stored in `backward` and `backward_error`) directions. | ||
| The unit in the y axis could be labelled to other units by setting *units*, | ||
| which by default is kBT. The user can pass :class:`matplotlib.axes.Axes` into | ||
| the function to have the convergence drawn on a specific axes. | ||
|
|
||
| Please check :ref:`How to plot convergence <plot_convergence>` for usage. | ||
|
|
||
| API Reference | ||
| ------------- | ||
| .. autofunction:: alchemlyb.visualisation.plot_convergence | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| Automatic workflow | ||
| ================== | ||
|
orbeckst marked this conversation as resolved.
Outdated
|
||
| Though **alchemlyb** is a library offering great flexibility in deriving free | ||
| energy estimate, it also provide a easy pipeline that is similar to | ||
| `Alchemical Analysis <https://github.com/MobleyLab/alchemical-analysis>`_ and a | ||
|
orbeckst marked this conversation as resolved.
Outdated
|
||
| step-by-step version that allows more flexibility. | ||
|
|
||
| Fully Automatic analysis | ||
| ------------------------ | ||
| A interface similar to | ||
| `Alchemical Analysis <https://github.com/MobleyLab/alchemical-analysis>`_ | ||
| could be excuted with a single line of command. :: | ||
|
|
||
| >>> import os | ||
| >>> from alchemtest.gmx import load_ABFE | ||
| >>> from alchemlyb.workflows import ABFE | ||
| >>> # Obtain the path of the data | ||
| >>> dir = os.path.dirname(load_ABFE()['data']['complex'][0]) | ||
| >>> print(dir) | ||
| 'alchemtest/gmx/ABFE/complex' | ||
| >>> workflow = ABFE(units='kcal/mol', software='Gromacs', dir=dir, | ||
| >>> prefix='dhdl', suffix='xvg', T=298, skiptime=10, | ||
| >>> uncorr='dhdl', threshold=50, | ||
| >>> methods=('mbar', 'bar', 'ti'), out='./', | ||
| >>> resultfilename='result.out', overlap='O_MBAR.pdf', | ||
| >>> breakdown=True, forwrev=10, log='result.log') | ||
|
|
||
| This would give the free energy estimate using all of | ||
| :class:`~alchemlyb.estimators.TI`, :class:`~alchemlyb.estimators.BAR`, | ||
| :class:`~alchemlyb.estimators.MBAR` and the result will be written to the text | ||
| file `result.out`. :: | ||
|
|
||
| ------------ --------------------- --------------------- --------------------- | ||
| States MBAR (kcal/mol) BAR (kcal/mol) TI (kcal/mol) | ||
| ------------ --------------------- --------------------- --------------------- | ||
| 0 -- 1 0.041 +- 0.001 0.041 +- 0.001 0.041 +- 0.001 | ||
| 1 -- 2 0.056 +- 0.001 0.055 +- 0.001 0.056 +- 0.001 | ||
| 2 -- 3 0.082 +- 0.001 0.082 +- 0.002 0.083 +- 0.002 | ||
| ... | ||
| 26 -- 27 0.766 +- 0.007 0.768 +- 0.010 0.770 +- 0.010 | ||
| 27 -- 28 0.694 +- 0.008 0.691 +- 0.011 0.690 +- 0.010 | ||
| 28 -- 29 0.620 +- 0.010 0.616 +- 0.011 0.625 +- 0.011 | ||
| ------------ --------------------- --------------------- --------------------- | ||
| coul: 6.290 +- 0.021 6.168 +- 0.026 6.168 +- 0.030 | ||
| vdw: 13.872 +- 0.061 13.852 +- 0.037 13.877 +- 0.066 | ||
| bonded: 1.469 +- 0.009 1.447 +- 0.003 1.461 +- 0.013 | ||
| TOTAL: 21.631 +- 0.064 21.467 +- 0.054 21.506 +- 0.074 | ||
|
|
||
| The :ref:`overlay matrix for the MBAR estimator <plot_overlap_matrix>` will be | ||
| plotted and saved to `O_MBAR.pdf`. | ||
|
|
||
| The :ref:`dHdl for TI <plot_TI_dhdl>` will be plotted to `dhdl_TI.pdf`. | ||
|
|
||
| The :ref:`dF states <plot_dF_states>` will be plotted to `dF_state.pdf` in | ||
| portrait model and `dF_state_long.pdf` in landscape model. | ||
|
|
||
| The forward and backward convergence will be plotted to `dF_t.pdf` using | ||
| :class:`~alchemlyb.estimators.MBAR`. | ||
|
|
||
| .. currentmodule:: alchemlyb.workflows | ||
|
|
||
| .. autoclass:: ABFE | ||
| :noindex: | ||
|
orbeckst marked this conversation as resolved.
Outdated
|
||
|
|
||
| Semi-automatic analysis | ||
| ----------------------- | ||
| The same analysis could also performed in steps allowing access and modification | ||
| to the data generated at each stage of the analysis. :: | ||
|
|
||
| >>> import os | ||
| >>> from alchemtest.gmx import load_ABFE | ||
| >>> from alchemlyb.workflows import ABFE | ||
| >>> # Obtain the path of the data | ||
| >>> dir = os.path.dirname(load_ABFE()['data']['complex'][0]) | ||
| >>> print(dir) | ||
| 'alchemtest/gmx/ABFE/complex' | ||
| >>> # Load the data | ||
| >>> workflow = ABFE(software='Gromacs', dir=dir, | ||
| >>> prefix='dhdl', suffix='xvg', T=298, out='./', | ||
| >>> log='result.log') | ||
| >>> # Set the unit. | ||
| >>> workflow.update_units('kcal/mol') | ||
| >>> # Decorrelate the data. | ||
| >>> workflow.preprocess(skiptime=10, uncorr='dhdl', threshold=50) | ||
| >>> # Run the estimator | ||
| >>> workflow.estimate(methods=('mbar', 'bar', 'ti')) | ||
| >>> # write the result | ||
| >>> workflow.write(resultfilename='result.out') | ||
| >>> # Plot the overlap matrix | ||
| >>> workflow.plot_overlap_matrix(overlap='O_MBAR.pdf') | ||
| >>> # Plot the dHdl for TI | ||
| >>> workflow.plot_ti_dhdl(dhdl_TI='dhdl_TI.pdf') | ||
| >>> # Plot the dF states | ||
| >>> workflow.plot_dF_state(dF_state='dF_state.pdf') | ||
| >>> # Convergence analysis | ||
| >>> workflow.check_convergence(10, dF_t='dF_t.pdf') | ||
|
|
||
|
|
||
| .. currentmodule:: alchemlyb.workflows.ABFE | ||
|
|
||
| .. autofunction:: update_units | ||
| .. autofunction:: preprocess | ||
| .. autofunction:: estimate | ||
| .. autofunction:: write | ||
| .. autofunction:: plot_overlap_matrix | ||
| .. autofunction:: plot_ti_dhdl | ||
| .. autofunction:: plot_dF_state | ||
| .. autofunction:: check_convergence | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
|
|
||
| from ._version import get_versions | ||
| __version__ = get_versions()['version'] | ||
| del get_versions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| '''Physical and mathematical constants and units.''' | ||
| # Taken from scipy.constants since py2 doesn't support it | ||
| k = 1.380649e-23 | ||
| N_A = 6.02214076e+23 | ||
|
orbeckst marked this conversation as resolved.
Outdated
|
||
| kJ2kcal = 0.239006 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.