{"id":32178486,"url":"https://github.com/mosdef-hub/foyer","last_synced_at":"2025-10-21T20:56:34.449Z","repository":{"id":30523368,"uuid":"34077879","full_name":"mosdef-hub/foyer","owner":"mosdef-hub","description":"A package for atom-typing as well as applying and disseminating forcefields","archived":false,"fork":false,"pushed_at":"2025-10-21T12:40:33.000Z","size":33232,"stargazers_count":135,"open_issues_count":62,"forks_count":76,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-10-21T20:56:12.262Z","etag":null,"topics":["atom-typing","disseminating-forcefields","force-field","foyer","molecular-dynamics","molecular-simulation","python"],"latest_commit_sha":null,"homepage":"https://foyer.mosdef.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mosdef-hub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.rst","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-04-16T20:07:45.000Z","updated_at":"2025-10-21T12:40:37.000Z","dependencies_parsed_at":"2023-12-04T05:26:48.832Z","dependency_job_id":"80e145a9-2ecf-4a1e-b3c3-bb782ba1a900","html_url":"https://github.com/mosdef-hub/foyer","commit_stats":{"total_commits":681,"total_committers":47,"mean_commits":14.48936170212766,"dds":0.7665198237885462,"last_synced_commit":"14aa3d34b92085a91a321f8e85cf22fd05f8e044"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/mosdef-hub/foyer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosdef-hub%2Ffoyer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosdef-hub%2Ffoyer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosdef-hub%2Ffoyer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosdef-hub%2Ffoyer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mosdef-hub","download_url":"https://codeload.github.com/mosdef-hub/foyer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mosdef-hub%2Ffoyer/sbom","scorecard":{"id":415086,"data":{"date":"2025-08-11","repo":{"name":"github.com/mosdef-hub/foyer","commit":"a4f1e0da1404419c49fca098da044b92befc7ca6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.2,"checks":[{"name":"Code-Review","score":4,"reason":"Found 2/5 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:16","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:17","Warn: no topLevel permission defined: .github/workflows/CI.yaml:1","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.rst:0","Info: FSF or OSI recognized license: MIT License: LICENSE.rst:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:121: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:124: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:144: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yaml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yaml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yaml:89: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/CI.yaml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/CI.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/codeql.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/codeql.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/codeql.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/mosdef-hub/foyer/codeql.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: pipCommand not pinned by hash: Dockerfile:19-34","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/CI.yaml:113"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (28) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T23:37:17.625Z","repository_id":30523368,"created_at":"2025-08-18T23:37:17.625Z","updated_at":"2025-08-18T23:37:17.625Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280333501,"owners_count":26312845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atom-typing","disseminating-forcefields","force-field","foyer","molecular-dynamics","molecular-simulation","python"],"created_at":"2025-10-21T20:56:32.488Z","updated_at":"2025-10-21T20:56:34.441Z","avatar_url":"https://github.com/mosdef-hub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Foyer: A package for atom-typing as well as applying and disseminating forcefields\n\n[![Gitter chat](https://badges.gitter.im/mosdef-hub/gitter.svg)](https://gitter.im/mosdef-hub/Lobby)\n[![CI](https://github.com/mosdef-hub/foyer/actions/workflows/CI.yaml/badge.svg)](https://github.com/mosdef-hub/foyer/actions/workflows/CI.yaml)\n[![Anaconda Badge](https://anaconda.org/conda-forge/foyer/badges/version.svg)](https://anaconda.org/conda-forge/foyer)\n[![codecov](https://codecov.io/gh/mosdef-hub/foyer/branch/master/graph/badge.svg)](https://codecov.io/gh/mosdef-hub/foyer)\n[![DOI](https://zenodo.org/badge/34077879.svg)](https://zenodo.org/badge/latestdoi/34077879)\n\n\n## Overview\nFoyer is an open-source Python tool for defining and applying force field atom-typing\nrules in a format that is both human- and machine-readable.  It parametrizes chemical topologies,\ngenerating, syntactically correct input files for various simulation engines. Foyer provides a framework for force field\ndissemination, helping to eliminate ambiguity in atom-typing and improving reproducibility\n(for more information, see [our paper](https://www.sciencedirect.com/science/article/pii/S0927025619303040) or its corresponding [pre-print](https://arxiv.org/pdf/1812.06779.pdf)).\n\n_About the name:_ foyer was inspired by the [antechamber](http://ambermd.org/antechamber/ac.html) tool in the [Amber](https://ambermd.org/) ecosystem. Foyer plays a similar role to antechamber, hence the tongue-in-cheek, shared vestibular reference.\n\n#### Foyer within the MoSDeF Ecosystem\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/mosdef_foyer.svg?raw=true\" alt=\"Foyer within the MoSDeF Ecosystem\" width=\"500\" height=\"500\"/\u003e\n\u003c/p\u003e\n\nFoyer defines force fields in an XML format, where SMARTS strings are used to define the chemical context\nof a particular atom type and “overrides” are used to set rule precedence, rather than a rigid hierarchical scheme.\nFoyer builds upon the [OpenMM .xml force field](http://docs.openmm.org/7.0.0/userguide/application.html#creating-force-fields)\nfile, annotated with SMARTS-based atomtypes, e.g.:\n\n```xml\n\u003cForceField\u003e\n \u003cAtomTypes\u003e\n  \u003cType name=\"opls_135\" class=\"CT\" element=\"C\" mass=\"12.01100\" def=\"[C;X4](C)(H)(H)H\" desc=\"alkane CH3\"/\u003e\n  \u003cType name=\"opls_140\" class=\"HC\" element=\"H\" mass=\"1.00800\"  def=\"H[C;X4]\" desc=\"alkane H\"/\u003e\n \u003c/AtomTypes\u003e\n\u003c/ForceField\u003e\n```\n\nFoyer can apply the forcefield to arbitrary chemical topologies. We currently support:\n\n* [OpenMM.Topology](https://github.com/openmm/openmm/blob/7.6.0/wrappers/python/openmm/app/topology.py#L70)\n* [ParmEd.Structure](http://parmed.github.io/ParmEd/html/structure.html)\n* [mBuild.Compound](http://mosdef-hub.github.io/mbuild/data_structures.html)\n* [gmso.Topology](https://gmso.mosdef.org/en/stable/data_structures.html#gmso.Topology)\n* [openff.toolkit.topology.Topology](https://open-forcefield-toolkit.readthedocs.io/en/0.9.2/api/generated/openff.toolkit.topology.Topology.html#openff-toolkit-topology-topology)\n\nApplication of a force field can be as simple as:\n```python\nfrom foyer import Forcefield\nimport parmed as pmd\n\nuntyped_ethane = pmd.load_file('ethane.mol2', structure=True)\noplsaa = Forcefield(forcefield_files='oplsaa.xml')\nethane = oplsaa.apply(untyped_ethane)\n\n# Save to any format supported by ParmEd\nethane.save('ethane.top')\nethane.save('ethane.gro')\n```\n\nThe `Foyer` package is part of the [Molecular Simulation Design Framework (MoSDeF) project](http://mosdef.org/).\nLibraries in the MoSDeF ecosystem are designed to provide utilities necessary to streamline\na researcher's simulation workflow. When setting up simulation studies,\nwe also recommend users to follow the [TRUE](https://www.tandfonline.com/doi/full/10.1080/00268976.2020.1742938)\n(Transparent, Reproducible, Usable-by-others, and Extensible) standard, which is a set of common\npractices meant to improve the reproducibility of computational simulation research.\n\n## Getting started\n\n#### Quick Start with Docker\nTo use `foyer` in a jupyter-notebook that runs from a docker container with all the dependencies installed use the following command:\n\n```sh\n$ docker pull mosdef/foyer:latest\n$ docker run -it --name foyer -p 8888:8888 mosdef/foyer:latest\\\n  /opt/conda/envs/foyer-docker/bin/jupyter notebook --ip=\"*\"\n```\n\nAlternatively, you can also start a Bourne shell directly:\n```sh\n$ docker run -it --name foyer mosdef/foyer:latest\n```\n\nTo learn more about using `foyer` with docker, please refer to the documentation [here](https://foyer.mosdef.org/en/latest/docker.html) .\n\n\n#### Getting started with SMARTS-based atom-typing\n* [SMARTS-based atomtyping](docs/source/topic_guides/smarts.rst)\n* [Supported SMARTS Grammar](https://github.com/mosdef-hub/foyer/issues/63)\n\n#### Defining force fields:\n* [Defining force field parameters](docs/source/topic_guides/parameter_definitions.rst)\n* [Force field file validation](docs/source/reference/validation.rst)\n\n\n#### Example foyer force field files:\nFoyer currently includes a subset of the OPLS AA and TraPPE forcefields, currently part of the source distribution:\n* https://github.com/mosdef-hub/foyer/tree/master/foyer/forcefields\n\nAdditional example force field XML files:\n* https://github.com/chrisiacovella/OPLSaa_perfluoroalkanes\n* https://github.com/mosdef-hub/forcefield_perfluoroethers\n* https://github.com/summeraz/OPLSaa_alkylsilanes\n\nExample template for disseminating force fields:\n* https://github.com/mosdef-hub/forcefield_template\n\n\n#### Using Foyer to perform atom typing:\n* [Basic usage examples](docs/source/topic_guides/usage_examples.rst)\n* [Detailed Jupyter notebook tutorials, including integration with mBuild](https://github.com/mosdef-hub/foyer_tutorials)\n* [Jupyter notebook tutorials](https://github.com/mosdef-hub/foyer_tutorials/tree/master), from [our paper](https://arxiv.org/abs/1812.06779)\n\n### Documentation:\n* Documentation website: http://foyer.mosdef.org\n\n### Installation instructions\n* [Installation instructions](docs/source/getting_started/install.rst)\n\n### Citing Foyer:\n* If you use this package, please cite [our paper](https://www.sciencedirect.com/science/article/pii/S0927025619303040) published in [Computational Materials Science](https://www.journals.elsevier.com/computational-materials-science).\n* This manuscript is also available in its pre-print form on [arxiv](https://arxiv.org/pdf/1812.06779.pdf)\n* The paper and examples in this work were developed for tag [paper_COMMAT_2019](https://github.com/mosdef-hub/foyer/tree/paper_COMMAT_2019)\n\n\n* Please also cite the github repository, https://github.com/mosdef-hub/foyer\n\n#### [![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n\nVarious sub-portions of this library may be independently distributed under\ndifferent licenses. See those files for their specific terms.\n\nThis 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosdef-hub%2Ffoyer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmosdef-hub%2Ffoyer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmosdef-hub%2Ffoyer/lists"}