Skip to content

Commit

Permalink
Remove code duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
bjkreitz authored and rwest committed Nov 20, 2024
1 parent ce72ac9 commit 6f5c1c8
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions rmgpy/molecule/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,17 +418,6 @@ def _generate_coordinates(self, fix_surface_sites=True):
coordinates[i1, 1] -= 0.2
coordinates[i2, 1] += 0.2

# If two atoms lie on top of each other, push them apart a bit
# This is ugly, but at least the mess you end up with isn't as misleading
# as leaving everything piled on top of each other at the origin
for atom1, atom2 in itertools.combinations(backbone, 2):
i1, i2 = atoms.index(atom1), atoms.index(atom2)
if np.linalg.norm(coordinates[i1, :] - coordinates[i2, :]) < 0.5:
coordinates[i1, 0] -= 0.3
coordinates[i2, 0] += 0.3
coordinates[i1, 1] -= 0.2
coordinates[i2, 1] += 0.2

# Center backbone at origin
xmin = np.min(coordinates[:, 0])
xmax = np.max(coordinates[:, 0])
Expand Down

0 comments on commit 6f5c1c8

Please sign in to comment.