Code Monkey home page Code Monkey logo

antefoyer's Introduction

antefoyer

Travis Build Status AppVeyor Build status codecov

This repository provides support for the General Amber Force Field (GAFF) in foyer. Foyer is a part of the Molecular Simulation Design Framework (MoSDeF). A few relevant links are provided below:

There are two primary components to this repository:

  • Foyer-compatible XML file for GAFF
  • Antechamber wrapper to integrate antechamber atomtyping and AM1-BCC charge assignment directly into MoSDeF workflows.

Installation

The following instructions will create a new python 3.7 conda environment (antefoyer) and install the required packages and dependencies:

git clone https://github.com/rsdefever/antefoyer
conda create --name antefoyer -c conda-forge -c mosdef -c omnia python=3.7 --file antefoyer/requirements.txt
conda activate antefoyer
cd antefoyer/.
pip install . 

Dependencies

  • foyer >= 0.7.4
  • networkx
  • ambertools (for the antefoyer.ante_atomtyping and antefoyer.ante_charges functions)

Optional dependencies

To complete some of the examples below you will need mbuild and openbabel installed. These can be added via conda:

conda install -c conda-forge mbuild openbabel

Usage

There are two primary workflows for atomtyping with antefoyer. The first uses the traditional foyer approach with SMARTS strings defined in antefoyer/xml/gaff.xml.

# Assuming we also have mbuild installed for this example
import foyer
import mbuild as mb

# Build/import a molecule
molecule = mb.load('CCC',smiles=True)

# Load GAFF
GAFF = foyer.forcefields.load_GAFF()

# Use foyer to parameterize
parameterized_molecule = GAFF.apply(molecule.to_parmed())

# Save to whatever file format you desire

Note that antefoyer was never imported. If antefoyer is properly installed, the GAFF forcefield will become available under foyer.forcefields.load_GAFF() via entrypoints.

The second workflow uses the antechamber wrapper. This requires antechamber to be installed an accesible in your PATH. Antechamber can be installed from conda: conda install -c conda-forge ambertools.

# Assuming we also have mbuild installed for this example
import foyer
import mbuild as mb

# For this we need to import antefoyer
import antefoyer

# Build/import a molecule
molecule = mb.load('CCC', smiles=True)

# Load GAFF
gaff = foyer.forcefields.load_GAFF()

# Identify GAFF atomtypes with antechamber
typed_molecule = antefoyer.ante_atomtyping(molecule, 'gaff')

# Use foyer to parameterize
parameterized_molecule = gaff.parametrize_system(typed_molecule)

# We can also apply AM1-BCC charges from antechamber
molecule_with_charges = antefoyer.ante_charges(parameterized_molecule,'bcc')

# Save to whatever file format you desire

Details of SMARTS strings development and testing

Further details of the SMARTS strings development and testing are provided in a separate repository, GAFF-Foyer.

Acknowledgements

Project based on the Computational Molecular Science Python Cookiecutter version 1.1.

This material is based upon work supported by the National Science Foundation under Grant #1835874

antefoyer's People

Contributors

rsdefever avatar rmatsum836 avatar

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.