Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plumed AlphaFold
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Martin Kurečka
Plumed AlphaFold
Commits
b7fd4466
There was an error fetching the commit references. Please try again later.
Commit
b7fd4466
authored
12 years ago
by
Gareth Tribello
Browse files
Options
Downloads
Patches
Plain Diff
Added functionality so that you can run actions after the final step
in an MD simulation
parent
541855b8
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/Action.h
+5
-0
5 additions, 0 deletions
src/Action.h
src/CLToolDriver.cpp
+1
-0
1 addition, 0 deletions
src/CLToolDriver.cpp
src/PlumedMain.cpp
+9
-0
9 additions, 0 deletions
src/PlumedMain.cpp
src/PlumedMain.h
+5
-0
5 additions, 0 deletions
src/PlumedMain.h
with
20 additions
and
0 deletions
src/Action.h
+
5
−
0
View file @
b7fd4466
...
...
@@ -186,6 +186,11 @@ public:
/// The set of all Actions is updated in forward order.
virtual
void
update
(){};
/// RunFinalJobs
/// This method is called once at the very end of the calculation.
/// The set of all Actions in run for the final time in forward order.
virtual
void
runFinalJobs
(){};
/// Tell to the Action to flush open files
void
fflush
();
...
...
This diff is collapsed.
Click to expand it.
src/CLToolDriver.cpp
+
1
−
0
View file @
b7fd4466
...
...
@@ -487,6 +487,7 @@ int CLToolDriver<real>::main(FILE* in,FILE*out,PlumedCommunicator& pc){
step
+=
stride
;
}
p
.
cmd
(
"runFinalJobs"
);
if
(
fp_forces
)
fclose
(
fp_forces
);
fclose
(
fp
);
...
...
This diff is collapsed.
Click to expand it.
src/PlumedMain.cpp
+
9
−
0
View file @
b7fd4466
...
...
@@ -293,6 +293,9 @@ void PlumedMain::cmd(const std::string & word,void*val){
CHECK_INIT
(
initialized
,
word
);
CHECK_NULL
(
val
,
word
);
exchangePatterns
.
getList
((
static_cast
<
int
*>
(
val
)));
}
else
if
(
word
==
"runFinalJobs"
){
CHECK_INIT
(
initialized
,
word
);
runJobsAtEndOfCalculation
();
}
else
{
// multi word commands
...
...
@@ -614,6 +617,12 @@ void PlumedMain::eraseFile(PlumedFileBase&f){
void
PlumedMain
::
stop
(){
stopNow
=
true
;
}
void
PlumedMain
::
runJobsAtEndOfCalculation
(){
for
(
ActionSet
::
iterator
p
=
actionSet
.
begin
();
p
!=
actionSet
.
end
();
++
p
){
(
*
p
)
->
runFinalJobs
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/PlumedMain.h
+
5
−
0
View file @
b7fd4466
...
...
@@ -209,6 +209,11 @@ public:
Needed to apply the forces back.
*/
void
justApply
();
/**
If there are calculations that need to be done at the very end of the calculations this
makes sures they are done
*/
void
runJobsAtEndOfCalculation
();
/// Reference to atoms object
Atoms
&
getAtoms
();
/// Reference to the list of Action's
...
...
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