Skip to content

Commit

Permalink
update: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Sep 9, 2024
1 parent 32461ef commit 4b04911
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/py/mat3ra/made/basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ def to_crystal(self):
def add_atom(self, element="Si", coordinate=None, force=False):
if coordinate is None:
coordinate = [0, 0, 0]
cartesian_basis = self.copy()
cartesian_basis.to_cartesian()
cartesian_coordinates = [self.cell.convert_point_to_cartesian(coord) for coord in self.coordinates.values]
cartesian_coordinate = self.cell.convert_point_to_cartesian(coordinate)
if get_overlapping_coordinates(cartesian_coordinate, cartesian_basis.coordinates.values, threshold=0.1):
if get_overlapping_coordinates(cartesian_coordinate, cartesian_coordinates, threshold=0.01):
if force:
print(f"Warning: Overlapping coordinates found for {coordinate}. Adding atom anyway.")
else:
Expand Down

0 comments on commit 4b04911

Please sign in to comment.