Skip to content

Commit

Permalink
time units and DPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan8be committed Mar 6, 2024
2 parents 2423280 + 068cd11 commit ae4bb25
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM jupyter/base-notebook

RUN mkdir /tmp/build
COPY README.md meta.yaml setup.py /tmp/build/
COPY metadynminer/ /tmp/build/metadynminer/

RUN pip3 install /tmp/build

COPY python_metadynminer.ipynb /home/jan8be

RUN mamba install --yes ipywidgets ipympl
36 changes: 31 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
# metadynminer.py



[![Build](https://github.com/Jan8be/metadynminer.py/actions/workflows/ci.yml/badge.svg)](https://github.com/Jan8be/metadynminer.py/actions/workflows/ci.yml)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/metadynminer?label=PyPI%20downloads&color=green&link=https%3A%2F%2Fpypi.org%2Fproject%2Fmetadynminer%2F)](https://pypi.org/project/metadynminer/)
[![conda downloads](https://img.shields.io/conda/d/Jan8be/metadynminer?label=Conda%20total%20downloads&color=green&link=https%3A%2F%2Fanaconda.org%2FJan8be%2Fmetadynminer)](https://anaconda.org/Jan8be/metadynminer)


Metadynminer is a package designed to help you analyse output HILLS files from PLUMED metadynamics simulations.

It is inspired by existing Metadynminer package for R. It supports HILLS files with one, two or three collective variables.

All built-in functions can be customized with many parameters. You can learn more about that in the documentation. There are also other predefined functions allowing you to for example to enhance your presentation with animations of your 3D FES or remove a CV from existing FES.

Installation:
## Quickstart: run in Binder

Click the icon bellow and wait (couple of minutes) for the container to build and started on public [MyBinder](http://mybinder.org/).

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jan8be/metadynminer.py/main)

Alternatively, for [Metacentrum](https://metacentrum.cz/) users, somewhat better resources are available:

[![Binder](https://binderhub.cloud.e-infra.cz/badge_logo.svg)](https://binderhub.cloud.e-infra.cz/v2/gh/jan8be/metadynminer.py/main?urlpath=lab)

Once in the Jupyterlab environment, upload your ```HILLS``` file and start the ```python_metadynminer.ipynb``` notebook.

## Installation:

```bash
pip install metadynminer
```
Expand All @@ -19,7 +35,12 @@ or
conda install -c jan8be metadynminer
```

Sample code:
## Sample code:

Load metadynminer:
```python
import metadynminer
```

Load your HILLS file:
```python
Expand All @@ -37,7 +58,12 @@ with the option original=True. This algorithm was checked and it gives the same
fes2 = metadynminer.Fes(hillsfile, original=True)
```

Visualize the free energy surface and save the picture to a file:
Visualize the free energy surface:
```python
fes.plot()
```

Visualize and save the picture to a file:
```python
fes.plot(png_name="fes.png")
```
Expand All @@ -46,13 +72,13 @@ Find local minima on the FES, print them and save FES with minima as a picture:
```python
minima = metadynminer.Minima(fes)
print(minima.minima)
minima.plot(png_name="fes_with_minima.png")
minima.plot()
```

You can also plot free energy profile to see, how the differences between each minima were evolving
during the simulation. Convergence in the free energy profile suggests that the resulting free energy surface converged to correct values.
```python
fep = metadynminer.FEProfile(minima, hillsfile)
fep.plot(png_name="FEProfile.png")
fep.plot()
```

2 changes: 1 addition & 1 deletion python_metadynminer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"id": "f1c0752e-86ca-41c2-9caa-21c7bbf80fbd",
"metadata": {},
"source": [
"<img src=\"flooding.gif\" width=\"750\" align=\"center\">"
"<img src=\"flooding.gif\" width=\"750\" align=\"center\"/>"
]
}
],
Expand Down

0 comments on commit ae4bb25

Please sign in to comment.