pwtools.batch.ParameterStudy.write_input¶
- ParameterStudy.write_input(mode='a', backup=True, sleep=0, excl=True)[source]¶
Create calculation dir(s) for each parameter set and write input files based on
templates. Write sqlite database storing all relevant parameters. Write (bash) shell script to start all calculations (run locally or submitt batch job file, depending onmachine.subcmd).- Parameters:
mode (str, optional) –
Fine tune how to write input files (based on
templates) to calc dirs calc_foo/0/, calc_foo/1/, … . Note that this doesn’t change the base dir calc_foo at all, only the subdirs for each calc. {‘a’, ‘w’}’a’: Append mode (default). If a previous database is found, thensubsequent calculations are numbered based on the last ‘idx’.calc_foo/0 # oldcalc_foo/1 # oldcalc_foo/2 # newcalc_foo/3 # new’w’: Write mode. The target dirs are purged and overwritten. Also,the database (self.dbfn) is overwritten. Use this toiteratively tune your inputs, NOT for working on alreadypresent results!calc_foo/0 # newcalc_foo/1 # newbackup (bool, optional) – Before writing anything, do a backup of self.calc_dir if it already exists.
sleep (int, optional) – For the script to start (submitt) all jobs: time in seconds for the shell sleep(1) commmand.
excl (bool) – If in append mode, a file <calc_root>/excl_push with all indices of calculations from old revisions is written. Can be used with
rsync --exclude-from=excl_pushwhen pushing appended new calculations to a cluster.