Skip to content

Commit

Permalink
Adding examples and making test only run examples
Browse files Browse the repository at this point in the history
  • Loading branch information
cmungall committed Mar 30, 2024
1 parent 672ef4e commit 54460cb
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ t:
echo:
echo $(patsubst %,gen-%,$(TGTS))

test: all
#test: all
test: test-examples

install:
. environment.sh
Expand Down
11 changes: 11 additions & 0 deletions src/data/examples/valid/ChemicalElement-carbon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
id: CHEBI:27594 ## carbon atom
name: carbon
symbol: C
smiles_string:
- "[C]"
inchi_string: "InChI=1S/C"
atomic_number: 6
# in_periodic_table_group: 14
#in_periodic_table_group: p-block
#in_periodic_table_block: p-block

55 changes: 55 additions & 0 deletions src/data/examples/valid/Collection-nitrites.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
entities:
-
id: CHEBI:16301
name: nitrite
type: chemrof:PolyatomicIon
empirical_formula: "NO−2"
smiles_string:
- "N(=O)[O-]"
# molar_mass: 46.005
# conjugate_base_of: CHEBI:25567
has_atom_occurrences:
- name: _:nitrite-o1
occurrence_of: oxygen
- name: _:nitrite-o2
occurrence_of: oxygen
- name: _:nitrite-n1
occurrence_of: nitrogen
has_bonds:
- subject: _:nitrite-o1
object: _:nitrite-n1
bond_type: sigma
bond_order: 2
- subject: _:nitrite-o2
object: _:nitrite-n1
bond_type: sigma
bond_order: 1
-
id: CHEBI:25567
name: nitrous acid
type: chemrof:BronstedAcid
empirical_formula: "HNO2"
# molar_mass: 47.013
# acidity: 3.398
smiles_string:
- "N(=O)O"
has_atom_occurrences:
- name: _:nitrous_acid-o1
occurrence_of: oxygen
- name: _:nitrous_acid-o2
occurrence_of: oxygen
- name: _:nitrous_acid-n1
occurrence_of: nitrogen
- name: _:nitrous_acid-h1
occurrence_of: hydrogen
has_bonds:
- subject: _:nitrous_acid-o1
object: _:nitrous_acid-n1
bond_order: 2
- subject: _:nitrous_acid-o2
object: _:nitrous_acid-n1
bond_order: 1
- subject: _:nitrous_acid-o2
object: _:nitrous_acid-h1
bond_order: 1

36 changes: 36 additions & 0 deletions src/data/examples/valid/PolyatomicIon-ammonium.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
id: CHEBI:28938
name: ammonium
type: chemrof:PolyatomicIon
empirical_formula: "NH+4"
smiles_string:
- "[NH4+]"
#conjugate_base_of: CHEBI:16134
has_atom_occurrences:
- name: ammonium-n
occurrence_of: N
- name: ammonium-h1
occurrence_of: H
- name: ammonium-h2
occurrence_of: H
- name: ammonium-h3
occurrence_of: H
- name: ammonium-h4
occurrence_of: H
has_bonds:
- subject: ammonium-n
object: ammonium-h1
bond_order: 1
bond_type: polar covalent
- subject: ammonium-n
object: ammonium-h2
bond_order: 1
bond_type: polar covalent
- subject: ammonium-n
object: ammonium-h3
bond_order: 1
bond_type: polar covalent
- subject: ammonium-n
object: ammonium-h4
bond_order: 1
bond_type: polar covalent

0 comments on commit 54460cb

Please sign in to comment.