In trying to combinatorially try multiple timesteps in mcmc_moves, I see
2018-05-27 10:39:16,940: ERROR - yank.experiment - MCMC moves validation failed with:
mcmc_moves:
- langevin: ['Validation of constructor failed with: The expression Combinatorial([''2.0*femtosecond'',
''2.5*femtosecond'', ''3.0*femtosecond'', ''3.5*femtosecond'', ''4.0*femtosecond'',
''4.5*femtosecond'', ''5.0*femtosecond'']) must be a string defining units,
not a <class ''yank.utils.CombinatorialLeaf''> instance']
Traceback (most recent call last):
File "/home/chodera/miniconda/bin/yank", line 11, in <module>
load_entry_point('yank==0.22.1', 'console_scripts', 'yank')()
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/cli.py", line 73, in main
dispatched = getattr(commands, command).dispatch(command_args)
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/commands/script.py", line 133, in dispatch
yaml_builder = ExperimentBuilder(script=yaml_path, job_id=job_id, n_jobs=n_jobs)
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/experiment.py", line 636, in __init__
self.parse(script)
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/experiment.py", line 752, in parse
self._mcmc_moves = self._validate_mcmc_moves(yaml_content)
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/experiment.py", line 1927, in _validate_mcmc_moves
raise YamlParseError(error.format(yaml.dump(mcmc_move_validator.errors)))
yank.experiment.YamlParseError: MCMC moves validation failed with:
mcmc_moves:
- langevin: ['Validation of constructor failed with: The expression Combinatorial([''2.0*femtosecond'',
''2.5*femtosecond'', ''3.0*femtosecond'', ''3.5*femtosecond'', ''4.0*femtosecond'',
''4.5*femtosecond'', ''5.0*femtosecond'']) must be a string defining units,
not a <class ''yank.utils.CombinatorialLeaf''> instance']
If I explicitly create different mcmc_move types with different timesteps and use !Combinatorial in samplers, I see
2018-05-27 10:42:20,763: ERROR - yank.experiment - Samplers validation failed with:
samplers:
- sams:
- mcmc_moves: [must be of string type]
Traceback (most recent call last):
File "/home/chodera/miniconda/bin/yank", line 11, in <module>
load_entry_point('yank==0.22.1', 'console_scripts', 'yank')()
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/cli.py", line 73, in main
dispatched = getattr(commands, command).dispatch(command_args)
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/commands/script.py", line 133, in dispatch
yaml_builder = ExperimentBuilder(script=yaml_path, job_id=job_id, n_jobs=n_jobs)
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/experiment.py", line 636, in __init__
self.parse(script)
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/experiment.py", line 753, in parse
self._samplers = self._validate_samplers(yaml_content)
File "/home/chodera/miniconda/lib/python3.6/site-packages/yank/experiment.py", line 1966, in _validate_samplers
raise YamlParseError(error.format(yaml.dump(sampler_validator.errors)))
yank.experiment.YamlParseError: Samplers validation failed with:
samplers:
- sams:
- mcmc_moves: [must be of string type]
We should address this in the documentation if needed, or see if we could allow !Combinatorial to work in these sections if possible.
Ah! Sorry, I forgot to add. It may be faster to implement this than add this to the docs actually. It should be a one-liner (plus tests) with the functions I have already implemented for this task.
The documentation states that
protocols
andsolvents
cannot contain!Combinatorial
, but it looks like neithermcmc_moves
norsamplers
can contain!Combinatorial
options either.In trying to combinatorially try multiple timesteps in
mcmc_moves
, I seeIf I explicitly create different
mcmc_move
types with different timesteps and use!Combinatorial
insamplers
, I seeWe should address this in the documentation if needed, or see if we could allow
!Combinatorial
to work in these sections if possible.