mcellteam / cellblender

Create, Simulate, Visualize, and Analyze Realistic 3D Cell Models
http://mcell.org/tutorials/index.html
GNU General Public License v2.0
63 stars 11 forks source link

allow users to manually set project_files directory #104

Open tgbugs opened 8 years ago

tgbugs commented 8 years ago

When running mcell via cellblender there is no way to specify an alternate directory in which to place the project_files folder where mcell dumps the *.dat files. It is possible to load model data from any location via the 'Read Viz Data' but that setting does not stick when running simulations and mcell defaults to putting the project_file folder in the blend file project directory.

This would useful for users who want to save their blend files on network drives or in synchronized folders but don't want to transport 10k+ .dat files over the network every time they run a simulation.

An option to set the parent folder for all project_files directories under 'Settings & Preferences' might be one place to put it.

cnlbob commented 8 years ago

You might accomplish this on systems that support symbolic links as follows:

  1. Run your simulation for 1 iteration (just enough to build the subdirectory structure).
  2. Delete the portion of the subdirectory structure that you want on another file system.
  3. Create a symbolic link to put the desired destination at the proper location in your subdirectory structure.
  4. Run your simulation for as long as you want ... the files should go to the target of the symbolic link.

I've tested this on a Linux system where I replaced the "mcell" subdirectory with a symbolic link to another local directory. It appeared to work.

The directory structure created by CellBlender looks like this for a blend file named "myblend.blend":

myblend.blend myblend_files ....mcell ........react_data ............seed_00001 ................count files for seed 1 ............seed_00002 ................count files for seed 2 ........viz_data ............seed_00001 ................viz files for seed 1 ............seed_00002 ................viz files for seed 2

Beware that some of these subdirectories may be recreated by CellBlender (I haven't checked them all yet), so it might not be safe to make symbolic links at all levels of this tree. But I have tested it at the "mcell" level, and that will probably get you what you want in most cases anyway.