Walls ===== Sometimes it is needed to introduce a wall potential to the dynamics that is able to limit the accessible CV range to a predefined region. Again, the easiest setup is achieved with the GUI application, where the wall section is found as one of the CV editing tabs: .. figure:: gui_wall.png Every CV allows the addition of one wall potential. If more than one wall is needed on the same CV or if a wall should be inserted on a variable that is not used as a metadynamics CV, just create a new variable and check the option on top of the form. This will disable it for the use in the metadynamics, so the only sense of the variable is the wall potential. Two types of walls are implemented in the :mod:`wall ` module of the :mod:`metafalcon` package. A polynomial wall .. math:: V_{wall}=s (x-x_{offset})^{exp} is requested with the keyword `polynomial_upper` if it should act when :math:`x` takes values larger than :math:`x_{offset}` or `polynomial_lower` if the aim is to prevent the system from undercutting :math:`x_{offset}`. Another possibility is the logarithmic potential .. math:: V_{wall}=c_1 c_2^2 \ln \left( 1+ \left( \frac{x-x_{offset}}{c_2} \right) ^2 \right), that is available with the keywords `log_upper` and `log_lower`, respectively. :math:`c_1` and :math:`c_2` are referred to as `weight` and `strength` factors in the GUI. If you are not sure which parameters to choose, it may be suitable to plot the potential using the :func:`plot_wall() ` function:: from metafalcon.wall import plot_wall, polynomial_upper plot_wall(polynomial_upper, xmin=0.0, xmax=5.0, x_offset=1.5, s=1.0, exp=2.) The resulting plot shows the wall potential: .. figure:: wall_plot.png