mbuild

A hierarchical, component based molecule builder

https://github.com/mosdef-hub/mbuild

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    28 of 60 committers (46.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.2%) to scientific vocabulary

Keywords

mbuild molecular-dynamics molecular-simulation molecule-builder mosdef python

Keywords from Contributors

atom-typing disseminating-forcefields force-field foyer gromacs molecular-dynamics-simulation lammps data-management reproducibility signac
Last synced: 6 months ago · JSON representation ·

Repository

A hierarchical, component based molecule builder

Basic Info
  • Host: GitHub
  • Owner: mosdef-hub
  • License: other
  • Language: Python
  • Default Branch: main
  • Homepage: https://mbuild.mosdef.org
  • Size: 74.8 MB
Statistics
  • Stars: 198
  • Watchers: 20
  • Forks: 81
  • Open Issues: 61
  • Releases: 49
Topics
mbuild molecular-dynamics molecular-simulation molecule-builder mosdef python
Created over 12 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

mBuild: a hierarchical, component based molecule builder

Gitter chat CI Anaconda Badge codecov

With just a few lines of mBuild code, you can assemble reusable components into complex molecular systems for molecular dynamics simulations.

  • mBuild is designed to minimize or even eliminate the need to explicitly translate and orient components when building systems: you simply tell it to connect two pieces!
  • mBuild keeps track of the system's topology so you don't have to worry about manually defining bonds when constructing chemically bonded structures from smaller components.

To learn more, get started or contribute, check out our website.

mBuild within the MoSDeF Ecosystem

mBuild within the MoSDeF Ecosystem

The mBuild package is part of the Molecular Simulation Design Framework (MoSDeF) project. Libraries in the MoSDeF ecosystem are designed to provide utilities neccessary 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.

Installation

For full, detailed instructions, refer to the documentation for installation

conda installation quickstart

mBuild is available on conda and can be installed as: bash conda install -c conda-forge mbuild

Installing from source

Dependencies of mBuild are listed in the files environment.yml (lightweight environment specification containing minimal dependencies) and environment-dev.yml (comprehensive environment specification including optional and testing packages for developers). The mbuild or mbuild-dev conda environments can be created with

```.. code-block:: bash git clone https://github.com/mosdef-hub/mbuild.git cd mbuild

for mbuild conda environment

conda env create -f environment.yml conda activate mbuild

for mbuild-dev

conda env create -f environment-dev.yml conda activate mbuild-dev

install a non-editable version of mbuild

pip install . ```

NOTE: openbabel is required for some energy minimization methods in mbuild.compound.Compound(). It can be installed into your mBuild environment from conda-forge with conda install -c conda-forge openbabel; however, openbabel does not yet support python 3.13.

Install an editable version from source

Once all dependencies have been installed and the conda environment has been created, the mBuild itself can be installed.

code-block:: bash cd mbuild conda activate mbuild-dev # or mbuild depending on your installation pip install -e .

Quick Start with Docker

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

sh $ docker pull mosdef/mbuild:latest $ docker run -it --name mbuild -p 8888:8888 mosdef/mbuild:latest su anaconda -s\ /bin/sh -l -c "jupyter-notebook --no-browser --ip="0.0.0.0" --notebook-dir\ /home/anaconda/mbuild-notebooks

Alternatively, you can also start a Bourne shell directly: sh $ docker run -it --name mbuild mosdef/mbuild:latest

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

Tutorials

Interactive tutorials can be found here:

Binder

Components in dashed boxes are drawn by hand using, e.g., Avogadro or generated elsewhere. Each component is wrapped as a simple python class with user defined attachment sites, or ports. That's the "hard" part! Now mBuild can do the rest. Each component further down the hierarchy is, again, a simple python class that describes which piece should connect to which piece.

Ultimately, complex structures can be created with just a line or two of code. Additionally, this approach seamlessly exposes tunable parameters within the hierarchy so you can actually create whole families of structures simply by adjusting a variable:

```python import mbuild as mb from mbuild.examples import PMPCLayer

pattern = mb.Random2DPattern(20) # A random arrangement of 20 pieces on a 2D surface. pmpclayer = PMPCLayer(chainlength=20, pattern=pattern, tilex=3, tiley=2) ```

Zwitterionic brushes on beta-cristobalite substrate

Community Recipes

Use case-specific systems can be generated via mBuild recipes. Some users have graciously contributed recipes for particular systems, including:

Citing mBuild

If you use this package, please cite our paper. The BibTeX reference is @article{Klein2016mBuild, author = "Klein, Christoph and Sallai, János and Jones, Trevor J. and Iacovella, Christopher R. and McCabe, Clare and Cummings, Peter T.", title = "A Hierarchical, Component Based Approach to Screening Properties of Soft Matter", booktitle = "Foundations of Molecular Modeling and Simulation", series = "Molecular Modeling and Simulation: Applications and Perspectives", year = "2016", doi = "http://dx.doi.org/10.1007/978-981-10-1128-3_5" }

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 CBET-1028374 and NSF ACI-1047828. 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.

Owner

  • Name: MoSDeF - the Molecular Simulation Design Framework
  • Login: mosdef-hub
  • Kind: organization

