Skip to content

Commit 4c9f2b9

Browse files
committed
Tests: converter.add_bond_order_to_s_mol()
1 parent 6e0d645 commit 4c9f2b9

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

arc/species/converter_test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4236,6 +4236,16 @@ def test_order_atoms(self):
42364236
if index1 < index2:
42374237
self.assertIn(index2, bond_dict[index1]) # check that these atoms are connected in all mols
42384238

4239+
def test_add_bond_order_to_s_mol(self):
4240+
"""Test the add_bond_order_to_s_mol function"""
4241+
c2h5no2_bo = ARCSpecies(label='C2H5NO2', smiles='CC[N+](=O)[O-]')
4242+
c2h5no2_s = converter.update_molecule(mol=c2h5no2_bo.mol, to_single_bonds=True)
4243+
c2h5no2_bo_from_s = converter.add_bond_order_to_s_mol(s_mol=c2h5no2_s, bo_mol=c2h5no2_bo.mol)
4244+
smiles = c2h5no2_bo_from_s.copy(deep=True).to_smiles()
4245+
self.assertIn('[N+]', smiles)
4246+
self.assertIn('[O-]', smiles)
4247+
self.assertIn('=O', smiles)
4248+
42394249
def test_is_isomorphic(self):
42404250
"""Test the RMG is_isomorphic method"""
42414251
mol1 = converter.s_bonds_mol_from_xyz(self.xyz1['dict'])

0 commit comments

Comments
 (0)