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
3a720230
Commit
3a720230
authored
14 years ago
by
sjplimp
Browse files
Options
Downloads
Patches
Plain Diff
git-svn-id:
svn://svn.icms.temple.edu/lammps-ro/trunk@5724
f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent
2fd2543d
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/REPLICA/tad.cpp
+1
-0
1 addition, 0 deletions
src/REPLICA/tad.cpp
src/dump_cfg.cpp
+24
-2
24 additions, 2 deletions
src/dump_cfg.cpp
src/minimize.cpp
+1
-0
1 addition, 0 deletions
src/minimize.cpp
src/thermo.cpp
+1
-0
1 addition, 0 deletions
src/thermo.cpp
with
27 additions
and
2 deletions
src/REPLICA/tad.cpp
+
1
−
0
View file @
3a720230
...
...
@@ -15,6 +15,7 @@
Contributing author: Aidan Thompson (SNL)
------------------------------------------------------------------------- */
#include
"lmptype.h"
#include
"mpi.h"
#include
"math.h"
#include
"stdlib.h"
...
...
This diff is collapsed.
Click to expand it.
src/dump_cfg.cpp
+
24
−
2
View file @
3a720230
...
...
@@ -15,6 +15,7 @@
Contributing author: Liang Wan (Chinese Academy of Sciences)
------------------------------------------------------------------------- */
#include
"math.h"
#include
"stdlib.h"
#include
"string.h"
#include
"dump_cfg.h"
...
...
@@ -186,11 +187,27 @@ void DumpCFG::init_style()
void
DumpCFG
::
write_header
(
bigint
n
)
{
// special handling for atom style peri
// use average volume of particles to scale particles to mimic C atoms
// scale box dimension to sc lattice for C with sigma = 1.44 Angstroms
double
scale
;
if
(
atom
->
style_match
(
"peri"
))
{
int
nlocal
=
atom
->
nlocal
;
double
vone
=
0.0
;
for
(
int
i
=
0
;
i
<
nlocal
;
i
++
)
vone
+=
atom
->
vfrac
[
i
];
double
vave
;
MPI_Allreduce
(
&
vone
,
&
vave
,
1
,
MPI_DOUBLE
,
MPI_SUM
,
world
);
if
(
atom
->
natoms
)
vave
/=
atom
->
natoms
;
if
(
vave
>
0.0
)
scale
=
1.44
/
pow
(
vave
,
1.0
/
3.0
);
else
scale
=
1.0
;
}
else
scale
=
1.0
;
if
(
me
==
0
||
multiproc
)
{
char
str
[
64
];
sprintf
(
str
,
"Number of particles = %s
\n
"
,
BIGINT_FORMAT
);
fprintf
(
fp
,
str
,
n
);
fprintf
(
fp
,
"A =
1.0
Angstrom (basic length-scale)
\n
"
);
fprintf
(
fp
,
"A =
%g
Angstrom (basic length-scale)
\n
"
,
scale
);
fprintf
(
fp
,
"H0(1,1) = %g A
\n
"
,
domain
->
xprd
);
fprintf
(
fp
,
"H0(1,2) = 0 A
\n
"
);
fprintf
(
fp
,
"H0(1,3) = 0 A
\n
"
);
...
...
@@ -228,7 +245,11 @@ void DumpCFG::write_data(int n, double *mybuf)
{
int
i
,
j
,
m
,
itype
;
int
tag_i
,
index
;
double
*
rmass
=
atom
->
rmass
;
double
*
mass
=
atom
->
mass
;
int
*
type
=
atom
->
type
;
int
nlocal
=
atom
->
nlocal
;
// transfer data from buf to rbuf
// if write by proc 0, transfer chunk by chunk
...
...
@@ -246,7 +267,8 @@ void DumpCFG::write_data(int n, double *mybuf)
for
(
i
=
0
;
i
<
nchosen
;
i
++
)
if
(
rbuf
[
i
][
1
]
==
itype
)
break
;
if
(
i
<
nchosen
)
{
fprintf
(
fp
,
"%g
\n
"
,
mass
[
itype
]);
if
(
rmass
)
fprintf
(
fp
,
"%g
\n
"
,
rmass
[
i
]);
else
fprintf
(
fp
,
"%g
\n
"
,
mass
[
itype
]);
fprintf
(
fp
,
"%s
\n
"
,
typenames
[
itype
]);
for
(;
i
<
nchosen
;
i
++
)
{
if
(
rbuf
[
i
][
1
]
==
itype
)
{
...
...
This diff is collapsed.
Click to expand it.
src/minimize.cpp
+
1
−
0
View file @
3a720230
...
...
@@ -11,6 +11,7 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include
"lmptype.h"
#include
"stdlib.h"
#include
"minimize.h"
#include
"domain.h"
...
...
This diff is collapsed.
Click to expand it.
src/thermo.cpp
+
1
−
0
View file @
3a720230
...
...
@@ -11,6 +11,7 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include
"lmptype.h"
#include
"mpi.h"
#include
"math.h"
#include
"stdlib.h"
...
...
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