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
d86c3eae
Commit
d86c3eae
authored
Dec 17, 2015
by
Pilar Cossio
Browse files
Tidying up tutorial
parent
9768552f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Tutorial_BioEM/List_Quat_ProRun
0 → 100644
View file @
d86c3eae
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Tutorial_BioEM/MODEL_COMPARISION/Param_Input_ModelComparision
View file @
d86c3eae
...
...
@@ -6,9 +6,11 @@ PIXEL_SIZE 1.32
USE_QUATERNIONS
##### Constrast transfer integration: #######
CTF_B_ENV 100.0 300.5 8
CTF_DEFOCUS 1.0 6.0 5
CTF_AMPLITUDE 0.01 0.5 3
CTF_B_ENV 10.0 500. 5
CTF_DEFOCUS 0.5 4.5 8
CTF_AMPLITUDE 0.01 0.401 4
SIGMA_PRIOR_B_CTF 50.
##### Center displacement: #######
DISPLACE_CENTER
1
0
2
DISPLACE_CENTER
4
0
1
Tutorial_BioEM/Param_Input_Cross-Cor
View file @
d86c3eae
...
...
@@ -7,9 +7,9 @@ GRIDPOINTS_ALPHA 10
GRIDPOINTS_BETA 5
##### Constrast transfer integration: #######
CTF_B_
FACTOR
10
0
.0 300.5
8
CTF_DEFOCUS
1.0 6.0
5
CTF_AMPLITUDE 0.1 0.
1 1
CTF_B_
ENV
10.0 300.5
3
CTF_DEFOCUS
0.5 4.5
5
CTF_AMPLITUDE 0.
0
1 0.
2 2
##### Center displacement: #######
DISPLACE_CENTER 10 2
...
...
Tutorial_BioEM/Param_Input_Priors
View file @
d86c3eae
...
...
@@ -7,9 +7,9 @@ GRIDPOINTS_ALPHA 2
GRIDPOINTS_BETA 2
##### Constrast transfer integration: #######
CTF_B_
FACTOR
10
0
.0 300.5
2
CTF_DEFOCUS
1.0 6.0
5
CTF_AMPLITUDE 0.1 0.
1 1
CTF_B_
ENV
10.0 300.5
3
CTF_DEFOCUS
0.5 4.5
5
CTF_AMPLITUDE 0.
0
1 0.
2 3
##### Center displacement: #######
DISPLACE_CENTER 10 2
...
...
Tutorial_BioEM/Param_Input_WritePAng
View file @
d86c3eae
...
...
@@ -7,7 +7,7 @@ GRIDPOINTS_ALPHA 10
GRIDPOINTS_BETA 5
##### Constrast transfer integration: #######
CTF_B_
FACTOR
100.0 300.5 8
CTF_B_
ENV
100.0 300.5 8
CTF_DEFOCUS 1.0 6.0 5
CTF_AMPLITUDE 0.1 0.1 1
...
...
Tutorial_BioEM/Param_Print_MAP
View file @
d86c3eae
...
...
@@ -8,8 +8,8 @@ BEST_DX -10
BEST_DY 5
######## Normalization and Offset ################
BEST_NORM
1
BEST_OFFSET
0
BEST_NORM
0.03
BEST_OFFSET
-0.001
######## Euler Angles ################
BEST_ALPHA -0.464793
...
...
@@ -23,12 +23,14 @@ BEST_PSF_PHASE 0.004
BEST_PSF_AMP 1
##### Using CTF #######
BEST_CTF_B_
FACTOR
200.5
BEST_CTF_B_
ENV
200.5
BEST_CTF_DEFOCUS 3.5
BEST_CTF_AMP 0.3
######## ADDING NOISE ###########
WITHNOISE 5.476
### In this case the standard deviation of the noise is 6.476
WITHNOISE 6.476
########## Printing the 3d Model rotation ###########
PRINT_ROTATED_MODELS
#
PRINT_ROTATED_MODELS
Tutorial_BioEM/Param_ProRun
View file @
d86c3eae
...
...
@@ -7,8 +7,8 @@ USE_QUATERNIONS
##### Constrast transfer integration: #######
CTF_B_ENV 10.0 500. 5.
CTF_DEFOCUS
1.0 6.0 10
.
CTF_AMPLITUDE 0.1 0.
9 5
.
CTF_DEFOCUS
0.5 4.5 8
.
CTF_AMPLITUDE 0.
0
1 0.
401 4
.
## Gaussian width of Prior of b-parameter
SIGMA_PRIOR_B_CTF 50.
...
...
bioem.cpp
View file @
d86c3eae
...
...
@@ -296,10 +296,7 @@ int bioem::configure(int ac, char* av[])
#ifdef WITH_MPI
// Contros for MPI
if
(
mpi_size
>
param
.
nTotGridAngles
){
cout
<<
"EXIT: Wrong MPI setup More MPI processes than orientations
\n
"
;
exit
(
1
);
}
// ********************* MPI inizialization/ Transfer of parameters******************
if
(
mpi_size
>
1
)
...
...
@@ -443,6 +440,10 @@ int bioem::run()
if
(
mpi_rank
==
0
)
printf
(
"
\t
Initializing Probabilities
\n
"
);
// Contros for MPI
if
(
mpi_size
>
param
.
nTotGridAngles
){
cout
<<
"EXIT: Wrong MPI setup More MPI processes than orientations
\n
"
;
exit
(
1
);
}
// Inizialzing Probabilites to zero and constant to -Infinity
for
(
int
iRefMap
=
0
;
iRefMap
<
RefMap
.
ntotRefMap
;
iRefMap
++
)
...
...
@@ -759,13 +760,15 @@ int bioem::run()
}
else
{
if
(
param
.
usepsf
){
// if( localcc[rx * param.param_device.NumberPixels + ry] <
outputProbFile
<<
"Notation= RefMap: MapNumber ; Maximizing Param: MaxLogProb - q1 - q2 - q3 - PSF amp - PSF phase - PSF envelope - center x - center y - normalization - offsett
\n
"
;
outputProbFile
<<
"Notation= RefMap: MapNumber ; Maximizing Param: MaxLogProb - q1 - q2 - q3 -
q4 -
PSF amp - PSF phase - PSF envelope - center x - center y - normalization - offsett
\n
"
;
}
else
{
outputProbFile
<<
"Notation= RefMap: MapNumber ; Maximizing Param: MaxLogProb - q1 - q2 - q3 - CTF amp - CTF defocus - CTF B-Env - center x - center y - normalization - offsett
\n
"
;
outputProbFile
<<
"Notation= RefMap: MapNumber ; Maximizing Param: MaxLogProb - q1 - q2 - q3 -
q4 -
CTF amp - CTF defocus - CTF B-Env - center x - center y - normalization - offsett
\n
"
;
}}
if
(
param
.
writeCTF
)
outputProbFile
<<
" RefMap: MapNumber ; CTFMaxParm: defocus - b-Env (B ref. Penzeck 2010)
\n
"
;
if
(
param
.
yespriorAngles
)
outputProbFile
<<
"**** Remark: Using Prior Proability in Angles ****
\n
"
;
outputProbFile
<<
"************************* HEADER:: NOTATION *******************************************
\n\n
"
;
// Loop over reference maps
// ************* Over all maps ***************
...
...
@@ -794,18 +797,20 @@ int bioem::run()
// *** Param that maximize probability****
// outputProbFile << (pProbMap.Constoadd + 0.5 * log(M_PI) + (1 - param.param_device.Ntotpi * 0.5) * (log(2 * M_PI) + 1) + log(param.param_device.volu)) << " ";
outputProbFile
<<
param
.
angles
[
pProbMap
.
max
.
max_prob_orient
].
pos
[
0
]
<<
" [ ] "
;
outputProbFile
<<
param
.
angles
[
pProbMap
.
max
.
max_prob_orient
].
pos
[
1
]
<<
" [ ] "
;
outputProbFile
<<
param
.
angles
[
pProbMap
.
max
.
max_prob_orient
].
pos
[
2
]
<<
" [ ] "
;
outputProbFile
<<
param
.
CtfParam
[
pProbMap
.
max
.
max_prob_conv
].
pos
[
0
]
<<
" [ ] "
;
outputProbFile
<<
param
.
angles
[
pProbMap
.
max
.
max_prob_orient
].
pos
[
0
]
<<
" [] "
;
outputProbFile
<<
param
.
angles
[
pProbMap
.
max
.
max_prob_orient
].
pos
[
1
]
<<
" [] "
;
outputProbFile
<<
param
.
angles
[
pProbMap
.
max
.
max_prob_orient
].
pos
[
2
]
<<
" [] "
;
if
(
param
.
doquater
)
outputProbFile
<<
param
.
angles
[
pProbMap
.
max
.
max_prob_orient
].
quat4
<<
" [] "
;
outputProbFile
<<
param
.
CtfParam
[
pProbMap
.
max
.
max_prob_conv
].
pos
[
0
]
<<
" [] "
;
if
(
!
param
.
usepsf
){
outputProbFile
<<
param
.
CtfParam
[
pProbMap
.
max
.
max_prob_conv
].
pos
[
1
]
/
2.
f
/
M_PI
/
param
.
elecwavel
*
0.0001
<<
" [micro-m] "
;
}
else
{
outputProbFile
<<
param
.
CtfParam
[
pProbMap
.
max
.
max_prob_conv
].
pos
[
1
]
<<
" [1/A²] "
;}
if
(
!
param
.
usepsf
){
outputProbFile
<<
param
.
CtfParam
[
pProbMap
.
max
.
max_prob_conv
].
pos
[
2
]
<<
" [A²] "
;}
else
{
outputProbFile
<<
param
.
CtfParam
[
pProbMap
.
max
.
max_prob_conv
].
pos
[
2
]
<<
" [1/A²] "
;}
outputProbFile
<<
pProbMap
.
max
.
max_prob_cent_x
<<
" [pix] "
;
outputProbFile
<<
pProbMap
.
max
.
max_prob_cent_y
<<
" [pix] "
;
outputProbFile
<<
pProbMap
.
max
.
max_prob_norm
<<
" [
] "
;
outputProbFile
<<
pProbMap
.
max
.
max_prob_mu
<<
" [
] "
;
outputProbFile
<<
pProbMap
.
max
.
max_prob_norm
<<
" [] "
;
outputProbFile
<<
pProbMap
.
max
.
max_prob_mu
<<
" [] "
;
outputProbFile
<<
"
\n
"
;
// Writing out CTF parameters if requiered
...
...
@@ -862,6 +867,7 @@ int bioem::run()
int
rx
=
0
;
int
ry
=
0
;
myfloat_t
localcc
[
(
param
.
param_device
.
NumberPixels
+
1
)
*
(
param
.
param_device
.
NumberPixels
+
1
)
];
int
used
[(
param
.
param_device
.
NumberPixels
+
1
)
*
(
param
.
param_device
.
NumberPixels
+
1
)];
halfPix
=
param
.
param_device
.
NumberPixels
/
2
;
// Ordering the centers of the Cross Correlation
...
...
@@ -871,6 +877,7 @@ int bioem::run()
for
(
int
ry
=
0
;
ry
<
param
.
param_device
.
NumberPixels
;
ry
++
)
{
localcc
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
=
0.0
;
used
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
=
0
;
}
}
...
...
@@ -904,36 +911,42 @@ int bioem::run()
}
else
{
localcc
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
=
log
(
pProbCC
.
forCC
)
+
pProbCC
.
ConstCC
;
}
used
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
=
1
;
cc
++
;
}
// ccProbfile << "\n";
}
if
(
!
param
.
ignoreCCoff
){
for
(
int
rx
=
param
.
param_device
.
CCdisplace
;
rx
<
param
.
param_device
.
NumberPixels
;
rx
=
rx
+
param
.
param_device
.
CCdisplace
)
/*
for (int rx = param.param_device.CCdisplace; rx < param.param_device.NumberPixels ; rx = rx + param.param_device.CCdisplace)
{
for (int ry = param.param_device.CCdisplace; ry < param.param_device.NumberPixels ; ry = ry + param.param_device.CCdisplace)
{
if
(
localcc
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
>
-
FLT_MAX
){
{*/
for
(
int
rx
=
param
.
param_device
.
CCdisplace
;
rx
<
param
.
param_device
.
NumberPixels
;
rx
++
)
{
for
(
int
ry
=
param
.
param_device
.
CCdisplace
;
ry
<
param
.
param_device
.
NumberPixels
;
ry
++
)
{
if
(
used
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
==
1
){
ccProbfile
<<
"RefMap: "
<<
iRefMap
<<
" "
<<
rx
<<
" "
<<
ry
<<
" "
<<
localcc
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
<<
"
\n
"
;
}
else
{
ccProbfile
<<
"RefMap: "
<<
iRefMap
<<
" "
<<
rx
<<
" "
<<
ry
<<
" "
<<
-
FLT_MAX
<<
"
\n
"
;
if
(
localcc
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
<=
-
FLT_MAX
)
ccProbfile
<<
"RefMap: "
<<
iRefMap
<<
" "
<<
rx
<<
" "
<<
ry
<<
" "
<<
-
FLT_MAX
<<
"
\n
"
;
}
// cout << " cc " << rx << " " << ry << " " << localcc[ rx * param.param_device.NumberPixels + ry ] <<"\n" ;
}
ccProbfile
<<
"
\n
"
;
//
ccProbfile << "\n";
}
}
else
{
for
(
int
rx
=
param
.
param_device
.
CCdisplace
;
rx
<
param
.
param_device
.
NumberPixels
;
rx
++
)
{
for
(
int
ry
=
param
.
param_device
.
CCdisplace
;
ry
<
param
.
param_device
.
NumberPixels
;
ry
++
)
{
if
(
localcc
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
>
-
FLT_MAX
){
if
(
used
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
==
1
){
ccProbfile
<<
"RefMap: "
<<
iRefMap
<<
" "
<<
rx
<<
" "
<<
ry
<<
" "
<<
localcc
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
<<
"
\n
"
;
}
else
{
ccProbfile
<<
"RefMap: "
<<
iRefMap
<<
" "
<<
rx
<<
" "
<<
ry
<<
" "
<<
-
FLT_MAX
<<
"
\n
"
;
if
(
localcc
[
rx
*
param
.
param_device
.
NumberPixels
+
ry
]
<=
-
FLT_MAX
)
ccProbfile
<<
"RefMap: "
<<
iRefMap
<<
" "
<<
rx
<<
" "
<<
ry
<<
" "
<<
-
FLT_MAX
<<
"
\n
"
;
}
}
ccProbfile
<<
"
\n
"
;
//
ccProbfile << "\n";
}
}
...
...
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