We present new computational methodology for designing polymers, such as polypeptides and polyelectrolytes, which can selectively recognize nanostructured substrates. The methodology applies to polymers which might be used to: control placement and assembly for electronic devices, template structure during materials synthesis, as well as add new biological and chemical functionality to surfaces. Optimization of the polymer configurational sequence permits enhancement of both binding energy on and binding selectivity between one or more atomistic surfaces. A novel Continuous Rotational Isomeric State (CRIS) method permits continuous backbone torsion sampling and is seen to be critical in binding optimization problems where chain flexibility is important. We illustrate selective polypeptide binding between either analytic, uniformly charged surfaces or atomistic GaAs(100), GaAs(110) and GaAs(111) surfaces. Computational results compare very favorably with prior experimental phage display observations [S.R. Whaley et al., Nature, 405, 665 (2000)] for GaAs substrates. Further investigation indicates that chain flexibility is important to exhibit selective binding between surfaces of similar charge density. Such chains begin with sequences which repel the surfaces, continue with sequences that attract the surface and end with sequences that neither attract nor repel strongly.