Skip to content

Commit

Permalink
Finished updating the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wehs7661 committed Oct 25, 2023
1 parent 3abc140 commit a95ea2d
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 92 deletions.
4 changes: 2 additions & 2 deletions docs/analysis.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
1. An overview
==============
Automated data analysis of an EEXE simulation is allowed by the CLI :code:`analyze_EEXE`, which
share the same input YAML file as the CLI :code:`run_EEXE`. Relevant parameters specified in the YAML
Automated data analysis of an REXEE simulation is allowed by the CLI :code:`analyze_REXEE`, which
share the same input YAML file as the CLI :code:`run_REXEE`. Relevant parameters specified in the YAML
file for data analysis can be found in this section: :ref:`doc_analysis_params`.

- Analysis based on transitions between replicas
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
===============
:code:`ensemble_md` is a Python package that provides methods for setting up,
running, and analyzing GROMACS simulation ensembles. The current implementation is
mainly for synchronous ensemble of expanded ensemble (EEXE), but we will develop
methods like asynchronous EEXE, or ensemble of alchemical metadynamics in the future.
mainly for synchronous replica exchange (REX) of expanded ensemble (EE), abbreviated as
REXEE. In the future, we will develop methods like asynchronous REXEE, or multi-topology REXEE.
In the current implementation, the module :code:`subprocess`
is used to launch GROMACS commands, but we will switch to `SCALE-MS`_ for this purpose
in the future when possible.
Expand Down
8 changes: 4 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ the future.
.. toctree::
simulations
:maxdepth: 2
:caption: Launching EEXE simulations:
:caption: Launching REXEE simulations:

.. toctree::
analysis
:maxdepth: 2
:caption: Data analysis:

.. toctree::
examples/run_EEXE
examples/analyze_EEXE
examples/run_EEXE_modify_inputs
examples/run_REXEE
examples/analyze_REXEE
examples/run_REXEE_modify_inputs
:maxdepth: 2
:caption: Tutorials:

Expand Down
142 changes: 71 additions & 71 deletions docs/simulations.rst

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions docs/theory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

1. Basic idea
=============
Ensemble of expanded ensemble (EEXE) integrates the core principles of replica exchange
molecular dynamics (REMD) and expanded ensemble (EXE). Specifically, an ensemble of
expanded ensembles includes multiple non-interacting, parallel expanded ensemble simulations
Replica exchange of expanded ensemble (REXEE) integrates the core principles of replica exchange
molecular dynamics (REMD) and expanded ensemble (EXE). Specifically, a REXEE simulation includes multiple non-interacting, parallel expanded ensemble simulations
that collectively sample a number of alchemical states spanning between the coupled state
(:math:`\lambda=0`) and the uncoupled state (:math:`\lambda=1`). Each expanded ensemble
samples a subset of these states such that the range of its allowed alchemical states
overlaps with that of the adjacent replicas. In EEXE, the exchange of coordinates/alchemical
overlaps with that of the adjacent replicas. In REXEE, the exchange of coordinates/alchemical
states occurs at a specified frequency, which is beneficial for allowing better mixing
in the alchemical space given sufficiently long simulation time, properly specified parameters
and highly parallelizable computing architectures.
Expand Down Expand Up @@ -401,10 +400,10 @@ sampling different alchemical ranges would have different references. Therefore,

2.4. How is swapping performed?
-------------------------------
As implied in :ref:`doc_basic_idea`, in an EEXE simulation, we could either choose to swap configurations
As implied in :ref:`doc_basic_idea`, in an REXEE simulation, we could either choose to swap configurations
(via swapping GRO files) or replicas (via swapping MDP files). In this package, we chose the former when
implementing the EEXE algorithm. Specifically, in the CLI :code:`run_EEXE`, the function :obj:`.get_swapping_pattern`
is called once for each iteration and returns a list :code:`swap_pattern` that informs :code:`run_EEXE` how
implementing the REXEE algorithm. Specifically, in the CLI :code:`run_REXEE`, the function :obj:`.get_swapping_pattern`
is called once for each iteration and returns a list :code:`swap_pattern` that informs :code:`run_REXEE` how
the GRO files should be swapped. (To better understand the list :code:`swap_pattern`, see the docstring of
the function :obj:`.get_swapping_pattern`.) Internally, the function :obj:`.get_swapping_pattern` not only swaps
the list :code:`swap_pattern` when an attempted move is accepted, but also swaps elements in lists that contains
Expand All @@ -419,7 +418,7 @@ in the list of states. Check the source code of :obj :`.get_swapping_pattern` if
3.1. Basic idea
---------------
To leverage the stastics of the states collected from multiple replicas, we recommend
combining the alchemical weights of these states across replicas during an weight-updating EEXE simulation.
combining the alchemical weights of these states across replicas during an weight-updating REXEE simulation.
Ideally, the modified weights should facilitate the convergence of the alchemical weights in expanded ensemble,
which in the limit of inifinite simulation time correspond to dimensionless free energies of the alchemical states.
The modified weights also directly influence the the accpetance ratio, hence the convergence of the simulation
Expand Down Expand Up @@ -539,5 +538,5 @@ To deal with this, the user can choose to specify :code:`N_cutoff` in the input
correction will performed only when :math:`\text{argmin}(N_k, N_{k-1})` is larger than the cutoff. Also, this histogram correction
should always be carried out before weight combination. This method is implemented in :obj:`.histogram_correction`.

4. Parameter space of EEXE
4. Parameter space of REXEE
===========================
2 changes: 1 addition & 1 deletion ensemble_md/cli/analyze_REXEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

def initialize(args):
parser = argparse.ArgumentParser(
description='This code analyzes an ensemble of expanded ensemble. Note that the template MDP\
description='This code analyzes a REXEE simulation. Note that the template MDP\
file specified in the YAML file needs to be available in the working directory.')
parser.add_argument('-y',
'--yaml',
Expand Down
6 changes: 3 additions & 3 deletions ensemble_md/cli/run_REXEE.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

def initialize(args):
parser = argparse.ArgumentParser(
description='This code runs an ensemble of expanded ensemble given necessary inputs.')
description='This code runs a REXEE simulation given necessary inputs.')
parser.add_argument('-y',
'--yaml',
type=str,
Expand Down Expand Up @@ -99,7 +99,7 @@ def main():
MDP = REXEE.initialize_MDP(i)
MDP.write(f"sim_{i}/iteration_0/expanded.mdp", skipempty=True)

# 2-2. Run the first ensemble of simulations
# 2-2. Run the first set of simulations
REXEE.run_REXEE(0)

else:
Expand Down Expand Up @@ -280,7 +280,7 @@ def main():
print(f'\nAn error occurred on rank 0:\n{traceback.format_exc()}')
MPI.COMM_WORLD.Abort(1)

# 4-2. Run another ensemble of simulations
# 4-2. Run another set of simulations
REXEE.run_REXEE(i, swap_pattern)

# 4-3. Save data
Expand Down

0 comments on commit a95ea2d

Please sign in to comment.