Substance abuse is by no means less prevalent in the sciences. In fact, Adderall abuse in particular is arguably worse among STEM majors.
If legality is the issue, then don’t drink or do drugs. That’s simple enough. Being bothered by other people doing them is a very different issue. Substance-free housing was a good suggestion.
At my undergrad, a top private university – which has a reputation as a “work hard, party hard” school, mind you – 55% of students reported in a campus climate survey that virtually none of their social time with friends was spent drinking. A similar percentage reported themselves non-drinkers. That is PLENTY of people to hang out with.