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
8a2cf5ce
Commit
8a2cf5ce
authored
7 years ago
by
Ulf R. Pedersen
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
reformatting and use citeme class
parent
8f79f5dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/USER-MISC/fix_rhok.cpp
+21
-14
21 additions, 14 deletions
src/USER-MISC/fix_rhok.cpp
with
21 additions
and
14 deletions
src/USER-MISC/fix_rhok.cpp
+
21
−
14
View file @
8a2cf5ce
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include
"fix_rhok.h"
#include
"fix_rhok.h"
#include
"error.h"
#include
"error.h"
#include
"citeme.h"
#include
"update.h"
#include
"update.h"
#include
"respa.h"
#include
"respa.h"
#include
"atom.h"
#include
"atom.h"
...
@@ -29,14 +30,30 @@
...
@@ -29,14 +30,30 @@
using
namespace
LAMMPS_NS
;
using
namespace
LAMMPS_NS
;
using
namespace
FixConst
;
using
namespace
FixConst
;
// Constructor: all the parameters to this fix specified in
static
const
char
cite_flow_gauss
[]
=
// the LAMMPS input get passed in
"Bias on the collective density field (fix rhok):
\n\n
"
"@Article{pedersen_jcp139_104102_2013,
\n
"
"title = {Direct calculation of the solid-liquid Gibbs free energy difference in a single equilibrium simulation},
\n
"
"volume = {139},
\n
"
"number = {10},
\n
"
"url = {http://aip.scitation.org/doi/10.1063/1.4818747},
\n
"
"doi = {10.1063/1.4818747},
\n
"
"urldate = {2017-10-03},
\n
"
"journal = {J. Chem. Phys.},
\n
"
"author = {Pedersen, Ulf R.},
\n
"
"year = {2013},
\n
"
"pages = {104102}
\n
"
"}
\n\n
"
;
FixRhok
::
FixRhok
(
LAMMPS
*
inLMP
,
int
inArgc
,
char
**
inArgv
)
FixRhok
::
FixRhok
(
LAMMPS
*
inLMP
,
int
inArgc
,
char
**
inArgv
)
:
Fix
(
inLMP
,
inArgc
,
inArgv
)
:
Fix
(
inLMP
,
inArgc
,
inArgv
)
{
{
if
(
lmp
->
citeme
)
lmp
->
citeme
->
add
(
cite_flow_gauss
);
// Check arguments
// Check arguments
if
(
inArgc
!=
8
)
if
(
inArgc
!=
8
)
error
->
all
(
FLERR
,
"Illegal fix rhoKUmbrella command"
);
error
->
all
(
FLERR
,
"Illegal fix rhoKUmbrella command"
);
// Set up fix flags
// Set up fix flags
scalar_flag
=
1
;
// have compute_scalar
scalar_flag
=
1
;
// have compute_scalar
...
@@ -87,16 +104,6 @@ FixRhok::setmask()
...
@@ -87,16 +104,6 @@ FixRhok::setmask()
return
mask
;
return
mask
;
}
}
/*int FixRhok::setmask()
{
int mask = 0;
mask |= POST_FORCE;
mask |= POST_FORCE_RESPA;
mask |= MIN_POST_FORCE;
return mask;
}*/
// Initializes the fix at the beginning of a run
// Initializes the fix at the beginning of a run
void
void
FixRhok
::
init
()
FixRhok
::
init
()
...
@@ -151,7 +158,7 @@ FixRhok::post_force( int inVFlag )
...
@@ -151,7 +158,7 @@ FixRhok::post_force( int inVFlag )
// Loop over locally-owned atoms affected by this fix and calculate the
// Loop over locally-owned atoms affected by this fix and calculate the
// partial rhoK's
// partial rhoK's
mRhoKLocal
[
0
]
=
0.0
;
mRhoKLocal
[
0
]
=
0.0
;
mRhoKLocal
[
1
]
=
0.0
;
mRhoKLocal
[
1
]
=
0.0
;
for
(
int
i
=
0
;
i
<
nlocal
;
i
++
)
{
// Iterate through all atoms on this CPU
for
(
int
i
=
0
;
i
<
nlocal
;
i
++
)
{
// Iterate through all atoms on this CPU
...
...
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