<PAGE>   1
                                                                    EXHIBIT 10.3

                                                                  EXECUTION COPY

                                                                       EXHIBIT C
                                                                   TO SECURITIES
                                                                        PURCHASE
                                                                       AGREEMENT


                                     SECOND
                          REGISTRATION RIGHTS AGREEMENT

        REGISTRATION RIGHTS AGREEMENT (this "AGREEMENT"), dated as of June 29,
2001, by and among ViroLogic, Inc., a corporation organized under the laws of
the State of Delaware (the "COMPANY"), and the undersigned (together with its
affiliates, the "INITIAL INVESTORS").

                                    WHEREAS:

        A. In connection with the Securities Purchase Agreement, dated as of
June 29, 2001, by and among the Company and the Initial Investors (the
"SECURITIES PURCHASE AGREEMENT"), the Company has agreed, upon the terms and
subject to the conditions contained therein, to issue and sell to the Initial
Investors (i) shares of its Series A Convertible Preferred Stock (the "PREFERRED
STOCK") that are convertible into shares of the Company's common stock, par
value $.001 per share (the "COMMON STOCK"), upon the terms and subject to the
limitations and conditions set forth in the Certificate of Designations, Rights
and Preferences with respect to such Preferred Stock (the "CERTIFICATE OF
DESIGNATION") and (ii) warrants (the "WARRANTS") to acquire shares of Common
Stock. The shares of Common Stock issuable upon conversion of or otherwise
pursuant to the Preferred Stock are referred to herein as the "CONVERSION
SHARES" and the shares of Common Stock issuable upon exercise of or otherwise
pursuant to the Warrants are referred to herein as the "WARRANT SHARES."

        B. To induce the Initial Investors to execute and deliver the Securities
Purchase Agreement, the Company has agreed to provide certain registration
rights under the Securities Act of 1933, as amended, and the rules and
regulations thereunder, or any similar successor statute (collectively, the
"SECURITIES ACT"), and applicable state securities laws.

        NOW, THEREFORE, in consideration of the premises and the mutual
covenants contained herein and other good and valuable consideration, the
receipt and sufficiency of which are hereby acknowledged, the Company and the
Initial Investors hereby agree as follows:



<PAGE>   2


        1. DEFINITIONS.

           (a) As used in this Agreement, the following terms shall have the
following meanings:

               (i) "INVESTORS" means the Initial Investors and any transferees
or assignees who agree to become bound by the provisions of this Agreement in
accordance with Section 9 hereof.

               (ii) "REGISTER," "REGISTERED," and "REGISTRATION" refer to a
registration effected by preparing and filing a Registration Statement or
Statements in compliance with the Securities Act and pursuant to Rule 415 under
the Securities Act or any successor rule providing for offering securities on a
continuous basis ("RULE 415"), and the declaration or ordering of effectiveness
of such Registration Statement by the United States Securities and Exchange
Commission (the "SEC").

               (iii) "REGISTRABLE SECURITIES" means (a) the Conversion Shares,
(b) the Warrant Shares and (c) any shares of capital stock issued or issuable,
from time to time (with any adjustments), as a distribution on or in exchange
for or otherwise with respect to any of the foregoing, whether as default
payments or otherwise.

               (iv) "REGISTRATION STATEMENT" means a registration statement of
the Company under the Securities Act.

           (b) Capitalized terms used herein and not otherwise defined herein
shall have the respective meanings set forth in the Securities Purchase
Agreement.

        2. REGISTRATION.

           (a) Mandatory Registration. The Company shall use its best efforts to
prepare promptly and file with the SEC as soon as practicable, but in no event
later than the thirtieth (30th) day following the Second Closing Date (the
"FILING DATE"), a Registration Statement on Form S-3 (or, if Form S-3 is not
then available, on such form of Registration Statement as is then available to
effect a registration of all of the Registrable Securities, subject to the
consent of the Initial Investors) covering the resale of at least 9,491,666. The
Registration Statement filed hereunder, to the extent allowable under the
Securities Act and the Rules promulgated thereunder (including Rule 416), shall
state that such Registration Statement also covers such indeterminate number of
additional shares of Common Stock as may become issuable upon conversion of the
Preferred Stock and exercise of the Warrants to prevent dilution resulting from
stock splits, stock dividends or similar transactions. The Registrable
Securities included in the Registration Statement shall be allocated to the
Investors as set forth in Section 12(k) hereof. The Registration Statement (and
each amendment or supplement


                                       2
<PAGE>   3

thereto, and each request for acceleration of effectiveness thereof) shall be
provided to (and subject to the approval of, which shall not be unreasonably
withheld) the Initial Investors and its counsel prior to its filing or other
submission.

           (b) Payments by the Company. The Company shall use its best efforts
to cause the Registration Statement required to be filed pursuant to Section
2(a) hereof to become effective as soon as practicable, but in no event later
than the sixtieth (60th) day following the Filing Date. At the time of
effectiveness, the Company shall ensure that such Registration Statement covers
all of the Registrable Securities issuable at such time pursuant to the
Preferred Stock and the Warrants (including, if necessary, by filing an
amendment prior to the effective date of the Registration Statement to increase
the number of shares covered thereby). If (i) (A) the Registration Statement
required to be filed by the Company pursuant to Section 2(a) hereof is not filed
with the SEC prior to the Filing Date or declared effective by the SEC on or
before the ninetieth (90th) day after the Filing Date (the "REGISTRATION
DEADLINE") or (B) any Registration Statement required to be filed by the Company
pursuant to Section 4(b) hereof is not declared effective by the SEC within
sixty (60) days after the applicable Registration Trigger Date (as defined in
Section 4(b) hereof), or (ii) if, after any such Registration Statement has been
declared effective by the SEC, sales of any of the Registrable Securities
required to be covered by such Registration Statement (including any Registrable
Securities required to be registered pursuant to Section 4(b) hereof) cannot be
made pursuant to such Registration Statement (by reason of a stop order or the
Company's failure to update the Registration Statement or any other reason
outside the control of the Investors), except as otherwise provided herein or
(iii) the Common Stock is not listed or included for quotation on the Nasdaq
National Market ("NNM"), the Nasdaq SmallCap Market ("SMALLCAP"), the New York
Stock Exchange (the "NYSE") or the American Stock Exchange (the "AMEX") at any
time after the Registration Deadline hereunder, then the Company will make
payments to the Investors in such amounts and at such times as shall be
determined pursuant to this Section 2(b) as partial relief for the damages to
the Investors by reason of any such delay in or reduction of their ability to
sell the Registrable Securities (which remedy shall not be exclusive of any
other remedies available at law or in equity). The Company shall pay to each
Investor an amount equal to the product of (i) the aggregate Purchase Price of
the Preferred Stock and Warrants purchased at the Second Closing held by such
Investor (including, without limitation, Preferred Stock that has been converted
into Conversion Shares and Warrants that have been exercised for Warrant Shares
then held by such Investor) (the "AGGREGATE SHARE PRICE"), multiplied by (ii)
two hundredths (.02), for each thirty (30) day period (or portion thereof) (A)
after the Filing Date and prior to the date the Registration Statement is filed
with the SEC pursuant to Section 2(a), (B) after the Registration Deadline and
prior to the date the Registration Statement filed pursuant to Section 2(a) is
declared effective by the SEC, (C) after the sixtieth (60th) day following a
Registration Trigger Date (as defined in Section 4(b)) and prior to the date the
Registration Statement filed pursuant to Section 4(b) hereof is declared
effective by the SEC, and (D) during which sales of any Registrable Securities
cannot be made pursuant to any such Registration Statement after the
Registration Statement has been declared


                                       3
<PAGE>   4

effective or the Common Stock is not listed or included for quotation on the
NNM, SmallCap, NYSE or AMEX; provided, however, that there shall be excluded
from each such period any delays which are solely attributable to changes (other
than corrections of Company mistakes with respect to information previously
provided by the Investors) required by the Investors in the Registration
Statement with respect to information relating to the Investors, including,
without limitation, changes to the plan of distribution. Notwithstanding the
foregoing, in no event shall the Company be required to pay amounts with respect
to (x) both (A) and (B), and (y) both (C) and (D) above for the same period of
time. (For example, if the Registration Statement is not effective by the
Registration Deadline, the Company would pay $20,000 for each thirty (30) day
period thereafter with respect to each $1,000,000 of Aggregate Share Price until
the Registration Statement becomes effective.) Such amounts shall be paid in
cash or, at each Investor's option (subject to such Investor confirming in
status as an "accredited investor" as that term is defined in Rule 501(a) of
Regulation D of the Securities Act), may be convertible into Common Stock at
Market Price (as defined in the Warrants) then in effect, subject to the
limitation set forth in Article IV.D(i) of the Certificate of Designation. Any
shares of Common Stock issued upon conversion of such amounts shall be
Registrable Securities. If the Investor desires to convert the amounts due
hereunder into Registrable Securities it shall so notify the Company in writing
within two (2) business days after the date on which such amounts are first
payable in cash and such amounts shall be so convertible (pursuant to the
mechanics set forth under Article IV of the Certificate of Designation),
beginning on the last day upon which the cash amount would otherwise be due in
accordance with the following sentence. Payments of cash pursuant hereto shall
be made within five (5) days after the end of each period that gives rise to
such obligation, provided that, if any such period extends for more than thirty
(30) days, interim payments shall be made for each such thirty (30) day period.
The requirement to make payments pursuant to this section can be waived as to
all Investors by the written consent of Investors holding a majority of the
Registrable Securities

           (c) Piggy-Back Registrations. If at any time prior to the expiration
of the Registration Period (as hereinafter defined) the Company shall file with
the SEC a Registration Statement relating to an offering for its own account or
the account of others under the Securities Act of any of its equity securities
(other than on Form S-4 or Form S-8 or their then equivalents relating to equity
securities to be issued solely in connection with any acquisition of any entity
or business or equity securities issuable in connection with stock option or
other employee benefit plans), the Company shall send to each Investor written
notice of such determination and, if within fifteen (15) days after the date of
such notice, such Investor shall so request in writing, the Company shall
include in such Registration Statement all or any part of the Registrable
Securities such Investor requests to be registered, except that if, in
connection with any underwritten public offering, the managing underwriter(s)
thereof shall impose a limitation on the number of shares of Common Stock which
may be included in the Registration Statement because, in such underwriter(s)'
judgment, marketing or other factors dictate such limitation is necessary to
facilitate public distribution, then the Company shall be obligated to include
in such Registration Statement only such limited portion of the Registrable
Securities with respect to which such Investor has requested inclusion hereunder


                                       4
<PAGE>   5

as the underwriter shall permit. Any exclusion of Registrable Securities shall
be made pro rata among the Investors seeking to include Registrable Securities,
in proportion to the number of Registrable Securities sought to be included by
such Investors; provided, however, that the Company shall not exclude any
Registrable Securities unless the Company has first excluded all outstanding
securities, the holders of which are not contractually entitled to inclusion of
such securities in such Registration Statement or are not contractually entitled
to pro rata inclusion with the Registrable Securities; and provided, further,
however, that, after giving effect to the immediately preceding proviso, any
exclusion of Registrable Securities shall be made pro rata with holders of other
securities having the contractual right to include such securities in the
Registration Statement other than holders of securities contractually entitled
to inclusion of their securities in such Registration Statement by reason of
demand registration rights. Notwithstanding the foregoing, no such reduction
shall reduce the amount of Registrable Securities included in the registration
below twenty-five (25%) of the total amount of securities included in such
registration. No right to registration of Registrable Securities under this
Section 2(c) shall be construed to limit any registration required under Section
2(a) hereof. If an offering in connection with which an Investor is entitled to
registration under this Section 2(c) is an underwritten offering, then each
Investor whose Registrable Securities are included in such Registration
Statement shall, unless otherwise agreed by the Company, offer and sell such
Registrable Securities in an underwritten offering using the same underwriter or
underwriters and, subject to the provisions of this Agreement, on the same terms
and conditions as other shares of Common Stock included in such underwritten
offering.

           (d) Eligibility for Form S-3. The Company represents and warrants
that it meets the requirements for the use of Form S-3 for registration of the
sale by the Initial Investors and any other Investor of the Registrable
Securities and the Company shall file all reports required to be filed by the
Company with the SEC in a timely manner so as to maintain such eligibility for
the use of Form S-3.

        3. DELAY PERIODS; SUSPENSION OF SALES.

           (a) Delay Period. If, at any time prior to the expiration of the
Registration Period (as defined below), in the good faith reasonable judgment of
the Company's Board of Directors, the disposition of Registrable Securities
would require the premature disclosure of material non-public information which
may reasonably be expected to have an adverse effect on the Company, then the
Company shall not be required to maintain the effectiveness of or amend or
supplement the Registration Statement for a period (a "DISCLOSURE DELAY PERIOD")
expiring upon the earlier to occur of (i) the date on which such material
information is disclosed to the public or ceases to be material or (ii) subject
to Section 3(b) hereof, up to ten (10) trading days after the date on which the
Company provides a notice to the Investors under Section 4(f) hereof stating
that the failure to disclose such non-public information causes the prospectus
included in the Registration Statement, as then in effect, to include an untrue
statement of a material fact or to omit to state a material fact required to be
stated therein or necessary to make the statements therein not misleading (each,
a "DISCLOSURE


                                       5
<PAGE>   6

DELAY PERIOD NOTICE"). For the avoidance of doubt, in no event shall a
Disclosure Delay Period exceed ten (10) trading days.

           (b) The Company will give prompt written notice, in the manner
prescribed by Section 12 hereof, to the Investors of each Disclosure Delay
Period. If practicable, such notice shall estimate the duration of such
Disclosure Delay Period. Each Investor, agrees that, upon receipt of a
Disclosure Delay Period Notice prior to the Investor's disposition of all such
Registrable Securities, Investor will forthwith discontinue the disposition of
such Registrable Securities pursuant to the Registration Statement, and will not
deliver any prospectus forming a part thereof in connection with any sale of
such Registrable Securities until the expiration of such Disclosure Delay
Period. In addition, the provisions of Section 2(b) hereof shall not apply to
the Disclosure Delay Periods. Notwithstanding anything in this Section 3 to the
contrary, the Company shall not deliver more than two (2) Disclosure Delay
Period Notices in any one (1) year period and there shall not be more than an
aggregate of sixty (60) calendar days in any twelve (12) month period during
which the Company is in a Disclosure Delay Period nor more than an aggregate of
thirty (30) calendar days in any ninety (90) calendar day period during which
the Company is in a Disclosure Delay Period.

        4. OBLIGATIONS OF THE COMPANY.

        In connection with the registration of the Registrable Securities, the
Company shall have the following obligations:

           (a) The Company shall respond promptly to any and all comments made
by the staff of the SEC to the Registration Statement required by Section 2(a),
and shall submit to the SEC before the close of business on or before the second
business day immediately following the business day on which the Company learns
(either by telephone or in writing) that no review of such Registration
Statement will be made by the SEC or that the staff of the SEC has no further
comments on such Registration Statement, as the case may be, a request for
acceleration of the effectiveness of such Registration Statement to a time and
date as soon as practicable. The Company shall keep such Registration Statement
effective pursuant to Rule 415 at all times until such date as is the earlier of
(i) the date on which all of the Registrable Securities have been sold and (ii)
the date on which all of the Registrable Securities may be immediately sold to
the public without registration or restriction pursuant to Rule 144(k) under the
Securities Act or any successor provision (the "REGISTRATION PERIOD"), which
Registration Statement (including any amendments or supplements thereto and
prospectuses contained therein and all documents incorporated by reference
therein) (i) shall comply in all material respects with the requirements of the
Securities Act and the rules and regulations of the SEC promulgated thereunder
and (ii) shall not contain any untrue statement of a material fact or omit to
state a material fact required to be stated therein, or necessary to make the
statements therein not misleading. The financial statements of the Company
included in the Registration Statement or incorporated by reference therein will
comply as to form in all material respects with the applicable accounting
requirements and the published rules and regulations of the


                                       6
<PAGE>   7

SEC applicable with respect thereto. Such financial statements will be prepared
in accordance with U.S. generally accepted accounting principles, consistently
applied, during the periods involved (except (i) as may be otherwise indicated
in such financial statements or the notes thereto, or (ii) in the case of
unaudited interim statements, to the extent they may not include footnotes or
may be condensed on summary statements and fairly present in all material
respects the consolidated financial position of the Company and its consolidated
subsidiaries as of the dates thereof and the consolidated results of their
operations and cash flows for the periods then ended (subject, in the case of
unaudited statements, to immaterial year-end adjustments).

           (b) The Company shall use its best efforts, to prepare and file with
the SEC such amendments (including post-effective amendments) and supplements to
the Registration Statement and the prospectus used in connection with the
Registration Statement as may be necessary to keep the Registration Statement
effective at all times during the Registration Period, and, during such period,
comply with the provisions of the Securities Act with respect to the disposition
of all Registrable Securities of the Company covered by the Registration
Statement until such time as all of such Registrable Securities have been
disposed of in accordance with the intended methods of disposition by the seller
or sellers thereof as set forth in the Registration Statement. In the event the
number of shares available under a Registration Statement filed pursuant to this
Agreement is, for any three (3) consecutive trading days (the last of such three
(3) trading days being the "REGISTRATION TRIGGER DATE"), insufficient to cover
one hundred thirty-five percent (135%) of the Registrable Securities issued or
issuable upon conversion (without giving effect to any limitations on conversion
contained in Article IV.C of the Certificate of Designation) of the Preferred
Stock and exercise of the Warrants (without giving effect to any limitations on
exercise contained in Section 7(g) of the Warrants), the Company shall amend the
Registration Statement, or file a new Registration Statement (on the short form
available therefor, if applicable), or both, so as to cover one hundred thirty
five percent (135%) of the Registrable Securities issued or issuable (without
giving effect to any limitations on conversion or exercise contained in the
Certificate of Designation or the Warrants) as of the Registration Trigger Date,
in each case, as soon as practicable, but in any event within fifteen (15) days
after the Registration Trigger Date (based on the market price then in effect of
the Common Stock and other relevant factors on which the Company reasonably
elects to rely). The Company shall use its best efforts to cause such
amendment(s) and/or new Registration Statement to become effective as soon as
practicable following the filing thereof. In the event the Company fails to
obtain the effectiveness of any such Registration Statement within sixty (60)
days after a Registration Trigger Date, each Investor shall thereafter have the
option, exercisable in whole or in part at any time and from time to time by
delivery of a written notice to the Company (a "MANDATORY REDEMPTION NOTICE"),
to require the Company to purchase for cash, at an amount per share equal to the
Redemption Amount (as defined in Article VIII.B of the Certificate of
Designation), a portion of the Investor's Preferred Stock such that the total
number of Registrable Securities included on the Registration Statements for
resale by such Investor exceeds 135% of the Registrable Securities issued or
issuable upon conversion (without giving effect to any limitations


                                       7
<PAGE>   8

on conversion contained in Article IV.C of the Certificate of Designation) of
such Investor's Preferred Stock and exercise of such Investor's Warrants. If the
Corporation fails to redeem any of such shares within five (5) business days
after its receipt of a Mandatory Redemption Notice, then such Investor shall be
entitled to the remedies provided in Article VIII.C of the Certificate of
Designation.

           (c) The Company shall furnish to each Investor whose Registrable
Securities are included in the Registration Statement and its legal counsel (i)
promptly after the same is prepared and publicly distributed, filed with the
SEC, or received by the Company, one copy of the Registration Statement and any
amendment thereto, each preliminary prospectus and prospectus and each amendment
or supplement thereto, and, in the case of the Registration Statement referred
to in Section 2(a), each letter written by or on behalf of the Company to the
SEC or the staff of the SEC (including, without limitation, any request to
accelerate the effectiveness of the Registration Statement or amendment
thereto), and each item of correspondence from the SEC or the staff of the SEC,
in each case relating to the Registration Statement (other than any portion, if
any, thereof which contains information for which the Company has sought
confidential treatment), (ii) by the next business day after the date of
effectiveness of the Registration Statement or any amendment thereto, a notice
stating that the Registration Statement or amendment has been declared
effective, and (iii) such number of copies of a prospectus, including a
preliminary prospectus, and all amendments and supplements thereto and such
other documents as such Investor may reasonably request in order to facilitate
the disposition of the Registrable Securities owned by such Investor.

           (d) The Company shall use its best efforts to (i) register and
qualify the Registrable Securities covered by the Registration Statement under
such other securities or "blue sky" laws of such jurisdictions in the United
States as each Investor who holds Registrable Securities being offered
reasonably requests, (ii) prepare and file in those jurisdictions such
amendments (including post-effective amendments) and supplements to such
registrations and qualifications as may be necessary to maintain the
effectiveness thereof during the Registration Period, (iii) take such other
actions as may be necessary to maintain such registrations and qualifications in
effect at all times during the Registration Period, and (iv) take all other
actions reasonably necessary or advisable to qualify the Registrable Securities
for sale in such jurisdictions; provided, however, that the Company shall not be
required in connection therewith or as a condition thereto to (a) qualify to do
business in any jurisdiction where it would not otherwise be required to qualify
but for this Section 4(d), (b) subject itself to general taxation in any such
jurisdiction, (c) file a general consent to service of process in any such
jurisdiction, (d) provide any undertakings that cause the Company undue expense
or burden, or (e) make any change in its charter or bylaws, which in each case
the Board of Directors of the Company determines to be contrary to the best
interests of the Company and its stockholders.

           (e) As promptly as practicable after becoming aware of such event,
the Company shall notify each Investor by telephone and facsimile of the
happening of any event, of which the


                                       8
<PAGE>   9

Company has knowledge, as a result of which the prospectus included in the
Registration Statement, as then in effect, includes an untrue statement of a
material fact or omission to state a material fact required to be stated therein
or necessary to make the statements therein not misleading, and, use its best
efforts promptly to prepare a supplement or amendment to the Registration
Statement to correct such untrue statement or omission, and deliver such number
of copies of such supplement or amendment to each Investor as such Investor may
reasonably request.

           (f) The Company shall use its best efforts (i) to prevent the
issuance of any stop order or other suspension of effectiveness of a
Registration Statement (other than as permitted herein), and, if such an order
is issued, to obtain the withdrawal of such order at the earliest practicable
moment (including in each case by amending or supplementing such Registration
Statement) and (ii) to notify each Investor who holds Registrable Securities
being sold (or, in the event of an underwritten offering, the managing
underwriters) of the issuance of such order and the resolution thereof (and if
such Registration Statement is supplemented or amended, deliver such number of
copies of such supplement or amendment to each Investor as such Investor may
reasonably request).

           (g) The Company shall permit a single firm of counsel designated by
the Initial Investors to review the Registration Statement and all amendments
and supplements thereto a reasonable period of time prior to its filing with the
SEC, and not file any document in a form to which such counsel reasonably
objects.

           (h) The Company shall make generally available to its security
holders as soon as practical, but not later than ninety (90) days after the
close of the period covered thereby, an earnings statement (in form complying
with the provisions of Rule 158 under the Securities Act) covering a
twelve-month period beginning not later than the first day of the Company's
fiscal quarter next following the effective date of the Registration Statement
which compliance will be met through the Company's filing, on an appropriate
form, the appropriate report of the Company as required by the Securities
Exchange Act of 1934, as amended.

           (i) The Company shall hold in confidence and not make any disclosure
of information concerning an Investor provided to the Company unless (i)
disclosure of such information is necessary to comply with federal or state
securities laws, (ii) the disclosure of such information is necessary to avoid
or correct a misstatement or omission in any Registration Statement, (iii) the
release of such information is ordered pursuant to a subpoena or other order
from a court or governmental body of competent jurisdiction, (iv) such
information has been made generally available to the public other than by
disclosure in violation of this or any other agreement, or (v) such Investor
consents to the form and content of any such disclosure. The Company agrees that
it shall, upon learning that disclosure of such information concerning an
Investor is sought in or by a court or governmental body of competent
jurisdiction or through other means, give prompt notice to such Investor prior
to making such disclosure, and allow the Investor, at its expense, to


                                       9
<PAGE>   10

undertake appropriate action to prevent disclosure of, or to obtain a protective
order for, such information.

           (j) The Company shall use its best efforts to promptly either (i)
cause all of the Registrable Securities covered by the Registration Statement to
be listed on the NYSE or the AMEX or another national securities exchange and on
each additional national securities exchange on which securities of the same
class or series issued by the Company are then listed, if any, if the listing of
such Registrable Securities is then permitted under the rules of such exchange,
or (ii) secure the designation and quotation of all of the Registrable
Securities covered by the Registration Statement on the NNM or SmallCap and,
without limiting the generality of the foregoing, to arrange for or maintain at
least two market makers to register with the National Association of Securities
Dealers, Inc. ("NASD") as such with respect to such Registrable Securities.

           (k) The Company shall provide a transfer agent and registrar, which
may be a single entity, for the Registrable Securities not later than the
effective date of the Registration Statement.

           (l) The Company shall cooperate with the Investors who hold
Registrable Securities being offered to facilitate the timely preparation and
delivery of certificates (not bearing any restrictive legends to the extent
permitted by the Securities Purchase Agreement) representing Registrable
Securities to be offered pursuant to the Registration Statement and enable such
certificates to be in such denominations or amounts, as the case may be, as the
Investors may reasonably request and registered in such names as the Investors
may request.

           (m) At the request of any Investor, the Company shall prepare and
file with the SEC such amendments (including post-effective amendments) and
supplements to a Registration Statement and the prospectus used in connection
with such Registration Statement as may be necessary in order to change the plan
of distribution set forth in such Registration Statement.

           (n) The Company shall comply with all applicable laws related to a
Registration Statement and offering and sale of securities and all applicable
rules and regulations of governmental authorities in connection therewith
(including, without limitation, the Securities Act and the Securities Exchange
Act of 1934, as amended, and the rules and regulations promulgated by the SEC.)

           (o) From and after the date of this Agreement, the Company shall not,
and shall not agree to, allow the holders of any securities of the Company to
include any of their securities which are not Registrable Securities in the
Registration Statement under Section 2(a) hereof or any amendment or supplement
thereto under Section 4(b) hereof without the consent of the holders of a
majority in interest of the Registrable Securities.




                                       10
<PAGE>   11

        5. OBLIGATIONS OF THE INVESTORS. In connection with the registration of
the Registrable Securities, the Investors shall have the following obligations:

           (a) It shall be a condition precedent to the obligations of the
Company to complete the registration pursuant to this Agreement with respect to
the Registrable Securities of a particular Investor that such Investor shall
furnish to the Company such information regarding itself, the Registrable
Securities held by it and the intended method of disposition of the Registrable
Securities held by it as shall be reasonably required to effect the registration
of such Registrable Securities and shall execute such documents in connection
with such registration as the Company may reasonably request. At least five
trading days prior to the first anticipated filing date of the Registration
Statement, the Company shall notify each Investor of the information the Company
requires from each such Investor.

           (b) Each Investor, by such Investor's acceptance of the Registrable
Securities, agrees to cooperate with the Company as reasonably requested by the
Company in connection with the preparation and filing of the Registration
Statement hereunder, unless such Investor has notified the Company in writing of
such Investor's election to exclude all of such Investor's Registrable
Securities from such Registration Statement.

           (c) Each Investor agrees that, upon receipt of any notice from the
Company of the happening of any event of the kind described in Sections 4(e) or
3(f), such Investor will immediately discontinue disposition of Registrable
Securities pursuant to the Registration Statement covering such Registrable
Securities until such Investor's receipt of the copies of the supplemented or
amended prospectus contemplated by Sections 4(e) or 3(f) and, if so directed by
the Company, such Investor shall deliver to the Company (at the expense of the
Company) or destroy (and deliver to the Company a certificate of destruction)
all copies in such Investor's possession, of the prospectus covering such
Registrable Securities current at the time of receipt of such notice.
Notwithstanding anything to the contrary, subject to compliance with applicable
laws, the Company shall cause the transfer agent for the Registrable Securities
to deliver unlegended shares of Common Stock to a transferee of an Investor in
accordance with the terms of the Certificate of Designation and Warrants in
connection with any sale of Registrable Securities with respect to which such
Investor has entered into a contract for sale prior to receipt of such notice
and for which such Investor has not yet settled.

        6. EXPENSES OF REGISTRATION. All reasonable expenses incurred by the
Company or the Investors (but only for reasonable attorney's fees of one counsel
for the Investors) in connection with registrations, filings or qualifications
pursuant to Sections 2 and 4 above, including, without limitation, all
registration, listing and qualifications fees, printers and accounting fees, the
fees and disbursements of counsel for the Company, the fees and disbursements of
one counsel selected by the Investors, and the underwriting discounts and
commissions shall be borne by the Company. In addition, the Company shall pay
all of the Investors' reasonable costs and


                                       11
<PAGE>   12

expenses (including legal fees) incurred in connection with the enforcement of
the rights of the Investors hereunder.

        7. INDEMNIFICATION. In the event any Registrable Securities are included
in a Registration Statement under this Agreement:

           (a) To the extent permitted by law, the Company will indemnify, hold
harmless and defend (i) each Investor who holds such Registrable Securities, and
(ii) the directors, officers, partners, members, employees and agents of such
Investor and each person who controls any Investor within the meaning of Section
15 of the Securities Act or Section 20 of the Securities Exchange Act of 1934,
as amended (the "EXCHANGE ACT"), if any, (each, an "INDEMNIFIED PERSON"),
against any joint or several losses, claims, damages, liabilities or expenses
(collectively, together with actions, proceedings or inquiries by any regulatory
or self-regulatory organization, whether commenced or threatened, in respect
thereof, "CLAIMS") to which any of them may become subject insofar as such
Claims arise out of or are based upon: (i) any untrue statement or alleged
untrue statement of a material fact in a Registration Statement or the omission
or alleged omission to state therein a material fact required to be stated or
necessary to make the statements therein not misleading, (ii) any untrue
statement or alleged untrue statement of a material fact contained in any
preliminary prospectus if used prior to the effective date of such Registration
Statement, or contained in the final prospectus (as amended or supplemented, if
the Company files any amendment thereof or supplement thereto with the SEC) or
the omission or alleged omission to state therein any material fact necessary to
make the statements made therein, in light of the circumstances under which the
statements therein were made, not misleading, or (iii) any violation or alleged
violation by the Company of the Securities Act, the Exchange Act, any other law,
including, without limitation, any state securities law, or any rule or
regulation thereunder relating to the offer or sale of the Registrable
Securities (the matters in the foregoing clauses (i) through (iii) being,
collectively, "VIOLATIONS"). Subject to the restrictions set forth in Section
7(c) with respect to the number of legal counsel, the Company shall reimburse
the Investors and each other Indemnified Person, promptly as such expenses are
incurred and are due and payable, for any reasonable legal fees or other
reasonable expenses incurred by them in connection with investigating or
defending any such Claim. Notwithstanding anything to the contrary contained
herein, the indemnification agreement contained in this Section 7(a): (i) shall
not apply to a Claim arising out of or based upon a Violation which occurs in
reliance upon and in conformity with information furnished in writing to the
Company by such Indemnified Person expressly for use in the Registration
Statement or any such amendment thereof or supplement thereto; (ii) shall not
apply to amounts paid in settlement of any Claim if such settlement is effected
without the prior written consent of the Company, which consent shall not be
unreasonably withheld; and (iii) with respect to any preliminary prospectus,
shall not inure to the benefit of any Indemnified Person if the untrue statement
or omission of material fact contained in the preliminary prospectus was
corrected on a timely basis in the prospectus, as then amended or supplemented,
if such corrected prospectus was timely made available by the Company pursuant
to Section 4(c) hereof, and the Indemnified Person was promptly advised in
writing not to use the


                                       12
<PAGE>   13

incorrect prospectus prior to the use giving rise to a Violation and such
Indemnified Person, notwithstanding such advice, used it. Such indemnity shall
remain in full force and effect regardless of any investigation made by or on
behalf of the Indemnified Person and shall survive the transfer of the
Registrable Securities by the Investors pursuant to Section 9 hereof.

           (b) In connection with any Registration Statement in which an
Investor is participating, each such Investor agrees severally and not jointly
to indemnify, hold harmless and defend, to the same extent and in the same
manner set forth in Section 7(a), the Company, each of its directors, each of
its officers who signs the Registration Statement, its employees, agents and
each person, if any, who controls the Company within the meaning of Section 15
of the Securities Act or Section 20 of the Exchange Act, and any other
stockholder selling securities pursuant to the Registration Statement or any of
its directors or officers or any person who controls such stockholder within the
meaning of the Securities Act or the Exchange Act (collectively and together
with an Indemnified Person, an "INDEMNIFIED PARTY"), against any Claim to which
any of them may become subject, under the Securities Act, the Exchange Act or
otherwise, insofar as such Claim arises out of or is based upon any Violation,
in each case to the extent (and only to the extent) that such Violation occurs
in reliance upon and in conformity with written information furnished to the
Company by such Investor expressly for use in connection with such Registration
Statement; and subject to Section 7(c) such Investor will reimburse any legal or
other expenses (promptly as such expenses are incurred and are due and payable)
reasonably incurred by them in connection with investigating or defending any
such Claim; provided, however, that the indemnity agreement contained in this
Section 7(b) shall not apply to amounts paid in settlement of any Claim if such
settlement is effected without the prior written consent of such Investor, which
consent shall not be unreasonably withheld; provided, further, however, that the
Investor shall be liable under this Agreement (including this Section 7(b) and
Section 8) for only that amount as does not exceed the net proceeds actually
received by such Investor as a result of the sale of Registrable Securities
pursuant to such Registration Statement. Such indemnity shall remain in full
force and effect regardless of any investigation made by or on behalf of such
Indemnified Party and shall survive the transfer of the Registrable Securities
by the Investors pursuant to Section 9 hereof. Notwithstanding anything to the
contrary contained herein, the indemnification agreement contained in this
Section 7(b) with respect to any preliminary prospectus shall not inure to the
benefit of any Indemnified Party if the untrue statement or omission of material
fact contained in the preliminary prospectus was corrected on a timely basis in
the prospectus, as then amended or supplemented.

           (c) Promptly after receipt by an Indemnified Person or Indemnified
Party under this Section 7 of notice of the commencement of any action
(including any governmental action), such Indemnified Person or Indemnified
Party shall, if a Claim in respect thereof is to made against any indemnifying
party under this Section 7, deliver to the indemnifying party a written notice
of the commencement thereof, and the indemnifying party shall have the right to
participate in, and, to the extent the indemnifying party so desires, jointly
with any other indemnifying party similarly noticed, to assume control of the
defense thereof with counsel mutually satisfactory to the indemnifying party


                                       13
<PAGE>   14

and the Indemnified Person or the Indemnified Party, as the case may be;
provided, however, that such indemnifying party shall not be entitled to assume
such defense and an Indemnified Person or Indemnified Party shall have the right
to retain its own counsel with the fees and expenses to be paid by the
indemnifying party, if, in the reasonable opinion of counsel retained by the
indemnifying party, the representation by such counsel of the Indemnified Person
or Indemnified Party and the indemnifying party would be inappropriate due to
actual or potential conflicts of interest between such Indemnified Person or
Indemnified Party and any other party represented by such counsel in such
proceeding or the actual or potential defendants in, or targets of, any such
action include both the Indemnified Person or the Indemnified Party and the
indemnifying party and any such Indemnified Person or Indemnified Party
reasonably determines that there may be legal defenses available to such
Indemnified Person or Indemnified Party which are in conflict with those
available to such indemnifying party. The indemnifying party shall pay for only
one separate legal counsel for the Indemnified Persons or the Indemnified
Parties, as applicable, and such legal counsel shall be selected by Investors
holding a majority-in-interest of the Registrable Securities included in the
Registration Statement to which the Claim relates (with the approval of the
Initial Investors if it holds Registrable Securities included in such
Registration Statement), if the Investors are entitled to indemnification
hereunder, or by the Company, if the Company is entitled to indemnification
hereunder, as applicable. The failure to deliver written notice to the
indemnifying party within a reasonable time of the commencement of any such
action shall not relieve such indemnifying party of any liability to the
Indemnified Person or Indemnified Party under this Section 7, except to the
extent that the indemnifying party is actually prejudiced in its ability to
defend such action. The indemnification required by this Section 7 shall be made
by periodic payments of the amount thereof during the course of the
investigation or defense, as such expense, loss, damage or liability is incurred
and is due and payable.

        8. CONTRIBUTION. To the extent any indemnification by an indemnifying
party is prohibited or limited by law, the indemnifying party agrees to make the
maximum contribution with respect to any amounts for which it would otherwise be
liable under Section 7 to the fullest extent permitted by law as is appropriate
to reflect the relative fault of the indemnifying party, on the one hand, and
the Indemnified Person or Indemnified Party, as the case may be, on the other
hand, with respect to the Violation giving rise to the applicable Claim;
provided, however, that (i) no contribution shall be made under circumstances
where the maker would not have been liable for indemnification under the fault
standards set forth in Section 7, (ii) no person guilty of fraudulent
misrepresentation (within the meaning of Section 12(f) of the Securities Act)
shall be entitled to contribution from any seller of Registrable Securities who
was not guilty of such fraudulent misrepresentation, and (iii) contribution
(together with any indemnification or other obligations under this Agreement) by
any seller of Registrable Securities shall be limited in amount to the net
amount of proceeds received by such seller from the sale of such Registrable
Securities.

        9. REPORTS UNDER THE EXCHANGE ACT. With a view to making available to
the Investors the benefits of Rule 144 promulgated under the Securities Act or
any other similar rule


                                       14
<PAGE>   15

or regulation of the SEC that may at any time permit the Investors to sell
securities of the Company to the public without registration ("RULE 144"), the
Company agrees to:

               (i) file with the SEC in a timely manner and make and keep
available all reports and other documents required of the Company under the
Securities Act and the Exchange Act so long as the Company remains subject to
such requirements (it being understood that nothing herein shall limit the
Company's obligations under Section 4(c) of the Securities Purchase Agreement)
and the filing and availability of such reports and other documents is required
for the applicable provisions of Rule 144; and

               (ii) furnish to each Investor so long as such Investor owns
shares of Preferred Stock, Warrants or Registrable Securities, promptly upon
request, (i) a written statement by the Company that it has complied with the
reporting requirements of Rule 144, the Securities Act and the Exchange Act,
(ii) a copy of the most recent annual or quarterly report of the Company and
such other reports and documents so filed by the Company, and (iii) such other
information as may be reasonably requested to permit the Investors to sell such
securities under Rule 144 without registration.

        10. ASSIGNMENT OF REGISTRATION RIGHTS. The rights of the Investors
hereunder, including the right to have the Company register Registrable
Securities pursuant to this Agreement, shall be automatically assignable by each
Investor to any transferee of all or any portion of the shares of Preferred
Stock, the Warrants or the Registrable Securities if: (i) the Investor agrees in
writing with the transferee or assignee to assign such rights, and a copy of
such agreement is furnished to the Company after such assignment, (ii) the
Company is furnished with written notice of (a) the name and address of such
transferee or assignee, and (b) the securities with respect to which such
registration rights are being transferred or assigned, (iii) following such
transfer or assignment, the further disposition of such securities by the
transferee or assignee is restricted under the Securities Act and applicable
state securities laws, (iv) the transferee or assignee agrees in writing for the
benefit of the Company to be bound by all of the provisions contained herein,
and (v) such transfer shall have been made in accordance with the applicable
requirements of the Securities Purchase Agreement, the Certificate of
Designation for the Preferred Stock and the Warrants, as applicable. In
addition, and notwithstanding anything to the contrary contained in this
Agreement, the Securities Purchase Agreement, the Certificate of Designation or
the Warrants, the Securities (as defined in the Securities Purchase Agreement)
may be pledged, and all rights of the Investors under this Agreement or any
other agreement or document related to the transactions contemplated hereby may
be assigned, without further consent of the Company, to a bona fide pledgee in
connection with an Investor's margin or brokerage account.

        11. AMENDMENT OF REGISTRATION RIGHTS. Provisions of this Agreement may
be amended and the observance thereof may be waived (either generally or in a
particular instance and either retroactively or prospectively), only with
written consent of the Company, and Investors


                                       15
<PAGE>   16

who hold a majority in interest of the Registrable Securities or, in the case of
a waiver, with the written consent of the party charged with the enforcement of
any such provision; provided, however, that no consideration shall be paid to an
Investor by the Company in connection with an amendment hereto unless each
Investor similarly affected by such amendment receives a pro-rata amount of
consideration from the Company. Any amendment or waiver effected in accordance
with this Section 11 shall be binding upon each Investor and the Company.

        12. MISCELLANEOUS.

           (a) A person or entity is deemed to be a holder of Registrable
Securities whenever such person or entity owns of record such Registrable
Securities. If the Company receives conflicting instructions, notices or
elections from two or more persons or entities with respect to the same
Registrable Securities, the Company shall act upon the basis of instructions,
notice or election received from the registered owner of such Registrable
Securities.

           (b) Any notices required or permitted to be given under the terms of
this Agreement shall be sent by certified or registered mail (return receipt
requested), or by a nationally recognized overnight delivery service, or
delivered personally or by courier or by confirmed telecopy, and shall be
effective five (5) days after being placed in the mail, if mailed certified or
registered mailed, or one (1) day after being delivered to the nationally
recognized overnight delivery service, if delivered in such manner, or upon
receipt or refusal of receipt, if delivered personally or by courier or
confirmed telecopy, in each case addressed to a party. The addresses for such
communications shall be:

               If to the Company:

               ViroLogic, Inc.
               270 East Grand Avenue
               South San Francisco, California 94080
               Telephone:  (650) 635-1100
               Attn:  Chief Executive Officer

               with a copy simultaneously transmitted by like means to:

               Cooley Godward LLP
               4365 Executive Drive, Suite 1100
               San Diego, California 92121
               Telephone:  (858) 550-6000
               Attn:  Christopher J. Kearns, Esq.




                                       16
<PAGE>   17

and if to any Investor, at such address as such Investor shall have provided in
writing to the Company, or at such other address as each such party furnishes by
notice given in accordance with this Section 12(b).

           (c) Failure of any party to exercise any right or remedy under this
Agreement or otherwise, or delay by a party in exercising such right or remedy,
shall not operate as a waiver thereof.

           (d) This Agreement shall be governed by and construed in accordance
with the laws of the State of Delaware applicable to contracts made and to be
performed in the State of Delaware. The Company irrevocably consents to the
jurisdiction of the United States federal courts and the state courts located in
the State of Delaware in any suit or proceeding based on or arising under this
Agreement and irrevocably agrees that all claims in respect of such suit or
proceeding may be determined in such courts. The Company irrevocably waives the
defense of an inconvenient forum to the maintenance of such suit or proceeding.
The Company further agrees that service of process upon the Company, mailed by
first class mail shall be deemed in every respect effective service of process
upon the Company in any such suit or proceeding. Nothing herein shall affect the
Investors' right to serve process in any other manner permitted by law. The
Company agrees that a final non-appealable judgment in any such suit or
proceeding shall be conclusive and may be enforced in other jurisdictions by
suit on such judgment or in any other lawful manner.

           (e) This Agreement, the Securities Purchase Agreement (including all
schedules and exhibits thereto), the Second Registration Rights Agreement and
the Warrants constitute the entire agreement among the parties hereto with
respect to the subject matter hereof and thereof. There are no restrictions,
promises, warranties or undertakings, other than those set forth or referred to
herein and therein. This Agreement, the Securities Purchase Agreement and the
Warrants supersede all prior agreements and understandings among the parties
hereto with respect to the subject matter hereof and thereof.

           (f) Subject to the requirements of Section 9 hereof, this Agreement
shall inure to the benefit of and be binding upon the successors and assigns of
each of the parties hereto.

           (g) The headings in this Agreement are for convenience of reference
only and shall not limit or otherwise affect the meaning hereof.

           (h) This Agreement may be executed in two or more counterparts, each
of which shall be deemed an original but all of which shall constitute one and
the same agreement. This Agreement, once executed by a party, may be delivered
to the other party hereto by facsimile transmission of a copy of this Agreement
bearing the signature of the party so delivering this Agreement.




                                       17
<PAGE>   18

           (i) Each party shall do and perform, or cause to be done and
performed, all such further acts and things, and shall execute and deliver all
such other agreements, certificates, instruments and documents, as the other
party may reasonably request in order to carry out the intent and accomplish the
purposes of this Agreement and the consummation of the transactions contemplated
hereby.

           (j) All consents, approvals and other determinations to be made by
the Investors pursuant to this Agreement shall be made by the Investors holding
a majority in interest of the Registrable Securities (determined as if all
shares of Preferred Stock and Warrants then outstanding had been converted into
or exercised for Registrable Securities) held by all Investors.

           (k) The initial number of Registrable Securities included on any
Registration Statement and each increase to the number of Registrable Securities
included thereon shall be allocated pro rata among the Investors based on the
number of Registrable Securities held by each Investor at the time of such
establishment or increase, as the case may be. In the event an Investor shall
sell or otherwise transfer any of such holder's Registrable Securities, each
transferee shall be allocated a pro rata portion of the number of Registrable
Securities included on a Registration Statement for such transferor. Any shares
of Common Stock included on a Registration Statement and which remain allocated
to any person or entity which does not hold any Registrable Securities shall be
allocated to the remaining Investors, pro rata based on the number of shares of
Registrable Securities then held by such Investors. For the avoidance of doubt,
the number of Registrable Securities held by any Investor shall be determined as
if all shares of Preferred Stock and Warrants then outstanding were converted
into or exercised for Registrable Securities.

           (l) Each party to this Agreement has participated in the negotiation
and drafting of this Agreement. As such, the language used herein shall be
deemed to be the language chosen by the parties hereto to express their mutual
intent, and no rule of strict construction will be applied against any party to
this Agreement.

           (m) For purposes of this Agreement, the term "business day" means any
day other than a Saturday or Sunday or a day on which banking institutions in
the State of New York are authorized or obligated by law, regulation or
executive order to close, and the term "trading day" means any day on which NNM,
or if the Common Stock is not then traded on NNM the principal securities
exchange or trading market where the Common Stock is then listed or traded, is
open for trading.




                                       18
<PAGE>   19

        IN WITNESS WHEREOF, the parties have caused this Agreement to be duly
executed as of the date first above written.


VIROLOGIC, INC.

By: /s/ WILLIAM D. YOUNG
   -------------------------------
Name: William D. Young
     -----------------------------
Its:  Chief Executive Officer
    ------------------------------

INITIAL INVESTORS:

S.A.C. CAPITAL ASSOCIATES, LLC

By: S.A.C. Capital Advisors

By: /s/ PETER NUSSBAUM
   -------------------------------
      Name:  Peter Nussbaum
      Title: General Counsel

SDS MERCHANT FUND, L.P.


By: /s/ STEVE DERBY
   -------------------------------
      Name:  Steve Derby
      Title: Managing Member

NARRAGANSETT I, L.P.


By: /s/ J. L. DOWLING III
   ------------------------------
      Name: Joseph L. Dowling III
      Title: Managing Member

NARRAGANSETT OFFSHORE, LTD.


By: /s/ J. L. DOWLING III
   ------------------------------
      Name: Joseph L. Dowling III
      Title: Managing Member


<PAGE>   20


CASTLE CREEK HEALTHCARE PARTNERS, L.P.


By:   /s/ THOMAS A. FREI
   -------------------------------
      Name: Thomas A. Frei
      Title: Managing Director

CCL FUND LLC


By:   /s/ FRED GOLDMAN
   -------------------------------
      Name: Fred Goldman
      Title: Member of the Manager

CRESTWOOD CAPITAL PARTNERS, L.P.

By:     ING FURMAN SELZ ASSET MANAGEMENT, LLC

        By:   /s/ MICHAEL WEISBERG
           ------------------------------------
              Name: Michael Weisberg
              Title:

CRESTWOOD CAPITAL INTERNATIONAL, L.P.

By:     ING FURMAN SELZ ASSET MANAGEMENT, LLC

        By:   /s/ ROBERT J. MILLER
           ------------------------------------
              Name: Robert J. Miller
              Title:

CRESTWOOD CAPITAL PARTNERS II, L.P.

By:     ING FURMAN SELZ ASSET MANAGEMENT, LLC

        By:   /s/ MICHAEL WEISBERG
           ------------------------------------
              Name: Michael Weisberg
              Title:


<PAGE>   21


BRIDGEWOOD CAPITAL PARTNERS, L.P.

By:     ING FURMAN SELZ ASSET MANAGEMENT, LLC

        By:   /s/ MICHAEL WEISBERG
           ------------------------------------
              Name: Michael Weisberg
              Title:

ANVERS HEALTHCARE INVESTORS, L.P.

By:     ING FURMAN SELZ ASSET MANAGEMENT, LLC

        By:   /s/ LESLIE HENSHAW
           ------------------------------------
              Name: Leslie Henshaw
              Title:

ANVERS II, L.P.

By:     ING FURMAN SELZ ASSET MANAGEMENT, LLC

        By:   /s/ LESLIE HENSHAW
           ------------------------------------
              Name: Leslie Henshaw
              Title:

ANVERS, L.P.

By:     ING FURMAN SELZ ASSET MANAGEMENT, LLC

        By:   /s/ LESLIE HENSHAW
           -----------------------------------
              Name: Leslie Henshaw
              Title: