What are good principles in designing a software library for the use of scientists in a specific discipline? By this I mean areas such as chemistry, physics, materials science, microscopy, bioassays, astronomy, etc. I exclude generic libraries such as SciPy, R, Matlab, JAMA, etc. which cover a range of disciplines or are specifically mathematical or for data analysis. (Currently a number of us are involved in building open source libraries in chemistry and it would be valuable to know of experience from other domains).
I appreciate that this is an ambitious task and it is not easy to get funded but it is becoming increasingly important for reproducible and verifiable science.
It should allow its users--scientists--to do science in that domain instead of programming. The less traction have purely programming concepts, as "handlers", "controllers", "pointers", "memory leaks" etc, the better it fits your end-users;
It should allow people, who find your lib interesting, to maintain it after you abandon it. Shorter, it should not be developed as "throwaway code" or it should be done in a "good" wat. See your own question on that matter.
To design an API an expert, who will use this library, should be involved. He should know, what a usual problem-solving program requires from the library you're writing and define the main concepts you're to implement. Design your API after what the expert says, not in the way you see it. If you're the expert as well, then whatever, invite another guy, who's not involved in development. The reason is that developers tend to design the API in the way they see natural, the way natural for the implementation. Whereas it should be natural for problems it's involved into.