Skip to content

Commit

Permalink
fix test nearest structure to match criteria in wfnsympy
Browse files Browse the repository at this point in the history
  • Loading branch information
abelcarreras committed Jul 14, 2022
1 parent 36e2892 commit 78f7de5
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tests/test_symgroup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import unittest

import numpy as np

from cosymlib import file_io
from numpy import testing
from cosymlib.molecule.geometry import Geometry
Expand Down Expand Up @@ -47,10 +50,11 @@ def test_symmetry_measure(self):

def test_symmetry_nearest(self):
nearest = self._geometry.get_symmetry_nearest_structure('C5').get_positions()
# print(nearest)
reference = [[ 4.05078542e-01, -1.24670356e+00, 0.00000000e+00],
[ 1.31086170e+00, -1.33226763e-16, 0.00000000e+00],
[ 4.05078542e-01, 1.24670356e+00, 0.00000000e+00],
[-1.06050939e+00, 7.70505174e-01, 0.00000000e+00],
[-1.06050939e+00, -7.70505174e-01, 0.00000000e+00]]

reference = [[ 4.97849193e-01, -1.24670356e+00, 0.00000000e+00],
[ 1.40363235e+00, -1.33226763e-16, 0.00000000e+00],
[ 4.97849193e-01, 1.24670356e+00, 0.00000000e+00],
[-9.67738740e-01, 7.70505174e-01, 0.00000000e+00],
[-9.67738740e-01, -7.70505174e-01, 0.00000000e+00]]

testing.assert_array_almost_equal(nearest, reference, decimal=6)

0 comments on commit 78f7de5

Please sign in to comment.