Skip to content

Conversation

@WangXinyan940
Copy link
Member

Refactor:

  1. Split old api.py to separate files. Now the api.py only contains Hamiltonian class. The generators are moved to dmff/generators/*.py

New Features:

  1. LennardJonesForce and NBFix support.
  2. MBAR estimator for free energy estimation and reweighting.

Bug fix:

  1. Use template name instead of residue name for atomic charge matching.

Ericwang6 and others added 12 commits June 14, 2022 17:58
* 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>
Copy link
Collaborator

@KuangYu KuangYu left a 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):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. We should consider computing free energies between two target states.
  2. Target states and params should be passed in as argument.

@Ericwang6
Copy link
Member

I've removed some unused imports

Copy link
Collaborator

@KuangYu KuangYu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

"metadata": {},
"outputs": [],
"source": [
"class OMMNPTSampleState(SampleState):\n",
Copy link
Collaborator

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)]
Copy link
Collaborator

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"

@WangXinyan940 WangXinyan940 merged commit 8395f68 into devel Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants