Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lammps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
multiscale
lammps
Commits
1f1447c3
Commit
1f1447c3
authored
6 years ago
by
Axel Kohlmeyer
Browse files
Options
Downloads
Patches
Plain Diff
need to update exclusions with the new atom IDs in case of molecular systems
parent
1ed25d19
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/reset_ids.cpp
+12
-4
12 additions, 4 deletions
src/reset_ids.cpp
with
12 additions
and
4 deletions
src/reset_ids.cpp
+
12
−
4
View file @
1f1447c3
...
...
@@ -16,6 +16,7 @@
#include
"atom_vec.h"
#include
"domain.h"
#include
"comm.h"
#include
"special.h"
#include
"memory.h"
#include
"error.h"
...
...
@@ -44,7 +45,7 @@ void ResetIDs::command(int narg, char **arg)
}
// create an atom map if one doesn't exist already
int
mapflag
=
0
;
if
(
atom
->
map_style
==
0
)
{
mapflag
=
1
;
...
...
@@ -93,7 +94,7 @@ void ResetIDs::command(int narg, char **arg)
// forward_comm_array acquires new IDs for ghost atoms
double
**
newIDs
;
memory
->
create
(
newIDs
,
nall
,
1
,
"reset_ids:newIDs"
);
memory
->
create
(
newIDs
,
nall
,
1
,
"reset_ids:newIDs"
);
for
(
int
i
=
0
;
i
<
nlocal
;
i
++
)
{
newIDs
[
i
][
0
]
=
tag
[
i
];
...
...
@@ -105,7 +106,7 @@ void ResetIDs::command(int narg, char **arg)
// loop over bonds, angles, etc and reset IDs in stored topology arrays
// only necessary for molecular = 1, not molecular = 2
// badcount = atom IDs that could not be found
int
badcount
=
0
;
if
(
atom
->
molecular
==
1
)
{
...
...
@@ -232,8 +233,15 @@ void ResetIDs::command(int narg, char **arg)
atom
->
map_init
();
atom
->
map_set
();
// need to update exclusions with new atom IDs
if
(
atom
->
molecular
==
1
)
{
Special
special
(
lmp
);
special
.
build
();
}
// delete temporary atom map
if
(
mapflag
)
{
atom
->
map_delete
();
atom
->
map_style
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment