Skip to content
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

Merge 1.0.0-development branch to devel branch. #129

Merged
merged 195 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
2690192
Fix mbar example (#76)
WangXinyan940 Dec 3, 2022
8564c13
Remove jax_md requirement to support high version of jax & tensorflow
WangXinyan940 Jan 5, 2023
c0d9408
Initialize topology information generator and its UT
WangXinyan940 Jan 10, 2023
c46c312
Half way of detecting propers
WangXinyan940 Jan 10, 2023
79a13c8
Finish proper searching
WangXinyan940 Jan 11, 2023
4417306
Update topology.py
WangXinyan940 Jan 11, 2023
0788c1e
Update topology.py
WangXinyan940 Jan 11, 2023
edced36
Auto detect impropers
WangXinyan940 Jan 11, 2023
35bd2e3
Update topology.py
WangXinyan940 Jan 11, 2023
8ff48d3
Initialize template IO
WangXinyan940 Jan 11, 2023
0a1647e
Remove jax version limitation
WangXinyan940 Jan 11, 2023
ba5a768
Finish atom type matching with templates
WangXinyan940 Jan 11, 2023
a160cf1
Initialize UT for topology tools
WangXinyan940 Jan 11, 2023
67edf0a
Upload auto workflow for UT
WangXinyan940 Jan 12, 2023
80b2add
Add issue templates for feature request and bug-report (#83)
dingye18 Feb 14, 2023
6a7ec8b
Small update in issue template (#84)
dingye18 Feb 14, 2023
cabcd72
Update initial version of frontend impl & unit tests
Mar 1, 2023
18849fc
Modify new code to fit old parts
WangXinyan940 Mar 1, 2023
615b393
Make the structure clean
WangXinyan940 Mar 1, 2023
8cb20b7
Update code
WangXinyan940 Mar 1, 2023
3d423c2
Finished adding vsite from template and smarts parsers
WangXinyan940 Mar 2, 2023
b687404
Support VSite IO in xml template
WangXinyan940 Mar 2, 2023
a209f10
Support vsite in template matching
WangXinyan940 Mar 2, 2023
717e6f1
Add example
WangXinyan940 Mar 2, 2023
e7a3785
Add example of vsite addition
WangXinyan940 Mar 2, 2023
28da5bd
Try a better implementation
WangXinyan940 Mar 5, 2023
51fdb4a
Implement a better Topology
WangXinyan940 Mar 6, 2023
16bb78f
Update bettertopology.py
WangXinyan940 Mar 6, 2023
14753a0
Designed the usage of operators
WangXinyan940 Mar 9, 2023
214d154
Update our own Topology class
WangXinyan940 Mar 9, 2023
4d8d4d7
Update test_operators.py
WangXinyan940 Mar 9, 2023
1a9db72
Update test_operators.py
WangXinyan940 Mar 9, 2023
84de55c
Implement VSite and AType operators
WangXinyan940 Mar 9, 2023
0fd4918
Create smartsvsite.py
WangXinyan940 Mar 9, 2023
ea4bf5a
Update am1charge.py
WangXinyan940 Mar 9, 2023
a7a3406
Update test_operators.py
WangXinyan940 Mar 9, 2023
28fb354
Add AM1 charge OP
WangXinyan940 Mar 14, 2023
904380d
Add Coulomb Generator
WangXinyan940 Mar 21, 2023
54f0e7e
supporting generators
WangXinyan940 Mar 22, 2023
68a26a9
Add method to find equivalent atoms (without vsites)
WangXinyan940 Mar 23, 2023
2816e73
Let AM1 charge calculator use eqv info
WangXinyan940 Mar 23, 2023
a19e57b
Add full support of BCC charge
WangXinyan940 Mar 24, 2023
25f554e
Support ambertools based typification
WangXinyan940 Mar 24, 2023
49cd1fd
Update classical.py
WangXinyan940 Mar 24, 2023
e91652f
Add LJ generator and an example
WangXinyan940 Mar 28, 2023
b69e5c7
support LJ prms
WangXinyan940 Apr 3, 2023
8274677
Deal with atom classes in LJ
WangXinyan940 Apr 4, 2023
b46a904
Add water example for interaction calculation
WangXinyan940 Apr 4, 2023
209612a
Update test_inter_water.py
WangXinyan940 Apr 4, 2023
4a993c0
Add support for loading BCC prms
WangXinyan940 Apr 6, 2023
c60dd6b
Update classical.py
WangXinyan940 Apr 6, 2023
e272cc1
Finish BCC support
WangXinyan940 Apr 6, 2023
b29984b
support type2 vsite
WangXinyan940 Apr 19, 2023
cc5009b
Make operators use the same initialization method
WangXinyan940 Apr 19, 2023
c2e8395
Support smirks patching on vsites.
WangXinyan940 Apr 19, 2023
2e5ed90
Finished dimer energy example
WangXinyan940 Apr 20, 2023
0eaf31f
Update classical.py
WangXinyan940 Apr 20, 2023
a2f4530
Update topology.py
WangXinyan940 Apr 20, 2023
719b0a5
Fix ParamSet to be a correct PyTree
WangXinyan940 Apr 20, 2023
c5f6d26
Update paramset.py
WangXinyan940 Apr 20, 2023
1b7011f
Calculate test system by hand
WangXinyan940 Apr 20, 2023
8cbfb45
Add test case for NoCutoff Coul and LJ energy
WangXinyan940 Apr 20, 2023
e7b5d05
Support NBFix
WangXinyan940 Apr 21, 2023
3b3eca6
Add Hamiltonian and its unittest.
WangXinyan940 Apr 23, 2023
edf1f16
Delete test.xml
WangXinyan940 Apr 23, 2023
6080c47
update vsite positions in hamiltonian
WangXinyan940 Apr 23, 2023
e729b0c
replace Chem.SanitizeMol with topdata.regularize_aromaticity
TablewareBox Apr 23, 2023
f61c2be
fix N+ formal charge
TablewareBox Apr 24, 2023
ba065d3
Merge branch 'master' into wangxy/frontend-refactor
WangXinyan940 Apr 24, 2023
d700e64
Update .gitignore
WangXinyan940 Apr 24, 2023
dc8bd96
Merge branch 'wangxy/frontend-refactor' of https://github.com/deepmod…
TablewareBox Apr 24, 2023
f03d198
Update topology.py
WangXinyan940 Apr 24, 2023
4e5678d
Support the way of updating paramset in optax
WangXinyan940 Apr 24, 2023
b4d82f2
Update test_run_dimer_energy.py
WangXinyan940 Apr 24, 2023
71c3fa6
Initialize generators before loading hamiltonian
WangXinyan940 Apr 26, 2023
cbad09a
add warmup and nesterov optimizer
TablewareBox May 1, 2023
c442416
fix 3fd vsite coordinates
TablewareBox May 4, 2023
a0852dd
Add mask generation
WangXinyan940 May 11, 2023
786237b
build vsites in multiple molecules separately
TablewareBox May 14, 2023
b721c9e
support dummy atom reading
TablewareBox May 24, 2023
9c2aeee
fix vsite topologies and molecules
TablewareBox May 25, 2023
fc9a290
Init new example
WangXinyan940 Jun 19, 2023
33a452d
Support Parmed LJ modifier
WangXinyan940 Jun 20, 2023
766832a
Update example for lennard jones optimization
WangXinyan940 Jun 26, 2023
e64caae
Create simpler MBAR estimator
WangXinyan940 Jun 26, 2023
d5557c2
Add reweighting estimator
WangXinyan940 Jun 27, 2023
315416d
Update opt.ipynb
WangXinyan940 Jun 27, 2023
4b03410
Update opt.ipynb
WangXinyan940 Jun 27, 2023
4a82a09
Update opt.ipynb
WangXinyan940 Jun 27, 2023
3214592
Add a simple example to calculate lennard-jones potential
WangXinyan940 Aug 25, 2023
dfbc39d
Add openmm as reference
WangXinyan940 Aug 25, 2023
dc974c0
Pearl dingzhen patch 1 (#112)
pearlDingzhen Sep 11, 2023
8efbe63
Update inter.py
WangXinyan940 Sep 11, 2023
60fce34
Remove Jax-MD requirement
WangXinyan940 Oct 11, 2023
a4a5fce
Fix Hamiltonian
WangXinyan940 Oct 11, 2023
3b7ffcd
Add HarmonicAngleGenerator
WangXinyan940 Oct 11, 2023
3853f61
Add PeriodicTorsionGenerator
WangXinyan940 Oct 11, 2023
118b192
Update NonbondedForce
WangXinyan940 Oct 11, 2023
b97c462
Correct the order of improper matching
WangXinyan940 Oct 11, 2023
bd62fcc
Fix and update unittests.
WangXinyan940 Oct 15, 2023
837ae1a
Update unit-test workflow to fix requirement problem
WangXinyan940 Oct 16, 2023
1cad257
Update test_compute.py
WangXinyan940 Oct 16, 2023
7eb616e
Update ut.yml
WangXinyan940 Oct 16, 2023
57c27c9
Update ut.yml
WangXinyan940 Oct 16, 2023
50e7c54
Add generator for ADMPPmeForce
WangXinyan940 Oct 17, 2023
eb76ae0
Merge changes on devel branch
WangXinyan940 Oct 17, 2023
b26de25
Merge changes on devel branch
WangXinyan940 Oct 17, 2023
98ffe8b
Update test_compute.py
WangXinyan940 Oct 17, 2023
78e0405
Support LJ long range correction
WangXinyan940 Oct 17, 2023
f642cb1
Add generators for Slater type forces
WangXinyan940 Oct 17, 2023
be7f94e
Update ut.yml
WangXinyan940 Oct 17, 2023
cd199e4
Update ut.yml
WangXinyan940 Oct 17, 2023
5c153bc
Fix No-AxisType bug (#122)
WangXinyan940 Oct 20, 2023
66d2eb9
qeq merge (#124)
gust-07 Oct 20, 2023
3b1cef2
Add sGNN generator
KuangYu Oct 21, 2023
4be2475
remove debugging codes
KuangYu Oct 21, 2023
800480a
Add frontend for sGNN (#125)
KuangYu Oct 22, 2023
5acacff
Modified QEQ potential and add JIT support
WangXinyan940 Oct 22, 2023
10dbff8
Fix the two examples:
KuangYu Oct 22, 2023
223ac95
Merge branch 'wangxy/v1.0.0-devel' of github.com:deepmodeling/DMFF in…
KuangYu Oct 22, 2023
81741de
Add QEQ test
WangXinyan940 Oct 22, 2023
4aa5b77
Add jaxopt requirement in github workflow
WangXinyan940 Oct 22, 2023
6134176
Update qeq.py
WangXinyan940 Oct 22, 2023
949c1cb
Fix the jupyter notebook
KuangYu Oct 23, 2023
337a8cf
Support aux data for ADMP and QEQ
WangXinyan940 Oct 23, 2023
db28782
Clean the way of aux_data implementation
WangXinyan940 Oct 23, 2023
a03c841
Add new unit test for QEQ with two residues.
WangXinyan940 Oct 23, 2023
9b03c2b
Change jaxopt root finder to be jit-able
WangXinyan940 Oct 24, 2023
919bef2
Update ut.yml
WangXinyan940 Oct 24, 2023
6de2f47
Explicit support nopbc calculation
WangXinyan940 Oct 24, 2023
cf07e05
Update admp.py
WangXinyan940 Oct 24, 2023
23a1238
make the behavior of ADMP correct while using NoCutoff
WangXinyan940 Oct 24, 2023
7e94269
Upload
WangXinyan940 Oct 26, 2023
f20b893
Update pme.py
WangXinyan940 Oct 26, 2023
48b2930
Add frontend for EANN (#127)
junminchen Oct 26, 2023
8555a8f
Change default scale setting of ADMP to reproduce MPID
WangXinyan940 Oct 26, 2023
03627c0
Update pme.py
WangXinyan940 Oct 27, 2023
029ee16
Fix optimizers for v1.0.0
WangXinyan940 Oct 27, 2023
16d1179
Fix nan problem while calculate power(0.0, 1/6)
WangXinyan940 Oct 27, 2023
7145d58
Add esp calculator in ADMPPmeForce and CoulNoCutoffForce for noPBC sy…
WangXinyan940 Oct 27, 2023
325dbb8
Fix the ADMP ESP calculator and add unit test
WangXinyan940 Oct 28, 2023
e8ec310
Update pme.py
WangXinyan940 Oct 28, 2023
83023e3
Use std library warnings to handle import errors
WangXinyan940 Oct 30, 2023
f92d04a
Add eta to increase the numerical stability of QEQ
WangXinyan940 Oct 30, 2023
d51be82
Fix the local frame axis setting in ADMP to be consistent with MPID
WangXinyan940 Oct 31, 2023
8cc28a4
Correct local frame defination in unit test
WangXinyan940 Oct 31, 2023
eaf111a
Merge branch 'pr_v1.0' into wangxy/v1.0.0-devel
KuangYu Nov 2, 2023
db09424
Update fluctuated_leading_term_waterff and water_fullpol example
KuangYu Nov 2, 2023
2171e4b
Save ADMP type mapping to potential.meta
WangXinyan940 Nov 2, 2023
5570494
Merge branch 'pr_v1.0' into wangxy/v1.0.0-devel
KuangYu Nov 2, 2023
c483a2a
Fix the ADMP examples, also improve the way map_atomtypes and
KuangYu Nov 2, 2023
a2c8beb
Break a long line in code
KuangYu Nov 2, 2023
8f3abe1
Fix the ADMP aux test
KuangYu Nov 2, 2023
e2903be
docs_review
VINFeng Nov 3, 2023
9302690
Fix examples (#130)
KuangYu Nov 3, 2023
59e3f0b
Merge branch 'pr/131' into wangxy/v1.0.0-devel
WangXinyan940 Nov 3, 2023
bf7c379
Update Installation.md
WangXinyan940 Nov 3, 2023
ed328eb
modifications to intro
VINFeng Nov 3, 2023
33e85e3
Update introduction.md
VINFeng Nov 3, 2023
0dd2995
Update index.md
VINFeng Nov 3, 2023
942f5cd
Merge branch 'wangxy/v1.0.0-devel' of github.com:deepmodeling/DMFF in…
KuangYu Nov 5, 2023
48656e3
Merge pull request #132 from VINFeng/patch-1
KuangYu Nov 5, 2023
db24380
Merge pull request #133 from VINFeng/patch-4
KuangYu Nov 5, 2023
e8f9794
Merge pull request #134 from VINFeng/patch-3
KuangYu Nov 5, 2023
09db65c
Merge branch 'wangxy/v1.0.0-devel' of github.com:deepmodeling/DMFF in…
KuangYu Nov 5, 2023
04196e7
Test modifying the MBAR.md file
KuangYu Nov 5, 2023
75654bc
Update MBAR doc
KuangYu Nov 5, 2023
5d6ee77
Update doc
KuangYu Nov 5, 2023
b9353dc
Update 4.2ADMPPmeForce.md
junminchen Nov 5, 2023
6d76807
Update 4.2ADMPPmeForce.md
zhengcheng233 Nov 6, 2023
4611913
Update 4.4MLForce.md
zhengcheng233 Nov 6, 2023
eaba9a4
Update Optimization doc
WangXinyan940 Nov 6, 2023
899d050
Merge branch 'deepmodeling:wangxy/v1.0.0-devel' into wangxy/v1.0.0-devel
KuangYu Nov 7, 2023
4f52538
Update 4.6MBAR.md
KuangYu Nov 7, 2023
de7f928
Update 4.5Optimization.md
KuangYu Nov 7, 2023
34ed56b
Update 4.5Optimization.md
KuangYu Nov 7, 2023
25ef0dd
add nocutoff and noperioid nblist
Roy-Kid Nov 7, 2023
cc0a726
Update 3.usage.md
VINFeng Nov 7, 2023
51f13fa
Merge branch 'wangxy/v1.0.0-devel' of https://github.com/KuangYu/DMFF…
WangXinyan940 Nov 8, 2023
bc00541
Merge branch 'pr/130' into wangxy/v1.0.0-devel
WangXinyan940 Nov 8, 2023
70e729b
Update 4.3ADMPQeqForce.md
gust-07 Nov 7, 2023
e0b0f15
update 4.3ADMPQeqForce.md
gust-07 Nov 7, 2023
8ffb4fb
docs/examples fix (#140)
VINFeng Nov 8, 2023
ad1bf64
Update omm plugin and save_dmff2tf.py for aux (U_ind especially) comp…
dingye18 Nov 8, 2023
f2c6975
Delete docs/dev_guide/arch.md (#141)
VINFeng Nov 8, 2023
e241696
review qeq docs and update the math display error (#139)
taipinghu Nov 8, 2023
03c9fb6
Create 4.7OpenMMplugin.md
WangXinyan940 Nov 8, 2023
cdb14ee
Update 4.3ADMPQeqForce.md
WangXinyan940 Nov 8, 2023
19c6ce0
Update 4.3ADMPQeqForce.md (#150)
gust-07 Nov 9, 2023
e2cbf0a
Update README.md (#147)
VINFeng Nov 9, 2023
348fa6a
Update the doc for openmm dmff plugin usage. (#146)
dingye18 Nov 9, 2023
2316e28
add 2 notebooks in user guide (#145)
VINFeng Nov 9, 2023
4cb4de2
Fix bug when rendering xml files
WangXinyan940 Nov 9, 2023
ce67cfa
Update the doc link in OpenMMPlugin doc (#151)
dingye18 Nov 9, 2023
58c7a5f
Merge branch 'wangxy/v1.0.0-devel' of https://github.com/deepmodeling…
WangXinyan940 Nov 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Bug report
description: Create a bug report to help us eliminate issues and improve DMFF.
title: "[BUG] _Replace With Suitable Title_"
labels: bug
assignees: []
body:
- type: textarea
id: summary
attributes:
label: Bug summary
description: Please provide a clear and concise description of what the bug is.
placeholder:
value:
validations:
required: true
- type: input
id: version
attributes:
label: DMFF Version
description: Version of DMFF you are using.
validations:
required: true
- type: input
id: jax-version
attributes:
label: JAX Version
description: Version of JAX you are using.
validations:
required: true
- type: input
id: openmm-version
attributes:
label: OpenMM Version
description: Version of OpenMM you are using.
validations:
required: true
- type: dropdown
id: installation-way
attributes:
label: How did you download the software?
options:
- pip
- Built from source
- Others (write below)
validations:
required: true
- type: textarea
id: log
attributes:
label: Input Files, Running Commands, Error Log, etc.
description: "Please provide necessary information including input file, running commands, error log , etc., AS DETAILED AS POSSIBLE to help locate and reproduce your problem. WARNING: Do not use image to show error log! Paste texts in a code block instead."
placeholder:
value:
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Steps to Reproduce
description: "Describe the steps required to (quickly) reproduce the issue. You can attach (small) files to the section below or add URLs where to download an archive with all necessary files. Please try to create an input set that is as minimal and small as possible and reproduces the bug as quickly as possible. **NOTE:** the less effort and time it takes to reproduce your reported bug, the more likely it becomes, that somebody will look into it and fix the problem."
placeholder:
value:
validations:
required: true
- type: textarea
id: further
attributes:
label: Further Information, Files, and Links
description: Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications
placeholder:
value:
validations:
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Request for Help
url: https://github.com/deepmodeling/DMFF/issues
about: If you have a usage question
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Feature request
description: Suggest an idea for DMFF.
title: "[Feature Request] _Replace with Title_"
labels: enhancement
assignees: []
body:
- type: textarea
id: summary
attributes:
label: Summary
description: "Please provide a brief and concise description of the suggested feature or change"
placeholder:
value:
validations:
required: true
- type: textarea
id: motivation
attributes:
label: Motivation
description: "Please explain why you think this feature is important and should be implemented. If possible, provide references to relevant background information like publications or web pages, and whether you are planning to implement the enhancement yourself or would like to participate in the implementation. If applicable add a reference to an existing bug report or issue that this will address."
placeholder:
value:
validations:
required: true
- type: textarea
id: solutions
attributes:
label: Suggested Solutions
description: "Please describe possible solutions to the problem. If you have a specific idea in mind, please describe it here. If you don't have a specific idea, please describe what you think would be a good solution to the problem."
placeholder:
value:
validations:
required: false
- type: textarea
id: further
attributes:
label: Further Information, Files, and Links
description: Put any additional information here, attach relevant text or image files and URLs to external sites, e.g. relevant publications. If you have any further questions, please don't hesitate to ask them here. Any comments are welcomed!
placeholder:
value:
validations:
required: false
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/generic-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Generic issue
description: For issues that do not fit any of the other categories.
title: _Replace With a Descriptive Title_
labels: wontfix
assignees: []
body:
- type: textarea
id: summary
attributes:
label: Summary
description: "Please provide a clear and concise description of what the question is."
placeholder:
value:
validations:
required: true
- type: input
id: version
attributes:
label: DMFF Version
description: Version of DMFF you are using.
validations:
required: true
- type: input
id: jax-version
attributes:
label: JAX Version
description: Version of JAX you are using.
validations:
required: true
- type: input
id: openmm-version
attributes:
label: OpenMM Version
description: Version of OpenMM you are using.
validations:
required: true
- type: textarea
id: other-version
attributes:
label: Python Version, CUDA Version, GCC Version, Operating System Version etc
description: "If applicable, specify what platform you are running on."
placeholder:
value:
validations:
required: false
- type: textarea
id: details
attributes:
label: Details
description: "Please explain the issue in detail here."
placeholder:
value:
validations:
required: true
7 changes: 4 additions & 3 deletions .github/workflows/test_openmm_dmff_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ jobs:
export OPENMM_INSTALLED_DIR=$CONDA_PREFIX
export CPPFLOW_INSTALLED_DIR=$CONDA_PREFIX
export LIBTENSORFLOW_INSTALLED_DIR=$CONDA_PREFIX
cmake .. -DOPENMM_DIR=${OPENMM_INSTALLED_DIR} -DCPPFLOW_DIR=${CPPFLOW_INSTALLED_DIR} -DTENSORFLOW_DIR=${LIBTENSORFLOW_INSTALLED_DIR} -DUSE_HIGH_PRECISION=ON
cmake .. -DOPENMM_DIR=${OPENMM_INSTALLED_DIR} -DCPPFLOW_DIR=${CPPFLOW_INSTALLED_DIR} -DTENSORFLOW_DIR=${LIBTENSORFLOW_INSTALLED_DIR} -DUSE_HIGH_PRECISION=OFF
make && make install
make PythonInstall
make PythonInstall
- name: Run Tests
run: |
source $CONDA/bin/activate dmff_omm
python -m OpenMMDMFFPlugin.tests.test_dmff_plugin_nve -n 100
cd ${GITHUB_WORKSPACE}/backend/
python -m OpenMMDMFFPlugin.tests.test_dmff_plugin_nve -n 100 --pdb ../examples/water_fullpol/water_dimer.pdb --model ./openmm_dmff_plugin/python/OpenMMDMFFPlugin/data/admp_water_dimer_aux --has_aux True
14 changes: 7 additions & 7 deletions .github/workflows/ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
- name: Install Dependencies
run: |
source $CONDA/bin/activate
conda create -n dmff -y python=${{ matrix.python-version }} numpy openmm==7.7.0 mdtraj=1.9.7 pytest rdkit biopandas openbabel -c conda-forge
conda create -n dmff -y python=${{ matrix.python-version }} numpy openmm==7.7.0 pytest rdkit openbabel mdtraj ambertools -c conda-forge
conda activate dmff
pip install --upgrade pip
pip install jax==0.3.15 jaxlib==0.3.15 jax_md==0.2.0 pymbar==4.0.1 chex==0.1.4 dm-haiku==0.0.7 tqdm
pip install jax jaxlib jaxopt networkx parmed pymbar==4.0.1 optax tqdm
- name: Install DMFF
run: |
source $CONDA/bin/activate dmff && pip install .
- name: Run Tests
run: |
source $CONDA/bin/activate dmff
pytest -vs tests/test_classical/*
pytest -vs tests/test_common/*
pytest -vs tests/test_admp/*
pytest -vs tests/test_api.py
pytest -vs tests/test_classical/test_*
pytest -vs tests/test_common/test_*
pytest -vs tests/test_admp/test_*
pytest -vs tests/test_utils.py
pytest -vs tests/test_mbar/*
pytest -vs tests/test_mbar/test_*
pytest -vs tests/test_sgnn/test_*
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -785,3 +785,10 @@ FodyWeavers.xsd

# hmtff cache
*.hmtff/

# debugging ipynb
debug.ipynb
test.xml

# PyCharm Cache
.idea/
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DMFF

[![doi:10.26434/chemrxiv-2022-2c7gv](https://img.shields.io/badge/DOI-10.26434%2Fchemrxiv--2022--2c7gv-blue)](https://doi.org/10.26434/chemrxiv-2022-2c7gv)
[![DOI: 10.1021/acs.jctc.2c01297](https://img.shields.io/badge/DOI-10.1021%2Facs.jctc.2c01297-blue)](https://pubs.acs.org/doi/10.1021/acs.jctc.2c01297)

## About DMFF

Expand All @@ -10,24 +10,34 @@ The behavior of organic molecular systems (e.g., protein folding, polymer struct

### License and credits

The project DMFF is licensed under [GNU LGPL v3.0](LICENSE). If you use this code in any future publications, please cite this using `Wang X, Li J, Yang L, Chen F, Wang Y, Chang J, et al. DMFF: An Open-Source Automatic
Differentiable Platform for Molecular Force Field
Development and Molecular Dynamics
Simulation. ChemRxiv. Cambridge: Cambridge Open Engage; 2022; This content is a preprint and has not been peer-reviewed.`
The project DMFF is licensed under [GNU LGPL v3.0](LICENSE). If you use this code in any future publications, please cite this using `Xinyan Wang, Jichen Li, Lan Yang, Feiyang Chen, Yingze Wang, Junhan Chang, Junmin Chen, Wei Feng, Linfeng Zhang, and Kuang Yu
Journal of Chemical Theory and Computation 2023 19 (17), 5897-5909
DOI: 10.1021/acs.jctc.2c01297`

## User Guide

+ [1. Introduction](docs/user_guide/introduction.md)
+ [2. Installation](docs/user_guide/installation.md)
+ [3. Basic usage](docs/user_guide/usage.md)
+ [4. XML format force field](docs/user_guide/xml_spec.md)
+ [5. Theory](docs/user_guide/theory.md)
+ [1. Introduction](docs/user_guide/1.introduction.md)
+ [2. Installation](docs/user_guide/2.installation.md)
+ [3. Basic Usage](docs/user_guide/3.usage.md)
+ [4. Modules](docs/user_guide/4.modules.md)
+ [Classical](docs/user_guide/4.1classical.md)
+ [ADMP](docs/user_guide/4.2ADMPPmeForce.md)
+ [Qeq](docs/user_guide/4.3ADMPQeqForce.md)
+ [Machine Learning](docs/user_guide/4.4MLForce.md)
+ [Optimization](docs/user_guide/4.5Optimization.md)
+ [Mbar Estimator](docs/user_guide/4.6MBAR.md)
+ [OpenMM Plugin](docs/user_guide/4.7OpenMMplugin.md)
+ [5. Advanced examples](docs/user_guide/DMFF_example.ipynb)
+ [And here is a tutorial notebook of the basic usage of DMFF. Welcome to read it and get started with DMFF!](docs/user_guide/test.ipynb)

[And here is a tutorial notebook, which would tell you some basic usage of DMFF. Welcome to read it and get started witn DMFF!](docs/user_guide/test.ipynb)

## Developer Guide
+ [1. Introduction](docs/dev_guide/introduction.md)
+ [2. Software architecture](docs/dev_guide/arch.md)
+ [3. Coding conventions](docs/dev_guide/convention.md)
+ [4. Document writing](docs/dev_guide/write_docs.md)
+ [5. An example for developing: how to write a generator?](docs/dev_guide/generator.ipynb)

## Code Structure

Expand All @@ -38,11 +48,15 @@ The code is organized as follows:
+ `package`: files for constructing packages or images, such as conda recipe and docker files.
+ `tests`: unit tests.
+ `dmff`: DMFF python codes
+ `dmff/api`: source code of application programming interface of DMFF.
+ `dmff/admp`: source code of automatic differentiable multipolar polarizable (ADMP) force field module.
+ `dmff/classical`: source code of classical force field module.
+ `dmff/common`: source code of common functions, such as neighbor list.
+ `dmff/generators`: source code of force generators.
+ `dmff/sgnn`: source of subgragh neural network force field model.
+ `dmff/eann`: source of embedded atom neural network force field model.
+ `dmff/generators`: source code of force generators.
+ `dmff/operators`: source code of operators.


## Support and Contribution

Expand Down
13 changes: 6 additions & 7 deletions backend/openmm_dmff_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


This is a plugin for [OpenMM](http://openmm.org) that used the trained JAX model by [DMFF](https://github.com/deepmodeling/DMFF) as an independent Force class for dynamics.
To use it, you need to save you DMFF model with the script in `DMFF/backend/save_dmff2tf.py`.
To use it, you need to save your DMFF model with the script in `DMFF/backend/save_dmff2tf.py`.

## Installation

Expand All @@ -15,10 +15,9 @@ conda create -n dmff_omm -c conda-forge python=3.9 openmm cudatoolkit=11.6
conda activate dmff_omm
```
### Download `libtensorflow_cc` and install `cppflow` package
Install the precompiled libtensorflow_cc library from deepmodeling channel.
Install the precompiled libtensorflow_cc library from conda.
```shell

conda install -c deepmodeling libtensorflow_cc=2.9.1=cuda112h02da4e0_0
conda install -y libtensorflow_cc=2.9.1 -c conda-forge
```
Download the tensorflow sources file. Copy the `c` direcotry in source code to installed header files of tensorflow library, since it's needed by package `cppflow`.
```shell
Expand All @@ -37,9 +36,9 @@ mkdir ${CONDA_PREFIX}/include/cppflow
cp -r include/cppflow ${CONDA_PREFIX}/include/
```

### Install the OpenMM DMFF plugin from source
### Install the OpenMM DMFF plugin from the source

Compile the plugin from source with following steps.
Compile the plugin from the source with the following steps.
1. Set up environment variables.
```shell
export OPENMM_INSTALLED_DIR=$CONDA_PREFIX
Expand All @@ -49,7 +48,7 @@ Compile the plugin from source with following steps.
mkdir build && cd build
```

2. Run `cmake` command with required parameters.
2. Run `cmake` command with the required parameters.
```shell
cmake .. -DOPENMM_DIR=${OPENMM_INSTALLED_DIR} -DCPPFLOW_DIR=${CPPFLOW_INSTALLED_DIR} -DTENSORFLOW_DIR=${LIBTENSORFLOW_INSTALLED_DIR}
make && make install
Expand Down
16 changes: 15 additions & 1 deletion backend/openmm_dmff_plugin/openmmapi/include/DMFFForce.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ typedef double ENERGYTYPE;
#else
typedef float FORCETYPE;
typedef float COORDTYPE;
typedef float ENERGYTYPE;
typedef double ENERGYTYPE;
#endif

namespace DMFFPlugin {
Expand All @@ -71,6 +71,12 @@ class OPENMM_EXPORT_DMFF DMFFForce : public OpenMM::Force {
* @param energyCoefficient : the energy transform coefficient.
*/
void setUnitTransformCoefficients(const double coordCoefficient, const double forceCoefficient, const double energyCoefficient);
/**
* @brief Set the has_aux flag when model was saved with auxilary input.
*
* @param hasAux : true if model was saved with auxilary input.
*/
void setHasAux(const bool hasAux);

const std::string& getDMFFGraphFile() const;
/**
Expand All @@ -97,6 +103,13 @@ class OPENMM_EXPORT_DMFF DMFFForce : public OpenMM::Force {
* @return double
*/
double getCutoff() const;
/**
* @brief Get the Has Aux object
*
* @return true
* @return false
*/
bool getHasAux() const;
void updateParametersInContext(OpenMM::Context& context);
bool usesPeriodicBoundaryConditions() const {
return use_pbc;
Expand All @@ -106,6 +119,7 @@ class OPENMM_EXPORT_DMFF DMFFForce : public OpenMM::Force {
private:
string graph_file;
bool use_pbc = true;
bool has_aux = false;
double cutoff = 1.2;
double coordCoeff, forceCoeff, energyCoeff;

Expand Down
Loading
Loading