Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
2e316e8
rebuild db from scratch
komed3 Apr 13, 2026
f457f2e
exclude files
komed3 Apr 13, 2026
4c671b4
create repo files
komed3 Apr 13, 2026
85a22a6
init npm
komed3 Apr 13, 2026
b6557a9
some tests for new db structure
komed3 Apr 13, 2026
add1393
define element symbols
komed3 Apr 13, 2026
1e942d1
Update generic.ts
komed3 Apr 13, 2026
ad02cdd
install devtypes package
komed3 Apr 13, 2026
0cc5c91
declare abstract enums for unit system
komed3 Apr 13, 2026
d885f5f
SI prefixes
komed3 Apr 13, 2026
0d8a795
declare valid physical units
komed3 Apr 13, 2026
08452a6
implement types for prefixed unit symbols
komed3 Apr 13, 2026
5226adf
declare branded "Unit" type
komed3 Apr 13, 2026
7d0fb20
define physical quantity type
komed3 Apr 13, 2026
e7c1875
Update units.ts
komed3 Apr 13, 2026
71784ae
declare unit collection
komed3 Apr 13, 2026
de757f9
Create abstract/config.ts
komed3 Apr 13, 2026
04a1035
fix
komed3 Apr 13, 2026
548d737
reimplement uncertainty
komed3 Apr 13, 2026
8518312
reimplement BibTeX based reference system
komed3 Apr 13, 2026
5f49983
add refs / units to db
komed3 Apr 13, 2026
fb7c76a
min fixes
komed3 Apr 13, 2026
78b7c52
add enums for value types
komed3 Apr 13, 2026
cc9dccf
alpha sort fields
komed3 Apr 13, 2026
0cf6d13
Create value.ts
komed3 Apr 13, 2026
70f9960
Update abstract.ts
komed3 Apr 13, 2026
71fa644
min fix
komed3 Apr 13, 2026
358abc8
fix overlapping type names
komed3 Apr 13, 2026
81ca70f
Update value.ts
komed3 Apr 13, 2026
103b0c6
bump devtypes to vers. 2.1
komed3 Apr 13, 2026
ff718c3
Update value.ts
komed3 Apr 13, 2026
7fddd39
min fix
komed3 Apr 13, 2026
5ffaaaa
declare standard conditions
komed3 Apr 13, 2026
c0cdc7f
Create condition.ts
komed3 Apr 13, 2026
867496b
implement property types
komed3 Apr 13, 2026
cf9908b
Create collection.ts
komed3 Apr 13, 2026
78e2b62
declare registry groups
komed3 Apr 13, 2026
39eb15b
min fixes
komed3 Apr 13, 2026
463a931
Update registry.ts
komed3 Apr 14, 2026
25a313c
implement basic descriptive collection
komed3 Apr 14, 2026
5933d9c
declare meta / lang groups
komed3 Apr 14, 2026
237fd22
add naming and descriptive types
komed3 Apr 14, 2026
c70a639
rename abstract to util enums
komed3 Apr 14, 2026
4a3c39f
declare media / weblink groups
komed3 Apr 14, 2026
2372a60
Update descriptive.ts
komed3 Apr 14, 2026
6ad2994
add discovery info
komed3 Apr 14, 2026
0e170d1
update main DB type
komed3 Apr 14, 2026
d88610b
describe element collection
komed3 Apr 14, 2026
be70ff8
rename collection to entity
komed3 Apr 14, 2026
bb37bf0
add element specific enums
komed3 Apr 14, 2026
49b7f30
implement element classification
komed3 Apr 14, 2026
7bf172b
Create enum/safety.ts
komed3 Apr 14, 2026
0429c3c
declare safefy collection (hazard / toxicity data)
komed3 Apr 14, 2026
008c444
Update element.ts
komed3 Apr 14, 2026
db82c7e
abundance info will be its own collection
komed3 Apr 14, 2026
7bea50c
add abundance collection to element entity
komed3 Apr 14, 2026
ac69a36
add shell model
komed3 Apr 14, 2026
c13d873
Create atomics.ts
komed3 Apr 14, 2026
9b65e44
add atomics collection to element data
komed3 Apr 14, 2026
265129b
add nuclear charge info
komed3 Apr 14, 2026
f89818a
Update atomics.ts
komed3 Apr 14, 2026
50a0404
add chemistry collection
komed3 Apr 14, 2026
d094b8d
define chemistry enums
komed3 Apr 14, 2026
9495d42
add basicity props.
komed3 Apr 14, 2026
17f2c09
update chemistry model
komed3 Apr 14, 2026
a0df11a
oxidation
komed3 Apr 14, 2026
def5cb2
add electrochemistry props.
komed3 Apr 14, 2026
b807535
thermochem. + solubility
komed3 Apr 14, 2026
c58e42f
implement chemical bonding
komed3 Apr 14, 2026
2686c93
Update chemistry.ts
komed3 Apr 14, 2026
0e1545b
add physics collection
komed3 Apr 14, 2026
a6d6b81
add enthalpy + heat properties
komed3 Apr 14, 2026
ef75ca6
add hardness / elasticity / electricity props.
komed3 Apr 14, 2026
98193a9
add magnetic properties
komed3 Apr 14, 2026
9fe1261
Update physics.ts
komed3 Apr 14, 2026
8dcb885
Update physics.ts
komed3 Apr 14, 2026
cefa914
add crystal structure properties
komed3 Apr 14, 2026
684f4b2
Update physics.ts
komed3 Apr 14, 2026
b524c0f
pricing
komed3 Apr 14, 2026
06fcf79
move some types around
komed3 Apr 14, 2026
22210f7
Create form.ts
komed3 Apr 14, 2026
eb79283
update form types
komed3 Apr 14, 2026
18bb355
Create nuclide.ts
komed3 Apr 14, 2026
217d208
branded nuclide identifier
komed3 Apr 14, 2026
0bb17ad
declare decay modes
komed3 Apr 14, 2026
3b169e6
implement nuclide index
komed3 Apr 14, 2026
fdd8586
Update nuclide.ts
komed3 Apr 14, 2026
68979d4
nuclide classification
komed3 Apr 14, 2026
d771b68
nuclide properties
komed3 Apr 14, 2026
2512da2
add nuclear collection
komed3 Apr 14, 2026
1446b86
spin parity
komed3 Apr 14, 2026
cfc73c0
fix units
komed3 Apr 14, 2026
c67d1e4
describe nuclear properties
komed3 Apr 14, 2026
ea015b3
ground state
komed3 Apr 14, 2026
0062961
decay channel
komed3 Apr 14, 2026
661a911
NMR
komed3 Apr 14, 2026
b111fb2
rework nuclear collection
komed3 Apr 14, 2026
1bf1a94
Update nuclear.ts
komed3 Apr 14, 2026
009f08f
Update atomics.ts
komed3 Apr 14, 2026
dd4cdd6
Update chemistry.ts
komed3 Apr 14, 2026
32de35d
Create compound.ts
komed3 Apr 14, 2026
a5d64c9
add collections to compound entity
komed3 Apr 14, 2026
bb98dc4
add ATC code
komed3 Apr 14, 2026
3fa0355
compound classification
komed3 Apr 14, 2026
b2b2265
add synthetic classification for elements and compounds
komed3 Apr 14, 2026
306222a
rename enum
komed3 Apr 14, 2026
069d9e3
implement composition collection
komed3 Apr 15, 2026
5af55f0
Update compound.ts
komed3 Apr 15, 2026
106093b
add dipole moment
komed3 Apr 15, 2026
89bf43a
Update physics.ts
komed3 Apr 15, 2026
896f8c7
add standard molar entropy
komed3 Apr 15, 2026
2b4a4ed
change stp to enum
komed3 Apr 15, 2026
bf65c5b
remove config files
komed3 Apr 15, 2026
947d424
declare PhysicalQuantity as enum
komed3 Apr 15, 2026
b20884f
Update unit.ts
komed3 Apr 15, 2026
85fe416
change phys. quantities in DB collections
komed3 Apr 15, 2026
12ca89d
install typescript and prep. tsc linting
komed3 Apr 15, 2026
e4d5b6c
setup dependabot
komed3 Apr 15, 2026
5293429
implement molecular geometry (replacing bonding group)
komed3 Apr 15, 2026
e392614
min fix
komed3 Apr 15, 2026
d4e7d0e
Create mineral.ts
komed3 Apr 15, 2026
695db35
add mineral entity to DB
komed3 Apr 15, 2026
a01e0dd
Update index.ts
komed3 Apr 15, 2026
c150538
add collection to mineral entity
komed3 Apr 15, 2026
4f10975
min fixes
komed3 Apr 15, 2026
51d2dbd
mineral classes
komed3 Apr 15, 2026
dff1bb6
create mineral properties collection
komed3 Apr 15, 2026
e15580c
crystal habits
komed3 Apr 15, 2026
c03fed2
allow multiple names
komed3 Apr 15, 2026
a828e8c
remove crystal props. from physical collection
komed3 Apr 15, 2026
4b7af8a
add crystallography collection
komed3 Apr 15, 2026
f8e49a0
minor fixes
komed3 Apr 15, 2026
2bf325d
add crystallography collection to entities
komed3 Apr 15, 2026
5abbae9
fix typo
komed3 Apr 15, 2026
f2ba12d
define some mineral props.
komed3 Apr 15, 2026
6ada35a
Update mineral.ts
komed3 Apr 15, 2026
0c2758d
Update mineral.ts
komed3 Apr 15, 2026
a35fda9
add missing crystal enums
komed3 Apr 15, 2026
a42ebd1
Update crystallography.ts
komed3 Apr 15, 2026
637dd4b
remove mineral collection
komed3 Apr 15, 2026
d85168c
add formula mass property
komed3 Apr 15, 2026
13d4849
update collections
komed3 Apr 15, 2026
1a63bbd
Update physics.ts
komed3 Apr 15, 2026
aa390bb
Create mixture.ts
komed3 Apr 15, 2026
3284246
Update mixture.ts
komed3 Apr 15, 2026
ed2b2d7
add branded MixtureID type
komed3 Apr 15, 2026
6873cef
add collections to mixture entity
komed3 Apr 15, 2026
2093592
Update mixture.ts
komed3 Apr 15, 2026
474f071
add mixture entity to main DB collection
komed3 Apr 15, 2026
260e8c6
add missing props. to mineral classification
komed3 Apr 15, 2026
87d85bb
Update mixture.ts
komed3 Apr 15, 2026
af38639
Update index.ts
komed3 Apr 15, 2026
99c08b4
db stats
komed3 Apr 15, 2026
651ab3f
mixture classification + enums
komed3 Apr 15, 2026
ec7f98c
install typedoc packages
komed3 Apr 15, 2026
f379c33
setup typedoc
komed3 Apr 15, 2026
479b722
add favicon
komed3 Apr 15, 2026
0e6c7fc
declare package exports
komed3 Apr 15, 2026
817ecd9
Update package.json
komed3 Apr 15, 2026
b62b1ae
install schema packages
komed3 Apr 15, 2026
5363307
because the generator won't handle enum keys, we'll need to replace t…
komed3 Apr 16, 2026
612b8c6
remove unused enum
komed3 Apr 16, 2026
4041705
fix abstract type declarations
komed3 Apr 16, 2026
bd46558
change enums to string in collection types
komed3 Apr 16, 2026
f345f1c
declare basic entities for substance / composite
komed3 Apr 16, 2026
aef3464
substances will get a classification collection type
komed3 Apr 16, 2026
e3466a7
Update element.ts
komed3 Apr 16, 2026
6365c2b
add missing atomics collection
komed3 Apr 16, 2026
0727fbc
Update compound.ts
komed3 Apr 16, 2026
677ae7a
remove meta data from abstract substance
komed3 Apr 16, 2026
5dbcaca
Update mineral.ts
komed3 Apr 16, 2026
56774f4
Update mixture.ts
komed3 Apr 16, 2026
286d696
Update substance.ts
komed3 Apr 16, 2026
9b44803
add script commands for schema generator
komed3 Apr 16, 2026
25dc53a
Create schema.mjs
komed3 Apr 16, 2026
0036d89
add SchemaGenerator class
komed3 Apr 16, 2026
308d2b8
add global runner
komed3 Apr 16, 2026
3c4395a
init schema generator
komed3 Apr 16, 2026
6e4cab3
implement internal runner
komed3 Apr 16, 2026
7f49ac0
remove file
komed3 Apr 16, 2026
cbd7530
schema generator
komed3 Apr 16, 2026
a5f5b71
validate JSON schema using ajv
komed3 Apr 16, 2026
93bcb55
implement missing IO methods
komed3 Apr 16, 2026
0404bb6
save / load schema files
komed3 Apr 16, 2026
9f54491
implement optimizer method
komed3 Apr 16, 2026
6523413
analysis
komed3 Apr 16, 2026
4491945
enhance schema meta data
komed3 Apr 16, 2026
1216206
analyze nodes
komed3 Apr 16, 2026
1235254
build shared map
komed3 Apr 16, 2026
6adb71b
perform replacement
komed3 Apr 16, 2026
9183e5d
fix runner
komed3 Apr 16, 2026
2f01ead
update script logging
komed3 Apr 16, 2026
5acf04b
Create schema.yml
komed3 Apr 16, 2026
9c5f54d
Update schema.mjs
komed3 Apr 16, 2026
ed2961a
fix logging msg
komed3 Apr 16, 2026
e48444d
setup Typedoc workflow
komed3 Apr 16, 2026
15fe868
Create publish.yml
komed3 Apr 16, 2026
4bfdfda
setup validation workflow
komed3 Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .github/workflows/codeql.yml

