Skip to content

Commit 0824273

Browse files
rwestJacksonBurns
authored andcommitted
Add commentary.
1 parent 98b28de commit 0824273

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

rmgpy/data/thermo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,10 @@ def remove_group(self, group_to_remove):
813813
groups we also, need to re-point any unicode thermo_data that may
814814
have pointed to the entry.
815815
816-
Returns the removed group
816+
This is not (as of 2024/03) used within RMG-Py, but could be useful for
817+
people making ancillary scripts to manipulate or edit the database.
818+
819+
Returns the removed group.
817820
"""
818821

819822
# First call base class method

test/rmgpy/data/thermoTest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,8 +1673,12 @@ def test_remove_group(self):
16731673
group_to_remove2 = rad_group.entries["CsJ"]
16741674
rad_group.remove_group(group_to_remove2)
16751675
# If group_to_remove was a data object, we point toward parent instead
1676+
# RJ2_triplet pointed to CsJ, which had data
1677+
# After we remove CsJ, RJ2_triplet points to the parent, which was RJ
16761678
assert rad_group.entries["RJ2_triplet"].data == group_to_remove2.parent.label
16771679
# If the parent pointed toward group_to_remove, we need should have copied data object
1680+
# RJ used to just point at CJ, which pointed at CsJ. After we remove CsJ,
1681+
# RJ should contain the data copied from CsJ
16781682
Tlist = [300, 400, 500, 600, 800, 1000, 1500]
16791683
assert not isinstance(group_to_remove2.parent.data, str)
16801684
assert group_to_remove2.parent.data.get_enthalpy(298) == group_to_remove2.data.get_enthalpy(298)

0 commit comments

Comments
 (0)