Structure and ecological adaptation