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
a051d61e
Commit
a051d61e
authored
6 years ago
by
Gareth Tribello
Browse files
Options
Downloads
Patches
Plain Diff
Added functionality to support fix modify for fix plumed
parent
8cb665f0
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
src/USER-PLUMED/fix_plumed.cpp
+38
-0
38 additions, 0 deletions
src/USER-PLUMED/fix_plumed.cpp
src/USER-PLUMED/fix_plumed.h
+1
-0
1 addition, 0 deletions
src/USER-PLUMED/fix_plumed.h
with
39 additions
and
0 deletions
src/USER-PLUMED/fix_plumed.cpp
+
38
−
0
View file @
a051d61e
...
@@ -456,4 +456,42 @@ double FixPlumed::compute_scalar()
...
@@ -456,4 +456,42 @@ double FixPlumed::compute_scalar()
return
bias
;
return
bias
;
}
}
int
FixPlumed
::
modify_param
(
int
narg
,
char
**
arg
)
{
if
(
strcmp
(
arg
[
0
],
"pe"
)
==
0
)
{
if
(
narg
<
2
)
error
->
all
(
FLERR
,
"Illegal fix_modify command"
);
modify
->
delete_compute
(
id_pe
);
delete
[]
id_pe
;
int
n
=
strlen
(
arg
[
1
])
+
1
;
id_pe
=
new
char
[
n
];
strcpy
(
id_pe
,
arg
[
1
]);
int
icompute
=
modify
->
find_compute
(
arg
[
1
]);
if
(
icompute
<
0
)
error
->
all
(
FLERR
,
"Could not find fix_modify potential energy ID"
);
c_pe
=
modify
->
compute
[
icompute
];
if
(
c_pe
->
peflag
==
0
)
error
->
all
(
FLERR
,
"Fix_modify plmd_pe ID does not compute potential energy"
);
if
(
c_pe
->
igroup
!=
0
&&
comm
->
me
==
0
)
error
->
warning
(
FLERR
,
"Potential for fix PLUMED is not for group all"
);
return
2
;
}
else
if
(
strcmp
(
arg
[
0
],
"press"
)
==
0
)
{
if
(
narg
<
2
)
error
->
all
(
FLERR
,
"Illegal fix_modify command"
);
modify
->
delete_compute
(
id_press
);
delete
[]
id_press
;
int
n
=
strlen
(
arg
[
1
])
+
1
;
id_press
=
new
char
[
n
];
strcpy
(
id_press
,
arg
[
1
]);
int
icompute
=
modify
->
find_compute
(
arg
[
1
]);
if
(
icompute
<
0
)
error
->
all
(
FLERR
,
"Could not find fix_modify pressure ID"
);
c_press
=
modify
->
compute
[
icompute
];
if
(
c_press
->
pressflag
==
0
)
error
->
all
(
FLERR
,
"Fix_modify pressure ID does not compute pressure"
);
return
2
;
}
return
0
;
}
This diff is collapsed.
Click to expand it.
src/USER-PLUMED/fix_plumed.h
+
1
−
0
View file @
a051d61e
...
@@ -42,6 +42,7 @@ class FixPlumed : public Fix {
...
@@ -42,6 +42,7 @@ class FixPlumed : public Fix {
void
min_post_force
(
int
);
void
min_post_force
(
int
);
double
compute_scalar
();
double
compute_scalar
();
void
reset_dt
();
void
reset_dt
();
int
modify_param
(
int
narg
,
char
**
arg
);
private:
private:
...
...
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