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

[BUG] Two issues with pair_style extep #1493

Closed
mkanski opened this issue Jun 5, 2019 · 2 comments · Fixed by #1494
Closed

[BUG] Two issues with pair_style extep #1493

mkanski opened this issue Jun 5, 2019 · 2 comments · Fixed by #1494
Assignees
Labels

Comments

@mkanski
Copy link
Collaborator

mkanski commented Jun 5, 2019

Summary

I found two issues with pair_style extep:

  1. It requires that all elements from the potential file are used in pair_coeff.
  2. It does not work when NULL is used in pair_coeff.

LAMMPS Version and Platform

Current master, Linux

Expected Behavior

  1. It should be possible to use line like pair_coeff B.
  2. When using extep with pair_style hybrid line like pair_coeff * * BN.extep B N NULL should be accepted.

Actual Behavior

  1. LAMMPS quits with an error: "ERROR: Incorrect format in ExTeP potential file (../pair_extep.cpp:752)"
  2. LAMMPS quits with an error: "ERROR: Insufficient spline parameters in potential file (../pair_extep.cpp:644)"

Steps to Reproduce

First:
region u sphere 0 0 0 10
create_box 1 u
pair_style extep
pair_coeff * * BN.extep N

Second:
region u sphere 0 0 0 10
create_box 3 u
pair_style hybrid/overlay extep lj/cut 4.0
pair_coeff * * extep BN.extep N B NULL

Further Information, Files, and Links

I'm not sure what is the cause for the first problem, but the second issue can be resolved by changing atom->ntypes to nelements in line:

if (nparams >= pow(atom->ntypes,3)) break;

EDIT: The change fixes problem only if NULL is the last atom type(s), so it isn't a whole solution.

@mkanski mkanski added the bug label Jun 5, 2019
@akohlmey akohlmey self-assigned this Jun 5, 2019
@akohlmey akohlmey added this to the Stable Release Summer 2019 milestone Jun 5, 2019
@akohlmey
Copy link
Member

akohlmey commented Jun 5, 2019

Am looking into it. There are several places where edits are needed for systems with only one element or for use with pair style hybrid.

@mkanski
Copy link
Collaborator Author

mkanski commented Jun 5, 2019

I think I solved it, please see the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants