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
e70fc9d4
There was an error fetching the commit references. Please try again later.
Commit
e70fc9d4
authored
9 years ago
by
Giovanni Bussi
Browse files
Options
Downloads
Patches
Plain Diff
forgot this
parent
3c1dd169
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/generic/Debug.cpp
+19
-7
19 additions, 7 deletions
src/generic/Debug.cpp
with
19 additions
and
7 deletions
src/generic/Debug.cpp
+
19
−
7
View file @
e70fc9d4
...
...
@@ -49,6 +49,7 @@ DEBUG logRequestedAtoms STRIDE=2
class
Debug
:
public
ActionPilot
{
OFile
ofile
;
bool
logActivity
;
bool
logRequestedAtoms
;
bool
novirial
;
...
...
@@ -71,6 +72,7 @@ void Debug::registerKeywords( Keywords& keys ){
keys
.
addFlag
(
"logRequestedAtoms"
,
false
,
"write in the log which atoms have been requested at a given time"
);
keys
.
addFlag
(
"NOVIRIAL"
,
false
,
"switch off the virial contribution for the entirity of the simulation"
);
keys
.
addFlag
(
"DETAILED_TIMERS"
,
false
,
"switch on detailed timers"
);
keys
.
add
(
"optional"
,
"FILE"
,
"the name of the file on which to output these quantities"
);
}
Debug
::
Debug
(
const
ActionOptions
&
ao
)
:
...
...
@@ -89,6 +91,16 @@ novirial(false){
parseFlag
(
"DETAILED_TIMERS"
,
detailedTimers
);
if
(
detailedTimers
)
log
.
printf
(
" Detailed timing on
\n
"
);
plumed
.
detailedTimers
=
true
;
ofile
.
link
(
*
this
);
std
::
string
file
;
parse
(
"FILE"
,
file
);
if
(
file
.
length
()
>
0
){
ofile
.
open
(
file
);
log
.
printf
(
" on file %s
\n
"
,
file
.
c_str
());
}
else
{
log
.
printf
(
" on plumed log file
\n
"
);
ofile
.
link
(
log
);
}
checkRead
();
}
...
...
@@ -101,23 +113,23 @@ void Debug::apply(){
if
((
*
p
)
->
isActive
())
a
++
;
};
if
(
a
>
0
){
log
.
printf
(
"activity at step %i: "
,
getStep
());
ofile
.
printf
(
"activity at step %i: "
,
getStep
());
for
(
ActionSet
::
const_iterator
p
=
actionSet
.
begin
();
p
!=
actionSet
.
end
();
++
p
){
if
(
dynamic_cast
<
Debug
*>
(
*
p
))
continue
;
if
((
*
p
)
->
isActive
())
log
.
printf
(
"+"
);
else
log
.
printf
(
"-"
);
if
((
*
p
)
->
isActive
())
ofile
.
printf
(
"+"
);
else
ofile
.
printf
(
"-"
);
};
log
.
printf
(
"
\n
"
);
ofile
.
printf
(
"
\n
"
);
};
};
if
(
logRequestedAtoms
){
log
.
printf
(
"requested atoms at step %i: "
,
getStep
());
ofile
.
printf
(
"requested atoms at step %i: "
,
getStep
());
int
*
l
;
int
n
;
plumed
.
cmd
(
"createFullList"
,
&
n
);
plumed
.
cmd
(
"getFullList"
,
&
l
);
for
(
int
i
=
0
;
i
<
n
;
i
++
)
log
.
printf
(
" %d"
,
l
[
i
]);
log
.
printf
(
"
\n
"
);
for
(
int
i
=
0
;
i
<
n
;
i
++
)
ofile
.
printf
(
" %d"
,
l
[
i
]);
ofile
.
printf
(
"
\n
"
);
plumed
.
cmd
(
"clearFullList"
);
}
...
...
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