Control parameter file to run Frealign
======================================

This file must me kept in the project working directory from which the refinement scripts are launched.

Note: Please make sure that project and scratch directories are accessible by all sub-processes that are run on cluster nodes.

# Computer-specific setting
cluster_type         none	! Set to "sge", "lsf", "slurm" or "pbs" when running on an SGE, LSF, SLURM or PBS cluster, otherwise set to "none".
nprocessor_ref        4		! Number of CPUs to use during refinement.
nprocessor_rec        2		! Number of CPUs to use during reconstruction.
mem_per_cpu        2048		! Memory available per CPU (in MB).

# Refinement-specific parameters
MODE                  1		! 1, 2, 3 or 4. Refinement mode, normally 1. Set to 2 for additional search.
start_process         3		! First cycle to execute. Output files from previous cycle (n-1) required.
end_process          10		! Last cycle to execute.
res_high_refinement  35.0	! High-resolution limit for particle alignment.
res_high_class        8.0	! High-resolution limit to calculate class membership (OCC).
thresh_reconst        0.0	! Particles with scores below this value will not be included in the reconstruction.
nclasses              1		! Number of classes to use.

# Search-specific parameters
res_search           30.0	! High-resolution limit for orientational search.
thresh_refine        70.0	! Score threshold above which search will not be performed.
DANG                200.0	! Angular step for orientational search.
ITMAX               200		! Number of repetitions of grid search with random starting angles.
Bsearch            2000.0	! B-factor filtering (when > 0) applied during search.

# Dataset-specific parameters
data_input           pdh	! Root name for parameter and map files.
raw_images	     ../pdh_stack
image_contrast        N		! N or P. Set to N if particles are dark on bright background, otherwise set to P.
outer_radius        146.0	! Outer radius of spehrical particle mask in Angstrom.
inner_radius          0.0	! Inner radius of spehrical particle mask in Angstrom.
mol_mass           1500.0	! Molecular mass in kDa of particle or helical segment.
Symmetry              I		! Symmetry of particle.
pix_size              3.11	! Pixel size of particle in Angstrom.
dstep                14.0	! Pixel size of detector in micrometer.
Aberration            2.0	! Sherical aberration coefficient in millimeter.
Voltage             120.0	! Beam accelleration voltage in kilovolt.
Amp_contrast          0.07	! Amplitude contrast.

# Expert parameters (for expert users)
XSTD                  0.0	! Tighter masking of 3D map (XSTD > 0) or particles (XSTD < 0).
PBC                  20.0	! Discriminate particles with different scores during reconstruction. Small values (5 - 10) discriminate more than large values (50 - 100).
refineangleinc        4		! When larger than 1: Alternate between refinement of OCC and OCC + angles.
refineshiftinc        4		! When larger than 1: Alternate between refinement of OCC and OCC + angles + shifts.
res_reconstruction    0.0	! High-resolution limit of reconstruction. Normally set to Nyquist limit.
res_low_refinement    0.0	! Low-resolution limit for particle alignment. Set to particle dimention or larger.
FMAG                  F		! T or F. Set to T to refine particle magnification. Not recommended in most cases.
FDEF                  F		! T or F. Set to T to refine defocus per micrograph. Not recommended in most cases.
FASTIG                F		! T or F. Set to T to refine astigmatism. Not recommended in most cases.
FPART                 F		! T or F. Set to T to refine defocus for each particle. Not recommended in most cases.
FFILT                 T		! T or F. Set to T to apply optimal filter to reconstruction. Recommended in most cases.
FMATCH                F		! T or F. Set to T to output matching projections. Only needed for diagnostics.
FBEAUT                F		! T or F. Set to T to apply symmetry also in real space. Not needed in most cases.
FBOOST                F		! T or F. Set to T to allow potential overfitting during refinement. Not recommended in most cases.
RBfactor              0.0	! B-factor sharpening (when < 0) applied during refinement. Not recommended in most cases.
mp_cpus               1		! Number of CPUs to use for each reconstruction job.
qsub_string_ref  ""		! String to add to cluster jobs submitted for refinement (only for SGE and PBS clusters).
qsub_string_rec  ""		! String to add to cluster jobs submitted for reconstruction (only for SGE and PBS clusters).
restart_after_crash   F		! T or F. Set to T to restart job if it crashes.
delete_scratch        T		! Delete intermediate files in scratch directory.
frealign_bin_dir      
scratch_dir           
first_particle        
last_particle	      

# Janelia-specific parameters
night_queue           F		! T or F. Set to T to use night queue.
reschedule_if_qw      F		! T or F. Set to T to reschedule jobs on the normal queue if some end up waiting on night queue.
