Skip to content

Commit

Permalink
Merge pull request #54 from wehs7661/final_tweaks
Browse files Browse the repository at this point in the history
Final tweaks before releasing version 1.0.0
  • Loading branch information
wehs7661 authored Aug 3, 2024
2 parents 63cece8 + 8bcdd9e commit 5357b8c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
17 changes: 6 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ jobs:
test:
docker:
- image: cimg/python:<<parameters.python-version>>
environment:
PYTHON_VERSION: "<<parameters.python-version>>"
parameters:
python-version:
type: string
Expand Down Expand Up @@ -61,17 +59,20 @@ jobs:
- run:
name: Run unit tests
# no_output_timeout: 1h
command: |
source $HOME/pkgs/bin/GMXRC
pip3 install pytest
pip3 install pytest-mpi
pip3 install pytest-cov
# sleep 3000 # only for debugging purposes
coverage run -m pytest -vv --disable-pytest-warnings --color=yes ensemble_md/tests
mpirun -np 4 coverage run --rcfile setup.cfg -m pytest ensemble_md/tests/test_mpi_func.py --with-mpi -vv --disable-pytest-warnings --color=yes # this will generate multiple .coverage* files that can be combined
coverage combine # This will combine multiple .coverage* files into a single .coverage file that will be uploaded and reported.
# mpirun -np 4 coverage run --rcfile setup.cfg -m pytest ensemble_md/tests/test_mpi_func.py --with-mpi -vv --disable-pytest-warnings --color=yes # this will generate multiple .coverage* files that can be combined
# coverage combine # This will combine multiple .coverage* files into a single .coverage file that will be uploaded and reported.
# Below are some old commands:
# Another section of old commands
# pytest -vv --disable-pytest-warnings --cov=ensemble_md --cov-report=xml --color=yes ensemble_md/tests/
# COVERAGE_FILE=.coverage_1 pytest -vv --disable-pytest-warnings --cov=ensemble_md --cov-report=xml --color=yes ensemble_md/tests/
# COVERAGE_FILE=.coverage_2 mpirun -np 4 pytest -vv --disable-pytest-warnings --cov=ensemble_md --cov-report=xml --color=yes ensemble_md/tests/test_mpi_func.py --with-mpi
Expand All @@ -88,12 +89,6 @@ jobs:
workflows:
continuous-integration:
jobs:
- test:
name: test-python-3.8
python-version: "3.8"
# - test:
# name: test-python-3.9
# python-version: "3.9"
- test:
name: test-python-3.10
python-version: "3.10"
Expand Down
4 changes: 1 addition & 3 deletions docs/examples/tutorial_1/standard_REXEE.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": "48c42ec7",
"metadata": {},
"source": [
"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/wehs7661/ensemble_md/c0f6d48ce3fe746e349e4a4a9610f935cca8b0b5?urlpath=lab%2Ftree%2Fdocs%2Fexamples%2Ftutorial_1%2Frun_REXEE.ipynb)\n",
"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/wehs7661/ensemble_md.git/HEAD?labpath=docs%2Fexamples%2Ftutorial_1%2Fstandard_REXEE.ipynb)\n",
"\n",
"In this tutorial, we will demonstrate how one can use the different command-line interfaces (CLIs) implemented in the Python package `ensemble_md` to prepare, perform, and analyze a REXEE simulation to estimate the solvation free energy of a toy molecule composed of 4 interaction sites. For a more comprehensive understanding, we strongly recommend reading our [documentation](https://ensemble-md.readthedocs.io/en/latest/simulations.html) on launching REXEE simulations before starting this tutorial. For the theory behind the REXEE method, we recommend reading our [JCTC paper](https://pubs.acs.org/doi/10.1021/acs.jctc.1c00494) or the [theory section](https://ensemble-md.readthedocs.io/en/add_tutorials/theory.html) of our documentation.\n",
"\n",
Expand Down Expand Up @@ -1093,8 +1093,6 @@
"id": "4378660a-e52c-4fac-acbd-6269b6fe2a1f",
"metadata": {},
"source": [
"</br>\n",
"\n",
"### 4.1. Replica-space sampling\n",
"As shown in the replica-space trajectories in the left figure below, each replica was able to sample all different sets of states by exchanging coordinates with other replicas, indicating good sampling in the replica space. This decent sampling in the replica space is also reflected in the replica-space transition matrix in the right figure, where all tridiagonal elements are non-zero. "
]
Expand Down
5 changes: 5 additions & 0 deletions ensemble_md/tests/test_replica_exchange_EE.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
from ensemble_md.replica_exchange_EE import ReplicaExchangeEE
from ensemble_md.utils.exceptions import ParameterError

import logging
logging.basicConfig(level=logging.DEBUG)

current_path = os.path.dirname(os.path.abspath(__file__))
input_path = os.path.join(current_path, "data")

Expand Down Expand Up @@ -74,8 +77,10 @@ def check_param_error(REXEE_dict, param, match, wrong_val='cool', right_val=None

class Test_ReplicaExchangeEE:
def test_init(self, params_dict):
logging.debug("Initializing ReplicaExchangeEE")
REXEE = get_REXEE_instance(params_dict)
assert REXEE.yaml == 'params.yaml'
logging.debug("Finished initializing ReplicaExchangeEE")

def test_set_params_error(self, params_dict):
# 1. Required parameters
Expand Down

0 comments on commit 5357b8c

Please sign in to comment.