| 27 | } |
| 28 | |
| 29 | std::optional<AtomData::Type> findAtomTypeBySymbol(std::string_view speciesName) { |
| 30 | const std::string atomSymbol = normalizeAtomSymbol(std::string(speciesName)); |
| 31 | for (size_t i = 0; i < static_cast<size_t>(AtomData::Type::COUNT); ++i) { |
| 32 | const AtomData::Type type = static_cast<AtomData::Type>(i); |
| 33 | if (AtomData::symbol(type) == atomSymbol) { |
| 34 | return type; |
| 35 | } |
| 36 | } |
| 37 | return std::nullopt; |
| 38 | } |
| 39 | |
| 40 | } // namespace |
| 41 |
no test coverage detected