This file was deleted.

17 changes: 9 additions & 8 deletions .github/workflows/test.yml → .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Validate

on:
push:
Expand All @@ -7,15 +7,15 @@ on:
branches: [ master ]

jobs:
lint:
name: Test
validate:
name: Type Safety & Schema
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
- name: Checkout
uses: actions/checkout@v6

- name: Setup Node.js
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
Expand All @@ -24,14 +24,15 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Lint
- name: Type Check
run: npm run lint

- name: Generate Schema
run: npm run schema

- name: Upload Schema
- name: Upload Schema Artifact
uses: actions/upload-artifact@v7
with:
name: database-schema
name: schema
path: src/schema.json
if-no-files-found: error
56 changes: 0 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,59 +7,3 @@
Strict TypeScript definitions and JSON Schema for structured representation of chemical elements, minerals, nuclides, and compounds used by the [periodic table database](https://github.com/pseinfo/database).

Visit [technical documentation](https://pseinfo.github.io/database-schema) for in-depth insights into the schema architecture.

## Scientific Design Principles

This model is designed to capture complexity of accurate chemical and physical properties found in high-level reference materials (e.g., in the CRC Handbook, the IMA mineralogical catalogs, and the ENSDF nuclide databases).

Theoretical and experimental values are tightly coupled with their context:

- **Unit System**: Features a robust unit system with validation, base units, conversion factors, and automatic prefix handling.
- **Physical Conditions**: Properties are explicitly bound to measurement conditions (e.g., standard temperature & pressure, variable temperatures, or specific concentrations).
- **Measurement Uncertainty**: Integration of absolute, relative, and asymmetric uncertainties (`+X`, `-Y`).
- **References**: Values optionally map to explicit BibTeX-like reference arrays tracking the scientific sourcing.
- **Data Verification**: Enforced distinction between theoretical, empirical, measured, and calculated values.

## Architectural Model

The core `Database` composite organizes entities into standardized components. Information is segmented into decoupled, theoretically profound `Collections`.

### Fundamental Collections

- **Descriptive Collection**: Centralization of spatial registries, CAS, crystallographic mappings (Pearson, Strunz systems), media, and historical context.
- **Physics Collection**: Multi-state modeling encompassing thermal (heat, thermodynamic constants), mechanistic (elasticity, hardness), electromagnetic, optic (birefringence, spatial refraction, optical rotation, dichroism), and acoustic phenomena.
- **Chemistry Collection**: Acid/base behaviors (including complex Hard/Soft-Acid-Base theory, pKa, pKb, isoelectric point), solubility constants, and a high-resolution map of over 10 different electronegativity scales (Pauling, Mulliken, Allen, Nagle, etc.).
- **Atomics Collection & Nuclear Collection**: Precise structural shell models, exact ionization potentials, mass excesses, isomeric transition energies, Q-values of decay chains, and nuclear cross-sections (fission, thermal resonance absorption).
- **Safety Collection**: Codification of GHS, WHMIS, ADR, UN numbers, NFPA topologies, and measured toxicity domains.
- **Composition Collection**: Abstract data structures for representing chemical compositions for compounds and minerals.

## Entity Schemas

### Elements

Standard definitions extending physics, atomics, and baseline phase properties. Accommodates multiple allotropes via nested state boundaries. Indexed by their symbols.

### Compounds

Classifies compounds by their chemical composition and structure. Includes descriptive, classification, composition, physics, chemistry, and safety collections. Supported sub-forms include amorphous models, polymorphs, and molecular configurations. Indexed by a unique identifier.

### Minerals

Geological substance classifications compliant with IMA status rules, mapping habits, cleavage/fracture planes, luminescence, inclusions, specific alterations, and advanced Strunz / Dana systematic indices. Entity includes generic collections, specialized properties and forms. Indexed by a unique identifier.

### Nuclides

Describes specific properties of nuclides (e.g., binding energy, NMR characteristics, half-lives, and decay products). Indexed by element symbol and nuclide identifiers with an optional metastable state suffix.

A complete index over neutron and proton numbers is implemented, along with pre-calculated decay chains for all nuclides and their decay products.

## Runtime Validation & Usage

The project is written in TypeScript and generates a JSON Schema (Draft-07) from the database definitions.

The schema is used to validate the database and ensure strict API compliance within the [@pseinfo](https://github.com/pseinfo) architecture across isolated programming stacks.

## License

This project is licensed under the MIT License – see the [LICENSE](LICENSE) file for details.
Copyright © 2025–2026 PSEInfo by Paul Köhler (komed3). All rights reserved.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 33 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pseinfo/database-schema",
"description": "TypeScript type declarations for the @pseinfo database",
"version": "0.5.3",
"version": "0.6.0",
"license": "MIT",
"author": {
"name": "Paul Köhler",
Expand Down Expand Up @@ -30,52 +30,54 @@
"type-definitions",
"pseinfo"
],
"files": [
"types",
"src",
"README.md",
"LICENSE"
],
"type": "module",
"types": "types/index.ts",
"main": "types/index.ts",
"exports": {
".": {
"types": "./types/index.ts",
"import": "./types/index.ts",
"default": "./types/index.ts"
"default": "./types/index.ts",
"import": "./types/index.ts"
},
"./abstract/*": {
"types": "./types/abstract/*.ts",
"import": "./types/abstract/*.ts",
"default": "./types/abstract/*.ts"
"default": "./types/abstract/*.ts",
"import": "./types/abstract/*.ts"
},
"./collection/*": {
"types": "./types/collection/*.ts",
"default": "./types/collection/*.ts",
"import": "./types/collection/*.ts"
},
"./collections/*": {
"types": "./types/collections/*.ts",
"import": "./types/collections/*.ts",
"default": "./types/collections/*.ts"
"./entity/*": {
"types": "./types/entity/*.ts",
"default": "./types/entity/*.ts",
"import": "./types/entity/*.ts"
},
"./entities/*": {
"types": "./types/entities/*.ts",
"import": "./types/entities/*.ts",
"default": "./types/entities/*.ts"
"./enum/*": {
"types": "./types/enum/*.ts",
"default": "./types/enum/*.ts",
"import": "./types/enum/*.ts"
},
"./enums/*": {
"types": "./types/enums/*.ts",
"import": "./types/enums/*.ts",
"default": "./types/enums/*.ts"
"./schema.json": {
"default": "./src/schema.json",
"import": "./src/schema.json"
}
},
"files": [
"types",
"src",
"README.md",
"LICENSE"
],
"scripts": {
"lint": "tsc",
"schema:generate": "ts-json-schema-generator --tsconfig tsconfig.json --type Database -o src/schema.raw.json --expose all",
"schema:postprocess": "node scripts/schema-postprocess.mjs",
"schema:validate": "node scripts/schema-validate.mjs",
"schema": "npm run schema:generate && npm run schema:postprocess && npm run schema:validate",
"docs": "typedoc --logLevel Verbose --options typedoc.json"
"docs": "typedoc --logLevel Verbose --options typedoc.json",
"schema": "node scripts/schema.mjs",
"schema:generate": "node scripts/schema.mjs generate",
"schema:optimize": "node scripts/schema.mjs optimize",
"schema:validate": "node scripts/schema.mjs validate"
},
"dependencies": {
"devtypes": "^2.0.0"
"devtypes": "^2.1.0"
},
"devDependencies": {
"ajv": "^8.18.0",
Expand Down
Loading