zincware / MDSuite

A post-processing engine for particle simulations
https://mdsuite.readthedocs.io/
Eclipse Public License 2.0
36 stars 7 forks source link

Species handling struggles with `_` #490

Open PythonFZ opened 2 years ago

PythonFZ commented 2 years ago

Describe the bug This is just one example https://github.com/zincware/MDSuite/blob/6ed32d47a62b3719c96f0dc6cbc7fb61d21f9099/mdsuite/calculators/radial_distribution_function.py#L313 that failes if the species contain _ e.g. Na_1

also a bit related to #486

SamTov commented 2 years ago

That can certainly happen in some simulations. There is a possible approach to this I would like to discuss at the general meeting.

PythonFZ commented 2 years ago

That can certainly happen in some simulations. There is a possible approach to this I would like to discuss at the general meeting.

If you have a good idea can you briefly describe it here?

christophlohrmann commented 2 years ago

is there a way to keep it internally as tuple(str) and just convert it to the underscore-string when returning it to the user?

tuple means it is fixed order and can be used as a dict key if needed