MoSDeF builds, atom types, and parametrizes arbitrary chemical systems for molecular simulation in an engine agnostic manner.

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: >-
  "mBuild: A hierarchical, component based molecule builder."
message: "Please cite this software using these metadata and the preferred citation."
type: software
authors:
  - given-names: Christoph
    family-names: Klein
    affiliation: "Vanderbilt University"
  - given-names: "Andrew Z."
    family-names: Summers
    affiliation: "Vanderbilt University"
    orcid: 'https://orcid.org/0000-0001-8477-3059'
  - given-names: "Matthew W."
    family-names: Thompson
    affiliation: "Vanderbilt University"
    orcid: 'https://orcid.org/0000-0002-1460-3983'
  - given-names: "Justin B."
    family-names: Gilmer
    affiliation: "Vanderbilt University"
    orcid: 'https://orcid.org/0000-0002-6915-5591'
  - given-names: "Co D."
    family-names: Quach
    affiliation: "Vanderbilt University"
    orcid: 'https://orcid.org/0000-0002-1255-4161'
  - given-names: Umesh
    family-names: Timalsina
    affiliation: "Vanderbilt University"
    orcid: 'https://orcid.org/0000-0002-5430-3993'
  - given-names: Peter
    family-names: Volgyesi
    orcid: 'https://orcid.org/0000-0002-7478-4317'
    affiliation: "Vanderbilt University"
  - given-names: Janos
    family-names: Sallai
    affiliation: "Vanderbilt University"
  - given-names: "Chris R."
    family-names: Iacovella
    affiliation: "Vanderbilt University"
    orcid: 'https://orcid.org/0000-0003-0557-0427'
  - given-names: "Clare M."
    family-names: McCabe
    affiliation: "Vanderbilt University"
    orcid: 'https://orcid.org/0000-0002-8552-9135'
  - given-names: "Peter T."
    family-names: Cummings
    affiliation: "Vanderbilt University"
    orcid: 'https://orcid.org/0000-0002-9766-2216'
repository-code: 'https://github.com/mosdef-hub/mbuild'
url: 'https://mbuild.mosdef.org'
repository: 'https://github.com/mosdef-hub/mbuild'
repository-artifact: 'https://github.com/mosdef-hub/mbuild/releases'
abstract: >-
  With just a few lines of mBuild code, you can
  assemble reusable components into complex molecular
  systems for molecular simulations.

      mBuild is designed to minimize or even eliminate the need to explicitly translate and orient components when building systems: you simply tell it to connect two pieces!

      mBuild keeps track of the system’s topology so you don’t have to worry about manually defining bonds when constructing chemically bonded structures from smaller components.
keywords:
  - Python
  - Reproducibility
  - "Molecular Simulation"
  - "computational chemistry"
  - chemistry
  - 'TRUE'
  - mosdef
license: "MIT"
preferred-citation:
  type: "article"
  authors:
    - given-names: Christoph
      family-names: Klein
      affiliation: "Vanderbilt University"
    - given-names: Janos
      family-names: Sallai
      affiliation: "Vanderbilt University"
    - given-names: "Trevor J."
      family-names: Jones
      affiliation: "Vanderbilt University"
    - given-names: "Chris R."
      family-names: Iacovella
      affiliation: "Vanderbilt University"
      orcid: 'https://orcid.org/0000-0003-0557-0427'
    - given-names: "Clare"
      family-names: McCabe
      affiliation: "Vanderbilt University"
      orcid: 'https://orcid.org/0000-0002-8552-9135'
    - given-names: "Peter T."
      family-names: Cummings
      affiliation: "Vanderbilt University"
      orcid: 'https://orcid.org/0000-0002-9766-2216'
  title: "A Hierarchical, Component Based Approach to Screening Properties of Soft Matter"
  year: "2016"
  doi: "10.1007/978-981-10-1128-3_5"

GitHub Events

Total
  • Create event: 7
  • Release event: 3
  • Issues event: 19
  • Watch event: 25
  • Delete event: 1
  • Issue comment event: 86
  • Push event: 80
  • Pull request event: 75
  • Pull request review comment event: 56
  • Pull request review event: 48
  • Fork event: 2
Last Year
  • Create event: 7
  • Release event: 3
  • Issues event: 19
  • Watch event: 25
  • Delete event: 1
  • Issue comment event: 86
  • Push event: 80
  • Pull request event: 75
  • Pull request review comment event: 56
  • Pull request review event: 48
  • Fork event: 2

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 2,076
  • Total Committers: 60
  • Avg Commits per committer: 34.6
  • Development Distribution Score (DDS): 0.717
Past Year
  • Commits: 78
  • Committers: 12
  • Avg Commits per committer: 6.5
  • Development Distribution Score (DDS): 0.756
