Skip to content

refactor extra/*/types keywords as max values #4474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

jrgissing
Copy link
Collaborator

@jrgissing jrgissing commented Feb 17, 2025

Summary

Currently, extra/atom/types, extra/bond/types, etc. keywords must match the exact number of types that will be added before the first run.

This refactor will make these keywords behave more like the extra/*/per/atom keywords, where arguments are simply max storage values.

This initial commit is meant to provide proof of concept and start conversation.

This PR will effectively enable adding new interactions on the fly, with applications in data-driven MD simulations.

Demo/Example:
refactor_extra-types_example.zip
Previous behavior: Error thrown because extra/atom/types keywords is very high
New behavior: Extra/atom/types is max storage, atom->ntypes calculated as actual types are added

TODO:

  • Quick concept demo for lj/class2/coul/long
  • More comprehensive support for atom types
  • Support for bond types, angle types, etc.
  • Test support for restart, hybrid styles, adding types in script

Related Issue(s)

Regression testing.

Author(s)

Jake

Licensing

By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Backward Compatibility

Yes

Implementation Notes

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system
  • Suitable tests have been added to the unittest tree.
  • A package specific README file has been included or updated
  • One or more example input decks are included

Further Information, Files, and Links

@jrgissing jrgissing marked this pull request as draft February 17, 2025 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy