XYZ to SMILES Converter
XYZ only stores atom positions. Converting to SMILES means inferring the bonding pattern from geometry — handy for structures coming out of quantum chemistry.
How bonds are inferred
An XYZ file lists element symbols and Cartesian coordinates with no bond information. OpenBabel computes an interatomic distance for every atom pair and assigns a bond when the distance falls within the covalent radii sum, then perceives bond orders from valence rules.
Where this works well
- Optimised geometries from quantum chemistry packages (Gaussian, ORCA, Q-Chem)
- Structures exported from molecular dynamics snapshots
- Simple organic molecules with clean, undistorted geometries
Where it fails
Transition-metal complexes, unusual valences and stretched or compressed bonds often produce wrong bond orders. Always compare the SMILES against the structure you started with.