Open-shell valence configuration-interaction studies of diatomic and polyatomic molecules