The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
An intermediate dataset for US molecular patent grants
Retrieves patent grant data from USPTO weekly releases bulkdata.uspto.gov/data/patent/grant/redbook/{year}
and keeps only patents with .mol
files for downstream data mining use cases.
Compared to existing work such as [https://github.com/learningmatter-mit/PatentChem/tree/main]. We keep all files of a patent grant, especially .til
image files. We also share the data as a git lfs repo instead of a single .zip
file to allow easier access.
The data directory
data/{year}/{weekly}/{sub_dir}/{filename}.ZIP
Each file is a full patent grant with original redbook directory structure preserved. weekly
is the weekly release date. Expect inconsistencies for the formate of weekly
and depth in sub_dir
over time.
See [https://www.uspto.gov/learning-and-resources/xml-resources] for DTD and Red Book Viewer.
Data quality
Ideally, USPTO provides the ground truth on chemical structure annotations for the molecular drawings. But the raw data quality appears poor. Some outlandish annotations such as chemical structure annotations on non-chemistry related images suggest an automated annotation process with little human QA is used to annotate the drawings.
A report on improving data quality is left as a future work. (seeking calibrators)
Related resources
- (2023) Automated patent extraction powers generative modeling in focused chemical spaces [https://github.com/learningmatter-mit/PatentChem]
- (2014) Processing USPTO Patent Data [https://github.com/funginstitute/patentprocessor/] [https://funginstitute.berkeley.edu/wp-content/uploads/2014/06/patentprocessor.pdf]: How to extract information from the
.xml
file - (2011) SCRIPDB: a portal for easy access to syntheses, chemicals and reactions in patents [https://pmc.ncbi.nlm.nih.gov/articles/PMC3245107/]: extensive data analytics, but database and website no longer exist.
The DATA-CHANGELOG.md file
This file is written by update_data.py
to log statistics from each processed weekly.
How to update the dataset
python update_data.py --from_year 2024
will search for new weeklies from 2024 to current year, add them to the data directory and push to upstream.
Please only use this project's root directory as the working directory. You can also copy pre-downloaded weeklies here to avoid re-downloading them.
$ python update_data.py -h
usage: update_data.py [-h] [--quick] [--keep] [--stream] [--verbose] [--from_year FROM_YEAR] [--to_year TO_YEAR]
Downloads and filters patent files for mol files from USPTO website, then adds them to a dataset
options:
-h, --help show this help message and exit
--quick only processed at most one new weekly file, you can also create a file named 'quick' (touch quick) to enable this flag during runtime to exit after finishing
processing the current weekly file
--keep keep the original downloaded files
--stream remove all pushed lfs files and objects locally. DO NOT USE WHEN RUNNING PARALLEL SCRIPTS
--verbose print verbose logs
--from_year FROM_YEAR
start from this year (default 2001 is the earliest available)
--to_year TO_YEAR end at this year (default current year)
- Downloads last month
- 56,877