Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Steps toward allowing multiple --init_conds
  • Loading branch information
dwhswenson committed Dec 8, 2020
commit f983f35113a66d6893346df8b8779e42e0b2746a
1 change: 1 addition & 0 deletions paths_cli/commands/equilibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def equilibrate_main(output_storage, scheme, init_conds, multiplier,
extra_steps):
import openpathsampling as paths
init_conds = scheme.initial_conditions_from_trajectories(init_conds)
scheme.assert_initial_conditions(init_conds)
simulation = paths.PathSampling(
storage=output_storage,
move_scheme=scheme,
Expand Down
5 changes: 2 additions & 3 deletions paths_cli/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
)

INIT_CONDS = OPSStorageLoadSingle(
param=Option('-t', '--init-conds',
param=Option('-t', '--init-conds', multiple=True,
help=("identifier for initial conditions "
+ "(sample set or trajectory)")),
+ "(sample set or trajectory)" + HELP_MULTIPLE)),
store='samplesets',
value_strategies=[GetByName('tags'), GetByNumber('samplesets'),
GetByNumber('trajectories')],
Expand Down Expand Up @@ -57,7 +57,6 @@
store='engines'
)


STATES = OPSStorageLoadNames(
param=Option('-s', '--state', type=str, multiple=True,
help='name of state' + HELP_MULTIPLE),
Expand Down
3 changes: 2 additions & 1 deletion paths_cli/tests/commands/test_pathsampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ def test_pathsampling(tps_fixture):

results = runner.invoke(pathsampling, ['setup.nc', '-o', 'foo.nc',
'-n', '1000'])
assert results.exit_code == 0
expected_output = (f"True\n{scheme.__uuid__}\n{init_conds.__uuid__}"
"\n1000\n")

assert results.output == expected_output
assert results.exit_code == 0


def test_pathsampling_main(tps_fixture):
Expand Down