@@ -115,61 +115,44 @@ def setup_class(cls):
115
115
pdepjob .active_j_rotor = True
116
116
network = pdepjob .network
117
117
cls .network = network
118
- cls .Nisom = len (network .isomers )
119
- cls .Nreac = len (network .reactants )
120
- cls .Nprod = len (network .products )
121
- cls .Npath = len (network .path_reactions )
122
- cls .PathReaction2 = network .path_reactions [2 ]
123
- cls .TminValue = pdepjob .Tmin .value
124
- cls .Tmaxvalue = pdepjob .Tmax .value
125
- cls .TmaxUnits = pdepjob .Tmax .units
126
- cls .TlistValue = pdepjob .Tlist .value
127
- cls .PminValue = pdepjob .Pmin .value
128
- cls .Pcount = pdepjob .Pcount
129
- cls .Tcount = pdepjob .Tcount
130
- cls .GenTlist = pdepjob .generate_T_list ()
131
- cls .PlistValue = pdepjob .Plist .value
132
- cls .maximum_grain_size_value = pdepjob .maximum_grain_size .value
133
- cls .method = pdepjob .method
134
- cls .rmgmode = pdepjob .rmgmode
135
118
136
119
# test Arkane's interactions with the network module
137
120
def test_num_isom (self ):
138
121
"""
139
122
Test the number of isomers identified.
140
123
"""
141
- assert self .Nisom == 2
124
+ assert len ( self .network . isomers ) == 2
142
125
143
126
def test_num_reac (self ):
144
127
"""
145
128
Test the number of reactants identified.
146
129
"""
147
- assert self .Nreac == 1
130
+ assert len ( self .network . reactants ) == 1
148
131
149
132
def test_num_prod (self ):
150
133
"""
151
134
Test the number of products identified.
152
135
"""
153
- assert self .Nprod == 1
136
+ assert len ( self .network . products ) == 1
154
137
155
138
def test_n_path_reactions (self ):
156
139
"""
157
140
Test the whether or not RMG mode is turned on.
158
141
"""
159
- assert self .Npath == 3
142
+ assert len ( self .network . path_reactions ) == 3
160
143
161
144
def test_path_reactions (self ):
162
145
"""
163
146
Test a path reaction label
164
147
"""
165
- assert str (self .PathReaction2 ) == "CH2OH <=> methoxy"
148
+ assert str (self .network . path_reactions [ 2 ] ) == "CH2OH <=> methoxy"
166
149
167
150
# test Arkane's interactions with the pdep module
168
151
def test_temperatures_units (self ):
169
152
"""
170
153
Test the Temperature Units.
171
154
"""
172
- assert str (self .TmaxUnits ) == "K"
155
+ assert str (self .pdepjob . Tmax . units ) == "K"
173
156
174
157
def test_temperatures_limits (self ):
175
158
"""
@@ -182,7 +165,7 @@ def test_temperatures_list(self):
182
165
"""
183
166
Test the temperature list.
184
167
"""
185
- assert np .array_equal (self .TlistValue , np .array ([450 , 500 , 678 , 700 ]))
168
+ assert np .array_equal (self .pdepjob . Tlist . value_si , np .array ([450 , 500 , 678 , 700 ]))
186
169
187
170
def test_pressure_limits (self ):
188
171
"""
@@ -195,43 +178,45 @@ def test_pressure_count(self):
195
178
"""
196
179
Test the number pressures specified.
197
180
"""
198
- assert self .Pcount == 7
181
+ assert self .pdepjob . Pcount == 7
199
182
200
183
def test_temperature_count (self ):
201
184
"""
202
185
Test the number temperatures specified.
203
186
"""
204
- assert self .Tcount == 4
187
+ assert self .pdepjob . Tcount == 4
205
188
206
189
def test_pressure_list (self ):
207
190
"""
208
191
Test the pressure list.
209
192
"""
210
- assert np .array_equal (self .PlistValue , np .array ([0.01 , 0.1 , 1 , 3 , 10 , 100 , 1000 ]))
193
+ assert np .array_equal (self .pdepjob .Plist .value , np .array ([0.01 , 0.1 , 1 , 3 , 10 , 100 , 1000 ]))
194
+ assert self .pdepjob .Plist .units == 'atm'
211
195
212
196
def test_generate_temperature_list (self ):
213
197
"""
214
198
Test the generated temperature list.
215
199
"""
216
- assert list (self .GenTlist ) == [450.0 , 500.0 , 678.0 , 700.0 ]
200
+ assert list (self .pdepjob . generate_T_list () ) == [450.0 , 500.0 , 678.0 , 700.0 ]
217
201
218
202
def test_maximum_grain_size_value (self ):
219
203
"""
220
204
Test the max grain size value.
221
205
"""
222
- assert self .maximum_grain_size_value == 0.5
206
+ assert self .pdepjob .maximum_grain_size .value == 0.5
207
+ assert self .pdepjob .maximum_grain_size .units == 'kcal/mol'
223
208
224
209
def test_method (self ):
225
210
"""
226
211
Test the master equation solution method chosen.
227
212
"""
228
- assert self .method == "modified strong collision"
213
+ assert self .pdepjob . method == "modified strong collision"
229
214
230
215
def test_rmg_mode (self ):
231
216
"""
232
217
Test the whether or not RMG mode is turned on.
233
218
"""
234
- assert self .rmgmode == False
219
+ assert self .pdepjob . rmgmode == False
235
220
236
221
# Test Arkane's interactions with the kinetics module
237
222
def test_calculate_tst_rate_coefficient (self ):
0 commit comments