PDBlib is an extensible object oriented class library written in C++ for representing the 3-dimensional structure of biological macromolecules. PDBlib forms the kernel of a larger software framework being developed for assisting in knowledge discovery from macromolecular structure data. The software design strategy used by PDBlib, how the library may be used and several prototype applications that use the library are summarized. PDBlib represents the structural features of proteins, DNA, RNA, and complexes thereof, at a level of detail on a par with that which can be parsed from a Protein Data Bank (PDB) entry. However, the memory resident representation of the macromolecule is independent of the PDB entry and can be obtained from other back-end data sources, for example, existing relational databases and our own object oriented database (OOPDB) built on top of the commercial object oriented database, ObjectStore. At the front-end are several prototype applications that use the library: Macromolecular Query Language (MMQL) is based on a separate class library (MMQLlib) for building complex queries pertaining to macromolecular structure; PDBtool is an interactive structure verification tool; and PDBview, is a structure rendering tool used either as a standalone tool or as part of another application. Each of these software components are described. All software is available via anonymous ftp from cuhhca.hhmi.columbia.edu.