@@ -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+
3132CV_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
6973UNION_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
7885NEGATED_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+
118129VOLUMES_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
126140if __name__ == "__main__" : # no-cov
0 commit comments