Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/a-ws-m/MDPOW into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
a-ws-m committed Sep 20, 2023
2 parents d38deb6 + 120c5dd commit f004745
Show file tree
Hide file tree
Showing 62 changed files with 19,222 additions and 2,399 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Autoformat all files using `black`
8f061e7da99eb78353e9392d6929673da5b352a3
10 changes: 10 additions & 0 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ coverage.xml
*.lock
*.npz
dir.csv

# Files for the Martini example that can be downloaded at runtime
doc/examples/martini/*
!doc/examples/martini/*.mdp
!doc/examples/martini/*.ipynb
!doc/examples/martini/water.gro
!doc/examples/martini/octanol.gro
!doc/examples/martini/benzene.pdb
3 changes: 1 addition & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ formats:
python:
version: 3.8
install:
- requirements: doc/requirements.txt
system_packages: true
- requirements: doc/requirements.txt
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-python.black-formatter",
"ms-python.python"
]
}
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"[python]": {
"editor.formatOnSave": true
},
"python.testing.pytestArgs": [
"mdpow"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
4 changes: 4 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ their first commit. GitHub handle is optional.

- Cade Duckworth (cadeduckworth)

2023
----

- Alexander Moriarty (@a-ws-m)
14 changes: 13 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Add summary of changes for each release. Use ISO 8061 dates. Reference
GitHub issues numbers and PR numbers.

2023-??-?? 0.9.0
cadeduckworth, orbeckst, VOD555
cadeduckworth, orbeckst, VOD555, a-ws-m

Changes

Expand All @@ -24,6 +24,18 @@ Changes
* _prepare_universe and _conclude_universe removed from
EnsembleAnalysis.run() method, no longer needed (per comments, #199)
* internal log_banner() now uses logger as argument (PR #247)
* use `black` formatter for codebase (#271)
* implemented `forcefields.Forcefield` class (#267)
- facilitates users using non-default forcefields without changing package code
- `equil.Simulation` has new `ff_class` argument
- each `Forcefield` has unique `default_water_model`, replacing global `DEFAULT_WATER_MODEL`
- `get_solvent_model()` and `get_solvent_identifier()` take either `str` or `Forcefield` type for the `forcefield` argument
- both functions also use the `Forcefield`-specific `default_water_model` (fixes #112)
* `forcefields.DEFAULT_WATER_MODEL` removed (#267)
* changed `system.top` and `system_octwet.top` to act as templates and added `.template` suffix (#267)
* removed `forcefields.get_ff_paths()` (#267)
* changed `forcefields.get_solvent_identifier()`: will raise `ValueError` instead of returning `None` (#267)


Enhancements

Expand Down
11 changes: 9 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
README for MDPOW
===================

|build| |cov| |docs| |zenodo|
|build| |cov| |docs| |black| |zenodo|

.. |P_ow| replace:: *P*\ :sub:`OW`
.. |P_cw| replace:: *P*\ :sub:`CW`
Expand Down Expand Up @@ -74,9 +74,14 @@ Source code
*MDPOW* is open source and published under the `GNU General Public License
v3`_. Source code is available at https://github.com/Becksteinlab/MDPOW .

We use `black`_ for uniform code formatting.

.. _`GNU General Public License v3`:
http://www.gnu.org/licenses/gpl-3.0.html

.. _`black`: https://github.com/psf/black


Footnotes
---------

Expand All @@ -99,6 +104,8 @@ Footnotes
:target: https://zenodo.org/badge/latestdoi/44999898
:alt: Zenodo


.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: black

.. _INSTALL: INSTALL.rst
22 changes: 15 additions & 7 deletions doc/examples/benzene/session.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
import mdpow.equil

S = mdpow.equil.WaterSimulation(molecule="BNZ")
S.topology("benzene.itp")
S.solvate(struct="benzene.pdb")
S.energy_minimize()
S.MD_relaxed(runtime=5) # should be at least 1e3 ps for production not just 5 ps
S.MD_relaxed(runtime=5) # should be at least 1e3 ps for production not just 5 ps

# run simulation externally or use MDrunner
# (see docs for using mpi etc)
import gromacs
r = gromacs.run.MDrunner(dirname=S.dirs['MD_relaxed'], deffnm="md", c="md.pdb", cpi=True, append=True, v=True)
r.run() # runs mdrun in the python shell

r = gromacs.run.MDrunner(
dirname=S.dirs["MD_relaxed"], deffnm="md", c="md.pdb", cpi=True, append=True, v=True
)
r.run() # runs mdrun in the python shell


S.MD(runtime=10, qscript=['local.sh']) # should be at least 10e3 ps for production, not just 10 ps
S.MD(
runtime=10, qscript=["local.sh"]
) # should be at least 10e3 ps for production, not just 10 ps
# run simulation
r = gromacs.run.MDrunner(dirname=S.dirs['MD_NPT'], deffnm="md", c="md.pdb", cpi=True, append=True, v=True)
r.run() # runs mdrun in the python shell
r = gromacs.run.MDrunner(
dirname=S.dirs["MD_NPT"], deffnm="md", c="md.pdb", cpi=True, append=True, v=True
)
r.run() # runs mdrun in the python shell


import mdpow.fep

gwat = mdpow.fep.Ghyd(simulation=S, runtime=10)
gwat.setup()

# run multiple simulations on cluster



O = mdpow.equil.OctanolSimulation(molecule="BNZ")
O.topology("benzene.itp")
O.solvate(struct="benzene.pdb")
Expand Down
13 changes: 13 additions & 0 deletions doc/examples/martini/benzene.pdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
REMARK GENERATED BY TRJCONV
TITLE This is an auto generated system
REMARK THIS IS A SIMULATION BOX
CRYST1 150.000 150.000 180.000 90.00 90.00 90.00 P 1 1
MODEL 1
ATOM 1 R1 BENZ 1 30.920 6.600 24.160 1.00 0.00
ATOM 2 R2 BENZ 1 28.820 5.000 23.610 1.00 0.00
ATOM 3 R3 BENZ 1 29.860 6.580 21.680 1.00 0.00
TER
ENDMDL
CONECT 1 2
CONECT 2 3
CONECT 1 3
17 changes: 17 additions & 0 deletions doc/examples/martini/em.mdp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include =
integrator = steep
dt = 0.02
nsteps = 1000
nstxout = 0
nstvout = 0
nstlog = 100
nstxtcout = 100
xtc-precision = 1000
rlist = 1.0
coulombtype = Reaction-Field
rcoulomb = 1.0
epsilon_r = 15
vdw-type = cutoff
vdw-modifier = Potential-shift-verlet
rvdw = 1.0
constraints = none
24 changes: 24 additions & 0 deletions doc/examples/martini/eq.mdp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
include =
dt = 0.005
nsteps = 25000
nstxout = 0
nstvout = 0
nstlog = 1000
nstxout-compressed = 1000
cutoff-scheme = Verlet
coulombtype = Reaction-Field
rcoulomb = 1.1
epsilon_r = 15
vdw-type = cutoff
vdw-modifier = Potential-shift-verlet
rvdw = 1.1
tcoupl = v-rescale
tc-grps = System
tau-t = 1.0
ref-t = 300
Pcoupl = c-rescale
Pcoupltype = isotropic
tau-p = 3.0
compressibility = 3e-4
ref-p = 1.0
refcoord_scaling = all
Loading

0 comments on commit f004745

Please sign in to comment.