1 EXHIBIT 5 February 13, 1996 Genome Therapeutics Corp. 100 Beaver Street Waltham, Massachusetts 02154 Re: Registration Statement on Form S-3 (No. 333-00127) ------------------------- Ladies and Gentlemen: This opinion is rendered to you in connection with the above-mentioned registration statement (the "Registration Statement") on Form S-3 filed with the Securities and Exchange Commission under the Securities Act of 1933, as amended (the "Act"), for the registration under the Act by Genome Therapeutics Corp. (the "Company") of up to 2,875,000 shares of the Company's Common Stock, $0.10 par value per share (the "Shares"). The Shares are to be sold pursuant to an underwriting agreement (the "Underwriting Agreement") to be entered into between the Company and the underwriter named herein (the "Underwriter"). We have acted as counsel to the Company in connection with the issuance and sale of the Shares and the preparation of the Registration Statement. For purposes of this opinion, we have examined and relied upon such documents and records as we have deemed necessary. We have assumed that the Underwriting Agreement will have been duly executed and delivered, all in accordance with the authorizing resolutions of the Board of Directors of the Company, and that the Shares will be sold and transferred only upon payment therefor and as provided in the Underwriting Agreement. Based upon the foregoing, we are of the opinion that the Shares have been duly authorized and when issued, delivered, and paid for as provided in the Underwriting Agreement will be validly issued, fully-paid and nonassessable. We hereby consent to the filing of this opinion as part of the Registration Statement and to the use of our name therein and in the related prospectus under the caption "Legal Matters." It is understood that this opinion is to be used only in connection with the offer and sale of the Shares while the Registration Statement is in effect. Very truly yours, /s/ ROPES & GRAY -------------------------------- Ropes & Gray