@@ -605,6 +605,8 @@ def test_get_all_families(self):
605
605
families = get_all_families (consider_rmg_families = False )
606
606
self .assertIsInstance (families , list )
607
607
self .assertIn ('hydrolysis' , families )
608
+ families = get_all_families (rmg_family_set = ['H_Abstraction' ])
609
+ self .assertEqual (families , ['H_Abstraction' ])
608
610
609
611
def test_get_rmg_recommended_family_sets (self ):
610
612
"""Test getting RMG recommended family sets"""
@@ -638,12 +640,12 @@ def test_load(self):
638
640
self .assertFalse (fam_2 .own_reverse )
639
641
self .assertEqual (fam_2 .reactants , [['Root' ]])
640
642
self .assertEqual (fam_2 .product_num , 2 )
641
- self .assertEqual (fam_2 .entries , {'Root' : """1 *3 R!H u0 {2,S} {3,[S,D]}
642
- 2 *4 R!H u0 {1,S} {4,[S,D]}
643
- 3 *2 R!H u0 {1,[S,D]} {5,[D,T,B]}
644
- 4 *5 R!H u0 {2,[S,D]} {6,S}
645
- 5 *1 R!H u0 {3,[D,T,B]}
646
- 6 *6 H u0 {4,S}""" })
643
+ self .assertEqual (fam_2 .entries , {'Root' : """1 *3 R!H u0 {2,S} {3,[S,D]}
644
+ 2 *4 R!H u0 {1,S} {4,[S,D]}
645
+ 3 *2 R!H u0 {1,[S,D]} {5,[D,T,B]}
646
+ 4 *5 R!H u0 {2,[S,D]} {6,S}
647
+ 5 *1 R!H u0 {3,[D,T,B]}
648
+ 6 *6 [H,Li] u0 {4,S}""" })
647
649
self .assertEqual (fam_2 .actions , [['CHANGE_BOND' , '*1' , - 1 , '*2' ],
648
650
['BREAK_BOND' , '*5' , 1 , '*6' ],
649
651
['BREAK_BOND' , '*3' , 1 , '*4' ],
@@ -960,6 +962,17 @@ def test_get_isomorphic_subgraph(self):
960
962
)
961
963
self .assertEqual (isomorphic_subgraph , {0 : '*3' , 4 : '*1' , 7 : '*2' })
962
964
965
+ # def test_order_species_list(self):
966
+ # """Test the order_species_list() function"""
967
+ # spc1 = ARCSpecies(label='spc1', smiles='C')
968
+ # spc2 = ARCSpecies(label='spc2', smiles='CC')
969
+ # ordered_species_list = order_species_list(species_list=[spc2, spc1], reference_species=[spc1, spc2])
970
+ # self.assertEqual(ordered_species_list, [spc1, spc2])
971
+ # ordered_species_list = order_species_list(species_list=[spc2, spc1], reference_species=[spc2, spc1])
972
+ # self.assertEqual(ordered_species_list, [spc2, spc1])
973
+ # ordered_species_list = order_species_list(species_list=[spc2.mol, spc1], reference_species=[spc2, spc1.mol])
974
+ # self.assertEqual(ordered_species_list, [spc2.mol, spc1])
975
+
963
976
964
977
if __name__ == '__main__' :
965
978
unittest .main (testRunner = unittest .TextTestRunner (verbosity = 2 ))
0 commit comments