Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 commits
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
2 changes: 1 addition & 1 deletion source/lmp/fix_dplr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ FixDPLR::FixDPLR(LAMMPS* lmp, int narg, char** arg)
}
}
if (!found_element && "NULL" == type_name) {
type_idx_map.push_back(type_map.size()); // ghost type
type_idx_map.push_back(-1); // ghost type
Comment thread
link89 marked this conversation as resolved.
Outdated
found_element = true;
}
if (!found_element) {
Expand Down
2 changes: 1 addition & 1 deletion source/lmp/pair_deepmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ void PairDeepMD::coeff(int narg, char** arg) {
}
}
if (!found_element && "NULL" == type_name) {
type_idx_map.push_back(type_map.size()); // ghost type
type_idx_map.push_back(-1); // ghost type
Comment thread
link89 marked this conversation as resolved.
Outdated
Comment thread
link89 marked this conversation as resolved.
Outdated
found_element = true;
}
if (!found_element) {
Expand Down
2 changes: 1 addition & 1 deletion source/lmp/pair_deepspin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ void PairDeepSpin::coeff(int narg, char** arg) {
}
}
if (!found_element && "NULL" == type_name) {
type_idx_map.push_back(type_map.size()); // ghost type
type_idx_map.push_back(-1); // ghost type
Comment thread
link89 marked this conversation as resolved.
Outdated
found_element = true;
}
if (!found_element) {
Expand Down
6 changes: 6 additions & 0 deletions source/lmp/tests/test_lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,12 @@ def test_pair_deepmd_type_map(lammps_type_map) -> None:
lammps_type_map.run(1)


def test_pair_deepmd_type_map_with_null(lammps_type_map) -> None:
lammps_type_map.pair_style(f"deepmd {pb_file.resolve()}")
lammps_type_map.pair_coeff("* * H NULL")
lammps_type_map.run(0)


def test_pair_deepmd_real(lammps_real) -> None:
lammps_real.pair_style(f"deepmd {pb_file.resolve()}")
lammps_real.pair_coeff("* *")
Expand Down
6 changes: 6 additions & 0 deletions source/lmp/tests/test_lammps_dpa_pt.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ def test_pair_deepmd_type_map(lammps_type_map) -> None:
lammps_type_map.run(1)


def test_pair_deepmd_type_map_with_null(lammps_type_map) -> None:
lammps_type_map.pair_style(f"deepmd {pb_file.resolve()}")
lammps_type_map.pair_coeff("* * H O NULL")
lammps_type_map.run(0)
Comment thread
link89 marked this conversation as resolved.
Comment thread
link89 marked this conversation as resolved.


def test_pair_deepmd_real(lammps_real) -> None:
Comment thread
link89 marked this conversation as resolved.
lammps_real.pair_style(f"deepmd {pb_file.resolve()}")
lammps_real.pair_coeff("* *")
Expand Down