(192bg) Mosdef, a Python-Based Molecular Simulation and Design Framework

Gilmer, J., Vanderbilt University
Klein, C., Vanderbilt University
Sallai, J., Vanderbilt University
Summers, A. Z., Vanderbilt University
Iacovella, C. R., Vanderbilt University
Lédeczi, Á., Vanderbilt University
McCabe, C., Vanderbilt University
Cummings, P. T., Vanderbilt University
Here we present MoSDeF [1], a set of extensible Python tools designed to facilitate the initialization, atom-typing, and screening of soft matter systems using molecular dynamics simulations. MoSDeF is designed around two key pieces of software, mBuild [2,3] and Foyer [4,5]. mBuild is designed to facilitate the generation of starting configurations, designed around the concept of defining and connecting ports on individual building blocks. mBuild supports parameterized structures through generative modeling, allowing for declaratively expressing repetitive structures, e.g. polymer chains, crystal structures, planar or spatial tiling, as well as for parameterizing the affine transformations applied to subcomponents of a composite component. mBuild also includes a robust library for the generation of crystal structures. With knowledge of the crystallographic information of the system of interest, users can quickly build and implement a crystal structure, of both atomistic and molecular subunits, using mBuild’s provided toolkit. mBuild’s crystal builder currently supports multiple basis particles, 1D, 2D, or 3D unit cells, and generating and saving arbitrarily-sized crystal structures. For end users, this software design approach minimizes and often eliminates the need to explicitly rotate and translate components when assembling systems and allows parameters to be programmatically varied for a family of systems (e.g., polymer chain length, crystal size) or interchange individual components (e.g., polymer type, crystal basis), while still employing the same general script.

Foyer is a general tool for applying force fields to molecular systems (i.e., atom-typing) that does not rely upon rigid rule hierarchies to atom-type a system. Foyer is designed such that it separates the engine that evaluates the atom-typing rules from the rules themselves, making it easier to debug, extend, and disseminate force fields. Foyer provides a force field and simulator agnostic schema for defining parameter usage that relies upon SMARTS [6] based annotations of chemical context, providing both human and machine readable documentation of parameter usage along with the parameters themselves in a single XML document.

mBuild and Foyer are able to output fully parameterized structures to various file formats used by common simulation engines (E.g. GROMACS, LAMMPS, HOOMD-Blue etc.). These tools can be coupled with the Signac-flow workflow manager [7], allowing large scale screening over parameter space. As such, MoSDeF provides a flexible, yet clear approach to encapsulate the routines and parameters used when initializing and performing molecular simulations. Which increases transparency and reproducibility of simulation results.

[1] https://github.com/mosdef-hub

[2]  C. Klein, J. Sallai, T. J. Jones, C. R. Iacovella, C. McCabe, and P. T. Cummings, “A Hierarchical, Component Based Approach to Screening Properties of Soft Matter,” in Foundations of Molecular Modeling and Simulation, 2016, pp. 79–92.

[3] https://github.com/mosdef-hub/mbuild

[4] Iacovella, C. R.; Sallai, J.; Klein, C.; Ma, T. In Idea Paper: Development of a Software Framework for Formalizing Forcefield Atom-Typing for Molecular Simulation, 4th Workshop on Sustainable Software for Science: Practice and Experiences (WSSSPE4), 2016.

[5]  https://github.com/mosdef-hub/foyer

[6] http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html

[7]  C. S. Adorf and P. Dodd, “Signac-Flow.” [Online]. Available: https://bitbucket.org/glotzer/signac-flow.