If a user accidentally provides a repeated element when querying for entries in a chemical system, then the current behavior of the MPRester.get_entries_in_chemsys method returns duplicate entries. I ran into this in a real application when I was querying for a much larger system and had a duplicate element added.
with MPRester() as mpr:
entries = mpr.get_entries_in_chemsys("Ti-Ti")
print(len(entries))
print(len(set(entries)))
returns:
20
10
I will open a PR to delete duplicate elements from the user's request, as I think this should be the default behavior.
If a user accidentally provides a repeated element when querying for entries in a chemical system, then the current behavior of the
MPRester.get_entries_in_chemsys
method returns duplicate entries. I ran into this in a real application when I was querying for a much larger system and had a duplicate element added.returns:
I will open a PR to delete duplicate elements from the user's request, as I think this should be the default behavior.