Scripted creation of a project in the Linux command line

From Dynamo
Jump to: navigation, search

It is possible to fully run Dynamo outside of Matlab AND the Dynamo standalone, as described here

Here we show how to create from scratch a project. This assumes that you already have a data folder, a table,a template, and several masks (for alignment, classification, description of fourier content of template and smoothing while FSC computing). If you don't you can just run (in the linux shell) the command:

dynamo 'dynamo_tutorial ttest'

(This is equivalent to opening an interactive Dynamo console, waiting for it to open, and then typing dutorial ttest in it). This command just creates some example files for data, etc, which we can use now to show how they can be linked into a project.

We then create a single script where we write all the commands that we would use interactively to create a project. Use any editor in your system to open a file, let's call it, and type the lines:

dynamo_vpr prtest
dynamo_vpr_put prtest -data ttest/data
dynamo_vpr_put prtest -template ttest/template.em
dynamo_vpr_put prtest -table ttest/initial.tbl
dynamo_vpr_put prtest -mask ttest/mask.em
dynamo_vpr_put prtest -cmask ttest/mask.em
dynamo_vpr_put prtest -fmask ttest/fmask.em
dynamo_vpr_put prtest -smask ttest/mask_smoothing.em
dynamo_vpr_put prtest -ite_r1 2
dynamo_vpr_put prtest -ca_r1 360
dynamo_vpr_put prtest -cs_r1 45
dynamo_vpr_put prtest -dim_r1 32
dynamo_vpr_put prtest -destination standalone
dynamo_vpr_put prtest -cores 2
dynamo_vpr_check prtest
dynamo_vpr_unfold prtest

Here, we are just indicating a minimum amount of input that you need to create a working project, which we arbitrarily called prtest. We cannot use the short names of the commands in this kind of scripts, i.e., we need to write out dynamo_vpr_put instead of dvput. To get a list of all project parameters that can be changed with dvput, just type the command dvhelp.

Now, you can run this script in a Linux shell (provided you have activated Dynamo in it) by


After that, you can just execute the project by writing: