Skip to content

Commit

Permalink
Tests: create NO2 to ONO perception test an individual tst
Browse files Browse the repository at this point in the history
and a minor efficiency improvement
  • Loading branch information
alongd committed Oct 26, 2024
1 parent 66060d8 commit eda345f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arc/species/converter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3370,6 +3370,7 @@ def test_molecules_from_xyz(self):
self.assertEqual(b_mol.multiplicity, 1)
self.assertFalse(any(atom.radical_electrons for atom in b_mol.atoms))

def test_ono_xyz(self):
c2h5no2_xyz = """O 0.62193295 1.59121319 -0.58381518
N 0.43574593 0.41740669 0.07732982
O 1.34135576 -0.35713755 0.18815532
Expand All @@ -3388,9 +3389,10 @@ def test_molecules_from_xyz(self):
)
self.assertEqual(s_mol.get_net_charge(), 0)
self.assertEqual(b_mol.get_net_charge(), 0)
self.assertIn('[N+]', b_mol.to_smiles())
self.assertIn('[O-]', b_mol.to_smiles())
self.assertIn('=O', b_mol.to_smiles())
smiles = b_mol.to_smiles()
self.assertIn('[N+]', smiles)
self.assertIn('[O-]', smiles)
self.assertIn('=O', smiles)

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

0 comments on commit eda345f

Please sign in to comment.