Closed bobleesj closed 1 month ago
https://github.com/bobleesj/cifkit/issues/7 has been fixed
The following test has been added to ensure duplicate points are removed for .cif files with atomic mixing.
.cif
@pytest.mark.fast def test_remove_duplicate_connections(): connections = { "CoM1": [ ("CoM1", 2.618, [-1.33, -0.768, 1.06], [-1.33, 0.768, -1.06]), ("OsM2", 2.618, [-1.33, -0.768, 1.06], [-2.66, -1.536, 3.18]), ("CoM1", 2.618, [-1.33, -0.768, 1.06], [-2.66, -1.536, 3.18]), ("OsM2", 2.618, [-1.33, -0.768, 1.06], [-2.66, -1.536, -1.06]), ("OsM2", 2.618, [-1.33, -0.768, 1.06], [0.0, -1.536, 3.18]), ("OsM2", 2.618, [-1.33, -0.768, 1.06], [-1.33, 0.768, 3.18]), ], "OsM2": [ ("OsM2", 2.618, [1.33, -0.768, 1.06], [2.66, -1.536, 3.18]), ("CoM1", 2.618, [1.33, -0.768, 1.06], [1.33, 0.768, 3.18]), ("OsM2", 2.618, [1.33, -0.768, 1.06], [1.33, 0.768, -1.06]), ("OsM2", 2.618, [1.33, -0.768, 1.06], [0.0, -1.536, 3.18]), ("CoM1", 2.618, [1.33, -0.768, 1.06], [1.33, 0.768, -1.06]), ("CoM1", 2.618, [1.33, -0.768, 1.06], [2.66, -1.536, 3.18]), ], } assert remove_duplicate_connections(connections) == { "CoM1": [ ("CoM1", 2.618, [-1.33, -0.768, 1.06], [-1.33, 0.768, -1.06]), ("OsM2", 2.618, [-1.33, -0.768, 1.06], [-2.66, -1.536, 3.18]), ("OsM2", 2.618, [-1.33, -0.768, 1.06], [-2.66, -1.536, -1.06]), ("OsM2", 2.618, [-1.33, -0.768, 1.06], [0.0, -1.536, 3.18]), ("OsM2", 2.618, [-1.33, -0.768, 1.06], [-1.33, 0.768, 3.18]), ], "OsM2": [ ("OsM2", 2.618, [1.33, -0.768, 1.06], [2.66, -1.536, 3.18]), ("CoM1", 2.618, [1.33, -0.768, 1.06], [1.33, 0.768, 3.18]), ("OsM2", 2.618, [1.33, -0.768, 1.06], [1.33, 0.768, -1.06]), ("OsM2", 2.618, [1.33, -0.768, 1.06], [0.0, -1.536, 3.18]), ], }
Adding a polyhedron generated with atomic mixing.
https://github.com/bobleesj/cifkit/issues/7 has been fixed
The following test has been added to ensure duplicate points are removed for
.cif
files with atomic mixing.