Coder Social home page Coder Social logo

xy21hb / auto_martini Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tbereau/auto_martini

0.0 2.0 0.0 99 KB

Automatic MARTINI parametrization of small organic molecules

License: GNU General Public License v2.0

Python 96.87% Shell 3.13%

auto_martini's Introduction

Auto_MARTINI


Author: Tristan Bereau (Max Planck Institute for Polymer Research, Mainz, Germany)
Created: 2014


Automated MARTINI mapping and parametrization of small organic molecules.

Publication

For a detailed account of the software, see:

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

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}
}

Installation

auto-martini is a python script that requires a number of dependencies:

numpy and rdkit can be installed by some package managers. Otherwise you'll have to compile it from source. beautifulsoup and requests can easily be installed using pip or easy_install. In case you do not have root access to your computer to install new software, have a look at virtualenv.

Once all the dependencies are correctly installed, a call to the program should return a usage-information message similar to the following:

usage: auto-martini [-h] (--sdf SDF | --smi SMI) --mol MOLNAME [--xyz XYZ]
                    [--gro GRO] [--verbose] [--fpred]
auto-martini: error: argument --mol is required

Usage

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:

auto-martini --sdf guanazole.sdf --mol GUA

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

auto-martini --smi "N1=C(N)NN=C1N" --mol GUA

In case no problem arises, it will output the gromacs .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

auto-martini --smi "N1=C(N)NN=C1N" --mol GUA --gro gua.gro

Atomistic coordinates can be output in XYZ format using the --xyz output.xyz option.

Caveats

Prediction algorithm

Since ALOGPS, the prediction algorithm for octanol/water partitioning, relies on whole fragments rather than individual atoms, the prediction of certain fragments can pose problem, e.g., small inorganic groups. In this case, auto-martini tries to parametrize alternative mappings. If none of them shows successful, the code will return an error.

; ERROR: no successful mapping found.
; Try running with the '--fpred' and/or '--verbose' options.

As mentioned in the error message, an alternative solution consists of relying on an atom-based partitioning coefficient prediction algorithm (Wildman-Crippen), which is less accurate but can predict any fragment. In case the --fpred option is selected, only fragments for which ALOGPS fail will be predicted using Wildman-Crippen.

Boost error

Some versions of Boost will fail to correctly exit at the end of the program, generating such output messages:

python: /usr/include/boost/thread/pthread/mutex.hpp:108: boost::mutex::~mutex(): Assertion `!posix::pthread_mutex_destroy(&m)' failed.
[1]    31433 abort (core dumped)  ./auto_martini --smi "N1=C(N)NN=C1N" --mol GUA

the results provided by the code are unaffected by this error message. Simply ignore it.

RDKit outdated

Older RDKit versions will report the following error:

[...]
distBdAt = Chem.rdMolTransforms.GetBondLength(conf,i,beadId)
AttributeError: 'module' object has no attribute 'GetBondLength'

Simply update your version of RDKit. Most package managers will allow you to do this, unless you've installed RDKit from source.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.