Difference between revisions of "Scripted creation of a project in the Linux command line"

From Dynamo
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
It is possible to fully run ''Dynamo'' outside of Matlab AND the ''Dynamo'' [[standalone]], as described [[ standalone#For independent commands | here]]
 
It is possible to fully run ''Dynamo'' outside of Matlab AND the ''Dynamo'' [[standalone]], as described [[ standalone#For independent commands | 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:  
+
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 mask|alignment]], classification, description of fourier content of template and [[Smoothing mask|smoothing while FSC computing]]). If you don't you can just run (in the linux shell) the command:  
  
 
  <tt>dynamo 'dynamo_tutorial ttest'</tt>
 
  <tt>dynamo 'dynamo_tutorial ttest'</tt>
  
(This is equivalent to opening an interactive ''Dynamo'' [[console| Dynamo console]], waiting for it to open, and then typing <tt>dutorial ttest</tt> 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.
+
(This is equivalent to opening an interactive ''Dynamo'' [[Dynamo console| console]], waiting for it to open, and then typing <tt>dutorial ttest</tt> 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 <tt>createProject.sh</tt>, and type the lines:
 
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 <tt>createProject.sh</tt>, and type the lines:
Line 28: Line 28:
 
</pre>
 
</pre>
  
Here, we are just indicating a minimum amount of input that you need to create a working project.
+
Here, we are just indicating a minimum amount of input that you need to create a working project, which we arbitrarily called <tt>prtest</tt>. We cannot use the short names of the commands in this kind of scripts, i.e., we need to write out <tt>dynamo_vpr_put</tt> instead of <tt>dvput</tt>. To get a list of all project parameters that can be changed with <tt>dvput</tt>, just type the command <tt>dvhelp</tt>.
  
 
Now, you can run this script in a Linux shell (provided you have [[ standalone#Activating the standalone  | activated]]  ''Dynamo'' in it) by
 
Now, you can run this script in a Linux shell (provided you have [[ standalone#Activating the standalone  | activated]]  ''Dynamo'' in it) by
Line 34: Line 34:
 
  <tt> dynamo createProject.sh </tt>
 
  <tt> dynamo createProject.sh </tt>
  
After that, you can just execute the project by writing  
+
After that, you can just execute the project by writing:
  
 
  <tt>./prtest.exe</tt>
 
  <tt>./prtest.exe</tt>

Latest revision as of 11:05, 22 September 2016

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 createProject.sh, 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

 dynamo createProject.sh 

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

./prtest.exe