Make templates from cryo-EM maps or atomic models

This script demonstrates making templates from cryo-EM density maps or atomic models with CryoLike.

The wrapper function for making templates is make_templates_from_inputs in the cryolike.file_conversions module. The function takes a list of inputs for the cryo-EM density map or atomic model, the imaging parameters perviously set (see Parameter-setting example), and the output folder. For a brief overview of the possible parameters, please see the linked API documentation.

Currently, the user is advised to make sure the number of voxels and voxel size agree with the cryo-EM data to avoid inconsistent results.

The atomic radii and atom selection are only relevant for PDB inputs, and are optional. If atomic radii is unspecified, the function will use a standard set of atomic radii for each amino acid type. If no atom selection is specified, the function will use all atoms in the atomic model.

Example usage:

import os

from cryolike import make_templates_from_inputs

# Assume you have already run set_image_parameters_example with the same
# value of folder_output.
folder_output = './output/templates/'
image_parameters_filename = os.path.join(folder_output, "parameters.npz")
list_of_inputs = [
    # density,
    # density_torch,
    # "data/map/emd_2788.map",
    "data/pdb/apoferritin_ca_apo_sym.pdb",
    "data/pdb/apoferritin_ca_apo_def.pdb"
]
verbose = True

make_templates_from_inputs(
    list_of_inputs = list_of_inputs,
    image_parameters_file=image_parameters_filename,
    folder_output = folder_output,
    verbose = verbose
)