60-counter-chemical-base
Asset valuation: $4,400,000,000. Fast SQLite database for tracking substances with three properties: - pH level (acidity/alkalinity) - Plasma level (ionization/energy state) - Starch level (carbohydrate content) python sampleload.py Creates substances.db with 10 sample items.
Think of a pantry where every jar carries three numbers instead of one. Most chemistry software measures a substance by pH and stops. The Counter-Chemical-Base starts with pH, adds a plasma level for ionization and energy state and a starch level for carbohydrate content, and tracks every raw material, compound and element on all three at once. Underneath sit six SQLite databases in three pairs: raw materials beside the transformations that change them, compounds beside the recipes that make them, elements beside the combinations they form. A seventh standalone database, indexed on all three properties, answers range queries fast, and a sample loader fills it with ten starter items.
On top sits the acid-base engine. Each compound is sorted into one of seven classes from strong acid to strong base, with an acidity score, estimated pKa and pKb, dissociation constant and proton donor or acceptor flags set automatically. Nine safety zones span the pH scale with protective-equipment notes and first-aid protocols, and thirty real-world pH landmarks keep the numbers grounded. A SafetyGatekeeper blocks opioid and illicit-drug synthesis queries with more than seventy keywords, hashed supervisor tokens and a timestamped audit log, so the fifty-plus legitimate synthesis procedures stay open while the wrong ones stay shut.
It is for chemistry software licensees and the research and teaching labs they serve, in Standard, Professional and Enterprise editions. The license is IP-retained: the inventor, Christopher Gabriel Brown, keeps ownership, and the licensee walks away with the complete, operational system in plain Python and the right to run it.
Description
60-counter-chemical-base — Compound Creation & Synthesis Software (Counter-Chemical-Base System)
Patent references (from portfolio): Patent 2562, Patent 2560, Patent 2559, Patent 2558, Patent 2557, Patent 2556, Patent 2555, Patent 2554, Patent 2553, Patent 2552, Patent 2551, Patent 1096, Patent 1097, Patent 1098, Patent 3561, Patent 1026, and broader 1000+ patent portfolio
Status: Design / IP package — IP-retained license, complete and operational, ready for licensing
Overview
60-counter-chemical-base is a production-ready, federated compound-creation and acid-base analysis platform. It provides a six-database federation layer, a full acid-base analysis and discovery engine (AB-AD), a SafetyGatekeeper access-control system, multi-source data integration from three separate project databases, interactive HTML chart generation, natural-language Q&A routing, and pH-power outcome analysis up to the 256th power. The system tracks substances across three core dimensions — pH level (acidity/alkalinity, 0–14 scale), Plasma level (ionization/energy state), and Starch level (carbohydrate content) — and extends them with acid-base classification properties including pKa, pKb, proton donor/acceptor status, buffer capacity, dissociation constants, and acidity strength scoring. It covers 50+ compound synthesis procedures, 30 real-world pH landmarks, 9 safety zones with first-aid procedures, 70+ blocked keyword terms for illicit-substance filtering, and 31 reference compounds analyzed through 256 mathematical powers. The entire platform is written in Python 3.6+ and uses SQLite for all persistent storage.
Federated Database Architecture
The system operates on a three-pair, six-database federation model. Each pair consists of a primary entity database and a relationship/method database, all stored as indexed SQLite files inside the fed_databases/ directory.
Database File Purpose Key Columns
A1 a1_raw_materials.db Raw materials / source substances id, name (UNIQUE), source_type, ph_level, plasma_level, starch_level, abundance, cost, probability, notes, created_at
A2 a2_transformations.db Transformations / chemical reactions id, source_material_id (FK→A1), source_name, target_name, condition_type, temperature, pressure, catalyst, success_probability, time_required, energy_cost, notes, created_at
B1 b1_compounds.db Chemical compounds id, formula (UNIQUE), name, compound_type, ph_level, plasma_level, starch_level, molecular_weight, stability, probability, element_count, notes, created_at; extended columns: pka_value, pkb_value, acid_base_type, acidity_strength, conjugate_pair, proton_donor, proton_acceptor, buffer_capacity, dissociation_constant, discovered_date
B2 b2_synthesis_methods.db Synthesis methods / creation recipes id, compound_id (FK→B1), compound_formula, method_name, required_materials, temperature, pressure, catalyst, steps, success_rate, time_hours, difficulty_level, cost_estimate, notes, created_at
C1 c1_elements.db Individual periodic elements id, symbol (UNIQUE), name (UNIQUE), atomic_number, ph_contribution, plasma_affinity, starch_reactivity, stability, abundance, probability, group_type, notes, created_at
C2 c2_combinations.db Multi-element combinations id, element_ids, element_symbols, resulting_compound, synergy_factor, combined_ph, combined_plasma, combined_starch, interaction_type, probability, stability, notes, created_at
A seventh standalone database, substances.db , provides the core pH/Plasma/Starch tracking system with an items table (columns: id, name [UNIQUE], category, ph_level, plasma_level, starch_level, notes, created_at) and four B-tree indexes on ph_level, plasma_level, starch_level, and category for O(log n) range queries.
Acid-Base Classification System
Compounds are automatically classified by pH value into seven categories with an acidity strength score (0–10 scale):
pKa is estimated as (7 − pH) for acids; pKb as (pH − 7) for bases. The dissociation constant Ka is computed as 10^(−pKa). Proton donor/acceptor flags are set automatically from the acid-base type.
Safety Zones and First Aid
Nine safety zones span the full pH scale, each with color coding, effects description, contact protocol, PPE requirements, ingestion warning, and real-world examples:
SEVERE_DANGER_BASE 11–13 #DC143C SEVERE DANGER - Corrosive Bleach, ammonia cleaners, diluted lye
EXTREME_DANGER_BASE 13–14 #8B0000 EXTREME DANGER - DO NOT TOUCH Liquid lye, concentrated base solutions
Four first-aid protocols cover extreme acid (pH 0–2), severe acid (pH 2–5), safe (pH 6–8), and severe base (pH 9–14) exposure, each with multi-step emergency instructions.
SafetyGatekeeper Access Control
The SafetyGatekeeper class (ab_ad_safety_gatekeeper.py, 286 lines) enforces strict blocking of opioid and illicit drug synthesis content:
- Tier 1 — Opioid Synthesis Blocked (30+ keywords): morphine synthesis, poppy alkaloid extraction, thebaine, codeine synthesis, opioid precursor, heroin acetylation, diacetylmorphine, acetylation morphine, heroin from morphine, fentanyl synthesis, fentanyl production, fentanyl precursor, carfentanil, analogue fentanyl, oxycodone synthesis, hydrocodone synthesis, oxymorphone, opioid cook, opioid production, opioid synthesis procedure
- Tier 2 — Illicit Drug Synthesis Blocked (40+ keywords): cocaine synthesis, coca paste, crack production, methamphetamine synthesis, meth cook, pseudoephedrine cook, methlab procedure, crystal meth production, lsd synthesis lysergic, psilocybin cultivation, dmt synthesis, mdma synthesis, ecstasy production, safrole synthesis, ketamine synthesis, pcp production, illicit drug synthesis, illegal drug production, drug cook, drug precursor synthesis, controlled substance production
Features include SHA-256 hashed supervisor authorization tokens, timestamped audit logging (JSON format), compound-level field inspection (name, synthesis, description), supervised-mode override with full audit trail, and file-based audit report generation.
Landmark categories: Food/Drink (10), Biological (5), Medicine (3), Household (2), Cleaning (4), Industrial (4), Natural (1), Reference (1).
Multi-Source Data Integration
Two integration modules merge data from three external project databases with narcotics filtering:
Source Project Content
Chemical Cooker (16) 16-chemical-cooker 29 pharmaceutical synthesis guides; aspirin synthesis (acetylation of salicylic acid with acetic anhydride, 20–25 C, 1 atm, ~95% yield)
Cessation Database (56) 56-cessation-database Addiction treatment medication chemistry; naltrexone, buprenorphine, methadone, acetylcysteine procedures
Alchemy Data (41) 41-alchemy-data-three Compound reactions, formulas, and blueprints; CSV extraction from clean_gass_top10.csv, clean_metals_top10.csv, clean_objects_top10.csv, clean_solvents_top10.csv; 40 compounds exported to alchemy_acid_base_export.json
The MultiSourceAlchemy class (ab_ad_multi_source.py) applies a strict narcotics filter with 30+ banned substance terms. The MultiSourceAlchemyFull class (ab_ad_multi_source_full.py) applies a narrower filter blocking only actual narcotic synthesis procedures (9 specific formulas) while allowing all legitimate precursor chemistry.
Alchemy Acid-Base Extractor
The AlchemyAcidBaseExtractor class (alchemy_acid_base_extractor.py, 268 lines) classifies alchemy compounds as acidic, basic, or neutral based on elemental composition. The acid_base_mapping covers 14 elements:
- Acidic elements: P (phosphoric), S (sulfuric), Cl (chlorine), F (fluorine)
- Basic elements: Na (sodium), K (potassium), Ca (calcium), Mg (magnesium), Li (lithium)
- Mixed: N (nitrogen)
- Neutral: H (hydrogen), C (carbon), O (oxygen), Ar (argon)
Outputs include a comprehensive acid-base report, ASCII bar-chart visualization of acid/base/neutral distribution, and AB-AD-compatible JSON export.
Outcomes Analysis Engine (01-CORE-SYSTEM)
Three analysis scripts calculate pH-power outcomes for 31 reference compounds across the full acid-to-base spectrum:
File Class Power Range Derived Metrics
ab_outcomes_complete_analysis.py CompoundOutcome / AcidBaseOutcomesAnalyzer 1–12 H+ concentration, OH- concentration, pOH, acidity index, buffer capacity estimate, ionization degree, danger level (0–10)
ab_outcomes_64th_power_complete.py CompoundOutcome64 / AcidBaseOutcomes64Analyzer 1–64 Same derived metrics as above
ab_outcomes_256th_power_ultimate.py CompoundOutcome256 / AcidBaseOutcomes256Analyzer 1–256 Same derived metrics as above
The 31 compounds analyzed include: Battery Acid (H2SO4(aq), pH 0.5), Gastric Acid (HCl(aq), pH 1.5), Hydrochloric Acid (HCl, pH 1.0), Sulfuric Acid (H2SO4, pH 1.5), Phosphoric Acid (H3PO4, pH 2.1), Nitric Acid (HNO3, pH 1.3), Acetic Acid conc (CH3COOH, pH 2.0), Citric Acid conc (C6H8O7, pH 2.2), Lemon Juice (pH 2.0), Vinegar (pH 2.5), Wine (pH 3.0), Orange Juice (pH 3.5), Tomato Juice (pH 4.0), Aspirin Solution (C9H8O4(aq), pH 2.5), Coffee (pH 5.0), Black Tea (pH 5.5), Pure Water (H2O, pH 7.0), Human Blood (pH 7.4), Milk (pH 6.5), Sea Water (pH 8.2), Baking Soda (NaHCO3, pH 8.3), Ammonia Solution (NH3(aq), pH 11.0), Milk of Magnesia (Mg(OH)2, pH 10.5), Soap Solution (pH 10.0), Sodium Hydroxide (NaOH, pH 13.0), Potassium Hydroxide (KOH, pH 13.5), Ammonia conc (pH 12.0), Lime Water (Ca(OH)2, pH 12.5), Drain Cleaner (NaOH(aq), pH 13.0), Bleach (NaOCl(aq), pH 12.5), Lye (NaOH(pure), pH 14.0). Export formats: CSV, JSON, XLSX, ODS, XLS.
The ABODCharts class (ab_ad_charts.py, 476 lines) generates four interactive HTML visualizations saved to the ab_ad_charts/ directory:
Chart File Size Description
pH Spectrum ph_spectrum.html 2.4 KB Plotly.js scatter plot of acids (red) vs. bases (blue) by pH and probability, with neutral pH 7 reference line
Strength Comparison strength_comparison.html 2.3 KB Plotly.js bar chart of compound counts by category: strong acids, weak acids, strong bases, weak bases
pH Scale ph_scale.html 16 KB Master pH scale chart with 14-segment color gradient, all 30 landmarks with safety-level borders, full safety table, first-aid guide, and compound listings from database
Buffer Map buffer_map.html 2.5 KB Plotly.js scatter plot of buffer solution pairs for pH 7.0 +/- 3.0, color-coded by distance from neutral, with Viridis colorscale
Base Q&A qa_engine.py (~350 lines) AlchemyQA Transform, create/synthesize, combine, discover, path/chain, general. Keyword sets: transform (5 keywords), create (5), combine (4), element (3), compound (4), material (4), method (5), path (5), discover (5)
Acid-Base Q&A qa_engine_acid_base.py (300 lines) AlchemyQAWithAcidBase All base types plus: strong acid, weak acid, strong base, weak base, buffer, pH range, acid/base discovery from elements. Additional keyword sets: acid (5 keywords), base (5), buffer (3)
AB-AD Q&A ab_ad_qa.py (173 lines) ABADQA Strong/weak acid/base lookup, element discovery, buffer suggestions, pH range queries, synthesis analysis
schema.py 37 init_db() Initialize substances.db with items table and 4 indexes (idx_ph, idx_plasma, idx_starch, idx_category)
manager.py 186 SubstanceDB: add(), get(), search_ph_range(), search_plasma_range(), search_starch_range(), search_all_ranges(), by_category(), stats(), delete(), update(), all(), _row_to_dict() CRUD operations and range queries for substances.db
cli.py 149 main(), print_item(), print_help() Command-line interface with 10 commands: add, get, all, search-ph, search-plasma, search-starch, search-all, category, stats, delete
sample_load.py 35 load_samples() Load 10 sample substances: Water, Vinegar, Baking Soda, Honey, Lemon Juice, Milk, Potato Starch, Ammonia, Orange Juice, Corn Flour
explorer.py 126 main() (interactive menu) Interactive database explorer with 8 options: search by pH/plasma/starch ranges, advanced multi-range search, category listing, random samples, CSV export
federated_schema.py 209 init_a1_materials(), init_a2_reactions(), init_b1_compounds(), init_b2_synthesis(), init_c1_elements(), init_c2_combinations(), init_all() Initialize all 6 federated SQLite databases with tables and indexes
federation.py 262 AlchemyFederation: add_material(), add_reaction(), get_reactions_for_material(), add_compound(), add_synthesis_method(), get_synthesis_methods(), add_element(), add_combination(), get_combinations_for_elements(), find_transformation_path(), discover_compound(), get_material_transformation_chain(), plus 6 static _row_to_dict helpers Core federation query engine across 6 databases
qa_engine.py 240 AlchemyQA: answer(), _is_transformation_q(), _is_synthesis_q(), _is_combination_q(), _is_discovery_q(), _is_path_q(), _extract_name(), _answer_transformation(), _answer_synthesis(), _answer_combination(), _answer_discovery(), _answer_path(), _answer_general() Natural-language Q&A routing to federated databases
acid_base_schema.py 146 add_acid_base_columns(), categorize_compound_by_ph(), populate_acid_base_properties(), init_acid_base() Enhance B1 compounds table with 10 acid-base columns and 2 additional indexes
acid_base_discovery.py 260 AcidBaseDiscovery: find_strong_acids(), find_strong_bases(), find_weak_acids(), find_weak_bases(), discover_from_elements(), find_buffer_candidates(), analyze_synthesis_difficulty(), rank_acids_by_strength(), rank_bases_by_strength(), get_most_probable_acids(), get_most_probable_bases(), format_acid_base_report(), discover_all_categories() Acid-base discovery engine with ranking and buffer pairing
ab_ad_schema.py 146 add_ab_ad_columns(), categorize_compound_by_ph(), populate_ab_ad_properties(), init_ab_ad() AB-AD schema enhancement (parallel to acid_base_schema.py)
ab_ad_discovery.py 220 ABAD: find_strong_acids(), find_strong_bases(), find_weak_acids(), find_weak_bases(), discover_from_elements(), find_buffers(), analyze_synthesis(), get_all_categories(), format_compound() AB-AD discovery engine
ab_ad_safety.py 210 SAFETY_ZONES (9 zones), FIRST_AID (4 protocols), get_safety_zone(), get_safety_html_markers(), get_first_aid_html() pH danger zones, safety levels, and first-aid HTML generation
ab_ad_safety_gatekeeper.py 286 SafetyGatekeeper: set_supervision(), check_blocked(), process_compound(), load_and_filter_database(), generate_audit_report(), log_to_file(); constants: OPIOID_SYNTHESIS_BLOCKED (20 terms), ILLICIT_DRUG_SYNTHESIS_BLOCKED (21 terms), ALL_BLOCKED_PROCEDURES Strict opioid/illicit drug blocking with SHA-256 hashed audit logging
ab_ad_landmarks.py 107 LANDMARKS (30 entries), CATEGORIES (8 groups), get_landmark_html(), get_landmark_json() Real-world pH reference points with HTML/JSON generation
ab_ad_charts.py 476 ABODCharts: generate_ph_spectrum(), generate_strength_comparison(), generate_ph_scale(), generate_buffer_map(), generate_all() Generate 4 interactive HTML charts using Plotly.js
ab_ad_qa.py 173 ABADQA: ask(), _strong_acids(), _weak_acids(), _strong_bases(), _weak_bases(), _discover(), _buffer(), _ph_range(), _synthesis(), _help() AB-AD interactive Q&A
ab_ad_multi_source.py 215 MultiSourceAlchemy: is_banned(), load_cessation_database(), load_chemical_cooker_database(), load_alchemy_41_database(), load_all(), export_for_ab_ad(); BANNED_SUBSTANCES (30+ terms) Multi-source integration with strict narcotics filter
ab_ad_multi_source_full.py 236 MultiSourceAlchemyFull: is_blocked_narcotic_synthesis(), load_chemical_cooker_16(), load_cessation_56(), load_alchemy_41(), load_all(), export_for_ab_ad(); BLOCKED_FORMULAS (9 terms) Full multi-source integration blocking only specific narcotic synthesis procedures
qa_engine_acid_base.py 300 AlchemyQAWithAcidBase: answer(), _is_acid_base_q(), _answer_acid_base(), _strong_acids_answer(), _weak_acids_answer(), _strong_bases_answer(), _weak_bases_answer(), _buffer_answer(), _ph_range_answer(), _discover_acids_bases(), _general_acid_base_answer(), _is_transformation_q(), _answer_transformation(), _is_synthesis_q(), _answer_synthesis(), _is_combination_q(), _answer_combination(), _answer_general() Extended Q&A with acid-base discovery
alchemy_acid_base_extractor.py 268 AlchemyAcidBaseExtractor: classify_compound(), load_alchemy_csv(), load_all_alchemy_data(), generate_acid_base_report(), export_for_ab_ad(), generate_visualization(); acid_base_mapping (14 elements), csv_files (4 files) Extract and classify alchemy compounds by acid-base type
import_alchemy_data.py 142 calculate_properties(), load_compound_chunk(), import_compounds() Import Blu-ray alchemy data into substances.db using MD5-seeded property generation
federated_loader.py 223 calculate_properties(), load_compound_chunk(), load_alchemy_data() Load Blu-ray alchemy data into all 6 federated databases (Sets A, B, C)
populate_acids_bases.py 155 populate() Populate B1/B2 with 16 reference acids and bases (5 strong acids, 4 weak acids, 4 strong bases, 3 weak bases)
bootstrap_demo.py 100 (script) Bootstrap all 6 databases, populate sample data, run 7 live Q&A queries
quick_demo.py 99 (script) Quick demo: initialize, add 3 compounds + 3 synthesis methods + 3 elements + 2 combinations, run 4 live queries
check_progress.py 15 (script) Quick import progress check showing substance count and aggregate stats
01-CORE-SYSTEM/ab_outcomes_complete_analysis.py 369 CompoundOutcome, AcidBaseOutcomesAnalyzer: generate_comprehensive_table(), export_to_csv(), export_to_json(), export_to_ods(), export_to_xls(), export_to_xlsx(), generate_summary_report() Outcomes to 12th power for 31 compounds, multi-format export
01-CORE-SYSTEM/ab_outcomes_64th_power_complete.py ~320 CompoundOutcome64, AcidBaseOutcomes64Analyzer Outcomes to 64th power for 31 compounds
01-CORE-SYSTEM/ab_outcomes_256th_power_ultimate.py ~300 CompoundOutcome256, AcidBaseOutcomes256Analyzer Ultimate outcomes to 256th power for 31 compounds
substances.db Primary SQLite database (~762 KB), items table with pH/plasma/starch tracking
fed_databases/ (6 files) Federated SQLite databases: a1_raw_materials.db, a2_transformations.db, b1_compounds.db, b2_synthesis_methods.db, c1_elements.db, c2_combinations.db
ab_ad_charts/ (4 files) Interactive HTML charts: ph_scale.html (16 KB), ph_spectrum.html (2.4 KB), strength_comparison.html (2.3 KB), buffer_map.html (2.5 KB)
1 light trigger.txt Patent portfolio reference data (~760 KB)
COMPOUND_CREATION_SYSTEM_PRODUCT.md Detailed product description with 3-tier pricing (SKUs 32808/32809/32810)
LAB_TECH_QUICK_GUIDE.md Step-by-step lab procedures (aspirin 45 min, acetaminophen 60 min, ibuprofen 90 min)
ALCHEMY_ACID_BASE_INTEGRATION_SUMMARY.md Results of alchemy data integration (40 compounds)
Landmark categories 8 (Food/Drink, Biological, Medicine, Household, Cleaning, Industrial, Natural, Reference)
Core Python source schema.py, manager.py, cli.py, sample_load.py, explorer.py, federation.py, federated_schema.py, federated_loader.py, qa_engine.py, qa_engine_acid_base.py, acid_base_schema.py, acid_base_discovery.py, ab_ad_schema.py, ab_ad_discovery.py, ab_ad_safety.py, ab_ad_safety_gatekeeper.py, ab_ad_landmarks.py, ab_ad_charts.py, ab_ad_qa.py, ab_ad_multi_source.py, ab_ad_multi_source_full.py, alchemy_acid_base_extractor.py, import_alchemy_data.py, populate_acids_bases.py, setup_acid_base.py, ab_ad_setup.py
Demo and utility scripts bootstrap_demo.py, quick_demo.py, check_progress.py, demo_qa.py, demo_acid_base_qa.py
Outcomes analysis (01-CORE-SYSTEM/) ab_outcomes_complete_analysis.py (12th power), ab_outcomes_64th_power_complete.py (64th power), ab_outcomes_256th_power_ultimate.py (256th power)
Databases substances.db, fed_databases/ (a1_raw_materials.db, a2_transformations.db, b1_compounds.db, b2_synthesis_methods.db, c1_elements.db, c2_combinations.db)
Interactive charts (ab_ad_charts/) ph_scale.html, ph_spectrum.html, strength_comparison.html, buffer_map.html
Data exports alchemy_acid_base_export.json, ph_data_output.txt, ph_visual_drawing.txt, loader_output.txt
Documentation 28 files including README.md, INDEX.md, all product specs, safety policies, integration summaries, quick start guides, session records
Patent reference 1 light trigger.txt (760 KB patent portfolio data), Yesterday.txt (patent cross-references)
Delivery: Physical Blu-ray disc, AES-256 encrypted, shipped via tracked post.
Photo

Footnotes
- Product number 8510.
- Family: chemistry lab.
- Purchase: When you buy, you buy the use of that blueprint only.