Skip to content

Commit 0efe35c

Browse files
committed
cleanup for TIS compiling
1 parent fba6fd5 commit 0efe35c

File tree

2 files changed

+0
-77
lines changed

2 files changed

+0
-77
lines changed

paths_cli/compiling/networks.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,6 @@ def mistis_trans_info(dct):
8888
dct = dct.copy()
8989
dct['trans_info'] = dct.pop('interface_sets')
9090
return dct
91-
# interface_sets = dct.pop('interface_sets')
92-
# volume_compiler = compiler_for('volume')
93-
# interface_set_compiler = compiler_for('interface_set')
94-
95-
# trans_info = []
96-
# for iset in interface_sets:
97-
# initial_state = volume_compiler(iset.pop("initial_state"))
98-
# final_state = volume_compiler(iset.pop("final_state"))
99-
# iset['type'] = iset.get('type', 'volume-interface-set')
100-
# interface_set = interface_set_compiler(iset)
101-
# trans_info.append((initial_state, interface_set, final_state))
102-
103-
# dct['trans_info'] = trans_info
104-
# return dct
105-
106-
107-
def tis_trans_info(dct):
108-
# remap TIS into MISTIS format
109-
dct = dct.copy()
110-
remapped = {'interface_sets': [dct]}
111-
return mistis_trans_info(remapped)
11291

11392

11493
TPS_NETWORK_PLUGIN = NetworkCompilerPlugin(

paths_cli/tests/compiling/test_networks.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -27,62 +27,6 @@ def unidirectional_tis_compiler(cv_and_states):
2727
),
2828
}
2929

30-
# def check_unidirectional_tis(results, state_A, state_B, cv):
31-
# assert len(results) == 1
32-
# trans_info = results['trans_info']
33-
# assert len(trans_info) == 1
34-
# assert len(trans_info[0]) == 3
35-
# trans = trans_info[0]
36-
# assert isinstance(trans, tuple)
37-
# assert trans[0] == state_A
38-
# assert trans[2] == state_B
39-
# assert isinstance(trans[1], paths.VolumeInterfaceSet)
40-
# ifaces = trans[1]
41-
# assert ifaces.cv == cv
42-
# assert ifaces.minvals == float("-inf")
43-
# np.testing.assert_allclose(ifaces.maxvals,
44-
# [0, np.pi / 10.0, np.pi / 5.0])
45-
46-
47-
# def test_mistis_trans_info(cv_and_states, mistis_dict,
48-
# unidirectional_tis_compiler):
49-
# cv, state_A, state_B = cv_and_states
50-
# patch_base = 'paths_cli.compiling.networks'
51-
# with mock.patch.dict(_COMPILERS_LOC, unidirectional_tis_compiler):
52-
# results = mistis_trans_info(mistis_dict)
53-
54-
# check_unidirectional_tis(results, state_A, state_B, cv)
55-
# paths.InterfaceSet._reset()
56-
57-
58-
# def test_tis_trans_info(cv_and_states):
59-
# cv, state_A, state_B = cv_and_states
60-
# dct = {
61-
# 'initial_state': "A",
62-
# 'final_state': "B",
63-
# 'cv': 'cv',
64-
# 'minvals': 'float("-inf")',
65-
# 'maxvals': 'np.array([0, 0.1, 0.2]) * np.pi',
66-
# }
67-
68-
# compiler = {
69-
# 'cv': mock_compiler('cv', named_objs={'cv': cv}),
70-
# 'volume': mock_compiler('volume', named_objs={
71-
# "A": state_A, "B": state_B
72-
# }),
73-
# 'interface_set': mock_compiler(
74-
# 'interface_set',
75-
# type_dispatch={
76-
# 'volume-interface-set': VOLUME_INTERFACE_SET_PLUGIN
77-
# }
78-
# ),
79-
# }
80-
# with mock.patch.dict(_COMPILERS_LOC, compiler):
81-
# results = tis_trans_info(dct)
82-
83-
# check_unidirectional_tis(results, state_A, state_B, cv)
84-
# paths.InterfaceSet._reset()
85-
8630

8731
def test_build_tps_network(cv_and_states):
8832
_, state_A, state_B = cv_and_states

0 commit comments

Comments
 (0)