Molecular Simulation Design Framework (MoSDeF)

Here we present MoSDeF, 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 and Foyer. 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'Ss provided toolkit. mbuild 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 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.

GMSO is a flexible storage of chemical topology for molecular simulation. With a few lines of GMSO code, together with mBuild and foyer, users can rapidly prototype arbitrary parameterized chemical systems and generate data files for a wide variety of simulation engines. GMSO's goal is to provide a flexible backend framework to store topological information of a chemical system in a reproducible fashion. Topology in this case is defined as the information needed to initialize a molecular simulation. Depending on the type of simulation performed, this ranges from: particle positions, particle masses, connectivity, simulation box, forcefield information, partial charges, etc.

Want to dive in?