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
1a213363
Commit
1a213363
authored
7 years ago
by
Axel Kohlmeyer
Browse files
Options
Downloads
Patches
Plain Diff
add group style to create an empty group directly
parent
63714c70
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/src/group.txt
+7
-1
7 additions, 1 deletion
doc/src/group.txt
src/group.cpp
+6
-0
6 additions, 0 deletions
src/group.cpp
with
13 additions
and
1 deletion
doc/src/group.txt
+
7
−
1
View file @
1a213363
...
...
@@ -13,11 +13,13 @@ group command :h3
group ID style args :pre
ID = user-defined name of the group :ulb,l
style = {delete} or {region} or {type} or {id} or {molecule} or {variable} or \
style = {delete} or {clear} or {empty} or {region} or \
{type} or {id} or {molecule} or {variable} or \
{include} or {subtract} or {union} or {intersect} or \
{dynamic} or {static} :l
{delete} = no args
{clear} = no args
{empty} = no args
{region} args = region-ID
{type} or {id} or {molecule}
args = list of one or more atom types, atom IDs, or molecule IDs
...
...
@@ -99,6 +101,10 @@ e.g. using the "run every"_run.html command if a fix or compute or
other operation expects the atoms in the group to remain constant, but
LAMMPS does not check for this.
The {empty} style creates an empty group, which is useful for commands
like "fix gcmc"_fix_gcmc.html or with complex scripts that add atoms
to a group.
The {region} style puts all atoms in the region volume into the group.
Note that this is a static one-time assignment. The atoms remain
assigned (or not assigned) to the group even in they later move out of
...
...
This diff is collapsed.
Click to expand it.
src/group.cpp
+
6
−
0
View file @
1a213363
...
...
@@ -188,6 +188,12 @@ void Group::assign(int narg, char **arg)
if
(
domain
->
regions
[
iregion
]
->
match
(
x
[
i
][
0
],
x
[
i
][
1
],
x
[
i
][
2
]))
mask
[
i
]
|=
bit
;
// create an empty group
}
else
if
(
strcmp
(
arg
[
1
],
"empty"
)
==
0
)
{
;
// nothing to do here
// style = type, molecule, id
// add to group if atom matches type/molecule/id or condition
...
...
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