• Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 9 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A package for atom-typing as well as applying and disseminating forcefields

Foyer: A package for atom-typing as well as applying and disseminating forcefields

Gitter chat CI Anaconda Badge codecov DOI

Overview

Foyer is an open-source Python tool for defining and applying force field atom-typing rules in a format that is both human- and machine-readable. It parametrizes chemical topologies, generating, syntactically correct input files for various simulation engines. Foyer provides a framework for force field dissemination, helping to eliminate ambiguity in atom-typing and improving reproducibility (for more information, see our paper or its corresponding pre-print).

About the name: foyer was inspired by the antechamber tool in the Amber ecosystem. Foyer plays a similar role to antechamber, hence the tongue-in-cheek, shared vestibular reference.

Foyer within the MoSDeF Ecosystem

Foyer within the MoSDeF Ecosystem

Foyer defines force fields in an XML format, where SMARTS strings are used to define the chemical context of a particular atom type and โ€œoverridesโ€ are used to set rule precedence, rather than a rigid hierarchical scheme. Foyer builds upon the OpenMM .xml force field file, annotated with SMARTS-based atomtypes, e.g.:

<ForceField>
 <AtomTypes>
  <Type name="opls_135" class="CT" element="C" mass="12.01100" def="[C;X4](C)(H)(H)H" desc="alkane CH3"/>
  <Type name="opls_140" class="HC" element="H" mass="1.00800"  def="H[C;X4]" desc="alkane H"/>
 </AtomTypes>
</ForceField>

Foyer can apply the forcefield to arbitrary chemical topologies. We currently support:

Application of a force field can be as simple as:

from foyer import Forcefield
import parmed as pmd

untyped_ethane = pmd.load_file('ethane.mol2', structure=True)
oplsaa = Forcefield(forcefield_files='oplsaa.xml')
ethane = oplsaa.apply(untyped_ethane)

# Save to any format supported by ParmEd
ethane.save('ethane.top')
ethane.save('ethane.gro')

The Foyer package is part of the Molecular Simulation Design Framework (MoSDeF) project. Libraries in the MoSDeF ecosystem are designed to provide utilities necessary to streamline a researcher's simulation workflow. When setting up simulation studies, we also recommend users to follow the TRUE (Transparent, Reproducible, Usable-by-others, and Extensible) standard, which is a set of common practices meant to improve the reproducibility of computational simulation research.

Getting started

Quick Start with Docker

To use foyer in a jupyter-notebook that runs from a docker container with all the dependencies installed use the following command:

$ docker pull mosdef/foyer:latest
$ docker run -it --name foyer -p 8888:8888 mosdef/foyer:latest\
  /opt/conda/envs/foyer-docker/bin/jupyter notebook --ip="*"

Alternatively, you can also start a Bourne shell directly:

$ docker run -it --name foyer mosdef/foyer:latest

To learn more about using foyer with docker, please refer to the documentation here .

Getting started with SMARTS-based atom-typing

Defining force fields:

Example foyer force field files:

Foyer currently includes a subset of the OPLS AA and TraPPE forcefields, currently part of the source distribution:

Additional example force field XML files:

Example template for disseminating force fields:

Using Foyer to perform atom typing:

Documentation:

Installation instructions

Citing Foyer:

License

Various sub-portions of this library may be independently distributed under different licenses. See those files for their specific terms.

This material is based upon work supported by the National Science Foundation under grants NSF ACI-1047828 and NSF ACI-1535150. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

More Repositories

1

mbuild

A hierarchical, component based molecule builder
Python
171
star
2

gmso

Flexible storage of chemical topology for molecular simulation
Python
52
star
3

mosdef_tutorials

A set of tutorials to introduce new users to the MoSDeF (Molecular Simulation Design Framework) toolkit
Jupyter Notebook
25
star
4

mosdef-workflows

Sample molecular simulation workflows using a MoSDeF and community tools
Jupyter Notebook
13
star
5

msibi

A package for managing pair-potential derivation using MultiState Iterative Boltzmann Inversion (MS-IBI)
Python
10
star
6

mbuild_tutorials

A set of tutorials to introduce new users to mBuild
Jupyter Notebook
10
star
7

nanoparticle_optimization

NanoOpt: Deriving potentials for coarse-grained nanoparticles via potential-matching
Jupyter Notebook
10
star
8

reproducibility_study

Repo for data collection, discussion, etc for a MoSDeF reproducibility study.
Jupyter Notebook
6
star
9

forcefield_template

A template repo for disseminating force fields with foyer
Python
6
star
10

mosdef_slitpore

A variety of water and carbon slit-pore simulations
Python
4
star
11

forcefield_perfluoroethers

foyer force field for perfluoroethers
Jupyter Notebook
3
star
12

mbuild-examples

mBuild examples
Jupyter Notebook
3
star
13

foyer_tutorials

A set of tutorials to introduce new users to Foyer
Jupyter Notebook
3
star
14

mosdef-hub.github.io

Umbrella Website for MoSDeF
HTML
2
star
15

molbox

Python
2
star
16

forcefield-utilities

MISC Utilities for MoSDeF Forcefields conversion
Python
2
star
17

MoSDeF-workshop

Collection of tutorials and example workflows for MoSDeF workshop at FOMMS 2022
Jupyter Notebook
2
star
18

metamds

metamds is currently read-only; see signac.io for a recommended data and workflow manager
Python
2
star
19

FOMMS-MoSDeF-Workshop

Jupyter Notebook
2
star
20

gmso-examples

Demonstrating GMSO as a backend for preparing molecular simulation
1
star
21

mbuild_binder

Jupyter Notebook
1
star