Skip to content

Commit

Permalink
remove duplicate code
Browse files Browse the repository at this point in the history
  • Loading branch information
bjkreitz committed Nov 19, 2024
1 parent a6c14ae commit 94aee97
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions rmgpy/molecule/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,18 +405,6 @@ def _generate_coordinates(self):
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
import itertools
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 94aee97

Please sign in to comment.