Class PubChem
java.lang.Object
org.episteme.natural.chemistry.loaders.PubChem
Connector to PubChem (National Institutes of Health).
What it does: Provides access to chemical data for millions of compounds. Retrieves structures, properties (molecular weight, formula), and identifiers.
Data Source: PubChem PUG REST API (https://pubchem.ncbi.nlm.nih.gov/)
License: Public Domain (US Government work).
Usage example:
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetProperties(String name, String properties) Retrieves specific properties for a compound.static <T> TMaps JSON response to a domain object.static StringSearches for a compound by name and returns full record.static CompoundInfosearchCompound(String name) Searches for a compound and returns a parsed CompoundInfo object.
-
Method Details
-
search
-
searchCompound
Searches for a compound and returns a parsed CompoundInfo object. This is a convenience method that combines search() with JSON parsing.- Parameters:
name- compound name (e.g., "aspirin")- Returns:
- CompoundInfo with parsed data, or null if not found
-
map
-
getProperties
-