.. _examples-submoves-1d: Subtrajectory moves in a 1D potential ===================================== This example shows how to use the subtrajectory monte carlo moves Stone Skipping (SS), Web Throwing (WT) [1]_ and Wire Fencing (WF) [2]_ in (Replica Exchange) Transition Interface Sampling simulations for sampling trajectories of a particle in a 1D well. The three moves are sketched out below: .. _figsubtrajmoves: .. figure:: /_static/img/examples/all3moves.png :alt: The three subtrajectory moves :width: 60% :align: center Cartoon representation of the three subtrajectory moves: stone skipping, web throwing and web throwing. The old path is shown in blue. Four subtrajectories are shown in orange. The final new path consists of the fourth subtrajectory and its extensions in green. Further details on the 1D potential, how to create the PyRETIS input file and calculating reaction rates using TIS/RETIS are explained by the previous 1D potential :ref:`TIS example ` and :ref:`RETIS example `. | Defining the shooting move -------------------------- To define the specific shooting moves performed in each of the ensembles in i.e. a RETIS simulation, the number of ensembles needs to be known. This information can be obtained from reading the ``interfaces`` variable in the :ref:`simulation section ` of the input file: .. literalinclude:: /_static/examples/submoves1d/retis-1d.txt :language: rst :lines: 1-8 Here we have one :math:`[0^{-}]` ensemble and seven :math:`[i^{+}]` ensembles for a total of 8 ensembles. Then we can define the specific shooting moves to be performed in each ensemble in the :ref:`tis section `: .. literalinclude:: /_static/examples/submoves1d/retis-1d.txt :language: rst :lines: 28-35 The ``shooting_moves`` variable defines the list of shooting moves to be used for all the ensembles. Here we see that :math:`[0^{-}]` and :math:`[0^{+}]` performs the shooting move while the other ensembles performs the SS, WT and WF moves. The ``interface_sour`` sets the SOUR interface for the WT, while if defined, the ``interface_cap`` variable sets the upper value limit of subtrajectories generated by the WF move. The variable ``n_jumps`` defines the number of subtrajectories to be generated per move and the bool ``high_accept`` determines whether the high acceptance protocol should be used or not. | Running the RETIS simulation ---------------------------- Running a RETIS simulation with subtrajectory moves works the same way as running without subtrajectory moves. Below is a complete input file (let's call it ``retis.rst``). .. pyretis-collapse-block:: :heading: Show/hide the full input file .. literalinclude:: /_static/examples/submoves1d/retis-1d.txt :language: rst The initial configuration :download:`initial.xyz ` should be downloaded and put in the same folder. The simulation can then be executed using: .. code-block:: pyretis pyretisrun -i retis.rst -p The ``-p`` option will display a progress bar for your simulation. | References ---------- .. [1] https://pubs.acs.org/doi/10.1021/acs.jpclett.7b01617 .. [2] https://doi.org/10.1063/5.0127249