|
2 | 2 | InstanceCompilerPlugin, Builder, Parameter |
3 | 3 | ) |
4 | 4 | from paths_cli.compiling.tools import custom_eval |
5 | | -from paths_cli.compiling.plugins import NetworkCompilerPlugin, CategoryPlugin |
| 5 | +from paths_cli.compiling.plugins import ( |
| 6 | + NetworkCompilerPlugin, CategoryPlugin, InterfaceSetPlugin |
| 7 | +) |
6 | 8 | from paths_cli.compiling.root_compiler import compiler_for |
7 | 9 | from paths_cli.compiling.json_type import ( |
8 | 10 | json_type_ref, json_type_list, json_type_eval |
9 | 11 | ) |
10 | 12 |
|
11 | | -build_interface_set = InstanceCompilerPlugin( |
| 13 | + |
| 14 | +INITIAL_STATES_PARAM = Parameter( |
| 15 | + 'initial_states', compiler_for('volume'), |
| 16 | + json_type=json_type_list(json_type_ref('volume')), |
| 17 | + description="initial states for this transition", |
| 18 | +) |
| 19 | + |
| 20 | + |
| 21 | +INITIAL_STATE_PARAM = Parameter( |
| 22 | + 'initial_state', compiler_for('volume'), |
| 23 | + json_type=json_type_list(json_type_ref('volume')), |
| 24 | + description="initial state for this transition", |
| 25 | +) |
| 26 | + |
| 27 | + |
| 28 | +FINAL_STATES_PARAM = Parameter( |
| 29 | + 'final_states', compiler_for('volume'), |
| 30 | + json_type=json_type_list(json_type_ref('volume')), |
| 31 | + description="final states for this transition", |
| 32 | +) |
| 33 | + |
| 34 | + |
| 35 | +FINAL_STATE_PARAM = Parameter( |
| 36 | + 'final_state', compiler_for('volume'), |
| 37 | + json_type=json_type_list(json_type_ref('volume')), |
| 38 | + description="final state for this transition", |
| 39 | +) |
| 40 | + |
| 41 | + |
| 42 | +build_interface_set = InterfaceSetPlugin( |
12 | 43 | builder=Builder('openpathsampling.VolumeInterfaceSet'), |
13 | 44 | parameters=[ |
14 | 45 | Parameter('cv', compiler_for('cv'), json_type=json_type_ref('cv'), |
|
23 | 54 | description=("maximum value(s) for interfaces in this" |
24 | 55 | "interface set")), |
25 | 56 | ], |
26 | | - name='interface-set' |
| 57 | + name='interface-set', |
| 58 | + description="Interface set used in transition interface sampling.", |
27 | 59 | ) |
28 | 60 |
|
29 | 61 |
|
@@ -57,15 +89,10 @@ def tis_trans_info(dct): |
57 | 89 |
|
58 | 90 | TPS_NETWORK_PLUGIN = NetworkCompilerPlugin( |
59 | 91 | builder=Builder('openpathsampling.TPSNetwork'), |
60 | | - parameters=[ |
61 | | - Parameter('initial_states', compiler_for('volume'), |
62 | | - json_type=json_type_list(json_type_ref('volume')), |
63 | | - description="initial states for this transition"), |
64 | | - Parameter('final_states', compiler_for('volume'), |
65 | | - json_type=json_type_list(json_type_ref('volume')), |
66 | | - description="final states for this transition") |
67 | | - ], |
68 | | - name='tps' |
| 92 | + parameters=[INITIAL_STATES_PARAM, FINAL_STATES_PARAM], |
| 93 | + name='tps', |
| 94 | + description=("Network for transition path sampling (two state TPS or " |
| 95 | + "multiple state TPS)."), |
69 | 96 | ) |
70 | 97 |
|
71 | 98 |
|
|
0 commit comments