Git Product home page Git Product logo

potentials's Introduction

potentials

Introduction

The potentials package provides a Python-based interface to the content hosted on the NIST Interatomic Potentials Repository. The package directly interacts with the underlying database hosted at https://potentials.nist.gov/ allowing for the metadata for all hosted interatomic potentials to be searched and explored.

This package is integrated into atomman and iprPy, which both extend the database interactions provided here. For example, atomman adds the ability to interact with atomic structure records in the NIST database, and iprPy further adds the ability to interact with property calculation results. See the documentation for those packages if you are interested in exploring more than just interatomic potential information.

Installation

The potentials package can easily be installed using pip or conda-forge

pip install potentials
or
conda install -c conda-forge potentials

Documentation

The documentation for the potentials package consists of Jupyter Notebooks contained in the doc directory. These describe the different components of the package and provide working examples.

Basic Search Tools

  • 0. Search Potential Entries.ipynb colab logo provides a user-friendly interface for searching and exploring the known interatomic potentials.
  • 0. Search LAMMPS Potentials.ipynb colab logo provides a user-friendly interface for searching and exploring the known LAMMPS interatomic potentials. Parameter files can be downloaded, and the associated LAMMPS command lines shown.

In-depth Documentation

More in-depth documentation can be found in the doc subfolder. The Notebooks located there provide information as to the design of the potentials package, how to change default settings, and options that are specific to the supported record styles.

Scripts

The scripts subfolder contains additional Notebooks that relate to managing the NIST database using the potentials package. These are provided as examples of using the potentials package for various tasks to help more advanced users get started. WARNING: The Notebooks in scripts are working documents and are not guaranteed to have 100% current code or data, and may have poor descriptions.

potentials's People

Contributors

lmhale99 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

potentials's Issues

Beta version of potentials 0.3.0

This thread was created for those interested in the upcoming major changes to the potentials package. While I attempted to keep much of the package's behavior consistent, a substantial amount of the code was reworked meaning that downstream code will likely have to be updated.

If you want to test the new version, I suggest downloading the code from the v0.3 branch and using it in a separate environment as atomman and iprPy will not work yet with these changes.

List of new features:

  1. The potentials.Database class still allows for simultaneous queries to both the local and remote. However, the underlying operations treat the interactions with local and remote separately. Because of this, queries can now be optimized for the specific database locations and the need to "load" records to interact with both is made redundant and obsolete. The design also makes it possible that future updates can allow for the "local" to be a locally-hosted MongoDB instead of simply a static file directory.
  2. This new design also makes it possible for atomman and iprPy to eventually share the same core design for interacting with database records.
  3. There's now a csv-based cache for the local records that should speed up local queries.
  4. OpenKIM models are treated more organically in that LAMMPS potential listings are only generated based on whichever kim models are installed/available on your computing resources. The available kim models can be provided either as a list or by giving the location of the kim-api-collections-management to use.
  5. The LAMMPS potential records now contain related citation DOIs and the URLs for the associated parameter files. This allows for informative print statements to be generated in the LAMMPS output, and for the parameter files to be downloaded without requiring that the potentials records also be queried.
  6. When getting single records, if a match is found in local it is returned without checking remote to avoid needless web requests.
  7. A pot_dir_style option has been added for the native LAMMPS potentials that allows for three different automatic options associated with where the parameter files are expected to be found when LAMMPS is run, and where the parameter files will be downloaded to.
  8. The download functions now allow for a subset of records to be downloaded. These use the same built-in query parameters as the get methods of the associated record style.
  9. XSL transformation files to HTML are now in the package allowing for the generated HTML content to (eventually) be identical to the content on the IPR website.
  10. XSD schema files are now in the package allowing for validation of records before uploading.
  11. Stability improvements based on comments in lmhale99/atomman#19

Known code-breaking changes:

  1. There no longer are "load" operations. Instead, the plural "get" methods allow for a corresponding pandas.DataFrame to be returned along with the record objects for further parsing.
  2. Database options, like localpath, cannot be changed now during the get method calls. These values have to be set beforehand, either as default settings or when the database is initialized.
  3. The default format for records in the local location should now be JSON with an indentation of 4 spaces. Saving of citations as bibtex has been removed to simplify things. Note that the saved records contain the associated bibtex as a string element that can be easily extracted.
  4. The new KIM records are not compatible with the older potentials package versions.
  5. get_citation() has been made more in line with the get methods of the other styles. The old get_citation behavior of checking crossref for missing entries is now handled with "fetch_citation".

Known issues, planned improvements, etc:

  1. Debug and testing not complete. No guarantee that everything works yet. Only the get and download methods have been moderately tested so far.
  2. The built-in queries are not fully defined. Some query terms don't work and others have issues. For example, queries based on year don't work for both int and str values.
  3. There's a chance that if you load a record and then save it the resulting file contents may differ from the original.
  4. Updated documentation is incomplete.
  5. The atomman package needs to be updated based on these changes. This includes updating the exploration of crystal prototypes and relaxed crystal records, and adapting to the new handling of LAMMPS and KIM potentials.

I'm still working on updates and will try to push changes fairly frequently to the v0.3 branch. Feel free to mention any package wants or needs, or if you find any other issues with the new version that are not detailed above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.