Skip to content
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

Feature parameterupdate #1745

Merged
merged 9 commits into from Nov 6, 2019
Merged

Feature parameterupdate #1745

merged 9 commits into from Nov 6, 2019

Conversation

@yafshar
Copy link
Contributor

yafshar commented Oct 27, 2019

Summary

  • New feature(s):
    New capabilities for accessing KIM portable model parameters.
    New capabilities for updating KIM portable model parameters.

  • Enhancement(s):
    Printing the mutable parameters of the KIM portable models.
    Updating the kim_query default behavior and adding the list setting.
    Adding the documentation for the new kim_param command and the whole document is checked and partly rewritten for clarity and errors are corrected

Author(s)

Yaser Afshar,
Ryan S. Elliott,
Ellad B. Tadmor,
Daniel S. Karls
Aerospace Engineering & Mechanics, University of Minnesota

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

No known issues.

Implementation Notes

Provide any relevant details about how the changes are implemented, how correctness was verified, how other features - if any - in LAMMPS are affected

Post Submission Checklist

Please check the fields below as they are completed after the pull request has been submitted. Delete lines that don't apply

  • 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
  • A package specific README file has been included or updated
  • One or more example input decks are included

Further Information, Files, and Links

Put any additional information here, attach relevant text or image files, and URLs to external sites (e.g. DOIs or webpages)

@ellio167

This comment has been minimized.

Copy link
Collaborator

ellio167 commented Oct 28, 2019

@yafshar It looks like the build-docs-pr check failed due to a "spelling error" of the word "Zm" You'll probably want to add this to doc/utils/sphinx-config/false_positives.txt

Copy link
Member

akohlmey left a comment

We try to reduce class members to the minimum. Please see the comments in the source code.

src/KIM/kim_init.h Outdated Show resolved Hide resolved
src/KIM/pair_kim.h Show resolved Hide resolved
src/KIM/pair_kim.h Show resolved Hide resolved
@yafshar yafshar force-pushed the yafshar:feature_parameterupdate branch from d086e5b to cb8744b Oct 29, 2019
@yafshar yafshar requested a review from rbberger as a code owner Oct 29, 2019
@yafshar

This comment has been minimized.

Copy link
Contributor Author

yafshar commented Oct 29, 2019

@ellio167 I added the Zm to the doc/utils/sphinx-config/false_positives.txt to prevent the check failure due to the spelling error.

Calling 'kim_init' would report the mutable parameters
of KIM portable models (PM) including parameter's name,
data type, and extent.
@yafshar yafshar force-pushed the yafshar:feature_parameterupdate branch from cb8744b to 9dd669b Oct 29, 2019
yafshar added 4 commits Oct 29, 2019
1. Add new capabilities within LAMMPS for setting parameters of
the KIM portable models (PM). The current implementation extends
the 'pair_coeff' command to modify the PM parameters.
A series of additional parameters after the species list is the
input to the modified command. Each set of the other setting
is parameter name, range of array indices, and corresponding
parameter values.

2. Add two getters to the PairKIM class to get the KIM_Model object,
and the atom type list outside the 'pair_kim' command for ease of
use and extension ability of a new 'kim_param' command.
Adding the 'list' setting of {formatarg} (default behavior or if
{formatarg} is not specified), the result is returned as a
space-separated list of values in {variable}.
New documnetation is added and the whole document is checked
and partly rewritten for clarity and errors are corrected

Adding the word "Zm" to prevent the spelling error in document
building check.
Add an ability within LAMMPS for getting/setting KIM
portable models (PM) parameters. The assumption is that
the model is already known (through 'kim_init') when
calling the new command.

'kim_param get' gets the value of PM parameters, where
the command input includes:
parameter name, & location, or indices range, and the
variable(s) name / variable name + split / list /explicit
to return the value(s).

'kim_param get paramname index_range varname [s|split|list|explicit]'

'kim_param set' sets the value(s) of PM parameters, where
the command input includes:
parameter name, & location, or indices range, and the
corresponding variable(s) value(s).

'kim_param set paramname index_range value(s)'

NOTE: The varable_name is the name of the lammps variable in the
lammps input script and can be used in other locations in the
script.
@yafshar yafshar force-pushed the yafshar:feature_parameterupdate branch from 9dd669b to 63cce39 Oct 29, 2019
@akohlmey akohlmey requested review from athomps and sjplimp Nov 5, 2019
@athomps
athomps approved these changes Nov 5, 2019
Copy link
Contributor

athomps left a comment

I approve

@sjplimp
sjplimp approved these changes Nov 6, 2019
akohlmey added 3 commits Nov 6, 2019
… only
@akohlmey

This comment has been minimized.

Copy link
Member

akohlmey commented Nov 6, 2019

@yafshar we need a few maintenance updates to your pull request before it can be merged. Please see the pull request to this branch, that I just submitted to your fork of the LAMMPS project. This updates your branch to the latest changes in "master" and also has the necessary updates for building the manual from .rst files. If you want to simplify this process in the future, you can allow project maintainer to push directly into your branch (there is a little checkbox for that when you create or view the pull request, which is set to allow by default).

Documentation update for your LAMMPS pull request
@akohlmey akohlmey merged commit cf0eac6 into lammps:master Nov 6, 2019
8 checks passed
8 checks passed
lammps/pull-requests/build-docs-pr head run ended
Details
lammps/pull-requests/cmake/cmake-kokkos-cuda-pr head run ended
Details
lammps/pull-requests/cmake/cmake-kokkos-omp-pr head run ended
Details
lammps/pull-requests/cmake/cmake-serial-pr head run ended
Details
lammps/pull-requests/kokkos-omp-pr head run ended
Details
lammps/pull-requests/openmpi-pr head run ended
Details
lammps/pull-requests/serial-pr head run ended
Details
lammps/pull-requests/shlib-pr head run ended
Details
@yafshar yafshar deleted the yafshar:feature_parameterupdate branch Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.