Skip to content

Commit 0f14039

Browse files
committed
more help strings, add LoadFromOPS in volumes
- Add help for `n_frames_max` - Add help for volume category - Add help for Union, Intersection, and Complement volumes - Add LoadFromOPSFile to volumes
1 parent 448088e commit 0f14039

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

‎paths_cli/wizard/openmm.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@
6161
ProxyParameter(
6262
name='n_frames_max',
6363
ask="How many frames before aborting a trajectory?",
64-
helper=None,
64+
helper=("Sometimes trajectories can get stuck in "
65+
"unexpected basins. To prevent your trajectory "
66+
"from running forever, you need to add a cutoff "
67+
"trajectory length. This should be significantly "
68+
"longer than you would expect a transition to "
69+
"take."),
6570
),
6671
],
6772
compiler_plugin=OPENMM_COMPILING,

‎paths_cli/wizard/volumes.py‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def _binary_func_volume(wizard, context, op):
2828
"outside the periodic bounds.")
2929
_LAMBDA_STR = ("What is the {minmax} allowed value for "
3030
"'{{obj_dict[cv].name}}' in this volume?")
31+
3132
CV_DEFINED_VOLUME_PLUGIN = WizardParameterObjectPlugin.from_proxies(
3233
name="CV-defined volume (allowed values of CV)",
3334
category="volume",
@@ -64,6 +65,9 @@ def _binary_func_volume(wizard, context, op):
6465
"This means that it only allows phase space points that are "
6566
"in both of the constituent volumes."),
6667
builder=partial(_binary_func_volume, op=operator.__and__),
68+
description=("Create a volume that is the intersection of two existing "
69+
"volumes -- that is, all points in this volume are in "
70+
"both of the volumes that define it."),
6771
)
6872

6973
UNION_VOLUME_PLUGIN = WizardObjectPlugin(
@@ -73,13 +77,18 @@ def _binary_func_volume(wizard, context, op):
7377
"This means that it allows phase space points that are in "
7478
"either of the constituent volumes."),
7579
builder=partial(_binary_func_volume, op=operator.__or__),
80+
description=("Create a volume that is the union of two existing "
81+
"volumes -- that is, any point in either of the volumes "
82+
"that define this are also in this volume"),
7683
)
7784

7885
NEGATED_VOLUME_PLUGIN = WizardObjectPlugin(
7986
name='Complement of a volume (not in given volume)',
8087
category='volume',
8188
intro="This volume will be everything not in the subvolume.",
8289
builder=lambda wizard, context: ~VOLUMES_PLUGIN(wizard, context),
90+
description=("Create a volume that includes every that is NOT "
91+
"in the existing volume."),
8392
)
8493

8594
_FIRST_STATE = ("Now let's define state states for your system. "
@@ -115,12 +124,17 @@ def volume_ask(wizard, context):
115124
obj = {True: 'state', False: 'volume'}[as_state]
116125
return f"What describes this {obj}?"
117126

127+
VOLUME_FROM_FILE = LoadFromOPS('volume')
128+
118129
VOLUMES_PLUGIN = WrapCategory(
119130
name='volume',
120131
intro=volume_intro,
121132
ask=volume_ask,
122133
set_context=volume_set_context,
123-
helper="No volume help yet"
134+
helper=("This will define a (hyper)volume in phase space. States and "
135+
"interfaces in OPS are described by volumes. You can combine "
136+
"ranges along different CVs in any way you want to defined the "
137+
"volume.")
124138
)
125139

126140
if __name__ == "__main__": # no-cov

0 commit comments

Comments
 (0)