-
Notifications
You must be signed in to change notification settings - Fork 47
Feat: Add NBFix and MBAR estimator #66
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
Conversation
* add nblist wrapper and its docs * fix(generator): existing jax bond/angle generators * fix: LJ bug; all classical code can be jitted; bug at test_gaff2_force * fix test_gaff2_force bug * fix: non-differentiable error, move args check in the api.py * fix: remove redundancy `box=jnp.array(box)`; confirm isinstance_jnp is jit-compatiable * refine(pme): code prettify * refine(utils): code prettify * add(nblist): add jit and auto update nblist * refine(classical): rm unused import * refactor(classical): add dispCorr * add(classical): add free energy support * refactor renderXML with clean commits (#25) * feat:rewrite renderXML with very clean commit history * fix bug in Torsion renderXML * add test_utils as a placehold * fix: fix typo in api.py * docs: add renderXML related api usages * refine(fep): rm debugging codes * add(cicd): CI/CD workflows * add(ut): ut for regularize_pairs and buffer_scales * fix(CI/CD): activate conda env * fix(CI/CD): wrong number in test_nblist * add(requirement): add dependencies list * add(CI/CD): unittest workflows * add(requirements): dependencies list * add test_utils.py * fix: modified unit test results * add `r` to avoid latex being recognized as an escape character * fix(ut): wrong number in test_nblist * Fix unit test related problems (#27) * add test_utils.py * fix: modified unit test results * add `r` to avoid latex being recognized as an escape character * fix(ut): wrong number in test_nblist Co-authored-by: Yingze Wang <ericwangyz@pku.edu.cn> * refine(ut): code prettify in test_nblist * Add CI/CD Workflows (#26) * add(CI/CD): unittest workflows * add(requirements): dependencies list * refine(ut): code prettify in test_nblist * update(api): switch default dispcorr to False * Chore: clean admp module up * chore: clean up classical and api.py * fix(ut): withdraw last commit about fix wrong number in test_nblist * update(api): fix dispcorr countmat bugs * update(pme): code prettify & gmx ewald coeff determine * add(constants): module to control constants * add(unittest): fep ut * update(test_nblist): unused imports * update(gitignore): acpype cache * refactor(test_classical): split to several files * refactor(test_classical): rename test_classical * fix(inter): PME in classical forcefield * update(fep): use dmff.common.constants * update(pme): default args in setup_ewald_parameters * Fix the nb list description in doc * update mkdocs.yml and a simple test of api generator * fix: add step_pol arg in ADMPPmeForce __init__ to fix it can not be jitted bug * add step_pol arg in ADMPPmeForce __init__ to fix it can not be jitted bug * Improve docstrings in sgnn * add read_input_info in dmff.admp.parse.py to deal with info in pdb and xml (input:pdb,xml output: multipoles/polarizabilities/tholes...) use forcefield.xml instead of other xmls, add read_admp_xml in parser in order to read the new form of xml file change line 795 in pme.py and add distribute_matrix in pairwise.py in order to wrap a jit outside my admp_calculator * Update some examples and ref_outs * feat: auto gen docs refs * fix: typo in requirements.txt * add change leading terms in api.py * add fluctuated leading term computation in dmff.api * add fluctuated leading term compute in dmff.api * use dmff.api to deal with input ; wrap admp_calculator to change fixed params into fluctuated one amf jit * wrap compute leading term in run.py * add a markdown and a generate_calculator outside admp_calculator function * feat(classical): Hamiltonian can create total energy function now. (#33) * Docs refine (#34) * add(CI/CD): unittest workflows * add(requirements): dependencies list * update(doc): fix bad render of \hat * update(doc): add examples and doc struct refine * Improve the fluctuating charge jupyter notebook demo * Delete parser_bk.py * Fix the fluctuating atom charge demo * feat: update docs configs * fix: fix test_nblist bug * update: license in docs * fix: import missing in api.py (may caused by formatter) * FIX: wrong links in docs and add requirements (#37) * update(doc): fix bad render of \hat * update(doc): add examples and doc struct refine * hotfix(docs): license bugs Co-authored-by: Kuang Yu <windwhisper.yu@gmail.com> Co-authored-by: Roy Kid <lijichen365@126.com> Co-authored-by: Jichen Li <42854324+Roy-Kid@users.noreply.github.com> Co-authored-by: crone <2223469329@qq.com> Co-authored-by: WangXinyan940 <44082181+WangXinyan940@users.noreply.github.com>
Merge devel into master
Merge devel into master
KuangYu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See review
dmff/mbar.py
Outdated
| return eff_samples, state_effect | ||
| return eff_samples | ||
|
|
||
| def estimate_free_energy(self, unew): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We should consider computing free energies between two target states.
- Target states and params should be passed in as argument.
…ld jump between 12 and 13)
|
I've removed some unused imports |
…f using single frame
KuangYu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
examples/mbar/demo.ipynb
Outdated
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "class OMMNPTSampleState(SampleState):\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we include this in mbar.py as part of standard package?
Also, When the name indicates it's NPT, the pressure seems to be hard coded.
dmff/optimize.py
Outdated
| decay_rate=0.99) | ||
|
|
||
| # Combining gradient transforms using `optax.chain`. | ||
| chain = [optax.adam(scheduler), optax.clip(clip)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that the optimizer is hard coded in here, while I am not sure if ADAM is the optimal in here, maybe we should consider allowing the users to specify optimizers. Maybe add a tag in argument, like: optimizer="ADAM"
Refactor:
New Features:
Bug fix: