Skip to content

FurtherSecrets24680/chemsearch-android

Repository files navigation

ChemSearch for Android

ChemSearch icon

A native Android app for searching and exploring chemical compounds.
Built for students, researchers, and anyone curious about chemistry.

Latest Release Android 8.0+ Kotlin MIT License

ChemSearch - Chemistry Simplified. | Product Hunt

Download

  • Grab the latest APK from GitHub Releases.
  • Or build from source (see below).

Features

Search

  • Search by common name, IUPAC name, CAS number, or CID via PubChem PUG REST
  • Real-time autocomplete suggestions as you type, with a scrollable dropdown (toggleable)
  • Recent searches tab to access recently searched compounds.
  • Favorites tab with filtering, A-Z and atom-count sorting, and manual reordering.

Compound Data

  • Compound header showing name, smart-rendered molecular formula, molecular weight, CID and CAS at a glance
  • Full identifiers card: IUPAC name, SMILES (full and connectivity), InChI, InChIKey, empirical formula, atom count, bond count, and formal charge (tap any value to copy).
  • Info tooltips on each card explaining what each identifier or data type means
  • Expanded structural metadata sourced from PubChem, with older cached entries automatically backfilled when needed
  • Up to 8 synonyms displayed as tap-to-copy chips
  • Elemental analysis with mass percentage bars for each element
  • Tap the formula to copy it, or use the inline action to jump into the Isomer Finder

Structure Viewer

  • 2D structure via PubChem PNG images with tap-to-zoom
  • 3D model using a fully native Canvas-based engine:
    • Drag to rotate, pinch to zoom, auto-spin with pause on touch
    • CPK coloring for all 118 elements
    • Ball-and-stick model with bonds connected to atom surfaces
  • Loading feedback while 3D data is prepared in the background
  • Download 2D PNG or 3D SDF files directly to Downloads

Safety Information

  • GHS classification fetched from PubChem PUG View:
    • Signal word badge (Danger / Warning) with color coding
    • GHS pictograms (GHS01 through GHS09) with icons and labels
    • Hazard H-codes

Descriptions

Three switchable sources per compound:

  • PubChem for scientific descriptions
  • Wikipedia for general summaries
  • AI via Google Gemini or Groq, with a regenerate button. This is totally optional and it requires your API key from these providers to work.

Tools

Eleven chemistry tools accessible from the Tools tab:

  • Custom 3D Molecule Viewer : Load any .sdf or .mol file from your device and view it in the native 3D engine
  • Molar Mass Calculator : Enter any molecular formula (including parentheses groups and hydrate dot notation) to get the molar mass and a full elemental breakdown by mass percentage, with cursor-aware editing and quick-insert helpers
  • Oxidation State Finder : Determine oxidation states for each element in a compound, with support for peroxides, superoxides, ozonides, metal hydrides, and interhalogen compounds. Enter the overall charge for polyatomic ions
  • SMILES Visualizer : Paste any SMILES string to look it up on PubChem and view its 2D structure and 3D model
  • Reaction Balancer : Balance any chemical equation using matrix-based Gaussian elimination with exact rational arithmetic. Includes quick-insert buttons, live -> to normalization, and swap-sides control
  • Isomer Finder : Find up to 20 structural isomers by searching with a molecular formula
  • Limiting Reagent : Identify limiting reagent, ratios, and theoretical yield for a balanced equation
  • Percent Yield : Compare actual yield against theoretical yield for a target product
  • Reaction Scaling : Scale reactants for a desired product amount
  • Dilution Calculator : Solve C1V1 = C2V2 for solutions
  • Ideal Gas Law : Solve PV = nRT for gases

Tool categories include scrollable filter pills and manual tool reordering.

Customization

  • Theme mode dropdown (Light / Dark) in Settings
  • Compact mode toggle for denser layouts on smaller screens
  • Configurable default description source
  • AI provider selection with per-provider API key management
  • Autosuggestions toggle (scrollable dropdown, toggleable)
  • Settings backup and restore using JSON export/import

Updates and Cache

  • Built-in update checks against GitHub releases, with optional notifications
  • Local compound cache to speed repeat searches, with clear + custom location controls
  • Missing structural metadata for older cached entries is refreshed automatically in the background
  • Cached results are labeled in the UI

Developer Options

A hidden debug menu can be unlocked by tapping the build number in the 'About' card five times. It includes:

  • Live log viewer : Real-time in-app log buffer (up to 200 lines) capturing search events, API calls, errors, SDF loads, and more, with timestamps. Errors always captured; verbose logs toggle-gated
  • Verbose logging toggle : Writes detailed D/ChemSearch lines to Logcat and the live buffer
  • Network diagnostics : Tests PubChem, Wikipedia, GitHub releases, Gemini, and Groq endpoints with status and latency reporting
  • SharedPreferences inspector : Dumps all stored keys and values (API keys partially masked)
  • Memory info : JVM heap usage and system RAM from ActivityManager
  • API endpoints : Copies all five base URLs to clipboard for manual testing
  • Test update notification : Triggers a sample update alert for verification
  • Wipe SharedPreferences : Completely reset all the stored data
  • Force crash : Throws a deliberate unhandled exception to verify crash reporting (confirmation required)
  • Hide debug settings : Relock the developer menu until the next 5-tap unlock

Screenshots

Search (Dark mode) Search (Light mode) 3D Molecule Viewer
Favorites Tools Page Identifiers & Element Analysis
Synonyms & Description GHS Safety Information Molar Mass Calculator
Oxidation State Finder Reaction Balancer SMILES Visualizer

Tech Stack

Component Technology
Language Kotlin
UI Jetpack Compose + Material 3
Networking Retrofit 2 + OkHttp
Image loading Coil
Async Kotlin Coroutines + StateFlow + lifecycle-aware Compose state collection
JSON Gson
3D rendering Custom native Canvas engine
Storage SharedPreferences
Versioning Git tag-based version name + commit count version code

Data Sources

Source Used for
PubChem PUG REST Compound lookup, properties, structural metadata, synonyms, descriptions, SDF, autocomplete
PubChem PUG View GHS safety classifications
Wikipedia REST API Compound summaries
Google Gemini AI descriptions
Groq AI descriptions
GitHub Releases API Update checks

Requirements

For Users

  • Android 8.0 (Oreo) or higher (API 26+)
  • Internet connection for compound data and AI descriptions

For Developers

  • Android Studio Hedgehog (2023.1.1) or newer
  • JDK 11
  • Android SDK API 36

Permissions

  • INTERNET for compound data, suggestions, descriptions, and update checks
  • POST_NOTIFICATIONS (Android 13+) for optional update notifications
  • WRITE_EXTERNAL_STORAGE (Android 9 and below) to save 2D PNG and 3D SDF downloads

Building from Source

git clone https://github.com/FurtherSecrets24680/chemsearch-android
cd chemsearch-android
./gradlew assembleDebug

Open in Android Studio, sync Gradle, and run on a device or emulator (API 26+). Debug builds work without any API keys configured.

To install a debug build on a connected device:

./gradlew installDebug

Release Signing

Release builds require a keystore.properties file in the project root:

storeFile=path/to/your.keystore
storePassword=yourStorePassword
keyAlias=yourKeyAlias
keyPassword=yourKeyPassword

Then build via ./gradlew assembleRelease or Build → Generate Signed APK.


AI Descriptions (Optional)

AI descriptions require a free API key from your chosen provider, entered in the app's Settings.

Provider Model Get an API key
Google Gemini gemini-flash-latest aistudio.google.com/api-keys
Groq Cloud openai/gpt-oss-120b console.groq.com/keys

Keys are stored locally on your device and only sent directly to the respective provider.


Privacy

  • Data is fetched directly from PubChem, Wikipedia, Gemini, Groq, and GitHub Releases. No intermediary servers are used.
  • API keys, search history, favorites, and cache settings are stored locally using SharedPreferences. Cached compound data is stored locally on device.
  • No analytics, tracking or telemetry of any kind.

Star History Chart ---

License

MIT License. See LICENSE for details.


About

A native Android chemistry app. Search any compound and instantly get chemical data from PubChem, 3D models, GHS safety data, elemental analysis & optional AI descriptions. Built with Kotlin & Jetpack Compose.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages