I'm surprised that no one mentioned RDKIT. It's an open source cheminformatics platform. It provides software to read and write multiple molecule file formats.
It even has a chemical search feature implemented as a PostgreSQL extension.
https://www.rdkit.org/