EXHIBIT 5.1 [Letterhead of Graham & James LLP] May 4, 1998 ATG Inc. 47375 Fremont Boulevard Fremont, California 94538 Ladies and Gentlemen: We have acted as counsel for ATG Inc., a California corporation (the "Company"), in connection with the preparation and filing of a registration statement on Form S-1 (the "Registration Statement") with the Securities and Exchange Commission relating to the public offering by the Company of 1,700,000 shares of its Common Stock, no par value per share, plus an additional 255,000 shares of such Common Stock to cover over-allotments, if any (collectively, the "Shares"). In connection with the opinions expressed herein, we have examined the following documents: (i) the Registration Statement (including exhibits thereto), as amended through the date hereof; (ii) the Articles of Incorporation of the Company, as amended; (iii) the Bylaws of the Company, as amended; (iv) the minute books of the Company; (v) the form of Underwriting Agreement to be executed and delivered by the Company and Van Kasper & Company (the "Underwriting Agreement"); (vi) the form of Common Stock certificate of the Company; and (vii) such other documents as we have deemed necessary or appropriate. In our examinations, we have assumed the genuineness of all signatures, the legal capacity of all natural persons, the authenticity of all documents submitted to us as originals, the conformity to original documents of all documents submitted to us as certified, photostatic or facsimile copies and the authenticity of the originals of such documents. ATG Inc. May 4, 1998 Page 2 Based upon our examination of the foregoing documents, and expressly subject to the assumptions set forth above, it is our opinion that, when issued and paid for upon the effectiveness of the Registration Statement and in accordance with the terms of the Underwriting Agreement and the final Prospectus contained in the Registration Statement, the Shares will be validly issued, fully paid and non-assessable. We consent to the filing of this opinion as an exhibit to the Registration Statement and to the reference to Graham & James LLP under the caption "Legal Matters" in the Prospectus contained within the Registration Statement. Very truly yours, /s/ Graham & James LLP GRAHAM & JAMES LLP