@@ -2188,6 +2188,29 @@ def test_determine_multiplicity(self):
21882188 ch_ts = ARCSpecies (label = 'C--H-TS' , xyz = 'C 0 0 0\n H 1 2 5' , is_ts = True )
21892189 self .assertEqual (ch_ts .multiplicity , 2 )
21902190
2191+ ts_1_xyz = """H -2.99394700 1.00970200 0.09451400
2192+ O -4.10192200 0.13578500 -0.05953100
2193+ H -4.43761000 -0.35213100 0.70859500
2194+ C -2.22272000 0.16048700 -0.01004900
2195+ O -1.59892700 -0.79618100 0.08758500"""
2196+ ts_1_spc = ARCSpecies (label = 'TS1' , is_ts = True , xyz = ts_1_xyz )
2197+ self .assertEqual (ts_1_spc .multiplicity , 1 )
2198+
2199+ ts_1_spc_from_dict = ARCSpecies (species_dict = {'label' : 'TS1' , 'is_ts' : True , 'xyz' : ts_1_xyz })
2200+ self .assertEqual (ts_1_spc_from_dict .multiplicity , 1 )
2201+
2202+ # Test a known doublet TS from a Gaussian output file (NH3 + H = NH2 + H2).
2203+ # Verify that xyz-based electron counting (11 electrons → mult 2) wins over mol.multiplicity.
2204+ ts_doublet_path = os .path .join (ARC_TESTING_PATH , 'freq' , 'TS_NH3+H=NH2+H2.out' )
2205+ ts_doublet = ARCSpecies (label = 'TS_NH3+H' , is_ts = True , xyz = ts_doublet_path )
2206+ self .assertIsNotNone (ts_doublet .mol )
2207+ self .assertEqual (ts_doublet .multiplicity , 2 )
2208+ # Simulate a mol that incorrectly perceives multiplicity as 1, and verify xyz detection still gives 2.
2209+ ts_doublet .multiplicity = None
2210+ ts_doublet .mol .multiplicity = 1
2211+ ts_doublet .determine_multiplicity_from_xyz ()
2212+ self .assertEqual (ts_doublet .multiplicity , 2 )
2213+
21912214 def test_cluster_tsgs (self ):
21922215 """Test the cluster_tsgs() method."""
21932216 xyz_1 = """N 0.9177905887 0.5194617797 0.0000000000
0 commit comments