Skip to content

Commit 402ede5

Browse files
committed
Fix docstring for Composition.__ge__.
1 parent d3c3b65 commit 402ede5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pymatgen/core/composition.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ def __eq__(self, other: object) -> bool:
193193
return all(abs(amt - other[el]) <= type(self).amount_tolerance for el, amt in self.items())
194194

195195
def __ge__(self, other: object) -> bool:
196-
"""Composition greater than or equal to. We consider compositions A >= B
197-
if all elements in B are in A and the amount of each element in A is
198-
greater than or equal to the amount of the element in B within
199-
Composition.amount_tolerance.
196+
"""Composition greater than or equal to. We sort the elements in the compositions in order of
197+
electronegativity. The amount of the most electropositive element that is not equal within a certain
198+
tolerance factor is used to make a comparison. Note that an element not present in a Composition has an implied
199+
amount of 0.
200200
201201
Should ONLY be used for defining a sort order (the behavior is probably not what you'd expect).
202202
"""

0 commit comments

Comments
 (0)