Skip to main content

Edit simulation parameter input files for GROMACS

Project description

MDP Editor

Easily produce molecular dynamics simulation parameter input for GROMACS.

  • say it with words
    • compile pre-defined .mdp input parameter blocks reflecting best practices for different simulation scenarios
  • script parameter file generation and alteration
    • swap parameter blocks when, e.g., simulating with a different force-field
  • document the intent of your parameter settings
    • written .mdp files store the command that was used to generate them, simplifying documentation of simulation run input
  • simple input files
    • write only the parameters that you need

Features

  • stable command line interface
  • parameter blocks for the most common simulation scenarios
  • documentation of pre-defined parameter blocks on the command line
  • manually setting specific parameters
  • providing and updating own .mdp files
  • option to write minimal output
  • addition of more complex parameter blocks
    • density guided simulations
    • free energy calculation scenarios
    • QM/MM
  • parameter evaluation (like nsteps from setting simulation-time-in-ns)
  • textual user interface
  • graphical user interface
  • help text for parameters
  • grompp parameter check

Examples

Compile the pre-defined block force_field.charmm and sets nsteps = 100 in the output

mdpeditor compile force_field.charmm nsteps=100

yields

dt              = 0.002
nsteps          = 100
coulombtype     = PME
rcoulomb        = 1.2
vdw-modifier    = Force-switch
rvdw            = 1.2
dispcorr        = no
fourierspacing  = 0.15
constraints     = h-bonds

Write only values that were set when compiling pressure.atmospheric with force_field.charmm, skip all defaults

mdpeditor compile pressure.atmospheric force_field.charmm

Show the available pre-defined parameter blocks

mdpeditor explain

Learn more about a certain parameter block

mdpeditor explain density_guided.vanilla

Add atomspheric pressure coupling to a user-defined .mdp file, discarding all non-GROMACS entries in user.mdp.

mdpeditor compile user.mdp pressure.atmospheric

Describe the integrator parameter

mdpeditor explain integrator

Contributing

You can contribute by opening a new issue.

Contributing or changing parameter blocks

Adding a new .mdp file in a subdirectory of mdpeditor/mdpblocks will add a new block that is automatically discovered by the python package. The block of commented first lines (using ;) will be printed as description of the block.

Note that once you built an executable as described above, the parameter blocks are packaged with the executable and cannot be changed.

Installing and running

Install the latest release from the python package manager

pip3 install mdpeditor

Then run it

mdpeditor

Installing and running from source (if you must)

Running directly from the shell

./mdp-editor.py

Installation with pip

We use setuptools with a setup.cfg and pyproject.toml file.

To build a distribution from the source directory install

pip3 install build

Then run this in the source directory to build the distribution on your system

python3 -m build

Eventually, find the build in dist/ and install the .tar.gz file found there with

pip install dist/mdpeditor*.tar.gz

Make sure to install the right .tar.gz if you ran the build command multiple times.

Generating a single executable

To generate a single executable that you can run almost anywhere run

pip3 install pyinstaller
pyinstaller --onefile mdpeditor.spec

You will find the executable in

dist/

Author

Christian Blau

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mdpeditor-1.0.3.tar.gz (69.1 kB view hashes)

Uploaded Source

Built Distribution

mdpeditor-1.0.3-py3-none-any.whl (74.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page