Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MPIBP-Hummer
BioEM
Commits
01a19a3d
Commit
01a19a3d
authored
Jun 02, 2016
by
Pilar Cossio-Tejada
Browse files
Polishing & including priors without FFTALGO
parent
470535fe
Changes
22
Hide whitespace changes
Inline
Side-by-side
param.cpp
View file @
01a19a3d
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
< BioEM software for Bayesian inference of Electron Microscopy images>
Copyright (C) 2014 Pilar Cossio, David Rohr and Gerhard Hummer.
Copyright (C) 2016 Pilar Cossio, David Rohr, Fabio Baruffa, Markus Rampp,
Volker Lindenstruth and Gerhard Hummer.
Max Planck Institute of Biophysics, Frankfurt, Germany.
See license statement for terms of distribution.
...
...
@@ -93,6 +94,7 @@ int bioem_param::readParameters(const char* fileinput)
yespriorAngles
=
false
;
ignorepointsout
=
false
;
printrotmod
=
false
;
ignorePDB
=
false
;
NotUn_angles
=
0
;
priorMod
=
1
;
//Default
...
...
@@ -334,6 +336,11 @@ int bioem_param::readParameters(const char* fileinput)
ignoreCCoff
=
true
;
cout
<<
"Ignoring Cross-Correlation offset
\n
"
;
}
else
if
(
strcmp
(
token
,
"IGNORE_PDB"
)
==
0
)
//Ignore PDB extension
{
ignorePDB
=
true
;
cout
<<
"Ignoring PDB extension in model file
\n
"
;
}
else
if
(
strcmp
(
token
,
"NO_PROJECT_RADIUS"
)
==
0
)
//If projecting CA with amino-acid radius
{
doaaradius
=
false
;
...
...
timer.cpp
0 → 100644
View file @
01a19a3d
#include
"timer.h"
#ifdef _WIN32
#include
<windows.h>
#include
<winbase.h>
#else
#include
<time.h>
#endif
HighResTimer
::
HighResTimer
()
{
ElapsedTime
=
0
;
running
=
0
;
}
HighResTimer
::~
HighResTimer
()
{}
void
HighResTimer
::
Start
()
{
#ifdef _WIN32
__int64
istart
;
QueryPerformanceCounter
((
LARGE_INTEGER
*
)
&
istart
);
StartTime
=
(
double
)
istart
;
#else
timespec
tv
;
clock_gettime
(
CLOCK_REALTIME
,
&
tv
);
StartTime
=
(
double
)
tv
.
tv_sec
*
1.0E9
+
(
double
)
tv
.
tv_nsec
;
#endif
running
=
1
;
}
void
HighResTimer
::
ResetStart
()
{
ElapsedTime
=
0
;
Start
();
}
void
HighResTimer
::
Stop
()
{
if
(
running
==
0
)
return
;
running
=
0
;
double
EndTime
=
0
;
#ifdef _WIN32
__int64
iend
;
QueryPerformanceCounter
((
LARGE_INTEGER
*
)
&
iend
);
EndTime
=
(
double
)
iend
;
#else
timespec
tv
;
clock_gettime
(
CLOCK_REALTIME
,
&
tv
);
EndTime
=
(
double
)
tv
.
tv_sec
*
1.0E9
+
(
double
)
tv
.
tv_nsec
;
#endif
ElapsedTime
+=
EndTime
-
StartTime
;
}
void
HighResTimer
::
Reset
()
{
ElapsedTime
=
0
;
StartTime
=
0
;
running
=
0
;
}
double
HighResTimer
::
GetElapsedTime
()
{
return
ElapsedTime
/
Frequency
;
}
double
HighResTimer
::
GetCurrentElapsedTime
()
{
if
(
running
==
0
)
return
(
GetElapsedTime
());
double
CurrentTime
=
0
;
#ifdef _WIN32
__int64
iend
;
QueryPerformanceCounter
((
LARGE_INTEGER
*
)
&
iend
);
CurrentTime
=
(
double
)
iend
;
#else
timespec
tv
;
clock_gettime
(
CLOCK_REALTIME
,
&
tv
);
CurrentTime
=
(
double
)
tv
.
tv_sec
*
1.0E9
+
(
double
)
tv
.
tv_nsec
;
#endif
return
((
CurrentTime
-
StartTime
+
ElapsedTime
)
/
Frequency
);
}
double
HighResTimer
::
GetFrequency
()
{
#ifdef _WIN32
__int64
ifreq
;
QueryPerformanceFrequency
((
LARGE_INTEGER
*
)
&
ifreq
);
return
((
double
)
ifreq
);
#else
return
(
1.0E9
);
#endif
}
double
HighResTimer
::
Frequency
=
HighResTimer
::
GetFrequency
();
\ No newline at end of file
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment