Skip to content

Automatic MARTINI parametrization of small organic molecules

License

Notifications You must be signed in to change notification settings

Ravy-LFL/auto_martini

 
 

Repository files navigation

Auto_Martini

CI codecov slack heroku

For reporting bugs or suggesting new features/improvements to the code, please open an issue.


What is Auto_Martini?

A toolkit that enables automatic generation of Martini forcefields for small organic molecules.

For a detailed account of the software, see:

Bereau and Kremer, J Chem Theory Comput, DOI:10.1021/acs.jctc.5b00056 (2015)

DOI for Citing auto_martini

Please consider citing the paper if you find auto_martini useful in your research.

@article{bereau2015automartini,
author = {Bereau, Tristan and Kremer, Kurt},
title = {Automated parametrization of the coarse-grained MARTINI force field 
    for small organic molecules},
journal = {J Chem Theory Comput},
year = {2015},
volume = {11},
number = {6},
pages = {2783-2791},
doi = {10.1021/acs.jctc.5b00056}
}

For full documentation, click here.

Developers

  • Tristan Bereau (University of Amsterdam, Netherlands)
  • Kiran Kanekal (Max Planck Institute for Polymer Research, Mainz, Germany)
  • Andrew Abi-Mansour (Molecular Sciences Software Institute, Virginia Tech, Blacksburg, US)

Update to Python3

The main branch is now fully compatible with Python 3. For the original Python2-based version of the code used in the JCTC 2015 paper, see branch original_jctc2015.

Installation

Installation with poetry

Simply run the following commands

poetry shell
poetry add rdkit
poetry install

You'll need to run the first line every time you start a new terminal, so that it activates the virtual environment. If you call python, it will know about auto_martini.

Testing

To run the test cases and validate your installation, you will need to have pytest installed. If you installed auto_martini with conda, then pytest should already be available in your environment.

To initiate the testing, run the following:

poetry run pytest

All tests should pass within few minutes. If any of the tests fail, please open an issue.

Command-line Interface

You can invoke auto_martini from the command-line via:

python -m auto_martini [mode] [options]

By default, mode is set to 'run', which computes the MARTINI forcefield for a given molecule.

To display the usage-information (help), either supply -h, --help, or nothing to auto_martini:

usage: auto_martini [-h] [--mode {run,test}] [--sdf SDF | --smi SMI]
                    [--mol MOLNAME] [--aa AA] [--cg CG] [--top TOPFNAME] [-v]
                    [--fpred]

Generates Martini force field for atomistic structures of small organic molecules

optional arguments:
  -h, --help         show this help message and exit
  --mode {run,test}  mode: run (compute FF) or test (validate)
  --sdf SDF          SDF file of atomistic coordinates
  --smi SMI          SMILES string of atomistic structure
  --mol MOLNAME      Name of CG molecule
  --aa AA            filename of all-atom structure .gro file
  --cg CG            filename of coarse-grained structure .gro file
  --top TOPFNAME     filename of output topology file
  -v, --verbose      increase verbosity
  --fpred            Atomic partitioning prediction

Developers:
===========
Tristan Bereau (bereau [at] mpip-mainz.mpg.de)
Kiran Kanekal (kanekal [at] mpip-mainz.mpg.de)
Andrew Abi-Mansour (andrew.gaam [at] gmail.com)

Example

To coarse-grain a molecule, simply provide its SMILES code (option --smi SMI) or a .SDF file (option '--sdf file.sdf). You also need to provide a name for the CG molecule (not longer than 5 characters) using the --mol option. For instance, to coarse grain guanazole, you can either obtain/generate (e.g., from Open Babel) an SDF file:

python -m auto_martini --sdf guanazole.sdf --mol GUA --top GUA.itp

(the name GUA is arbitrary) or use its SMILES code within double quotes

python -m auto_martini --smi "N1=C(N)NN=C1N" --mol GUA --top GUA.itp

In case no problem arises, it will output the gromacs GUA.itp file:

;;;; GENERATED WITH auto-martini
; INPUT SMILES: N1=C(N)NN=C1N
; Tristan Bereau (2014)

[moleculetype]
; molname       nrexcl
  GUA           2

[atoms]
; id    type    resnr   residu  atom    cgnr    charge  smiles
  1     SP2     1       GUA     S01     1       0     ; Nc1ncnn1
  2     SP2     1       GUA     S02     2       0     ; Nc1ncnn1

[constraints]
;  i   j     funct   length
   1   2     1       0.21

Optionally, the code can also output a corresponding .gro file for the coarse-grained coordinates

python -m auto_martini --smi "N1=C(N)NN=C1N" --mol GUA --cg gua.gro --top GUA.itp

Atomistic coordinates can be written using the --aa output.gro option.

Caveats

For frequently encountered problems, see FEP.

About

Automatic MARTINI parametrization of small organic molecules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 83.4%
  • Cython 16.6%