Skip to content

Commit

Permalink
Test: added sort_atom_labels flag to test
Browse files Browse the repository at this point in the history
  • Loading branch information
kfir4444 committed Aug 15, 2022
1 parent 65ff863 commit bb985c3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions arc/species/speciesTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,32 @@ def test_scissors(self):
self.assertTrue(cycle_scissors[0].mol.is_isomorphic(ARCSpecies(label="check",smiles ="[CH2+]C[CH2+]").mol))
self.assertEqual(len(cycle_scissors), 1)

benzyl_alcohol = ARCSpecies(label='benzyl_alcohol', smiles='c1ccccc1CO',
xyz="""O 2.64838903 0.03033680 1.02963866
C 2.08223673 -0.09327854 -0.26813441
C 0.58011672 -0.03951284 -0.19914397
C -0.09047623 1.18918897 -0.26985124
C -0.16442536 -1.21163631 -0.00891767
C -1.48186739 1.24136671 -0.17379396
C -2.21381021 0.06846364 0.00253129
C -1.55574847 -1.15724814 0.08689917
H 2.47222737 0.71379644 -0.89724902
H 2.41824638 -1.03876722 -0.70676479
H 0.46950724 2.11319745 -0.39919154
H -1.99496868 2.19776599 -0.23432175
H -3.29735459 0.10998171 0.07745660
H -2.12646340 -2.07132623 0.22966400
H 0.33744916 -2.17418164 0.06678265
H 1.91694170 0.12185320 1.66439598""")
benzyl_alcohol.bdes = [(7, 13)]
benzyl_alcohol.final_xyz = benzyl_alcohol.get_xyz()
species = benzyl_alcohol.scissors(sort_atom_labels=True)
for spc in species:
if spc.label != 'H':
for i, atom in enumerate(spc.mol.atoms):
if atom.radical_electrons:
self.assertEqual(i, 6)

def test_net_charged_species(self):
"""Test that we can define, process, and manipulate ions"""
nh4 = ARCSpecies(label='NH4', smiles='[NH4+]', charge=1)
Expand Down

0 comments on commit bb985c3

Please sign in to comment.