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

support mapping to ghost type #2732

Merged
merged 4 commits into from
Aug 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions source/lmp/pair_deepmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1146,13 +1146,19 @@ void PairDeepMD::coeff(int narg, char **arg) {
while (iarg < narg) {
std::string type_name = arg[iarg];
bool found_element = false;
for (int ii = 0; ii < type_map.size(); ++ii) {
if (type_map[ii] == type_name) {
type_idx_map.push_back(ii);
found_element = true;
break;
if ("-" == type_name) {
type_index_map.push_back(type_map.size()); // ghost type
found_element = true;
} else {
for (int ii = 0; ii < type_map.size(); ++ii) {
if (type_map[ii] == type_name) {
type_idx_map.push_back(ii);
found_element = true;
break;
}
}
}

if (!found_element) {
error->all(FLERR, "pair_coeff: element " + type_name +
" not found in the model");
Expand Down