Skip to content

Commit

Permalink
check for atomtype presence before removal
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohnson541 committed Mar 16, 2024
1 parent 7e2b3f8 commit 7f76e04
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions rmgpy/molecule/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -1419,10 +1419,11 @@ def get_extensions(self, r=None, r_bonds=None, r_un=None, basename='', atm_ind=N
r = [ATOMTYPES[x] for x in r]

R = r[:]
R.remove(ATOMTYPES['X'])
if ATOMTYPES['X'] in R:
R.remove(ATOMTYPES['X'])
RnH = R[:]

RnH.remove(ATOMTYPES['H'])
if ATOMTYPES['H'] in RnH:
RnH.remove(ATOMTYPES['H'])

atoms = self.atoms
if atm_ind is None:
Expand Down

0 comments on commit 7f76e04

Please sign in to comment.