<PAGE>


                                                                   EXHIBIT 10.51



                                 AMENDMENT NO. 2


         This Amendment No. 2 ("Amendment") to the Collaboration and License
Agreements effective October 29, 1998 between the parties hereto (the
"Agreements") is effective as of October 1, 1999 (the "Effective Date"), and by
agreement of the parties as of the Effective Date amends the Agreements as
follows:

         1. All capitalized terms herein shall have the same meaning as in the
Agreements.

         2. Section 5.2.2 is amended to read, in its entirety, as follows:

                           5.2.2 FUNDING DURING SUBSEQUENT YEARS. Schering shall
                 pay to Pharmacopeia research funding for the Collaboration at a
                 rate of * * * plus any adjustment pursuant to Section 5.2.5,
                 per FTE during each subsequent year of the Collaboration, based
                 upon the number of Pharmacopeia FTEs assigned to the
                 Collaboration as agreed pursuant to Sections 2.5.1 and 5.2.4,
                 plus any additional FTEs agreed upon by the Parties under
                 Section 5.2.3.

         3. Section 5.2.6 is amended to read, in its entirety, as follows:

                           5.2.6 QUARTERLY CALCULATION; ANNUAL ADJUSTMENT.
                  Within thirty (30) days after the conclusion of each quarter,
                  Pharmacopeia will calculate the actual number of FTEs provided
                  by Pharmacopeia during that quarter and calculate any
                  difference between the actual number of FTEs provided by
                  Pharmacopeia and the number prepaid by Schering, and will
                  report such information ("FTE overpayment") to Schering.
                  Within thirty (30) days after the end of each year of the
                  Collaboration, Pharmacopeia will calculate the aggregate,
                  annual FTE overpayment, if any, and any such overpayment shall
                  be reflected as a credit in the next quarterly invoice as per
                  Section 5.2.7 below or, if the Collaboration has terminated,
                  as a credit against present or future milestone payments
                  pursuant to Section 5.3.

         4. The remaining terms of the Agreements, except to the limited extent
modified by the terms of this Amendment and by the agreement letter dated March
29, 1999, shall remain in full force and effect.



*** Confidential Treatment Requested


<PAGE>


         IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be
duly executed by their authorized representatives and delivered in triplicate
originals on the Effective Date.

SCHERING CORPORATION                PHARMACOPEIA, INC



By:      /s/ David Poorvin          By:   /s/ Richard J. Walsh
   --------------------------          --------------------------

Name:  David Poorvin                Name:  Richard J. Walsh
     ------------------------

Title:   Vice President             Title: Senior Vice President of Marketing
      -----------------------              and Business Development

SCHERING-PLOUGH, LTD.



By:      /s/ David Poorvin
   --------------------------

Name:  David Poorvin
     ------------------------

Title:   Prokurist
   --------------------------



                                       2