Top Committers
Name Email Commits
Christoph Klein c****n@m****m 588
Andrew Summers a****s@g****m 182
Matthew W. Thompson m****n@v****u 178
Janos Sallai j****i@v****u 175
Alex Yang a****z@v****u 91
Co Quach d****7@g****m 90
justinGilmer j****r@g****u 82
Mike Henry m****y@b****u 82
Ray A. Matsumoto r****o@v****u 57
Co Quach 4****7 53
Umesh u****a@v****u 46
Justin Gilmer j****r@v****u 46
Tim Moore t****3@g****m 46
pre-commit-ci[bot] 6****] 40
mattwthompson m****p@g****m 29
Chris Iacovella c****a@v****u 25
Ryan S. DeFever r****r@g****m 24
Jenny 3****l 23
sallai s****s@v****u 23
Trevor Jones t****s@v****u 20
Justin j****r@g****m 14
Christopher Iacovella c****i@M****l 13
Janos Sallai s****s@g****m 13
sallai j****i@g****m 12
Chris Jones 5****U 12
Travis CI s****i@J****l 11
Brad Crawford 6****8 10
Gergely Varga s****e@g****m 9
Ryan DeFever r****r@n****u 9
Parashara Shamaprasad p****a@v****u 8
and 30 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 109
  • Total pull requests: 229
  • Average time to close issues: about 1 year
  • Average time to close pull requests: about 1 month
  • Total issue authors: 33
  • Total pull request authors: 18
  • Average comments per issue: 2.16
  • Average comments per pull request: 2.39
  • Merged pull requests: 203
  • Bot issues: 0
  • Bot pull requests: 86
Past Year
  • Issues: 13
  • Pull requests: 84
  • Average time to close issues: 18 days
  • Average time to close pull requests: 5 days
  • Issue authors: 8
  • Pull request authors: 5
  • Average comments per issue: 2.54
  • Average comments per pull request: 0.85
  • Merged pull requests: 76
  • Bot issues: 0
  • Bot pull requests: 55
Top Authors
Issue Authors
  • chrisiacovella (13)
  • daico007 (13)
  • jennyfothergill (12)
  • jaclark5 (10)
  • chrisjonesBSU (9)
  • CalCraven (8)
  • bc118 (5)
  • mattwthompson (4)
  • rsdefever (3)
  • justinGilmer (3)
  • rwsmith7531 (2)
  • GregorySchwing (2)
  • chemicalfiend (2)
  • mikemhenry (2)
  • ctk3b (2)
Pull Request Authors
  • pre-commit-ci[bot] (85)
  • daico007 (42)
  • chrisjonesBSU (38)
  • CalCraven (17)
  • jaclark5 (12)
  • chrisiacovella (11)
  • umesh-timalsina (5)
  • rwsmith7531 (4)
  • justinGilmer (4)
  • mattwthompson (2)
  • joaander (2)
  • thangckt (1)
  • rmatsum836 (1)
  • RainierBarrett (1)
  • sallai (1)
Top Labels
Issue Labels
good first issue (13) feature (10) enhancement (4) bug (4) low priority (3) discussion (3) 2.0 (3) documentation (2) testing (2) wontfix (2) maintenance (2) high prioirty (1) Recipes (1)
Pull Request Labels
maintenance (12) feature (6) enhancement (5) testing (1) discussion (1) WIP (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 318 last-month
  • Total docker downloads: 100
  • Total dependent packages: 3
    (may contain duplicates)
  • Total dependent repositories: 40
    (may contain duplicates)
  • Total versions: 47
  • Total maintainers: 2
pypi.org: mbuild

mBuild: A hierarchical, component based molecule builder

  • Versions: 29
  • Dependent Packages: 0
  • Dependent Repositories: 21
  • Downloads: 318 Last month
  • Docker Downloads: 100
Rankings
Docker downloads count: 2.2%
Dependent repos count: 3.2%
Forks count: 5.0%
Stargazers count: 5.9%
Average: 7.6%
Dependent packages count: 9.8%
Downloads: 19.6%
Maintainers (2)
Last synced: 6 months ago
conda-forge.org: mbuild

With just a few lines of mBuild code, you can assemble reusable components into complex molecular systems for molecular dynamics simulations. mBuild is designed to minimize or even eliminate the need to explicitly translate and orient components when building systems: you simply tell it to connect two pieces! mBuild also keeps track of the system's topology so you don't have to worry about manually defining bonds when constructing chemically bonded structures from smaller components.

  • Versions: 18
  • Dependent Packages: 3
  • Dependent Repositories: 19
Rankings
Dependent repos count: 8.2%
Dependent packages count: 15.6%
Average: 18.9%
Forks count: 20.9%
Stargazers count: 31.0%
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yaml actions
  • actions/checkout v2 composite
  • codecov/codecov-action v2 composite
  • docker/build-push-action v2 composite
  • docker/login-action v1 composite
  • docker/setup-buildx-action v1 composite
  • mamba-org/provision-with-micromamba main composite
.github/workflows/codeql.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
Dockerfile docker
  • continuumio/miniconda3 4.10.3-alpine build
setup.py pypi
environment.yml conda
  • ele
  • gmso >=0.9.0
  • importlib_resources
  • networkx
  • numpy 1.24.2.*
  • packmol >=18
  • parmed >=3.4.3
  • python >=3.8
  • rdkit >=2021
  • scipy
  • treelib