Skip to content

Commit 6acd290

Browse files
committed
Tests: create NO2 to ONO perception test an individual tst
and a minor efficiency improvement
1 parent 85060fc commit 6acd290

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

arc/species/converter_test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3370,6 +3370,7 @@ def test_molecules_from_xyz(self):
33703370
self.assertEqual(b_mol.multiplicity, 1)
33713371
self.assertFalse(any(atom.radical_electrons for atom in b_mol.atoms))
33723372

3373+
def test_ono_xyz(self):
33733374
c2h5no2_xyz = """O 0.62193295 1.59121319 -0.58381518
33743375
N 0.43574593 0.41740669 0.07732982
33753376
O 1.34135576 -0.35713755 0.18815532
@@ -3388,9 +3389,10 @@ def test_molecules_from_xyz(self):
33883389
)
33893390
self.assertEqual(s_mol.get_net_charge(), 0)
33903391
self.assertEqual(b_mol.get_net_charge(), 0)
3391-
self.assertIn('[N+]', b_mol.to_smiles())
3392-
self.assertIn('[O-]', b_mol.to_smiles())
3393-
self.assertIn('=O', b_mol.to_smiles())
3392+
smiles = b_mol.to_smiles()
3393+
self.assertIn('[N+]', smiles)
3394+
self.assertIn('[O-]', smiles)
3395+
self.assertIn('=O', smiles)
33943396

33953397
def test_unsorted_xyz_mol_from_xyz(self):
33963398
"""Test atom order conservation when xyz isn't sorted with heavy atoms first"""

0 commit comments

Comments
 (0)