Scientific communities struggle with the challenge of effectively and efficiently sharing content and data. An online portal provides a valuable space for scientific communities to discuss challenges and collate scientific results. Examples of such portals include the Micromagnetic Modeling Group (μMAG) , the Interatomic Potentials Repository (IPR) [2, 3] and on a larger scale the NIH Genetic Sequence Database (GenBank) . In this work, we present a description of a generic web portal that leverages existing online services to provide a framework that may be adopted by other small scientific communities. The first deployment of the PFHub framework supports phase-field practitioners and code developers participating in an effort to improve quality assurance for phase-field codes.
Funding statement: D.W. wishes to acknowledge the Materials Genome Initiative funding allocated to the National Institute of Standards and Technology. S.J.D wishes to acknowledge funding from the U.S. Department of Energy, Office of Basic Energy Sciences, Division of Materials Sciences and Engineering under Award #DE-SC0008637 as part of the Center for PRedictive Integrated Structural Materials Science (PRISMS Center) at University of Michigan. P.W.V. is grateful for the financial assistance under the award 70NANB14H012 from the National Institute of Standards and Technology as part of the Center for Hierarchical Materials Design (CHiMaD).
Generally, small scientific communities do not have the resources to build and host dedicated web infrastructure to support their varied content and data requirements. In particular, hosting and supporting a complex content management system (CMS) including web servers, web frameworks and databases requires a great deal of configuration and long term support and funding. Furthermore, a turnkey CMS solution may not meet requirements for most scientific communities that often use arcane data formats and require custom data displays along with client-side automation. The PFHub effort, instead of focusing on the CMS tool, focuses on customizing and delivering the client-side requirements whilst delegating back-end functionality to external services that provide dependable APIs .
The phase-field method (PFM) describes material interfaces at the mesoscopic scale between atomic scale models and macroscale models . The PFM is well established and there are an assortment of code frameworks (e.g., FiPy , MMSP , MOOSE , PRISMS-PF ) available for solving the wide variety of phenomena associated with phase-field (e.g. dendritic growth, spinodal decomposition, grain growth) . However, it is difficult for novice as well as seasoned phase-field practitioners to asses the capability of codes for different phenomena without extensive prototyping and groundwork. PFHub aims to provide a low barrier for comparing code output data using a standard set of metrics.
PFHub is a community effort spearheaded by the Center for Hierarchical Materials Design at Northwestern University and the National Institute of Standards and Technology in support of phase-field code development. The current PFHub deployment  focuses on improving cross-collaboration between phase-field code developers and practitioners by providing a standardized set of benchmark problems [13, 14] and a workflow for uploading and comparing benchmark results from different phase-field codes.
Community based scientific efforts often require web services to share and display data in unique ways between groups and institutions. These services are difficult to implement due to the groundwork required to investigate and prototype the many data-sharing and CMS tools available. The PFHub framework provides a template for other scientific projects beyond the phase-field community. The method outlined in this paper of using static infrastructure coupled with small independent third party web services provides a flexible approach eliminating the initial prototyping and on-going maintenance required for new infrastructure, while allowing developers to focus on their unique front-end data views.
This paper presents the first deployment of the PFHub framework including its client-side focused design, how it employs external services and metadata about the code base. The paper describes the relative ease with which other scientific groups might adapt the framework for their own purposes and deploy using the fully reproducible Nix environment .
The PFHub framework provides a template for other small scientific communities to host custom content and integrate data from members of their community. The current deployment (see Figure 1) provides a facility for uploading, displaying and comparing results from benchmark problems supporting phase-field code developers and practitioners. However, the framework and overall philosophy are broadly transferable to other communities with some custom configuration and content generation. The framework uses the Jekyll static website generator  along with automated front-end processing to eliminate the need for a CMS , which is generally costly to maintain especially for small scientific communities with limited funding and staffing. The framework relies on the API, WebSocket and webhook infrastructure that underpins the modern web and allows external services to have full-duplex communication between servers and browsers. In particular, PFHub relies on GitHub’s well maintained API and webhook functionality for external services (such as Travis CI  and Staticman ).
The workflow for uploading benchmark results relies on third party tools using the following steps, illustrated in Figure 2.
The current deployment of PFHub has benchmark specifications consisting of equations, narrative, plots and code samples, and are composed in Jupyter Notebooks. The Jupyter Notebooks are included as static objects in the website after translation into HTML using the nbconvert tool . There are currently 7 benchmark problems each with a number of variations. At the time of writing there are 109 separate benchmark result uploads  submitted as pull requests and approved following code review to ensure compatibility with the website.
The combination of a central repository on GitHub for website source code and metadata with distributed data records on third-party archives avoids the complexity and administrative overhead of maintaining a live database and associated back-end application.
The framework has a fully automated test recipe deployed on Travis CI with an environment built using the Nix Package Manager . A fully automated test environment using continuous integration allows all developers and users to have common feedback on code updates and determine the compatibility of result uploads with the deployed website. The environment is pinned to a specific version of the Nix Packages Collection (Nixpkgs) , ensuring fully reproducible build and test phases as well as ensuring that the development and automated testing environments are identical. The full test recipe is outlined in a YAML file, .travis.yml, stored in the repository  and consists of the following steps.
The PFHub framework can be deployed on any platform supporting Nix, which includes all contemporary Linux and macOS platforms. Since the framework is built with Jekyll and automated front-end processing, it can be deployed on GitHub’s Pages infrastructure, which enables streamlined deployment without the need for any back-end infrastructure and, thus, is largely platform independent. For development purposes, a local installation of either Nix (on Linux or Mac) or Docker (on Linux, Mac or Windows) is required.
PFHub is currently built and tested using the programming languages and versions outlined in Table 1.
There are no additional system requirements.
The entire environment can be built using the Nix Package Manager so the only required dependency is a functional Nix installation. The PFHub framework has over 2000 separate package dependencies using data from the Nix package manager. The full dependency graph for PFHub can be seen online .
This list is for contributors to the code base, but not those that have only uploaded output results to the website.
Also, see the contributors list on GitHub .
Licence: NIST Software License 
Publisher: Daniel Wheeler
Version published: v0.1
Date published: 13/03/19
The PFHub framework can be readily adopted by other communities that want to follow a CMS-free philosophy and use well supported external services. The website infrastructure can be cloned as a Git repository or downloaded as a ZIP archive and deployed with minimum effort. The mechanism for uploading data using Staticman can be easily configured for a new repository location. However, customizing the content of the website for a particular scientific community would require considerable effort. The current effort is closely integrated with GitHub, but future deployments could be modified to use other repository services such as GitLab or BitBucket.
The following steps are the more challenging aspects of deploying the framework for a new community.
Further details on deployment and development of PFHub can be found in the development guide . Currently, a deployment for a new community has not been attempted and, thus, the above steps need to be refined and documented.
1Certain commercial equipment, instruments, or materials (or suppliers, or software, …) are identified in this paper to foster understanding. Such identification does not imply recommendation or endorsement by the National Institute of Standards and Technology, nor does it imply that the materials or equipment identified are necessarily the best available for the purpose.
We gratefully acknowledge input and guidance from all participants in the series of Phase-Field workshops held between 2015 and 2018 at the Center for Hierarchical Material Design .
The authors have no competing interests to declare.
µMAG: The Micromagnetic Modeling Activity Group. 2019. URL: https://www.ctcms.nist.gov/~rdm/mumag.org.html (visited on 03/11/2019).
Hale, L M, Trautt, Z T and Becker, C A July 2018 “Evaluating variability with atomistic simulations: the effect of potential and calculation methodology on the modeling of lattice and elastic constants”. en. In: Modelling and Simulation in Materials Science and Engineering, 26(5): 055003. ISSN: 0965-0393, 1361–651X. DOI: https://doi.org/10.1088/1361-651X/aabc05
Becker, C A, et al. Dec. 2013 “Considerations for choosing and using force fields and interatomic potentials in materials science and engineering”. en. In: Current Opinion in Solid State and Materials Science, 17(6): 277–283. ISSN: 13590286. DOI: https://doi.org/10.1016/j.cossms.2013.10.001
GenBank: NIH genetic sequence database. URL: https://www.ncbi.nlm.nih.gov/genbank/ (visited on 03/26/2019).
Cole, D How We Build CMS-Free Websites. July 2018. URL: https://medium.com/devseed/how-we-build-cms-free-websites-d7e19d94a0ff (visited on 03/11/2019).
Moelans, N, Blanpain, B and Wollants, P 2008 “An introduction to phase-field modeling of microstructure evolution”. In: Calphad, 32(2): 268–294. ISSN: 0364-5916. DOI: https://doi.org/10.1016/j.calphad.2007.11.003
Guyer, J E, Wheeler, D and Warren, J A 2009 “FiPy: Partial Differential Equations with Python”. In: Computing in Science & Engineering, 11(3): 6–15. ISSN: 1521-9615. DOI: https://doi.org/10.1109/MCSE.2009.52
Gruber, J, et al. Mar. 2019 mesoscale/mmsp: Zenodo integration. DOI: https://doi.org/10.5281/zenodo.2583258
Tonks, M R, et al. 2012 “An object-oriented finite element framework for multiphysics phase field simulations”. In: Computational Materials Science, 51(1): 20–29. ISSN: 0927-0256. DOI: https://doi.org/10.1016/j.commatsci.2011.07.028
DeWitt, S, et al. Mar. 2019 prisms-center/phaseField: PRISMS-PF (Version 2.1.1). DOI: https://doi.org/10.5281/zenodo.2583308
Tonks, M R and Aagesen, L K 2019 “The Phase Field Method: Mesoscale Simulation Aiding Material Discovery”. In: Annual Review of Materials Research, 49(1): 79–102. DOI: https://doi.org/10.1146/annurev-matsci-070218-010151
PFHub: The Phase Field Community Hub. URL: https://pages.nist.gov/pfhub (visited on 03/27/2019).
Jokisaari, A M, et al. 2017 “Benchmark problems for numerical implementations of phase field models”. In: Computational Materials Science, 126: 139–151. ISSN: 0927-0256. DOI: https://doi.org/10.1016/j.commatsci.2016.09.022
Jokisaari, A M, et al. 2018 “Phase field benchmark problems for dendritic growth and linear elasticity”. In: Computational Materials Science, 149: 336–347. ISSN: 0927-0256. DOI: https://doi.org/10.1016/j.commatsci.2018.03.015
Nix Package Manager. URL: https://nixos.org/nix/ (visited on 03/13/2019).
Jekyll. URL: https://jekyllrb.com/ (visited on 03/14/2019).
Travis CI: Test and Deploy with Confidence. URL: https://travis-ci.org/ (visited on 03/11/2019).
Staticman: Static sites with superpowers. URL: https://staticman.net (visited on 03/11/2019).
Figshare. URL: https://figshare.com/ (visited on 03/27/2019).
Typical PFHub Data. URL: https://github.com/usnistgov/pfhub/blob/master/_data/simulations/fipy_3a/meta.yaml (visited on 08/06/2019).
Surge: Static web publishing for Front-End Developers. URL: https://surge.sh/ (visited on 03/11/2019).
Plotly Technologies Inc. Collaborative data science. 2015. URL: https://plot.ly (visited on 03/20/2019).
Kluyver, T et al. 2016 “Jupyter Notebooks – a publishing format for reproducible computational workflows”. In: Positioning and Power in Academic Publishing: Players, Agents and Agendas. Ed. by F. Loizides and B. Schmidt, 87–90. IOS Press. DOI: https://doi.org/10.3233/978-1-61499-649-1-87
Nix Packages Collection. URL: https://github.com/NixOS/nixpkgs (visited on 04/05/2019).
Travis CI Recipe for PFHub. URL: https://github.com/usnistgov/pfhub/blob/master/.travis.yml (visited on 03/13/2019).
NBVal: Py.test plugin for validating Jupyter notebooks. URL: https://github.com/computationalmodelling/nbval (visited on 03/14/2019).
Py.test. URL: https://docs.pytest.org/en/latest/ (visited on 03/14/2019).
HTML Proofer. URL: https://github.com/gjtorikian/html-proofer (visited on 03/14/2019).
CoffeeLint. URL: https://github.com/clutchski/coffeelint (visited on 08/05/2019).
Mocha. URL: https://mochajs.org/ (visited on 08/05/2019).
PFHub Dependency Graph. URL: https://github.com/usnistgov/pfhub/wiki/PFHub-Dependency-Graph (visited on 08/06/2019).
List of PFHub Contributors. URL: https://github.com/usnistgov/pfhub/graphs/contributors (visited on 03/13/2019).
NIST Software License. URL: https://www.nist.gov/director/copyright-fair-use-and-licensing-statements-srd-data-and-software (visited on 03/13/2019).
PFHub Development Guide. URL: https://pages.nist.gov/pfhub/DEVELOPMENT/ (visited on 08/06/2019).
CHiMaD Phase-Field Workshops. URL: https://pages.nist.gov/pfhub/wiki/workshops/ (visited on 03/14/2019).