CryoDRGN-AI ab initio reconstruction

how to use the command <cryodrgn abinit>

In cryoDRGN v4.2.0 we replaced the existing ab initio reconstruction commands abinit_homo and abinit_het which implemented the cryoDRGN2 method with the new cryoDRGN-AI ab initio method implemented under cryodrgn abinit, thus replacing separate commands for homogeneous and heterogeneous ab-initio models with a single command for both:

# cryoDRGN-AI ab initio reconstruction
(cryodrgn) $ cryodrgn abinit -h

Getting started

The cryodrgn abinit command uses a similar interface as the cryodrgn abinit_het and cryodrgn abinit_homo reconstruction commands documented in the cryoDRGN manualarrow-up-right, and relies on the same data pre-processing steps.

Required arguments for the command are:

  • Extracted single particle images in a .mrcs/.txt/.star/.cs particle stack, ideally clean from edge, ice, or hot pixel artifacts.

  • CTF parameters in a .pkl file.

  • Path to an output folder where experiment results will be saved.

The latter two are passed to the command using the --ctf and -o flags respectively, so a typical command to run ab initio volume reconstruction would look like:

cryodrgn abinit particles_128.mrcs --ctf ctf.pkl -o 001_drgnai_abinit_zdim.4/ --zdim 4

Important parameters

Additional parameters to the abinit command we recommend you consider using include:

  • --zdim controlling the dimension of the z-latent-space used to model volume heterogeneity

    • use --zdim 0 to run a homogeneous ab initio model

  • --lazy for lazy data processing, necessary when using large datasets in order to avoid out-of-memory issues at the expense of runtime performance

  • --multigpu for using multiple GPU cores for training if available, speeding up runtimes

  • --ind a .pkl file containing a 1-D numpy array of 0...n-1 indices used to filter particles in the input image stack

  • --num-epochs the total number of epochs (pose search + SGD) to use when training; does not include the pretraining epoch

    • --epochs-pose-search, --epochs-sgd, and --n-imgs-pose-search for more fine-tuned control of epochs; default behavior is to use 2 epochs of pose search and 28 epochs of SGD

  • --dim sets the number of dimensions cryoDRGN-AI uses to model the hypervolume

    • --layers number of layers in the neural net used to model the hypervolume

  • --load used to point to a .pkl of saved model weights previously output by a cryoDRGN-AI model

    • --load-poses can be used to also point to a poses.<epoch>.pkl file output by a cryoDRGN-AI model; the default behavior when using --load is to look for poses.<epoch>.pkl in the same place

  • --uninvert-data when the input image stack is dark-on-light instead of the usual light-on-dark, as is the case for e.g. EMPIAR-10076

  • --datadir optional path to directory containing base .mrcs image stacks when using a .star file for the particle stack

See our API for more detailed information about all the parameters available for use with cryoDRGN-AI.

Last updated