Skip to content

Commit

Permalink
Change default Compound.remove keyword, reset_labels, to True
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclark5 committed Mar 20, 2024
1 parent ab86033 commit 832c8a2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion mbuild/compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ def add(
"outside of the defined simulation box"
)

def remove(self, objs_to_remove, reset_labels=False):
def remove(self, objs_to_remove, reset_labels=True):
"""Remove children from the Compound cleanly.
Parameters
Expand Down
1 change: 0 additions & 1 deletion mbuild/tests/test_compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,6 @@ def test_remove(self, ethane):
hydrogens = ethane7.particles_by_name("H")
ethane7.remove(hydrogens, reset_labels=True)

print(list(ethane7.labels.keys()))
assert list(ethane7.labels.keys()) == [
"C",
"C[0]",
Expand Down

0 comments on commit 832c8a2

Please sign in to comment.