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
48e42a4e
Unverified
Commit
48e42a4e
authored
7 years ago
by
Steve Plimpton
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #824 from jrgissing/write_data-noextra
Write_data nofix option
parents
6027de53
49aad1d1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/src/write_data.txt
+7
-1
7 additions, 1 deletion
doc/src/write_data.txt
src/write_data.cpp
+13
-8
13 additions, 8 deletions
src/write_data.cpp
src/write_data.h
+1
-0
1 addition, 0 deletions
src/write_data.h
with
21 additions
and
9 deletions
doc/src/write_data.txt
+
7
−
1
View file @
48e42a4e
...
@@ -16,6 +16,7 @@ file = name of data file to write out :ulb,l
...
@@ -16,6 +16,7 @@ file = name of data file to write out :ulb,l
zero or more keyword/value pairs may be appended :l
zero or more keyword/value pairs may be appended :l
keyword = {pair} or {nocoeff} :l
keyword = {pair} or {nocoeff} :l
{nocoeff} = do not write out force field info
{nocoeff} = do not write out force field info
{nofix} = do not write out extra sections read by fixes
{pair} value = {ii} or {ij}
{pair} value = {ii} or {ij}
{ii} = write one line of pair coefficient info per atom type
{ii} = write one line of pair coefficient info per atom type
{ij} = write one line of pair coefficient info per IJ atom type pair :pre
{ij} = write one line of pair coefficient info per IJ atom type pair :pre
...
@@ -83,6 +84,12 @@ be written to the data file. This can be very helpful, if one wants
...
@@ -83,6 +84,12 @@ be written to the data file. This can be very helpful, if one wants
to make significant changes to the force field or if the parameters
to make significant changes to the force field or if the parameters
are read in separately anyway, e.g. from an include file.
are read in separately anyway, e.g. from an include file.
The {nofix} keyword requests that no extra sections read by fixes
should be written to the data file (see the {fix} option of the
"read_data"_read_data.html command for details). For example, this
option excludes sections for user-created per-atom properties
from "fix property/atom"_fix_property_atom.html.
The {pair} keyword lets you specify in what format the pair
The {pair} keyword lets you specify in what format the pair
coefficient information is written into the data file. If the value
coefficient information is written into the data file. If the value
is specified as {ii}, then one line per atom type is written, to
is specified as {ii}, then one line per atom type is written, to
...
@@ -120,4 +127,3 @@ setup, atom masses initialized, etc).
...
@@ -120,4 +127,3 @@ setup, atom masses initialized, etc).
[Default:]
[Default:]
The option defaults are pair = ii.
The option defaults are pair = ii.
This diff is collapsed.
Click to expand it.
src/write_data.cpp
+
13
−
8
View file @
48e42a4e
...
@@ -74,6 +74,7 @@ void WriteData::command(int narg, char **arg)
...
@@ -74,6 +74,7 @@ void WriteData::command(int narg, char **arg)
pairflag
=
II
;
pairflag
=
II
;
coeffflag
=
1
;
coeffflag
=
1
;
fixflag
=
1
;
int
noinit
=
0
;
int
noinit
=
0
;
int
iarg
=
1
;
int
iarg
=
1
;
...
@@ -90,6 +91,9 @@ void WriteData::command(int narg, char **arg)
...
@@ -90,6 +91,9 @@ void WriteData::command(int narg, char **arg)
}
else
if
(
strcmp
(
arg
[
iarg
],
"nocoeff"
)
==
0
)
{
}
else
if
(
strcmp
(
arg
[
iarg
],
"nocoeff"
)
==
0
)
{
coeffflag
=
0
;
coeffflag
=
0
;
iarg
++
;
iarg
++
;
}
else
if
(
strcmp
(
arg
[
iarg
],
"nofix"
)
==
0
)
{
fixflag
=
0
;
iarg
++
;
}
else
error
->
all
(
FLERR
,
"Illegal write_data command"
);
}
else
error
->
all
(
FLERR
,
"Illegal write_data command"
);
}
}
...
@@ -206,10 +210,10 @@ void WriteData::write(char *file)
...
@@ -206,10 +210,10 @@ void WriteData::write(char *file)
}
}
// extra sections managed by fixes
// extra sections managed by fixes
if
(
fixflag
)
for
(
int
i
=
0
;
i
<
modify
->
nfix
;
i
++
)
for
(
int
i
=
0
;
i
<
modify
->
nfix
;
i
++
)
if
(
modify
->
fix
[
i
]
->
wd_section
)
if
(
modify
->
fix
[
i
]
->
wd_section
)
for
(
int
m
=
0
;
m
<
modify
->
fix
[
i
]
->
wd_section
;
m
++
)
fix
(
i
,
m
);
for
(
int
m
=
0
;
m
<
modify
->
fix
[
i
]
->
wd_section
;
m
++
)
fix
(
i
,
m
);
// close data file
// close data file
...
@@ -252,10 +256,11 @@ void WriteData::header()
...
@@ -252,10 +256,11 @@ void WriteData::header()
}
}
}
}
for
(
int
i
=
0
;
i
<
modify
->
nfix
;
i
++
)
if
(
fixflag
)
if
(
modify
->
fix
[
i
]
->
wd_header
)
for
(
int
i
=
0
;
i
<
modify
->
nfix
;
i
++
)
for
(
int
m
=
0
;
m
<
modify
->
fix
[
i
]
->
wd_header
;
m
++
)
if
(
modify
->
fix
[
i
]
->
wd_header
)
modify
->
fix
[
i
]
->
write_data_header
(
fp
,
m
);
for
(
int
m
=
0
;
m
<
modify
->
fix
[
i
]
->
wd_header
;
m
++
)
modify
->
fix
[
i
]
->
write_data_header
(
fp
,
m
);
fprintf
(
fp
,
"
\n
"
);
fprintf
(
fp
,
"
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
src/write_data.h
+
1
−
0
View file @
48e42a4e
...
@@ -35,6 +35,7 @@ class WriteData : protected Pointers {
...
@@ -35,6 +35,7 @@ class WriteData : protected Pointers {
int
me
,
nprocs
;
int
me
,
nprocs
;
int
pairflag
;
int
pairflag
;
int
coeffflag
;
int
coeffflag
;
int
fixflag
;
FILE
*
fp
;
FILE
*
fp
;
bigint
nbonds_local
,
nbonds
;
bigint
nbonds_local
,
nbonds
;
bigint
nangles_local
,
nangles
;
bigint
nangles_local
,
nangles
;
...
...
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