Skip to content

Commit

Permalink
Tests: converter.add_bond_order_to_s_mol()
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Oct 28, 2024
1 parent 6e0d645 commit 4c9f2b9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arc/species/converter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4236,6 +4236,16 @@ def test_order_atoms(self):
if index1 < index2:
self.assertIn(index2, bond_dict[index1]) # check that these atoms are connected in all mols

def test_add_bond_order_to_s_mol(self):
"""Test the add_bond_order_to_s_mol function"""
c2h5no2_bo = ARCSpecies(label='C2H5NO2', smiles='CC[N+](=O)[O-]')
c2h5no2_s = converter.update_molecule(mol=c2h5no2_bo.mol, to_single_bonds=True)
c2h5no2_bo_from_s = converter.add_bond_order_to_s_mol(s_mol=c2h5no2_s, bo_mol=c2h5no2_bo.mol)
smiles = c2h5no2_bo_from_s.copy(deep=True).to_smiles()
self.assertIn('[N+]', smiles)
self.assertIn('[O-]', smiles)
self.assertIn('=O', smiles)

def test_is_isomorphic(self):
"""Test the RMG is_isomorphic method"""
mol1 = converter.s_bonds_mol_from_xyz(self.xyz1['dict'])
Expand Down

0 comments on commit 4c9f2b9

Please sign in to comment.